/* Additive controls for the existing public page. */
#preview-agent { max-width: 210px; font: inherit; color: #184e46; background: #f3faf7; }
#preview-image-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; font-size: 12px; color: #52716b; }
#preview-image-row[hidden] { display: none; }
#preview-image { width: 72px; height: 56px; object-fit: contain; border: 1px solid #d3e4df; border-radius: 8px; }
.preview-turn { padding: 24px 0; border-bottom: 1px solid #e0eae7; }
.preview-turn-meta { font-size: 13px; color: #52716b; margin: 18px 0 10px; }
.preview-answer { white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-turn-image { max-width: 220px; max-height: 150px; object-fit: contain; border-radius: 8px; }
#conversation-history button { text-align: left; display: block; width: 100%; margin: 8px 0; }
button:disabled, select:disabled { opacity: .55; cursor: wait; }
@media (max-width: 720px) { #preview-agent { max-width: 160px; } .mode-toolbar { flex-wrap: wrap; } }
#parameters-dialog { width: min(680px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; border: 1px solid #c7ded7; border-radius: 16px; padding: 24px; color: #244b43; }
#parameters-dialog::backdrop { background: #163f3855; }
.parameter-header, .parameter-actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.parameter-header h2 { margin: 0; font-size: 20px; }
.parameter-note, #parameter-status { font-size: 13px; line-height: 1.7; color: #52716b; }
.parameter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
#parameters-dialog label { display: block; font-size: 13px; line-height: 1.8; }
#parameters-dialog input:not([type=checkbox]), #parameters-dialog select, #parameters-dialog textarea { box-sizing: border-box; width: 100%; border: 1px solid #c7ded7; background: white; border-radius: 6px; padding: 9px; color: #244b43; font: inherit; }
#parameters-dialog textarea { min-height: 230px; font-family: monospace; font-size: 12px; }
#parameters-dialog button { border: 1px solid #bdd6ce; border-radius: 6px; padding: 8px 12px; background: #edf7f3; color: #1c6659; cursor: pointer; }
#parameters-dialog .primary-action { background: #157b6c; color: white; }
#parameter-summary, .preview-receipt pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; max-height: 280px; overflow: auto; background: #f1f7f4; border-radius: 8px; padding: 12px; }
#parameter-confirmation { border-top: 1px solid #d3e4df; padding-top: 12px; margin-top: 16px; }
#active-parameters { padding: 9px 12px; background: #edf7f3; font-size: 12px; color: #246a5c; }
#active-parameters button { margin-left: 12px; }
#active-parameters[hidden], #parameter-confirmation[hidden], #structured-fields[hidden], #deficit-fields[hidden] { display: none; }
.preview-receipt { margin-top: 14px; font-size: 13px; color: #427167; }
@media (max-width: 580px) { .parameter-grid { grid-template-columns: 1fr; } #parameters-dialog { padding: 16px; } }
