/* ===== 面料作图工作台 · 视觉系统 ===== */
:root {
  /* 主色：香蕉黄（亮黄填充 + 深色文字，与参考站一致） */
  --brand-50:  #fffbe6;
  --brand-100: #fff2bf;
  --brand-200: #ffe27a;
  --brand-300: #ffd94d;
  --brand-400: #ffd11a;
  --brand-500: #ffc800;
  --brand-600: #a17d00;
  --brand-700: #6b5100;
  --on-brand:  #1a1a1a;   /* 黄色底上的文字色 */

  /* 中性色：暖米白底 + 纯白卡片（与参考站一致，带一点奶油暖调） */
  --bg:        #f7f4ec;
  --surface:   #ffffff;
  --surface-2: #fbf8f1;
  --surface-3: #f2ecdf;
  --border:    #ece5d6;
  --border-2:  #dbd2c0;

  --text:      #1e1a14;
  --text-2:    #554f45;
  --text-3:    #8b8377;
  --text-4:    #b6ad9d;

  --danger:    #d14343;
  --danger-bg: #fdeded;

  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius:    13px;
  --radius-lg: 18px;

  --shadow-xs: 0 1px 2px rgba(76, 58, 20, .05);
  --shadow-sm: 0 1px 3px rgba(76, 58, 20, .07), 0 1px 2px rgba(76, 58, 20, .04);
  --shadow:    0 4px 14px rgba(76, 58, 20, .08), 0 1px 3px rgba(76, 58, 20, .05);
  --shadow-lg: 0 14px 40px rgba(76, 58, 20, .16), 0 3px 10px rgba(76, 58, 20, .06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 520px at 78% -8%, #fffdf6 0%, rgba(255, 253, 246, 0) 62%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--brand-100); color: var(--brand-700); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c9d2da; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #aab6c1; background-clip: content-box; }

/* ================= 顶栏 ================= */
.topbar {
  height: 64px;
  background: rgba(253, 250, 243, .9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 60;
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--brand-500);
  color: var(--on-brand); display: grid; place-items: center;
  font-size: 19px; font-weight: 600; letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(255, 190, 0, .35);
}
.brand-text h1 { font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.brand-text p { font-size: 11.5px; color: var(--text-3); margin-top: -2px; }

.tabs {
  display: flex; gap: 3px; padding: 3px;
  background: var(--surface-3); border-radius: 10px;
}
.tab {
  padding: 6px 17px; border-radius: 7px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  transition: background .16s, color .16s, box-shadow .16s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--surface); color: var(--brand-700);
  font-weight: 600; box-shadow: var(--shadow-xs);
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-4); flex-shrink: 0;
  transition: background .2s, box-shadow .2s;
}
.status-dot.ok { background: #2f9e5f; box-shadow: 0 0 0 3px rgba(47, 158, 95, .16); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(209, 67, 67, .14); }
.status-text { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* ================= 视图容器 ================= */
.app { display: flex; align-items: stretch; min-height: 100vh; }
main { flex: 1; min-width: 0; padding: 24px 26px 56px; }
.view { display: none; animation: fadeUp .28s ease; }
.view.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ================= 作图工作台 ================= */
.studio-grid {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* 左侧控制面板 */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.panel::-webkit-scrollbar { width: 7px; }

.panel-block { padding: 17px 19px; border-bottom: 1px solid var(--border); }
.panel-block:last-of-type { border-bottom: none; }

.block-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 10px;
}
.block-head h2 {
  font-size: 12px; font-weight: 650; letter-spacing: .7px;
  color: var(--text-2); text-transform: uppercase;
}
.counter { font-size: 11.5px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.link-btn { font-size: 12px; color: var(--brand-600); font-weight: 500; }
.link-btn:hover { text-decoration: none; color: var(--brand-700); }

.hint { font-size: 11.5px; color: var(--text-3); margin-top: 10px; line-height: 1.6; }

/* 分段控件 */
.seg {
  display: flex; background: var(--surface-3);
  border-radius: var(--radius-sm); padding: 3px; gap: 2px;
}
.seg-btn {
  flex: 1; padding: 7px 4px; border-radius: 7px;
  font-size: 12.5px; color: var(--text-2); font-weight: 500;
  transition: background .16s, color .16s, box-shadow .16s;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active {
  background: var(--surface); color: var(--brand-700);
  font-weight: 600; box-shadow: var(--shadow-xs);
}

/* 上传区 */
.dropzone {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-sm);
  padding: 22px 14px;
  text-align: center;
  background: var(--surface-2);
  transition: border-color .18s, background .18s, transform .18s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--brand-400); background: var(--brand-50);
}
.dropzone.drag { transform: scale(1.01); }
.dz-icon {
  width: 34px; height: 34px; margin: 0 auto 9px;
  border-radius: 50%; background: var(--surface-3);
  color: var(--text-3); font-size: 19px; line-height: 32px;
  transition: background .18s, color .18s;
}
.dropzone:hover .dz-icon, .dropzone.drag .dz-icon { background: var(--brand-100); color: var(--brand-600); }
.dz-title { font-size: 13px; color: var(--text-2); font-weight: 500; }
.dz-sub { font-size: 11px; color: var(--text-4); margin-top: 3px; }

.thumb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 9px; margin-top: 12px;
}
.thumb {
  position: relative; aspect-ratio: 1;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2);
  box-shadow: var(--shadow-xs);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-idx {
  position: absolute; left: 5px; top: 5px;
  background: rgba(28, 22, 12, .68); color: #fff;
  font-size: 10px; padding: 1px 6px; border-radius: 5px;
  font-variant-numeric: tabular-nums; line-height: 1.5;
  backdrop-filter: blur(4px);
}
.thumb-x {
  position: absolute; right: 4px; top: 4px;
  width: 21px; height: 21px; border-radius: 50%;
  background: rgba(28, 22, 12, .62); color: #fff;
  font-size: 11px; line-height: 21px; text-align: center;
  border: none; padding: 0; cursor: pointer;
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .16s, background .16s;
}
.thumb:hover .thumb-x { opacity: 1; }
.thumb-x:hover { background: var(--danger); }
.img-broken { opacity: 0; }
.thumb:has(.img-broken)::after {
  content: '加载失败';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 10px; color: var(--text-3);
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface-3) 6px, var(--surface-3) 12px);
}

