:root {
  --bg: #ece8e1;
  --panel: #fbfaf7;
  --ink: #1a1714;
  --muted: #726b62;
  --line: #ddd6cc;
  --line-strong: #cfc6ba;
  --accent: #1a1714;
  --cta: #c45c26;
  --cta-hover: #a64b1e;
  --ok: #2f6b4f;
  --err: #b42318;
  --shadow: 0 1px 2px rgba(26, 23, 20, 0.06);
  --radius: 14px;
  --checker: repeating-conic-gradient(#e8e2d8 0% 25%, #f4efe7 0% 50%) 50% / 18px 18px;
  --font: "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
[hidden] { display: none !important; }

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #c45c26 0 46%, transparent 46% 54%, #1a1714 54%);
  flex-shrink: 0;
}
.topbar h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.topbar .sub {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.account-slot { flex-shrink: 0; }
.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #efeae3;
  border-radius: 999px;
  padding: 3px 6px 3px 12px;
}
.account-balance {
  font-size: 13px;
  font-weight: 650;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.account-name {
  font-size: 12px;
  color: var(--muted);
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-chip .btn-ghost { padding: 4px 8px; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(26, 23, 20, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-card {
  position: relative;
  width: min(360px, 100%);
  background: var(--panel);
  border-radius: 16px;
  padding: 28px 22px 18px;
  box-shadow: 0 16px 40px rgba(26, 23, 20, 0.18);
}
.modal-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 650;
}
.modal-card .lightbox-close {
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  font-size: 22px;
  background: #efeae3;
  color: var(--ink);
}
.modal-card .lightbox-close:hover { background: #e3ddd4; }
.mode-switch {
  display: flex;
  background: #efeae3;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.mode-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.mode-btn.active {
  background: var(--panel);
  color: var(--ink);
  font-weight: 650;
  box-shadow: var(--shadow);
}

.bench {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.rail {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.rail-scroll {
  flex: 1;
  overflow: auto;
  padding: 18px 18px 12px;
}
.rail-cta {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}
.stage.is-dock-open {
  grid-template-rows: auto minmax(0, 1fr) minmax(220px, 36%);
}
.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.stage-bar-left, .stage-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stage-meta {
  font-size: 12px;
  color: var(--muted);
}
.stage-gallery {
  padding: 16px;
  overflow: auto;
  overflow-x: hidden;
  min-height: 0;
}
.stage-dock {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--panel);
  min-height: 0;
  overflow: hidden;
}
.dock-tabs {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  gap: 0;
}
.dock-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 10px 16px;
  cursor: pointer;
}
.dock-tab:hover { color: var(--ink); }
.dock-tab.active {
  color: var(--ink);
  border-bottom-color: var(--cta);
}
.dock-panels {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.stage.is-dock-open .dock-panels { display: flex; }
.dock-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 10px 14px 12px;
}
.dock-pane + .dock-pane { border-left: 0; }

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 12px;
  padding: 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}
@media (max-width: 1280px) {
  html, body { height: auto; overflow: auto; }
  body { display: block; }
  .bench { display: block; overflow: visible; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .stage {
    min-height: 72vh;
    grid-template-rows: auto minmax(240px, 1fr) auto;
  }
  .stage.is-dock-open {
    grid-template-rows: auto minmax(240px, 1fr) minmax(240px, 42vh);
  }
  .stage-dock { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
}
.panel-body {
  padding: 14px 16px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.field { margin-bottom: 14px; }
.field-label,
.field label,
.field .label,
.field .label-zh {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 6px;
  font-weight: 650;
}
.field-label em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
input[type="text"], input[type="url"], input[type="number"], input[type="password"],
input[type="file"],
select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}
input[type="file"] {
  padding: 8px;
  background: #f7f3ed;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(196, 92, 38, 0.28);
  border-color: var(--cta);
}
textarea { min-height: 72px; resize: vertical; }
textarea.enhance-prompt { min-height: 96px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ratio-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ratio-row input { width: 0; flex: 1; min-width: 0; }
.ratio-row span {
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 650;
}
.stage-cost {
  font-size: 12px;
  font-weight: 650;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #2c2622; }
.btn-primary:disabled,
.btn-cta:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-cta {
  background: var(--cta);
  color: #fff;
  font-size: 14px;
  padding: 11px 14px;
  letter-spacing: 0.04em;
}
.btn-cta:hover { background: var(--cta-hover); }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 8px;
}
.btn-ghost:hover { color: var(--ink); background: #efeae3; }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  padding: 6px 10px;
}
.btn-secondary:hover { background: #f7f3ed; }
.btn-secondary.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 92px;
  padding: 16px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #f7f3ed;
  cursor: pointer;
  text-align: center;
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--cta);
  background: #f3e7dc;
}
.dropzone-sm { min-height: 72px; }
.dropzone-title { font-size: 13px; font-weight: 650; }
.dropzone-sub { font-size: 11px; color: var(--muted); }

.fold {
  margin: 0 0 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.fold.tight { margin: 0 0 8px; padding-top: 0; border-top: 0; }
.fold summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: " +"; }
.fold[open] summary::after { content: " –"; }
.fold[open] summary { margin-bottom: 8px; color: var(--ink); }

#statusBar {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
#canvasToolbar {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
#canvasWrap {
  flex: 1;
  min-height: 360px;
  overflow: auto;
  background: var(--checker);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  position: relative;
}
#canvasStage {
  position: relative;
  line-height: 0;
  box-shadow: 0 8px 28px rgba(26, 23, 20, 0.12);
  background: #fff;
}
#canvasStage canvas {
  display: block;
  position: absolute;
  left: 0; top: 0;
  touch-action: none;
}
#baseCanvas { position: relative; cursor: crosshair; }
#overlayCanvas, #cursorCanvas, #uiCanvas { pointer-events: none; }
.handle {
  position: absolute;
  width: 10px; height: 10px;
  background: #fff;
  border: 2px solid var(--cta);
  border-radius: 2px;
  z-index: 5;
  pointer-events: auto;
}
.handle.n { left: 50%; top: -5px; transform: translateX(-50%); cursor: ns-resize; }
.handle.s { left: 50%; bottom: -5px; transform: translateX(-50%); cursor: ns-resize; }
.handle.e { right: -5px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.handle.w { left: -5px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.handle.ne { right: -5px; top: -5px; cursor: nesw-resize; }
.handle.nw { left: -5px; top: -5px; cursor: nwse-resize; }
.handle.se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.handle.sw { left: -5px; bottom: -5px; cursor: nwse-resize; }
.drop-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; pointer-events: none;
  text-align: center; padding: 20px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: #efeae3;
  color: #5c564e;
}
.badge.ok { background: #dceadf; color: #21543a; }
.badge.err { background: #f4d6d2; color: #8a1f16; }
.badge.pending {
  background: #f3e7dc;
  color: #8a3d12;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge.pending::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid rgba(196, 92, 38, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.badge.idle { background: #efeae3; color: #5c564e; }
pre {
  background: #1a1714;
  color: #ece8e1;
  border-radius: 10px;
  font-size: 11px;
  overflow: auto;
  max-height: 280px;
  white-space: pre-wrap;
  word-break: break-all;
  padding: 10px 12px;
}
#resultJsonWrap #resultJson { margin-top: 8px; }
details.advanced { margin: 8px 0 12px; }
details.advanced summary {
  cursor: pointer; font-size: 12px; color: var(--muted); font-weight: 600;
}
.toast {
  position: fixed; right: 16px; bottom: 16px;
  background: var(--ink); color: #fff;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; z-index: 99;
  opacity: 0; transform: translateY(8px);
  transition: .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }
.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.result-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--checker);
}
.result-card img { display: block; width: 100%; height: auto; }
.result-card figcaption {
  background: var(--panel);
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
}
.result-section-title {
  font-size: 12px;
  font-weight: 700;
  margin: 8px 0 6px;
  display: flex;
  justify-content: space-between;
}
a.download-link {
  color: var(--cta);
  font-size: 12px;
  text-decoration: none;
}
a.download-link:hover { text-decoration: underline; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 650;
}
.field.is-disabled { opacity: 0.55; }
.field.is-disabled input { cursor: not-allowed; background: #f3f4f6; }

.chat-col { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat-col #chatInput,
.chat-col .btn-row { flex-shrink: 0; }
.chat-log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #f7f3ed;
  border-radius: 10px;
  padding: 8px;
}
.chat-bubble {
  max-width: 94%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble.user {
  margin-left: auto;
  background: #1a1714;
  color: #fbfaf7;
}
.chat-bubble.assistant {
  background: #fff;
  border: 1px solid var(--line);
}
.chat-bubble.system {
  background: #efeae3;
  color: #5c564e;
  font-size: 11px;
}
.chat-bubble.error {
  background: #f4d6d2;
  color: #8a1f16;
}
.spec-pre {
  max-height: 140px;
  margin: 8px 0 0;
  font-size: 11px;
}
.shot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.shot-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  background: #fff;
}
.shot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.shot-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: #efeae3;
  flex-shrink: 0;
  position: relative;
}
.shot-thumb.is-empty {
  border: 1px dashed var(--line-strong);
  background: #f7f3ed;
}
.shot-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.shot-card-head input[type="checkbox"] { margin: 0; flex-shrink: 0; }
.shot-card-head .shot-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  border: 0;
  padding: 4px 0;
  background: transparent;
}
.shot-role {
  font-size: 10px;
  color: var(--muted);
  background: #efeae3;
  border-radius: 999px;
  padding: 2px 7px;
  flex-shrink: 0;
}
.shot-chevron {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}
.shot-card.is-open .shot-chevron { transform: rotate(180deg); }
.shot-detail {
  display: none;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.shot-card.is-open .shot-detail { display: block; }
.shot-card textarea { min-height: 56px; font-size: 12px; }
.shot-card .shot-notes { font-size: 11px; color: var(--muted); margin: 4px 0 0; }
.result-toolbar { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.gallery-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--checker);
  min-height: 180px;
}
.gallery-card.is-white { background: #fff; }
.gallery-card img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.img-spec {
  display: block;
  font-size: 10px;
  font-weight: 500;
  font-style: normal;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.img-cost {
  display: block;
  font-size: 11px;
  font-weight: 650;
  font-style: normal;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}
.gallery-cap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.gallery-cap strong {
  font-size: 12px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-card figcaption {
  background: var(--panel);
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 23, 20, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 64px 36px;
}
.lightbox-stage {
  margin: 0;
  max-width: min(96vw, 1120px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 64px);
  object-fit: contain;
  background: var(--checker);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.lightbox-stage.is-white img { background: #fff; }
.lightbox-stage figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  color: #fbfaf7;
  font-size: 13px;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(251, 250, 247, 0.12);
  color: #fbfaf7;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-family: inherit;
}
.lightbox-close { top: 16px; right: 16px; }
.lightbox-nav.is-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.is-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(251, 250, 247, 0.24); }
.gallery-card .gallery-err {
  padding: 20px 12px;
  font-size: 12px;
  color: var(--err);
  background: var(--panel);
}
.preview-toggle { display: flex; align-items: center; gap: 4px; }
.gallery-card.is-loading {
  background: #efeae3;
}
.gallery-pending {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: #f7f3ed;
  padding: 24px 12px;
}
.gallery-pending.is-busy {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, #efe8df 0%, #f8f4ee 45%, #efe8df 90%) 0 0 / 220% 100%;
  animation: gallery-shimmer 1.35s ease-in-out infinite;
}
.gallery-pending.is-busy strong {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 650;
}
.gallery-pending-hint {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: var(--muted);
}
.gallery-spinner {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: 3px solid #ddd4c8;
  border-top-color: var(--cta);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}
.shot-thumb.is-busy::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--cta);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes gallery-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
.gallery-empty {
  grid-column: 1 / -1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}
.gallery-empty-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  background:
    linear-gradient(135deg, #c45c26 0 40%, transparent 40% 60%, #1a1714 60%);
  opacity: 0.85;
}
.gallery-empty-title { margin: 0; font-size: 16px; font-weight: 650; color: var(--ink); }
.gallery-empty-sub { margin: 6px 0 0; font-size: 13px; }

.asset-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.asset-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.asset-item img {
  display: block;
  width: 100%;
  height: 108px;
  object-fit: cover;
  background: #efeae3;
}
.asset-thumb { position: relative; }
.asset-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 8px 5px;
  background: linear-gradient(transparent, rgba(26, 23, 20, 0.82));
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.asset-meta {
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.asset-meta strong {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-meta select { font-size: 12px; padding: 4px 6px; }
.asset-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(26, 23, 20, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.shot-refs { margin-top: 8px; }
.shot-refs-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.shot-ref-row { display: flex; flex-wrap: wrap; gap: 6px; }
.shot-ref-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 58px;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
}
.shot-ref-item input { margin: 0; }
.shot-ref-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  background: #efeae3;
}
.shot-ref-item.is-on img,
.shot-ref-item:has(input:checked) img { border-color: var(--cta); }
.shot-empty, .chat-empty {
  margin: 0;
  padding: 18px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
