#detailPageBoard .modal-backdrop[hidden],
#detailPageBoard .theme-menu[hidden],
#detailPageBoard .main-copy-control[hidden],
#detailPageBoard .main-campaign-field[hidden],
#detailPageBoard .deck-quality-field {
  display: none !important;
}

#detailPageBoard .basic-information-label { margin: 14px 0 6px; }
#detailPageBoard .main-dimensions-control {
  margin-top: 12px; border: 1px solid rgba(125, 153, 187, .24); border-radius: 12px;
  background: rgba(247, 250, 255, .72); overflow: hidden;
}
#detailPageBoard .main-dimensions-control summary {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 7px; padding: 10px;
  cursor: pointer; color: #253954; font-weight: 700; list-style: none;
}
#detailPageBoard .main-dimensions-control summary::-webkit-details-marker { display: none; }
#detailPageBoard .main-dimensions-control summary::after { content: '⌄'; color: #0070e0; transition: transform .18s ease; }
#detailPageBoard .main-dimensions-control[open] summary::after { transform: rotate(180deg); }
#detailPageBoard .main-dimensions-control summary small { min-width: 0; margin-left: auto; color: #61748f; font-size: 10px; font-size: 0.733rem; font-weight: 500; line-height: 1.25; letter-spacing: -.02em; white-space: nowrap; }
#detailPageBoard .main-dimensions-control summary > span { font-size: 15px; font-size: 1rem; flex: 0 0 auto; line-height: 1.3; font-weight: 700; white-space: nowrap; }
#detailPageBoard .main-dimensions-control summary::after { flex: 0 0 auto; }
#detailPageBoard .main-dimensions-control #productDimensionsBlock { padding: 0 12px 12px; }

#detailPageBoard .range-ruler {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  height: 8px;
  margin: 0 7px -9px;
  pointer-events: none;
}
#detailPageBoard .range-ruler i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  box-sizing: border-box;
  border: 2px solid #77a7df;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .78);
}
#detailPageBoard .range-ruler i.active { border-color: #087df1; background: #087df1; }
#detailPageBoard .main-copy-scale,
#detailPageBoard .density-scale {
  position: relative;
  display: block;
  height: 14px;
  margin: 6px 7px 0;
}
#detailPageBoard .main-copy-scale small,
#detailPageBoard .density-scale small,
#detailPageBoard .density-scale b {
  position: absolute;
  top: 0;
  min-width: 0;
  color: #61748f;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
}
#detailPageBoard .main-copy-scale > :nth-child(1),
#detailPageBoard .density-scale > :nth-child(1) { left: 0; }
#detailPageBoard .main-copy-scale > :nth-child(1) { transform: none; text-align: left; }
#detailPageBoard .main-copy-scale > :nth-child(2) { left: 33.333%; }
#detailPageBoard .main-copy-scale > :nth-child(3) { left: 66.667%; }
#detailPageBoard .density-scale > :nth-child(2) { left: 50%; }
#detailPageBoard .main-copy-scale > :nth-child(4),
#detailPageBoard .density-scale > :nth-child(3) { left: 100%; }
#detailPageBoard .density-scale b { color: #087df1; }

#detailPageBoard .main-copy-label { position: relative; display: flex; align-items: center; gap: 6px; }
#detailPageBoard .main-copy-help-wrap { position: relative; display: inline-flex; }
#detailPageBoard .main-copy-help { display: grid; width: 18px; height: 18px; place-items: center; padding: 0; border: 1px solid #93bdec; border-radius: 50%; background: #f6faff; color: #087df1; font-size: 0.8rem; font-weight: 800; line-height: 1; }
#detailPageBoard .main-copy-help:focus-visible { outline: 3px solid rgba(8, 125, 241, .22); outline-offset: 2px; }
#detailPageBoard .main-copy-help-tooltip { position: absolute; z-index: 40; top: calc(100% + 8px); left: -4px; display: grid; width: 242px; gap: 5px; padding: 10px 11px; border: 1px solid rgba(113, 156, 207, .32); border-radius: 9px; background: rgba(255, 255, 255, .98); box-shadow: 0 10px 24px rgba(28, 61, 99, .18); color: #536883; font-size: 0.867rem; font-weight: 500; line-height: 1.45; opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity .16s ease, transform .16s ease; visibility: hidden; }
#detailPageBoard .main-copy-help-tooltip b { color: #1f3d61; font-size: 0.867rem; }
#detailPageBoard .main-copy-help-tooltip strong { color: #087df1; }
#detailPageBoard .main-copy-help-wrap:hover .main-copy-help-tooltip,
#detailPageBoard .main-copy-help-wrap:focus-within .main-copy-help-tooltip { opacity: 1; transform: translateY(0); visibility: visible; }

#detailPageBoard .main-prompt-editor {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(125, 153, 187, .24);
}
#detailPageBoard .main-prompt-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
#detailPageBoard .main-prompt-editor-head span { color: #087df1; font-size: 0.8rem; font-weight: 750; letter-spacing: .05em; }
#detailPageBoard .main-prompt-editor-head h4 { margin: 2px 0 0; color: #253954; font-size: 0.933rem; }
#detailPageBoard .main-prompt-editor-head p { max-width: 280px; margin: 0; color: #61748f; font-size: 0.867rem; line-height: 1.5; text-align: right; }
#detailPageBoard .main-prompt-field { display: block; margin-top: 10px; }
#detailPageBoard .main-prompt-field > span { display: block; margin-bottom: 5px; color: #253954; font-size: 0.867rem; font-weight: 720; }
#detailPageBoard .main-prompt-field textarea { display: block; width: 100%; min-height: 116px; resize: vertical; border: 1px solid rgba(125, 153, 187, .35); border-radius: 10px; padding: 10px 11px; color: #253954; background: rgba(248, 251, 255, .82); font: 0.867rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
#detailPageBoard .main-prompt-field textarea:focus { outline: none; border-color: #087df1; box-shadow: 0 0 0 3px rgba(8, 125, 241, .12); }
#detailPageBoard .main-prompt-field small { display: block; margin-top: 4px; color: #7890ad; font-size: 0.8rem; }
#detailPageBoard .main-prompt-field.is-saved small { color: #198754; }

#detailPageBoard .tag-global-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

#detailPageBoard .panel-head > div:nth-child(2) {
  min-width: 0;
  flex: 1 1 auto;
}

#detailPageBoard .panel-head h1,
#detailPageBoard .panel-head h2,
#detailPageBoard .panel-head button {
  white-space: nowrap;
}

#detailPageBoard .product-panel .panel-head > div:nth-child(2) {
  min-width: 82px;
}

#detailPageBoard .product-panel .panel-head {
  display: flex;
  align-items: center;
  min-height: 94px;
}

#detailPageBoard .product-panel .panel-control-stack {
  grid-column: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: auto;
  margin-left: 0;
  flex-direction: row;
}

#detailPageBoard .product-panel .workspace-mode button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.867rem;
  font-weight: 760;
}

#detailPageBoard .product-panel .panel-reset-button {
  min-height: 32px;
  padding: 6px 9px;
}

#detailPageBoard .workspace-mode {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 0.867rem;
}

#detailPageBoard .workspace-mode > span {
  position: static;
  transform: none;
  font-size: 0.8rem;
}

#detailPageBoard .workspace-mode select {
  width: 104px;
  min-width: 0;
  padding: 4px 18px 4px 5px !important;
  font-size: 0.8rem !important;
}

#detailPageBoard .plan-head {
  align-items: center;
  gap: 8px;
}

#detailPageBoard .plan-head .favorite-folder-button,
#detailPageBoard .plan-head .plan-refresh-button,
#detailPageBoard .plan-head .primary-button {
  flex: 0 0 auto;
  padding-inline: 9px;
}

#detailPageBoard .quiet-button {
  border: 1px solid #cbb79f;
  border-radius: 7px;
  background: #fffaf1;
  color: #744533;
  padding: 6px 9px;
  font-size: 0.867rem;
  white-space: nowrap;
}

#detailPageBoard .theme-picker {
  position: relative;
}

#detailPageBoard .theme-picker-trigger {
  width: 100%;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--di-line);
  border-radius: 7px;
  background: #fffefa;
  padding: 7px 9px;
  color: var(--di-ink);
}

#detailPageBoard .theme-menu {
  position: absolute;
  z-index: 12;
  top: calc(100% + 5px);
  left: 0;
  display: grid;
  grid-template-columns: 1fr;
  width: min(430px, 82vw);
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--di-line);
  border-radius: 8px;
  background: #fffaf1;
  box-shadow: 0 15px 35px rgba(48, 39, 25, .18);
}

#detailPageBoard .theme-parent-list,
#detailPageBoard .theme-child-list {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 4px;
  padding: 7px;
}

#detailPageBoard .theme-parent-list {
  border-bottom: 1px solid var(--di-line);
  background: #f4ead9;
}

#detailPageBoard .theme-menu button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 7px;
  color: #635b51;
  text-align: left;
}

#detailPageBoard .theme-child-list { background: transparent; }
#detailPageBoard .theme-child-list .theme-hint { flex: 0 0 100%; }

#detailPageBoard .theme-menu button:hover,
#detailPageBoard .theme-menu button.active {
  background: #f4ded0;
  color: #823b2b;
}

#detailPageBoard .theme-hint {
  margin: 6px 4px;
  color: #8a8175;
  font-size: 0.8rem;
}

#detailPageBoard .modal-backdrop {
  position: fixed !important;
  z-index: 190;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(29, 34, 27, .55);
}

#detailPageBoard .screen-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border-radius: 10px;
  background: #fffaf1;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

#detailPageBoard .modal-close {
  position: absolute;
  right: 12px;
  top: 11px;
  border: 0;
  border-radius: 50%;
  background: #eee4d5;
  color: #744533;
  font-size: 1.333rem;
}

#detailPageBoard .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

#detailPageBoard .info-check-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

#detailPageBoard .info-check-table div,
#detailPageBoard .favorite-brief {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid #e2d6c5;
  border-radius: 7px;
  background: #fffdf8;
}

#detailPageBoard .favorite-list {
  max-height: min(58vh, 560px);
  overflow-y: auto;
}

#detailPageBoard .product-mode-guide {
  margin: 0 0 8px;
  color: #253954;
  font-size: 0.867rem;
  font-weight: 650;
  line-height: 1.45;
}
#detailPageBoard .product-mode-guide .mode-name { color: #d84e2d; }

#detailPageBoard .favorite-modal-hint {
  margin: 7px 0 10px;
  color: var(--di-muted);
  font-size: 0.867rem;
  line-height: 1.5;
}

#detailPageBoard .favorite-mode,
#detailPageBoard .favorite-group {
  border: 1px solid #e1d5c4;
  border-radius: 8px;
  background: #fffdf8;
  padding: 8px;
}

#detailPageBoard .favorite-mode > summary,
#detailPageBoard .favorite-group > summary {
  cursor: pointer;
  color: #754637;
  font-weight: 700;
}

#detailPageBoard .favorite-mode-items,
#detailPageBoard .favorite-group-items {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}

#detailPageBoard .favorite-mode-items[hidden],
#detailPageBoard .favorite-group-items[hidden],
#detailPageBoard .deck-position-menu[hidden] {
  display: none !important;
}