/* 面料选择 */
.fabric-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.fabric-empty {
  font-size: 12px; color: var(--text-3);
  padding: 12px; width: 100%; text-align: center;
  border: 1px dashed var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.chip-fabric {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 11px 4px 4px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12px; transition: border-color .16s, box-shadow .16s, background .16s;
  cursor: pointer;
}
.chip-fabric:hover { border-color: var(--border-2); background: var(--surface-2); }
.chip-fabric.active {
  border-color: var(--brand-400); background: var(--brand-50);
  box-shadow: 0 0 0 2px var(--brand-100);
}
/* 选择器里直接显示面料样本图（不是色卡圆点） */
.chip-swatch {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .1); flex-shrink: 0;
  overflow: hidden; display: block; position: relative;
  background-size: cover; background-position: center;
}
.chip-swatch img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.chip-clear { color: var(--text-4); font-size: 14px; line-height: 1; padding: 0 1px; }
.chip-clear:hover { color: var(--danger); }

.fabric-preview {
  margin-top: 11px; padding: 11px 13px;
  background: var(--brand-50); border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand-400);
  font-size: 11.5px; color: var(--brand-700); line-height: 1.65;
}
.fabric-preview b { color: var(--brand-700); font-weight: 650; }

/* 表单 */
textarea, input[type="text"], input[type="search"], input[type="password"], input:not([type]), select {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 13px; color: var(--text);
  transition: border-color .16s, box-shadow .16s, background .16s;
  resize: vertical;
}
textarea { line-height: 1.7; }
textarea:focus, input:focus, select:focus {
  outline: none; border-color: var(--brand-400);
  box-shadow: 0 0 0 3px var(--brand-50);
}
input::placeholder, textarea::placeholder { color: var(--text-4); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238a95a3' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  padding-right: 28px; cursor: pointer;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  padding: 4px 11px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-2); transition: all .16s;
}
.chip:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50); }

.field-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 10px;
}
.field-row:last-of-type { margin-bottom: 0; }
.field-row label { font-size: 12.5px; color: var(--text-2); flex-shrink: 0; font-weight: 500; }
.field-row select { width: 186px; padding: 7px 10px; font-size: 12.5px; }
/* 模型下拉：文字过长时省略而不是被裁切 */
.field-row select.model-select {
  width: 200px; text-overflow: ellipsis;
  white-space: nowrap; overflow: hidden;
}

.check-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-2); margin-top: 13px; cursor: pointer;
}
.check-row input { width: 15px; height: 15px; accent-color: var(--brand-500); cursor: pointer; }

/* 数量选择器 */
.qty-picker { display: flex; align-items: center; gap: 10px; }
.qty-picker input[type="range"] {
  flex: 1; appearance: none; height: 4px; border-radius: 3px;
  background: var(--surface-3); padding: 0; border: none; cursor: pointer;
}
.qty-picker input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 17px; height: 17px; border-radius: 50%;
  background: var(--brand-500); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(20, 32, 44, .25); cursor: pointer;
}
.qty-picker input[type="range"]:focus { box-shadow: none; }
.qty-value {
  min-width: 30px; text-align: center; font-size: 13px; font-weight: 650;
  color: var(--brand-700); font-variant-numeric: tabular-nums;
  background: var(--brand-50); border-radius: var(--radius-xs);
  padding: 2px 0;
}
.qty-presets { display: flex; gap: 5px; }
.qty-presets button {
  padding: 3px 9px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 11.5px; color: var(--text-2); transition: all .15s;
}
.qty-presets button:hover { border-color: var(--brand-400); color: var(--brand-700); }
.qty-presets button.active {
  background: var(--brand-500); border-color: var(--brand-500); color: var(--on-brand); font-weight: 650;
}

/* 按钮 */
.btn-primary {
  width: calc(100% - 38px); margin: 17px 19px 9px;
  padding: 12px; border-radius: var(--radius-sm);
  background: var(--brand-500);
  color: var(--on-brand); font-size: 14px; font-weight: 650; letter-spacing: .3px;
  transition: filter .16s, transform .08s, box-shadow .16s;
  box-shadow: 0 3px 12px rgba(255, 190, 0, .38);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 5px 18px rgba(255, 190, 0, .45); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 5px rgba(255, 190, 0, .35); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-primary.sm { width: auto; margin: 0; padding: 8px 17px; font-size: 13px; }

.btn-ghost {
  padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; color: var(--text-2); transition: all .16s;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--border-2); color: var(--text); background: var(--surface-2); }
.btn-ghost:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost.sm { padding: 5px 12px; font-size: 12px; }

