/* ===== 绘境 Web 创作台样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;
  --success: #10b981;
  --error: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 12px 32px -12px rgba(59,130,246,0.22);
}
:root.dark {
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --primary-light: #93c5fd;
  --bg: #1e1e1e;
  --card-bg: #2a2a2a;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --border: #3a3a3a;
  --success: #34d399;
  --error: #f87171;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  width: 100%;
  overflow: hidden;
}
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  scroll-snap-type: y proximity;
}

/* ===== 头部 ===== */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 50;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.logo-text { font-size: 16px; font-weight: 600; }
.version-badge {
  font-size: 11px; color: var(--primary); background: rgba(59,130,246,0.1);
  padding: 2px 8px; border-radius: 100px; font-weight: 600;
}
.msg-marquee {
  flex: 1; min-width: 0; overflow: hidden; white-space: nowrap;
  font-size: 12px; color: var(--primary); background: rgba(59,130,246,0.08);
  padding: 4px 12px; border-radius: 100px;
}
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.theme-btn, .settings-btn, .header-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-secondary); cursor: pointer;
}
.theme-btn:hover, .settings-btn:hover, .header-action-btn:hover { background: rgba(59,130,246,0.1); color: var(--text); }
.theme-btn svg, .settings-btn svg, .header-action-btn svg { width: 18px; height: 18px; }
.header-action-btn {
  width: auto; padding: 0 12px; gap: 6px; font-size: 13px; color: var(--text);
}
.header-action-btn .user-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

/* ===== 营销页（2026-08-05 · qclawai 风格 · 大屏化全屏分区块） ===== */
.view-landing { flex: 1; }
.land-v2 {
  --land-brand: #3b82f6;
  --land-brand-dark: #2563eb;
  --land-amber: #60a5fa;
  --land-light: #93c5fd;
  position: relative;
  flex: 1 0 auto;
}

/* 顶部导航（滚动到指定一屏） */
.land-nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.land-nav a {
  padding: 7px 14px; border-radius: 100px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: all 0.2s ease; white-space: nowrap;
}
.land-nav a:hover { color: var(--text); background: rgba(59,130,246,0.08); }
.land-nav a.active { color: var(--primary-dark); background: rgba(59,130,246,0.12); font-weight: 600; }
html.dark .land-nav a.active { color: #93c5fd; }
.app.in-studio .land-nav { display: none; }

/* ===== 全屏区块 ===== */
.ls-section {
  position: relative;
  min-height: calc(100vh - 82px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}
.ls-hero { overflow: hidden; }
.ls-products {
  background: linear-gradient(180deg, transparent 0%, rgba(59,130,246,0.045) 55%, rgba(59,130,246,0.07) 100%);
}
html.dark .ls-products {
  background: linear-gradient(180deg, transparent 0%, rgba(59,130,246,0.06) 55%, rgba(59,130,246,0.10) 100%);
}

.land-v2 .land-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.land-v2 .land-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 15%, black 35%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 15%, black 35%, transparent 75%);
}
html.dark .land-v2 .land-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
}
.land-v2 .land-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.land-v2 .land-blob-a { width: 540px; height: 540px; left: -170px; top: -170px; background: rgba(59,130,246,0.28); }
.land-v2 .land-blob-b { width: 580px; height: 580px; right: -190px; top: 10px; background: rgba(96,165,250,0.30); }
html.dark .land-v2 .land-blob-a { background: rgba(59,130,246,0.22); }
html.dark .land-v2 .land-blob-b { background: rgba(96,165,250,0.16); }