#detailPageBoard .favorite-mode-group,
#detailPageBoard .favorite-group { border-top: 1px solid rgba(107,134,162,.2); padding: 8px 0; }
#detailPageBoard .favorite-group-head { display: flex; align-items: center; gap: 6px; }
#detailPageBoard .favorite-mode-toggle,
#detailPageBoard .favorite-group-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; background: transparent; color: var(--di-ink); padding: 4px 1px; text-align: left; font-weight: 760; }
#detailPageBoard .favorite-group-toggle em { margin-right: 4px; color: #b46d19; font-size: 0.8rem; font-style: normal; }
#detailPageBoard .favorite-group-actions { display: flex; flex: 0 0 auto; gap: 4px; }
#detailPageBoard .favorite-group-actions button { border: 1px solid var(--di-line); border-radius: 5px; background: var(--di-paper); color: var(--di-muted); padding: 3px 5px; font-size: 0.8rem; white-space: nowrap; }
#detailPageBoard .favorite-group-actions button:hover { border-color: var(--di-accent); color: var(--di-accent); }
#detailPageBoard .favorite-mode-toggle i,
#detailPageBoard .favorite-group-toggle i { font-style: normal; transition: transform .16s ease; }
#detailPageBoard .favorite-mode-group.is-open > .favorite-mode-toggle i,
#detailPageBoard .favorite-group.is-open > .favorite-group-toggle i { transform: rotate(180deg); }
#detailPageBoard .favorite-mode-toggle small,
#detailPageBoard .favorite-group-toggle small { color: var(--di-muted); font-size: 0.8rem; font-weight: 600; }

#detailPageBoard .favorite-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e1d5c4;
  border-radius: 8px;
  background: #fffdf8;
}

#detailPageBoard .favorite-item strong { color: var(--di-ink); }
#detailPageBoard .favorite-item p { margin: 3px 0 0; color: var(--di-muted); font-size: 0.867rem; line-height: 1.45; }
#detailPageBoard .favorite-tags { display: flex; flex-wrap: wrap; gap: 6px; }
#detailPageBoard .favorite-group-tag { border: 1px solid rgba(107,134,162,.22); border-radius: 999px; background: rgba(247,250,253,.84); color: #52647b; padding: 4px 8px; font-size: 0.867rem; line-height: 1; cursor: pointer; }
#detailPageBoard .favorite-group-tag.active { border-color: rgba(0,113,227,.52); background: rgba(0,113,227,.14); color: #0069d4; }

#detailPageBoard .favorite-actions {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: end;
  white-space: nowrap;
}

#detailPageBoard .missing-focus {
  outline: 2px solid #c45238 !important;
  outline-offset: 4px;
}

#detailPageBoard .screen-result-image {
  display: block;
  max-width: 100%;
  margin-top: 10px;
  border-radius: 7px;
}

#detailPageBoard .scheme-expanded-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#detailPageBoard .scheme-expanded-head > div {
  min-width: 0;
}

#detailPageBoard .copy-all-prompts {
  flex: 0 0 auto;
  margin-top: 2px;
}

#detailPageBoard .screen-prompt-actions {
  display: flex;
  flex: 0 0 auto;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
}

#detailPageBoard .screen-prompt-actions .copy-button {
  min-height: 30px;
  height: auto;
}

#detailPageBoard .screen-prompt-text {
  width: 100%;
  min-height: 170px;
  margin-top: 10px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid #d7c7b1;
  border-radius: 7px;
  background: #fffaf1;
  color: #403b34;
  font: 12px/1.65 "Microsoft YaHei", sans-serif;
}

#detailPageBoard .screen-prompt-text:focus {
  outline: 0;
  border-color: var(--di-accent);
  box-shadow: 0 0 0 3px rgba(184, 95, 70, .12);
}

@media (max-width: 760px) {
  #detailPageBoard .tag-global-actions {
    display: grid;
  }
}

#detailPageBoard .product-panel .panel-head {
  grid-template-columns: 35px minmax(0, 1fr) minmax(122px, 38%);
  /* Keep the three workbench headers on one shared 94px baseline. */
  min-height: 94px;
  padding-top: 8px;
  padding-bottom: 8px;
  align-items: center;
  overflow: visible;
}
#detailPageBoard .product-panel .panel-head > div:nth-child(2) { min-width: 0; overflow: visible; }
#detailPageBoard .product-panel .panel-control-stack {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-width: 122px;
  max-width: 38%;
  align-items: stretch;
}
#detailPageBoard .product-panel .workspace-mode { display: grid; grid-template-columns: 1fr; gap: 3px; min-width: 0; }
#detailPageBoard .product-panel .workspace-mode > span { display: none; }
#detailPageBoard .product-panel .workspace-mode select,
#detailPageBoard .product-panel .panel-reset-button {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  height: 28px;
  padding: 3px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#detailPageBoard .dropzone { grid-template-columns: 1fr; gap: 8px; overflow: hidden; }
#detailPageBoard .dropzone .add-product-button {
  width: min(100%, 320px);
  max-width: 100%;
  margin: 0 auto;
  justify-self: center;
  white-space: normal;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 12px;
  line-height: 1.35;
  box-sizing: border-box;
}
#detailPageBoard .dropzone .add-product-button small {
  display: inline-block;
  font-size: 0.76rem;
  opacity: 0.85;
}
#detailPageBoard .reference-item .reference-content { max-height: 88px; overflow: auto; }
#detailPageBoard .reference-item[open] .reference-content { min-height: 70px; }
#detailPageBoard .reference-item summary,
#detailPageBoard .reference-content,
#detailPageBoard .asset-previews { min-width: 0; }

/* styles.css also has a generic .reference-item gallery card.  The detail
   workbench uses the same class for disclosure rows, so neutralize that shell
   only within this board. */
#detailPageBoard .reference-item {
  aspect-ratio: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
#detailPageBoard .reference-item + .reference-item { border-top: 1px solid #e6dccd; }
#detailPageBoard .reference-item .reference-content { padding: 0 0 8px; }

/* Dimension rows are compact, label-led controls rather than a data table. */
#detailPageBoard .size-table { overflow: visible; border: 0; border-radius: 0; }
#detailPageBoard .size-row {
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 56px 18px;
  gap: 5px;
  padding: 0;
  border-top: 0;
}
#detailPageBoard .size-row + .size-row { margin-top: 6px; }
#detailPageBoard .size-product-name {
  display: grid;
  place-items: center start;
  min-width: 0;
  color: #665d53;
  font-size: 0.8rem;
  white-space: nowrap;
}
#detailPageBoard .size-row input,
#detailPageBoard .size-row select {
  height: 30px;
  padding-inline: 5px;
}
#detailPageBoard .size-row select { min-width: 56px; font-size: 0.8rem; }

#detailPageBoard .dropzone.is-full .add-product-button,
#detailPageBoard .reference-add-button:disabled {
  cursor: not-allowed;
  border-color: #d9d4cc;
  background: #efede8;
  color: #aaa49a;
}

/* Compact two-way mode switch; the native select remains the single state source. */
#detailPageBoard .product-panel .workspace-mode {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 28px;
  overflow: hidden;
  border: 1px solid #cbb79f;
  border-radius: 7px;
  background: #fffaf1;
}
#detailPageBoard .product-panel .workspace-mode::before {
  position: absolute;
  z-index: 0;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: 4px;
  background: #b85f46;
  content: '';
  transition: transform .18s ease;
}
#detailPageBoard .product-panel .workspace-mode.is-main::before { transform: translateX(100%); }
#detailPageBoard .product-panel .workspace-mode button {
  position: relative;
  z-index: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #744533;
  font-size: 0.8rem;
  white-space: nowrap;
}
#detailPageBoard .product-panel .workspace-mode button[aria-pressed='true'] { color: #fff; }
#detailPageBoard .product-panel .workspace-mode select { display: none; }

#detailPageBoard .reference-screen-notice {
  border: 1px solid #c76a4d;
  background: #fff0e8;
  color: #963f26;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #c76a4d;
}

/* Apple-inspired material system: intentionally scoped to the ecommerce workbench.
   No data, prompt, planner, or engine selector is changed below. */
#detailPageBoard {
  --di-paper: rgba(255, 255, 255, .74);
  --di-cream: rgba(247, 249, 252, .76);
  --di-line: rgba(116, 137, 160, .20);
  --di-ink: #17253a;
  --di-muted: #6e7d90;
  --di-accent: #007aff;
  --di-accent-dark: #0062cc;
  --di-chip: rgba(245, 248, 252, .88);
  position: relative;
  isolation: isolate;
  color: var(--di-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

#detailPageBoard::before {
  position: absolute;
  z-index: -1;
  inset: -18px -22px;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 7%, rgba(123, 191, 255, .26), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(188, 161, 255, .18), transparent 24%),
    linear-gradient(135deg, #eef5ff 0%, #f8fbff 46%, #f5f0ff 100%);
  border-radius: 28px;
  content: '';
}

#detailPageBoard .workspace-shell { padding: 16px 0 18px; }
#detailPageBoard .workspace-grid { gap: 16px; }
#detailPageBoard .work-panel {
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 22px;
  background: rgba(255, 255, 255, .64);
  box-shadow: 0 18px 48px rgba(45, 72, 108, .13), inset 0 1px 0 rgba(255, 255, 255, .92);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

#detailPageBoard .panel-head {
  min-height: 86px;
  border-bottom-color: rgba(117, 139, 165, .16);
  background: linear-gradient(132deg, rgba(255, 255, 255, .90), rgba(238, 246, 255, .68));
}
#detailPageBoard .panel-head h1,
#detailPageBoard .panel-head h2,
#detailPageBoard .tag-group h3,
#detailPageBoard .scheme-summary h3 {
  color: #15243a;
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 750;
  letter-spacing: -.025em;
}
#detailPageBoard .panel-head p { color: #738198; }
#detailPageBoard .panel-index {
  border: 1px solid rgba(255, 255, 255, .7);
  background: linear-gradient(145deg, #24456d, #14263e);
  box-shadow: 0 6px 14px rgba(25, 48, 78, .20), inset 0 1px 0 rgba(255,255,255,.24);
}
#detailPageBoard .panel-scroll,
#detailPageBoard .result-scroll { background: transparent; }
#detailPageBoard .subsection { border-bottom-color: rgba(120, 143, 171, .14); }
#detailPageBoard .section-label b,
#detailPageBoard .size-head { color: #253954; }
#detailPageBoard .workspace-mode-notice { color: #0070e0; }
#detailPageBoard .required-marker,
#detailPageBoard .required-dot { background: #ff5f57; box-shadow: 0 0 0 3px rgba(255,95,87,.10); }

#detailPageBoard .field input,
#detailPageBoard .field select,
#detailPageBoard textarea,
#detailPageBoard .theme-picker-trigger {
  border-color: rgba(116, 137, 160, .24);
  border-radius: 11px;
  background: rgba(255, 255, 255, .72);
  color: #253751;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}
#detailPageBoard .field input:hover,
#detailPageBoard .field select:hover,
#detailPageBoard textarea:hover,
#detailPageBoard .theme-picker-trigger:hover { background: rgba(255,255,255,.94); border-color: rgba(0,122,255,.36); }
#detailPageBoard .field input:focus,
#detailPageBoard .field select:focus,
#detailPageBoard textarea:focus,
#detailPageBoard .theme-picker-trigger:focus-visible {
  border-color: #007aff;
  box-shadow: 0 0 0 4px rgba(0,122,255,.14), inset 0 1px 0 #fff;
}

#detailPageBoard .quiet-button,
#detailPageBoard .panel-reset-button,
#detailPageBoard .plan-refresh-button,
#detailPageBoard .favorite-folder-button,
#detailPageBoard .copy-button,
#detailPageBoard .group-actions button {
  border-color: rgba(103, 132, 164, .24);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  color: #2868ae;
  box-shadow: 0 2px 8px rgba(55,84,120,.07), inset 0 1px 0 rgba(255,255,255,.84);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
#detailPageBoard .quiet-button:hover,
#detailPageBoard .panel-reset-button:hover,
#detailPageBoard .plan-refresh-button:hover,
#detailPageBoard .favorite-folder-button:hover,
#detailPageBoard .copy-button:hover,
#detailPageBoard .group-actions button:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 7px 15px rgba(55,84,120,.13), inset 0 1px 0 #fff;
}
#detailPageBoard .primary-button {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 11px;
  background: linear-gradient(180deg, #2997ff, #0071e3);
  box-shadow: 0 8px 18px rgba(0, 113, 227, .24), inset 0 1px 0 rgba(255,255,255,.35);
}
#detailPageBoard .primary-button:hover { transform: translateY(-1px); background: linear-gradient(180deg, #42a5ff, #0077ed); }