.icon-btn {
  width: 30px; height: 30px; border-radius: var(--radius-xs);
  color: var(--text-3); font-size: 16px; line-height: 1;
  display: grid; place-items: center; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.cost-note { font-size: 11px; color: var(--text-4); text-align: center; padding: 0 19px 17px; }

/* ================= 结果区 ================= */
.result-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px 24px;
  min-height: 620px;
}
.result-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 14px; flex-wrap: wrap;
}
.result-head h2 { font-size: 15px; font-weight: 650; }
.result-actions { display: flex; align-items: center; gap: 13px; }
.meta { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.progress-box { margin-bottom: 18px; }
.progress-track {
  height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 30%; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide {
  0% { margin-left: -30%; } 100% { margin-left: 100%; }
}
.progress-text { font-size: 12px; color: var(--text-2); margin-top: 8px; }
.progress-text b { color: var(--brand-700); font-variant-numeric: tabular-nums; }

.error-box {
  background: var(--danger-bg); border: 1px solid #f5c9c9;
  color: #a83232; padding: 12px 15px; border-radius: var(--radius-sm);
  font-size: 12.5px; margin-bottom: 16px; line-height: 1.65;
}

.result-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 16px;
}
.result-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.result-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-2); }
.result-card img {
  width: 100%; display: block; aspect-ratio: 4/5;
  /* contain 而非 cover：设计工具里图片不能被裁切，宁可留白 */
  object-fit: contain; background: var(--surface-3); cursor: zoom-in;
}
.result-card-foot {
  padding: 8px 10px 9px; display: flex; align-items: center;
  justify-content: space-between; gap: 6px;
  font-size: 11.5px; color: var(--text-3);
}
.result-card-foot a { font-size: 11.5px; font-weight: 500; }
/* 「继续修改」：拿这张结果当底图，再加提示词往下改 */
.foot-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-refine {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 13px;
  border: 1px solid var(--brand-300);
  background: var(--brand-50); color: var(--brand-700);
  font-size: 11px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn-refine:hover {
  background: var(--brand-500); border-color: var(--brand-500);
  color: var(--on-brand); transform: translateY(-1px);
}

.result-skeleton {
  border: 1px solid var(--border); border-radius: var(--radius);
  aspect-ratio: 3/4; background: var(--surface-3);
  display: grid; place-items: center;
  color: var(--text-4); font-size: 12px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.empty-state {
  grid-column: 1 / -1; text-align: center;
  padding: 46px 20px; color: var(--text-3);
  min-height: 340px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.empty-icon {
  font-size: 26px; opacity: .55; margin-bottom: 14px;
  width: 62px; height: 62px; margin-left: auto; margin-right: auto;
  border-radius: 50%; background: var(--surface-3);
  display: grid; place-items: center;
}
.empty-title { font-size: 14.5px; color: var(--text-2); font-weight: 550; }
.empty-sub { font-size: 13px; margin-top: 6px; }

/* ================= 页面容器（面料库/记录） ================= */
.page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px 26px;
}
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head h2 { font-size: 17px; font-weight: 650; letter-spacing: .2px; }
.page-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.page-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mini-select { width: auto; min-width: 124px; padding: 8px 11px; font-size: 12.5px; }
.page-head-actions input[type="search"] { width: 250px; padding: 8px 11px; font-size: 12.5px; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cat-chip {
  padding: 5px 14px; border-radius: 17px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; color: var(--text-2); transition: all .16s;
}
.cat-chip:hover { border-color: var(--border-2); background: var(--surface-2); }
.cat-chip.active {
  background: var(--brand-500); border-color: var(--brand-500);
  color: var(--on-brand); font-weight: 650; box-shadow: 0 2px 8px rgba(255, 190, 0, .3);
}
.cat-chip .n { opacity: .65; margin-left: 5px; font-size: 11px; }

/* 面料卡片 */
.fabric-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;
}
.fabric-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.fabric-card:hover {
  border-color: var(--border-2); box-shadow: var(--shadow);
  transform: translateY(-3px);
}
/* 样本图放大：一眼看清当前用的是哪块布 */
.fc-swatch {
  height: 196px; position: relative;
  display: grid; place-items: center;
  background: var(--surface-2);
  overflow: hidden;   /* 竖长图会溢出盖住下面的文字 */
}
.fc-swatch img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .8, .3, 1);
}
.fabric-card:hover .fc-swatch img { transform: scale(1.045); }
/* 没有样本图时：用色号 + 织纹肌理，仍然读作「面料」而不是纯色块 */
.fc-color-block,
.chip-swatch.no-img,
.pal-dot.no-img {
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .26) 0 2px, rgba(255, 255, 255, 0) 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .11) 0 2px, rgba(0, 0, 0, 0) 2px 5px);
}
.fc-color-block { width: 100%; height: 100%; }
.fc-badge {
  position: absolute; left: 10px; top: 10px;
  background: rgba(255, 255, 255, .95); color: var(--text);
  font-size: 10.5px; padding: 2px 8px; border-radius: 10px;
  font-family: var(--mono); box-shadow: var(--shadow-xs);
}
.fc-body { padding: 12px 14px 13px; }
.fc-name {
  font-size: 13.5px; font-weight: 600; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fc-meta { font-size: 11.5px; color: var(--text-3); line-height: 1.65; }
.fc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.fc-tag {
  font-size: 10.5px; padding: 2px 8px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-family: var(--mono);
}
.fc-actions { display: flex; gap: 6px; padding: 0 14px 13px; }
.fc-actions button {
  flex: 1; padding: 6px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); font-size: 11.5px; color: var(--text-2);
  transition: all .16s; background: var(--surface);
}
.fc-actions button:hover {
  border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50);
}
.fc-actions button.del:hover {
  border-color: var(--danger); color: var(--danger); background: var(--danger-bg);
}

/* 记录卡片 */
.record-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 15px;
}
.record-card {
  position: relative;   /* 失败占位图 .img-fail-tip 是绝对定位，必须有定位祖先 */
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface); cursor: pointer;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.record-card:hover {
  border-color: var(--border-2); box-shadow: var(--shadow); transform: translateY(-3px);
}
.rc-img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  display: block; background: var(--surface-2);
}
.rc-body { padding: 11px 13px 12px; }
.rc-title {
  font-size: 12px; color: var(--text-2); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 37px;
}
.rc-foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 10.5px; color: var(--text-4);
  flex-wrap: wrap; row-gap: 3px;
}
.rc-foot > span { white-space: nowrap; }
.rc-tag {
  padding: 2px 8px; border-radius: 9px;
  background: var(--brand-50); color: var(--brand-700);
  font-size: 10.5px; font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
}
.rc-tag.failed { background: var(--danger-bg); color: var(--danger); }
.rc-time { margin-left: auto; }
.rc-del {
  color: var(--text-4); font-size: 12px; padding: 2px 5px;
  border-radius: 5px; transition: background .15s, color .15s;
}
.rc-del:hover { color: var(--danger); background: var(--danger-bg); }

