/* ============================================================
   studio.css — 工作台（studio.html）
   布局：左侧站点导航（复用 wb-rail）+ 顶栏 + 工作台切换 / 功能页签
        + 左参数表单 / 右展示区。全部流式单位，随视口伸缩。
   ============================================================ */

/* 视口固定布局：整页不滚，仅左侧参数栏内滚 */
.wb-content.st-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
}

.wb-main--studio {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wb-topbar { flex: 0 0 auto; }

.st-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

/* ---------------- 头行：工作台切换 + 功能页签 + 生成记录 ---------------- */

.st-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 1.4vw, 20px);
  padding: clamp(12px, 1.8vh, 18px) clamp(18px, 2.2vw, 30px) 0 0;
  margin-bottom: clamp(12px, 1.8vh, 18px);
}

/* 工作台切换（下拉） */
.ws-switch { position: relative; }

.ws-current {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--card);
  font: 600 15px/1 var(--font-sans);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 26px -18px rgba(20, 33, 60, 0.35);
  transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.ws-current:hover { border-color: var(--glow); }

.ws-current-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6f9dff);
}

.ws-current-icon .lucide { width: 16px; height: 16px; }
.ws-current-name {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.14em;
}
.ws-caret { width: 15px; height: 15px; color: var(--muted); transition: transform 0.35s var(--ease-out); }
.ws-switch.is-open .ws-caret { transform: rotate(180deg); }

.ws-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  animation: wsMenu 0.28s var(--ease-out);
}

@keyframes wsMenu {
  from { opacity: 0; transform: translateY(-6px); }
}

.ws-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: 500 14px/1.2 var(--font-sans);
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s;
}

.ws-opt .lucide { width: 16px; height: 16px; color: var(--muted); }
.ws-opt > span {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.14em;
}
.ws-opt:hover { background: var(--bg-soft); }
.ws-opt.is-active { color: var(--accent); }
.ws-opt.is-active .lucide { color: var(--accent); }
.ws-opt-check { margin-left: auto; }
.ws-opt:not(.is-active) .ws-opt-check { visibility: hidden; }
.ws-opt.is-soon { color: var(--muted); cursor: default; }
.ws-opt em {
  margin-left: auto;
  font: 400 11px/1 var(--font-sans);
  font-style: normal;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--bg-soft);
}

/* 功能页签（下划线式） */
.fn-tabs {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--hairline);
}

.fn-tabs::-webkit-scrollbar { display: none; }

.fn-tab {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 2px;
  border: 0;
  background: none;
  font: 500 14.5px/1 var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.3s;
}

.fn-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.fn-tab:hover { color: var(--ink); }
.fn-tab.is-active { color: var(--accent); font-weight: 600; }
.fn-tab.is-active::after { transform: scaleX(1); }
.fn-tab-x { width: 13px; height: 13px; color: var(--muted); }

.hist-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 11px;
  border: 1px solid var(--hairline);
  background: var(--card);
  font: 500 13.5px/1 var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.35s, color 0.35s;
}

.hist-btn .lucide { width: 15px; height: 15px; }
.hist-btn:hover { border-color: var(--glow); color: var(--accent); }

/* ---------------- 左右结构 ---------------- */

.st-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
}

/* 左：参数表单（贴边一体栏，仅栏内滚动，滚动条隐藏） */
.st-panel {
  flex: 0 0 clamp(320px, 24vw, 400px);
  min-width: 300px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge 旧版 */
  background: var(--card);
  border-right: 1px solid var(--hairline);
}

.st-panel::-webkit-scrollbar { display: none; }

.st-sec {
  padding: clamp(14px, 2vh, 20px) clamp(18px, 2vw, 26px);
  border-bottom: 1px solid var(--hairline);
}

.st-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.st-sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font: 600 14.5px/1.2 var(--font-sans);
  color: var(--ink);
}