#detailPageBoard .product-panel .workspace-mode {
  min-height: 27px;
  padding: 0 2px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid rgba(102, 133, 167, .24);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#detailPageBoard .product-panel .workspace-mode::before { content: none; }
#detailPageBoard .product-panel .workspace-mode::after {
  position: absolute;
  bottom: -1px;
  left: 2px;
  width: calc(50% - 2px);
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: #007aff;
  box-shadow: 0 1px 4px rgba(0,113,227,.28);
  content: '';
  transition: transform .18s ease;
}
#detailPageBoard .product-panel .workspace-mode.is-main::after { transform: translateX(100%); }
#detailPageBoard .product-panel .workspace-mode button {
  min-height: 26px;
  padding: 0 5px;
  border-radius: 0;
  background: transparent;
  color: #718198;
  font-size: 0.8rem;
  font-weight: 620;
  letter-spacing: .01em;
}
#detailPageBoard .product-panel .workspace-mode button[aria-pressed='true'] { color: #0071e3; font-weight: 760; }

#detailPageBoard .dropzone {
  min-height: 154px;
  border-color: rgba(0,122,255,.35);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(234,244,255,.68));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
#detailPageBoard .dropzone.dragover { border-color: #007aff; background: rgba(225,241,255,.82); box-shadow: 0 0 0 4px rgba(0,122,255,.10); }
#detailPageBoard .add-product-button,
#detailPageBoard .reference-add-button {
  border-color: rgba(0,122,255,.34);
  border-radius: 10px;
  background: rgba(255,255,255,.76);
  color: #0071e3;
}
#detailPageBoard .thumb { border-color: rgba(97,128,160,.22); border-radius: 10px; box-shadow: 0 3px 10px rgba(49,77,110,.12); }
#detailPageBoard .thumb-remove { border: 1px solid rgba(111,135,160,.18); color: #ff3b30; }

#detailPageBoard .tag-group,
#detailPageBoard .scheme-card,
#detailPageBoard .scheme-expanded,
#detailPageBoard .screen-prompt,
#detailPageBoard .favorite-item,
#detailPageBoard .favorite-mode,
#detailPageBoard .favorite-group,
#detailPageBoard .favorite-brief,
#detailPageBoard .info-check-table div {
  border-color: rgba(118, 145, 174, .19);
  border-radius: 16px;
  background: rgba(255,255,255,.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.90), 0 8px 22px rgba(52,79,111,.055);
}
#detailPageBoard .tag-group { padding: 14px; }
#detailPageBoard .tag-group.is-forced { border-color: rgba(0,122,255,.36); background: rgba(239,247,255,.80); }
#detailPageBoard .tag,
#detailPageBoard .ban-chip,
#detailPageBoard .scheme-pills span,
#detailPageBoard .favorite-tags i {
  border-color: rgba(107,134,162,.20);
  border-radius: 999px;
  background: rgba(247,250,253,.84);
  color: #52647b;
}
#detailPageBoard .tag:hover,
#detailPageBoard .ban-chip:hover { border-color: rgba(0,122,255,.38); color: #006edc; }
#detailPageBoard .tag.selected,
#detailPageBoard .ban-chip.active {
  border-color: rgba(0,122,255,.34);
  background: rgba(0,122,255,.13);
  color: #0069d4;
}
#detailPageBoard .tag.forced,
#detailPageBoard .group-actions button.active { border-color: #0071e3; background: #0071e3; color: #fff; }

#detailPageBoard .result-empty {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#detailPageBoard .scheme-card--pending { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; min-height: 72px; padding: 13px 14px; overflow: hidden; }
#detailPageBoard .scheme-card--pending h3 { position: relative; z-index: 1; margin: 0; }
#detailPageBoard .scheme-card--pending .scheme-title-band { position: absolute; z-index: 0; top: 0; right: 0; left: 0; height: 100%; opacity: .54; }
#detailPageBoard .scheme-card.active { border: 2px solid #0071e3; outline: 2px solid rgba(0,164,255,.48); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(0,113,227,.20), 0 16px 32px rgba(0,113,227,.24); }
#detailPageBoard .scheme-number,
#detailPageBoard .scheme-toggle,
#detailPageBoard .scheme-favorite { color: #0071e3; }
#detailPageBoard .screen-prompt-text { border-color: rgba(113,140,170,.25); border-radius: 12px; background: rgba(251,253,255,.92); color: #263953; }

/* High-priority local scene menu: anchored to trigger, expands leftward so it never gets clipped by right outer edge */
#detailPageBoard .basic-information-label,
#detailPageBoard .style-theme-grid {
  position: relative !important;
  z-index: 60 !important;
}
#detailPageBoard .theme-picker {
  position: relative !important;
  z-index: 70 !important;
}
#detailPageBoard .theme-menu {
  position: absolute !important;
  top: calc(100% + 5px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 99999 !important;
  display: grid !important;
  grid-template-columns: 82px minmax(180px, 1fr) !important;
  width: min(340px, calc(100vw - 28px)) !important;
  max-height: min(420px, calc(100vh - 24px)) !important;
  overflow: hidden !important;
  border-color: rgba(255,255,255,.86) !important;
  border-radius: 16px !important;
  background: rgba(249,252,255,.94) !important;
  box-shadow: 0 24px 60px rgba(35,62,96,.28), 0 4px 14px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.96) !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
}
#detailPageBoard .theme-parent-list,
#detailPageBoard .theme-child-list {
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 4px;
  padding: 8px;
}
#detailPageBoard .theme-parent-list {
  border-right: 1px solid rgba(114,141,170,.16);
  border-bottom: 0;
  background: rgba(229,239,250,.68);
}
#detailPageBoard .theme-child-list {
  max-height: min(402px, calc(100vh - 42px));
  overflow-y: auto;
  min-width: 0;
}
#detailPageBoard .theme-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 31px;
  padding: 6px 9px;
  border-radius: 8px;
  color: #425977;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
#detailPageBoard .theme-menu button:hover,
#detailPageBoard .theme-menu button.active { background: rgba(0,122,255,.12); color: #006edc; }
#detailPageBoard .theme-child-list .theme-hint {
  margin: 7px 4px;
  color: #73829a;
  line-height: 1.55;
  font-size: 11.5px;
  white-space: normal;
  word-break: break-word;
}

#detailPageBoard .screen-modal {
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 22px;
  background: rgba(250,253,255,.92);
  box-shadow: 0 28px 80px rgba(17,42,76,.30), inset 0 1px 0 rgba(255,255,255,.96);
  backdrop-filter: blur(26px);
}
#detailPageBoard .modal-backdrop { z-index: 5100; background: rgba(18,35,59,.30); backdrop-filter: blur(8px); }
#detailPageBoard .modal-close { background: rgba(231,237,245,.9); color: #40526b; }

#detailPageBoard * { scrollbar-color: rgba(0,122,255,.52) transparent; }
#detailPageBoard *::-webkit-scrollbar { width: 8px; height: 8px; }
#detailPageBoard *::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(0,122,255,.36); background-clip: padding-box; }

/* System appearance: the workbench tracks macOS / Windows dark mode without
   touching its data or generation state. */
@media (prefers-color-scheme: dark) {
  #detailPageBoard {
    color-scheme: dark;
    --di-paper: rgba(24, 31, 43, .78);
    --di-cream: rgba(20, 27, 39, .82);
    --di-line: rgba(187, 207, 233, .16);
    --di-ink: #edf4ff;
    --di-muted: #9caec5;
    --di-accent: #0a84ff;
    --di-accent-dark: #409cff;
    --di-chip: rgba(42, 53, 71, .82);
  }
  #detailPageBoard::before {
    background:
      radial-gradient(circle at 12% 5%, rgba(10,132,255,.20), transparent 29%),
      radial-gradient(circle at 87% 9%, rgba(94,92,230,.15), transparent 25%),
      linear-gradient(135deg, #0b111c 0%, #101927 47%, #121322 100%);
  }
  #detailPageBoard .work-panel {
    border-color: rgba(255,255,255,.10);
    background: rgba(20, 28, 40, .76);
    box-shadow: 0 20px 52px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.06);
  }
  #detailPageBoard .panel-head {
    border-bottom-color: rgba(202,220,243,.12);
    background: linear-gradient(132deg, rgba(33, 43, 58, .94), rgba(22, 31, 44, .74));
  }
  #detailPageBoard .panel-head h1,
  #detailPageBoard .panel-head h2,
  #detailPageBoard .tag-group h3,
  #detailPageBoard .scheme-summary h3,
  #detailPageBoard .section-label b,
  #detailPageBoard .size-head { color: #f3f7ff; }
  #detailPageBoard .panel-head p,
  #detailPageBoard .theme-child-list .theme-hint { color: #a9b9d0; }
  #detailPageBoard .panel-index { border-color: rgba(255,255,255,.08); background: linear-gradient(145deg, #314a6c, #1d2d43); }
  #detailPageBoard .subsection { border-bottom-color: rgba(202,220,243,.10); }
  #detailPageBoard .workspace-mode-notice { color: #58a6ff; }
  #detailPageBoard .field input,
  #detailPageBoard .field select,
  #detailPageBoard textarea,
  #detailPageBoard .theme-picker-trigger {
    border-color: rgba(201,219,244,.17);
    background: rgba(9, 15, 25, .48);
    color: #e8f1ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  }
  #detailPageBoard .field input:hover,
  #detailPageBoard .field select:hover,
  #detailPageBoard textarea:hover,
  #detailPageBoard .theme-picker-trigger:hover { background: rgba(46, 61, 82, .72); border-color: rgba(10,132,255,.58); }
  #detailPageBoard .quiet-button,
  #detailPageBoard .panel-reset-button,
  #detailPageBoard .plan-refresh-button,
  #detailPageBoard .favorite-folder-button,
  #detailPageBoard .copy-button,
  #detailPageBoard .group-actions button {
    border-color: rgba(201,219,244,.15);
    background: rgba(43, 55, 74, .76);
    color: #8fc5ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  }
  #detailPageBoard .quiet-button:hover,
  #detailPageBoard .panel-reset-button:hover,
  #detailPageBoard .plan-refresh-button:hover,
  #detailPageBoard .favorite-folder-button:hover,
  #detailPageBoard .copy-button:hover,
  #detailPageBoard .group-actions button:hover { background: rgba(61, 77, 101, .88); }
  #detailPageBoard .product-panel .workspace-mode { border-bottom-color: rgba(205,220,243,.20); }
  #detailPageBoard .product-panel .workspace-mode button { color: #9caec5; }
  #detailPageBoard .product-panel .workspace-mode button[aria-pressed='true'] { color: #65b0ff; }
  #detailPageBoard .product-panel .workspace-mode::after { background: #0a84ff; box-shadow: 0 1px 5px rgba(10,132,255,.42); }
  #detailPageBoard .dropzone {
    border-color: rgba(10,132,255,.46);
    background: linear-gradient(145deg, rgba(22, 32, 46, .88), rgba(17, 29, 44, .78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  }
  #detailPageBoard .dropzone.dragover { background: rgba(10,132,255,.14); }
  #detailPageBoard .add-product-button,
  #detailPageBoard .reference-add-button { border-color: rgba(10,132,255,.48); background: rgba(28, 43, 61, .84); color: #79bbff; }
  #detailPageBoard .thumb { border-color: rgba(194,214,241,.14); box-shadow: 0 4px 12px rgba(0,0,0,.24); }
  #detailPageBoard .tag-group,
  #detailPageBoard .scheme-card,
  #detailPageBoard .scheme-expanded,
  #detailPageBoard .screen-prompt,
  #detailPageBoard .favorite-item,
  #detailPageBoard .favorite-mode,
  #detailPageBoard .favorite-group,
  #detailPageBoard .favorite-brief,
  #detailPageBoard .info-check-table div {
    border-color: rgba(201,219,244,.13);
    background: rgba(30, 40, 55, .74);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 9px 24px rgba(0,0,0,.12);
  }
  #detailPageBoard .tag-group.is-forced { border-color: rgba(10,132,255,.55); background: rgba(10,132,255,.12); }
  #detailPageBoard .tag,
  #detailPageBoard .ban-chip,
  #detailPageBoard .scheme-pills span,
  #detailPageBoard .favorite-tags i { border-color: rgba(194,214,241,.14); background: rgba(52, 65, 85, .78); color: #c1cfe2; }
  #detailPageBoard .tag.selected,
  #detailPageBoard .ban-chip.active { border-color: rgba(10,132,255,.60); background: rgba(10,132,255,.19); color: #8dcbff; }
  #detailPageBoard .screen-prompt-text { border-color: rgba(194,214,241,.16); background: rgba(12, 19, 29, .76); color: #dce9fb; }
  #detailPageBoard .theme-menu { border-color: rgba(255,255,255,.12); background: rgba(28, 39, 55, .94); box-shadow: 0 24px 58px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06); }
  #detailPageBoard .theme-parent-list { border-right-color: rgba(201,219,244,.12); background: rgba(15, 24, 36, .66); }
  #detailPageBoard .theme-menu button { color: #c2d0e3; }
  #detailPageBoard .theme-menu button:hover,
  #detailPageBoard .theme-menu button.active { background: rgba(10,132,255,.20); color: #a7d7ff; }
  #detailPageBoard .screen-modal { border-color: rgba(255,255,255,.12); background: rgba(25, 35, 50, .96); box-shadow: 0 28px 80px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.06); }
  #detailPageBoard .modal-backdrop { background: rgba(0,0,0,.52); }
  #detailPageBoard .modal-close { background: rgba(61, 75, 97, .90); color: #e5eefb; }
  #detailPageBoard * { scrollbar-color: rgba(101,176,255,.58) transparent; }
  #detailPageBoard *::-webkit-scrollbar-thumb { background: rgba(101,176,255,.48); background-clip: padding-box; }
}