/* ================= 弹窗 ================= */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(34, 26, 14, .42);
  display: grid; place-items: center; padding: 26px;
  backdrop-filter: blur(3px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 580px;
  max-height: 88vh; display: flex; flex-direction: column;
  animation: modalIn .24s cubic-bezier(.2, .8, .3, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.modal-lg { max-width: 900px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 15.5px; font-weight: 650; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld-wide { grid-column: 1 / -1; }
.fld > span { font-size: 12px; color: var(--text-2); font-weight: 500; }
.fld em { color: var(--danger); font-style: normal; }
.fld input, .fld textarea { font-size: 12.5px; padding: 8px 10px; }

.color-input { display: flex; gap: 8px; align-items: center; }
.color-input input[type="color"] {
  width: 44px; height: 34px; padding: 2px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); cursor: pointer; flex-shrink: 0;
}
.color-input input[type="text"], .color-input input:not([type]) { flex: 1; }

.swatch-upload {
  border: 1.5px dashed var(--border-2); border-radius: var(--radius-sm);
  min-height: 112px; display: grid; place-items: center;
  background: var(--surface-2); cursor: pointer; overflow: hidden;
  transition: border-color .16s, background .16s;
}
.swatch-upload:hover { border-color: var(--brand-400); background: var(--brand-50); }
.swatch-upload img { width: 100%; max-height: 200px; object-fit: contain; }
.swatch-empty { font-size: 12px; color: var(--text-3); padding: 18px; text-align: center; }

/* 记录详情 */
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.detail-item { background: var(--surface-2); border-radius: var(--radius-sm); padding: 11px 13px; }
.detail-item .dl { font-size: 10.5px; color: var(--text-4); margin-bottom: 3px; }
.detail-item .dv { font-size: 12.5px; font-weight: 500; word-break: break-all; }
.detail-prompt {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: 12.5px; line-height: 1.75;
  white-space: pre-wrap; margin-bottom: 16px;
  border-left: 3px solid var(--brand-400); color: var(--text-2);
}
.detail-imgs {
  /* auto-fill 而不是 auto-fit：图少时不会被拉满整个弹窗 */
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; margin-top: 14px;
}
.detail-imgs img {
  width: 100%; max-height: 340px;
  object-fit: contain; background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border); display: block;
}

/* ================= 登录界面 ================= */
.login-screen {
  position: fixed; inset: 0; z-index: 500;
  background: linear-gradient(155deg, #fffdf2 0%, #fff8dd 45%, #fff1bd 100%);
  display: grid; place-items: center; padding: 24px;
}
.login-box {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px 32px; width: 100%; max-width: 360px;
  text-align: center;
  animation: modalIn .3s cubic-bezier(.2, .8, .3, 1);
}
.brand-mark.lg {
  width: 50px; height: 50px; border-radius: 14px; margin: 0 auto 16px;
  font-size: 23px;
}
.login-box h2 { font-size: 18px; font-weight: 650; letter-spacing: .3px; }
.login-sub { font-size: 12.5px; color: var(--text-3); margin: 6px 0 24px; }
.login-box input {
  width: 100%; padding: 11px 13px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; text-align: center; letter-spacing: 1.5px;
}
.login-box .btn-primary { width: 100%; margin: 0 0 14px; }
.login-err {
  font-size: 12.5px; color: var(--danger);
  background: var(--danger-bg); border-radius: var(--radius-xs);
  padding: 8px 11px; margin-bottom: 12px;
}
.login-access {
  margin-top: 4px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-3); text-align: left; line-height: 1.7;
}
.login-access .la-title {
  font-size: 11px; color: var(--text-4); margin-bottom: 7px; letter-spacing: .4px;
}
.login-access .la-url {
  position: relative; display: block;
  font-family: var(--mono);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 6px 9px; margin-bottom: 6px;
  color: var(--brand-600); font-size: 11.5px; word-break: break-all;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.login-access .la-url:hover { border-color: var(--brand-400); background: var(--brand-50); }
.login-access .la-primary {
  border-color: var(--brand-400); background: var(--brand-50); font-weight: 600;
}
.login-access .la-primary::after {
  content: '推荐';
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  font-size: 9.5px; color: var(--brand-600);
  background: var(--surface); border: 1px solid var(--brand-200);
  border-radius: 8px; padding: 0 6px; font-weight: 500;
}
.login-access .la-hint { font-size: 11px; color: var(--text-4); margin-top: 8px; line-height: 1.6; }

/* ================= Toast ================= */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff;
  padding: 11px 20px; border-radius: 9px;
  font-size: 13px; z-index: 400; box-shadow: var(--shadow-lg);
  animation: toastIn .24s cubic-bezier(.2, .8, .3, 1);
  max-width: 82vw; text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ================= 灯箱（全图预览 + 缩放） ================= */
.lightbox {
  position: fixed; inset: 0; z-index: 450;
  background: rgba(20, 16, 10, .95);
  display: flex; flex-direction: column;
  animation: fadeIn .18s ease;
}
.lb-top {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; flex-shrink: 0;
  color: #fff;
}
.lb-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lb-btn {
  min-width: 32px; height: 32px; padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: 9px; color: #fff; font-size: 13px; line-height: 1;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: background .15s, border-color .15s, opacity .15s;
  text-decoration: none; white-space: nowrap;
}
.lb-btn:hover { background: rgba(255, 255, 255, .2); text-decoration: none; }
.lb-btn:disabled { opacity: .35; cursor: default; }
.lb-btn.primary { background: var(--brand-500); border-color: var(--brand-500); color: var(--on-brand); font-weight: 600; }
.lb-btn.primary:hover { background: var(--brand-400); }
.lb-zoom-val {
  min-width: 54px; text-align: center;
  font-size: 12.5px; color: rgba(255, 255, 255, .72);
  font-variant-numeric: tabular-nums;
}
.lb-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 10px 26px 20px;
  cursor: zoom-in; touch-action: none;
}
.lb-stage.zoomed { cursor: grab; }
.lb-stage.dragging { cursor: grabbing; }
.lb-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
  transform-origin: center center;
  user-select: none; -webkit-user-drag: none;
  transition: transform .18s cubic-bezier(.2, .8, .3, 1);
}
.lb-stage img.instant { transition: none; }
.lb-foot {
  flex-shrink: 0; text-align: center;
  font-size: 11.5px; color: rgba(255, 255, 255, .45);
  padding: 0 16px 12px;
}
@media (max-width: 640px) {
  .lb-btn span { display: none; }
  .lb-btn { min-width: 32px; padding: 0 9px; }
  .lb-stage { padding: 0 12px 12px; }
}

/* ================= 响应式 ================= */
@media (max-width: 1180px) {
  .studio-grid { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
  .result-area { min-height: 420px; }
}
@media (max-width: 720px) {
  main { padding: 16px 14px 40px; }
  .topbar { padding: 0 14px; gap: 14px; }
  .brand-text p { display: none; }
  .status-text { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .page { padding: 16px 15px 18px; }
  .page-head-actions { width: 100%; }
  .page-head-actions input[type="search"] { flex: 1; width: auto; }
}

/* 空状态引导卡片 */
.empty-tips {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 22px; flex-wrap: wrap;
}
.et-item {
  text-align: left; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; min-width: 168px; max-width: 210px;
}
.et-item b {
  display: block; font-size: 12.5px; color: var(--brand-700);
  font-weight: 650; margin-bottom: 3px;
}
.et-item span {
  font-size: 11px; color: var(--text-3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 结果图加载不出来时的占位（服务端会后台重试，这里给出可操作的重试入口） */
.result-card.img-failed {
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 8px, var(--surface-3) 8px, var(--surface-3) 16px);
}
.result-card.img-failed img { display: none; }
.result-card.img-failed .img-fail-tip,
.record-card.img-failed .img-fail-tip {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 14px; gap: 6px;
  background: rgba(251, 248, 241, .92);
}
.record-card.img-failed .img-fail-tip { inset: 0 0 auto; aspect-ratio: 3/4; }
.img-fail-tip .if-icon { font-size: 20px; opacity: .8; }
.img-fail-tip .if-text { font-size: 11.5px; color: var(--text-2); line-height: 1.5; }
.img-fail-tip .if-sub { font-size: 10.5px; color: var(--text-4); }
.if-retry {
  margin-top: 2px; padding: 5px 12px; border-radius: 14px;
  background: var(--brand-500); color: var(--on-brand);
  font-size: 11.5px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 190, 0, .3);
  transition: transform .14s, box-shadow .14s;
}
.if-retry:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255, 190, 0, .4); }
.result-card { position: relative; }