.st-sec-head .st-sec-title { margin-bottom: 8px; }
.st-sec-title .lucide { width: 16px; height: 16px; color: var(--accent); }

.up-opt {
  margin-left: 6px;
  font: 400 11px/1 var(--font-sans);
  font-style: normal;
  color: var(--muted);
  padding: 3px 7px;
  border-radius: 99px;
  background: var(--bg-soft);
}

.up-opt.is-required {
  color: #9b5b00;
  background: rgba(255, 196, 77, 0.18);
}

.up-opt.is-choice {
  color: var(--accent);
  background: rgba(46, 107, 255, 0.1);
}

.st-sec-note {
  margin: 0 0 10px;
  font: 400 12px/1.7 var(--font-sans);
  color: var(--muted);
}

/* 上传 */
.up-block + .up-block { margin-top: 12px; }

.up-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.up-label { font: 500 13.5px/1 var(--font-sans); color: var(--ink); }
.up-tip { color: var(--muted); cursor: help; }
.up-tip .lucide { width: 14px; height: 14px; }

.up-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 18px 14px;
  border-radius: 13px;
  border: 1.5px dashed rgba(46, 107, 255, 0.32);
  background: var(--bg-soft);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease-out);
}

.up-zone:hover {
  border-color: var(--accent);
  background: rgba(46, 107, 255, 0.06);
  transform: translateY(-1px);
}

.up-zone.has-value {
  border-style: solid;
  border-color: rgba(46, 107, 255, 0.36);
  background: rgba(46, 107, 255, 0.05);
  padding: 0;
  min-height: 178px;
  overflow: hidden;
  align-items: stretch;
}

.up-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--card);
  box-shadow: 0 8px 18px -10px rgba(46, 107, 255, 0.5);
}

.up-icon .lucide { width: 19px; height: 19px; }
.up-main { font: 600 13.5px/1 var(--font-sans); color: var(--ink); }
.up-note { font: 400 11.5px/1.4 var(--font-sans); color: var(--muted); }

.st-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}

.st-switch-label {
  font: 500 12px/1 var(--font-sans);
  color: inherit;
}

.st-switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(46, 107, 255, 0.16);
  transition: background 0.3s ease;
}

.st-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px -6px rgba(20, 33, 60, 0.45);
  transition: transform 0.3s ease;
}

.st-switch.is-active { color: var(--accent); }
.st-switch.is-active .st-switch-track { background: var(--accent); }
.st-switch.is-active .st-switch-thumb { transform: translateX(16px); }

/* 视角图上传区：与产品参考图同宽同高（宽高 / 内距 / 间距全部继承 .up-zone） */
.up-zone-view-angle {
  align-items: center;
}

.up-preview {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
}

.up-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.up-zone-view-angle.has-value .up-icon { display: none; }

.up-zone.has-value .up-file-remove {
  z-index: 2;
}

/* 结构模板 */
.tpl-mode {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--bg-soft);
}

.tpl-mode-opt {
  padding: 5px 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  font: 500 12px/1 var(--font-sans);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.tpl-mode-opt.is-active { background: var(--card); color: var(--accent); box-shadow: 0 4px 10px -6px rgba(20, 33, 60, 0.35); }

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 236px;
  overflow-y: auto;
  padding-right: 2px;
}

.tpl-item {
  position: relative;
  border: 1.5px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-soft);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}

.tpl-item:hover { border-color: var(--glow); transform: translateY(-2px); }

.tpl-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  font: 600 13px/1 var(--font-serif);
  color: var(--muted);
  background:
    radial-gradient(90% 90% at 30% 20%, rgba(46, 107, 255, 0.1), transparent 60%),
    linear-gradient(150deg, var(--bg-soft), var(--bg-deep));
}

.tpl-name {
  display: block;
  padding: 5px 0;
  font: 500 11px/1 var(--font-sans);
  color: var(--ink-soft);
  text-align: center;
  background: var(--card);
}