/* The app also exposes a root theme state for the in-app appearance switch.
   Use flat selectors here: this browser accepts them consistently, unlike
   nested selectors in a stylesheet assembled from multiple UI layers. */
:root[data-theme="dark"] #detailPageBoard {
  color-scheme: dark;
  color: #edf4ff;
  --di-paper: rgba(24, 31, 43, .78);
  --di-cream: rgba(20, 27, 39, .82);
  --di-line: rgba(187, 207, 233, .16);
  --di-ink: #edf4ff;
  --di-muted: #9caec5;
  --di-accent: #0a84ff;
  --di-accent-dark: #409cff;
  --di-chip: rgba(42, 53, 71, .82);
}
:root[data-theme="dark"] #detailPageBoard::before { background: radial-gradient(circle at 12% 5%, rgba(10,132,255,.20), transparent 29%), radial-gradient(circle at 87% 9%, rgba(94,92,230,.15), transparent 25%), linear-gradient(135deg, #0b111c 0%, #101927 47%, #121322 100%); }
:root[data-theme="dark"] #detailPageBoard .work-panel { border-color: rgba(255,255,255,.10); background: rgba(20, 28, 40, .76); box-shadow: 0 20px 52px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.06); }
:root[data-theme="dark"] #detailPageBoard .panel-head { border-bottom-color: rgba(202,220,243,.12); background: linear-gradient(132deg, rgba(33,43,58,.94), rgba(22,31,44,.74)); }
:root[data-theme="dark"] #detailPageBoard .panel-head h1,
:root[data-theme="dark"] #detailPageBoard .panel-head h2,
:root[data-theme="dark"] #detailPageBoard .tag-group h3,
:root[data-theme="dark"] #detailPageBoard .scheme-summary h3,
:root[data-theme="dark"] #detailPageBoard .section-label b,
:root[data-theme="dark"] #detailPageBoard .size-head { color: #f3f7ff; }
:root[data-theme="dark"] #detailPageBoard .panel-head p,
:root[data-theme="dark"] #detailPageBoard .theme-child-list .theme-hint { color: #a9b9d0; }
:root[data-theme="dark"] #detailPageBoard .panel-index { border-color: rgba(255,255,255,.08); background: linear-gradient(145deg, #314a6c, #1d2d43); }
:root[data-theme="dark"] #detailPageBoard .subsection { border-bottom-color: rgba(202,220,243,.10); }
:root[data-theme="dark"] #detailPageBoard .workspace-mode-notice { color: #58a6ff; }
:root[data-theme="dark"] #detailPageBoard .field input,
:root[data-theme="dark"] #detailPageBoard .field select,
:root[data-theme="dark"] #detailPageBoard textarea,
:root[data-theme="dark"] #detailPageBoard .theme-picker-trigger { border-color: rgba(201,219,244,.17); background: rgba(9,15,25,.48); color: #e8f1ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
:root[data-theme="dark"] #detailPageBoard .quiet-button,
:root[data-theme="dark"] #detailPageBoard .panel-reset-button,
:root[data-theme="dark"] #detailPageBoard .plan-refresh-button,
:root[data-theme="dark"] #detailPageBoard .favorite-folder-button,
:root[data-theme="dark"] #detailPageBoard .copy-button,
:root[data-theme="dark"] #detailPageBoard .group-actions button { border-color: rgba(201,219,244,.15); background: rgba(43,55,74,.76); color: #8fc5ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
:root[data-theme="dark"] #detailPageBoard .product-panel .workspace-mode { border-bottom-color: rgba(205,220,243,.20); }
:root[data-theme="dark"] #detailPageBoard .product-panel .workspace-mode button { color: #9caec5; }
:root[data-theme="dark"] #detailPageBoard .product-panel .workspace-mode button[aria-pressed='true'] { color: #65b0ff; }
:root[data-theme="dark"] #detailPageBoard .product-panel .workspace-mode::after { background: #0a84ff; box-shadow: 0 1px 5px rgba(10,132,255,.42); }
:root[data-theme="dark"] #detailPageBoard .dropzone { border-color: rgba(10,132,255,.46); background: linear-gradient(145deg, rgba(22,32,46,.88), rgba(17,29,44,.78)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
:root[data-theme="dark"] #detailPageBoard .add-product-button,
:root[data-theme="dark"] #detailPageBoard .reference-add-button { border-color: rgba(10,132,255,.48); background: rgba(28,43,61,.84); color: #79bbff; }
:root[data-theme="dark"] #detailPageBoard .tag-group,
:root[data-theme="dark"] #detailPageBoard .scheme-card,
:root[data-theme="dark"] #detailPageBoard .scheme-expanded,
:root[data-theme="dark"] #detailPageBoard .screen-prompt,
:root[data-theme="dark"] #detailPageBoard .favorite-item,
:root[data-theme="dark"] #detailPageBoard .favorite-mode,
:root[data-theme="dark"] #detailPageBoard .favorite-group,
:root[data-theme="dark"] #detailPageBoard .favorite-brief,
:root[data-theme="dark"] #detailPageBoard .info-check-table div { border-color: rgba(201,219,244,.13); background: rgba(30,40,55,.74); box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 9px 24px rgba(0,0,0,.12); }
:root[data-theme="dark"] #detailPageBoard .tag,
:root[data-theme="dark"] #detailPageBoard .ban-chip,
:root[data-theme="dark"] #detailPageBoard .scheme-pills span,
:root[data-theme="dark"] #detailPageBoard .favorite-tags i { border-color: rgba(194,214,241,.14); background: rgba(52,65,85,.78); color: #c1cfe2; }
:root[data-theme="dark"] #detailPageBoard .tag.selected,
:root[data-theme="dark"] #detailPageBoard .ban-chip.active { border-color: rgba(10,132,255,.60); background: rgba(10,132,255,.19); color: #8dcbff; }
:root[data-theme="dark"] #detailPageBoard .screen-prompt-text { border-color: rgba(194,214,241,.16); background: rgba(12,19,29,.76); color: #dce9fb; }
:root[data-theme="dark"] #detailPageBoard .theme-menu { border-color: rgba(255,255,255,.12); background: rgba(28,39,55,.94); box-shadow: 0 24px 58px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06); }
:root[data-theme="dark"] #detailPageBoard .theme-parent-list { border-right-color: rgba(201,219,244,.12); background: rgba(15,24,36,.66); }
:root[data-theme="dark"] #detailPageBoard .theme-menu button { color: #c2d0e3; }
:root[data-theme="dark"] #detailPageBoard .theme-menu button:hover,
:root[data-theme="dark"] #detailPageBoard .theme-menu button.active { background: rgba(10,132,255,.20); color: #a7d7ff; }
:root[data-theme="dark"] #detailPageBoard .screen-modal { border-color: rgba(255,255,255,.12); background: rgba(25,35,50,.96); box-shadow: 0 28px 80px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.06); }
:root[data-theme="dark"] #detailPageBoard .modal-backdrop { background: rgba(0,0,0,.52); }
:root[data-theme="dark"] #detailPageBoard .modal-close { background: rgba(61,75,97,.90); color: #e5eefb; }
:root[data-theme="dark"] #detailPageBoard * { scrollbar-color: rgba(101,176,255,.58) transparent; }
:root[data-theme="dark"] #detailPageBoard *::-webkit-scrollbar-thumb { background: rgba(101,176,255,.48); background-clip: padding-box; }

@media (max-width: 760px) {
  #detailPageBoard .work-panel { border-radius: 18px; }
  #detailPageBoard .theme-menu { grid-template-columns: 1fr; overflow-y: auto; }
  #detailPageBoard .theme-parent-list { grid-template-columns: repeat(4, 1fr); border-right: 0; border-bottom: 1px solid rgba(114,141,170,.16); }
  #detailPageBoard .theme-parent-list button { justify-content: center; font-size: 0.8rem; }
  #detailPageBoard .theme-parent-list button span { display: none; }
}

/* Keep workbench panels fully expanded in the document flow; only the page scrolls. */
#detailPageBoard .work-panel {
  max-height: none !important;
  overflow: visible !important;
}
#detailPageBoard .work-panel > .panel-head {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
#detailPageBoard .work-panel > .panel-scroll,
#detailPageBoard .work-panel > .result-scroll,
#detailPageBoard .work-panel > .deck-scroll {
  flex: 0 0 auto;
  overflow: visible !important;
}
#detailPageBoard .work-panel > .deck-scroll {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}
#detailPageBoard .plan-panel { max-height: none !important; }
/* Keep model and size controls beside the generate action at the right edge. */
#detailPageBoard .generation-head > .deck-model-controls { margin: 0; }

/* M3 operation desk — scoped Apple-like materials, without changing app-wide tokens. */
#detailPageBoard .workspace-grid {
  grid-template-columns: minmax(270px, .82fr) minmax(330px, 1fr) minmax(430px, 1.35fr);
  align-items: stretch;
}
#detailPageBoard .plan-panel .panel-head,
#detailPageBoard .generation-head { min-height: 94px; }
#detailPageBoard .generation-head { align-items: center; }
#detailPageBoard .generation-head > div { min-width: 0; margin-right: auto; }
#detailPageBoard .deck-model-controls { display: grid; grid-template-columns: minmax(142px, 1.55fr) minmax(72px, .62fr) minmax(94px, .84fr); flex: 0 1 430px; gap: 6px; min-width: 0; }
#detailPageBoard .deck-model-field { display: grid; min-width: 0; gap: 3px; color: var(--di-muted); font-size: 0.733rem; font-weight: 700; white-space: nowrap; }
#detailPageBoard .deck-model-field.is-unavailable { opacity: .58; }
#detailPageBoard .deck-model-field select {
  width: 100%; min-height: 34px; border: 1px solid rgba(105,132,163,.25); border-radius: 10px;
  background: rgba(255,255,255,.72); color: var(--di-ink); padding: 6px 26px 6px 9px;
}
#detailPageBoard .deck-generate-button { white-space: nowrap; }
#detailPageBoard #generationSubtitle { display: grid; gap: 1px; }
#detailPageBoard #generationSubtitle span { display: block; white-space: nowrap; }
#detailPageBoard .deck-scroll { background: linear-gradient(180deg, rgba(247,250,253,.8), rgba(237,244,251,.52)); }
#detailPageBoard .deck-empty { display: grid; min-height: 350px; place-content: center; gap: 10px; padding: 30px; text-align: center; color: var(--di-muted); }
#detailPageBoard .deck-empty span { color: #0071e3; font-size: 0.8rem; font-weight: 760; letter-spacing: .13em; }
#detailPageBoard .deck-empty h2 { color: var(--di-ink); font-size: 1.533rem; }