/* ================= 后台生成悬浮提示 ================= */
.gen-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 320;
  display: flex; align-items: center; gap: 10px;
  min-width: 208px; padding: 11px 15px 11px 12px;
  background: var(--surface);
  border: 1px solid var(--brand-200);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .26s cubic-bezier(.2, .8, .3, 1);
}
.gf-icon {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 15px;
  background: var(--brand-50); border: 1px solid var(--brand-100);
  animation: gfPulse 1.8s ease-in-out infinite;
}
@keyframes gfPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.gf-body { min-width: 0; flex: 1; }
.gf-text { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.gf-track {
  height: 4px; margin-top: 6px; border-radius: 3px;
  background: var(--surface-3); overflow: hidden;
}
.gf-bar {
  height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-500));
  transition: width .4s ease;
}
@media (max-width: 720px) {
  .gen-float { right: 12px; bottom: 12px; left: 12px; min-width: 0; }
}

/* ================= 工作流（模块）区 ================= */
.wf-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 17px 20px 19px;
  margin-bottom: 20px;
}
.wf-bar-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 13px; gap: 14px; flex-wrap: wrap;
}
.wf-bar-title {
  font-size: 12px; font-weight: 650; letter-spacing: .7px;
  color: var(--text-2); text-transform: uppercase;
}
.wf-bar-sub { font-size: 13px; color: var(--text-3); margin-top: 3px; }

.wf-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 11px;
}
.wf-card {
  display: flex; align-items: flex-start; gap: 11px;
  text-align: left; padding: 13px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
  cursor: pointer;
}
.wf-card:hover:not(:disabled) {
  border-color: var(--border-2); background: var(--surface);
  box-shadow: var(--shadow-xs); transform: translateY(-1px);
}
.wf-card.active {
  border-color: var(--brand-400); background: var(--brand-50);
  box-shadow: 0 0 0 2px var(--brand-100);
}
.wf-card:disabled { cursor: not-allowed; opacity: .62; }
.wf-card.soon { background: var(--surface-3); }

.wf-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 9px; background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 15px; color: var(--text-2);
  transition: all .16s;
}
.wf-card.active .wf-icon {
  background: var(--brand-500); border-color: var(--brand-500);
  color: var(--on-brand);
}
.wf-card:disabled .wf-icon { background: var(--surface-2); color: var(--text-4); }

.wf-info { min-width: 0; flex: 1; }
.wf-name {
  display: block;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  margin-bottom: 3px;
}
.wf-card.active .wf-name { color: var(--brand-700); }
.wf-tag-soon {
  display: inline-block; font-style: normal; font-size: 10px; font-weight: 500;
  padding: 0 6px; border-radius: 8px; margin-left: 6px;
  background: var(--surface); color: var(--text-4);
  border: 1px solid var(--border); vertical-align: 1px;
}
.wf-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 11.5px; color: var(--text-3); line-height: 1.5;
  min-height: 34px;
}
.wf-empty {
  grid-column: 1 / -1; text-align: center;
  padding: 24px; color: var(--text-3); font-size: 12.5px;
}

/* ================= 多配色选择（SKU 多色图） ================= */
.chip-order {
  display: grid; place-items: center;
  width: 15px; height: 15px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand-500); color: var(--on-brand);
  font-size: 9.5px; font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* 配色清单：顺序即画面排列顺序 */
.pal-list { margin-top: 7px; display: flex; flex-direction: column; gap: 5px; }
.pal-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--brand-700);
}
.pal-idx {
  width: 15px; height: 15px; flex-shrink: 0;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-500); color: var(--on-brand);
  font-size: 9.5px; font-weight: 650;
}
.pal-dot {
  width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, .12);
  overflow: hidden; background-size: cover; background-position: center;
}
.pal-dot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pal-name { font-weight: 600; }
.pal-meta {
  color: var(--text-3); font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

/* ================= 多任务工作区 ================= */
.tasks-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 16px 19px 10px;
  border-top: 1px solid var(--border);
}
.tasks-head h2 {
  font-size: 12px; font-weight: 650; letter-spacing: .7px;
  color: var(--text-2); text-transform: uppercase;
}
.tasks-head .hint { margin-top: 4px; }

.task-list { padding: 0 14px 4px; display: flex; flex-direction: column; gap: 10px; }

.task-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); overflow: hidden;
  transition: border-color .16s, box-shadow .16s;
}
.task-card:hover { border-color: var(--border-2); }
.task-card.is-active { border-color: var(--brand-300); box-shadow: 0 0 0 2px var(--brand-50); }
.task-card.running { border-color: var(--brand-400); }

.task-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.task-card.folded .task-head { border-bottom: none; }
.task-idx {
  width: 19px; height: 19px; flex-shrink: 0;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2);
  font-size: 10.5px; font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.task-card.is-active .task-idx { background: var(--brand-500); color: var(--on-brand); }
.task-title { flex: 1; min-width: 0; }
.task-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); }
.task-sub {
  display: block; font-size: 10.5px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.task-head .icon-btn {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 5px; color: var(--text-4); font-size: 12px;
  line-height: 1; display: grid; place-items: center;
}
.task-head .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.task-fold { font-size: 11px; }

.task-body { padding: 12px 12px 13px; }
.task-card.folded .task-body { display: none; }

.mini-block + .mini-block { margin-top: 14px; }
.mini-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 7px;
  font-size: 11.5px; font-weight: 600; color: var(--text-2);
}
.mini-head .counter { font-weight: 400; }

.dropzone.sm { padding: 13px 10px; }
.dropzone.sm .dz-icon { width: 26px; height: 26px; font-size: 15px; line-height: 24px; margin-bottom: 6px; }
.dropzone.sm .dz-title { font-size: 12px; }
.dropzone.sm .dz-sub { font-size: 10.5px; }

.task-card .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; margin-top: 8px; }
.task-card .thumb-idx { font-size: 9px; padding: 0 4px; }
.task-card .thumb-x { width: 15px; height: 15px; font-size: 9px; line-height: 15px; }

