/* =========================================================
   Work Report · 统一主题样式
   - 深色玻璃拟态 + 暖色高光
   - 时间轴卡片 / 后台表单
   ========================================================= */

:root {
  --bg-0: #141b35;
  --bg-1: #1c2547;
  --bg-2: #243056;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --surface-strong: rgba(255, 255, 255, 0.16);
  --border: rgba(255, 255, 255, 0.18);
  --border-strong: rgba(255, 255, 255, 0.28);

  --text: #ffffff;
  --text-soft: #d8deef;
  --text-mute: #a7afc8;

  --accent: #f5b942;        /* 暖金 */
  --accent-2: #ff7d6b;      /* 珊瑚 */
  --accent-3: #8b5cf6;      /* 紫 */
  --accent-4: #38d39f;      /* 绿 - 成果色 */
  --accent-grad: linear-gradient(135deg, #f5b942 0%, #ff7d6b 100%);
  --accent-grad-2: linear-gradient(135deg, #8b5cf6 0%, #38bdf8 100%);

  --danger: #f87171;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-1: 0 6px 30px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 12px 50px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 8px 32px rgba(245, 185, 66, 0.18);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(139, 92, 246, 0.28), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(245, 185, 66, 0.20), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(56, 211, 159, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(20, 27, 53, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 16px;
  min-width: 0;
}
.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent-grad);
  color: #1b1303;
  font-size: 14px;
  box-shadow: var(--shadow-glow);
  flex: 0 0 auto;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .25s ease;
  line-height: 1.2;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.nav-link.active {
  background: rgba(245, 185, 66, 0.2);
  color: #ffd98a;
  border: 1px solid rgba(245, 185, 66, 0.4);
}

/* ---------------- Hero ---------------- */
.hero { padding: 60px 28px 30px; }
.hero-inner { max-width: 1280px; margin: 0 auto; }
.hero-greet {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(245, 185, 66, 0.18);
  border: 1px solid rgba(245, 185, 66, 0.4);
  font-size: 13px;
  font-weight: 600;
  color: #ffd98a;
  margin-bottom: 20px;
}
.hero-title {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 30px rgba(245, 185, 66, 0.25);
}
.hero-sub {
  margin: 0 0 32px;
  color: var(--text-soft);
  font-size: 17px;
  font-weight: 500;
}

/* 工作目标 + 进度 */
.goals {
  margin: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.timeline-goals {
  margin: 34px 0 0 38px;
}
.goals[hidden] { display: none; }
.goal-item {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 12px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
}
.goal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 10px;
}
.goal-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  flex: 1; min-width: 0;
  line-height: 1.45;
  word-break: break-word;
  /* 最多 2 行, 超出再省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.goal-percent {
  flex-shrink: 0;
  font-size: 16px; font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
  white-space: nowrap;
}
.goal-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 1.2s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 12px rgba(245, 185, 66, 0.4);
}
.goal-item[data-state="done"] .goal-bar-fill { background: linear-gradient(90deg, #38d39f, #34d399); box-shadow: 0 0 12px rgba(56, 211, 159, 0.5); }
.goal-item[data-state="done"] .goal-percent { color: #38d39f; }
.goal-item[data-state="low"] .goal-bar-fill { background: linear-gradient(90deg, #f87171, #fb923c); box-shadow: 0 0 12px rgba(248, 113, 113, 0.4); }
.goal-item[data-state="low"] .goal-percent { color: #fb923c; }

/* 浅色主题 */
html[data-theme="light"] .goal-item { background: #ffffff; border-color: rgba(15, 23, 42, 0.08); box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04); }
html[data-theme="light"] .goal-title { color: #0f172a; }
html[data-theme="light"] .goal-bar { background: rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .goal-percent { color: #ea580c; }
html[data-theme="light"] .goal-bar-fill { background: linear-gradient(90deg, #ea580c, #f43f5e); box-shadow: 0 0 8px rgba(234, 88, 12, 0.3); }
html[data-theme="light"] .goal-item[data-state="done"] .goal-bar-fill { background: linear-gradient(90deg, #16a34a, #22c55e); box-shadow: 0 0 8px rgba(22, 163, 74, 0.4); }
html[data-theme="light"] .goal-item[data-state="done"] .goal-percent { color: #16a34a; }

/* 全彩主题 */
html[data-theme="vibrant"] .goal-item { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); }
html[data-theme="vibrant"] .goal-bar-fill { background: linear-gradient(90deg, #ffd700, #ff66c4, #4dcfff); box-shadow: 0 0 16px rgba(255, 102, 196, 0.6); }
html[data-theme="vibrant"] .goal-percent { color: #ffd700; }
html[data-theme="vibrant"] .goal-item[data-state="done"] .goal-bar-fill { background: linear-gradient(90deg, #66ffcc, #4dcfff); }
html[data-theme="vibrant"] .goal-item[data-state="done"] .goal-percent { color: #66ffcc; }

/* 后台目标编辑器 */
.goals-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.goal-row {
  display: grid;
  grid-template-columns: 1fr 120px auto;
  gap: 8px;
  align-items: center;
}
.goal-row input[type="text"],
.goal-row .percent-wrap {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.percent-wrap {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 12px;
}
.percent-wrap input {
  flex: 1; width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  text-align: right;
}
.percent-wrap .pct-sign { color: var(--text-mute); }
.goal-row .remove-goal {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 36px;
  cursor: pointer;
}
.goal-row .remove-goal:hover { background: rgba(248, 113, 113, 0.22); }
html[data-theme="light"] .goal-row input[type="text"],
html[data-theme="light"] .goal-row .percent-wrap { background: #fff; border-color: rgba(15, 23, 42, 0.15); color: #0f172a; }
html[data-theme="light"] .percent-wrap .pct-sign { color: #94a3b8; }
html[data-theme="vibrant"] .goal-row input[type="text"],
html[data-theme="vibrant"] .goal-row .percent-wrap { background: rgba(0, 0, 0, 0.30); border-color: rgba(255, 255, 255, 0.28); color: #fff; }

/* 统计卡片 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.stat-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  backdrop-filter: blur(8px);
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.35);
}
.stat-label {
  font-size: 12px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-bottom: 10px;
}
.stat-value {
  font-size: 34px;
  font-weight: 800;
  color: #ffd98a;
  line-height: 1;
  text-shadow: 0 2px 16px rgba(245, 185, 66, 0.4);
}
.stat-small { font-size: 17px; color: var(--text); font-weight: 700; text-shadow: none; }

/* ---------------- 工具栏 ---------------- */
.toolbar { padding: 20px 28px 0; }
.toolbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-mute);
}
.search-box input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: all .25s ease;
}
.search-box input::placeholder { color: var(--text-mute); }
.search-box input:focus {
  background: var(--surface-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.15);
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-chip {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: all .2s;
}
.tag-chip:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.tag-chip.active {
  background: var(--accent);
  color: #1b1303;
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(245, 185, 66, 0.4);
}

/* ---------------- 时间轴 ---------------- */
.timeline-wrap {
  padding: 40px 28px 80px;
  max-width: 1280px;
  margin: 0 auto;
}
.timeline {
  position: relative;
  padding-left: 38px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(245, 185, 66, 0.6) 0%,
    rgba(139, 92, 246, 0.4) 50%,
    rgba(56, 211, 159, 0.2) 100%);
  border-radius: 2px;
}

.tl-item {
  position: relative;
  margin-bottom: 28px;
  animation: tlIn 0.5s ease both;
}
@keyframes tlIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.tl-dot {
  position: absolute;
  left: -32px;
  top: 22px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 185, 66, 0.15), 0 0 16px rgba(245, 185, 66, 0.6);
  z-index: 1;
}

.tl-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.tl-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow-2);
}

.tl-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tl-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(245, 185, 66, 0.22);
  color: #ffd98a;
  border: 1px solid rgba(245, 185, 66, 0.35);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.tl-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
.tl-time::before { content: '🕐'; font-size: 11px; }
html[data-theme="light"] .tl-time { background: #f1f5f9; border-color: rgba(15,23,42,0.10); color: #475569; }
html[data-theme="vibrant"] .tl-time { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.30); color: #fff; }
.tl-weekday {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}
.tl-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-tag {
  padding: 4px 10px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 6px;
  font-size: 11.5px;
  color: #d9c9ff;
  font-weight: 600;
}

.tl-title {
  margin: 6px 0 14px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
}

.tl-content {
  color: #e0e6f5;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

.tl-achievements {
  margin: 14px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(56, 211, 159, 0.1), rgba(56, 211, 159, 0.02));
  border: 1px solid rgba(56, 211, 159, 0.25);
  border-left: 3px solid var(--accent-4);
  border-radius: var(--radius-sm);
}
.tl-achievements-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-4);
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tl-achievements-text {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}

/* 媒体网格 */
.tl-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.tl-media-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-2);
  cursor: zoom-in;
  border: 1px solid var(--border);
  transition: transform .25s ease;
}
.tl-media-item:hover { transform: scale(1.02); }
.tl-media-item img,
.tl-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tl-media-item.is-video::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.92);
  font-size: 28px;
  background: rgba(0,0,0,0.25);
  pointer-events: none;
}
.tl-file-item {
  min-height: 96px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  padding: 14px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.tl-file-item:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 185, 66, 0.45);
  background: rgba(245, 185, 66, 0.10);
}
.tl-file-ext {
  grid-row: 1 / span 2;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-grad);
  color: #1b1303;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2px;
}
.tl-file-name {
  min-width: 0;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-file-open {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

/* 链接列表 */
.tl-links {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 13.5px;
  transition: all .2s;
  word-break: break-all;
}
.tl-link:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}
.tl-link::before { content: '🔗'; flex-shrink: 0; }

/* Empty state */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-mute);
}
.empty-art { font-size: 56px; margin-bottom: 12px; opacity: 0.6; }
.empty-text { font-size: 16px; margin-bottom: 16px; }
.empty-cta {
  display: inline-block;
  padding: 10px 22px;
  background: var(--accent-grad);
  color: #1b1303;
  border-radius: 999px;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.empty-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--text-mute);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

/* ========================================================
   工作台 Workbench
   ======================================================== */
.workbench-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 28px 80px;
}
.workbench-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.workbench-title {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 900;
  color: var(--text);
  text-shadow: 0 2px 30px rgba(245, 185, 66, 0.20);
}
.workbench-sub {
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.7;
}
.workbench-primary {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #1b1303;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-glow);
}
.workbench-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.workbench-tab {
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.07);
  color: var(--text-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.workbench-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(245,185,66,0.38);
  color: var(--text);
}
.workbench-tab.active {
  background: rgba(245,185,66,0.16);
  border-color: rgba(245,185,66,0.55);
  color: var(--accent);
}
.workbench-panel {
  display: none;
}
.workbench-panel.active {
  display: block;
}
.shared-context {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr) minmax(280px, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.shared-card,
.task-flow-panel,
.preview-panel {
  min-width: 0;
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 20px rgba(0,0,0,0.16);
}
.shared-card .field {
  margin: 0;
}
.shared-card .reference-upload {
  min-height: 118px;
}
.shared-card .asset-grid {
  max-height: 260px;
  overflow: auto;
  padding-right: 3px;
}
.shared-card .style-cloner {
  grid-template-columns: 1fr;
}
.shared-card .style-cloner-actions {
  justify-content: flex-start;
}
.generation-console {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  margin: 18px 0;
}
.job-flow {
  min-height: 360px;
}
.design-assistant {
  margin-bottom: 18px;
}
.manual-designer {
  margin-bottom: 18px;
}
.style-unifier-section .manual-card {
  border-color: rgba(56,211,159,0.28);
}
.manual-card {
  border-radius: 14px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 20px rgba(0,0,0,0.16);
}
.manual-top-controls {
  grid-template-columns: minmax(220px, 1.45fr) repeat(4, minmax(118px, 0.7fr));
}
.manual-upload-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
}
.manual-upload {
  min-height: 132px;
}
.manual-text-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
}
.manual-text-field textarea {
  width: 100%;
  min-height: 132px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  line-height: 1.55;
  resize: vertical;
  outline: none;
}
.manual-note {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}
.workflow-advice {
  margin-top: 12px;
  border: 1px solid rgba(245,185,66,0.38);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: rgba(245,185,66,0.08);
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}
.workflow-advice[hidden] {
  display: none;
}
.workflow-advice strong {
  color: var(--accent);
}
.workflow-advice button {
  margin-top: 8px;
  border: 1px solid rgba(245,185,66,0.42);
  border-radius: 999px;
  background: rgba(0,0,0,0.16);
  color: var(--accent);
  padding: 7px 12px;
  font-weight: 800;
  cursor: pointer;
}
.guide-materials {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(0,0,0,0.14);
}
.guide-material-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.guide-material-head div {
  display: grid;
  gap: 4px;
}
.guide-material-head strong {
  color: var(--text);
  font-size: 15px;
}
.guide-material-head span {
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.45;
}
.guide-upload {
  min-height: 104px;
}
.guide-material-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.guide-material-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.05);
}
.guide-material-preview {
  position: relative;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
}
.guide-material-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide-material-preview span {
  position: absolute;
  left: 5px;
  top: 5px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.68);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.guide-material-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.magazine-region-chip {
  justify-self: start;
  border: 1px solid rgba(67, 218, 170, 0.36);
  border-radius: 999px;
  background: rgba(67, 218, 170, 0.1);
  color: #7ce8c2;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}
.guide-material-body strong {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guide-material-body textarea {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,0.24);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}
.guide-material-remove {
  border: 1px solid rgba(255,120,120,0.38);
  border-radius: 999px;
  background: rgba(255,120,120,0.08);
  color: #ff8585;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
}
.merch-custom-kind {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.merch-custom-kind > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.merch-custom-kind-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.merch-custom-kind-row input {
  width: 100%;
  min-width: 0;
}
.merch-custom-kind-row .btn {
  white-space: nowrap;
  padding-left: 14px;
  padding-right: 14px;
}
.editor-protect-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.editor-protect-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.guide-material-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}
.btn-mini {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}
.style-cloner {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 12px;
  align-items: stretch;
}
.style-cloner-upload {
  min-height: 112px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.style-cloner-upload.dragover {
  border-color: rgba(245,185,66,0.55);
  background: rgba(245,185,66,0.08);
}
.style-cloner-side {
  display: grid;
  gap: 10px;
}
.style-cloner-side textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.55;
  resize: vertical;
  outline: none;
}
.style-cloner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.style-cloner-result {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(0,0,0,0.18);
}
.style-cloner-result[hidden] {
  display: none;
}
.style-cloner-result img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(0,0,0,0.25);
}
.style-cloner-result strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}
.style-cloner-result p {
  margin: 0 0 8px;
  color: var(--text-soft);
  line-height: 1.55;
}
.style-cloner-result code {
  display: block;
  max-height: 96px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-soft);
  font-size: 11px;
}
.assistant-panel,
.assistant-preview {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 20px rgba(0,0,0,0.16);
}
.assistant-panel {
  padding: 22px;
}
.assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.assistant-title {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.2;
}
.assistant-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}
.assistant-status[data-tone="busy"] { color: var(--accent); border-color: rgba(245,185,66,0.35); }
.assistant-status[data-tone="ok"] { color: var(--accent-4); border-color: rgba(56,211,159,0.35); }
.assistant-status[data-tone="error"] { color: var(--danger); border-color: rgba(248,113,113,0.35); }
.assistant-form .field {
  margin-bottom: 14px;
}
.mention-field {
  position: relative;
}
.mention-menu {
  position: absolute;
  z-index: 120;
  left: 10px;
  right: 10px;
  top: calc(100% - 6px);
  max-height: 300px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(31, 21, 52, 0.98);
  box-shadow: 0 18px 48px rgba(0,0,0,0.35);
}
.mention-menu[hidden] {
  display: none;
}
.mention-item {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px;
  text-align: left;
  cursor: pointer;
}
.mention-title {
  padding: 4px 6px 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.mention-item:hover,
.mention-item:focus {
  background: rgba(245,185,66,0.14);
  outline: none;
}
.mention-item img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-2);
}
.mention-item span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mention-item strong,
.mention-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mention-item strong {
  font-size: 13px;
}
.mention-item small,
.mention-empty {
  color: var(--text-soft);
  font-size: 12px;
}
.mention-empty {
  padding: 12px;
}
.reference-upload {
  min-height: 86px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: rgba(0,0,0,0.16);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: border-color .2s ease, background .2s ease;
}
.reference-upload.dragover {
  border-color: var(--accent);
  background: rgba(245,185,66,0.08);
}
.reference-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.reference-copy strong {
  color: var(--text);
  font-size: 14px;
}
.reference-copy span {
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.45;
}
.reference-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.reference-list:empty { display: none; }
.reference-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.reference-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.reference-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.68);
  color: #fff;
  cursor: pointer;
}
.reference-thumb span {
  position: absolute;
  left: 5px;
  top: 5px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.68);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.unifier-list {
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
}
.asset-library {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.asset-upload-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 8px;
}
.asset-upload-row select,
.asset-upload-row input {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  outline: none;
}
.asset-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.asset-filter button {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text-soft);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.asset-filter button.active {
  color: #1b1303;
  background: var(--accent);
  border-color: var(--accent);
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 2px;
}
.asset-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  border: 2px solid transparent;
  cursor: pointer;
}
.asset-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(245,185,66,0.22);
}
.asset-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.asset-meta {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 6px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}
.asset-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-meta button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  cursor: pointer;
}
.asset-empty {
  grid-column: 1 / -1;
  color: var(--text-mute);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  font-size: 13px;
}
.asset-empty.error { color: var(--danger); }
.file-library-section {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 20px rgba(0,0,0,0.16);
  padding: 22px;
  margin-bottom: 18px;
}
.file-library-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}
.file-library-note {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}
.file-library {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.file-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.file-filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  min-width: 0;
}
.file-filter button,
.file-page-size select,
.file-pager button {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text-soft);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.file-page-size {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}
.file-page-size select {
  min-height: 30px;
  padding: 5px 24px 5px 10px;
  color: var(--text);
}
.file-filter button.active {
  color: #1b1303;
  background: var(--accent);
  border-color: var(--accent);
}
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  align-items: start;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
}
.file-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.file-open {
  display: block;
  width: 100%;
  height: 190px;
  background: rgba(0,0,0,0.18);
}
.file-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.file-set-card {
  min-height: 260px;
}
.file-set-stack {
  position: relative;
  height: 190px;
  background: rgba(0,0,0,0.18);
  overflow: hidden;
}
.file-set-stack img {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(7,10,20,0.86);
  transform: translateY(calc(var(--i) * 7px)) scale(calc(1 - var(--i) * 0.035));
  transform-origin: top center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
}
.file-set-stack span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 5;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: rgba(0,0,0,0.68);
  color: #fff;
}
.file-meta span {
  font-size: 10px;
  opacity: 0.78;
}
.file-meta strong {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-edit-btn {
  position: absolute;
  right: 6px;
  top: 6px;
  border: 1px solid rgba(255,255,255,0.34);
  border-radius: 999px;
  background: rgba(0,0,0,0.68);
  color: #fff;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.file-edit-btn:hover {
  background: rgba(245,185,66,0.92);
  color: #1b1303;
}
.file-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}
.file-pager:empty {
  display: none;
}
.file-pager-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.file-pager button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.assistant-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.assistant-controls.manual-top-controls {
  grid-template-columns: minmax(220px, 1.45fr) repeat(4, minmax(118px, 0.7fr));
}
.assistant-controls.manual-secondary-controls {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.85fr) minmax(0, 1.35fr);
}
.assistant-controls.merch-top-controls {
  grid-template-columns: minmax(220px, 1fr) minmax(210px, 0.9fr) minmax(360px, 1.45fr) minmax(180px, 0.82fr) minmax(150px, 0.7fr);
}
.assistant-controls.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.assistant-controls label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
}
.assistant-controls select,
.assistant-controls input,
.assistant-controls textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  outline: none;
}
.assistant-controls textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.55;
}
.print-size-custom-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
}
.print-size-custom-field[hidden] {
  display: none;
}
.print-size-custom-field input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(245,185,66,0.32);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  outline: none;
}
.print-size-custom-field input:focus {
  border-color: rgba(245,185,66,0.7);
  box-shadow: 0 0 0 3px rgba(245,185,66,0.12);
}
.assistant-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.assistant-preview {
  min-height: 520px;
  padding: 12px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
}
.assistant-empty {
  color: var(--text-mute);
  text-align: center;
  padding: 24px;
  line-height: 1.7;
}
.assistant-empty.error {
  color: var(--danger);
}
.assistant-image {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(0,0,0,0.20);
}
.assistant-result-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 700;
}
.assistant-result-meta a {
  color: var(--accent);
}
.preview-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.preview-actions button {
  border: 1px solid rgba(255, 200, 81, 0.45);
  border-radius: 999px;
  background: rgba(255, 200, 81, 0.10);
  color: var(--accent);
  font: inherit;
  padding: 4px 10px;
  cursor: pointer;
}
.preview-actions button:hover {
  background: rgba(255, 200, 81, 0.18);
}