/* Let the title absorb free space so model controls sit beside the action. */
#detailPageBoard .generation-head > div:nth-child(2) { flex: 1 1 auto; margin-right: 0; }
#detailPageBoard .generation-head > div.deck-model-controls {
  flex: 0 1 260px;
  width: 260px;
  margin: 0 12px 0 16px;
  grid-template-columns: minmax(142px, 1fr) minmax(72px, .55fr) 0;
}
#detailPageBoard .deck-empty p { max-width: 280px; margin: 0; font-size: 0.867rem; line-height: 1.65; }
#detailPageBoard .deck-toolbar { display: flex; align-items: center; min-height: 36px; margin-bottom: 12px; color: var(--di-muted); font-size: 0.867rem; }
#detailPageBoard .scheme-list { grid-template-columns: minmax(0, 1fr); gap: 9px; }
#detailPageBoard .scheme-card {
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

#detailPageBoard .scheme-card.active {
  border-color: #0071e3 !important;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.22), 0 8px 24px rgba(0, 92, 184, 0.12) !important;
}

:root[data-theme="dark"] #detailPageBoard .scheme-card.active {
  border-color: #66c5ff !important;
  box-shadow: 0 0 0 2px rgba(102, 197, 255, 0.35), 0 12px 28px rgba(0, 0, 0, 0.3) !important;
}

#detailPageBoard .scheme-inline-expanded {
  margin: 0 14px 14px 14px;
  padding: 14px 16px;
  border-top: 1px solid rgba(0, 113, 227, 0.15);
  border-radius: 11px;
  background: rgba(0, 113, 227, 0.035);
  animation: schemeInlineExpand 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] #detailPageBoard .scheme-inline-expanded {
  border-top-color: rgba(102, 197, 255, 0.22);
  background: rgba(10, 132, 255, 0.08);
}

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

#detailPageBoard .scheme-inline-expanded-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(111, 137, 168, 0.25);
}

#detailPageBoard .scheme-inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  background: #0071e3;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

:root[data-theme="dark"] #detailPageBoard .scheme-inline-badge {
  background: #0a84ff;
  color: #ffffff;
}

#detailPageBoard .scheme-inline-hint {
  color: var(--di-muted);
  font-size: 0.8rem;
}

#detailPageBoard .screen-summary-inline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

#detailPageBoard .screen-summary-inline li {
  display: grid;
  gap: 3px;
  color: var(--di-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

#detailPageBoard .screen-summary-inline b {
  color: var(--di-ink);
  font-size: 0.92rem;
  font-weight: 700;
}

:root[data-theme="dark"] #detailPageBoard .screen-summary-inline b {
  color: #edf4ff;
}

#detailPageBoard .screen-summary-inline em {
  color: #c06e00;
  font-size: 0.82rem;
  font-style: normal;
}

:root[data-theme="dark"] #detailPageBoard .screen-summary-inline em {
  color: #ffb86c;
}

#detailPageBoard .scheme-summary { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: center; min-height: 112px; padding: 14px 92px 14px 16px; }
#detailPageBoard .scheme-summary h3,
#detailPageBoard .scheme-summary p,
#detailPageBoard .scheme-summary .scheme-pills { grid-column: 2; }
#detailPageBoard .scheme-summary h3 { margin: 0; font-size: 1.2rem; line-height: 1.35; letter-spacing: -.02em; }
#detailPageBoard .scheme-title-band { position: absolute; z-index: 0; top: 10px; right: 0; left: 0; height: 32px; border-radius: 2px; background: linear-gradient(90deg, rgba(245,211,145,.82), rgba(255,239,199,.98), rgba(222,172,87,.72)); box-shadow: inset 0 1px 0 rgba(255,255,255,.82); }
#detailPageBoard .scheme-summary h3 { position: relative; z-index: 1; }
#detailPageBoard .scheme-summary p { margin: 4px 0 0; color: #4e5d71; font-size: 0.933rem; line-height: 1.55; }
#detailPageBoard .scheme-summary .scheme-pills { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
#detailPageBoard .scheme-pills span,
#detailPageBoard .scheme-tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 0.867rem; line-height: 1.25; font-weight: 550; letter-spacing: .01em; }
#detailPageBoard .scheme-number { grid-column: 1; grid-row: 1 / span 3; align-self: start; font-size: 0.867rem; font-weight: 750; }
#detailPageBoard .scheme-toggle { grid-column: 3; grid-row: 1 / span 3; align-self: center; margin: 0; text-align: right; white-space: nowrap; font-size: 0.867rem; font-weight: 650; }
#detailPageBoard .scheme-favorite-button { position: absolute; top: 10px; right: 11px; z-index: 2; border: 1px solid rgba(111,137,168,.24); border-radius: 999px; background: rgba(255,255,255,.84); color: #54708f; padding: 6px 10px; font-size: 0.867rem; line-height: 1; white-space: nowrap; }
#detailPageBoard .scheme-favorite-button:hover { border-color: rgba(0,122,255,.48); color: #0071e3; }
#detailPageBoard .scheme-favorite-button.is-favorited { border-color: rgba(255,149,0,.42); background: rgba(255,149,0,.12); color: #d87800; }
#detailPageBoard .deck-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
#detailPageBoard .deck-card,
#detailPageBoard .deck-add-card {
  min-width: 0; overflow: hidden; border: 1px solid rgba(114,143,174,.2); border-radius: 17px;
  background: rgba(255,255,255,.72); box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 10px 24px rgba(37,65,98,.07);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
