/* Shared downloads remain visible when switching between AI and manual editing. */
.workshop-drawer { display:flex; flex-direction:column; min-height:0; }
.workshop-drawer-inner, .workshop-drawer .direct-workshop-editor { flex:1; min-height:0; height:auto; }
.workshop-mode-switch { display:flex; flex-shrink:0; gap:4px; margin:18px 76px 0 22px; padding:5px; border-radius:13px; background:#eee6db; }
.workshop-mode-switch button { flex:1; border:0; border-radius:9px; background:transparent; color:#8c715a; min-height:38px; font:inherit; font-size:13px; cursor:pointer; transition:background .18s,color .18s,box-shadow .18s; }
.workshop-mode-switch button[aria-pressed=true] { background:#fffcf7; color:#65472e; box-shadow:0 2px 8px #49321e12; }
.workshop-mode-switch button:disabled { opacity:.5; cursor:wait; }
.workshop-mode-switch button:focus-visible { outline:2px solid #b78656; outline-offset:3px; }
.direct-workshop-tools { flex-shrink:0; }
.direct-parameter-row label { margin-bottom:9px; }
.direct-parameter-inputs .direct-parameter-row input[type=range] { display:block; width:100%; padding:0; margin:6px 0 0; border:0; background:transparent; accent-color:#a47955; cursor:pointer; min-height:28px; }
.direct-parameter-row input:disabled { cursor:wait; }
#directEditFields:disabled .button { opacity:.45; box-shadow:none; cursor:not-allowed; }
#directEditFields:disabled input { cursor:not-allowed; }
.factory-footer { padding-bottom:18px; }
.workshop-drawer > .download-dock { flex-shrink:0; margin:0; padding:16px 22px 20px; border-top:1px solid #e6ded2; background:#fffcf7; }
.download-dock > small { display:block; margin-bottom:10px; color:#8b7058; font-size:12px; line-height:1.6; }
.workshop-downloads { display:grid; grid-template-columns:minmax(0,1fr) 76px; gap:8px; }
.workshop-downloads #download3mf, .workshop-downloads .model-check { grid-column:1 / -1; }
.workshop-downloads .button { width:100%; min-width:0; }
.workshop-downloads .download-stp { display:flex; align-items:center; justify-content:center; text-align:center; border:1px solid #d8c5af; border-radius:999px; color:#806247; font-size:11px; line-height:1.5; text-decoration:none; }
.workshop-downloads .download-stp:hover { background:#f2e8dc; }
.workshop-downloads .download-stp[aria-disabled=true] { opacity:.45; cursor:default; }
.workshop-downloads .download-stp:focus-visible { outline:2px solid #b78656; outline-offset:3px; }
.chat-svg-actions { display:flex; align-items:center; gap:6px; min-width:0; }
.manual-workshop-mode .direct-workshop-editor { padding-top:22px; }
.catalog-selectable { touch-action:manipulation; }
/* Confirm the shape before painting, beside the existing model controls. */
.finish-workflow { margin:18px 0; padding-top:16px; border-top:1px solid #e9dfd2; }
.finish-workflow-steps { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; padding:0; list-style:none; }
.finish-workflow-steps li { display:flex; align-items:flex-start; gap:6px; min-width:0; color:#a28b76; font-size:10px; line-height:1.6; }
.finish-workflow-steps li > span:last-child { min-width:0; overflow-wrap:anywhere; }
.finish-step-number { display:inline-flex; align-items:center; justify-content:center; flex:0 0 19px; width:19px; height:19px; border:1px solid #e1d3c2; border-radius:50%; font-size:10px; line-height:1; background:#f7f1e8; }
.finish-workflow-steps [aria-current=step], .finish-workflow-steps [aria-current=true] { color:#765236; font-weight:600; }
.finish-workflow-steps [aria-current=step] .finish-step-number, .finish-workflow-steps [aria-current=true] .finish-step-number { border-color:#a47955; background:#a47955; color:#fffaf4; }
.finish-workflow-hint { margin:12px 0; color:#92775e; font-size:11px; line-height:1.75; overflow-wrap:anywhere; }
.finish-workflow-actions { display:grid; gap:7px; }
.finish-workflow-actions button, .finish-return-actions button { appearance:none; min-width:0; min-height:36px; padding:8px 11px; border:1px solid #dfcfbc; border-radius:10px; background:transparent; color:#876449; font:inherit; font-size:11px; line-height:1.6; white-space:normal; overflow-wrap:anywhere; cursor:pointer; transition:background .15s,border-color .15s; }
.finish-workflow-actions button:hover:not(:disabled), .finish-return-actions button:hover:not(:disabled) { background:#f2e9dd; border-color:#c7aa8c; }
.finish-workflow-actions .finish-workflow-primary, .finish-return-actions .finish-workflow-primary { border-color:#9b7353; background:#9b7353; color:#fffaf4; }
.finish-workflow-actions .finish-workflow-primary:hover:not(:disabled), .finish-return-actions .finish-workflow-primary:hover:not(:disabled) { border-color:#896346; background:#896346; }
.finish-workflow-actions button:disabled, .finish-return-actions button:disabled { opacity:.45; cursor:default; }
.finish-workflow-actions button:focus-visible, .finish-return-actions button:focus-visible { outline:2px solid #b78656; outline-offset:3px; }
.finish-snapshot-notice { margin:10px 0 0; padding:9px 10px; border:1px solid #ddc8b1; border-radius:9px; background:#f7efe5; color:#875c3c; font-size:11px; line-height:1.7; overflow-wrap:anywhere; }
.finish-return-dialog { width:min(390px,calc(100% - 32px)); max-height:calc(100dvh - 32px); overflow:auto; margin:auto; padding:24px; border:1px solid #ddcbb7; border-radius:18px; background:#fffcf7; color:#70543e; box-shadow:0 16px 60px #49321e24; }
.finish-return-dialog::backdrop { background:#40322250; }
.finish-return-dialog h2 { margin:0; font-size:17px; line-height:1.5; font-weight:600; overflow-wrap:anywhere; }
.finish-return-dialog p { margin:12px 0 20px; color:#92775e; font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.finish-return-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.finish-return-actions button { flex:1 1 125px; }
/* A pending reply belongs with the conversation, beside the coach's messages. */
.workshop-thinking { display:flex; align-items:center; gap:10px; margin-top:22px; padding:0 0 2px; }
.workshop-thinking-avatar { flex:0 0 30px; width:30px; height:30px; border-radius:50%; object-fit:cover; object-position:center 32%; }
.workshop-thinking-bubble { display:flex; align-items:center; gap:9px; min-width:0; padding:11px 13px; border:1px solid #e9e0d4; border-radius:5px 15px 15px; background:#f7f2eb; color:#806b56; font-size:11px; line-height:1.6; }
.workshop-thinking-dots { display:flex; flex:0 0 auto; gap:3px; align-items:center; height:12px; }
.workshop-thinking-dots i { width:4px; height:4px; border-radius:50%; background:#ad8968; animation:workshop-typing 1.3s ease-in-out infinite; }
.workshop-thinking-dots i:nth-child(2) { animation-delay:.15s; }
.workshop-thinking-dots i:nth-child(3) { animation-delay:.3s; }
@keyframes workshop-typing { 0%,65%,100% { opacity:.4; transform:translateY(0); } 32% { opacity:1; transform:translateY(-3px); } }
@media (max-width:700px) {
  .finish-workflow-steps { gap:12px; }
  .finish-workflow-actions button { min-height:40px; }
  .finish-return-dialog { padding:20px; }
  .finish-return-actions button { min-height:40px; }
  .workshop-page { padding-bottom:190px; }
  .factory-footer { padding:10px 16px; }
  .workshop-drawer > .download-dock { position:fixed; inset:auto 0 0; z-index:30; max-height:40dvh; overflow:auto; margin:0; padding:12px 16px max(14px,env(safe-area-inset-bottom)); border-top:1px solid #ded0bf; background:#fcf8f1fa; box-shadow:0 -4px 22px #48301e12; backdrop-filter:blur(14px); }
  .download-dock > small { margin-bottom:8px; font-size:11px; }
  .workshop-downloads .button { min-height:40px; font-size:11px; padding:10px 13px; }
  .workshop-drawer { height:auto; min-height:380px; }
  .workshop-mode-switch { position:sticky; top:0; z-index:10; margin:12px 68px 0 16px; background:#eae1d5; }
  .workshop-drawer-inner { min-height:370px; }
  .direct-workshop-tools { padding-bottom:10px; }
  .manual-workshop-mode .direct-workshop-editor { padding:22px 20px; }
  .direct-workshop-page .direct-workshop-editor { min-height:0; }
  .workshop-page:not(.manual-workshop-mode) .workshop-drawer { height:60dvh; min-height:430px; }
}
@media (prefers-reduced-motion:reduce) {
  .finish-workflow-actions button, .finish-return-actions button { transition:none; }
  .workshop-mode-switch button { transition:none; }
  .workshop-thinking-dots i { animation:none; opacity:.65; }
}