.tpl-item.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 107, 255, 0.16); }
.tpl-item.is-active .tpl-name { color: var(--accent); font-weight: 600; }

.tpl-item .tpl-check {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
}

.tpl-item .tpl-check .lucide { width: 11px; height: 11px; }
.tpl-item.is-active .tpl-check { opacity: 1; transform: scale(1); }

/* 结构模板字段（打开模板库） */
.tpl-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: var(--bg-soft);
  font: 500 13px/1.4 var(--font-sans);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.tpl-field .lucide { width: 15px; height: 15px; flex: 0 0 auto; }
.tpl-field:hover { border-color: var(--accent); }
.tpl-field.has-value { color: var(--ink); border-color: var(--accent); background: rgba(46, 107, 255, 0.06); }

/* 字段与下拉 */
.fld + .fld { margin-top: 12px; }

.fld-label {
  display: block;
  margin-bottom: 7px;
  font: 500 13px/1 var(--font-sans);
  color: var(--ink);
}

.fld-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.fld-label-row .fld-label { margin-bottom: 0; }

.lib-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: none;
  font: 500 12px/1 var(--font-sans);
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.lib-btn .lucide { width: 13px; height: 13px; }
.lib-btn:hover { border-color: var(--accent); background: rgba(46, 107, 255, 0.07); }

.lib-modal[data-kind="view-angle"] .lib-dialog,
.lib-modal[data-kind="scene-target"] .lib-dialog {
  width: min(860px, 100%);
}

.lib-modal[data-kind="view-angle"] .lib-head,
.lib-modal[data-kind="scene-target"] .lib-head {
  margin-bottom: 18px;
}

.lib-angle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-height: min(66vh, 760px);
  overflow-y: auto;
  padding-right: 2px;
}

/* 风格库：纯文本 chip 流式排布 */
.lib-style-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: min(66vh, 760px);
  overflow-y: auto;
  padding: 2px;
}

.lib-style-chip {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
}

.lib-angle-item {
  position: relative;
  padding: 0;
  border: 1.5px solid var(--hairline);
  border-radius: 16px;
  background: var(--bg-soft);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}

.lib-angle-item:hover {
  border-color: var(--glow);
  transform: translateY(-2px);
}

.lib-angle-item.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 107, 255, 0.14);
}

.lib-angle-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, var(--bg-soft), var(--card));
}

.lib-angle-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-angle-mask {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(8, 16, 28, 0), rgba(8, 16, 28, 0.72));
}

.lib-angle-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 10px 11px;
  font: 500 13px/1.2 var(--font-sans);
  color: #fff;
  text-align: center;
  letter-spacing: 0.02em;
}

.lib-angle-check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.24s, transform 0.24s var(--ease-out);
}

.lib-angle-check .lucide { width: 13px; height: 13px; }
.lib-angle-item.is-active .lib-angle-check { opacity: 1; transform: scale(1); }

.st-select { position: relative; }

.st-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: var(--bg-soft);
  font: 500 13.5px/1 var(--font-sans);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.st-select-btn .lucide { width: 14px; height: 14px; color: var(--muted); transition: transform 0.3s; }
.st-select.is-open .st-select-btn { border-color: var(--accent); background: var(--card); }
.st-select.is-open .st-select-btn .lucide { transform: rotate(180deg); }

.st-select-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 5px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  animation: wsMenu 0.24s var(--ease-out);
}

.st-select-opt {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: 500 13px/1.2 var(--font-sans);
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.st-select-opt:hover { background: var(--bg-soft); color: var(--ink); }
.st-select-opt.is-active { color: var(--accent); font-weight: 600; }

/* 分段选择 */
.seg-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.seg-opt {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-soft);
  font: 500 13px/1 var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.seg-opt.is-active {
  border-color: var(--accent);
  background: rgba(46, 107, 255, 0.08);
  color: var(--accent);
  font-weight: 600;
}

.seg-shape { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; }
.seg-1-1 { width: 12px; height: 12px; }
.seg-4-3 { width: 15px; height: 11px; }

/* 补充说明 */
.st-textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: var(--bg-soft);
  font: 400 13px/1.7 var(--font-sans);
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}