.land-v2 .land-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 1080px;
  padding: 0 24px;
  display: flex; flex-direction: column; align-items: center;
}
.land-hero { text-align: center; max-width: 760px; }
.land-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 100px;
  font-size: 14px; font-weight: 500;
  color: var(--land-brand-dark);
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.24);
}
html.dark .land-badge { color: #93c5fd; background: rgba(59,130,246,0.16); border-color: rgba(59,130,246,0.32); }
.land-badge svg { width: 15px; height: 15px; }

.land-title {
  margin: 22px 0 0;
  font-size: 64px; line-height: 1.1; letter-spacing: -2px; font-weight: 800;
}
.land-grad {
  background: linear-gradient(120deg, #3b82f6, #60a5fa 55%, #93c5fd);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.typewrap { position: relative; white-space: nowrap; }
.tw-caret {
  margin-left: 4px;
  vertical-align: 0.109em;
  animation: tw-blink 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes tw-blink { 50% { opacity: 0.5; } }
.land-sub {
  margin: 20px auto 0; font-size: 18px; line-height: 1.8; color: var(--text-secondary);
}
.land-actions { margin-top: 34px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.land-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: 14px;
  font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: all 0.25s ease; border: 1px solid transparent; white-space: nowrap;
}
.land-btn svg { width: 18px; height: 18px; }
.land-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 24px -8px rgba(59,130,246,0.55);
}
.land-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(59,130,246,0.62); }
.land-btn-ghost {
  color: var(--text);
  background: var(--card-bg);
  border-color: var(--border);
}
.land-btn-ghost:hover { border-color: #3b82f6; color: #3b82f6; transform: translateY(-2px); }
.land-hero-version { margin-top: 18px; font-size: 13px; color: var(--text-tertiary); }

.land-features {
  margin-top: 44px; width: 100%;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.land-feature {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.25s ease;
}
.land-feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -16px rgba(59,130,246,0.28);
  border-color: rgba(59,130,246,0.38);
}
.land-feature-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.land-feature-icon svg { width: 22px; height: 22px; }
.land-feature-icon.f1 { background: rgba(59,130,246,0.12); color: #2563eb; }
.land-feature-icon.f2 { background: rgba(96,165,250,0.15); color: #2563eb; }
.land-feature-icon.f3 { background: rgba(59,130,246,0.16); color: #2563eb; }
.land-feature-icon.f4 { background: rgba(59,130,246,0.10); color: #3b82f6; }
html.dark .land-feature-icon.f1 { color: #93c5fd; }
html.dark .land-feature-icon.f2 { color: #60a5fa; }
html.dark .land-feature-icon.f3 { color: #93c5fd; }
html.dark .land-feature-icon.f4 { color: #93c5fd; }
.land-feature h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.land-feature p { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); }

@media (max-width: 900px) {
  .land-title { font-size: 48px; }
  .land-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .land-title { font-size: 36px; }
  .land-sub { font-size: 15px; }
  .land-features { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .land-feature { padding: 14px 12px; }
  .land-feature-icon { width: 40px; height: 40px; margin-bottom: 10px; }
  .land-actions { gap: 10px; }
  .land-btn { padding: 12px 22px; font-size: 14px; border-radius: 12px; }
  .land-nav { display: none; }
}

/* ===== 页脚 ===== */
.ls-footer {
  padding: 26px 24px 34px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.land-footer { display: flex; justify-content: center; }
.land-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.land-footer a svg { width: 13px; height: 13px; }
.land-footer a:hover { color: var(--primary); }

/* ===== 商品区（YOMI 精选） ===== */
.shop-inner {
  width: 100%; max-width: 1080px;
  display: flex; flex-direction: column; align-items: center;
}
.shop-head { text-align: center; }
.shop-title { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -1px; }
.shop-sub { margin: 14px auto 0; font-size: 16px; color: var(--text-secondary); }
.shop-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px; font-size: 15px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  transition: color 0.2s ease; cursor: pointer;
}
.shop-more svg { width: 16px; height: 16px; }
.shop-more:hover { color: var(--primary); }

.shop-grid {
  margin-top: 44px; width: 100%;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.shop-card {
  display: flex; flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.28s ease;
  cursor: pointer;
}
.shop-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px -18px rgba(59,130,246,0.32);
  border-color: rgba(59,130,246,0.42);
}
.shop-img {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.shop-card:nth-child(1) .shop-img { background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(96,165,250,0.05)); }
.shop-card:nth-child(2) .shop-img { background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(52,211,153,0.05)); }
.shop-card:nth-child(3) .shop-img { background: linear-gradient(135deg, rgba(168,85,247,0.16), rgba(192,132,252,0.05)); }
.shop-card:nth-child(4) .shop-img { background: linear-gradient(135deg, rgba(249,115,22,0.16), rgba(251,146,60,0.05)); }
.shop-card:nth-child(5) .shop-img { background: linear-gradient(135deg, rgba(14,165,233,0.16), rgba(56,189,248,0.05)); }
.shop-card:nth-child(6) .shop-img { background: linear-gradient(135deg, rgba(236,72,153,0.16), rgba(244,114,182,0.05)); }
.shop-img-icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px;
  background: rgba(255,255,255,0.85);
  color: #2563eb;
  box-shadow: 0 10px 24px -10px rgba(59,130,246,0.42);
  transition: transform 0.28s ease;
}
html.dark .shop-img-icon { background: rgba(59,130,246,0.25); color: #93c5fd; }
.shop-img-icon svg { width: 30px; height: 30px; }
.shop-card:hover .shop-img-icon { transform: scale(1.06); }
.shop-tag {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 10px -4px rgba(59,130,246,0.6);
}
.shop-tag.hot { background: linear-gradient(135deg, #f97316, #ea580c); box-shadow: 0 4px 10px -4px rgba(249,115,22,0.6); }
.shop-tag.new { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 10px -4px rgba(16,185,129,0.6); }
.shop-body {
  padding: 16px 18px 14px;
  display: flex; flex-direction: column; gap: 7px; flex: 1;
}
.shop-name { font-size: 16px; font-weight: 700; }
.shop-desc { font-size: 13px; line-height: 1.65; color: var(--text-secondary); }
.shop-link {
  margin-top: auto; padding-top: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--text-tertiary);
}
.shop-link svg { width: 13px; height: 13px; transition: transform 0.25s ease; }
.shop-card:hover .shop-link { color: var(--primary-dark); }
.shop-card:hover .shop-link svg { transform: translateX(3px); }
html.dark .shop-card:hover .shop-link { color: #93c5fd; }

/* ===== 文章区（YOMI 文章） ===== */
.article-inner {
  width: 100%; max-width: 1080px;
  display: flex; flex-direction: column; align-items: center;
}
.article-head { text-align: center; }
.article-head .article-title { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -1px; }
.article-sub { margin: 14px auto 0; font-size: 16px; color: var(--text-secondary); }
.article-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px; font-size: 15px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  transition: color 0.2s ease; cursor: pointer;
}
.article-more svg { width: 16px; height: 16px; }
.article-more:hover { color: var(--primary); }

.article-grid {
  margin-top: 44px; width: 100%;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.article-card {
  display: flex; flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.28s ease;
  cursor: pointer;
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px -18px rgba(99,102,241,0.28);
  border-color: rgba(99,102,241,0.38);
}
.article-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.article-card:nth-child(1) .article-cover { background: linear-gradient(135deg, rgba(59,130,246,0.16), rgba(96,165,250,0.05)); }
.article-card:nth-child(2) .article-cover { background: linear-gradient(135deg, rgba(99,102,241,0.16), rgba(129,140,248,0.05)); }
.article-card:nth-child(3) .article-cover { background: linear-gradient(135deg, rgba(168,85,247,0.16), rgba(192,132,252,0.05)); }
.article-cover-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: rgba(255,255,255,0.85);
  color: #2563eb;
  box-shadow: 0 10px 24px -10px rgba(59,130,246,0.4);
  transition: transform 0.28s ease;
}
html.dark .article-cover-icon { background: rgba(59,130,246,0.25); color: #93c5fd; }
.article-cover-icon svg { width: 26px; height: 26px; }
.article-card:hover .article-cover-icon { transform: scale(1.06); }
.article-tag {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 10px -4px rgba(59,130,246,0.6);
}
.article-body {
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 7px; flex: 1;
}
.article-title { font-size: 16px; font-weight: 700; line-height: 1.5; }
.article-desc { font-size: 13px; line-height: 1.65; color: var(--text-secondary); }
.article-meta {
  margin-top: auto; padding-top: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.article-date { font-size: 12px; color: var(--text-tertiary); }
.article-read {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--primary-dark);
}
.article-read svg { width: 13px; height: 13px; transition: transform 0.25s ease; }
.article-card:hover .article-read svg { transform: translateX(3px); }
html.dark .article-read { color: #93c5fd; }

@media (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-title, .article-head .article-title { font-size: 34px; }
  .shop-sub, .article-sub { font-size: 15px; }
  .shop-grid, .article-grid { margin-top: 32px; }
}
@media (max-width: 560px) {
  .shop-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .shop-title, .article-head .article-title { font-size: 28px; }
  .shop-grid, .article-grid { margin-top: 24px; }
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text); font-size: 14px; cursor: pointer;
  transition: all 0.2s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--card-bg); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-lg { padding: 12px 30px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ===== 创作台（即梦风格紧凑双栏） ===== */
.view-studio { display: flex; flex: 1; min-height: 0; overflow: auto; padding: 12px; gap: 12px; }
.left-panel {
  flex: 11; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
  overflow: auto;
}
.section {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; display: flex; flex-direction: column;
}
#promptSection { flex: 1 1 auto; min-height: 150px; }
#paramsSection { flex: 0 0 auto; }
#referenceSection { flex: 0 0 auto; }
.section-title {
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 10px;
}
.section-title svg { width: 14px; height: 14px; color: var(--text-secondary); }
.section-title .prompt-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* 魔法棒优化按钮 */
.magic-wand {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border: none; border-radius: 100px; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff; font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 12px -4px rgba(99,102,241,0.5);
  transition: transform 0.15s, box-shadow 0.15s;
}
.magic-wand:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -4px rgba(99,102,241,0.6); }
.magic-wand:active { transform: scale(0.97); }
.magic-wand svg { width: 14px; height: 14px; }

/* 参考图 */
.image-zone {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 8px;
  min-width: 0; min-height: 0;
}
.image-zone.drag-over { border-color: var(--primary); background: rgba(59,130,246,0.05); }
.image-list {
  display: flex; gap: 8px; flex-wrap: wrap; overflow-y: auto; max-height: 175px; min-height: 0; flex: 1;
}
.add-image-btn {
  width: 80px; height: 80px; border: 2px dashed var(--border); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: var(--text-secondary); gap: 4px; flex-shrink: 0;
}
.add-image-btn:hover { border-color: var(--primary); color: var(--primary); }
.add-image-btn svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }
.add-image-btn span { font-size: 10px; }
.image-thumb {
  position: relative; width: 64px; height: 64px; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border); cursor: pointer; flex-shrink: 0;
  background: #eee;
}
.image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-thumb .thumb-remove {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.6); border: none; color: #fff; font-size: 11px; line-height: 18px;
  text-align: center; cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.image-thumb:hover .thumb-remove { opacity: 1; }
.image-thumb .thumb-badge {
  position: absolute; bottom: 2px; left: 2px; font-size: 10px; color: #fff;
  background: rgba(59,130,246,0.85); padding: 0 4px; border-radius: 4px;
}
.image-thumb.dragging { opacity: 0.5; }
.image-thumb.drag-over { outline: 2px solid var(--primary); }

/* 提示词区 */
.prompt-area { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 60px; }
.form-textarea, .form-input {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); padding: 10px 12px; font-size: 13px;
  font-family: inherit; outline: none; transition: border-color 0.2s;
}
.form-textarea:focus, .form-input:focus { border-color: var(--primary); }
.form-textarea { resize: none; flex: 1; min-height: 60px; line-height: 1.6; }
.form-input { height: 38px; }
.tool-row, .generate-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.tool-item { display: flex; align-items: center; gap: 6px; }
.tool-item label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.gen-select {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
  color: var(--text); padding: 6px 8px; font-size: 12px; outline: none; cursor: pointer;
}
.gen-select:focus { border-color: var(--primary); }
.params-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.generate-btn-wrap { flex-shrink: 0; }
.generate-btn-wrap .btn { padding: 8px 26px; font-size: 14px; }

/* @ 引用弹窗 */
.mention-popup {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); z-index: 60;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.2); overflow-y: auto; max-height: 180px;
}
.mention-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer;
  font-size: 12px; color: var(--text);
}
.mention-item:hover, .mention-item.selected { background: rgba(59,130,246,0.1); }
.mention-item img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; }
.hidden { display: none !important; }

/* 右侧预览区 */
.right-area { flex: 9; min-width: 340px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.preview-panel {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column;
  flex: 1; min-height: 0; overflow: hidden;
}
.right-panel-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600;
  color: var(--text-secondary); flex-shrink: 0;
}
.preview-main { flex: 1; overflow-y: auto; padding: 12px; min-height: 0; }
.preview-history {
  flex-shrink: 0; display: flex; gap: 8px; overflow-x: auto;
  padding: 8px 12px; border-top: 1px solid var(--border); min-height: 0;
}
.empty-output {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 0; color: var(--text-tertiary); font-size: 13px; gap: 8px; height: 100%;
}
.empty-output svg { width: 34px; height: 34px; }
.empty-sub { font-size: 11px; color: var(--text-tertiary); }

/* 主预览批次 */
.preview-batch { display: flex; flex-direction: column; gap: 10px; }
.preview-batch-head {
  display: flex; align-items: center; gap: 8px; font-size: 12px; flex-shrink: 0;
}
.preview-batch-model { font-weight: 600; color: var(--text); }
.preview-batch-count, .preview-batch-time { color: var(--text-tertiary); font-size: 11px; }
.preview-batch-body {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.preview-batch-body.single { grid-template-columns: minmax(0, 1fr); }
.preview-img {
  position: relative; overflow: hidden; border-radius: 8px; cursor: zoom-in;
  background: rgba(0,0,0,0.08); aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow 0.2s;
}
.preview-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.preview-img:hover { box-shadow: 0 0 0 2px var(--primary); }
.preview-img .img-index {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,0.7); color: #fff; font-size: 11px;
  padding: 2px 6px; border-radius: 4px;
}
.preview-dl {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
  border: none; border-radius: 6px; cursor: pointer; opacity: 0;
  background: rgba(0,0,0,0.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.15s;
}
.preview-dl svg { width: 14px; height: 14px; }
.preview-img:hover .preview-dl { opacity: 1; }
.preview-err {
  padding: 24px; text-align: center; color: var(--error);
  font-size: 13px; background: rgba(239,68,68,0.06); border-radius: 8px;
}

/* 底部历史条 */
.history-item {
  flex-shrink: 0; width: 96px; display: flex; flex-direction: column; gap: 4px;
  padding: 4px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.history-item:hover { background: rgba(59,130,246,0.06); }
.history-item.active { border-color: var(--primary); background: rgba(59,130,246,0.08); }
.history-thumb {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden;
  background: rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center;
}
.history-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.history-thumb-empty { color: var(--text-tertiary); font-size: 12px; }
.history-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.history-model {
  font-size: 10px; color: var(--text-secondary); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.history-sub { font-size: 10px; color: var(--text-tertiary); }

/* 底部操作区 */
.studio-footer {
  flex-shrink: 0; display: flex; align-items: center; gap: 12px;
  padding: 8px 4px;
}
.studio-footer .btn { margin-left: auto; }
.footer-credit { font-size: 12px; color: var(--text-tertiary); }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 6px; }

/* 参数行 */
.params-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.params-row .tool-item { flex-shrink: 0; }
.params-row #dynamicParamsContainer { display: contents; }
.batch-label {
  font-size: 11px; color: var(--text-tertiary); margin: 12px 0 6px;
  display: flex; gap: 8px; align-items: center;
}
.batch-label:first-child { margin-top: 0; }

/* 状态栏 */
.status-bar {
  display: flex; align-items: center; gap: 8px; padding: 6px 16px;
  border-top: 1px solid var(--border); background: var(--card-bg); font-size: 12px;
  color: var(--text-secondary); flex-shrink: 0; min-height: 32px;
}
.status-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.status-indicator.ok { background: var(--success); }
.status-indicator.err { background: var(--error); }
.status-indicator.loading { background: var(--primary); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.model-desc { margin-left: 12px; color: var(--text-tertiary); font-size: 11px; flex: 1; }
.gen-progress { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.gen-progress-bar { width: 90px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.gen-progress-bar::after {
  content: ''; display: block; height: 100%; width: 0; border-radius: 3px;
  background: var(--primary); transition: width 0.4s;
}
.gen-progress-text { font-size: 11px; }

/* ===== 加载遮罩 ===== */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex;
  align-items: center; justify-content: center; z-index: 1000;
}
.loading-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 28px 36px;
  text-align: center; min-width: 260px; box-shadow: 0 20px 50px -20px rgba(0,0,0,0.4);
}
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.loading-text { font-size: 12px; color: var(--text-secondary); }
.loading-progress { margin-top: 12px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.loading-progress-bar { height: 100%; width: 0; background: var(--primary); border-radius: 3px; transition: width 0.4s; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex;
  align-items: center; justify-content: center; z-index: 900; padding: 20px;
}
.modal {
  background: var(--card-bg); border-radius: var(--radius); width: 100%;
  max-width: 520px; max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 25px 60px -20px rgba(0,0,0,0.5);
}
.modal-header {
  display: flex; align-items: center; padding: 14px 20px;
  border-bottom: 1px solid var(--border); position: relative;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: none; background: transparent; color: var(--text-secondary);
  border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(0,0,0,0.08); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.auth-modal { max-width: 420px; }
.auth-brand { display: flex; align-items: center; gap: 8px; }
.alert-box {
  display: none; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12px;
  margin-bottom: 12px; background: rgba(239,68,68,0.08); color: var(--error); border: 1px solid rgba(239,68,68,0.2);
}
.alert-box.show { display: block; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.code-row { display: flex; gap: 8px; }
.code-row .form-input { flex: 1; }
.code-row .btn { flex-shrink: 0; font-size: 12px; }
.login-mode-switch { display: flex; margin-bottom: 14px; background: var(--bg); border-radius: var(--radius-sm); padding: 3px; }
.login-mode-switch button {
  flex: 1; padding: 7px 0; border: none; background: transparent; color: var(--text-secondary);
  font-size: 13px; border-radius: 6px; cursor: pointer;
}
.login-mode-switch button.active { background: var(--card-bg); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
.auth-footer { margin-top: 16px; text-align: center; font-size: 13px; color: var(--text-secondary); }
.auth-footer a { color: var(--primary); text-decoration: none; }

/* 预览弹窗 */
.preview-modal { position: relative; max-width: 90vw; max-height: 90vh; }
.preview-modal img { max-width: 90vw; max-height: 84vh; border-radius: var(--radius); display: block; }
.preview-modal .modal-close { position: absolute; top: 10px; right: 10px; z-index: 10; background: rgba(0,0,0,0.45); color: #fff; border-radius: 50%; }
.preview-modal .modal-close:hover { background: rgba(0,0,0,0.7); color: #fff; }
.preview-actions {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
}

/* toast */
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 1200;
  padding: 10px 22px; border-radius: 100px; font-size: 13px; color: #fff;
  background: #1e293b; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.info { background: var(--primary); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 历史记录瀑布流（对齐客户端 hw-card） */
.history-waterfall { padding: 0; }
.hw-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.hw-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.hw-card:hover {
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--primary-light);
}
.hw-visual { width: 100%; aspect-ratio: 1; background: var(--bg); overflow: hidden; position: relative; }
.hw-thumb-single { width: 100%; height: 100%; }
.hw-thumb-single img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-thumb-duo { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.hw-thumb-duo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-thumb-trio { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 100%; height: 100%; }
.hw-thumb-trio img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-thumb-trio img:first-child { grid-row: 1/3; grid-column: 1; }
.hw-thumb-quad { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 100%; height: 100%; position: relative; }
.hw-thumb-quad img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-thumb-more {
  position: absolute; right: 0; bottom: 0; width: 50%; height: 50%;
  background: rgba(15,23,42,0.85); color: #f8fafc;
  font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.hw-thumb-empty {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-size: 12px;
}
.hw-thumb img {
  opacity: 0; transition: opacity 0.3s ease;
  background: linear-gradient(90deg, var(--border) 25%, rgba(0,0,0,0.04) 50%, var(--border) 75%);
  background-size: 200% 100%; animation: hw-skeleton 1.5s ease-in-out infinite;
}
.hw-thumb img.loaded, .hw-thumb-single img.loaded, .hw-thumb-duo img.loaded,
.hw-thumb-trio img.loaded, .hw-thumb-quad img.loaded {
  animation: none; background: none; opacity: 1;
}
@keyframes hw-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.hw-body { padding: 12px; }
.hw-model { font-size: 11px; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.hw-prompt {
  font-size: 13px; color: var(--text); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px;
}
.hw-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); }
.hw-count {
  background: var(--bg); padding: 2px 8px; border-radius: 10px; font-weight: 500;
}
.history-empty { text-align: center; color: var(--text-tertiary); padding: 40px 0; font-size: 13px; }

/* 输出详情弹窗 */
.od-image-panel {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center;
  position: relative; gap: 10px;
}
.od-image-wrap {
  position: relative; max-height: 60vh; overflow: hidden; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.od-image-wrap img { max-width: 100%; max-height: 60vh; border-radius: var(--radius-sm); display: block; }
.od-counter {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.6); color: #fff; font-size: 11px;
  padding: 2px 10px; border-radius: 100px;
}
.od-thumb-strip {
  display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 4px 0;
}
.od-thumb-strip img {
  width: 48px; height: 48px; border-radius: 6px; object-fit: cover; cursor: pointer;
  border: 2px solid transparent; transition: border-color 0.2s;
}
.od-thumb-strip img.active { border-color: var(--primary); }
.od-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.4); color: #fff; font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 2;
}
.od-nav:hover { background: rgba(0,0,0,0.7); }
.od-nav-prev { left: 8px; }
.od-nav-next { right: 8px; }
.od-params-panel {
  width: 260px; flex-shrink: 0; overflow-y: auto; font-size: 13px;
}
.od-section { margin-bottom: 14px; }
.od-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.od-value { color: var(--text); line-height: 1.6; }
.od-param { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--border); }
.od-param-label { color: var(--text-secondary); font-size: 12px; }
.od-param-value { color: var(--text); font-size: 12px; font-weight: 500; }

/* 用户下拉 */
.user-menu-wrapper { position: relative; }
.user-menu-trigger {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border: none; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--text-secondary);
  transition: all 0.2s;
}
.user-menu-trigger:hover { background: rgba(59,130,246,0.1); color: var(--text); }
.user-menu-trigger svg { width: 18px; height: 18px; flex-shrink: 0; }
.user-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.25); display: flex; flex-direction: column;
  padding: 6px; z-index: 100;
}
.user-menu-dropdown a {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px;
  font-size: 13px; color: var(--text); text-decoration: none;
}
.user-menu-dropdown a:hover { background: rgba(59,130,246,0.1); }
.user-menu-dropdown a.logout-link { color: var(--error); }

/* ===== 动态参数 ===== */
#dynamicParamsContainer { display: contents; }
.gen-param { display: flex; align-items: center; gap: 6px; }
.gen-param-label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.dyn-param-select { min-width: 96px; }
.gen-hints { display: flex; align-items: center; width: 100%; }
.gen-hints span { font-size: 11px; color: var(--text-tertiary); }
.section-hint { font-size: 11px; color: var(--text-tertiary); font-weight: 400; }

/* ===== 参考图缩略 ===== */
.ref-thumb {
  position: relative; width: 80px; height: 80px; border-radius: var(--radius-sm);
  overflow: hidden; border: 2px solid var(--border); cursor: pointer; flex-shrink: 0;
  transition: border-color 0.2s;
}
.ref-thumb:hover { border-color: var(--primary); }
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-thumb .ref-remove {
  position: absolute; top: -1px; right: -1px; width: 22px; height: 22px;
  background: transparent; border: none; border-radius: 0 0 0 6px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s; cursor: pointer; padding: 0;
}
.ref-thumb:hover .ref-remove { opacity: 1; }
.ref-remove svg { width: 14px; height: 14px; }
.img-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 10px; color: #fff; text-align: center;
  background: rgba(0,0,0,0.5); padding: 2px 0;
}

/* ===== 多轮分析状态轮盘 ===== */
.analysis-steps {
  display: flex; align-items: center; gap: 16px; margin-top: 8px; padding: 8px 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.analysis-wheel { position: relative; width: 46px; height: 46px; flex-shrink: 0; }
.wheel-inner {
  width: 46px; height: 46px; border-radius: 50%;
  background: conic-gradient(var(--primary) 0deg, var(--border) 0deg);
  display: flex; align-items: center; justify-content: center;
}
.wheel-pct {
  position: absolute; inset: 8px; background: var(--card-bg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-secondary);
}
.analysis-step-list { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-tertiary); }
.step-dot {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; font-size: 10px;
  color: var(--text-secondary); background: var(--card-bg); flex-shrink: 0;
}
.step.active { color: var(--text); font-weight: 600; }
.step.active .step-dot { border-color: var(--primary); color: var(--primary); }
.step.done { color: var(--text-secondary); }
.step.done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }

/* 生成中动画 */
.batch-generating {
  position: relative; overflow: hidden;
  background: rgba(124,106,247,0.06); border: 1px solid rgba(124,106,247,0.2);
  border-radius: 6px; min-height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.batch-generating .orb {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.5;
  animation: orb-drift 4s ease-in-out infinite alternate;
}
.batch-generating .orb-1 { width: 120px; height: 120px; background: rgba(124,106,247,0.6); top: 20%; left: 10%; }
.batch-generating .orb-2 { width: 100px; height: 100px; background: rgba(74,158,255,0.5); bottom: 15%; right: 15%; }
.batch-generating .orb-3 { width: 80px; height: 80px; background: rgba(168,85,247,0.5); top: 40%; left: 50%; }
@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -20px) scale(1.15); }
  66%  { transform: translate(-20px, 15px) scale(0.9); }
  100% { transform: translate(15px, -10px) scale(1.05); }
}
.batch-generating-label {
  position: relative; z-index: 1; font-size: 12px; color: var(--text-secondary);
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
::-webkit-scrollbar-track { background: transparent; }

/* 响应式 */
@media (max-width: 900px) {
  .view-studio { flex-direction: column; overflow-y: auto; }
  .left-panel { flex: none; width: 100%; }
  .right-area { flex: none; width: 100%; min-width: 0; min-height: 400px; }
}
/* 键盘焦点与系统减少动画偏好 */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--primary, #3b82f6);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