/* ---------------- Online Editor ---------------- */
.editor-card {
  overflow: visible;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}
.editor-stage-wrap {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(0,0,0,0.22);
  padding: 14px;
  overflow: auto;
}
.editor-stage {
  min-height: 620px;
  display: grid;
  place-items: center;
}
.editor-canvas-shell {
  position: relative;
  display: block;
  max-width: 100%;
  line-height: 1;
  user-select: none;
  overflow: visible;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
}
.editor-base-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.editor-canvas-shell.transparent-preview {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, rgba(0,0,0,0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.08) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}
.editor-text-layer,
.editor-image-layer {
  position: absolute;
  z-index: 2;
  min-width: 24px;
  min-height: 18px;
  border: 0;
  outline: 1px dashed transparent;
  border-radius: 5px;
  cursor: move;
  user-select: none;
  transform-origin: 0 0;
}
.editor-text-layer {
  padding: 0;
  line-height: 1.22;
  white-space: pre;
  text-shadow: 0 1px 0 rgba(255,255,255,0.18);
}
.editor-text-layer.vertical {
  padding: 0;
  line-height: 1.08;
  white-space: pre;
  writing-mode: vertical-rl;
  text-orientation: upright;
}
.editor-image-layer {
  padding: 0;
  line-height: 0;
}
.editor-image-layer img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: contain;
}
.editor-text-layer.selected,
.editor-image-layer.selected {
  outline-color: #f6c34f;
  background: rgba(246, 195, 79, 0.14);
  box-shadow: 0 0 0 2px rgba(246, 195, 79, 0.12);
}
.editor-text-layer.locked,
.editor-image-layer.locked {
  cursor: default;
}
.editor-text-layer.locked::after,
.editor-image-layer.locked::after {
  content: "锁";
  position: absolute;
  left: -10px;
  top: -10px;
  z-index: 7;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 999px;
  background: rgba(20, 25, 44, 0.86);
  color: #f6c34f;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 16px rgba(0,0,0,0.24);
}
.editor-layer-delete {
  position: absolute;
  right: -18px;
  top: -18px;
  z-index: 8;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.92);
  border-radius: 999px;
  background: #ef4f6b;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.28);
}
.editor-text-layer.selected .editor-layer-delete,
.editor-image-layer.selected .editor-layer-delete {
  display: flex;
}
.editor-layer-delete:hover {
  background: #ff6b81;
  transform: scale(1.06);
}
.editor-resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #20c8c7;
  box-shadow: 0 2px 7px rgba(0,0,0,0.28);
  display: none;
}
.editor-image-layer.selected .editor-resize-handle {
  display: block;
}
.editor-image-layer.locked .editor-resize-handle,
.editor-image-layer.locked .editor-layer-delete,
.editor-text-layer.locked .editor-layer-delete {
  display: none;
}
.editor-image-layer.mask-painting {
  cursor: crosshair;
}
.editor-image-layer.mask-painting img {
  pointer-events: none;
}
.editor-image-layer.mask-painting .editor-resize-handle {
  display: none !important;
}
.editor-mask-canvas {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  background: rgba(250, 188, 72, 0.04);
  box-shadow: inset 0 0 0 2px rgba(250, 188, 72, 0.55);
}
.editor-resize-handle[data-editor-resize="nw"] { left: -7px; top: -7px; cursor: nwse-resize; }
.editor-resize-handle[data-editor-resize="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
.editor-resize-handle[data-editor-resize="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; }
.editor-resize-handle[data-editor-resize="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.editor-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(0,0,0,0.16);
  padding: 14px;
}
.editor-side-section {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
}
.editor-side-section > strong {
  font-size: 13px;
  letter-spacing: 0.04em;
}
.editor-accordion {
  display: block;
}
.editor-accordion > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}
.editor-accordion > summary::-webkit-details-marker {
  display: none;
}
.editor-accordion > summary::after {
  content: "▾";
  color: var(--accent);
  transition: transform 0.18s ease;
}
.editor-accordion:not([open]) > summary::after {
  transform: rotate(-90deg);
}
.editor-accordion > summary span {
  font-size: 13px;
  letter-spacing: 0.04em;
}
.editor-accordion > summary small {
  margin-left: auto;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
}
.editor-section-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.editor-layer-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}
.editor-layer-empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.editor-layer-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.055);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.editor-layer-item.active {
  border-color: rgba(250, 188, 72, 0.9);
  background: rgba(250, 188, 72, 0.13);
  box-shadow: 0 0 0 1px rgba(250, 188, 72, 0.18);
}
.editor-layer-item.style-layer {
  border-color: rgba(32, 200, 199, 0.7);
  background: rgba(32, 200, 199, 0.08);
}
.editor-layer-item.style-layer.active {
  border-color: rgba(250, 188, 72, 0.95);
  box-shadow: 0 0 0 1px rgba(32, 200, 199, 0.22), 0 0 0 3px rgba(250, 188, 72, 0.12);
}
.editor-layer-item[disabled] {
  cursor: default;
  opacity: 0.55;
}
.editor-layer-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}
.editor-layer-item small,
.editor-layer-type {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
}
.editor-layer-lock {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}
.editor-layer-style-badge {
  color: #20c8c7;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.editor-layer-ai {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.editor-layer-ai textarea {
  min-height: 76px;
}
.editor-layer-ai-actions {
  grid-template-columns: 1fr 1fr;
}
.editor-layer-ai-status {
  margin: -2px 0 0;
  color: var(--text-soft);
}
.editor-mask-tools {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 12px;
  background: rgba(15,20,39,0.35);
}
.editor-mask-toolbar {
  grid-template-columns: 1fr 1fr;
}
.editor-mask-status {
  margin: 0;
  color: var(--text-soft);
}
.editor-mask-status.ok {
  color: #60e6b5;
}
.editor-mask-status.error {
  color: #ff8d8d;
}
.editor-mask-tools input[type="range"] {
  min-height: 28px;
  padding: 0;
}
.editor-side label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
}
.editor-side textarea,
.editor-side input,
.editor-side select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,0.26);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  outline: none;
}
.editor-side textarea[readonly] {
  color: var(--muted);
  background: rgba(0,0,0,0.18);
  user-select: text;
}
.editor-side input[type="color"] {
  padding: 4px;
}
.editor-check-row {
  align-content: end;
  grid-template-columns: auto 1fr;
  gap: 8px !important;
  min-height: 64px;
}
.editor-check-row input {
  width: 18px !important;
  min-height: 18px !important;
  margin-top: 4px;
}
.editor-field-grid,
.editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.editor-wide-btn {
  width: 100%;
  justify-content: center;
}
.editor-style-snapshot-status {
  margin: -2px 0 0;
  color: var(--text-soft);
}
.editor-style-snapshot .btn-primary {
  min-height: 40px;
  padding: 9px 10px;
}
.editor-print-hint {
  margin: -2px 0 0;
  color: var(--text-soft);
}
.job-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.job-toolbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}
.job-toolbar div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.job-toolbar button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.07);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.job-toolbar button[data-cancel-queued] {
  border-color: rgba(248,113,113,0.42);
  color: var(--danger);
}
.job-row {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  color: var(--text-soft);
  font-size: 12.5px;
}
.job-row-main {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}
.job-row span {
  color: var(--text);
  font-weight: 800;
}
.job-title-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.job-title-block strong {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.job-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.job-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.job-meta-grid span {
  max-width: min(100%, 220px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-meta-grid em {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 700;
}
.job-brief {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.4;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.job-row[data-status="processing"] { border-color: rgba(245,185,66,0.38); }
.job-row[data-status="completed"] { border-color: rgba(56,211,159,0.38); }
.job-row[data-status="failed"] { border-color: rgba(248,113,113,0.38); }
.job-row[data-status="canceled"] { border-color: rgba(148,163,184,0.38); opacity: 0.82; }
.job-group-row {
  cursor: pointer;
}
.job-group-row.selected {
  border-color: rgba(245,185,66,0.72);
  box-shadow: 0 0 0 1px rgba(245,185,66,0.16), 0 10px 26px rgba(0,0,0,0.18);
}
.job-group-thumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  overflow: hidden;
}
.job-group-thumbs img {
  width: 42px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.2);
}
.job-group-thumbs span {
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.08);
  color: var(--text-soft);
  font-size: 11px;
}
.job-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.job-retry-btn,
.job-cancel-btn {
  margin-top: 8px;
  border: 1px solid rgba(245,185,66,0.45);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(245,185,66,0.12);
  color: var(--accent);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.job-row-actions .job-retry-btn,
.job-row-actions .job-cancel-btn {
  margin-top: 0;
}
.job-cancel-btn {
  border-color: rgba(248,113,113,0.42);
  background: rgba(248,113,113,0.10);
  color: var(--danger);
}
.job-retry-btn:hover {
  background: rgba(245,185,66,0.2);
}
.job-cancel-btn:hover {
  background: rgba(248,113,113,0.18);
}
.job-details {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.job-details summary {
  display: inline-flex;
  max-width: 100%;
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}
.job-detail-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.set-preview {
  width: 100%;
  display: grid;
  gap: 10px;
}
.set-preview-main {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
}
.set-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.46);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.set-nav.prev { left: 10px; }
.set-nav.next { right: 10px; }
.set-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}
.set-strip button {
  position: relative;
  flex: 0 0 72px;
  height: 88px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  padding: 3px;
  cursor: pointer;
}
.set-strip button.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(245,185,66,0.24);
}
.set-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}
.set-strip span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.character-extract-panel {
  width: 100%;
  min-height: 112px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  background: rgba(10, 16, 32, 0.24);
  padding: 10px;
  display: grid;
  gap: 8px;
}
.character-extract-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
}
.character-extract-head strong {
  font-size: 13px;
  font-weight: 900;
}
.character-extract-head span {
  color: var(--text-mute);
  text-align: right;
}
.character-extract-empty,
.character-extract-error,
.character-extract-loading {
  min-height: 58px;
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 10px;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
}
.character-extract-panel.processing {
  border-color: rgba(245, 185, 66, 0.42);
  background: rgba(245, 185, 66, 0.08);
}
.character-extract-loading {
  gap: 9px;
}
.character-extract-loading i {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(245, 185, 66, 0.25);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.character-extract-panel.error {
  border-color: rgba(255, 122, 122, 0.45);
}
.character-extract-error {
  color: var(--danger);
  border-color: rgba(255, 122, 122, 0.28);
  background: rgba(255, 122, 122, 0.08);
}
.character-extract-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.character-extract-card {
  flex: 0 0 92px;
  display: grid;
  gap: 5px;
}
.character-extract-card > a {
  height: 82px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    linear-gradient(45deg, rgba(255,255,255,0.10) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.10) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.10) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.10) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.character-extract-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.character-extract-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  line-height: 1.2;
}
.character-extract-card span {
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.character-extract-card div a {
  color: var(--accent);
  font-weight: 800;
  flex: 0 0 auto;
}
.job-detail-body pre {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
  color: #ff9a9a;
}
.job-detail-section {
  display: grid;
  gap: 5px;
}
.job-detail-section strong {
  color: var(--text);
}
.job-detail-section code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-soft);
  font-size: 11.5px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tool-card {
  min-height: 210px;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 20px rgba(0,0,0,0.16);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 185, 66, 0.45);
  box-shadow: var(--shadow-2);
}
.tool-card-main {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(245,185,66,0.16), rgba(56,211,159,0.09)),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
}
.tool-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tool-title {
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 900;
}
.tool-desc {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}
.tool-url {
  margin-top: auto;
  color: var(--text-mute);
  font-size: 12.5px;
  font-weight: 700;
}