.task-card textarea { font-size: 12.5px; padding: 8px 10px; }
.task-card .chips { margin-top: 8px; gap: 5px; }
.task-card .chip { font-size: 10.5px; padding: 3px 8px; }
.task-card .fabric-picker { gap: 6px; }
.task-card .chip-fabric { font-size: 11px; padding: 3px 9px 3px 3px; }
.task-card .chip-swatch { width: 30px; height: 30px; border-radius: 8px; }
.task-card .fabric-preview { font-size: 11px; padding: 8px 10px; margin-top: 8px; }
.task-card .qty-presets button { padding: 2px 8px; font-size: 11px; }
.task-card .check-row { margin-top: 9px; font-size: 11.5px; }

.task-gen { width: 100%; margin-top: 13px; padding: 7px; font-size: 12px; }
.task-gen:disabled { opacity: .55; cursor: not-allowed; }

.gen-bar {
  display: flex; flex-direction: column; gap: 8px;
  padding: 15px 19px 6px;
}
.gen-bar .btn-primary { width: 100%; margin: 0; }
.gen-bar .btn-ghost { width: 100%; padding: 9px; font-size: 12.5px; }
.gen-bar .btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

/* ================= 结果分组 ================= */
.result-groups { display: flex; flex-direction: column; gap: 26px; }
.result-group + .result-group { border-top: 1px solid var(--border); padding-top: 22px; }

.rg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.rg-badge {
  font-size: 11.5px; font-weight: 650;
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid var(--brand-100);
  padding: 2px 9px; border-radius: 11px;
}
.rg-meta { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rg-head .btn-ghost { margin-left: auto; }
.rg-prompt {
  font-size: 11.5px; color: var(--text-3); line-height: 1.6;
  margin-bottom: 11px; padding-left: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rg-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.rg-grid .result-skeleton { aspect-ratio: 3/4; }

/* ================= 详情页文案区 ================= */
.tasks-head-actions { display: flex; gap: 6px; flex-shrink: 0; }

.mini-input {
  width: 100%; padding: 6px 9px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 12px; color: var(--text);
  transition: border-color .16s, box-shadow .16s;
}
.mini-input + .mini-input { margin-top: 6px; }
.mini-input::placeholder { color: var(--text-4); }
.mini-input:focus {
  outline: none; border-color: var(--brand-400);
  box-shadow: 0 0 0 2px var(--brand-50);
}

.pos-seg { display: flex; gap: 4px; margin-top: 7px; }
.pos-seg button {
  flex: 1; padding: 4px 0;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); color: var(--text-3);
  font-size: 11px; transition: all .15s;
}
.pos-seg button:hover { border-color: var(--brand-300); color: var(--brand-700); }
.pos-seg button.active {
  background: var(--brand-50); border-color: var(--brand-400);
  color: var(--brand-700); font-weight: 600;
}

/* 详情页任务卡里的参考图展示稍矮，给文案区腾空间 */
.task-card .text-block .mini-head .counter { font-size: 10px; }

/* ================= 任务卡内的操作方式 ================= */
.seg.sm { padding: 2px; gap: 2px; }
.seg.sm .seg-btn { padding: 4px 2px; font-size: 11px; border-radius: 5px; }
.mode-block .hint { margin-top: 7px; font-size: 11px; line-height: 1.55; }

/* ================= 详情图：独立下载按钮 ================= */
.di-wrap { position: relative; line-height: 0; }
.di-wrap img { cursor: zoom-in; }
.di-dl {
  position: absolute; right: 6px; bottom: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(28, 22, 12, .66);
  color: #fff; font-size: 13px; line-height: 1;
  display: grid; place-items: center;
  text-decoration: none; opacity: .85;
  transition: background .15s, opacity .15s, transform .15s;
}
.di-dl:hover {
  background: var(--brand-600); opacity: 1; transform: translateY(-1px);
}

/* ================= 灯箱内下载按钮（新结构用 .lb-btn） ================= */


/* ================= 左侧导航 ================= */
.sidebar {
  width: 238px; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #fffdf8 0%, #fdfaf3 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 16px 12px 12px;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 6px; }

.sb-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 16px; }
.sb-brand .brand-mark { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
.sb-brand h1 { font-size: 13.5px; font-weight: 650; }
.sb-brand p { font-size: 10.5px; color: var(--text-3); margin-top: -1px; }

.sb-nav { display: flex; flex-direction: column; gap: 3px; }

.sb-cat-btn {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text);
  text-align: left; transition: background .15s;
}
.sb-cat-btn:hover { background: var(--surface-2); }
.sb-caret { margin-left: auto; font-size: 11px; color: var(--text-4); transition: transform .18s; }
.sb-cat.active > .sb-cat-btn { background: var(--brand-50); }
.sb-cat.collapsed .sb-caret { transform: rotate(-90deg); }
.sb-cat.collapsed .sb-sub { display: none; }

.sb-sub {
  display: flex; flex-direction: column; gap: 1px;
  margin: 3px 0 4px 9px; padding-left: 9px;
  border-left: 1px solid var(--border);
}
.sb-sub-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 9px; border-radius: 7px;
  font-size: 12.5px; color: var(--text-2); text-align: left;
  transition: background .15s, color .15s;
}
.sb-sub-item:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.sb-sub-item.active {
  background: var(--brand-500); color: var(--on-brand); font-weight: 650;
  box-shadow: 0 2px 8px rgba(255, 190, 0, .35);
}
.sb-sub-item:disabled { color: var(--text-4); cursor: not-allowed; }
.sb-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
  background: currentColor; opacity: .4;
}
.sb-sub-item.active .sb-dot { opacity: 1; }
.sb-sub-label { flex: 1; min-width: 0; }
.sb-soon {
  font-size: 9.5px; padding: 0 5px; border-radius: 6px;
  background: var(--surface-3); color: var(--text-4); flex-shrink: 0;
}

.sb-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-2); text-align: left;
  transition: background .15s, color .15s;
}
.sb-item:hover { background: var(--surface-2); color: var(--text); }
.sb-item.active { background: var(--brand-500); color: var(--on-brand); font-weight: 650; }

.sb-ico { width: 15px; text-align: center; font-size: 12.5px; opacity: .7; flex-shrink: 0; }
.sb-divider { height: 1px; background: var(--border); margin: 10px 6px; }
.sb-empty { padding: 10px 12px; font-size: 11.5px; color: var(--text-4); }