.st-textarea:focus { border-color: var(--accent); background: var(--card); }
.st-textarea::placeholder { color: var(--muted); }

.st-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: var(--bg-soft);
  font: 400 13px/1.4 var(--font-sans);
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}

.st-input:focus {
  border-color: var(--accent);
  background: var(--card);
}

.st-input::placeholder {
  color: var(--muted);
}

.st-range {
  padding-top: 2px;
}

.st-range-input {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.range-value {
  font: 500 12px/1 var(--font-sans);
  color: var(--muted);
}

.range-value strong {
  color: var(--accent);
  font-weight: 600;
}

.st-chip-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.st-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.st-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--bg-soft);
  font: 500 12px/1.2 var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.st-chip:hover {
  border-color: rgba(46, 107, 255, 0.28);
  color: var(--ink);
}

.st-chip.is-active {
  border-color: rgba(46, 107, 255, 0.34);
  background: rgba(46, 107, 255, 0.1);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(46, 107, 255, 0.08);
}

/* 生成区（吸附栏底） */
.st-gen {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: clamp(14px, 2vh, 20px) clamp(18px, 2vw, 26px);
  background: var(--card);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -14px 30px -22px rgba(20, 33, 60, 0.35);
}

.st-gen-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font: 500 13px/1 var(--font-sans);
  color: var(--muted);
}

.st-gen-meta strong { font-size: 15px; color: var(--ink); }

.st-gen-btn {
  width: 100%;
  justify-content: center;
  gap: 8px;
  padding: 13px 0;
  font-size: 15px;
  border-radius: 12px;
  border: 0;
  outline: none;
  box-shadow: 0 12px 28px -12px rgba(46, 107, 255, 0.42);
}

.st-gen-btn:focus,
.st-gen-btn:focus-visible,
.st-gen-btn:active {
  outline: none;
  border: 0;
  box-shadow: 0 12px 28px -12px rgba(46, 107, 255, 0.42);
}

.st-gen-note {
  margin: 10px 0 0;
  text-align: center;
  font: 400 11px/1.5 var(--font-sans);
  color: var(--muted);
}

/* ---------------- 右：展示区（固定，无滚动） ---------------- */

.st-stage {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  margin: 0 clamp(18px, 2.2vw, 30px) clamp(14px, 2vh, 24px);
  border-radius: 20px;
  border: 1px solid var(--hairline);
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(46, 107, 255, 0.06), transparent 55%),
    var(--card);
  box-shadow: 0 18px 40px -30px rgba(20, 33, 60, 0.3);
  padding: clamp(14px, 2vw, 24px);
}

/* 使用说明：仅一张示意图，完整容纳不滚动 */
.stage-guide {
  height: 100%;
  display: grid;
  place-items: center;
}

.guide-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
}

.guide-head { text-align: center; margin-bottom: clamp(16px, 2.4vh, 26px); }

.guide-title {
  margin: 0 0 8px;
  font: 600 clamp(24px, 2.4vw, 32px)/1.2 var(--font-serif);
  letter-spacing: 0.06em;
  color: var(--ink);
}

.guide-sub {
  margin: 0;
  font: 400 clamp(12.5px, 1.1vw, 14px)/1.7 var(--font-sans);
  color: var(--muted);
}

.guide-figure {
  margin: 0 auto clamp(18px, 2.6vh, 28px);
  max-width: 78%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}

.guide-figure img { display: block; width: 100%; height: auto; }

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 22px);
  margin-bottom: clamp(16px, 2.4vh, 24px);
}

.guide-step {
  display: flex;
  gap: 12px;
  padding: clamp(12px, 1.4vw, 18px);
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--bg-soft);
}

