#production-orders {
  min-width: 0;
}
.production-order {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 12px;
  background: var(--surface);
}
.production-order h4,
.production-order p {
  overflow-wrap: anywhere;
}
.production-order h4 { margin: 0 0 5px; }
.production-order p { margin: 6px 0; }
.production-order--result { padding: 12px; min-width: 0; }
.production-result-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}
.production-result-thumb {
  appearance: none;
  display: flex;
  flex: 0 0 154px;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 0;
  border: 1px solid #765337;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-raised);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.production-result-thumb:focus-visible,
.production-result-thumb:hover { outline: 2px solid var(--blue-light); outline-offset: 2px; }
.production-result-thumb img,
.production-result-thumb video { display: block; width: 100%; height: 116px; object-fit: cover; background: var(--bg); }
.production-result-thumb--written { height: 150px; justify-content: flex-end; padding: 13px; background: linear-gradient(145deg, #3a281f, #20191a); }
.production-result-thumb--written .production-written-mark { font-size: 28px; color: var(--blue-light); }
.production-result-thumb-label { display: block; width: 100%; padding: 0 10px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.production-result-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.production-result-summary p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-result-summary .inline-note { flex: 0 0 auto; }
#production-result-dialog { width: min(960px, calc(100vw - 24px)); max-width: 960px; max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); }
#production-result-dialog::backdrop { background: rgb(3 8 18 / 78%); }
.production-dialog-shell { display: flex; min-height: 0; max-height: calc(100vh - 24px); flex-direction: column; overflow: hidden; }
.production-dialog-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.production-dialog-heading h3 { margin: 0; overflow-wrap: anywhere; }
#production-result-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.production-dialog-body { padding: 18px; }
.production-dialog-media { display: block; width: auto; max-width: 100%; max-height: min(56vh, 620px); margin: 0 auto 18px; object-fit: contain; background: var(--bg); }
.production-dialog-caption { white-space: pre-wrap; overflow-wrap: anywhere; }
.production-dialog-details { display: grid; grid-template-columns: minmax(100px, 0.7fr) minmax(0, 1.5fr); gap: 8px 14px; margin: 16px 0; font-size: 13px; }
.production-dialog-details dt { color: #a7b6d1; }
.production-dialog-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.production-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.production-dialog-error { margin: 12px 18px 0; }
@media (max-width: 420px) {
  .production-result-thumb { flex-basis: 132px; }
  .production-result-thumb img,
  .production-result-thumb video { height: 100px; }
  .production-dialog-body { padding: 14px; }
  .production-dialog-details { grid-template-columns: 1fr; gap: 3px; }
}

.production-video-unavailable { color: var(--muted); font-size: 13px; }

/* Opt-in microphone input; no automatic submit. */
#composer .voice-input-group { display:flex; flex-direction:column; gap:7px; min-width:0; }
#composer .voice-input-group > label { flex:1; min-width:0; }
#composer .voice-dictation-control { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:5px 0 11px; min-width:0; }
#composer .voice-dictation-button, #composer #production-studio .voice-dictation-button {
  display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; min-width:44px;
  padding:10px; margin:0; border:1px solid #c3906999; border-radius:12px;
  background:#b8764229; color:#f1d4ae; cursor:pointer;
}
#composer .voice-dictation-button svg {width:22px;height:22px;}
#composer .voice-dictation-button[aria-pressed="true"] { background:#bd4a4550; border-color:#ff957b; color:#ffe9db; box-shadow:0 0 0 3px #c9695245;}
#composer .voice-dictation-button:focus-visible {outline:2px solid #ffd7a5;outline-offset:3px;}
#composer .voice-dictation-button:disabled {opacity:.45;cursor:not-allowed;}
#composer .voice-dictation-control span[role="status"] {flex:1 1 140px;min-width:0;color:#ccb6a0;font-size:11px;line-height:1.5;}

/* Owner resource choices; retain the current Local GPU submission path. */
.production-resource-panel{border:1px solid var(--line);border-radius:12px;background:var(--surface-raised);padding:16px;margin:0 0 16px;display:grid;gap:9px;min-width:0}
.production-resource-panel legend{padding:0 8px;font-weight:700}
.production-resource-panel legend small{font-size:11px;font-weight:500;color:var(--muted);margin-left:8px}
.production-resource-panel label{font-size:12px;color:var(--muted)}
.production-resource-panel select{width:100%;max-width:440px;min-width:0;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:11px 12px}
#production-resource-status{font-size:12px;line-height:1.5;color:var(--muted)}

/* Navigable generated-result gallery and reversible owner history controls. */
.production-gallery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.production-gallery-toolbar h4{margin:0}
.production-gallery-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.production-gallery-controls button{min-width:42px;min-height:40px;padding:8px 12px}
.production-result-rail{scroll-snap-type:x proximity;scroll-padding-inline:4px;touch-action:pan-x}
.production-result-thumb{scroll-snap-align:start}
.production-result-rail:focus-visible{outline:2px solid var(--blue-light);outline-offset:3px}
#production-gallery-dialog{width:min(1080px,calc(100vw - 24px));max-width:1080px;max-height:calc(100vh - 24px);padding:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text)}
#production-gallery-dialog::backdrop,#production-hide-dialog::backdrop{background:rgb(3 8 18 / 80%)}
.production-gallery-grid{overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:14px;min-height:0;max-height:calc(100vh - 105px);padding:18px}
.production-gallery-grid .production-result-thumb{width:100%;min-width:0;min-height:155px}
.production-gallery-grid .production-result-thumb img,.production-gallery-grid .production-result-thumb video{height:125px}
#production-hide-dialog{width:min(480px,calc(100vw - 24px));border:1px solid var(--line);border-radius:14px;padding:0;background:var(--surface);color:var(--text)}
.production-confirm-shell{padding:22px;display:grid;gap:16px}
.production-confirm-shell p{font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.production-history-hide{display:block;margin-top:9px;color:#f1a3a8}
.production-history-danger{border-color:#b55b61!important;color:#ffd2d5!important}
.production-history-deleted{border:1px solid var(--line);border-radius:14px;margin-top:14px;padding:15px;background:var(--surface)}
.production-history-deleted summary{font-weight:700;cursor:pointer}
.production-history-deleted > p{margin:12px 0;color:var(--muted);font-size:12px}
.production-history-deleted-row{display:flex;justify-content:space-between;gap:12px;align-items:center;min-width:0;padding:11px 0;border-top:1px solid var(--line)}
.production-history-deleted-row span{min-width:0;overflow-wrap:anywhere}
.production-history-deleted-row button{flex:0 0 auto}
@media(max-width:420px){.production-gallery-controls{width:100%}.production-gallery-controls button{flex:1}.production-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:10px}.production-gallery-grid .production-result-thumb img{height:96px}}