#detailPageBoard .deck-card { position: relative; cursor: zoom-in; }
#detailPageBoard .deck-card:hover { transform: translateY(-2px); border-color: rgba(0,122,255,.38); box-shadow: inset 0 1px 0 #fff, 0 16px 30px rgba(37,65,98,.13); }
#detailPageBoard .deck-card:focus-visible,
#detailPageBoard .deck-add-card:focus-visible { outline: 3px solid rgba(0,122,255,.35); outline-offset: 3px; }
#detailPageBoard .deck-card.is-dragging { opacity: .45; transform: scale(.98); }
#detailPageBoard .deck-card.is-drop-before::before,
#detailPageBoard .deck-card.is-drop-after::after { content: ''; position: absolute; right: 10px; left: 10px; z-index: 3; border-top: 3px solid #0071e3; box-shadow: 0 0 0 1px rgba(255,255,255,.92); }
#detailPageBoard .deck-card.is-drop-before::before { top: -7px; }
#detailPageBoard .deck-card.is-drop-after::after { bottom: -7px; }
#detailPageBoard .deck-drag-ghost { position: fixed; z-index: 5200; margin: 0; pointer-events: none; opacity: .94; transform: rotate(1.5deg) scale(.98); border: 2px solid #0071e3; background: rgba(255,255,255,.96); box-shadow: 0 24px 48px rgba(13,35,65,.36), 0 0 0 5px rgba(0,113,227,.15); }
#detailPageBoard .deck-card.is-reroll-pending { border-color: rgba(255,149,0,.72); }
#detailPageBoard .deck-card-head { display: flex; justify-content: space-between; gap: 7px; padding: 10px 10px 8px; }
#detailPageBoard .deck-card-head > div:first-child { min-width: 0; display: grid; gap: 5px; }
#detailPageBoard .deck-card-head b { overflow: hidden; color: var(--di-ink); font-size: 0.867rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
#detailPageBoard .deck-screen-status { display: block; color: var(--di-muted); font-size: 0.8rem; font-weight: 720; line-height: 1.25; }
#detailPageBoard .deck-screen-status--queued,
#detailPageBoard .deck-screen-status--generating,
#detailPageBoard .deck-screen-status--retrying { color: #16835a; }
#detailPageBoard .deck-screen-status--completed { color: #16835a; }
#detailPageBoard .deck-screen-status--failed { color: #c4463d; }
#detailPageBoard .deck-sort-button { flex: 0 0 auto; border: 1px solid rgba(111,137,168,.24); border-radius: 8px; background: rgba(246,250,254,.88); color: #54708f; padding: 5px 7px; font-size: 0.8rem; font-weight: 750; line-height: 1; white-space: nowrap; }
#detailPageBoard .deck-sort-button:hover { border-color: rgba(0,122,255,.42); color: #0071e3; }
#detailPageBoard .deck-drag-handle { cursor: grab; touch-action: none; user-select: none; }
#detailPageBoard .deck-drag-handle:active { cursor: grabbing; }
#detailPageBoard .deck-delete-button:hover { border-color: rgba(255,59,48,.4); color: #ff3b30; }
#detailPageBoard .deck-reference-notice {
  display: flex; align-items: center; margin: 0 10px 10px; padding: 5px 7px; overflow: hidden;
  border: 1px solid rgba(255,149,0,.3); border-radius: 8px; background: rgba(255,149,0,.12); color: #a45d00;
  font-size: 0.8rem; font-style: normal; line-height: 1.35; text-overflow: ellipsis;
}
#detailPageBoard .deck-preview { position: relative; width: 100%; overflow: hidden; background: #e8eef4; }
#detailPageBoard .deck-preview-image { display: grid; place-items: center; }
#detailPageBoard .deck-image-loading { position: absolute; z-index: 1; color: #6f849a; font-size: 0.8rem; font-weight: 720; }
#detailPageBoard .deck-preview-image img { position: relative; z-index: 2; opacity: 0; transition: opacity .2s ease; }
#detailPageBoard .deck-preview-image.is-loaded img { opacity: 1; }
#detailPageBoard .deck-preview-image.is-loaded .deck-image-loading { display: none; }
#detailPageBoard .deck-image-error { display: grid; min-height: 180px; place-items: center; padding: 18px; color: #b14b43; font-size: 0.867rem; font-weight: 700; text-align: center; }
#detailPageBoard .deck-preview-placeholder { display: grid; min-height: 0; aspect-ratio: 3 / 4; place-content: center; gap: 4px; background: linear-gradient(145deg, #f7fafc, #e4edf6); color: #7b8da1; text-align: center; }
#detailPageBoard .deck-preview-placeholder span { font-size: 0.867rem; font-weight: 700; }
#detailPageBoard .deck-preview-placeholder small { font: 0.733rem ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
#detailPageBoard .deck-preview-generating { isolation: isolate; overflow: hidden; background: linear-gradient(145deg, #f7fafc, #e5edf6); color: #365b7d; }
#detailPageBoard .deck-preview-generating::before { content: ''; position: absolute; z-index: -1; inset: -45% -10%; background: linear-gradient(105deg, transparent 37%, rgba(255,255,255,.72) 49%, transparent 61%); animation: deck-generation-sweep 2.2s ease-in-out infinite; }
#detailPageBoard .deck-preview-generating .qiwei-brand-loader { width: 76px; height: 64px; margin: 0 auto 4px; }
#detailPageBoard .deck-preview-generating .qiwei-brand-loader .loader-ambient-glow { display: none !important; }
#detailPageBoard .deck-preview-generating .qiwei-brand-loader .loader-halo-ring { width: 48px; height: 48px; border-color: rgba(0, 190, 255, 0.45); }
#detailPageBoard .deck-preview-generating .qiwei-brand-loader .loader-symbol-wrap { width: 44px; height: 36px; background: transparent !important; }
#detailPageBoard .deck-preview-generating b { font-size: 0.933rem; letter-spacing: .04em; }
#detailPageBoard .deck-preview-generating span { color: #58708a; font-size: 0.8rem; font-weight: 650; }
#detailPageBoard .deck-preview-generating small { color: #4676a5; font-size: 0.733rem; font-weight: 760; }
#detailPageBoard .deck-generation-orbit { position: relative; width: 48px; height: 48px; margin: 0 auto 4px; }
#detailPageBoard .deck-generation-planet { position: absolute; z-index: 1; inset: 11px; overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 31% 28%, #d9edff 0 7%, #76b4e8 25%, #3f6f9d 72%); box-shadow: 0 0 0 7px rgba(76,133,190,.10), inset -6px -4px 8px rgba(31,65,98,.22); animation: deck-generation-planet-spin 2.8s linear infinite; }
#detailPageBoard .deck-generation-planet::before { content: ''; position: absolute; inset: 6px -5px; border-top: 2px solid rgba(236,248,255,.62); border-bottom: 2px solid rgba(31,65,98,.25); border-radius: 50%; transform: rotate(-23deg); }
#detailPageBoard .deck-generation-planet i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: rgba(31,65,98,.3); }
#detailPageBoard .deck-generation-planet i:first-child { top: 7px; left: 11px; }
#detailPageBoard .deck-generation-planet i:last-child { right: 7px; bottom: 8px; }
#detailPageBoard .deck-generation-orbit-path { position: absolute; inset: 1px; border: 1px solid rgba(76,133,190,.3); border-radius: 50%; transform: rotate(-22deg); animation: deck-generation-orbit 2.1s linear infinite; }
#detailPageBoard .deck-generation-moon { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #a5d3f8; box-shadow: 0 0 0 3px rgba(76,133,190,.12); }
#detailPageBoard .deck-position-menu button::before { content: '移动到'; margin-right: 3px; }
@keyframes deck-generation-orbit { from { transform: rotate(-22deg); } to { transform: rotate(338deg); } }
@keyframes deck-generation-planet-spin { to { transform: rotate(360deg); } }
@keyframes deck-generation-sweep { 0%, 100% { transform: translateX(-45%); } 50% { transform: translateX(45%); } }
@media (prefers-reduced-motion: reduce) { #detailPageBoard .deck-preview-generating::before, #detailPageBoard .deck-generation-planet, #detailPageBoard .deck-generation-orbit-path { animation: none; } }

#detailPageBoard .favorite-reconfirm-banner { grid-column: 1 / -1; display: grid; gap: 10px; padding: 18px; margin: 0 0 14px; border: 1px solid #e7a1a1; border-radius: 16px; background: #fff8f7; color: #432525; }
#detailPageBoard .favorite-reconfirm-banner > b { font-size: 16px; }
#detailPageBoard .favorite-reconfirm-banner p { margin: 0; line-height: 1.65; }
#detailPageBoard .favorite-reconfirm-checks { display: grid; gap: 8px; }
#detailPageBoard .favorite-reconfirm-checks label, #detailPageBoard .favorite-generation-ack { display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
#detailPageBoard .favorite-reconfirm-checks input, #detailPageBoard .favorite-generation-ack input { flex: 0 0 auto; margin-top: 3px; accent-color: #b83232; }
#detailPageBoard .favorite-reconfirm-highlight { outline: 2px solid #cf3a3a !important; outline-offset: 3px; animation: favorite-reconfirm-pulse 1.15s ease-in-out 3; }
#detailPageBoard .favorite-reconfirm-banner small { color: #7d3535; }
#detailPageBoard .favorite-reconfirm-banner [data-favorite-rebind] { justify-self: start; }
@keyframes favorite-reconfirm-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(207 58 58 / 12%); } 50% { box-shadow: 0 0 0 6px rgb(207 58 58 / 22%); } }
@media (prefers-reduced-motion: reduce) { #detailPageBoard .favorite-reconfirm-highlight { animation: none; } }
#detailPageBoard .deck-preview-image { aspect-ratio: var(--deck-preview-ratio, 3 / 4); }
#detailPageBoard .deck-preview-image img { display: block; width: 100%; height: auto; }
#detailPageBoard .deck-preview-image.deck-preview-tall { aspect-ratio: 1 / 2; }
#detailPageBoard .deck-preview-tall img { height: 100%; object-fit: cover; object-position: top; }
#detailPageBoard .deck-order-notice { margin: 0 0 9px; padding: 9px 12px; border: 1px solid rgba(0,122,255,.3); border-radius: 10px; background: linear-gradient(90deg, rgba(0,122,255,.15), rgba(232,246,255,.92)); color: #0065bc; font-size: 0.867rem; font-weight: 760; box-shadow: 0 9px 20px rgba(0,92,184,.12); animation: deck-order-notice-out 3s ease forwards; }
@keyframes deck-order-notice-out { 0%, 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-4px); } }
#detailPageBoard .scheme-list--pending { margin-top: 18px; }
#detailPageBoard .scheme-card--pending { min-height: 62px; padding: 12px 14px; pointer-events: none; }
#detailPageBoard .scheme-card--pending h3 { margin: 0; font-size: 1.15rem; }
#detailPageBoard .scheme-card--pending .scheme-title-band { display: block; height: 9px; margin-top: 8px; }
#detailPageBoard .deck-card-foot { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; padding: 8px 10px 10px; }
#detailPageBoard .deck-card-action { min-width: 0; border: 1px solid rgba(0,122,255,.16); border-radius: 7px; background: rgba(0,122,255,.08); color: #0071e3; padding: 6px 3px; font-size: 0.8rem; font-weight: 720; white-space: nowrap; }
#detailPageBoard .deck-card-action:hover { border-color: rgba(0,122,255,.4); background: rgba(0,122,255,.14); }
#detailPageBoard .deck-card-action.deck-delete-button { border-color: rgba(255,59,48,.14); background: rgba(255,59,48,.07); color: #d8433a; }
#detailPageBoard .deck-toolbar { display: flex; align-items: center; gap: 10px; }
#detailPageBoard .deck-toolbar > span { min-width: 0; margin-right: auto; }
#detailPageBoard .deck-toolbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
#detailPageBoard .deck-merge-jump,
#detailPageBoard .workshop-history-button { flex: 0 0 auto; white-space: nowrap; }