.guide-step-no {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font: 600 13px/1 var(--font-serif);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6f9dff);
}

.guide-step strong { display: block; margin-bottom: 5px; font: 600 13.5px/1.3 var(--font-sans); color: var(--ink); }
.guide-step p { margin: 0; font: 400 12px/1.7 var(--font-sans); color: var(--muted); }

.guide-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(46, 107, 255, 0.07);
  border: 1px solid rgba(46, 107, 255, 0.16);
}

.guide-tip .lucide { flex: 0 0 auto; width: 16px; height: 16px; color: var(--accent); margin-top: 2px; }
.guide-tip p { margin: 0; font: 400 12.5px/1.7 var(--font-sans); color: var(--ink-soft); }

/* 筹备中占位 */
.stage-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 46vh;
  text-align: center;
}

.stage-soon-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  border-radius: 20px;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
}

.stage-soon-icon .lucide { width: 28px; height: 28px; }
.stage-soon-title { margin: 0 0 8px; font: 600 22px/1.3 var(--font-serif); letter-spacing: 0.05em; color: var(--ink); }
.stage-soon-sub { margin: 0; font: 400 13px/1.7 var(--font-sans); color: var(--muted); }

/* 褰撳墠鐗堟湰鏀逛负鍔ㄦ€佸姛鑳介瑙堬紝鍙充晶灞曠ず鍖烘寜 feature 娓叉煋 */
.stage-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stage-meta {
  display: none;
}

.stage-kicker {
  margin: 0;
  font: 600 11px/1.2 var(--font-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.stage-title {
  margin: 0;
  font: 600 clamp(24px, 2.35vw, 34px)/1.15 var(--font-serif);
  letter-spacing: 0.04em;
  color: var(--ink);
}

.stage-desc {
  max-width: 74ch;
  margin: 0;
  font: 400 clamp(13px, 1vw, 14px)/1.8 var(--font-sans);
  color: var(--muted);
}

.stage-showcase {
  flex: 1;
  min-height: 0;
  display: flex;
}

.preview-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: clamp(14px, 1.6vw, 18px);
}

.preview-layout-single {
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-layout-main,
.preview-layout-detail,
.preview-layout-variation {
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
}

.preview-spacer {
  min-width: 0;
}

.preview-layout-compare {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preview-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(25, 55, 110, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 249, 255, 0.96)),
    var(--card);
  box-shadow:
    0 22px 44px -34px rgba(20, 33, 60, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.preview-card-inputs,
.preview-card-source {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.preview-card-result {
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.preview-card-result-single {
  width: min(100%, 1320px);
  min-height: clamp(680px, 84vh, 1100px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.preview-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(46, 107, 255, 0.08);
  border: 1px solid rgba(46, 107, 255, 0.14);
  font: 600 11px/1 var(--font-sans);
  letter-spacing: 0.08em;
  color: var(--accent);
}

.preview-badge-accent {
  background: linear-gradient(135deg, rgba(46, 107, 255, 0.16), rgba(86, 150, 255, 0.1));
  border-color: rgba(46, 107, 255, 0.2);
}

.preview-mini-grid,
.preview-stack {
  display: grid;
  gap: 12px;
}

.preview-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preview-mini,
.preview-stack .preview-card {
  margin: 0;
}

.preview-mini {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--card);
}

.preview-mini img,
.preview-hero,
.preview-media {
  display: block;
  width: 100%;
}

.preview-mini img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.preview-mini figcaption {
  padding: 10px 12px 11px;
  font: 500 12px/1.3 var(--font-sans);
  color: var(--ink-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 248, 255, 0.98));
}

.preview-hero {
  flex: 1;
  min-height: 0;
  border-radius: 14px;
  object-fit: cover;
  background: var(--bg-soft);
}

.preview-hero-showcase {
  height: auto;
  max-height: min(86vh, 1120px);
  width: 100%;
  object-fit: contain;
  background: transparent;
}

.preview-card-result .preview-hero,
.preview-card-source .preview-hero {
  margin-top: 14px;
}

.preview-media {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: var(--bg-soft);
}

.preview-stack-variation {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preview-stack .preview-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.preview-caption {
  margin: 0;
  font: 400 12.5px/1.8 var(--font-sans);
  color: var(--ink-soft);
}

/* ---------------- 素材库弹窗 ---------------- */

.lib-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.lib-modal.is-open { visibility: visible; opacity: 1; }

.lib-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 34, 0.45);
  backdrop-filter: blur(6px);
}

.lib-dialog {
  position: relative;
  width: min(680px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.2vw, 26px);
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.35s var(--ease-out);
}

.lib-modal.is-open .lib-dialog { transform: none; }

.lib-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lib-title { margin: 0 0 5px; font: 600 19px/1.3 var(--font-serif); letter-spacing: 0.04em; color: var(--ink); }
.lib-sub { margin: 0; font: 400 12.5px/1.5 var(--font-sans); color: var(--muted); }

.lib-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  cursor: pointer;
}

.lib-close .lucide { width: 16px; height: 16px; }

.lib-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.lib-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 11px;
  border: 1px solid var(--hairline);
  background: var(--bg-soft);
  color: var(--muted);
}

.lib-search .lucide { width: 15px; height: 15px; }
.lib-search input {
  flex: 1;
  border: 0;
  background: none;
  font: 400 13px/1 var(--font-sans);
  color: var(--ink);
  outline: none;
}

.lib-chip {
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--bg-soft);
  font: 500 12px/1 var(--font-sans);
  color: var(--muted);
}