.sb-foot {
  margin-top: auto; padding-top: 13px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.sb-status { display: flex; align-items: center; gap: 7px; padding: 0 4px; }
.sb-foot .btn-ghost { width: 100%; }

/* 模块标题 */
.studio-head { margin-bottom: 16px; }
.studio-head h2 { font-size: 19px; font-weight: 650; letter-spacing: .2px; }
.studio-head p { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }

@media (max-width: 980px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 10px;
    padding: 9px 14px; border-right: none; border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .sb-brand { padding: 0; flex-shrink: 0; gap: 8px; }
  .sb-brand p { display: none; }
  .sb-nav {
    flex: 1; min-width: 0;
    flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 4px;
    overflow-x: auto; scrollbar-width: none;
  }
  .sb-nav::-webkit-scrollbar { display: none; }
  .sb-cat { position: relative; flex-shrink: 0; }
  /* 横排时不能沿用 100% 宽度，否则会把条目撑开 */
  .sb-cat-btn, .sb-item { width: auto; white-space: nowrap; padding: 7px 10px; }
  .sb-sub {
    position: absolute; top: 100%; left: 0; z-index: 30;
    margin: 6px 0 0; padding: 6px; min-width: 172px;
    background: var(--surface); border: 1px solid var(--border);
    border-left: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow);
  }
  .sb-divider { display: none; }
  .sb-foot {
    margin: 0; border: none; padding: 0; flex-shrink: 0;
    flex-direction: row; align-items: center; gap: 6px;
  }
  .sb-status, .sb-sign { display: none; }
  .sb-foot .btn-ghost { width: auto; padding: 5px 10px; font-size: 11.5px; }
  main { padding: 18px 16px 40px; }
  .panel { position: static; max-height: none; }
}

/* ================= 香蕉主题细节 ================= */
/* 空状态图标：黄底 + 香蕉 */
.empty-icon {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  opacity: 1;
  font-size: 28px;
}

/* 侧栏图标：emoji 不需要降透明度 */
.sb-ico { opacity: 1; font-size: 13px; }
.sb-cat-btn .sb-ico { font-size: 14px; }

/* 侧栏签名 */
.sb-sign {
  font-size: 10.5px; color: var(--text-4);
  text-align: center; padding: 2px 0 0; letter-spacing: .2px;
}

/* 登录页漂浮香蕉 */
.login-box { position: relative; }
.login-banana {
  position: absolute; font-size: 26px; opacity: .9;
  filter: drop-shadow(0 4px 10px rgba(255, 190, 0, .45));
  pointer-events: none;
}
.login-banana.b1 { top: -14px; left: 18px; transform: rotate(-22deg); }
.login-banana.b2 { top: 6px; right: -10px; transform: rotate(18deg); font-size: 20px; opacity: .75; }

/* 主按钮加一点香蕉感：左侧小图标空隙 */
.gen-bar .btn-primary .btn-label::before { content: "🍌 "; }

/* 选中态的文字也保持深色可读 */
.chip-fabric.active { color: var(--on-brand); }
.chip-fabric.active .chip-swatch { border-color: rgba(0, 0, 0, .18); }
.cat-chip.active { color: var(--on-brand); }

/* 模板子项图标 */
.sb-wf-ico {
  width: 16px; text-align: center; font-size: 12.5px;
  flex-shrink: 0; line-height: 1;
  filter: saturate(.9);
}
.sb-sub-item.active .sb-wf-ico { filter: none; }

/* 其他模块仍在生成时的提示条 */
.other-running {
  margin-top: 14px; padding: 9px 13px;
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  font-size: 11.5px; color: var(--brand-700); line-height: 1.5;
}

/* 记录详情弹窗里单张图加载不出来时的占位 */
.di-wrap .di-fail {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 8px; text-align: center;
  background: var(--surface-2); border: 1px dashed var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 10.5px; color: var(--text-3); line-height: 1.4;
}
.di-wrap .di-fail button {
  padding: 3px 10px; border-radius: 11px;
  background: var(--brand-500); color: var(--on-brand);
  font-size: 10.5px; font-weight: 600;
}
.di-wrap { position: relative; }


/* ================= 继续修改弹窗 ================= */
.refine-src {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.refine-src img {
  width: 108px; height: 108px; object-fit: cover;
  border-radius: 9px; border: 1px solid var(--border); background: #fff;
  flex-shrink: 0;
}
.refine-src-meta { min-width: 0; }
.refine-src-meta b { font-size: 12.5px; color: var(--brand-700); }
.refine-src-meta span { font-size: 11px; color: var(--text-4); margin-left: 6px; }
.refine-src-meta p { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin-top: 5px; }
.refine-hint {
  margin-top: 12px; font-size: 11px; color: var(--text-3); line-height: 1.6;
}
.refine-hint b { color: var(--text-2); font-weight: 600; }
.refine-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.refine-chips .chip { font-size: 11px; }

/* ================= 提示词收藏 ================= */
.prompt-tools { display: flex; align-items: center; gap: 8px; }
.mini-link {
  font-size: 11px; color: var(--text-3); font-weight: 500;
  padding: 2px 6px; border-radius: 6px; white-space: nowrap;
  transition: color .15s, background .15s;
}
.mini-link:hover { color: var(--brand-700); background: var(--brand-50); }
.mini-link .pn {
  display: inline-block; min-width: 14px; margin-left: 3px;
  padding: 0 4px; border-radius: 8px;
  background: var(--surface-3); color: var(--text-3);
  font-size: 9.5px; line-height: 14px; text-align: center;
}
.mini-link .pn.has { background: var(--brand-500); color: var(--on-brand); font-weight: 700; }

.pl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pl-head input { flex: 1; }
.pl-count { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.pl-list { display: flex; flex-direction: column; gap: 9px; max-height: 52vh; overflow-y: auto; }
.pl-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 11px 13px;
  transition: border-color .15s, background .15s;
}
.pl-item:hover { border-color: var(--brand-300); background: var(--brand-50); }
.pl-text {
  font-size: 12.5px; line-height: 1.65; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pl-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pl-meta { font-size: 10.5px; color: var(--text-4); margin-right: auto; }
.pl-btn {
  padding: 4px 11px; border-radius: 12px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2);
  transition: all .15s;
}
.pl-btn:hover { border-color: var(--brand-400); color: var(--brand-700); }
.pl-btn.use { background: var(--brand-500); border-color: var(--brand-500); color: var(--on-brand); }
.pl-btn.use:hover { background: var(--brand-400); color: var(--on-brand); }
.pl-btn.del:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.pl-empty { text-align: center; padding: 34px 18px; color: var(--text-3); font-size: 12.5px; line-height: 1.8; }
.pl-empty b { color: var(--brand-700); }
.prompt-dirty { border-color: var(--brand-400) !important; }

/* 可放大的小图：放大镜光标 + 轻微描边提示 */
.thumb img,
.chip-swatch img,
.fc-swatch img,
.di-wrap img { cursor: zoom-in; }
.chip-swatch:hover { border-color: var(--brand-400); box-shadow: 0 0 0 2px var(--brand-100); }

/* ================= 本模块历史生成 ================= */
.history {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px dashed var(--border-2);
}
.history-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.history-head h3 { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.hist-tag {
  font-size: 10px; font-weight: 500; color: var(--brand-700);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  padding: 1px 7px; border-radius: 8px;
}
.hist-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.history-actions { display: flex; align-items: center; gap: 12px; }

.hist-empty {
  padding: 26px 18px; text-align: center;
  font-size: 12px; color: var(--text-3); line-height: 1.8;
  background: var(--surface-2); border: 1px dashed var(--border-2);
  border-radius: var(--radius-sm);
}

/* ================= 历史生成：卡片式记录 ================= */
.rhist-list { display: flex; flex-direction: column; gap: 14px; }

.rhist {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 13px 14px 11px;
  transition: border-color .16s, box-shadow .16s;
}
.rhist:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }

.rhist-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.rhist-avatar {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 13px;
  background: var(--brand-50); border: 1px solid var(--brand-100);
}
.rhist-who { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rhist-who b { font-size: 12.5px; color: var(--text); font-weight: 650; }
.rhist-who span { font-size: 11px; color: var(--text-4); }
.rhist-badge {
  font-size: 10.5px; color: var(--text-3);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 9px; white-space: nowrap;
}
.rhist-badge.failed { color: var(--danger); background: var(--danger-bg); border-color: #f5c9c9; }

.rhist-prompt {
  font-size: 12.5px; line-height: 1.65; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; cursor: pointer;
}
.rhist-prompt.open { -webkit-line-clamp: unset; display: block; }

.rhist-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 10px; }
.rm {
  font-size: 10.5px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 7px; font-family: var(--mono);
}
.rm.fabric { font-family: var(--font); color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-100); }

.rhist-body { display: flex; gap: 11px; align-items: flex-start; }
.rhist-refs { width: 156px; flex-shrink: 0; }
.rr-label { display: block; font-size: 10px; color: var(--text-4); margin-bottom: 5px; }
.rr-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px;
}
.rr-grid img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface-3); cursor: zoom-in; display: block;
}
.rhist-results { flex: 1; min-width: 0; }
.rr-grid-res {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 7px;
}
.rr-grid-res img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-3); cursor: zoom-in; display: block;
  transition: transform .2s;
}
.rr-grid-res img:hover { transform: translateY(-2px); }
.rhist-noimg {
  padding: 22px; text-align: center; font-size: 11.5px; color: var(--text-3);
  background: var(--surface-2); border: 1px dashed var(--border-2); border-radius: 8px;
}

