.chat-intro{margin-bottom:16px}.chat-feed{max-height:410px;min-height:128px;overflow:auto;overscroll-behavior:contain;padding:3px 2px 10px;scrollbar-color:#c9bbe8 transparent;scrollbar-width:thin}.chat-message{padding:13px 14px;margin:0 0 12px;border-radius:12px;background:#f5f3f9;overflow-wrap:anywhere}.chat-message p{margin:4px 0 0;white-space:pre-wrap;font-size:12px;line-height:1.7}.chat-speaker{font-size:10px;color:#675575;letter-spacing:.01em}.chat-user{margin-left:28px;background:#eee7ff}.chat-user .chat-speaker{color:#5730bd}.chat-reference-image{display:block;max-width:100%;max-height:140px;object-fit:contain;object-position:left;margin-top:8px;border-radius:5px;background:white}.chat-composer{border:1px solid #dcd5e6;border-radius:12px;padding:11px;margin-top:12px;background:#fff}.chat-composer .field-label{margin:0 0 7px}.chat-composer textarea{border:0;padding:3px 1px;min-height:72px;border-radius:0;font-size:12px;resize:vertical;background:transparent}.chat-composer textarea:focus{outline:none}.chat-composer:focus-within{border-color:#9775eb;box-shadow:0 0 0 2px #ede5ff}.chat-composer-actions{display:flex;align-items:center;gap:8px;margin-top:8px}.chat-attach{display:inline-flex;align-items:center;gap:5px;border:0;background:#f5f2fa;border-radius:7px;padding:9px;font-size:11px}.chat-attach svg{width:17px;height:17px}.chat-composer-actions .record-button{width:36px;height:36px;border-radius:8px;flex-shrink:0;margin:0;background:#f3edff;color:var(--purple)}.chat-composer-actions .record-button svg{width:19px;height:19px}.chat-composer-actions .record-button.recording{background:#bf3450;color:white}.chat-composer-actions .button{margin:0 0 0 auto;padding:9px 13px;min-height:36px;gap:6px;font-size:11px}.chat-composer-actions .button svg{width:16px;height:16px}.chat-record-status{margin:7px 0 0;font-size:10px;color:#7a6a89;line-height:1.5;min-height:15px}.chat-attachment{display:flex;gap:9px;align-items:center;padding:7px;background:#f6f3fb;border-radius:8px;margin:5px 0 9px;min-width:0}.chat-attachment img{width:44px;height:44px;object-fit:contain;background:white;border-radius:5px}.chat-attachment span{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.chat-attachment .icon-button{width:28px;height:28px}.chat-attachment .icon-button svg{width:15px;height:15px}.chat-image-hint{font-size:9px!important;line-height:1.5!important;color:#7d7089;margin:8px 0 0}.chat-candidates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.chat-candidate{border:1px solid #ded4eb;border-radius:8px;padding:8px;background:white;min-width:0;text-align:left}.chat-candidate:hover,.chat-candidate:focus-visible{border-color:var(--purple);background:#faf8ff}.chat-candidate img{display:block;width:100%;height:66px;object-fit:contain;background:#fff}.chat-candidate span{display:block;font-size:9px;line-height:1.5;margin-top:7px;color:#604b76}.chat-manual-link{font-size:10px;line-height:1.6;text-align:left;margin-top:10px}.chat-secondary-actions{display:flex;justify-content:flex-start;margin-top:10px}.chat-secondary-actions .text-button{font-size:10px;line-height:1.6}.pdf-page-stage{position:relative;width:fit-content;max-width:100%;margin:0 auto;line-height:0}.document-preview .pdf-page-stage img{margin:0;max-width:100%;user-select:none;-webkit-user-drag:none}.pdf-selection-layer{position:absolute;inset:0;pointer-events:none}.pdf-selection-layer.selecting{pointer-events:auto;cursor:crosshair;touch-action:none;background:#6236e805}.pdf-selection-box{position:absolute;border:2px solid #6535e8;background:#6535e822;box-sizing:border-box;pointer-events:none;box-shadow:0 0 0 1px #fff8}.selection-toolbar{display:flex;flex-direction:column;align-items:center;gap:8px;background:#f0eaff;border-radius:8px;padding:10px;margin-top:13px;font-size:11px;line-height:1.6;text-align:center;color:#573f78}.selection-toolbar .text-button{font-size:10px}.chat-plan-warning{background:#fff8e9;color:#725019!important;border-radius:7px;padding:11px;font-size:11px!important;margin-top:12px}.chat-send-status{font-size:10px;color:#776882}.panel-body #voice-controls #command-plan{margin-top:17px}#voice-controls #command-plan h3{margin-bottom:9px}#voice-controls #command-plan ol{padding-left:18px}#voice-controls #command-plan .button{margin-top:13px}@media(max-width:600px){.chat-feed{max-height:360px}.chat-message{padding:12px 13px}.chat-composer-actions .button{font-size:12px}.chat-candidate img{height:75px}.chat-reference-image{max-height:130px}}@media(prefers-reduced-motion:reduce){.chat-feed{scroll-behavior:auto}}

/* Editing stays beside the document, with a compact confirmation bar. */
.document-panel{overflow:clip}
#command-plan.document-action-bar{position:sticky;top:8px;z-index:8;margin:0;padding:12px 16px;border-top:0;border-bottom:1px solid #ddd2ed;background:#fff;box-shadow:0 3px 12px #2615410b}
.plan-primary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px}.plan-primary>div{min-width:0}.plan-summary{display:block;font-size:12px;line-height:1.45;overflow-wrap:anywhere}.plan-primary>.button{flex-shrink:0;font-size:12px;min-height:42px;padding:10px 13px;white-space:nowrap}.plan-primary>.button svg{width:15px;height:15px}.plan-details{font-size:10px;margin-top:7px;color:#71627d}.plan-details>summary{cursor:pointer;width:fit-content}.plan-details[open]{max-height:150px;overflow:auto}#command-plan .plan-details ol{font-size:11px;margin:9px 0 4px}.plan-details .chat-plan-warning{font-size:10px!important;padding:8px;margin:8px 0 0}.plan-area-warning{color:#865117;font-size:10px;line-height:1.5;margin:7px 0 0}.plan-area-warning.reserve-warning{visibility:hidden}
.selection-toolbar{align-items:stretch;text-align:left;margin:0 0 18px;padding:12px;background:#f4f0fb;border:1px solid #e4d9f5;gap:7px;line-height:1.5}.selection-toolbar-main{display:flex;align-items:center;flex-wrap:wrap;gap:6px 11px}.selection-toolbar-main strong{font-size:11px}.selection-toolbar-main .text-button{margin-left:auto;font-size:10px}.selection-toolbar-main select{width:auto;max-width:200px;min-height:30px;font-size:10px;padding:5px 7px}#selection-dimensions{font-size:10px;font-variant-numeric:tabular-nums;white-space:nowrap;color:#736183}.selection-adjustments{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}.selection-button-group{display:flex;gap:4px}.selection-step,.selection-size{height:34px;min-width:34px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d6c8eb;border-radius:6px;background:white;color:#59369c;font-size:11px;padding:5px 8px}.selection-step:hover,.selection-size:hover{background:#eae0ff;border-color:#9f7bda}.selection-step svg{width:15px;height:15px}.step-up svg{transform:rotate(-90deg)}.step-down svg{transform:rotate(90deg)}.selection-ratio-label{display:flex;align-items:center;gap:5px;font-size:10px;cursor:pointer}.selection-ratio-label input{accent-color:var(--purple);width:14px;height:14px;margin:0}#selection-hint{font-size:10px;line-height:1.5;min-height:30px}#selection-keyboard-hint{font-size:9px;color:#82718f;line-height:1.5}
.pdf-selection-box.editable{pointer-events:auto;touch-action:none;cursor:grab}.pdf-selection-box:focus-visible{outline:2px solid #321578;outline-offset:4px}.pdf-selection-box.image-selection{background:transparent}.document-preview .pdf-selection-box #pdf-selection-image{position:absolute;inset:0;display:block;width:100%;height:100%;max-height:none;max-width:none;object-fit:fill;margin:0;box-shadow:none;pointer-events:none;opacity:.92}.document-preview .pdf-selection-box #pdf-selection-image[hidden]{display:none}.pdf-selection-origin{position:absolute;border:1px dashed #8e7c9f;background:transparent;pointer-events:none}.selection-handle{position:absolute;display:block;pointer-events:auto;touch-action:none;width:22px;height:22px;background:transparent;border:0;border-radius:50%;padding:0;transform:translate(-50%,-50%);z-index:2}.selection-handle::after{content:'';display:block;width:10px;height:10px;position:absolute;left:6px;top:6px;border:2px solid #6535e8;background:#fff;box-shadow:0 0 0 1px #fff8;box-sizing:border-box;border-radius:2px}.selection-handle:focus-visible{outline:2px solid #321578;outline-offset:0}.handle-nw{left:0;top:0;cursor:nwse-resize}.handle-n{left:50%;top:0;cursor:ns-resize}.handle-ne{left:100%;top:0;cursor:nesw-resize}.handle-e{left:100%;top:50%;cursor:ew-resize}.handle-se{left:100%;top:100%;cursor:nwse-resize}.handle-s{left:50%;top:100%;cursor:ns-resize}.handle-sw{left:0;top:100%;cursor:nesw-resize}.handle-w{left:0;top:50%;cursor:ew-resize}.pdf-selection-layer.selecting .selection-handle{visibility:hidden}.pdf-selection-box:not(.editable) .selection-handle{pointer-events:none;opacity:.6}.chat-secondary-actions{flex-direction:column;align-items:flex-start;gap:6px}.chat-attachment{flex-wrap:wrap}.chat-attachment #insert-attachment{font-size:10px;flex-basis:calc(100% - 40px);text-align:left;margin-left:40px;order:2}
@media(max-width:600px){#command-plan.document-action-bar{top:0;padding:10px 12px}.plan-primary{gap:8px;align-items:center}.plan-primary>.button{font-size:10px;padding:9px;max-width:138px;min-height:42px;white-space:normal;line-height:1.4}.plan-primary>.button svg{display:none}.plan-summary{font-size:11px}.plan-details{font-size:9px}.plan-details[open]{max-height:110px}.selection-toolbar{padding:10px;margin-bottom:15px}.selection-toolbar-main{gap:6px 8px}.selection-toolbar-main strong{font-size:10px}.selection-toolbar-main select{max-width:170px}.selection-adjustments{gap:7px}.selection-step,.selection-size{height:38px;min-width:36px}.selection-ratio-label{flex-basis:100%}#selection-keyboard-hint{display:none}#selection-hint{font-size:9px;min-height:27px}.selection-handle{width:28px;height:28px}.selection-handle::after{width:12px;height:12px;left:8px;top:8px}.document-preview{padding:14px;max-height:600px}.chat-attachment #insert-attachment{font-size:11px}}

.chat-text-matches{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:12px}.chat-text-matches .text-button{min-height:36px;padding:6px 10px;border:1px solid var(--line,#e4def0);border-radius:8px;background:var(--surface,#fff);font-size:12px}.chat-text-matches .text-button:disabled{opacity:.5;cursor:default}