/* 弹窗主体（可滚）与底部确认栏 */
.lib-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.lib-tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 2px 2px 6px;
}

.lib-tpl-grid .tpl-thumb { aspect-ratio: 4 / 3; }
.lib-tpl-grid .tpl-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-tpl-grid .tpl-item { border-radius: 12px; }
.lib-tpl-grid .tpl-thumb { overflow: hidden; }

.lib-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.lib-foot-count { font: 500 13px/1 var(--font-sans); color: var(--ink-soft); }

.lib-foot-acts { display: flex; align-items: center; gap: 10px; }

.lib-foot-cancel {
  padding: 9px 18px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: none;
  font: 500 13px/1 var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
}

.lib-foot-cancel:hover { border-color: var(--glow); }

.lib-foot-ok { padding: 10px 22px; border-radius: 10px; font-size: 13.5px; }
.lib-foot-ok:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.lib-modal[data-kind="model"] .lib-dialog {
  width: min(1240px, 100%);
  max-height: 88vh;
}

.lib-modal[data-kind="model"] .lib-toolbar {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.lib-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lib-filter-row--model {
  flex-wrap: nowrap;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.lib-filter-chip {
  min-width: 72px;
  padding: 9px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--bg-soft);
  font: 500 13px/1 var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.lib-filter-chip:hover {
  border-color: rgba(46, 107, 255, 0.2);
  color: var(--ink);
}

.lib-filter-chip.is-active {
  border-color: rgba(46, 107, 255, 0.22);
  background: rgba(46, 107, 255, 0.08);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(46, 107, 255, 0.06);
}

.lib-model-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.06fr) minmax(380px, 0.94fr);
  gap: 18px;
  min-height: min(66vh, 760px);
}

.lib-model-browser,
.lib-model-detail {
  min-height: 0;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(46, 107, 255, 0.04), transparent 52%),
    var(--bg-soft);
}

.lib-model-browser {
  overflow: hidden;
  padding: 14px;
}

.lib-model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-height: min(66vh, 760px);
  overflow-y: auto;
  padding-right: 4px;
}