/* ---------------- Lightbox ---------------- */
.lightbox[hidden] { display: none !important; }   /* ★ 默认隐藏, 修复一直挂在前面的 bug */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 30px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lb-close, .lb-nav {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 999px;
  width: 44px; height: 44px;
  font-size: 24px;
  cursor: pointer;
  transition: background .2s;
  z-index: 1;
}
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,0.18); }
.lb-stage {
  max-width: 92vw;
  max-height: 88vh;
  display: grid;
  place-items: center;
}
.lb-stage img,
.lb-stage video {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

/* ---------------- Region Editor ---------------- */
.region-editor[hidden] { display: none !important; }
.region-editor {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 8, 18, 0.84);
  backdrop-filter: blur(16px);
}
.region-editor-panel {
  width: min(1380px, 96vw);
  max-height: 94vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(41, 30, 72, 0.98), rgba(31, 48, 76, 0.98));
  box-shadow: 0 30px 90px rgba(0,0,0,0.45);
}
.region-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.region-editor-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 24px;
}
.region-editor-close {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.region-editor-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
}
.region-editor-stage {
  min-width: 0;
  min-height: 360px;
  padding: 18px;
  background: rgba(0,0,0,0.24);
  display: grid;
  place-items: center;
}
#magazineRegionCanvas {
  max-width: 100%;
  border-radius: 12px;
  background: #111827;
  cursor: crosshair;
  touch-action: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.region-editor-tools {
  min-width: 0;
  border-left: 1px solid rgba(255,255,255,0.12);
  padding: 20px;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.region-editor-tools strong {
  color: var(--text);
  font-size: 17px;
}
.region-editor-tools p {
  margin: 0;
  line-height: 1.7;
}
.region-editor-actions {
  display: grid;
  gap: 10px;
}
.region-editor-actions .btn {
  width: 100%;
  justify-content: center;
}
.region-editor-note {
  margin-top: auto !important;
  font-size: 12.5px;
  color: var(--text-mute);
}

/* ========================================================
   后台 Admin 页
   ======================================================== */
.page-admin .topbar { background: rgba(11, 16, 32, 0.75); }

.admin-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 28px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.card-title {
  margin: 0 0 22px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

/* 翻译配置: 步骤卡 */
.step-box {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.step-num {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-grad, linear-gradient(135deg, #f5b942, #ff7d6b));
  color: #1b1303;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}
.step-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
html[data-theme="light"] .step-box { background: #f8fafc; border-color: rgba(15,23,42,0.08); }
html[data-theme="light"] .step-title { color: #0f172a; }
html[data-theme="vibrant"] .step-box { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); }
html[data-theme="vibrant"] .step-num { background: linear-gradient(135deg, #ffd700, #ff66c4); color: #2d1b4e; }

/* 模型快速选择 chip */
.model-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.model-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
}
.model-chip:hover { background: rgba(245, 185, 66, 0.18); border-color: var(--accent); }
.model-chip.active { background: var(--accent); color: #1b1303; border-color: var(--accent); box-shadow: 0 2px 8px rgba(245, 185, 66, 0.4); }
.chip-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-soft);
  font-family: var(--font);
}
.chip-tag-recommend { background: rgba(56, 211, 159, 0.25); color: #38d39f; }
.model-chip.active .chip-tag { background: rgba(0,0,0,0.18); color: #1b1303; }
.model-chip.active .chip-tag-recommend { background: rgba(0,0,0,0.18); color: #1b1303; }
html[data-theme="light"] .model-chip { background: #fff; border-color: rgba(15,23,42,0.12); color: #0f172a; }
html[data-theme="light"] .model-chip:hover { background: rgba(234,88,12,0.08); border-color: #ea580c; }
html[data-theme="light"] .model-chip.active { background: #ea580c; color: #fff; border-color: #ea580c; }
html[data-theme="light"] .chip-tag { background: #f1f5f9; color: #64748b; }
html[data-theme="light"] .chip-tag-recommend { background: rgba(22,163,74,0.12); color: #16a34a; }

/* 大按钮 (步骤里突出的 CTA) */
.btn-big { padding: 13px 26px; font-size: 14.5px; }

/* 翻译双按钮排版 */
.translate-buttons { display: flex; flex-direction: column; gap: 10px; }
.translate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.translate-info { flex: 1; min-width: 0; }
.translate-label { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.translate-status { font-size: 12.5px; color: var(--text-soft); line-height: 1.4; }
.translate-status strong { color: var(--accent); }
.translate-status.done { color: var(--accent-4, #38d39f); }
.translate-row .btn { flex-shrink: 0; }
html[data-theme="light"] .translate-row { background: #f8fafc; border-color: rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .translate-label { color: #0f172a; }
html[data-theme="light"] .translate-status.done { color: #16a34a; }
html[data-theme="vibrant"] .translate-row { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); }
html[data-theme="vibrant"] .translate-status.done { color: #66ffcc; }

/* 测试结果区 */
.test-result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  border: 1px solid;
  word-break: break-word;
}
.test-result[data-status="ok"] {
  background: rgba(56, 211, 159, 0.10);
  border-color: rgba(56, 211, 159, 0.45);
  color: var(--text);
}
.test-result[data-status="error"] {
  background: rgba(248, 113, 113, 0.10);
  border-color: rgba(248, 113, 113, 0.45);
  color: var(--text);
}
html[data-theme="light"] .test-result[data-status="ok"] { background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.35); color: #0f172a; }
html[data-theme="light"] .test-result[data-status="error"] { background: rgba(220,38,38,0.06); border-color: rgba(220,38,38,0.35); color: #0f172a; }

/* 设置卡片 */
.settings-card { margin-bottom: 16px; padding: 18px 22px; }
.settings-head {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
}
.settings-toggle {
  font-size: 12.5px;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.settings-body { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
html[data-theme="light"] .settings-toggle { background: #f1f5f9; border-color: rgba(15,23,42,0.10); color: #475569; }
html[data-theme="light"] .settings-body { border-top-color: rgba(15,23,42,0.08); }
html[data-theme="vibrant"] .settings-toggle { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.30); color: #fff; }

/* 表单 */
.row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.row.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .row.three-col { grid-template-columns: 1fr; }
}
.field input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(0.7); cursor: pointer; }
html[data-theme="light"] .field input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(0.3); }
.field {
  margin-bottom: 18px;
}
.field > label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 9px;
  letter-spacing: 0.2px;
}
.field input[type="text"],
.field input[type="date"],
.field input[type="time"],
.field input[type="url"],
.field textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: all .2s;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-mute); }
.field textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.15);
}
.field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}

/* 上传区 */
.upload-area {
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.18);
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
}
.upload-area:hover { border-color: var(--accent); background: rgba(245, 185, 66, 0.04); }
.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(245, 185, 66, 0.08);
  transform: scale(1.005);
}
.upload-icon { font-size: 28px; margin-bottom: 8px; }
.upload-text { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.upload-hint { font-size: 11.5px; color: var(--text-mute); }
.upload-progress { margin-top: 10px; }
.upload-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.upload-progress-bar > div {
  height: 100%;
  background: var(--accent-grad);
  width: 0%;
  transition: width .2s;
}
.upload-progress-text { font-size: 12px; color: var(--text-mute); margin-top: 6px; }

/* 已上传媒体预览 */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.media-grid:empty { display: none; }
.media-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.media-cell img,
.media-cell video {
  width: 100%; height: 100%; object-fit: cover;
}
.doc-preview {
  width: 100%;
  height: 100%;
  padding: 14px 10px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.doc-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-grad);
  color: #1b1303;
  font-size: 11px;
  font-weight: 900;
}
.doc-name {
  width: 100%;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-cell .badge {
  position: absolute;
  left: 6px; bottom: 6px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}
.media-cell .remove-btn {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.media-cell .remove-btn:hover { background: var(--danger); }

/* 链接编辑器 */
.links-editor { display: flex; flex-direction: column; gap: 8px; }
.link-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 8px;
}
.link-row input {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.link-row input:focus { border-color: var(--accent); }
.link-row .remove-link {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  cursor: pointer;
}
.link-row .remove-link:hover { background: rgba(248, 113, 113, 0.22); }

.btn-add {
  margin-top: 8px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
}
.btn-primary {
  background: var(--accent-grad);
  color: #1b1303;
  box-shadow: 0 4px 14px rgba(245, 185, 66, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 185, 66, 0.4);
}
.btn-ghost {
  background: var(--surface);
  color: var(--text-soft);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* 右侧列表 */
.list-card { position: sticky; top: 76px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.list-head .card-title { margin: 0; font-size: 16px; }
.list-count {
  font-size: 12px;
  color: var(--text-mute);
  padding: 3px 9px;
  background: var(--surface);
  border-radius: 999px;
}
.list-search {
  width: 100%;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  margin-bottom: 12px;
}
.list-search:focus { border-color: var(--accent); }
.list-items {
  overflow-y: auto;
  flex: 1;
  margin-right: -8px;
  padding-right: 4px;
}
.list-items::-webkit-scrollbar { width: 6px; }
.list-items::-webkit-scrollbar-thumb { background: var(--surface-strong); border-radius: 3px; }

.list-empty {
  text-align: center;
  color: var(--text-mute);
  padding: 40px 10px;
  font-size: 13px;
}
.list-item {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .2s;
}
.list-item:hover { background: var(--surface-2); border-color: var(--border-strong); }
.list-item.active { border-color: var(--accent); background: rgba(245, 185, 66, 0.06); }
.list-item-date {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: 0.3px;
}
.list-item-title {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.list-item-actions button {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  color: var(--text-soft);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}
.list-item-actions button:hover { color: var(--text); background: var(--surface-2); }
.list-item-actions button.danger:hover { color: var(--danger); border-color: var(--danger); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 25, 45, 0.95);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: var(--shadow-2);
  z-index: 200;
  animation: toastIn .3s ease;
}
.toast.success { border-left: 3px solid var(--accent-4); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 响应式 */
@media (max-width: 920px) {
  .admin-layout { grid-template-columns: 1fr; }
  .list-card { position: static; max-height: none; }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-side {
    position: static;
  }
  .region-editor-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .region-editor-tools {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .region-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .topbar-inner {
    display: block;
    padding: 10px max(14px, env(safe-area-inset-left)) 8px max(14px, env(safe-area-inset-right));
  }
  .brand {
    gap: 9px;
    font-size: 15px;
    max-width: 100%;
    margin-bottom: 9px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .topbar-nav {
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 3px;
    margin: 0 -2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar-nav::-webkit-scrollbar { display: none; }
  .merch-custom-kind-row {
    grid-template-columns: 1fr;
  }
  .nav-link,
  .lang-btn,
  .theme-btn {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 13px;
    flex: 0 0 auto;
  }
  .lang-btn,
  .theme-picker {
    margin-left: 0;
  }
  .theme-menu {
    position: fixed;
    top: 92px;
    right: max(14px, env(safe-area-inset-right));
  }
  .hero { padding: 40px 18px 20px; }
  .hero-title { font-size: 32px; }
  .toolbar { padding: 16px 18px 0; }
  .timeline-wrap { padding: 30px 18px 60px; }
  .workbench-wrap { padding: 28px 18px 60px; }
  .workbench-head {
    display: block;
    margin-bottom: 18px;
  }
  .workbench-title { font-size: 34px; }
  .workbench-primary {
    margin-top: 16px;
    width: 100%;
  }
  .design-assistant {
    grid-template-columns: 1fr;
  }
  .workbench-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .workbench-tab {
    flex: 0 0 auto;
  }
  .shared-context,
  .generation-console {
    grid-template-columns: 1fr;
  }
  .manual-card {
    padding: 16px;
  }
  .assistant-controls.manual-top-controls,
  .manual-upload-row,
  .style-cloner,
  .style-cloner-result {
    grid-template-columns: 1fr;
  }
  .guide-material-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .guide-material-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .guide-material-preview {
    width: 72px;
  }
  .guide-material-remove {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }
  .style-cloner-actions {
    justify-content: flex-start;
  }
  .assistant-controls,
  .assistant-controls.two,
  .assistant-controls.manual-secondary-controls {
    grid-template-columns: 1fr;
  }
  .assistant-actions {
    flex-direction: column;
  }
  .job-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .job-toolbar div {
    justify-content: flex-start;
  }
  .job-row-main {
    grid-template-columns: 1fr;
  }
  .job-row small {
    text-align: left;
  }
  .job-meta-grid span {
    max-width: 100%;
  }
  .asset-upload-row {
    grid-template-columns: 1fr;
  }
  .file-library-section {
    padding: 16px;
  }
  .file-library-head {
    display: block;
  }
  .file-library-note {
    display: block;
    margin-top: 6px;
  }
  .file-filter {
    align-items: flex-start;
    flex-direction: column;
  }
  .file-filter-tabs {
    width: 100%;
  }
  .file-page-size {
    width: 100%;
    justify-content: flex-end;
  }
  .file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    gap: 10px;
  }
  .file-open {
    height: 170px;
  }
  .file-meta {
    padding: 7px;
  }
  .file-edit-btn {
    top: 5px;
    right: 5px;
    padding: 4px 7px;
    font-size: 10px;
  }
  .file-pager {
    align-items: stretch;
    flex-direction: column;
  }
  .file-pager-actions {
    justify-content: space-between;
  }
  .assistant-preview {
    min-height: 320px;
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tool-card,
  .tool-card-main {
    grid-column: auto;
    min-height: 170px;
  }
  .admin-layout { padding: 24px 18px 60px; }
  .card { padding: 22px; }
  .row.two-col { grid-template-columns: 1fr; }
  .link-row { grid-template-columns: 1fr; }
  .timeline { padding-left: 30px; }
  .timeline-goals {
    margin-top: 28px;
    margin-left: 30px;
    grid-template-columns: 1fr;
  }
  .tl-dot { left: -26px; }
}

/* ============================================================
   语言切换 · Language Switcher
   ============================================================ */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  line-height: 1.2;
  white-space: nowrap;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.14); }
.lang-btn .lang-flag { font-size: 14px; }
html[data-theme="light"] .lang-btn { background: #fff; border-color: rgba(15,23,42,0.10); color: #0f172a; box-shadow: 0 1px 3px rgba(15,23,42,0.05); }
html[data-theme="light"] .lang-btn:hover { background: #f8fafc; }
html[data-theme="vibrant"] .lang-btn { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.30); color: #fff; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.20);
  flex: 0 0 auto;
}
.lang-switch-btn {
  min-height: 32px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.lang-switch-btn.active {
  background: var(--accent);
  color: #221626;
  box-shadow: 0 8px 20px rgba(255, 191, 71, 0.18);
}
html[data-theme="light"] .lang-switch {
  background: #fff;
  border-color: rgba(15,23,42,0.10);
  box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}
html[data-theme="light"] .lang-switch-btn.active {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}
html[data-theme="vibrant"] .lang-switch {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.30);
}

/* ============================================================
   主题切换 · Theme Switcher (顶栏按钮)
   ============================================================ */
.theme-picker {
  position: relative;
  margin-left: 8px;
}
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  line-height: 1.2;
  white-space: nowrap;
}
.theme-btn:hover { background: rgba(255, 255, 255, 0.14); }
.theme-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  z-index: 60;
  display: none;
}
.theme-menu.open { display: block; }
.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
}
.theme-option:hover { background: rgba(255, 255, 255, 0.08); }
.theme-option.current { background: rgba(245, 185, 66, 0.15); }
.theme-swatch {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}
.theme-swatch.dark    { background: linear-gradient(135deg, #1c2547 0%, #243056 100%); }
.theme-swatch.light   { background: linear-gradient(135deg, #ffffff 0%, #eef2fb 100%); border-color: rgba(0,0,0,0.1); }
.theme-swatch.vibrant { background: linear-gradient(135deg, #ff6b9d 0%, #c44dff 50%, #4dcfff 100%); }

/* ============================================================
   浅色主题 · Light Theme
   ============================================================ */
html[data-theme="light"] body {
  background:
    radial-gradient(900px 600px at 10% 0%, rgba(99, 102, 241, 0.10), transparent 60%),
    radial-gradient(800px 500px at 100% 10%, rgba(234, 88, 12, 0.10), transparent 60%),
    linear-gradient(180deg, #f6f8fc 0%, #eaeff7 100%);
  color: #0f172a;
}
html[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
}
html[data-theme="light"] .brand { color: #0f172a; }
html[data-theme="light"] .brand-mark { box-shadow: 0 4px 16px rgba(234, 88, 12, 0.30); }
html[data-theme="light"] .nav-link { color: #475569; }
html[data-theme="light"] .nav-link:hover { background: rgba(15, 23, 42, 0.06); color: #0f172a; }
html[data-theme="light"] .nav-link.active { background: rgba(234, 88, 12, 0.10); color: #c2410c; border-color: rgba(234, 88, 12, 0.30); }
html[data-theme="light"] .theme-btn { background: #fff; border-color: rgba(15, 23, 42, 0.10); color: #0f172a; box-shadow: 0 1px 3px rgba(15,23,42,0.05); }
html[data-theme="light"] .theme-btn:hover { background: #f8fafc; }
html[data-theme="light"] .theme-menu { background: #fff; border-color: rgba(15, 23, 42, 0.10); box-shadow: 0 12px 40px rgba(15, 23, 42, 0.15); }
html[data-theme="light"] .theme-option { color: #0f172a; }
html[data-theme="light"] .theme-option:hover { background: #f1f5f9; }
html[data-theme="light"] .theme-option.current { background: rgba(234, 88, 12, 0.10); }

html[data-theme="light"] .hero-greet { background: #fff; border-color: rgba(234, 88, 12, 0.30); color: #c2410c; box-shadow: 0 1px 3px rgba(15,23,42,0.06); }
html[data-theme="light"] .hero-title { color: #0f172a; text-shadow: none; }
html[data-theme="light"] .hero-sub { color: #475569; }

html[data-theme="light"] .stat-card { background: #fff; border-color: rgba(15, 23, 42, 0.08); box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04); }
html[data-theme="light"] .stat-card:hover { border-color: rgba(15, 23, 42, 0.15); box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .stat-label { color: #64748b; }
html[data-theme="light"] .stat-value { color: #ea580c; text-shadow: none; }
html[data-theme="light"] .stat-small { color: #0f172a; }

html[data-theme="light"] .search-box input { background: #fff; border-color: rgba(15, 23, 42, 0.12); color: #0f172a; box-shadow: 0 1px 3px rgba(15,23,42,0.04); }
html[data-theme="light"] .search-box input::placeholder { color: #94a3b8; }
html[data-theme="light"] .search-icon { color: #94a3b8; }
html[data-theme="light"] .tag-chip { background: #fff; border-color: rgba(15, 23, 42, 0.10); color: #475569; }
html[data-theme="light"] .tag-chip:hover { background: #f1f5f9; color: #0f172a; }
html[data-theme="light"] .tag-chip.active { background: #ea580c; color: #fff; border-color: #ea580c; box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35); }

html[data-theme="light"] .timeline::before {
  background: linear-gradient(180deg, rgba(234, 88, 12, 0.4) 0%, rgba(99, 102, 241, 0.35) 50%, rgba(22, 163, 74, 0.25) 100%);
}
html[data-theme="light"] .tl-dot { background: #ea580c; box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.20), 0 0 12px rgba(234, 88, 12, 0.4); }
html[data-theme="light"] .tl-card { background: #fff; border-color: rgba(15, 23, 42, 0.08); box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06); }
html[data-theme="light"] .tl-card:hover { border-color: rgba(15, 23, 42, 0.18); box-shadow: 0 10px 36px rgba(15, 23, 42, 0.12); }
html[data-theme="light"] .tl-date { background: rgba(234, 88, 12, 0.10); color: #c2410c; border-color: rgba(234, 88, 12, 0.25); }
html[data-theme="light"] .tl-weekday { color: #64748b; }
html[data-theme="light"] .tl-tag { background: rgba(99, 102, 241, 0.10); color: #4338ca; border-color: rgba(99, 102, 241, 0.30); }
html[data-theme="light"] .tl-title { color: #0f172a; }
html[data-theme="light"] .tl-content { color: #334155; }
html[data-theme="light"] .tl-achievements { background: rgba(22, 163, 74, 0.06); border-color: rgba(22, 163, 74, 0.25); border-left-color: #16a34a; }
html[data-theme="light"] .tl-achievements-label { color: #15803d; }
html[data-theme="light"] .tl-achievements-text { color: #0f172a; }
html[data-theme="light"] .tl-link { background: #f8fafc; border-color: rgba(15, 23, 42, 0.10); color: #475569; }
html[data-theme="light"] .tl-link:hover { background: #f1f5f9; color: #0f172a; }
html[data-theme="light"] .tl-media-item { background: #f1f5f9; border-color: rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .tl-file-item { background: #f8fafc; border-color: rgba(15, 23, 42, 0.10); }
html[data-theme="light"] .tl-file-item:hover { background: rgba(234, 88, 12, 0.08); border-color: rgba(234, 88, 12, 0.28); }
html[data-theme="light"] .tl-file-name { color: #0f172a; }
html[data-theme="light"] .tl-file-open { color: #64748b; }

html[data-theme="light"] .empty { color: #64748b; }
html[data-theme="light"] .empty-text { color: #64748b; }
html[data-theme="light"] .footer { color: #94a3b8; border-top-color: rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .workbench-title { color: #0f172a; text-shadow: none; }
html[data-theme="light"] .workbench-sub { color: #475569; }
html[data-theme="light"] .assistant-panel,
html[data-theme="light"] .assistant-preview,
html[data-theme="light"] .manual-card {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
html[data-theme="light"] .assistant-title { color: #0f172a; }
html[data-theme="light"] .assistant-status {
  background: #f8fafc;
  border-color: rgba(15,23,42,0.10);
  color: #64748b;
}
html[data-theme="light"] .mention-menu {
  background: rgba(255,255,255,0.98);
  border-color: rgba(15,23,42,0.14);
  box-shadow: 0 18px 48px rgba(15,23,42,0.14);
}
html[data-theme="light"] .mention-item:hover,
html[data-theme="light"] .mention-item:focus {
  background: rgba(234,88,12,0.10);
}
html[data-theme="light"] .assistant-controls label { color: #0f172a; }
html[data-theme="light"] .assistant-controls select,
html[data-theme="light"] .assistant-controls input,
html[data-theme="light"] .assistant-controls textarea,
html[data-theme="light"] .print-size-custom-field input,
html[data-theme="light"] .manual-text-field textarea {
  background: #fff;
  border-color: rgba(15,23,42,0.12);
  color: #0f172a;
}
html[data-theme="light"] .manual-text-field { color: #0f172a; }
html[data-theme="light"] .manual-note { color: #64748b; }
html[data-theme="light"] .reference-upload {
  background: #f8fafc;
  border-color: rgba(15,23,42,0.14);
}
html[data-theme="light"] .style-cloner-upload,
html[data-theme="light"] .style-cloner-result {
  background: #f8fafc;
  border-color: rgba(15,23,42,0.14);
}
html[data-theme="light"] .style-cloner-side textarea {
  background: #fff;
  border-color: rgba(15,23,42,0.12);
  color: #0f172a;
}
html[data-theme="light"] .style-cloner-result strong { color: #0f172a; }
html[data-theme="light"] .style-cloner-result p,
html[data-theme="light"] .style-cloner-result code { color: #64748b; }
html[data-theme="light"] .reference-upload.dragover {
  background: rgba(234,88,12,0.08);
  border-color: rgba(234,88,12,0.35);
}
html[data-theme="light"] .reference-copy strong { color: #0f172a; }
html[data-theme="light"] .reference-copy span { color: #64748b; }
html[data-theme="light"] .reference-thumb {
  background: #f1f5f9;
  border-color: rgba(15,23,42,0.10);
}
html[data-theme="light"] .asset-upload-row select,
html[data-theme="light"] .asset-upload-row input {
  background: #fff;
  border-color: rgba(15,23,42,0.12);
  color: #0f172a;
}
html[data-theme="light"] .asset-filter button {
  background: #fff;
  border-color: rgba(15,23,42,0.10);
  color: #64748b;
}
html[data-theme="light"] .asset-filter button.active {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
}
html[data-theme="light"] .asset-card {
  background: #f1f5f9;
}
html[data-theme="light"] .asset-empty {
  color: #64748b;
  border-color: rgba(15,23,42,0.12);
}
html[data-theme="light"] .file-filter button,
html[data-theme="light"] .file-page-size select,
html[data-theme="light"] .file-pager button {
  background: #fff;
  border-color: rgba(15,23,42,0.10);
  color: #64748b;
}
html[data-theme="light"] .file-filter button.active {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
}
html[data-theme="light"] .file-card {
  background: #f1f5f9;
  border-color: rgba(15,23,42,0.10);
}
html[data-theme="light"] .file-open {
  background: #e2e8f0;
}
html[data-theme="light"] .file-meta {
  background: #fff;
  color: #0f172a;
  border-top: 1px solid rgba(15,23,42,0.08);
}
html[data-theme="light"] .assistant-empty,
html[data-theme="light"] .assistant-result-meta { color: #64748b; }
html[data-theme="light"] .job-row {
  background: #f8fafc;
  border-color: rgba(15,23,42,0.10);
  color: #64748b;
}
html[data-theme="light"] .job-row span { color: #0f172a; }
html[data-theme="light"] .job-meta-grid span {
  background: #eef2ff;
  border-color: rgba(15,23,42,0.08);
  color: #0f172a;
}
html[data-theme="light"] .job-title-block strong { color: #c2410c; }
html[data-theme="light"] .tool-card {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
html[data-theme="light"] .tool-card:hover {
  border-color: rgba(234, 88, 12, 0.28);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.09);
}
html[data-theme="light"] .tool-card-main {
  background: linear-gradient(135deg, rgba(234,88,12,0.08), rgba(22,163,74,0.06)), #fff;
}
html[data-theme="light"] .tool-title { color: #0f172a; }
html[data-theme="light"] .tool-desc { color: #475569; }
html[data-theme="light"] .tool-url { color: #94a3b8; }

/* Admin (light) */
html[data-theme="light"] .card { background: #fff; border-color: rgba(15, 23, 42, 0.08); box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06); }
html[data-theme="light"] .card-title { color: #0f172a; }
html[data-theme="light"] .field > label { color: #0f172a; }
html[data-theme="light"] .field input[type="text"],
html[data-theme="light"] .field input[type="date"],
html[data-theme="light"] .field input[type="time"],
html[data-theme="light"] .field input[type="url"],
html[data-theme="light"] .field textarea {
  background: #fff; border-color: rgba(15, 23, 42, 0.15); color: #0f172a; box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
html[data-theme="light"] .field input::placeholder,
html[data-theme="light"] .field textarea::placeholder { color: #94a3b8; }
html[data-theme="light"] .field input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.3); }
html[data-theme="light"] .upload-area { background: #f8fafc; border-color: rgba(15, 23, 42, 0.18); }
html[data-theme="light"] .upload-area:hover { background: rgba(234, 88, 12, 0.04); border-color: #ea580c; }
html[data-theme="light"] .upload-text { color: #0f172a; }
html[data-theme="light"] .upload-hint { color: #94a3b8; }
html[data-theme="light"] .media-cell { background: #f1f5f9; border-color: rgba(15, 23, 42, 0.10); }
html[data-theme="light"] .doc-name { color: #475569; }
html[data-theme="light"] .link-row input { background: #fff; border-color: rgba(15, 23, 42, 0.15); color: #0f172a; }
html[data-theme="light"] .btn-ghost { background: #fff; color: #475569; border-color: rgba(15, 23, 42, 0.12); }
html[data-theme="light"] .btn-ghost:hover { background: #f8fafc; color: #0f172a; }
html[data-theme="light"] .btn-primary { color: #fff; background: linear-gradient(135deg, #ea580c 0%, #f43f5e 100%); box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35); }
html[data-theme="light"] .list-item { background: #fff; border-color: rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .list-item:hover { background: #f8fafc; }
html[data-theme="light"] .list-item.active { background: rgba(234, 88, 12, 0.06); border-color: #ea580c; }
html[data-theme="light"] .list-item-date { color: #c2410c; }
html[data-theme="light"] .list-item-title { color: #0f172a; }
html[data-theme="light"] .list-search { background: #fff; border-color: rgba(15, 23, 42, 0.10); color: #0f172a; }
html[data-theme="light"] .list-empty { color: #94a3b8; }
html[data-theme="light"] .list-count { background: #f1f5f9; color: #64748b; }
html[data-theme="light"] .list-item-actions button { background: #f8fafc; border-color: rgba(15,23,42,0.10); color: #475569; }
html[data-theme="light"] .list-item-actions button:hover { color: #0f172a; }
html[data-theme="light"] .toast { background: #0f172a; color: #fff; border-color: rgba(0,0,0,0.2); }

/* ============================================================
   全彩主题 · Vibrant Theme (粉紫蓝渐变)
   ============================================================ */
html[data-theme="vibrant"] body {
  background:
    radial-gradient(900px 600px at 0% 0%, rgba(255, 107, 157, 0.55), transparent 55%),
    radial-gradient(900px 600px at 100% 10%, rgba(77, 207, 255, 0.45), transparent 55%),
    radial-gradient(1000px 700px at 50% 110%, rgba(196, 77, 255, 0.45), transparent 55%),
    linear-gradient(180deg, #2d1b4e 0%, #1a0d2e 100%);
  color: #ffffff;
}
html[data-theme="vibrant"] .topbar {
  background: rgba(45, 27, 78, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
html[data-theme="vibrant"] .brand-mark { background: linear-gradient(135deg, #ffd700 0%, #ff66c4 100%); color: #2d1b4e; }
html[data-theme="vibrant"] .nav-link { color: #fce4ff; }
html[data-theme="vibrant"] .nav-link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
html[data-theme="vibrant"] .nav-link.active { background: rgba(255, 215, 0, 0.20); color: #ffd700; border-color: rgba(255, 215, 0, 0.45); }
html[data-theme="vibrant"] .theme-btn { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.30); }
html[data-theme="vibrant"] .theme-menu { background: rgba(45, 27, 78, 0.95); border-color: rgba(255, 255, 255, 0.25); }
html[data-theme="vibrant"] .theme-option.current { background: rgba(255, 215, 0, 0.18); }

html[data-theme="vibrant"] .hero-greet { background: rgba(255, 215, 0, 0.20); border-color: rgba(255, 215, 0, 0.5); color: #ffd700; }
html[data-theme="vibrant"] .hero-title { color: #ffffff; text-shadow: 0 4px 30px rgba(255, 102, 196, 0.5), 0 0 60px rgba(77, 207, 255, 0.3); }
html[data-theme="vibrant"] .hero-sub { color: #fce4ff; }

html[data-theme="vibrant"] .stat-card { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); backdrop-filter: blur(12px); }
html[data-theme="vibrant"] .stat-card:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.45); }
html[data-theme="vibrant"] .stat-label { color: #fce4ff; }
html[data-theme="vibrant"] .stat-value { color: #ffd700; text-shadow: 0 2px 20px rgba(255, 215, 0, 0.6); }
html[data-theme="vibrant"] .stat-small { color: #ffffff; text-shadow: none; }

html[data-theme="vibrant"] .search-box input { background: rgba(0, 0, 0, 0.30); border-color: rgba(255, 255, 255, 0.30); color: #fff; }
html[data-theme="vibrant"] .search-box input::placeholder { color: rgba(255, 255, 255, 0.55); }
html[data-theme="vibrant"] .tag-chip { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); color: #fce4ff; }
html[data-theme="vibrant"] .tag-chip.active { background: linear-gradient(135deg, #ffd700 0%, #ff66c4 100%); color: #2d1b4e; border-color: transparent; }

html[data-theme="vibrant"] .timeline::before {
  background: linear-gradient(180deg, #ff66c4 0%, #c44dff 35%, #4dcfff 70%, #66ffcc 100%);
  width: 3px;
}
html[data-theme="vibrant"] .tl-dot { background: #ffd700; box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.25), 0 0 20px rgba(255, 102, 196, 0.7); }
html[data-theme="vibrant"] .tl-card { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); backdrop-filter: blur(12px); }
html[data-theme="vibrant"] .tl-card:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 215, 0, 0.4); }
html[data-theme="vibrant"] .tl-date { background: linear-gradient(135deg, #ff66c4 0%, #c44dff 100%); color: #fff; border-color: transparent; }
html[data-theme="vibrant"] .tl-weekday { color: #fce4ff; }
html[data-theme="vibrant"] .tl-tag { background: rgba(77, 207, 255, 0.25); color: #4dcfff; border-color: rgba(77, 207, 255, 0.5); }
html[data-theme="vibrant"] .tl-title { color: #ffffff; }
html[data-theme="vibrant"] .tl-content { color: #f0e0ff; }
html[data-theme="vibrant"] .tl-achievements { background: linear-gradient(135deg, rgba(102, 255, 204, 0.15), rgba(255, 215, 0, 0.05)); border-color: rgba(102, 255, 204, 0.4); border-left-color: #66ffcc; }
html[data-theme="vibrant"] .tl-achievements-label { color: #66ffcc; }
html[data-theme="vibrant"] .tl-achievements-text { color: #fff; }
html[data-theme="vibrant"] .tl-link { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.22); color: #fce4ff; }
html[data-theme="vibrant"] .tl-link:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
html[data-theme="vibrant"] .empty-cta { background: linear-gradient(135deg, #ffd700 0%, #ff66c4 100%); color: #2d1b4e; }

/* Admin (vibrant) */
html[data-theme="vibrant"] .card { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); backdrop-filter: blur(12px); }
html[data-theme="vibrant"] .field input[type="text"],
html[data-theme="vibrant"] .field input[type="date"],
html[data-theme="vibrant"] .field input[type="time"],
html[data-theme="vibrant"] .field input[type="url"],
html[data-theme="vibrant"] .field textarea {
  background: rgba(0, 0, 0, 0.30); border-color: rgba(255, 255, 255, 0.28); color: #fff;
}
html[data-theme="vibrant"] .upload-area { background: rgba(0, 0, 0, 0.25); border-color: rgba(255, 255, 255, 0.35); }
html[data-theme="vibrant"] .upload-area:hover { background: rgba(255, 215, 0, 0.08); border-color: #ffd700; }
html[data-theme="vibrant"] .btn-primary { background: linear-gradient(135deg, #ffd700 0%, #ff66c4 100%); color: #2d1b4e; box-shadow: 0 4px 20px rgba(255, 102, 196, 0.4); }
html[data-theme="vibrant"] .list-item.active { background: rgba(255, 215, 0, 0.10); border-color: #ffd700; }
html[data-theme="vibrant"] .list-item-date { color: #ffd700; }

/* editor-only-mode */
body.editor-only-mode .topbar,
body.editor-only-mode .workbench-head,
body.editor-only-mode .workbench-tabs,
body.editor-only-mode .workbench-panel:not([data-workbench-panel="editor"]),
body.editor-only-mode .shared-context,
body.editor-only-mode .generation-console,
body.editor-only-mode .file-library-section,
body.editor-only-mode .footer {
  display: none !important;
}

body.editor-only-mode .app-shell {
  padding-top: 22px;
}

body.editor-only-mode .manual-designer {
  margin-top: 0;
}

body.editor-only-mode .editor-card {
  min-height: calc(100vh - 44px);
}

/* compact editor controls */
body.editor-only-mode .editor-toolbar {
  gap: 8px;
  margin: 10px 0 14px;
  align-items: center;
}

body.editor-only-mode .editor-toolbar .editor-icon-btn {
  width: 42px;
  min-width: 42px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0;
  letter-spacing: 0;
}

body.editor-only-mode .editor-toolbar .editor-icon-btn::before {
  content: attr(data-icon);
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

body.editor-only-mode .editor-toolbar .editor-export-icon-btn {
  width: 54px;
  min-width: 54px;
}

body.editor-only-mode .editor-toolbar .editor-mini-toggle {
  min-width: 54px;
  height: 38px;
  padding: 0 10px;
  gap: 7px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

body.editor-only-mode .editor-toolbar .editor-mini-toggle input {
  width: 16px;
  height: 16px;
}

body.editor-only-mode .editor-side .btn {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.2;
}

body.editor-only-mode .editor-wide-btn {
  min-height: 38px;
}

body.editor-only-mode .assistant-head {
  margin-bottom: 8px;
}

body.editor-only-mode .editor-side {
  gap: 8px;
}

body.editor-only-mode .editor-side-section {
  padding: 8px 10px;
}

body.editor-only-mode .editor-accordion > summary {
  min-height: 30px;
}

body.editor-only-mode .editor-accordion > summary span {
  font-size: 12px;
}

body.editor-only-mode .editor-accordion:not([open]) {
  background: rgba(255,255,255,0.035);
}