.rhist-actions {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border);
}
.ract {
  padding: 4px 11px; border-radius: 13px;
  border: 1px solid var(--border-2); background: var(--surface);
  font-size: 11px; color: var(--text-2); font-weight: 500;
  transition: all .15s;
}
.ract:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50); }
.ract.primary { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); font-weight: 600; }
.ract.primary:hover { background: var(--brand-500); border-color: var(--brand-500); color: var(--on-brand); }

@media (max-width: 720px) {
  .rhist-body { flex-direction: column; }
  .rhist-refs { width: 100%; }
  .rr-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 详情页：模板尺寸 / 出图画幅提示 */
.tpl-hint {
  margin-top: 6px !important;
  padding: 6px 9px;
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: 7px; color: var(--brand-700) !important;
  font-size: 10.5px !important; line-height: 1.55;
}
.tpl-hint b { font-weight: 650; font-variant-numeric: tabular-nums; }

/* ================= 评语生成 ================= */
.review-grid {
  display: grid; grid-template-columns: 380px minmax(0, 1fr);
  gap: 18px; align-items: start;
}
@media (max-width: 1180px) { .review-grid { grid-template-columns: 1fr; } }

.rv-panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); padding: 15px 16px 16px;
  position: sticky; top: 18px;
}
@media (max-width: 1180px) { .rv-panel { position: static; } }
.rv-block + .rv-block { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border-2); }
.rv-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 9px;
}
.rv-head-gap { margin-top: 12px; }
.rv-head .counter { font-weight: 500; font-size: 11px; color: var(--text-3); }
.rv-extra { margin-top: 14px; }
.rv-extra input { font-size: 12.5px; }
.rv-go { width: 100%; margin-top: 16px; }
.rv-status { text-align: center; margin-top: 8px; min-height: 16px; }

.rv-result {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 18px 18px 20px; min-height: 420px;
}
.rv-empty { text-align: center; padding: 56px 20px; }
.rv-empty .empty-title { font-size: 15px; font-weight: 650; margin-top: 10px; }
.rv-empty .empty-sub { font-size: 12.5px; color: var(--text-3); margin-top: 6px; line-height: 1.8; max-width: 420px; margin-left: auto; margin-right: auto; }
.rv-empty .empty-icon { margin: 0 auto; }

.rv-analysis {
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px;
}
.rv-arow { display: flex; gap: 9px; font-size: 12px; line-height: 1.7; }
.rv-arow + .rv-arow { margin-top: 6px; }
.rv-arow b { color: var(--brand-700); font-weight: 600; flex-shrink: 0; }
.rv-arow span { color: var(--text-2); }
.rv-points { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.rv-point {
  font-size: 10.5px; padding: 1px 8px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--brand-200); color: var(--brand-700);
}

.rv-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rv-list-head h3 { font-size: 14px; font-weight: 650; }
.rv-list-actions { display: flex; align-items: center; gap: 12px; }
.rv-meta { font-size: 11px; color: var(--text-4); }

.rv-list { display: flex; flex-direction: column; gap: 12px; }
.rv-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 13px 15px 11px;
  transition: border-color .16s, box-shadow .16s;
}
.rv-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-xs); }
.rv-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.rv-idx {
  width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--brand-500); color: var(--on-brand);
  font-size: 10px; font-weight: 700;
}
.rv-angle { font-size: 10.5px; color: var(--text-3); }
.rv-len { margin-left: auto; font-size: 10px; color: var(--text-4); }
.rv-text {
  font-size: 13px; line-height: 1.85; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.rv-card-foot { display: flex; gap: 6px; margin-top: 10px; }
.rv-btn {
  padding: 3px 10px; border-radius: 11px; font-size: 11px;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2);
  transition: all .15s;
}
.rv-btn:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50); }
.rv-btn.done { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50); }

/* 登录页：公网地址区块 */
.la-title-pub { margin-top: 10px; color: var(--brand-700); }
.la-url.la-public {
  background: var(--brand-50); border-color: var(--brand-200);
  color: var(--brand-700); font-weight: 600;
}