.lib-model-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--card);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.lib-model-card:hover {
  border-color: rgba(46, 107, 255, 0.16);
  box-shadow: 0 10px 22px -18px rgba(20, 33, 60, 0.28);
  transform: translateY(-1px);
}

.lib-model-card.is-active {
  border-color: rgba(46, 107, 255, 0.58);
  background: linear-gradient(180deg, rgba(46, 107, 255, 0.08), rgba(255, 255, 255, 0.98));
  box-shadow:
    0 0 0 2px rgba(46, 107, 255, 0.16),
    0 18px 30px -22px rgba(46, 107, 255, 0.42);
}

.lib-model-card.is-active .lib-model-thumb {
  box-shadow: inset 0 0 0 2px rgba(46, 107, 255, 0.38);
}

.lib-model-card.is-active .lib-model-card-meta strong {
  color: var(--accent);
}

.lib-model-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--card);
}

.lib-model-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.64);
  transform-origin: center top;
}

.lib-model-card[data-model-type="family"] .lib-model-thumb img {
  object-position: center top;
  transform: scale(1.3);
  transform-origin: center top;
}

.lib-model-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lib-model-card-meta strong {
  font: 600 12px/1.35 var(--font-sans);
  color: var(--ink);
}

.lib-model-card-meta span {
  font: 400 11px/1.35 var(--font-sans);
  color: var(--muted);
}

.lib-model-detail {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.lib-model-detail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -9px;
  width: 1px;
  background: var(--hairline);
}

.lib-model-preview-head {
  margin-bottom: 14px;
}

.lib-model-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.lib-model-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(46, 107, 255, 0.08);
  border: 1px solid rgba(46, 107, 255, 0.14);
  font: 600 11px/1 var(--font-sans);
  color: var(--accent);
}

.lib-model-preview-title {
  margin: 0 0 6px;
  font: 600 20px/1.25 var(--font-serif);
  color: var(--ink);
}

.lib-model-preview-sub {
  margin: 0;
  font: 400 12.5px/1.7 var(--font-sans);
  color: var(--muted);
}

.lib-model-preview-frame {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(20, 33, 60, 0.06);
}

.lib-model-preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background:
    radial-gradient(140% 120% at 50% 0%, rgba(46, 107, 255, 0.04), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 253, 0.98));
}

.lib-model-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

@media (max-width: 1080px) {
  .lib-modal[data-kind="model"] .lib-dialog {
    width: min(920px, 100%);
  }

  .lib-model-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .lib-model-detail {
    order: 1;
    padding: 18px 0 0;
  }

  .lib-model-browser {
    order: 2;
  }

  .lib-model-detail::before {
    top: -9px;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 1px;
  }

  .lib-model-preview-frame {
    max-height: 54vh;
  }

  .lib-model-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 38vh;
  }
}

@media (max-width: 720px) {
  .lib-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lib-filter-chip {
    min-width: auto;
    padding-inline: 14px;
  }
}

/* 模板库工具栏内单/多选 */
.lib-mode {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--bg-soft);
}

.lib-dialog .lib-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(30px, 6vh, 56px) 20px;
  text-align: center;
}

.lib-dialog .lib-empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 18px;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
}

.lib-dialog .lib-empty-icon .lucide { width: 26px; height: 26px; }
.lib-dialog .lib-empty-title { margin: 0 0 6px; font: 600 15px/1.4 var(--font-sans); color: var(--ink); }
.lib-dialog .lib-empty-sub { margin: 0; font: 400 12.5px/1.8 var(--font-sans); color: var(--muted); }

/* 轻量校验弹窗 */
.st-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

.st-alert-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.st-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 34, 0.4);
  backdrop-filter: blur(6px);
}

.st-alert-dialog {
  position: relative;
  width: min(420px, 100%);
  padding: 22px 22px 18px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}

.st-alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.st-alert-title {
  margin: 0;
  font: 600 18px/1.35 var(--font-serif);
  color: var(--ink);
  letter-spacing: 0.03em;
}

