/* V4 readable timeline, conversation governance and demo status panels. */
.reference-layout{--reference-list-width:340px;--reference-info-width:360px}
.reference-live-status{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border:1px solid #bde8cf;border-radius:999px;background:#f2fcf5;color:#238653;font-size:10px;white-space:nowrap}.reference-live-dot{width:6px;height:6px;border-radius:50%;background:currentColor;box-shadow:0 0 0 3px #dff5e7}.reference-live-status.paused{border-color:#d9e0ea;background:#f5f7fa;color:#687792}.reference-live-status.paused .reference-live-dot{box-shadow:0 0 0 3px #e9edf2}.reference-live-status.error{border-color:#ffd5db;background:#fff3f5;color:#b52f4a}.reference-live-status.error .reference-live-dot{box-shadow:0 0 0 3px #ffe1e5}
body.reference-inbox-active #reference-inbox-view .reference-layout{grid-template-columns:var(--reference-list-width) 9px minmax(360px,1fr) 9px var(--reference-info-width);column-gap:0}
.pane-resizer{position:relative;width:9px;height:100%;padding:0;border:0;border-left:1px solid var(--line);border-right:1px solid var(--line);background:linear-gradient(90deg,transparent 0 3px,color-mix(in srgb,var(--blue) 20%,transparent) 3px 6px,transparent 6px);cursor:col-resize;z-index:3}.pane-resizer:hover,.pane-resizer:focus-visible,.pane-resizer.dragging{background:color-mix(in srgb,var(--blue) 16%,var(--page,#f8faff));outline:0}.pane-resizer:focus-visible{box-shadow:inset 0 0 0 2px var(--blue)}
.timeline-group>summary{padding:11px 12px}.timeline-group .timeline-summary-main strong{font-size:12px}.timeline-group .timeline-status{padding:3px 7px;font-size:10px}.timeline-group>summary time{font-size:10px;max-width:145px}.timeline-group-detail{padding:0 12px 12px}.timeline-stage-line{font-size:11px}.timeline-facts span{font-size:11px}.timeline-group .timeline-explanation,.timeline-group .timeline-reason,.timeline-group .timeline-action,.timeline-group .timeline-content{font-size:11px}.timeline-attempts>summary{font-size:11px}.timeline-attempt-row{font-size:11px}.timeline-attempt-details>summary{font-size:10px}
.timeline-result-banner{display:flex;align-items:center;gap:7px;margin:10px 0 8px;padding:8px 9px;border:1px solid var(--line);border-radius:8px;background:var(--page,#f8faff);color:var(--muted);font-size:10px}.timeline-result-banner strong{font-size:11px;color:var(--dark,#263653)}.timeline-result-icon{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#eef2f7;color:#687792;font-weight:800}.timeline-result-banner.success{border-color:#bde8cf;background:#f2fcf5;color:#238653}.timeline-result-banner.success strong{color:#18794e}.timeline-result-banner.success .timeline-result-icon{background:#238653;color:#fff}.timeline-result-banner.failed{border-color:#ffd5db;background:#fff3f5;color:#a52e47}.timeline-result-banner.failed strong{color:#c73853}.timeline-result-banner.failed .timeline-result-icon{background:#c73853;color:#fff}.timeline-result-banner.dry-run{border-color:#f0dca9;background:#fff9eb;color:#8b5c11}.timeline-result-banner.dry-run .timeline-result-icon{background:#a26208;color:#fff}.timeline-result-banner.pending{border-color:#e4e9f1;background:#f7f9fc}
.timeline-group{display:block;margin:0 0 7px;border:1px solid var(--line);border-left:3px solid #bcd0f6;border-radius:0 8px 8px 0;background:var(--panel,#fff);color:var(--ink,var(--dark,#263653));overflow:hidden}
.timeline-group.failed{border-left-color:#c73853;background:#fff7f8}.timeline-group.blocked{border-left-color:#c27b18;background:#fffaf0}.timeline-group.succeeded{border-left-color:#238653}.timeline-group.pending{border-left-color:#8b9bb5}
.timeline-group>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;cursor:pointer;list-style:none}.timeline-group>summary::-webkit-details-marker{display:none}.timeline-group>summary:hover{background:color-mix(in srgb,var(--blue) 6%,transparent)}.timeline-group .timeline-summary-main{min-width:0;display:flex;align-items:center;gap:7px}.timeline-group .timeline-summary-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.timeline-group>summary time{flex:0 0 auto;color:var(--muted);font-size:9px;text-align:right}.timeline-group-detail{padding:0 10px 10px;border-top:1px solid var(--line)}
.timeline-stage-line{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:9px 0;font-size:10px;color:var(--muted)}.timeline-stage-chip{padding:4px 7px;border-radius:999px;background:#edf3ff;color:var(--blue);font-weight:700}.timeline-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:7px 0}.timeline-facts span{padding:7px 8px;border:1px solid var(--line);border-radius:7px;background:color-mix(in srgb,var(--page,#f6f8fc) 65%,transparent);font-size:10px;line-height:1.45}.timeline-facts b{color:var(--dark,#263653)}
.timeline-attempts{margin-top:8px;border-top:1px dashed var(--line);padding-top:7px}.timeline-attempts>summary{cursor:pointer;color:var(--blue);font-size:10px}.timeline-attempt-row{display:grid;grid-template-columns:112px minmax(95px,auto) minmax(0,1fr) auto;align-items:start;gap:7px;padding:7px 0;border-bottom:1px solid var(--line);font-size:10px}.timeline-attempt-row:last-child{border-bottom:0}.timeline-attempt-row.failed{color:#a52e47}.timeline-attempt-time{color:var(--muted);white-space:nowrap}.timeline-attempt-label{font-weight:700;white-space:nowrap}.timeline-attempt-reason{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.timeline-attempt-details{grid-column:1/-1}.timeline-attempt-details>summary{cursor:pointer;color:var(--muted);font-size:9px}.timeline-attempt-details .timeline-detail{padding:6px 0 0;border:0}.timeline-attempt-details pre{max-height:130px;margin:6px 0 0;padding:6px;background:var(--page,#f5f7fb);border-radius:6px;font:9px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow:auto}.timeline-group .timeline-explanation,.timeline-group .timeline-reason,.timeline-group .timeline-action{font-size:10px;line-height:1.5}.timeline-group .timeline-content{font-size:10px}
.conversation-flow-card{padding:14px 18px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--page,#f8faff) 60%,transparent)}.operation-card-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;color:var(--dark,#263653);font-size:12px;font-weight:700}.operation-card-title small{color:var(--muted);font-size:10px;font-weight:400}.conversation-flow{display:flex;align-items:stretch;gap:5px}.conversation-flow-arrow{display:grid;place-items:center;color:var(--muted);font-size:13px}.conversation-flow-step{min-width:0;flex:1;display:grid;grid-template-columns:auto 1fr;column-gap:6px;align-items:center;padding:7px;border:1px solid var(--line);border-radius:8px;background:var(--panel,#fff);color:var(--muted)}.conversation-flow-step .conversation-flow-icon{grid-row:span 2;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#eef2f7;color:#697792;font-size:10px;font-weight:800}.conversation-flow-step strong{font-size:10px;color:var(--dark,#263653)}.conversation-flow-step small,.conversation-flow-step em{grid-column:2;font-size:9px;font-style:normal;line-height:1.35}.conversation-flow-step em{color:var(--muted)}.conversation-flow-step.done{border-color:#bde8cf;background:#f4fcf7}.conversation-flow-step.done .conversation-flow-icon{background:#238653;color:#fff}.conversation-flow-step.failed{border-color:#ffd5db;background:#fff4f5}.conversation-flow-step.failed .conversation-flow-icon{background:#c73853;color:#fff}.conversation-flow-step.pending{border-color:#f0dca9;background:#fffaf0}.conversation-flow-step.pending .conversation-flow-icon{background:#a26208;color:#fff}.conversation-flow-step.blocked{border-color:#f0dca9;background:#fffaf0}.conversation-flow-step.blocked .conversation-flow-icon{background:#a26208;color:#fff}
.operation-card{padding-bottom:14px}.operation-mode{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 11px;padding:10px;border-radius:9px;border:1px solid var(--line);background:var(--panel,#fff)}.operation-mode>div:first-child{min-width:0;display:grid;grid-template-columns:auto 1fr;column-gap:7px;align-items:center}.operation-mode-dot{grid-row:span 2;width:9px;height:9px;border-radius:50%;background:#238653;box-shadow:0 0 0 4px #e7f7ed}.operation-mode strong{font-size:11px;color:var(--dark,#263653)}.operation-mode small{grid-column:2;margin-top:3px;color:var(--muted);font-size:9px;line-height:1.4}.operation-mode.mode-human .operation-mode-dot{background:#a26208;box-shadow:0 0 0 4px #fff2d8}.operation-mode.mode-closed .operation-mode-dot{background:#79869b;box-shadow:0 0 0 4px #edf0f4}.operation-mode-legend{display:flex;align-items:center;gap:4px;color:var(--muted);font-size:9px;white-space:nowrap}.operation-mode-legend span{padding:3px 5px;border-radius:999px;background:#eef2f7}.operation-mode-legend .bot{background:#eaf1ff;color:var(--blue)}.operation-mode-legend .human{background:#fff0e4;color:#a85b13}.operation-mode-legend .closed{background:#edf0f4;color:#687792}.operation-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.operation-controls label{display:grid;gap:4px;color:var(--muted);font-size:10px}.operation-controls input,.operation-controls select{width:100%;padding:8px;border:1px solid var(--line);border-radius:7px;background:var(--page,#fff);color:var(--dark,#263653);font:inherit;font-size:11px}.operation-summary{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-top:9px}.operation-summary-note{color:var(--muted);font-size:9px}.outbound-safety-card{margin:0;padding:14px 18px;border-bottom:1px solid var(--line);background:#f8faff}.outbound-safety-card.enabled{background:#f4fcf7}.outbound-safety-card.protected{background:#fffaf0}.outbound-safety-card .safety-state{padding:3px 7px;border-radius:999px;background:#fff0e4;color:#a26208;font-size:9px}.outbound-safety-card.enabled .safety-state{background:#eaf8f0;color:#238653}.safety-facts{display:grid;gap:4px;color:var(--muted);font:9px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace}.safety-facts b{color:var(--dark,#263653);font-weight:600}.outbound-safety-card>small{display:block;margin-top:8px;color:var(--muted);font-size:9px;line-height:1.45}.conversation-qa-route{display:grid;gap:3px;margin-top:10px;padding:8px;border:1px dashed var(--line);border-radius:7px;background:color-mix(in srgb,var(--page,#f8faff) 75%,transparent)}.conversation-qa-route span{color:var(--muted);font-size:9px}.conversation-qa-route strong{color:var(--dark,#263653);font-size:11px}.conversation-qa-route small{color:var(--muted);font-size:9px;line-height:1.45}
.reference-agent-overview{border-top:3px solid var(--blue)}.reference-live-badge{padding:4px 7px;border-radius:999px;background:#eaf8f0;color:#238653;font-size:10px;font-weight:800}.reference-process-flow{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px}.reference-process-flow>div{display:grid;gap:4px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--page,#f8faff)}.reference-process-flow>div>b{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--blue);color:#fff;font-size:10px}.reference-process-flow strong{color:var(--dark,#263653);font-size:11px}.reference-process-flow small{color:var(--muted);font-size:10px;line-height:1.45}.reference-process-flow i{color:var(--muted);font-style:normal}.reference-route-note{display:grid;gap:4px;margin-top:12px;padding:10px;border-left:3px solid var(--blue);background:var(--page,#f8faff);font-size:11px;line-height:1.55}.reference-route-note strong{color:var(--dark,#263653)}.reference-route-note span{color:var(--muted)}.reference-route-note code{color:var(--blue);font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.reference-output-policy{border-top:3px solid #8a61ff}.reference-policy-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.reference-policy-grid>div{display:grid;gap:5px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--page,#f8faff)}.reference-policy-grid strong{color:var(--dark,#263653);font-size:11px}.reference-policy-grid span{color:var(--muted);font-size:10px;line-height:1.5}.reference-limit-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:11px}.reference-limit-row{display:grid;gap:4px;padding:7px 8px;border-radius:7px;background:var(--page,#f8faff);border:1px solid var(--line)}.reference-limit-row span{color:var(--blue);font-size:10px;font-weight:800}.reference-limit-row b{color:var(--dark,#263653);font-size:9px;line-height:1.35}.reference-agent-overview .reference-help{display:block}
.reference-runtime-strip{height:auto!important;max-width:none!important;padding:18px 30px 0!important;overflow:visible!important}.reference-runtime-panel{padding:18px 20px;border:1px solid var(--line);border-radius:12px;background:var(--panel,#fff);box-shadow:0 7px 24px #6b83a214}.runtime-state-badge{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;background:#eaf8f0;color:#238653;font-size:10px;font-weight:700}.runtime-state-badge span{width:7px;height:7px;border-radius:50%;background:currentColor}.runtime-state-badge.warning{background:#fff0e4;color:#a26208}.reference-runtime-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.runtime-card{display:grid;gap:5px;padding:11px;border:1px solid var(--line);border-radius:8px;background:var(--page,#f8faff)}.runtime-card small{color:var(--muted);font-size:10px}.runtime-card strong{color:var(--dark,#263653);font-size:16px;overflow-wrap:anywhere}.runtime-card span{color:var(--muted);font-size:10px;line-height:1.4}.runtime-explanation{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px;color:var(--muted);font-size:10px;line-height:1.45}.runtime-explanation span{padding:6px 8px;border-radius:6px;background:var(--page,#f8faff)}.runtime-explanation b{color:var(--dark,#263653)}
@media(max-width:1000px){.reference-process-flow{grid-template-columns:1fr 1fr}.reference-process-flow i{display:none}.reference-policy-grid,.reference-runtime-grid{grid-template-columns:1fr 1fr}.reference-limit-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){body.reference-inbox-active #reference-inbox-view .reference-layout{grid-template-columns:var(--reference-list-width) 9px minmax(340px,1fr)}body.reference-inbox-active #reference-inbox-view .pane-resizer-right{display:none}}
@media(max-width:650px){.conversation-flow{display:grid;grid-template-columns:1fr}.conversation-flow-arrow{transform:rotate(90deg)}.operation-mode{display:grid}.operation-controls,.timeline-facts{grid-template-columns:1fr}.timeline-attempt-row{grid-template-columns:1fr auto}.timeline-attempt-reason{grid-column:1/-1}.reference-process-flow,.reference-policy-grid,.reference-runtime-grid,.reference-limit-list{grid-template-columns:1fr}.reference-runtime-strip{padding:14px 15px 0!important}.reference-runtime-panel{padding:14px}.runtime-state-badge{margin-top:8px}}
@media(max-width:650px){body.reference-inbox-active #reference-inbox-view .reference-layout{grid-template-columns:1fr}.pane-resizer{display:none}}

/* Internal customer simulator: it shares the inbox contract but has no provider adapter. */
.reference-simulator-panel{margin:0 12px 12px;padding:12px;border:1px solid #d8e3f3;border-radius:10px;background:linear-gradient(145deg,#f4f8ff,#fff)}
.simulator-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.simulator-heading strong{display:block;color:var(--dark,#263653);font-size:12px}.simulator-heading small{display:block;margin-top:3px;color:var(--muted);font-size:10px}.reference-simulator-panel>p{margin:8px 0;color:var(--muted);font-size:10px;line-height:1.45}.simulator-safe-pill,.simulator-inline-pill{display:inline-flex;align-items:center;padding:3px 6px;border-radius:999px;background:#eaf8f0;color:#238653;font-size:9px;font-weight:700;white-space:nowrap}.simulator-inline-pill{margin-left:5px;vertical-align:middle}.simulator-testers{display:grid;gap:5px;margin:8px 0}.simulator-tester{display:flex;align-items:center;gap:7px;width:100%;padding:7px;border:1px solid transparent;border-radius:7px;background:#fff;color:var(--dark,#263653);text-align:left;cursor:pointer}.simulator-tester:hover,.simulator-tester.active{border-color:#aac7f7;background:#edf4ff}.simulator-tester-avatar{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:7px;background:#202123;color:#fff;font-size:10px;font-weight:800}.simulator-tester strong,.simulator-tester small{display:block}.simulator-tester strong{font-size:10px}.simulator-tester small{margin-top:2px;color:var(--muted);font-size:9px}.reference-simulator-panel>.reference-button{width:100%;margin-top:2px}.simulator-form{display:grid;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid #e4eaf2}.simulator-form textarea{width:100%;min-height:48px;resize:vertical;border:1px solid #dbe4f0;border-radius:7px;padding:7px;font:inherit;font-size:11px;background:#fff}.simulator-form>div{display:flex;align-items:center;justify-content:space-between;gap:6px}.simulator-form .reference-button{padding:7px 9px;font-size:10px}.simulator-status{min-width:0;color:var(--muted);font-size:9px;line-height:1.35}.simulator-status.success{color:#238653}.simulator-status.pending{color:#a26208}.simulator-status.error{color:#c73853}.simulator-info-card{background:#f4fcf7;border-left:3px solid #238653}.simulator-info-card p{line-height:1.55}.simulator-info-card strong{color:#18794e}
body[data-reference-theme="vercel"] .reference-simulator-panel{border-color:#d4d5d8;background:linear-gradient(145deg,#f3f3f4,#fff)}body[data-reference-theme="vercel"] .simulator-tester-avatar{background:#202123}
@media(max-width:650px){.reference-simulator-panel{margin:10px;padding:11px}.simulator-form>div{align-items:flex-end;flex-direction:column}.simulator-form .reference-button{width:100%}}

.simulator-section-label{margin-top:9px;color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.04em}.simulator-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:4px}.simulator-actions .reference-button{width:100%;margin-top:0}.simulator-scenarios{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:5px 0 2px}.simulator-scenario{min-width:0;padding:7px;border:1px solid #dbe4f0;border-radius:7px;background:#fff;color:var(--dark,#263653);text-align:left;cursor:pointer}.simulator-scenario:hover:not(:disabled){border-color:#aac7f7;background:#edf4ff}.simulator-scenario:disabled{cursor:not-allowed;opacity:.5}.simulator-scenario strong,.simulator-scenario small{display:block}.simulator-scenario strong{font-size:10px}.simulator-scenario small{margin-top:2px;color:var(--muted);font-size:8px;line-height:1.3}.timeline-card-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.timeline-card-tools{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.timeline-card-tools label{display:flex;align-items:center;gap:4px;color:var(--muted);font-size:9px}.timeline-card-tools select{max-width:110px;padding:4px 5px;font-size:10px}.timeline-card-tools .reference-button{padding:5px 7px;font-size:9px}.timeline-empty-filter{padding:12px;color:var(--muted);font-size:10px;text-align:center}.reference-debug-link-status{font-size:9px}.simulator-info-card p{line-height:1.55}
@media(max-width:650px){.simulator-actions,.simulator-scenarios{grid-template-columns:1fr}.timeline-card-heading{align-items:flex-start;flex-direction:column}.timeline-card-tools{justify-content:flex-start;width:100%}}

/* Inbox controls: pin state, internal mentions and draft-assisted replies. */
.thread-item-row{display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:stretch;border-bottom:1px solid #eef1f6;background:var(--panel,#fff)}
.thread-item-row .thread-item{min-width:0;border-bottom:0}
.thread-item-row.pinned{border-left:3px solid #c68b22;background:#fffaf0}
.thread-item-row.pinned .thread-item{background:transparent}
.thread-pin{border:0;background:transparent;color:#a8b0bd;font-size:18px;cursor:pointer;transition:color .15s,background .15s}
.thread-pin:hover,.thread-pin.active{color:#bd7b12;background:#fff2d2}
.reply-actions{display:flex;align-items:center;gap:7px!important;flex-wrap:wrap}
.reply-actions span{flex:1;min-width:180px}
.reply-actions button.secondary,.reply-box button.secondary{background:#fff;color:#1f2937;border:1px solid #667085;font-weight:700}.reply-actions button.secondary:hover,.reply-box button.secondary:hover{background:#1f2937;color:#fff;border-color:#1f2937}.reply-actions button.secondary:focus-visible,.reply-box button.secondary:focus-visible{outline:3px solid #1769ff66;outline-offset:2px}
.reply-box .draft-status,.reply-box .reply-status{display:block;flex-basis:100%;width:100%}
.reply-box{display:flex;flex-direction:column;gap:8px}
.reply-box{flex:0 0 auto}
.reply-box textarea{min-height:180px;max-height:360px;padding:10px 0;line-height:1.6;overflow:auto}
.reply-box .reply-actions{order:2}
.reply-box .draft-status{order:3}
.reply-box .reply-status{order:4}
.reply-box #reference-draft-status:empty,.reply-box #reference-action-status:empty{display:none!important;min-height:0;margin:0;padding:0}
.reference-inbox-active #reference-inbox-view .thread-view .reply-box{position:relative;display:flex;flex:0 0 auto;flex-direction:column;gap:8px;height:clamp(240px,30vh,420px);min-height:200px;max-height:520px;overflow:auto;padding-top:28px;scrollbar-gutter:stable}.reference-inbox-active #reference-inbox-view .reply-box textarea{flex:1;min-height:80px;max-height:none;resize:none}.reply-box-resizer{position:absolute;top:0;left:0;z-index:2;width:100%;height:20px;margin:0;padding:0;border:0;border-bottom:1px solid transparent;border-radius:0;background:transparent;color:inherit;cursor:ns-resize;touch-action:none}.reply-box-resizer span{position:absolute;top:7px;left:50%;width:52px;height:4px;border-radius:99px;background:#c7ccd4;transform:translateX(-50%);transition:background .15s ease,box-shadow .15s ease}.reply-box-resizer:hover span,.reply-box-resizer:focus-visible span,.reply-box.is-resizing .reply-box-resizer span{background:#1769ff;box-shadow:0 0 0 3px #1769ff1c}.reply-box-resizer:focus-visible{outline:2px solid #1769ff;outline-offset:-2px}.reply-box.is-resizing{user-select:none}.reply-box-resizer:active{cursor:ns-resize}body[data-reference-theme] .reply-box .reply-box-resizer{background:transparent!important;border-radius:0!important;color:inherit!important}
.draft-status{min-height:0;max-height:40px;margin-top:0;padding:3px 7px;border-radius:6px;font-size:10px;line-height:1.3;overflow:auto}.draft-status.pending,.draft-status.success{max-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.draft-status.pending{background:#fff8e8;color:#7a5200;border:1px solid #f1d38a}.draft-status.success{background:#effcf4;color:#176b43;border:1px solid #b9e7c8}.draft-status.error{background:#fff0f2;color:#a5263f;border:1px solid #f2bdc8}
.note-mention-tools{display:flex;align-items:center;gap:6px;margin:8px 0}
.note-mention-tools select{flex:1;margin:0!important}
.note-mention-tools .reference-button{padding:7px 9px;white-space:nowrap}
.note-mentions{display:inline-block;margin-left:6px;padding:2px 5px;border-radius:99px;background:#edf3ff;color:var(--blue);font-size:9px}
.timeline-card #reference-timeline-list{max-height:min(62vh,720px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:2px}
.timeline-status.protected{background:#edf0f4;color:#626b7b}
.timeline-status.internal{background:#e8f4ff;color:#296b9d}
.timeline-result-banner.protected{border-color:#d5d9e1;background:#f3f4f6;color:#626b7b}
.timeline-result-banner.protected strong{color:#4e5665}
.timeline-result-banner.protected .timeline-result-icon{background:#727b8c;color:#fff}
.timeline-result-banner.internal{border-color:#c9e1f4;background:#f0f8ff;color:#296b9d}
.timeline-result-banner.internal strong{color:#245d87}
.timeline-result-banner.internal .timeline-result-icon{background:#4188b7;color:#fff}
.timeline-group.protected{border-left-color:#7a8494;background:#fafafa}
.timeline-group.internal{border-left-color:#4188b7;background:#f8fcff}
.simulator-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:650px){.simulator-actions{grid-template-columns:1fr}}

/* QA draft action: keep the long-label button readable in every inbox skin. */
.reply-box .qa-draft-button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:9px 14px!important;border:2px solid #475467!important;border-radius:8px!important;background:#fff!important;color:#1f2937!important;box-shadow:0 1px 2px #10182814;text-align:center;text-shadow:none;white-space:nowrap}
.reply-box .qa-draft-button:hover:not(:disabled){border-color:#1d4ed8!important;background:#e8eef7!important;color:#111827!important}
.reply-box .qa-draft-button:focus-visible{outline:3px solid #1769ff66!important;outline-offset:2px}
.reply-box .qa-draft-button:disabled{border-color:#98a2b3!important;background:#f2f4f7!important;color:#667085!important;opacity:1;cursor:wait}
@media(max-width:650px){.reply-box .qa-draft-button{width:100%;white-space:normal}}

/* Keep the conversation pin control on the left of each thread row. */
.thread-item-row{grid-template-columns:30px minmax(0,1fr)}
.thread-item-row .thread-pin{grid-column:1;grid-row:1}
.thread-item-row .thread-item{grid-column:2;grid-row:1}

/* Outbound safety is already represented by the activity timeline; hide the redundant detail card. */
.outbound-safety-card{display:none!important}

/* Keep internal QA routing details out of the compact conversation view. */
.conversation-qa-route{display:none!important}

/* The current demo does not expose conversation search yet. */
#reference-inbox-view .thread-list > .search{display:none!important}

/* Collaboration notes are not ready for the single-user demo yet. */
#reference-info .info-card:has(.note-mention-tools){display:none!important}

/* The demo conversation-scope selector has no useful user-facing behavior yet. */
#reference-inbox-view label:has(#reference-conversation-scope){display:none!important}

/* Collapse the internal simulator to a bottom launcher; the full flow opens in the in-page dialog. */
body.reference-inbox-active #reference-inbox-view .thread-list{display:flex;flex-direction:column;overflow:hidden}
body.reference-inbox-active #reference-inbox-view .thread-list > #reference-threads{order:1;min-height:0;flex:1 1 auto;overflow:auto}
body.reference-inbox-active #reference-inbox-view .thread-list > #reference-simulator-panel{order:2;flex:0 0 auto;margin:8px 12px 12px;padding:9px 11px;cursor:pointer}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel > :not(.simulator-heading){display:none!important}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel .simulator-heading{align-items:center;min-height:34px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel .simulator-heading::after{content:"開啟測試對話";display:inline-flex;align-items:center;padding:6px 9px;border-radius:7px;background:var(--blue,#202123);color:#fff;font-size:10px;font-weight:700;white-space:nowrap}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel .simulator-heading:hover::after{filter:brightness(1.2)}
body.reference-inbox-active #reference-inbox-view .thread-list{position:relative}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded{position:absolute;left:12px;right:12px;bottom:12px;z-index:40;max-height:min(78vh,680px);overflow:auto;cursor:default;box-shadow:0 18px 48px rgba(15,23,42,.22)}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded > :not(.simulator-heading){display:block!important}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-heading{cursor:pointer}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-heading::after{content:"收合測試對話"}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded{max-height:min(82vh,760px);padding:8px 10px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded>p{display:none!important}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded #reference-simulator-window{display:none!important}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .reference-button{padding:5px 6px;font-size:9px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-section-label{margin-top:6px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-tester{padding:5px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-scenario{padding:5px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-scenario small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-form{margin-top:5px;padding-top:5px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-form textarea{min-height:40px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-panel-messages{min-height:240px;max-height:390px}
@media(max-width:650px){body.reference-inbox-active #reference-inbox-view .thread-list > #reference-simulator-panel{margin:8px 10px 10px}}

.simulator-panel-messages{display:grid;gap:7px;min-height:120px;max-height:250px;overflow:auto;margin:8px 0;padding:9px;border:1px solid #dbe4f0;border-radius:8px;background:#f7f8fa;scroll-behavior:smooth}.simulator-panel-message{display:flex;margin:0}.simulator-panel-message.in{justify-content:flex-start}.simulator-panel-message.out{justify-content:flex-end}.simulator-panel-message .bubble{max-width:88%;padding:8px 10px;border:1px solid #dbe4f0;border-radius:10px;background:#fff;color:var(--dark,#263653);font-size:10px;line-height:1.5;overflow-wrap:anywhere}.simulator-panel-message.out .bubble{background:#eaf1ff;border-color:#cfe0ff}.simulator-panel-message time{display:block;margin-top:3px;color:var(--muted);font-size:8px}.simulator-panel-empty{padding:28px 10px;color:var(--muted);font-size:10px;text-align:center}
/* Conversation lifecycle status is retained by the API for compatibility, but is not exposed in the demo UI. */
#reference-info label:has(#reference-status){display:none!important}

/* Demo simulator readability: keep the panel easy to identify and operate. */
.reference-simulator-panel{margin:0 12px 14px;padding:16px;border-radius:12px}
.simulator-heading{gap:10px}
.simulator-heading strong{font-size:14px}
.simulator-heading small{margin-top:4px;font-size:11px}
.reference-simulator-panel>p{margin:10px 0;font-size:12px;line-height:1.55}
.simulator-safe-pill{padding:4px 8px;font-size:10px}
.simulator-section-label{margin-top:10px;font-size:10px}
.simulator-tester{gap:10px;padding:9px}
.simulator-tester-avatar{flex-basis:30px;width:30px;height:30px;font-size:12px}
.simulator-tester strong{font-size:12px}
.simulator-tester small{font-size:10px}
.simulator-scenario{padding:10px}
.simulator-scenario strong{font-size:11px}
.simulator-scenario small{font-size:9px}
.simulator-form{gap:8px;margin-top:10px;padding-top:10px}
.simulator-form textarea{min-height:64px;padding:10px;font-size:12px}
.simulator-form .reference-button{padding:9px 12px;font-size:11px}
.simulator-status{font-size:10px;line-height:1.45}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel .simulator-heading{min-height:42px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel .simulator-heading::after{content:"⌄  開啟測試對話";padding:8px 12px;border-radius:8px;font-size:11px;font-weight:800}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded{max-height:min(88vh,820px);padding:16px 18px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-heading::after{content:"⌃  收合測試對話"}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .reference-button{padding:8px 10px;font-size:11px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-section-label{margin-top:10px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-tester{padding:8px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-scenario{padding:8px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-form{margin-top:8px;padding-top:8px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-form textarea{min-height:56px}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-panel-messages{min-height:260px;max-height:430px}
@media(max-width:650px){.reference-simulator-panel{margin:10px;padding:14px}.simulator-heading{align-items:flex-start}.simulator-heading strong{font-size:13px}body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded{left:8px;right:8px;bottom:8px;padding:14px;max-height:90vh}}
.reference-upload-policy,.reference-upload-skipped{font-size:.82rem;line-height:1.55;color:#526174;background:#f5f8fc;border:1px solid #dce5f0;border-radius:8px;padding:8px 10px;margin-top:8px}.reference-upload-skipped{color:#8a3f17;background:#fff7ed;border-color:#fed7aa}.reference-upload-skipped strong{display:block}.reference-upload-skipped small{display:block;margin-top:3px;word-break:break-word}
.simulator-status.selection-required{color:#9a5b00;font-weight:700}
.reference-runtime-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid #edf1f6}
.conversation-tag-options{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}.conversation-tag-option{padding:4px 7px;border:1px solid #d7deea;border-radius:999px;background:#fff;color:#526174;font-size:10px;line-height:1.2;cursor:pointer}.conversation-tag-option:hover,.conversation-tag-option.active{border-color:#1769ff;background:#eef5ff;color:#1557bd}.conversation-tag-option.active{font-weight:700}.conversation-tag-help{display:block;margin-top:5px;color:#7c899e;font-size:10px;line-height:1.4}
.handoff-mode-options{display:flex;flex-wrap:wrap;gap:6px;margin-top:5px}.handoff-mode-option{padding:7px 10px;border:1px solid var(--line);border-radius:7px;background:var(--page,#fff);color:var(--muted);font:inherit;font-size:10px;font-weight:700;cursor:pointer}.handoff-mode-option:hover,.handoff-mode-option.active{border-color:#1769ff;background:#eef5ff;color:#1557bd}.handoff-mode-option.human.active{border-color:#d98a3b;background:#fff3e8;color:#a85b13}.handoff-mode-option.closed.active{border-color:#98a2b3;background:#eef1f5;color:#526174}
.operation-card>h4{display:flex;align-items:center;justify-content:space-between;gap:8px}.operation-unsaved-status{padding:4px 8px;border-radius:999px;background:#fff3e0;color:#a85b13;font-size:10px;font-weight:700;white-space:nowrap}.operation-controls{grid-template-columns:1fr}.operation-reply-mode,.operation-tags{width:100%}.operation-reply-mode .handoff-mode-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:7px}.operation-reply-mode .handoff-mode-option{min-height:44px;padding:10px 12px;border-radius:10px;font-size:12px;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.operation-reply-mode .handoff-mode-option.bot{border-color:#bdd0f5;background:#f5f8ff;color:#1557bd}.operation-reply-mode .handoff-mode-option.human{border-color:#f1d0aa;background:#fffaf4;color:#a85b13}.operation-reply-mode .handoff-mode-option.closed{border-color:#d4dbe5;background:#f7f8fa;color:#526174}.operation-reply-mode .handoff-mode-option.bot.active{border-color:#1769ff;background:#e8f0ff;color:#1557bd;box-shadow:0 0 0 2px #1769ff22}.operation-reply-mode .handoff-mode-option.human.active{border-color:#d98a3b;background:#fff0e0;color:#a85b13;box-shadow:0 0 0 2px #d98a3b22}.operation-reply-mode .handoff-mode-option.closed.active{border-color:#8793a5;background:#e9edf2;color:#526174;box-shadow:0 0 0 2px #8793a522}.operation-assignee{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.operation-assignee label{display:grid;gap:4px;color:var(--muted);font-size:10px}.operation-assignee select{width:100%;padding:8px;border:1px solid var(--line);border-radius:7px;background:var(--page,#fff);color:var(--dark,#263653);font:inherit;font-size:11px}
@media(max-width:650px){.operation-reply-mode .handoff-mode-options{grid-template-columns:1fr}}
.operation-mode.mode-bot{border-color:#bde8cf;background:#f2fcf5}.operation-mode.mode-bot strong{color:#238653}.operation-mode.mode-human{border-color:#f1d0aa;background:#fffaf4}.operation-mode.mode-human strong{color:#a85b13}.operation-mode.mode-closed{border-color:#d4dbe5;background:#f7f8fa}.operation-mode.mode-closed strong{color:#526174}.operation-reply-mode .handoff-mode-option.bot{border-color:#bde8cf;background:#f2fcf5;color:#238653}.operation-reply-mode .handoff-mode-option.human{border-color:#f1d0aa;background:#fffaf4;color:#a85b13}.operation-reply-mode .handoff-mode-option.closed{border-color:#d4dbe5;background:#f7f8fa;color:#526174}.operation-reply-mode .handoff-mode-option.bot.active{border-color:#238653;background:#dff5e7;color:#18794e;box-shadow:0 0 0 2px #23865322}.operation-reply-mode .handoff-mode-option.human.active{border-color:#a26208;background:#fff0e0;color:#a26208;box-shadow:0 0 0 2px #a2620822}.operation-reply-mode .handoff-mode-option.closed.active{border-color:#79869b;background:#edf0f4;color:#526174;box-shadow:0 0 0 2px #79869b22}
@media(max-width:650px){.reference-runtime-actions{align-items:flex-start;flex-direction:column}}

/* Compact, safe entry points for the four connected platform accounts. */
.sidebar-channel-access{display:grid;gap:7px;margin:18px 0 12px;padding:10px;border:1px solid #dfe6f0;border-radius:11px;background:#f8fafc;overflow:hidden}
.sidebar-channel-access-head{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 2px}
.sidebar-channel-access-head strong{color:#263653;font-size:10px;letter-spacing:.04em}
.sidebar-channel-access-head small{color:#7c899e;font-size:9px}
.sidebar-channel-access-list{display:grid;gap:6px}
.sidebar-access-card{display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0;padding:7px;border:1px solid #e1e7ef;border-radius:8px;background:#fff;cursor:pointer;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}
.sidebar-access-card:focus-visible{outline:2px solid #1769ff;outline-offset:2px}.sidebar-access-card:hover{border-color:#b8cbec;background:#fbfdff;box-shadow:0 3px 10px #132b5014}
.sidebar-access-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:7px;color:#fff;font-size:9px;font-weight:800}
.sidebar-access-icon.line{background:#06c755}.sidebar-access-icon.wechat{background:#07c160}.sidebar-access-icon.messenger{background:#168aff}.sidebar-access-icon.whatsapp{background:#25d366}
.sidebar-access-copy{display:grid;min-width:0;gap:2px}
.sidebar-access-copy strong{overflow:hidden;color:#263653;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.sidebar-access-copy span,.sidebar-access-copy small{overflow:hidden;color:#7c899e;font-size:9px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.sidebar-access-copy small{color:#a0aabc}
.sidebar-access-state{padding:3px 5px;border-radius:99px;background:#eef2f7;color:#687792;font-size:8px;white-space:nowrap}
.sidebar-access-state.active{background:#eaf8f0;color:#238653}
.sidebar-access-state.pending{background:#fff7e6;color:#9a650b}
.sidebar-access-qr{display:block;width:58px;height:58px;padding:2px;border:1px solid #e1e7ef;border-radius:5px;background:#fff;overflow:hidden;cursor:zoom-in}.sidebar-access-qr:focus-visible{outline:2px solid #1769ff;outline-offset:2px}
.sidebar-access-qr img{display:block;width:100%;height:100%;object-fit:cover;object-position:center top}
.sidebar-access-card .sidebar-access-icon.line~.sidebar-access-qr img{object-position:left center}
.sidebar-access-card.has-qr{grid-template-columns:26px minmax(0,1fr) 58px}
.sidebar-access-card.has-qr .sidebar-access-state{grid-column:2;justify-self:start}
.sidebar-access-action{display:flex;align-items:center;gap:4px;min-width:0;margin-top:3px}
.sidebar-access-action a{overflow:hidden;color:#1769ff;font-size:9px;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}
.sidebar-access-action-disabled{overflow:hidden;color:#7c899e;font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.sidebar-access-action a:hover{text-decoration:underline}
.sidebar-access-action a.muted{color:#7c899e}
body[data-reference-theme="vercel"] .sidebar-channel-access,body[data-reference-theme="openai"] .sidebar-channel-access{border-color:#34373d;background:#242629}
body[data-reference-theme="vercel"] .sidebar-channel-access-head strong,body[data-reference-theme="openai"] .sidebar-channel-access-head strong{color:#f3f4f6}
body[data-reference-theme="vercel"] .sidebar-channel-access-head small,body[data-reference-theme="openai"] .sidebar-channel-access-head small{color:#a6abb5}
body[data-reference-theme="vercel"] .sidebar-access-card,body[data-reference-theme="openai"] .sidebar-access-card{border-color:#3b3e44;background:#2d3034}
body[data-reference-theme="vercel"] .sidebar-access-card:hover,body[data-reference-theme="openai"] .sidebar-access-card:hover{border-color:#646a74;background:#34383e}
body[data-reference-theme="vercel"] .sidebar-access-copy strong,body[data-reference-theme="openai"] .sidebar-access-copy strong{color:#f3f4f6}
body[data-reference-theme="vercel"] .sidebar-access-copy span,body[data-reference-theme="openai"] .sidebar-access-copy span{color:#d0d4db}
body[data-reference-theme="vercel"] .sidebar-access-copy small,body[data-reference-theme="openai"] .sidebar-access-copy small{color:#9da4af}
body[data-reference-theme="vercel"] .sidebar-access-qr,body[data-reference-theme="openai"] .sidebar-access-qr{border-color:#50555e}
.reference-sidebar[data-nav-expanded="false"] .sidebar-channel-access{display:none}
@media(max-width:650px){.sidebar-channel-access{margin:18px 0 10px}.reference-sidebar[data-nav-expanded="false"] .sidebar-channel-access{display:none}.reference-sidebar[data-nav-expanded="true"] .sidebar-channel-access{display:grid}}
.sidebar-resizer{position:absolute;top:0;right:0;bottom:0;z-index:8;width:10px;margin:0;padding:0;border:0;border-left:1px solid transparent;border-radius:0;background:transparent!important;appearance:none;cursor:col-resize;touch-action:none}.sidebar-resizer::before{content:"";position:absolute;top:50%;right:3px;width:2px;height:44px;border-radius:99px;background:#98a2b3;opacity:0;transform:translateY(-50%);transition:opacity .15s ease,background .15s ease}.sidebar-resizer:hover,.sidebar-resizer:focus-visible,.reference-sidebar.is-resizing .sidebar-resizer{background:#1769ff12!important;border-left-color:#1769ff55;outline:0}.sidebar-resizer:hover::before,.sidebar-resizer:focus-visible::before,.reference-sidebar.is-resizing .sidebar-resizer::before{background:#1769ff;opacity:1}.sidebar-resizer:focus-visible{box-shadow:inset 0 0 0 2px #1769ff66}.reference-sidebar.is-resizing{user-select:none}@media(max-width:650px){.sidebar-resizer{display:none}}
.channel-qr-modal{position:fixed;inset:0;z-index:260;display:grid;place-items:center;padding:20px;background:#06102ca8;backdrop-filter:blur(5px)}.channel-qr-modal-card{width:min(430px,calc(100vw - 32px));padding:20px;border:1px solid #dce5f0;border-radius:16px;background:#fff;color:#263653;box-shadow:0 24px 70px #06102c45}.channel-qr-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.channel-qr-modal-head h3{margin:3px 0 5px;color:#16233d;font-size:18px}.channel-qr-modal-head p{margin:0;color:#687792;font-size:11px;line-height:1.5}.channel-qr-modal-visual{display:grid;place-items:center;margin:18px 0;padding:16px;border:1px solid #e1e7ef;border-radius:12px;background:#f7f9fc}.channel-qr-modal-visual img{display:block;width:min(320px,100%);height:auto;aspect-ratio:1;object-fit:contain;background:#fff;border-radius:8px}.channel-qr-modal-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.channel-qr-modal-actions .reference-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.channel-qr-modal-actions .reference-muted{font-size:10px}@media(max-width:650px){.channel-qr-modal{padding:12px}.channel-qr-modal-card{padding:15px}.channel-qr-modal-head h3{font-size:16px}.channel-qr-modal-visual{margin:14px 0;padding:10px}.channel-qr-modal-visual img{width:min(280px,100%)}}
 body.reference-modal-open{overflow:hidden}

/* Keep the expanded test panel inside the visible 1080p work area. */
@media(min-width:651px){body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded{top:12px;bottom:12px;height:auto;max-height:none;overflow-y:auto}body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded .simulator-heading{position:sticky;top:0;z-index:4;background:inherit;padding-bottom:10px}}
.simulator-collapse-bottom{display:none;width:100%;justify-content:center;align-items:center;margin-top:10px;padding:8px 10px;border-top:1px solid #dfe6f0}
body.reference-inbox-active #reference-inbox-view #reference-simulator-panel.is-expanded>.simulator-collapse-bottom{display:flex!important;position:sticky;bottom:0;z-index:4;background:inherit}
.channel-qr-modal{overflow:auto}
.channel-qr-modal-card{max-height:calc(100dvh - 24px);overflow:auto}
.channel-qr-modal-visual img{width:min(320px,calc(100vw - 80px),calc(100dvh - 240px));max-height:calc(100dvh - 240px)}
@media(max-width:650px){.channel-qr-modal-card{max-height:calc(100dvh - 16px)}.channel-qr-modal-visual img{width:min(280px,calc(100vw - 60px),calc(100dvh - 220px));max-height:calc(100dvh - 220px)}}