/* 04 合并长图：沿用工坊浅色纸张、蓝色操作和细线框，不另起一套视觉语言。 */
#detailPageBoard .long-image-panel { grid-column: 3; margin-top: 0; overflow: hidden; }
#detailPageBoard .long-image-head { min-height: 82px; }
#detailPageBoard .long-image-head h2 { margin: 0; font-size: 1.333rem; }
#detailPageBoard .long-image-head p { margin: 3px 0 0; color: var(--di-muted); font-size: 0.867rem; }
#detailPageBoard .long-image-actions { display: flex; gap: 8px; align-items: center; }
#detailPageBoard .long-image-layout { display: block; min-height: 0; }
#detailPageBoard .long-image-settings { display: grid; grid-template-columns: auto repeat(3, minmax(102px, 1fr)) auto; align-items: end; gap: 10px 12px; padding: 14px 16px; border-bottom: 1px solid rgba(111,137,168,.18); background: linear-gradient(90deg, rgba(242,248,254,.88), rgba(255,255,255,.72)); }
#detailPageBoard .long-image-settings > b { align-self: center; color: var(--di-ink); font-size: 0.933rem; white-space: nowrap; }
#detailPageBoard .long-image-settings label { display: grid; min-width: 0; gap: 5px; color: var(--di-muted); font-size: 0.8rem; font-weight: 730; }
#detailPageBoard .long-image-settings input { width: 100%; min-height: 0; color: var(--di-ink); }
#detailPageBoard .long-image-settings input[type="range"] { appearance: none; height: 5px; margin: 8px 0 0; border: 0; border-radius: 999px; background: linear-gradient(90deg, #0071e3, #83bcff); cursor: pointer; accent-color: #0071e3; }
#detailPageBoard .long-image-settings input[type="range"]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; background: #0071e3; box-shadow: 0 1px 5px rgba(32,82,132,.32); }
#detailPageBoard .long-image-settings output { color: #3172ae; font-size: 0.8rem; font-weight: 700; }
#detailPageBoard .long-image-settings small { grid-column: 2 / -1; margin-top: -5px; color: var(--di-muted); font-size: 0.8rem; line-height: 1.35; }
#detailPageBoard .canvas-color-row { display: flex; align-items: center; gap: 8px; min-height: 31px; }
#detailPageBoard .canvas-default-color,
#detailPageBoard .canvas-color-wheel { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(111,137,168,.4); border-radius: 50%; cursor: pointer; }
#detailPageBoard .canvas-default-color { background: #fff; color: transparent; font-size: 1.067rem; font-weight: 900; }
#detailPageBoard .canvas-default-color.is-selected { border: 2px solid #249856; background: #fff; color: #16835a; box-shadow: 0 0 0 3px rgba(36,152,86,.12); }
#detailPageBoard .canvas-default-color.is-custom { border-color: rgba(0,113,227,.74); background: var(--canvas-color, #fff); box-shadow: 0 0 0 3px rgba(0,113,227,.10); }
#detailPageBoard .canvas-color-wheel { background: conic-gradient(#ef5350, #ffc107, #43a047, #00acc1, #3f51b5, #ab47bc, #ef5350); box-shadow: inset 0 0 0 4px #fff; }
#detailPageBoard .canvas-color-setting input[type="color"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#detailPageBoard .canvas-color-setting { position: relative; }
#detailPageBoard .canvas-color-popover { position: absolute; z-index: 4; top: calc(100% + 9px); left: 0; display: grid; min-width: 258px; gap: 10px; border: 1px solid rgba(90,130,170,.30); border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 14px 30px rgba(38,67,97,.18); padding: 12px; color: var(--di-ink); }
#detailPageBoard .canvas-color-popover[hidden] { display: none !important; }
#detailPageBoard .canvas-color-popover > b { font-size: 0.867rem; }
#detailPageBoard .canvas-color-palette { position: relative; width: 100%; height: 154px; overflow: hidden; border: 0; border-radius: 9px; background: linear-gradient(to bottom, transparent, #000), linear-gradient(to right, #fff, hsl(var(--palette-hue, 0) 100% 50%)); cursor: crosshair; }
#detailPageBoard .canvas-color-palette:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
#detailPageBoard .canvas-color-palette i { position: absolute; width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(20,45,70,.52); pointer-events: none; transform: translate(-50%, -50%); }
#detailPageBoard .canvas-hue-control { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; color: var(--di-muted); font-size: 0.8rem; }
#detailPageBoard .canvas-hue-control input[type="range"] { width: 100%; margin: 0; accent-color: #0071e3; background: linear-gradient(90deg, #f33, #ff3, #3f3, #3ff, #33f, #f3f, #f33); }
#detailPageBoard .canvas-color-popover > span { display: flex; align-items: center; gap: 8px; }
#detailPageBoard .canvas-color-popover > span > i { width: 22px; height: 22px; border: 1px solid rgba(90,130,170,.34); border-radius: 50%; background: #fff; }
#detailPageBoard .canvas-color-popover output { color: #3172ae; font-size: 0.867rem; font-variant-numeric: tabular-nums; }
#detailPageBoard .canvas-color-popover > div { display: flex; justify-content: flex-end; gap: 7px; }
#detailPageBoard .long-image-run-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; white-space: nowrap; }
#detailPageBoard .long-image-run-actions .primary-button { min-width: 82px; }
#detailPageBoard .long-image-preview-wrap { min-width: 0; min-height: 960px; padding: 18px; background: linear-gradient(135deg, rgba(245,249,253,.92), rgba(232,240,249,.8)); }
#detailPageBoard .long-image-preview { display: grid; aspect-ratio: 3 / 4; min-height: 0; max-height: none; place-items: center; overflow: auto; border: 1px solid rgba(111,137,168,.18); border-radius: 16px; background-color: #eef3f8; background-image: linear-gradient(45deg, rgba(111,137,168,.08) 25%, transparent 25%), linear-gradient(-45deg, rgba(111,137,168,.08) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(111,137,168,.08) 75%), linear-gradient(-45deg, transparent 75%, rgba(111,137,168,.08) 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
/* 默认约 600px 的预览窗口额外拓高 360px，长图在画框内滚动查看。 */
#detailPageBoard .long-image-preview-wrap .long-image-preview { min-height: calc(960px - 36px); }
#detailPageBoard .long-image-preview canvas { display: block; max-width: 100%; height: auto; box-shadow: 0 14px 32px rgba(38,67,97,.16); }
#detailPageBoard .long-image-empty { display: grid; gap: 7px; padding: 28px; color: var(--di-muted); text-align: center; }
#detailPageBoard .long-image-empty span { color: #0071e3; font-size: 0.8rem; font-weight: 800; letter-spacing: .08em; }
#detailPageBoard .long-image-empty b { color: var(--di-ink); font-size: 1rem; }
#detailPageBoard .long-image-empty small { font-size: 0.867rem; line-height: 1.5; }
#detailPageBoard .long-image-preview-wrap > p { margin: 10px 2px 0; color: var(--di-muted); font-size: 0.867rem; }
#detailPageBoard .workshop-history-modal { width: min(700px, 100%); overflow-x: hidden; overscroll-behavior-x: none; touch-action: pan-y; }
#detailPageBoard .workshop-history-modal > p { margin: 0 0 14px; color: var(--di-muted); font-size: 0.867rem; line-height: 1.5; }
#detailPageBoard .workshop-history-list { display: grid; gap: 8px; max-width: 100%; max-height: min(58vh, 580px); overflow-x: hidden; overflow-y: auto; overscroll-behavior-x: none; }
#detailPageBoard .workshop-history-list::-webkit-scrollbar:horizontal { display: none; }
#detailPageBoard .workshop-history-item { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; border: 1px solid rgba(111,137,168,.2); border-radius: 12px; background: rgba(255,255,255,.78); color: var(--di-ink); padding: 7px; text-align: left; }
#detailPageBoard .workshop-history-item:hover { border-color: rgba(0,122,255,.4); background: rgba(238,247,255,.86); }
#detailPageBoard .workshop-history-item img,
#detailPageBoard .workshop-history-cover { display: grid; width: 74px; height: 74px; place-items: center; overflow: hidden; border-radius: 8px; background: #edf2f7; color: #7b8da1; font-size: 0.8rem; object-fit: cover; text-align: center; }
#detailPageBoard .workshop-history-item > span { display: grid; min-width: 0; gap: 3px; }
#detailPageBoard .workshop-history-item b { overflow: hidden; font-size: 0.867rem; text-overflow: ellipsis; white-space: nowrap; }
#detailPageBoard .workshop-history-item small,
#detailPageBoard .workshop-history-item em { color: var(--di-muted); font-size: 0.8rem; font-style: normal; }
@media (max-width: 820px) { #detailPageBoard .generation-head { flex-wrap: wrap; } #detailPageBoard .long-image-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); } #detailPageBoard .long-image-settings > b, #detailPageBoard .long-image-settings small { grid-column: 1 / -1; } }
#detailPageBoard .deck-add-card { display: grid; min-height: 0; place-content: center; gap: 5px; border-style: dashed; color: #5b7694; text-align: center; }
#detailPageBoard .deck-add-card:hover { border-color: #0071e3; background: rgba(238,247,255,.88); color: #0071e3; }
#detailPageBoard .deck-add-card > span { font-size: 1.667rem; line-height: 1; }
#detailPageBoard .deck-add-card b { font-size: 0.867rem; }
#detailPageBoard .deck-add-card small { font-size: 0.8rem; }
#detailPageBoard .screen-summary-list { display: grid; gap: 7px; padding-left: 22px; }
#detailPageBoard .screen-summary-list li { display: grid; gap: 3px; color: var(--di-muted); font-size: 0.933rem; line-height: 1.5; }
#detailPageBoard .screen-summary-list b { color: var(--di-ink); font-size: 0.933rem; }
#detailPageBoard .screen-summary-list em { color: #a45d00; font-size: 0.867rem; font-style: normal; }
#detailPageBoard .deck-add-modal { width: min(660px, 100%); }
#detailPageBoard .deck-module-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 16px; }
#detailPageBoard .deck-module-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid rgba(106,135,166,.22); border-radius: 11px; background: rgba(255,255,255,.74); color: var(--di-ink); padding: 10px; text-align: left; }
#detailPageBoard .deck-module-option span { color: #0071e3; font-size: 0.8rem; }
#detailPageBoard .deck-module-option.is-selected { cursor: not-allowed; background: rgba(235,240,245,.7); color: #8694a3; }
#detailPageBoard .deck-module-option.is-selected span { color: #8694a3; }
#detailPageBoard .preview-modal { display: grid; width: min(1120px, 100%); max-height: calc(100vh - 32px); grid-template-rows: auto minmax(0,1fr) auto auto; overflow: hidden; }
#detailPageBoard .preview-modal-head { padding-right: 34px; }
#detailPageBoard .preview-modal-head h2 { margin: 4px 0; font-size: 1.333rem; }
#detailPageBoard .preview-modal-head p { margin: 0; color: var(--di-muted); font-size: 0.867rem; }
#detailPageBoard .preview-stage { display: grid; min-height: min(68vh, 700px); margin-top: 12px; place-items: center; overflow: hidden; background: transparent; cursor: grab; touch-action: none; }
#detailPageBoard .preview-stage:active { cursor: grabbing; }
#detailPageBoard .preview-transform { display: grid; max-width: 100%; max-height: 100%; place-items: center; transition: transform .06s linear; will-change: transform; }
#detailPageBoard .preview-transform img { display: block; width: auto; max-width: 100%; max-height: min(68vh, 700px); object-fit: contain; }
#detailPageBoard .preview-missing { display: grid; min-width: 220px; min-height: 300px; place-items: center; color: var(--di-muted); }
#detailPageBoard .preview-controls { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 14px; }
#detailPageBoard .preview-controls span { min-width: 48px; color: var(--di-muted); font-size: 0.867rem; text-align: center; }
#detailPageBoard .preview-gesture-hint { margin: 10px 0 0; color: var(--di-muted); font-size: 0.8rem; text-align: center; }
@media (max-width: 1280px) { #detailPageBoard .workspace-grid { grid-template-columns: minmax(280px,.84fr) minmax(430px,1.16fr); } #detailPageBoard .generation-panel, #detailPageBoard .long-image-panel { grid-column: 1 / -1; max-height: none; } #detailPageBoard .deck-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px) { #detailPageBoard .generation-head { align-items: flex-start; flex-wrap: wrap; } #detailPageBoard .generation-head > div { flex: 1 1 calc(100% - 45px); } #detailPageBoard .deck-model-controls { flex: 1 1 100%; grid-template-columns: repeat(3, minmax(0,1fr)); } #detailPageBoard .scheme-summary { grid-template-columns: auto minmax(0, 1fr); } #detailPageBoard .scheme-toggle { grid-column: 2; grid-row: auto; justify-self: end; margin-top: 4px; } #detailPageBoard .deck-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } #detailPageBoard .deck-module-options { grid-template-columns: 1fr; } #detailPageBoard .preview-stage { min-height: 48vh; } }
@media (max-width: 440px) { #detailPageBoard .deck-grid { grid-template-columns: 1fr; } }
:root[data-theme="dark"] #detailPageBoard .deck-scroll { background: linear-gradient(180deg, rgba(15,24,37,.88), rgba(19,29,44,.7)); }
:root[data-theme="dark"] #detailPageBoard .product-mode-guide { color: #f3f7ff; }
:root[data-theme="dark"] #detailPageBoard .favorite-modal-hint,
:root[data-theme="dark"] #detailPageBoard .favorite-item p { color: #a9bdd2; }
:root[data-theme="dark"] #detailPageBoard .favorite-item,
:root[data-theme="dark"] #detailPageBoard .favorite-group-tag { border-color: rgba(201,219,244,.14); background: rgba(40,53,71,.78); color: #c1cfe2; }
:root[data-theme="dark"] #detailPageBoard .favorite-item strong { color: #edf4ff; }
:root[data-theme="dark"] #detailPageBoard .favorite-group-tag.active { border-color: rgba(10,132,255,.60); background: rgba(10,132,255,.19); color: #8dcbff; }
:root[data-theme="dark"] #detailPageBoard .favorite-mode-group,
:root[data-theme="dark"] #detailPageBoard .favorite-group { border-top-color: rgba(201,219,244,.14); }
:root[data-theme="dark"] #detailPageBoard .favorite-mode-toggle,
:root[data-theme="dark"] #detailPageBoard .favorite-group-toggle { color: #edf4ff; }
:root[data-theme="dark"] #detailPageBoard .scheme-card.active { border-color: #59adff; box-shadow: 0 0 0 2px rgba(89,173,255,.25), 0 13px 28px rgba(0,0,0,.2); }
:root[data-theme="dark"] #detailPageBoard .deck-toolbar,
:root[data-theme="dark"] #detailPageBoard .deck-empty,
:root[data-theme="dark"] #detailPageBoard .deck-card-foot { color: #a9bdd2; }
:root[data-theme="dark"] #detailPageBoard .deck-card,
:root[data-theme="dark"] #detailPageBoard .deck-add-card,
:root[data-theme="dark"] #detailPageBoard .deck-module-option,
:root[data-theme="dark"] #detailPageBoard .deck-model-field select,
:root[data-theme="dark"] #detailPageBoard .scheme-favorite-button { border-color: rgba(202,220,243,.15); background: rgba(31,43,59,.76); color: #eaf2ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 24px rgba(0,0,0,.16); }
:root[data-theme="dark"] #detailPageBoard .deck-card-head b,
:root[data-theme="dark"] #detailPageBoard .deck-empty h2,
:root[data-theme="dark"] #detailPageBoard .screen-summary-list b { color: #edf4ff; }
:root[data-theme="dark"] #detailPageBoard .deck-preview { background: #142131; }
:root[data-theme="dark"] #detailPageBoard .deck-preview-placeholder { background: linear-gradient(145deg, #202e40, #142131); color: #a9bdd2; }
:root[data-theme="dark"] #detailPageBoard .deck-card-action { border-color: rgba(10,132,255,.36); background: rgba(10,132,255,.15); color: #8dcbff; }
:root[data-theme="dark"] #detailPageBoard .deck-card-action.deck-delete-button { border-color: rgba(255,107,98,.30); background: rgba(255,59,48,.12); color: #ff9b95; }
:root[data-theme="dark"] #detailPageBoard .deck-add-card { color: #9ecfff; }
:root[data-theme="dark"] #detailPageBoard .deck-reference-notice { color: #ffc36b; }
:root[data-theme="dark"] #detailPageBoard .scheme-favorite-button.is-favorited { border-color: rgba(255,195,107,.5); background: rgba(255,149,0,.18); color: #ffd18a; }
:root[data-theme="dark"] #detailPageBoard .scheme-title-band { background: linear-gradient(90deg, rgba(178,124,35,.58), rgba(241,198,112,.76), rgba(142,95,27,.55)); box-shadow: inset 0 1px 0 rgba(255,239,196,.18); }
:root[data-theme="dark"] #detailPageBoard .deck-drag-ghost { background: rgba(21,32,47,.96); border-color: #61b5ff; box-shadow: 0 24px 48px rgba(0,0,0,.45), 0 0 0 5px rgba(97,181,255,.18); }
:root[data-theme="dark"] #detailPageBoard .deck-order-notice { border-color: rgba(102,188,255,.36); background: linear-gradient(90deg, rgba(10,132,255,.22), rgba(27,45,67,.94)); color: #a9d8ff; }
:root[data-theme="dark"] #detailPageBoard .long-image-settings { border-color: rgba(202,220,243,.14); background: linear-gradient(180deg, rgba(26,39,55,.94), rgba(20,31,46,.88)); }
:root[data-theme="dark"] #detailPageBoard .long-image-settings > b,
:root[data-theme="dark"] #detailPageBoard .long-image-empty b { color: #edf4ff; }
:root[data-theme="dark"] #detailPageBoard .long-image-settings label,
:root[data-theme="dark"] #detailPageBoard .long-image-settings small,
:root[data-theme="dark"] #detailPageBoard .long-image-preview-wrap > p,
:root[data-theme="dark"] #detailPageBoard .long-image-empty { color: #a9bdd2; }
:root[data-theme="dark"] #detailPageBoard .long-image-settings input,
:root[data-theme="dark"] #detailPageBoard .long-image-settings select,
:root[data-theme="dark"] #detailPageBoard .workshop-history-item { border-color: rgba(202,220,243,.16); background: rgba(31,43,59,.9); color: #edf4ff; }
:root[data-theme="dark"] #detailPageBoard .long-image-preview-wrap { background: linear-gradient(135deg, rgba(17,29,44,.96), rgba(24,37,54,.9)); }
:root[data-theme="dark"] #detailPageBoard .long-image-preview { border-color: rgba(202,220,243,.15); background-color: #142131; }
:root[data-theme="dark"] #detailPageBoard .workshop-history-item:hover { border-color: rgba(102,188,255,.46); background: rgba(36,55,76,.94); }

#detailPageBoard .deck-sort-wrap { display: grid; justify-items: end; gap: 5px; }
#detailPageBoard .deck-position-select { min-width: 106px; max-width: 100%; border: 1px solid var(--di-line); border-radius: 6px; background: var(--di-paper); color: var(--di-ink); padding: 4px 7px; font-size: 0.8rem; }
:root[data-theme="dark"] #detailPageBoard .deck-position-select { border-color: rgba(202,220,243,.18); background: rgba(31,43,59,.96); color: #edf4ff; }
:root[data-theme="dark"] #detailPageBoard .product-mode-guide .mode-name { color: #ff8562; }
:root[data-theme="dark"] #detailPageBoard .scheme-card.active { border-color: #66c5ff; outline-color: rgba(102,197,255,.62); box-shadow: 0 0 0 5px rgba(59,173,255,.24), 0 16px 32px rgba(0,0,0,.30); }

/* 收藏夹采用稳定的行内操作，不用位移动画，避免鼠标掠过时发生抖动。 */
#detailPageBoard .favorite-group-actions button:hover { transform: none !important; box-shadow: none !important; }
#detailPageBoard .favorite-group-rename-form { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 4px; }
#detailPageBoard .favorite-group-rename-form input { box-sizing: border-box; flex: 0 1 auto; min-width: 0; max-width: min(160px, 45vw); border: 1px solid rgba(0,122,255,.42); border-radius: 5px; background: var(--di-paper); color: var(--di-ink); padding: 3px 5px; font-size: 0.8rem; }
#detailPageBoard .favorite-group-rename-form small { flex: 0 0 auto; color: var(--di-muted); font-size: 0.8rem; }
#detailPageBoard .favorite-group-rename-form button { border: 1px solid var(--di-line); border-radius: 5px; background: var(--di-paper); color: var(--di-muted); padding: 3px 5px; font-size: 0.8rem; white-space: nowrap; }

/* 模式切换是短标题，使用比正文更高一级的字号，保留紧凑的头部节奏。 */
#detailPageBoard .product-panel .workspace-mode button { min-height: 30px; padding: 0 8px; font-size: 15px !important; font-size: 1rem !important; font-weight: 780; }

/* 初始态也要可读，不能用低对比度装饰文本代替状态。 */
#detailPageBoard .scheme-card--pending .scheme-number { color: #9c4c12 !important; font-weight: 800; }
#detailPageBoard .scheme-card--pending h3 { color: #3d281c !important; font-weight: 800; }
#detailPageBoard .scheme-card--pending .scheme-title-band { opacity: .88; }

/* 三张方案的卡片外壳统一圆角，标题金带同步裁在壳内。 */
#detailPageBoard .scheme-card { border-radius: 14px; overflow: hidden; }
#detailPageBoard .scheme-summary { border-radius: 13px; }
#detailPageBoard .scheme-title-band { border-radius: 12px 12px 2px 2px; }

/* 排序菜单只呈现可选屏位，不再额外放置“移动到…”占位项。 */
#detailPageBoard .deck-position-menu { display: grid; min-width: 106px; overflow: hidden; border: 1px solid rgba(0,122,255,.28); border-radius: 8px; background: var(--di-paper); box-shadow: 0 10px 20px rgba(45,82,123,.14); }
#detailPageBoard .deck-position-menu button { border: 0; border-top: 1px solid rgba(111,137,168,.14); background: transparent; color: var(--di-ink); padding: 6px 8px; font-size: 0.8rem; font-weight: 720; text-align: left; }
#detailPageBoard .deck-position-menu button:first-child { border-top: 0; }
#detailPageBoard .deck-position-menu button:hover { background: rgba(0,122,255,.10); color: #0071e3; }
:root[data-theme="dark"] #detailPageBoard .deck-position-menu { border-color: rgba(102,188,255,.32); background: rgba(31,43,59,.98); }
:root[data-theme="dark"] #detailPageBoard .deck-position-menu button { border-top-color: rgba(202,220,243,.12); color: #edf4ff; }
:root[data-theme="dark"] #detailPageBoard .scheme-card--pending .scheme-number { color: #ffc17a !important; }
:root[data-theme="dark"] #detailPageBoard .scheme-card--pending h3 { color: #f6e7cf !important; }

/* 收藏夹弹窗只允许纵向阅读，不保留横向滑轨或横向手势位移。 */
#detailPageBoard .favorites-modal { overflow-x: hidden; overscroll-behavior-x: none; touch-action: pan-y; }
#detailPageBoard .favorites-modal .favorite-list { min-width: 0; max-width: 100%; overflow-x: hidden; scrollbar-width: none; }
#detailPageBoard .favorites-modal .favorite-list::-webkit-scrollbar:horizontal { display: none; }
#detailPageBoard .favorites-modal .favorite-mode-group,
#detailPageBoard .favorites-modal .favorite-group,
#detailPageBoard .favorites-modal .favorite-group-head { min-width: 0; max-width: 100%; }

/* 电商工坊上传区域统一图片矢量图标（遵循全站质感加号卡片标准） */
#detailPageBoard .drop-empty {
  margin-bottom: 8px !important;
}
#detailPageBoard .reference-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#detailPageBoard .reference-add-button svg {
  display: block;
  width: 16px;
  height: 16px;
}

#detailPageBoard .deck-canvas-export-notice { margin: 4px 0 10px; font-size: 12px; line-height: 1.6; color: #586b83; }
#detailPageBoard .deck-canvas-export-notice a { color: #1769d2; text-decoration: underline; }
#detailPageBoard .deck-toolbar-host { flex: 0 0 auto; padding: 10px 14px; border-bottom: 1px solid var(--di-line, #dbe4ef); background: var(--di-surface, #f8fbff); }
#detailPageBoard .deck-toolbar-host .deck-toolbar { margin: 0; flex-wrap: wrap; }
#detailPageBoard .image-crop-tool { padding: 20px; border-bottom: 1px solid var(--di-line, #dbe4ef); }
#detailPageBoard .image-crop-tool h3 { margin: 0 0 8px; }
#detailPageBoard .image-crop-tool p { color: var(--di-muted); font-size: 13px; line-height: 1.6; }
#detailPageBoard .crop-controls { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
#detailPageBoard .crop-controls label { display: grid; gap: 6px; min-width: 120px; }
#detailPageBoard .crop-controls input[type=number] { width: 120px; }
#detailPageBoard .crop-dropzone { display: flex; justify-content: center; align-items: center; min-height: 240px; padding: 16px; border: 2px dashed #b7cce7; border-radius: 16px; background: #edf3f9; }
#detailPageBoard .crop-dropzone.is-dragover { border-color: #0071e3; background: #e1efff; }
#detailPageBoard #cropCanvas { max-width: 100%; max-height: 520px; width: auto; height: auto; cursor: grab; touch-action: none; }
#detailPageBoard #cropCanvas[hidden] { display: none; }
#detailPageBoard .crop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#detailPageBoard .crop-actions label { cursor: pointer; }

#detailPageBoard #cropViewport { position: relative; overflow: hidden; flex: none; cursor: grab; touch-action: none; }
#detailPageBoard #cropPreviewImage { position: absolute; max-width: none; max-height: none; pointer-events: none; user-select: none; }
#detailPageBoard #cropViewport[hidden], #detailPageBoard #longImageCanvas[hidden] { display: none; }

#detailPageBoard #cropDisclosure > summary { cursor: pointer; }
#detailPageBoard #cropDisclosure > summary h3 { display: inline; }
#detailPageBoard .crop-thumbnails { display: flex; overflow-x: auto; gap: 8px; margin-top: 12px; }
#detailPageBoard .crop-thumbnail { flex: none; padding: 4px; width: 92px; border: 2px solid transparent; border-radius: 8px; background: #edf3f9; }
#detailPageBoard .crop-thumbnail[aria-pressed="true"] { border-color: #0071e3; }
#detailPageBoard .crop-thumbnail img { width: 80px; height: 60px; object-fit: contain; }
#detailPageBoard .crop-thumbnail span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
#detailPageBoard .crop-export-mode { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }

/* Merge controls stay in document flow; only the long preview scrolls. */
#detailPageBoard .long-image-panel { height: auto; max-height: none; overflow: visible; }
#detailPageBoard .long-image-head, #detailPageBoard .image-crop-tool, #detailPageBoard .long-image-layout { flex: 0 0 auto; }
#detailPageBoard .long-image-head { flex-wrap: wrap; }
#detailPageBoard .long-image-actions { flex-wrap: wrap; margin-left: auto; }
#detailPageBoard .long-image-preview-wrap { min-height: 0; }
#detailPageBoard .long-image-preview-wrap .long-image-preview { display: block; aspect-ratio: auto; min-height: 240px; height: min(65vh, 700px); max-height: 700px; overflow: auto; }
#detailPageBoard .long-image-empty { min-height: 240px; }
#detailPageBoard .long-image-empty[hidden], #detailPageBoard .long-image-preview canvas[hidden] { display: none !important; }

/* Keep output and merge panels consecutive, independently of the tall product form. */
@media (min-width: 1281px) {
  #detailPageBoard .product-panel { grid-column: 1; grid-row: 1 / span 2; }
  #detailPageBoard .plan-panel { grid-column: 2; grid-row: 1 / span 2; }
  #detailPageBoard .generation-panel { grid-column: 3; grid-row: 1; align-self: start; }
  #detailPageBoard .long-image-panel { grid-column: 3; grid-row: 2; align-self: start; }
  #detailPageBoard .workspace-grid { grid-template-rows: auto 1fr; align-items: start; }
}

#detailPageBoard .generation-head > div:nth-child(2) { margin-right: 0; }
#detailPageBoard .generation-head > div.deck-model-controls { margin-left: auto; margin-right: 0; }

/* Keep the model and clarity selectors next to the generate action. */
#detailPageBoard .generation-head > div:nth-child(2) { flex: 1 1 auto; margin-right: 0; }
#detailPageBoard .generation-head > div.deck-model-controls {
  flex: 0 1 260px;
  width: 260px;
  margin: 0 12px 0 16px;
  grid-template-columns: minmax(142px, 1fr) minmax(72px, .55fr) 0;
}