.st-alert-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  cursor: pointer;
}

.st-alert-close .lucide { width: 15px; height: 15px; }

.st-alert-text {
  margin: 0;
  font: 400 13px/1.8 var(--font-sans);
  color: var(--ink-soft);
}

.st-alert-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.st-alert-ok {
  min-width: 104px;
}

/* ---------------- 生成记录抽屉 ---------------- */

.hist-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  width: min(360px, 88vw);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-left: 1px solid var(--hairline);
  box-shadow: -24px 0 60px -30px rgba(20, 33, 60, 0.4);
  transform: translateX(102%);
  transition: transform 0.45s var(--ease-out);
}

.hist-drawer.is-open { transform: none; }

.hist-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--hairline);
}

.hist-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 600 16px/1.2 var(--font-sans);
  color: var(--ink);
}

.hist-title .lucide { width: 17px; height: 17px; color: var(--accent); }

.hist-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  cursor: pointer;
}

.hist-close .lucide { width: 15px; height: 15px; }

.hist-drawer-scroll { flex: 1; overflow-y: auto; padding: 16px 20px; }

.hist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 16px;
  text-align: center;
  font: 400 13px/1.8 var(--font-sans);
  color: var(--muted);
}

.hist-empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
}

.hist-empty-icon .lucide { width: 24px; height: 24px; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1280px) {
  .preview-layout-main,
  .preview-layout-detail,
  .preview-layout-variation {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .st-layout { flex-direction: column; }
  .st-panel { flex: 1 1 auto; width: 100%; min-width: 0; }
  .st-stage {
    margin: 0 clamp(12px, 4vw, 20px) clamp(16px, 4vw, 20px);
    min-height: 420px;
  }
  .lib-angle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .preview-layout,
  .preview-layout-compare,
  .preview-stack-variation {
    grid-template-columns: 1fr;
  }
  .stage-desc { max-width: none; }
}

@media (max-width: 640px) {
  .st-head {
    padding-right: 0;
    gap: 12px;
  }

  .lib-angle-grid {
    grid-template-columns: 1fr;
  }

  .st-stage {
    padding: 14px;
    border-radius: 16px;
  }

  .preview-card,
  .preview-card-inputs,
  .preview-card-source,
  .preview-card-result,
  .preview-stack .preview-card {
    padding: 14px;
  }

  .preview-mini-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-menu,
  .st-select-menu { animation: none; }
  .lib-modal,
  .lib-dialog,
  .hist-drawer { transition: none; }
}

/* ============================================================
   通用上传管理器：预览态 / 移除钮 / 拖拽高亮 / 校验弹窗条目
   ============================================================ */

/* 已上传文件：72px 缩略预览 */
.up-file-thumb {
  display: block;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--card);
}

.up-file-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 文件名截断 */
.up-file-name {
  max-width: 180px;
  font: 500 12.5px/1.4 var(--font-sans);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 右上移除钮 */
.up-file-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(20, 33, 60, 0.55);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.up-file-remove:hover {
  background: var(--accent);
}

.up-file-remove .lucide {
  width: 11px;
  height: 11px;
}

/* 拖拽悬停：宝蓝描边高亮 */
.up-zone.is-dragover {
  border-style: solid;
  border-color: var(--accent);
  background: rgba(46, 107, 255, 0.08);
}

/* 校验弹窗缺项条目 */
.st-alert-line {
  display: block;
  padding: 3px 0;
}

/* 日夜间 */
body.theme-night .up-file-remove {
  background: rgba(233, 238, 250, 0.25);
  color: var(--ink);
}

body.theme-night .up-file-remove:hover {
  background: var(--accent);
  color: #fff;
}

/* 减少动态偏好：校验弹窗直接显隐 */
@media (prefers-reduced-motion: reduce) {
  .st-alert-modal,
  .st-alert-dialog,
  .up-zone {
    transition: none;
  }
}
