/* TRIZ3D layout-r1: shared presentation only, no service or task changes. */
:root {
  --site-ui-font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", Arial, sans-serif;
}
body { font-family: var(--site-ui-font); line-height: 1.6; }
.app-shell.workshop-shell {
  --font: var(--site-ui-font);
  font-family: var(--site-ui-font);
  line-height: 1.6;
}
.app-shell.workshop-shell :is(button,input,select,textarea) { font-family: inherit; }
.app-shell.workshop-shell :is(.main-shell,.main-content,.workflow-studio,.creation-studio,
  .product-records,.result-register,.video-studio,.h3-production,.ec-studio) { min-width: 0; }
.app-shell.workshop-shell :is(.page-heading,.workflow-stage-heading,.creation-banner,
  .archive-hero,.archive-detail>header,.archive-import>header,.archive-version-heading,
  .archive-batch-summary,.archive-file-role,.archive-preview header,.archive-continue,
  .rr-heading,.rr-toolbar,.rr-pager,.rr-dialog-head,.rr-dialog footer,.feature-help) {
  flex-wrap: wrap;
  min-width: 0;
}
.app-shell.workshop-shell :is(.page-heading,.archive-hero,.archive-detail>header,
  .archive-file-role,.archive-preview header,.archive-continue,.rr-heading,.rr-toolbar) > :is(div,span,h2,h3) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.app-shell.workshop-shell :is(.ec-actions,.ec-heading-actions,.ec-slot-actions,
  .archive-actions,.archive-entry-actions,.archive-bulk,.rr-actions,.rr-detail-tools,
  .agent-result-actions,.creation-actions,.video-actions,.h3-heading-actions,.h3-picture-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.app-shell.workshop-shell :is(.ec-actions,.ec-heading-actions,.ec-slot-actions,
  .archive-actions,.archive-entry-actions,.archive-bulk,.rr-actions,.rr-detail-tools,
  .agent-result-actions,.creation-actions,.video-actions,.h3-heading-actions,.h3-picture-actions) > :is(button,a) {
  flex: 0 0 auto;
  max-width: 100%;
  height: auto;
  min-height: 36px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.5;
}
.app-shell.workshop-shell :is(.archive-entry-actions,.h3-heading-actions) { min-width: 0; }

/* A filename, status and actions are one record, never competing columns. */
.app-shell.workshop-shell .ec-studio {
  container: commerce / inline-size;
  width: 100%;
  padding: clamp(12px, 2vw, 24px);
  gap: 20px;
  font-size: 14px;
  line-height: 1.6;
  --ec-ink: var(--site-text, #263447);
  --ec-text: var(--site-muted, #607085);
  --ec-line: var(--site-line, #dce3ec);
}
.app-shell.workshop-shell .ec-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
.app-shell.workshop-shell .ec-heading h1 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.35; letter-spacing: 0; }
.app-shell.workshop-shell .ec-heading > * { min-width: 0; max-width: 100%; }
.app-shell.workshop-shell .ec-studio h2 { font-size: 21px; line-height: 1.45; }
.app-shell.workshop-shell .ec-studio h3 { font-size: 17px; line-height: 1.5; }
.app-shell.workshop-shell .ec-card { padding: clamp(16px, 1.6vw, 24px); gap: 16px; }
.app-shell.workshop-shell .ec-card > header { flex-wrap: wrap; align-items: flex-start; }
.app-shell.workshop-shell .ec-layout { grid-template-columns: minmax(320px, .85fr) minmax(0, 1.3fr); gap: 20px; }
.app-shell.workshop-shell .ec-layout > * { min-width: 0; }
.app-shell.workshop-shell .ec-row[id^="ec-import-"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--ec-line);
  border-radius: 8px;
  background: var(--site-bg, #f6f8fb);
}
.app-shell.workshop-shell .ec-row[id^="ec-import-"] > span {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.app-shell.workshop-shell .ec-import-recovery { width: 100%; min-width: 0; gap: 9px; }
.app-shell.workshop-shell .ec-import-recovery > strong {
  justify-self: start;
  padding: 3px 8px;
  border: 1px solid var(--site-action-line, #c7d6f1);
  border-radius: 5px;
  background: var(--site-action-tint, #edf3ff);
  color: var(--site-action, #315bc4);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}
.app-shell.workshop-shell .ec-import-recovery small { font-size: 13px; line-height: 1.65; word-break: normal; overflow-wrap: anywhere; }
.app-shell.workshop-shell .ec-import-recovery .ec-actions { margin-top: 3px; }
.app-shell.workshop-shell .ec-import-recovery .ec-actions > button { padding: 8px 11px; font-size: 14px; }
.app-shell.workshop-shell .ec-studio .ec-fields { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.app-shell.workshop-shell .ec-studio :is(label,.ec-sku,.ec-editor,.ec-product-body,.ec-modal) { min-width: 0; }
.app-shell.workshop-shell .ec-studio :is(input,select,textarea) { font-size: 14px; line-height: 1.5; }
.app-shell.workshop-shell .ec-studio :is(.ec-notes,.ec-error,.ec-execution,.ec-issue-row) { overflow-wrap: anywhere; }
.app-shell.workshop-shell .ec-batch-title { flex-wrap: wrap; align-items: flex-start; }
.app-shell.workshop-shell .ec-batch-title h2 { min-width: 0; overflow-wrap: anywhere; }
.app-shell.workshop-shell .ec-history { flex-wrap: wrap; }
.app-shell.workshop-shell .ec-history label { flex: 1 1 340px; min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); }
.app-shell.workshop-shell .ec-history select { width: 100%; max-width: 100%; }
.app-shell.workshop-shell .ec-modal { width: min(540px, 100%); max-height: calc(100dvh - 36px); overflow: auto; }
.app-shell.workshop-shell .ec-workflow-guide li { min-width: min(130px, 100%); }
.app-shell.workshop-shell .ec-workflow-guide li button > span { flex: 0 0 25px; }
.app-shell.workshop-shell .ec-guide-body > div { min-width: 0; }
.app-shell.workshop-shell .ec-guide-body > button { max-width: 100%; white-space: normal; }
@container commerce (max-width: 980px) {
  .app-shell.workshop-shell .ec-layout { grid-template-columns: minmax(0, 1fr); }
  .app-shell.workshop-shell .ec-guide-body { flex-direction: column; align-items: stretch; }
  .app-shell.workshop-shell .ec-guide-body > button { align-self: flex-start; }
}

/* Task details must fit the panel width, including inside the design workspace. */
.app-shell.workshop-shell .agent-monitor { min-width: 0; font-size: 13px; }
.app-shell.workshop-shell .agent-monitor :is(.agent-monitor-top,.agent-monitor-node,li) { flex-wrap: wrap; align-items: flex-start; }
.app-shell.workshop-shell .agent-monitor-top > strong { flex: 1 1 160px; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.app-shell.workshop-shell .agent-monitor :is(.agent-monitor-node,li) > :is(span,strong) { min-width: 0; overflow-wrap: anywhere; }
.app-shell.workshop-shell .agent-monitor :is(.agent-monitor-times,.agent-monitor-node small) { font-size: 12px; white-space: normal; }
.app-shell.workshop-shell .product-history button { flex-wrap: wrap; align-items: flex-start; font-size: 13px; line-height: 1.6; }
.app-shell.workshop-shell .product-history button > :is(span,strong) { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.app-shell.workshop-shell :is(.result-sheet,.agent-round-panel,.rr-files,.archive-file-list) { min-width: 0; overflow-wrap: anywhere; }
.app-shell.workshop-shell .rr-file-row { flex-wrap: wrap; }
.app-shell.workshop-shell .rr-file-row > a { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.app-shell.workshop-shell .rr-categories { flex-wrap: wrap; gap: 8px 20px; }
.app-shell.workshop-shell .rr-detail-body { grid-template-columns: repeat(auto-fit,minmax(min(250px,100%),1fr)); }
.app-shell.workshop-shell .archive-file-list article > div { flex-wrap: wrap; min-width: 0; }
.app-shell.workshop-shell .archive-filters { grid-template-columns: repeat(auto-fit,minmax(min(190px,100%),1fr)); }
.app-shell.workshop-shell .archive-filters > * { min-width: 0; width: 100%; }

/* Video settings are often narrower than the browser, so use a panel query. */
.app-shell.workshop-shell .h3-settings { container: h3settings / inline-size; }
.app-shell.workshop-shell .h3-worker { grid-template-columns: 90px 96px minmax(0,2fr) minmax(0,1.4fr); }
.app-shell.workshop-shell .h3-worker > :is(input,select) { min-width: 0; width: 100%; }
.app-shell.workshop-shell .h3-batch-grid { grid-template-columns: repeat(auto-fill,minmax(min(250px,100%),1fr)); }
.app-shell.workshop-shell .h3-gallery-dialog { max-width: calc(100vw - 24px); }
.app-shell.workshop-shell .h3-gallery-dialog :is(header,footer,nav) { flex-wrap: wrap; }
.app-shell.workshop-shell .h3-gallery-dialog footer > div { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.app-shell.workshop-shell .h3-gallery-filters > * { min-width: 0; }
.app-shell.workshop-shell .h3-process :is(p,small,pre) { overflow-wrap: anywhere; }
@container h3settings (max-width: 680px) {
  .app-shell.workshop-shell .h3-worker { grid-template-columns: 90px minmax(0,1fr); }
  .app-shell.workshop-shell .h3-worker > input { grid-column: 1 / -1; }
  .app-shell.workshop-shell .h3-setting-grid { grid-template-columns: repeat(auto-fit,minmax(min(180px,100%),1fr)); }
}
@media (max-width: 600px) {
  .app-shell.workshop-shell .ec-studio { padding: 8px 0; }
  .app-shell.workshop-shell .ec-layout { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .app-shell.workshop-shell .ec-card { padding: 14px; }
  .app-shell.workshop-shell .ec-row[id^="ec-import-"] { padding: 12px; }
  .app-shell.workshop-shell .ec-workflow-guide { padding: 14px; }
  .app-shell.workshop-shell .ec-workflow-guide li { min-width: 42%; }
  .app-shell.workshop-shell .ec-bulk-row { grid-template-columns: minmax(0,1fr); }
  .app-shell.workshop-shell .ec-bulk-row > * { min-width: 0; grid-column: auto; }
  .app-shell.workshop-shell .archive-import > .archive-form-row { grid-template-columns: minmax(0,1fr); }
  .app-shell.workshop-shell .h3-gallery-filters { grid-template-columns: minmax(0,1fr); }
}

/* Keep file names and follow-up actions readable in narrow result panels. */
.app-shell.workshop-shell .rr-file-row {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 8px;
  padding: 10px 0;
}
.app-shell.workshop-shell .rr-file-row > a { width: 100%; }
.app-shell.workshop-shell .rr-file-row > a > span { min-width: 0; }
.app-shell.workshop-shell .rr-file-row > button {
  justify-self: start;
  max-width: 100%;
  padding: 8px 10px;
  white-space: normal;
  font-size: 13px;
  line-height: 1.5;
}
.app-shell.workshop-shell .rr-actions > button:not([aria-expanded]) { font-size: 13px; white-space: normal; }
.app-shell.workshop-shell .rr-scope { padding-inline: 18px; }
.app-shell.workshop-shell .rr-categories { padding-inline: 14px; }
.app-shell.workshop-shell .h3-gallery-dialog header { display: grid; grid-template-columns: minmax(0,1fr) auto; }
.app-shell.workshop-shell .h3-gallery-dialog header > div { min-width: 0; overflow-wrap: anywhere; }
.app-shell.workshop-shell .h3-gallery-dialog header > button { align-self: start; }
@media (max-width: 760px) {
  .app-shell.workshop-shell .rr-table tbody > tr:not(.rr-detail) { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .app-shell.workshop-shell .rr-table td { min-width: 0; }
  .app-shell.workshop-shell .rr-table tbody > tr:not(.rr-detail) > td:last-child { grid-column: 1 / -1; padding-top: 8px; }
  .app-shell.workshop-shell .rr-table .rr-actions { justify-content: flex-start; }
}
