/* Geometry follows the observed reference. --reference-scale is shared with
   the shell when available; the measured 1280px reference default is 1.1015625. */
.refct-root, .refct-history-panel, .refct-side-tab, #history-tab, .refct-scroll-tools, .refct-help-button {
  --refct-scale: var(--reference-scale, 1.1015625);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "HarmonyOS Sans", "Microsoft YaHei", sans-serif;
}
.refct-root *, .refct-history-panel *, .refct-scroll-tools * { box-sizing: border-box; }
.refct-root [hidden], .refct-history-panel[hidden], .refct-scroll-tools[hidden], .refct-help-button[hidden], .refct-side-tab[hidden] { display: none !important; }
.refct-icon { display: block; flex: none; width: calc(0.9078rem * var(--refct-scale)); height: calc(0.9078rem * var(--refct-scale)); }
.refct-root button, .refct-history-panel button { font: inherit; cursor: pointer; }
.refct-root button:disabled, .refct-history-panel button:disabled { opacity: .3; cursor: default; }
.refct-root button:focus-visible, .refct-history-panel button:focus-visible, .refct-side-tab:focus-visible, .refct-help-button:focus-visible { outline: 0.1135rem solid #ffe066; outline-offset: 0.1135rem; }
.refct-message-panel { position: fixed; z-index: 125; top: calc(4.9929rem * var(--refct-scale)); right: 0; bottom: calc(0.7943rem * var(--refct-scale)); display: flex; flex-direction: column; width: calc(17.2482rem * var(--refct-scale)); max-width: calc(100vw - 0.7943rem); border: 1px solid #ffd70024; border-right: 0; border-radius: calc(0.9078rem * var(--refct-scale)) 0 0 calc(0.9078rem * var(--refct-scale)); background: rgba(22,24,30,.82); color: #bfc0ca; backdrop-filter: blur(1.1348rem); box-shadow: -0.6809rem 0 1.9858rem #0004; }
.refct-panel-header { display: flex; align-items: center; justify-content: space-between; flex: none; gap: calc(0.4539rem * var(--refct-scale)); padding: calc(0.6809rem * var(--refct-scale)) calc(0.7943rem * var(--refct-scale)) calc(0.4539rem * var(--refct-scale)); }
.refct-panel-header h2 { display: flex; align-items: center; gap: calc(0.3972rem * var(--refct-scale)); margin: 0; color: #ffd700; font-size: calc(0.7943rem * var(--refct-scale)); font-weight: 700; }
.refct-panel-header h2 > span { display: inline-grid; place-items: center; min-width: calc(1.0213rem * var(--refct-scale)); height: calc(1.0213rem * var(--refct-scale)); padding: 0 calc(0.227rem * var(--refct-scale)); border: 1px solid #ffd70036; border-radius: 0.2837rem; background: #ffd7000a; font-size: calc(0.6241rem * var(--refct-scale)); font-weight: 500; }
.refct-icon-button { display: inline-grid; place-items: center; flex: none; width: calc(1.5887rem * var(--refct-scale)); height: calc(1.5887rem * var(--refct-scale)); padding: calc(0.2837rem * var(--refct-scale)); border: 0; border-radius: calc(0.3404rem * var(--refct-scale)); background: transparent; color: #90929f; }
.refct-panel-header > .refct-icon-button { width: calc(1.8156rem * var(--refct-scale)); height: calc(1.8156rem * var(--refct-scale)); }
.refct-icon-button:hover { background: #ffffff0a; color: #dfdfe8; }
.refct-icon-button.amber { color: #eac839; }
.refct-icon-button.red { color: #df717c; }
.refct-search { display: flex; align-items: center; flex: none; gap: calc(0.3972rem * var(--refct-scale)); height: calc(1.8156rem * var(--refct-scale)); margin: 0 calc(0.7943rem * var(--refct-scale)); padding: 0 calc(0.5674rem * var(--refct-scale)); border: 1px solid #ffffff14; border-radius: calc(0.3972rem * var(--refct-scale)); background: #ffffff04; color: #818492; }
.refct-search .refct-icon { width: calc(0.7943rem * var(--refct-scale)); height: calc(0.7943rem * var(--refct-scale)); }
.refct-search input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0; background: transparent; color: #d0d1da; font: inherit; font-size: calc(0.6809rem * var(--refct-scale)); }
.refct-search input::placeholder { color: #737681; }
.refct-search:focus-within { border-color: #ffd70057; }
.refct-message-toolbar, .refct-history-toolbar { display: flex; align-items: center; flex: none; gap: calc(0.227rem * var(--refct-scale)); padding: calc(0.3972rem * var(--refct-scale)) calc(0.5674rem * var(--refct-scale)); color: #858997; font-size: calc(0.6241rem * var(--refct-scale)); }
.refct-select-all { display: flex; align-items: center; gap: calc(0.3404rem * var(--refct-scale)); white-space: nowrap; cursor: pointer; }
.refct-item-check, .refct-select-all input { display: inline-block; flex: none; width: calc(0.7376rem * var(--refct-scale)); height: calc(0.7376rem * var(--refct-scale)); margin: 0; padding: 0; accent-color: #ffd700; cursor: pointer; }
#refct-message-meta { margin-left: auto; white-space: nowrap; }
.refct-message-list, .refct-history-list { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 calc(0.4539rem * var(--refct-scale)) calc(0.5674rem * var(--refct-scale)); scrollbar-width: thin; scrollbar-color: #d5bc3e30 transparent; }
.refct-message-item { display: flex; align-items: flex-start; gap: calc(0.3972rem * var(--refct-scale)); padding: calc(0.4539rem * var(--refct-scale)) calc(0.5674rem * var(--refct-scale)); border-bottom: 1px solid #ffffff08; border-radius: calc(0.3404rem * var(--refct-scale)); }
.refct-message-item:hover { background: #ffd70007; }
.refct-message-item > input { margin-top: calc(0.1702rem * var(--refct-scale)); }
.refct-message-item > button { min-width: 0; flex: 1; padding: 0; border: 0; background: transparent; color: #b6b8c3; text-align: left; font-size: calc(0.6809rem * var(--refct-scale)); line-height: 1.55; }
.refct-message-item > button > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.refct-message-item time { display: block; margin-top: calc(0.2837rem * var(--refct-scale)); color: #777c8b; font-size: calc(0.6241rem * var(--refct-scale)); }
.refct-empty { display: grid; place-items: center; min-height: calc(7.3759rem * var(--refct-scale)); padding: 1.1348rem; color: #777b89; font-size: calc(0.6809rem * var(--refct-scale)); }
.refct-history-panel { position: fixed; z-index: 65; inset: 0 auto 0 var(--sidebar); display: flex; flex-direction: column; width: calc(15.8865rem * var(--refct-scale)); border-right: 1px solid #ffd70015; background: linear-gradient(145deg, rgba(22,24,30,.96), rgba(16,17,22,.99)); color: #bbbdc9; }
.refct-history-panel .refct-panel-header { padding: calc(0.7943rem * var(--refct-scale)) calc(0.7943rem * var(--refct-scale)) calc(0.4539rem * var(--refct-scale)); }
.refct-new-conversation { display: flex; align-items: center; justify-content: center; flex: none; gap: calc(0.3972rem * var(--refct-scale)); height: calc(2.0426rem * var(--refct-scale)); margin: calc(0.1702rem * var(--refct-scale)) calc(0.7943rem * var(--refct-scale)) calc(0.6809rem * var(--refct-scale)); padding: 0 0.6809rem; border: 1px solid #ffd70036; border-radius: calc(0.6809rem * var(--refct-scale)); background: linear-gradient(135deg,#ffe066,#ffc53d 48%,#f0932b); color: #33290d; font-size: calc(0.7376rem * var(--refct-scale)) !important; font-weight: 700 !important; box-shadow: 0 0 0.9078rem #f8c6331c; }
.refct-history-panel .refct-search { height: calc(1.9291rem * var(--refct-scale)); }
.refct-history-toolbar { padding-inline: calc(0.7943rem * var(--refct-scale)); }
#refct-history-selected { margin-left: auto; }
.refct-history-item { position: relative; display: flex; align-items: flex-start; gap: calc(0.4539rem * var(--refct-scale)); margin-bottom: calc(0.227rem * var(--refct-scale)); padding: calc(0.5674rem * var(--refct-scale)) calc(0.4539rem * var(--refct-scale)) calc(0.5674rem * var(--refct-scale)) calc(0.3404rem * var(--refct-scale)); border: 1px solid transparent; border-radius: calc(0.5106rem * var(--refct-scale)); }
.refct-history-item.is-current { border-color: #ffd7002e; background: linear-gradient(115deg, rgba(255,215,0,.12), rgba(255,215,0,.035)); }
.refct-history-item:hover { background-color: #ffffff04; }
.refct-history-item .refct-item-check { margin-top: calc(0.1702rem * var(--refct-scale)); }
.refct-history-copy { flex: 1; min-width: 0; }
.refct-history-model-icon { display: grid; place-items: center; flex: none; width: calc(1.5887rem * var(--refct-scale)); height: calc(1.5887rem * var(--refct-scale)); margin-top: calc(0.1702rem * var(--refct-scale)); }
.refct-history-model-icon > img, .refct-history-model-icon > svg { width: 100%; height: 100%; object-fit: contain; }
.refct-history-name { display: flex; align-items: center; gap: calc(0.227rem * var(--refct-scale)); }
.refct-history-name > button { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; border: 0; background: transparent; color: #dedee6; text-align: left; font-size: calc(0.7376rem * var(--refct-scale)) !important; line-height: 1.5; }
.refct-history-item.is-current .refct-history-name > button { color: #ffdc52; }
.refct-pinned-mark { color: #c3ab40; }
.refct-pinned-mark .refct-icon { width: calc(0.6241rem * var(--refct-scale)); height: calc(0.6241rem * var(--refct-scale)); }
.refct-history-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.227rem 0.4539rem; margin-top: calc(0.2837rem * var(--refct-scale)); overflow: hidden; color: #777d8d; font-size: calc(0.6241rem * var(--refct-scale)); line-height: 1.45; }
.refct-history-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refct-history-category { padding: 0 calc(0.227rem * var(--refct-scale)); border: 1px solid #ffd7002e; border-radius: calc(0.1702rem * var(--refct-scale)); background: #ffd70008; color: #c7b35c; font-size: calc(0.5674rem * var(--refct-scale)); line-height: 1.5; }
.refct-history-date { display: flex; align-items: flex-end; flex-direction: column; flex: none; gap: calc(0.1702rem * var(--refct-scale)); padding-top: calc(0.1135rem * var(--refct-scale)); color: #777d8d; font-size: calc(0.6241rem * var(--refct-scale)); line-height: 1.5; font-variant-numeric: tabular-nums; }
.refct-history-item-actions { position: absolute; right: calc(0.227rem * var(--refct-scale)); bottom: calc(0.227rem * var(--refct-scale)); display: flex; align-items: center; gap: 0; opacity: 0; pointer-events: none; border-radius: calc(0.3972rem * var(--refct-scale)); background: #1c1d24f5; transition: opacity .15s; }
.refct-history-item:hover .refct-history-item-actions, .refct-history-item:focus-within .refct-history-item-actions { opacity: 1; pointer-events: auto; }
.refct-rename-input { min-width: 0; width: 100%; height: calc(1.4752rem * var(--refct-scale)); padding: 0.1135rem 0.2837rem; border: 1px solid #ffd7006b; border-radius: 0.2837rem; outline: 0; background: #111218; color: #e8e5d8; font: inherit; font-size: calc(0.7376rem * var(--refct-scale)); }
.refct-side-tab, #history-tab { position: absolute; z-index: 75; top: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: calc(0.4539rem * var(--refct-scale)); width: calc(2.156rem * var(--refct-scale)); height: calc(7.0355rem * var(--refct-scale)); padding: calc(0.5674rem * var(--refct-scale)) calc(0.2837rem * var(--refct-scale)); border: 1px solid #ffffff12; border-radius: calc(0.7943rem * var(--refct-scale)); background: linear-gradient(145deg,#21222bed,#12131aed); color: #8e92a2; font-size: calc(0.6241rem * var(--refct-scale)); transform: translateY(-50%); writing-mode: horizontal-tb; }
#history-tab { left: 0; border-left: 0; border-radius: 0 calc(0.7943rem * var(--refct-scale)) calc(0.7943rem * var(--refct-scale)) 0; }
body.media-mode #history-tab, body.media-mode #manual { display: none !important; }
#history-tab .refct-side-tab-label { margin: 0; font-size: calc(0.6241rem * var(--refct-scale)); color: #8e92a2; writing-mode: vertical-rl; }
.refct-message-tab { right: 0; border-right: 0; border-radius: calc(0.7943rem * var(--refct-scale)) 0 0 calc(0.7943rem * var(--refct-scale)); }
.refct-side-tab-icon, #history-tab .refct-side-tab-icon { display: grid; place-items: center; flex: none; width: calc(1.4184rem * var(--refct-scale)); height: calc(1.4184rem * var(--refct-scale)); margin: 0; border-radius: calc(0.3972rem * var(--refct-scale)); background: linear-gradient(145deg,#ffe368,#ffb925); color: #564116; box-shadow: 0 0 0.7376rem #ffc62b3b; }
.refct-side-tab-icon .refct-icon { width: 0.8511rem; height: 0.8511rem; stroke-width: 3.2; }
.refct-side-tab-label { max-height: calc(3.0071rem * var(--refct-scale)); writing-mode: vertical-rl; line-height: 1; letter-spacing: calc(0.1135rem * var(--refct-scale)); }
.refct-side-count, #history-tab .refct-side-count { display: grid; place-items: center; min-width: calc(0.9645rem * var(--refct-scale)); height: calc(0.9645rem * var(--refct-scale)); margin: 0; padding: 0 0.1702rem; border: 1px solid #ffd70041; border-radius: 50%; background: #ffd70008; color: #ceb53d; font-size: calc(0.5674rem * var(--refct-scale)); line-height: 1; }
.refct-scroll-tools { position: fixed; z-index: 100; bottom: max(calc(1.1348rem * var(--refct-scale)), env(safe-area-inset-bottom)); display: flex; align-items: center; gap: calc(0.4539rem * var(--refct-scale)); transform: translateX(-50%); }
.refct-scroll-tools #composer-expand, .refct-bottom-button { position: static; display: grid; place-items: center; flex: none; width: calc(2.7234rem * var(--refct-scale)); height: calc(2.7234rem * var(--refct-scale)); padding: 0; border: 1px solid #1e1f25; border-radius: 50%; background: rgba(27,28,33,.95); opacity: 1; visibility: visible; pointer-events: auto; transform: none; cursor: pointer; }
.refct-scroll-tools #composer-expand { color: #00bed6; border-color: #00bfd630; box-shadow: 0 0 1.1348rem #00bed615; }
.refct-scroll-tools #composer-expand svg { width: calc(1.1348rem * var(--refct-scale)); height: calc(1.1348rem * var(--refct-scale)); stroke-width: 2.4; }
.refct-bottom-button { color: #dfdfe7; }
.refct-bottom-button .refct-icon { width: calc(1.1348rem * var(--refct-scale)); height: calc(1.1348rem * var(--refct-scale)); stroke-width: 2.4; }
.refct-help-button { position: fixed; z-index: 100; right: calc(1.1348rem * var(--refct-scale)); bottom: max(calc(1.1348rem * var(--refct-scale)), env(safe-area-inset-bottom)); display: grid; place-items: center; width: calc(2.7234rem * var(--refct-scale)); height: calc(2.7234rem * var(--refct-scale)); padding: 0; border: 1px solid #2a7a933d; border-radius: 50%; background: linear-gradient(135deg, rgba(0,201,224,.14), rgba(27,28,33,.94) 48%, rgba(135,88,222,.1)); color: #7fb0f5; box-shadow: 0 0 1.1348rem #00c9e023, inset 0 0 0.5674rem #00c9e00d; cursor: pointer; }
.refct-help-button .refct-icon { width: calc(1.305rem * var(--refct-scale)); height: calc(1.305rem * var(--refct-scale)); stroke-width: 2.4; }
.refct-help-button:hover { border-color: #1ea2c36b; box-shadow: 0 0 1.4184rem #00c9e033; }
.refct-dialog-backdrop { position: fixed; z-index: 250; inset: 0; background: #0008; backdrop-filter: blur(0.3404rem); }
.refct-export-popover { position: fixed; z-index: 260; display: block; width: 13.5rem; padding: .5rem; border: 1px solid rgba(255,255,255,.1); border-radius: .75rem; background: rgba(20,22,28,.98); box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.3),0 0 0 1px rgba(255,255,255,.02); backdrop-filter: blur(12px); color: inherit; font-size: 1rem; line-height: 1.5; cursor: pointer; }
.refct-history-panel .refct-export-popover.is-history-export { position: absolute; right: .3125rem; top: calc(50% + 1.125rem); z-index: 5; }
.refct-history-panel .refct-history-item:has(.is-history-export) { cursor: pointer; }
.refct-export-popover .refct-export-title { margin: 0 0 .375rem; font-size: .6875rem; font-weight: 700; }
.refct-export-popover .refct-export-count { margin: 0 0 .375rem; font-size: .6875rem; }
.refct-export-popover .refct-export-formats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .25rem; padding: .1875rem; border: 1px solid rgba(255,255,255,.08); border-radius: .625rem; background: rgba(0,0,0,.2); }
.refct-export-popover .refct-export-type { position: relative; display: flex; align-items: center; justify-content: center; min-height: 1.625rem; padding: 0 .25rem; border: 1px solid transparent; border-radius: .5rem; color: inherit; font-size: .6875rem; font-weight: 600; cursor: pointer; user-select: none; transition: background .18s,border-color .18s,color .18s,box-shadow .18s; }
.refct-export-popover .refct-export-type:hover,.refct-export-popover .refct-export-type.active { border-color: rgba(255,215,0,.34); background: rgba(255,215,0,.08); color: rgba(255,224,126,.95); }
.refct-export-popover .refct-export-type.active { background: linear-gradient(135deg,rgba(255,215,0,.16),rgba(247,147,26,.14)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12),0 .25rem .75rem #f7931a1f; }
.refct-export-popover .refct-export-type input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; outline: 3px none currentColor; opacity: 0; color: #000; cursor: pointer; font: 13.3333px Arial; }
.refct-export-popover .refct-export-actions { display: flex; justify-content: flex-end; gap: .375rem; margin-top: .5rem; }
.refct-export-popover .refct-export-actions > button { display: block; height: 1.625rem; padding: 0 .625rem; border: 0; border-radius: .5rem; font-family: inherit; font-size: .6875rem; font-weight: 600; line-height: normal; cursor: pointer; transition: transform .18s,box-shadow .18s,background .18s; }
.refct-export-popover .refct-export-cancel { background: rgba(255,255,255,.08); color: inherit; }
.refct-export-popover .refct-export-confirm { background: linear-gradient(135deg,gold,rgb(247,147,26)); color: rgb(26,26,26); box-shadow: rgba(247,147,26,.22) 0 .375rem 1rem; }
.refct-export-popover .refct-export-actions > button:hover { transform: translateY(-1px); }
.refct-confirm-dialog footer { display: flex; align-items: center; justify-content: flex-end; gap: calc(.4539rem * var(--refct-scale)); }

.refct-confirm-dialog { position: fixed; z-index: 260; top: 50%; left: 50%; transform: translate(-50%,-50%); display: flex; flex-direction: column; width: calc(22.695rem * var(--refct-scale)); max-width: calc(100vw - 1.5887rem); max-height: calc(100dvh - 1.5887rem); overflow: hidden; border: 1px solid #ffffff1b; border-radius: calc(0.8511rem * var(--refct-scale)); background: linear-gradient(145deg, rgba(22,24,30,.95), rgba(16,17,22,.98)); color: #c7c9d4; box-shadow: 0 1.4184rem 4.2553rem #0008; }
.refct-confirm-dialog > header { display: flex; align-items: center; justify-content: space-between; flex: none; padding: calc(0.9078rem * var(--refct-scale)) calc(1.1348rem * var(--refct-scale)); border-bottom: 1px solid #ffffff0a; }
.refct-confirm-dialog h2 { margin: 0; color: #f0d352; font-size: calc(0.9078rem * var(--refct-scale)); font-weight: 600; }
.refct-confirm-dialog > p { padding: calc(0.7943rem * var(--refct-scale)) calc(1.1348rem * var(--refct-scale)); margin: 0; font-size: calc(0.7376rem * var(--refct-scale)); line-height: 1.8; }
.refct-confirm-dialog footer { flex: none; padding: calc(0.9078rem * var(--refct-scale)) calc(1.1348rem * var(--refct-scale)); border-top: 1px solid #ffffff0a; }
.refct-confirm-dialog footer > button { min-width: calc(3.6879rem * var(--refct-scale)); padding: calc(0.3972rem * var(--refct-scale)) calc(0.9645rem * var(--refct-scale)); border: 1px solid #ffffff18; border-radius: calc(0.3972rem * var(--refct-scale)); background: #ffffff06; color: #afb2bf; font-size: calc(0.7376rem * var(--refct-scale)); }
.refct-confirm-accept { border-color: #dc6a7659 !important; background: #a93b4823 !important; color: #ed929b !important; }
.refct-confirm-accept.is-merge { border-color: #ffd70042 !important; background: #ffd70013 !important; color: #f0d343 !important; }
/* The observed history-delete tishikuang is separate from message/merge UI. */
.refct-history-delete-overlay { position: fixed; inset: 0; z-index: 20000; display: flex; align-items: center; justify-content: center; padding: 1.25rem; background-color: rgba(15,15,18,.85); backdrop-filter: blur(.5rem); -webkit-backdrop-filter: blur(.5rem); color: #000; font-size: 1rem; font-weight: 400; line-height: 1.5; animation: refct-history-delete-overlay-enter .3s ease; }
.refct-confirm-dialog.is-history-delete { position: relative; z-index: auto; top: 0; left: 0; transform: none; display: flex; flex-direction: column; width: 100%; min-width: 30rem; max-width: 32.5rem; max-height: 90vh; margin: 0; padding: 0; border: 0; border-radius: 1rem; overflow: hidden; background: linear-gradient(135deg,#1e1f25 0%,#1b1c21 100%); color: #000; font-size: 1rem; font-weight: 400; line-height: 1.5; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.2),0 0 0 .0625rem rgba(0,202,224,.1); animation: refct-history-delete-enter .3s cubic-bezier(.34,1.56,.64,1); }
.refct-confirm-dialog.is-history-delete::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: .125rem; background: linear-gradient(90deg,transparent 0%,#00cae0 50%,transparent 100%); opacity: .6; }
.refct-history-delete-overlay,.refct-confirm-dialog.is-history-delete,.is-history-delete .refct-history-delete-header,.is-history-delete .refct-history-delete-title,.is-history-delete .refct-history-delete-icon,.is-history-delete .refct-history-delete-body,.is-history-delete .refct-history-delete-body-main,.is-history-delete .refct-history-delete-footer { transition: background-color .25s,color .2s,border-color .25s,box-shadow .25s; }
.is-history-delete .refct-history-delete-header { position: relative; display: flex; align-items: center; justify-content: space-between; flex: 0 1 auto; padding: 1.5rem 1.75rem 1.25rem; border-bottom: .0625rem solid rgba(0,202,224,.1); }
.is-history-delete .refct-history-delete-title { margin: 0; padding: 0; color: #f5fbff; font-size: 1.25rem; font-weight: 600; line-height: 1.4; background: linear-gradient(135deg,#f5fbff 0%,#00cae0 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.is-history-delete .refct-history-delete-close { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 2rem; height: 2rem; margin: 0; padding: 0; border: 0; border-radius: .5rem; background: rgba(0,202,224,.1); color: #8c99a0; cursor: pointer; font-family: Arial; font-size: .875rem; font-weight: 400; line-height: normal; transition: .3s; -webkit-tap-highlight-color: transparent; }
.is-history-delete .refct-history-delete-close svg { display: block; width: 1.125rem; height: 1.125rem; stroke: currentColor; }
.is-history-delete .refct-history-delete-close:hover { background: rgba(0,202,224,.2); color: #00cae0; transform: rotate(90deg); }
.is-history-delete .refct-history-delete-close:active { background: rgba(0,202,224,.2); color: #00cae0; }
.is-history-delete .refct-history-delete-body { display: flex; align-items: center; justify-content: center; flex: 1 1 0%; min-height: 7.5rem; max-height: calc(90vh - 12.5rem); overflow-y: auto; padding: 2rem 2.25rem; }
.is-history-delete .refct-history-delete-body-main { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 1rem; }
.is-history-delete .refct-history-delete-content { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; color: #8c99a0; font-size: .9375rem; line-height: 1.8; text-align: center; overflow-wrap: break-word; transition: .3s; }
.is-history-delete .refct-history-delete-footer { display: flex; flex: 0 1 auto; flex-wrap: wrap; flex-direction: row; align-items: normal; justify-content: normal; gap: .75rem; padding: 1.25rem 1.75rem 1.5rem; border-top: .0625rem solid rgba(0,202,224,.1); }
.is-history-delete .refct-history-delete-button { position: relative; display: flex; align-items: center; justify-content: center; flex: 1 1 0%; gap: .5rem; min-width: 6.25rem; padding: .75rem 1.5rem; border: .0938rem solid rgba(0,202,224,.2); border-radius: .625rem; overflow: hidden; background: #1b1c21; color: #8c99a0; cursor: pointer; font-family: Arial; font-size: .875rem; font-weight: 500; line-height: normal; transition: .3s cubic-bezier(.4,0,.2,1); }
.is-history-delete .refct-history-delete-button::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg,transparent,rgba(0,202,224,.1),transparent); transition: left .5s; }
.is-history-delete .refct-history-delete-button:hover::before { left: 100%; }
.is-history-delete .refct-history-delete-button:hover { transform: translateY(-.125rem); box-shadow: 0 .25rem .75rem rgba(0,202,224,.3); border-color: #00cae0; color: #00cae0; }
.is-history-delete .refct-history-delete-button:active { transform: translateY(0); }
.is-history-delete .refct-history-delete-button.primary { background: linear-gradient(135deg,#00cae0 0%,rgba(0,202,224,.8) 100%); color: #0f0f12; border-color: #00cae0; font-weight: 600; }
.is-history-delete .refct-history-delete-button.primary:hover { background: linear-gradient(135deg,rgba(0,202,224,.9) 0%,#00cae0 100%); box-shadow: 0 .25rem 1rem rgba(0,202,224,.4); }
.is-history-delete .refct-history-delete-body::-webkit-scrollbar { width: .375rem; }
.is-history-delete .refct-history-delete-body::-webkit-scrollbar-track { background: rgba(0,202,224,.05); border-radius: .1875rem; }
.is-history-delete .refct-history-delete-body::-webkit-scrollbar-thumb { background: rgba(0,202,224,.3); border-radius: .1875rem; }
.is-history-delete .refct-history-delete-body::-webkit-scrollbar-thumb:hover { background: rgba(0,202,224,.5); }
@keyframes refct-history-delete-enter { 0% { opacity: 0; transform: scale(.9) translateY(-1.25rem); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes refct-history-delete-overlay-enter { from { opacity: 0; } to { opacity: 1; } }
.refct-history-delete-overlay.is-leaving { animation: none; opacity: 0; transition: opacity .3s; }
.refct-history-delete-overlay.is-leaving .refct-confirm-dialog.is-history-delete { animation: none; transform: scale(.9) translateY(-1.25rem); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
@media (max-width:40rem) {
  .refct-confirm-dialog.is-history-delete { min-width: auto; max-width: 100%; margin: .625rem; border-radius: .75rem; }
  .is-history-delete .refct-history-delete-header { padding: 1.25rem 1.25rem 1rem; }
  .is-history-delete .refct-history-delete-title { font-size: 1.125rem; }
  .is-history-delete .refct-history-delete-close { width: 2.25rem; height: 2.25rem; color: #f5fbff; }
  .is-history-delete .refct-history-delete-close svg { width: 1.25rem; height: 1.25rem; }
  .is-history-delete .refct-history-delete-body { padding: 1.25rem; }
  .is-history-delete .refct-history-delete-footer { padding: 1rem 1.25rem 1.25rem; flex-direction: column; }
  .is-history-delete .refct-history-delete-button { width: 100%; min-width: auto; }
}
.refct-status { position: fixed; z-index: 280; bottom: 1.4184rem; left: 50%; transform: translateX(-50%); max-width: min(28.3688rem,calc(100vw - 1.7021rem)); padding: 0.5674rem 0.9078rem; border: 1px solid #a9b7d32a; border-radius: 0.5106rem; background: #232631f5; color: #dadfea; font-size: 0.7376rem; line-height: 1.6; box-shadow: 0 0.5674rem 1.7021rem #0006; }
.refct-status.is-error { border-color: #b5647042; color: #ecbbc2; }
.refct-root:has(.refct-history-delete-overlay:not([hidden])) .refct-status { z-index: 20001; }
.refct-conversation { --refct-scale: var(--reference-scale, 1.1015625); display: flex; flex-direction: column; gap: calc(1.3617rem * var(--refct-scale)); width: min(calc(54.4681rem * var(--refct-scale)),calc(100% - 1.8156rem)); }
.refct-chat-message { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; padding: 0; border: 0; background: transparent; color: #d3d3df; font-size: calc(0.7943rem * var(--refct-scale)); line-height: 1.85; }
.refct-chat-message.is-user { align-items: flex-end; }
.refct-message-card { min-width: 0; max-width: 100%; width: 100%; border: 1px solid #ffffff06; border-radius: 0.5106rem; background: #14151be6; }
.refct-chat-message.is-user .refct-message-card { width: max-content; max-width: 85%; padding: calc(0.6241rem * var(--refct-scale)) calc(0.9078rem * var(--refct-scale)); border-color: #00c9e032; background: #0c374249; border-radius: calc(0.7376rem * var(--refct-scale)); }
.refct-user-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.refct-message-model { display: flex; align-items: center; gap: calc(0.4539rem * var(--refct-scale)); padding: calc(0.6809rem * var(--refct-scale)) calc(0.9078rem * var(--refct-scale)) 0; color: #aaaabd; font-size: calc(0.6809rem * var(--refct-scale)); }
.refct-message-model > img, .refct-message-model > svg { width: calc(1.2482rem * var(--refct-scale)); height: calc(1.2482rem * var(--refct-scale)); object-fit: contain; }
.refct-message-body { padding: calc(0.6809rem * var(--refct-scale)) calc(0.9078rem * var(--refct-scale)); overflow-wrap: anywhere; }
.refct-chat-message.is-user .refct-message-body { padding: 0; }
.refct-chat-message.is-assistant .refct-message-body { max-height: calc(18.7234rem * var(--refct-scale)); overflow: hidden; }
.refct-chat-message.is-assistant .refct-message-card.is-expanded .refct-message-body { max-height: none; }
.refct-reply-expand { display: none; align-items: center; justify-content: center; gap: 0.3404rem; width: 100%; height: calc(1.9858rem * var(--refct-scale)); padding: 0; border: 0; border-top: 1px solid #ffd70014; background: linear-gradient(0deg,#ffd7000b,#ffd70003); color: #cbbf70; font: inherit; font-size: calc(0.6809rem * var(--refct-scale)); cursor: pointer; }
.refct-message-card.has-overflow > .refct-reply-expand { display: flex; }
.refct-message-card.is-expanded .refct-reply-expand .refct-icon { transform: rotate(180deg); }
.refct-message-actions { display: flex; align-items: center; gap: calc(0.5674rem * var(--refct-scale)); margin-top: 0.227rem; padding: 0 0.2837rem; color: #74798b; font-size: calc(0.5674rem * var(--refct-scale)); }
.refct-message-actions > button { display: grid; place-items: center; width: calc(1.3617rem * var(--refct-scale)); height: calc(1.3617rem * var(--refct-scale)); padding: 0.227rem; border: 0; border-radius: 0.2837rem; background: transparent; color: #9095a7; cursor: pointer; }
.refct-message-actions > button:hover { background: #ffffff0b; color: #d9dcec; }
.refct-message-actions .refct-icon { width: calc(0.7376rem * var(--refct-scale)); height: calc(0.7376rem * var(--refct-scale)); }
.refct-chat-message.is-located .refct-message-card { animation: refct-message-highlight 1.3s ease; }
.refct-markdown p { margin: 0 0 calc(0.7943rem * var(--refct-scale)); }
.refct-markdown p:last-child { margin-bottom: 0; }
.refct-markdown :is(h1,h2,h3,h4,h5,h6) { margin: calc(1.0213rem * var(--refct-scale)) 0 calc(0.5106rem * var(--refct-scale)); color: #e0e0ec; line-height: 1.6; }
.refct-markdown h1 { font-size: 1.55em; }.refct-markdown h2 { font-size: 1.3em; }.refct-markdown h3 { font-size: 1.15em; }
.refct-markdown strong { color: #dddde8; font-weight: 700; }
.refct-markdown :is(ul,ol) { padding-left: 1.7em; margin: 0 0 0.7943rem; }
.refct-markdown blockquote { margin: 0.4539rem 0 0.9078rem; padding: 0.5106rem 0.9078rem; border-left: 0.1702rem solid #d4bd4560; background: #ffffff03; color: #9fa4b5; }
.refct-markdown pre { max-width: 100%; overflow-x: auto; margin: 0.5674rem 0 0.9078rem; padding: 0.7943rem; border: 1px solid #ffffff0c; border-radius: 0.3972rem; background: #0a0b10; line-height: 1.65; }
.refct-markdown code { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: .9em; }
.refct-markdown :not(pre) > code { padding: 0.1135rem 0.2837rem; border-radius: 0.227rem; background: #ffffff0b; color: #b7d5ed; }
.refct-markdown a { color: #5fc9df; text-decoration: underline; text-underline-offset: 0.1702rem; }
.refct-markdown hr { margin: 1.1348rem 0; border: 0; border-top: 1px solid #ffffff1c; }
.refct-markdown-table { max-width: 100%; overflow-x: auto; margin: 0.6809rem 0; }
.refct-markdown table { border-collapse: collapse; min-width: 100%; }
.refct-markdown :is(th,td) { padding: 0.3972rem 0.6241rem; border: 1px solid #ffffff18; text-align: left; }
.refct-markdown th { background: #ffffff07; }
@keyframes refct-message-highlight { 0%,40% { box-shadow: 0 0 0 0.1135rem #ffd70065; } 100% { box-shadow: 0 0 0 0.1135rem transparent; } }
@media (max-width: 840px) {
  .refct-root, .refct-history-panel, .refct-side-tab, #history-tab, .refct-scroll-tools, .refct-help-button, .refct-conversation { --refct-scale: 1; }
  .refct-history-panel { z-index: 190; left: 0; width: min(18.156rem,calc(100vw - 2.0426rem)); box-shadow: 0.9078rem 0 2.8369rem #0007; }
  .refct-message-panel { top: 5.1064rem; bottom: 0.7943rem; width: min(17.2482rem,calc(100vw - 1.9858rem)); }
  .refct-side-tab, #history-tab { width: 1.7589rem; height: 6.695rem; }
  .refct-side-tab-icon, #history-tab .refct-side-tab-icon { width: 1.305rem; height: 1.305rem; }
  .refct-message-tab { z-index: 80; }
  .refct-history-item-actions { position: static; align-self: center; flex-wrap: wrap; width: 3.1773rem; opacity: 1; pointer-events: auto; background: transparent; }
  .refct-history-item-actions .refct-icon-button { width: 1.5319rem; height: 1.5319rem; padding: 0.3404rem; }
  .refct-conversation { width: 100%; gap: 1.0213rem; }
  .refct-chat-message { font-size: 0.7943rem; }
  .refct-chat-message.is-user .refct-message-card { max-width: 90%; }
  .refct-message-body { padding: 0.5674rem 0.6809rem; }
  .refct-scroll-tools { bottom: max(0.9078rem,env(safe-area-inset-bottom)); }
  .refct-help-button { right: 0.6809rem; bottom: max(0.9078rem,env(safe-area-inset-bottom)); width: 2.4397rem; height: 2.4397rem; }
  body:not(:has(#composer-island.is-collapsed)) .refct-help-button { bottom: max(calc(var(--island-clearance,11.3475rem) - 1.1348rem),0.9078rem); }
}
@media (prefers-reduced-motion: reduce) { .refct-chat-message.is-located .refct-message-card { animation: none; outline: 0.1135rem solid #ffd70065; } }
html[data-display-theme="light"] :is(.refct-message-panel,.refct-history-panel,.refct-export-popover,.refct-confirm-dialog,.refct-transfer-dialog) { background: #f7f8fcf5; color: #46516a; border-color: #c8d1e2; }
html[data-display-theme="light"] :is(.refct-panel-header h2,.refct-export-popover h3,.refct-confirm-dialog h2,.refct-transfer-dialog h2) { color: #927004; }
html[data-display-theme="light"] :is(.refct-search input,.refct-history-name > button,.refct-transfer-model strong,.refct-message-item > button) { color: #46516a; }
html[data-display-theme="light"] .refct-message-card { background: #fff; border-color: #d7ddea; }
html[data-display-theme="light"] .refct-chat-message { color: #46516a; }
html[data-display-theme="light"] .refct-markdown :is(strong,h1,h2,h3,h4,h5,h6) { color: #25314b; }
html[data-display-theme="light"] .refct-markdown pre { background: #eff2f8; color: #3c4c65; }
/* Item 7: measured reference history rail; retain the existing history controller. */
#history-tab { top: 50%; left: 0; width: auto; height: auto; min-height: 0; gap: .5625rem; padding: .75rem .5rem .6875rem .625rem; border: 1px solid #ffffff1a; border-left: 0; border-radius: 0 1rem 1rem 0; background: linear-gradient(#21232dd9,#16181fd9); color: #ffffff73; box-shadow: .125rem 0 .75rem #0000004d; transition: background .2s, box-shadow .2s; }
#history-tab::before { content: ""; position: absolute; left: 0; top: .625rem; bottom: .625rem; width: .1875rem; border-radius: 999px; background: linear-gradient(#ffd700,#f7931a); }
#history-tab .refct-side-tab-icon { width: 1.625rem; height: 1.625rem; border-radius: .5625rem; background: linear-gradient(135deg,#ffe066,#ffc53d 45%,#f7931a); color: #2e2200; box-shadow: 0 0 0 .0625rem #ffd70038,0 .125rem .5rem #f7931a52; }
#history-tab .refct-icon { width: 15px; height: 15px; stroke-width: 3.2; }
#history-tab .refct-side-tab-label { width: 15px; font-size: .6875rem; font-weight: 600; line-height: 1.206; letter-spacing: .0625rem; color: #ffffff99; }
#history-tab .refct-side-divider { width: .875rem; height: .0625rem; background: #ffffff1f; }
#history-tab .refct-side-count[hidden] { display: none; }

/* Message directory follows the public XiaoXiKuaiJie/TaskDialogPanel contract.
   Keep this scoped: history uses a separate measured rail and panel layout. */
.refct-message-tab { width: auto; height: auto; min-width: 2.5rem; gap: .5625rem; padding: .75rem .625rem .6875rem .5rem; overflow: hidden; border: .0625rem solid #ffffff1a; border-right: 0; border-radius: 1rem 0 0 1rem; background: linear-gradient(180deg,#21232dd9,#16181fd9); backdrop-filter: blur(1rem) saturate(140%); box-shadow: -.125rem 0 .75rem #0000004d; color: #ffffff73; transition: border-color .2s,box-shadow .2s,background .2s; }
.refct-message-tab::before { content: ""; position: absolute; right: 0; top: .625rem; bottom: .625rem; width: .1875rem; border-radius: 999px; background: linear-gradient(180deg,#ffd700,#f7931a); opacity: .9; }
.refct-message-tab:hover { border-color: #ffd70052; background: linear-gradient(180deg,#272934f7,#1a1c24f7); box-shadow: -.1875rem 0 1.125rem #0000005c,0 0 1.25rem #ffbe3c1a; }
.refct-message-tab .refct-side-tab-icon { width: 1.625rem; height: 1.625rem; border-radius: .5625rem; background: linear-gradient(135deg,#ffe066,#ffc53d 45%,#f7931a); color: #2e2200; box-shadow: 0 0 0 .0625rem #ffd70038,0 .125rem .5rem #f7931a52; }
.refct-message-tab .refct-side-tab-icon .refct-icon { width: 15px; height: 15px; stroke-width: 2; }
.refct-message-tab .refct-side-tab-label { max-height: 5.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .6875rem; font-weight: 600; letter-spacing: .2em; color: #ffffff99; }
.refct-message-tab .refct-side-divider { width: .875rem; height: .0625rem; flex-shrink: 0; background: #ffffff1f; }
.refct-message-tab .refct-side-count { min-width: 0; height: auto; margin: 0; padding: .1875rem .3125rem; border: .0625rem solid #ffd7003d; border-radius: 999px; background: #ffd7001a; color: #ffdf7ef2; font-size: .625rem; font-weight: 700; line-height: 1; letter-spacing: .02em; }
.refct-message-panel { z-index: 125; top: 5.5rem; bottom: .875rem; width: min(19rem,calc(100vw - 4.5rem)); max-width: none; max-height: none; overflow: hidden; border: 1px solid #ffffff1a; border-right: 0; border-radius: 1rem 0 0 1rem; background: #16181ed1; box-shadow: 0 8px 32px #0006,0 0 0 1px #ffffff05; backdrop-filter: blur(1.25rem) saturate(140%); }
.refct-message-panel .refct-panel-header { gap: .75rem; padding: .75rem .875rem .5rem; }
.refct-message-panel .refct-panel-header h2 { color: #ffd700e6; font-size: .875rem; }
.refct-message-panel .refct-panel-header > .refct-icon-button { width: 2rem; height: 2rem; padding: .5rem; border: .0625rem solid #ffffff1f; border-radius: .625rem; background: #ffffff0f; color: #ffffff99; }
.refct-message-panel .refct-search { height: 2rem; margin: 0 .875rem .5rem; gap: .5rem; padding: 0 .625rem; border: 1px solid #ffffff14; border-radius: .625rem; background: #0004; color: #ffffff73; }
.refct-message-panel .refct-search input { color: #ffffffe6; font-size: .75rem; }
.refct-message-meta { display: flex; justify-content: space-between; flex-shrink: 0; gap: .75rem; padding: 0 .875rem .5rem; color: #ffffff6b; font-size: .6875rem; }
.refct-message-meta #refct-message-meta { margin: 0; }
.refct-message-panel .refct-message-toolbar { justify-content: space-between; gap: .5rem; padding: 0 .875rem .375rem; font-size: .6875rem; }
.refct-message-batch-actions { display: inline-flex; align-items: center; gap: .375rem; }
.refct-message-list { padding: .125rem .875rem .875rem; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #ffffff47 transparent; overflow-anchor: none; }
.refct-message-item { min-height: 2.375rem; align-items: center; gap: .625rem; padding: .5rem .625rem; border: 0; border-radius: .5625rem; }
.refct-message-item > input { margin: 0; }
.refct-message-item > button { display: flex; align-items: center; gap: .625rem; min-height: 1.375rem; color: #ffffffd6; font-size: .75rem; }
.refct-message-item > button > .refct-message-title { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refct-message-item time { flex-shrink: 0; margin: 0; color: #ffffff73; font-size: .6875rem; }
.refct-message-item:hover { background: #ffffff14; }
.refct-message-backdrop { display: none; }
@media (max-width: 900px) {
  .refct-message-tab { display: none; }
  .refct-message-panel { z-index: 220; top: auto; right: 0; bottom: 0; left: 0; width: 100%; max-width: 100%; height: min(85vh,42rem); max-height: min(85vh,42rem); border-right: 1px solid #ffffff1a; border-bottom: 0; border-radius: 1.25rem 1.25rem 0 0; }
  .refct-message-backdrop { display: block; position: fixed; z-index: 219; inset: 0; background: #0008; backdrop-filter: blur(.375rem); }
  .refct-message-item { min-height: 2.875rem; padding-top: .6875rem; padding-bottom: .6875rem; }
}
html[data-display-theme="light"] .refct-message-tab { background: linear-gradient(180deg,#ffffffe0,#f8fafce0); border-color: #0f172a1a; box-shadow: -.125rem 0 .75rem #0f172a14; }
html[data-display-theme="light"] .refct-message-tab .refct-side-tab-label { color: #0f172a8c; }
html[data-display-theme="light"] .refct-message-tab .refct-side-divider { background: #0f172a1a; }
html[data-display-theme="light"] .refct-message-tab .refct-side-count { background: #f59e0b1a; border-color: #c88c004d; color: #a16207; }
html[data-display-theme="light"] .refct-message-panel .refct-search { background: #ffffffc7; border-color: #0f172a14; }
html[data-display-theme="light"] .refct-message-panel .refct-search input { color: #0f172adb; }
html[data-display-theme="light"] .refct-message-meta, html[data-display-theme="light"] .refct-message-item time { color: #0f172a75; }
html[data-display-theme="light"] .refct-message-item:hover { background: #f59e0b1a; }
html[data-display-theme="light"] .refct-message-backdrop { background: #0f172a52; }
.app-shell.sidebar-collapsed #history-tab { left: 0; }
#refct-mobile-history { display: none; }
#refct-mobile-history[hidden] { display: none !important; }
body:not(.media-mode):has(#composer-island:not(.is-collapsed)) #refct-help { display: none; }
@media (max-width:900px) {
  body:not(.media-mode) #history-tab { display: none; }
  body:not(.media-mode) #refct-mobile-history { position: static; display: flex; align-items: center; justify-content: center; flex: 0 0 2.25rem; width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid #1e1f25; border-radius: 1.125rem; background: rgba(27,28,33,.95); color: rgba(255,215,0,.85); font-family: Arial; font-size: 13.3333px; font-weight: 400; box-shadow: 0 .125rem .625rem #0003; transition: transform .18s,border-color .18s; }
  #refct-mobile-history .refct-icon { width: 15px; height: 15px; stroke-width: 3.2; flex: 0 1 auto; transition: background-color .25s,color .2s,border-color .25s,box-shadow .25s; }
}
@media (max-width:450px) {
  body:not(.media-mode) .workspace-topbar { position: fixed; top: 1.75rem; left: 4rem; display: flex; gap: .5rem; width: max-content; height: 2.25rem; min-height: 0; padding: 0; z-index: 50; }
  body:not(.media-mode) .workspace-topbar .new-chat { position: static; display: flex; align-items: center; justify-content: center; flex: 0 1 auto; min-width: 0; width: auto; height: 2.25rem; padding: 0 1rem; font-family: Arial; font-size: .8125rem; gap: .375rem; border: 1px solid rgba(255,236,160,.55); }
  body:not(.media-mode) .workspace-topbar .guide-button { position: static; flex: 0 1 auto; }
}

/* Item 7: history overlays the workspace; the phone version is a bottom sheet. */
.refct-history-panel {
  z-index: 125;
  inset: .875rem auto .875rem var(--refct-history-left,var(--sidebar));
  width: 19rem;
  max-width: calc(100vw - var(--refct-history-left,var(--sidebar)));
  height: auto;
  overflow: hidden;
  border: 1px solid #ffffff1a;
  border-left: 0;
  border-radius: 0 1rem 1rem 0;
  background: rgba(22,24,30,.82);
  backdrop-filter: blur(1.1348rem);
  -webkit-backdrop-filter: blur(1.1348rem);
  box-shadow: 0 1rem 3rem rgba(0,0,0,.42),0 0 0 .0625rem rgba(255,255,255,.02);
  opacity: 0;
  transform: translateX(-.75rem);
  transition: transform .28s cubic-bezier(.33,1,.4,1),opacity .18s,visibility;
}
.refct-history-panel.is-open { opacity: 1; transform: translateX(0); }
.refct-history-panel .refct-history-drag { display: none; }
.refct-history-panel .refct-panel-header { min-height: 3.375rem; padding: .875rem .875rem .5rem; }
.refct-history-panel .refct-panel-header h2 { font-size: .875rem; }
.refct-history-panel .refct-panel-header > [data-refct-action="close-history"] { width: 2rem; height: 2rem; padding: 0; border: 1px solid #ffffff1f; border-radius: .625rem; background: #ffffff0f; color: #ffffff99; transition: background .2s,color .2s; }
.refct-history-panel .refct-panel-header > [data-refct-action="close-history"]:hover { background: #ffffff14; color: #ffffffe6; }
.refct-history-panel .refct-panel-header > [data-refct-action="close-history"] .refct-icon { width: 17px; height: 17px; stroke-width: 2.82353; }
.refct-history-panel .refct-new-conversation { height: 2.25rem; margin: 0 .875rem .625rem; border-radius: .75rem; font-size: .8125rem !important; font-weight: 600 !important; }
.refct-history-panel .refct-search { height: 2.125rem; margin: 0 .875rem .5rem; border-radius: .625rem; background: #00000044; }
.refct-history-panel .refct-history-list { padding: 0 .875rem 1rem; }
.refct-history-panel .refct-empty { display: block; min-height: 0; padding: 2rem; text-align: center; font-size: .75rem; line-height: 1.5; }
.refct-history-backdrop { display: none; }
body.refct-history-open #history-tab { visibility: hidden; pointer-events: none; }
@media (max-width:900px) {
  .refct-history-backdrop {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(.375rem);
    -webkit-backdrop-filter: blur(.375rem);
    opacity: 0;
    transition: opacity .32s;
  }
  .refct-history-backdrop.is-open { opacity: 1; }
  .refct-history-backdrop[hidden] { display: none; }
  .refct-history-panel {
    z-index: 10001;
    inset: auto 0 0;
    width: 100vw;
    max-width: none;
    height: min(85dvh,42rem);
    border: 1px solid #ffffff1a;
    border-bottom: 0;
    border-radius: 1.25rem 1.25rem 0 0;
    backdrop-filter: blur(1.25rem) saturate(1.4);
    -webkit-backdrop-filter: blur(1.25rem) saturate(1.4);
    box-shadow: 0 -1rem 3rem rgba(0,0,0,.45);
    transform: translateY(105%);
    transition: transform .32s cubic-bezier(.33,1,.4,1),visibility;
  }
  .refct-history-panel.is-open { transform: translateY(0); }
  .refct-history-panel .refct-history-drag { display: block; flex: none; width: 2.5rem; height: .1875rem; margin: .625rem auto .125rem; border-radius: 999px; background: #ffffff4d; }
  .refct-history-panel .refct-panel-header { min-height: 0; padding: .5rem .875rem; }
  /* History actions are body-mounted, above the sheet that launched them. */
  .refct-dialog-backdrop { z-index: 10010; }
  .refct-export-popover.is-message-export,.refct-confirm-dialog,.refct-transfer-dialog { z-index: 10020; }
  .refct-status { z-index: 10030; }
}
@media (prefers-reduced-motion:reduce) {
  .refct-history-panel,.refct-history-backdrop { transition: none; }
}

/* History internals observed on reference150; do not restyle the message panel. */
.refct-history-panel { color: #fff; font-size: 1rem; line-height: 1.5; }
.refct-history-panel * { transition: background-color .25s,color .2s,border-color .25s,box-shadow .25s; }
.refct-history-panel [hidden] { display: none !important; }
.refct-history-panel .refct-panel-header { min-height: 0; gap: .5rem; }
.refct-history-panel .refct-panel-header .refct-history-heading { gap: .4375rem; color: rgba(255,215,0,.9); font-size: 1rem; font-weight: 400; line-height: 1.5; }
.refct-history-panel .refct-history-heading > .refct-history-title { display: block; align-items: normal; justify-items: normal; min-width: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: hidden; font-size: .875rem; font-weight: 700; line-height: 1.5; }
.refct-history-panel .refct-history-heading > .refct-history-total { display: block; align-items: normal; justify-items: normal; flex: none; min-width: 0; height: auto; padding: .125rem .4375rem; border: 1px solid rgba(255,215,0,.18); border-radius: 999px; background: rgba(255,215,0,.1); color: rgba(255,224,126,.9); font-size: .6875rem; font-weight: 700; line-height: 1.2; }
.refct-history-panel .refct-history-icon { display: block; flex: 0 1 auto; width: 12px; height: 12px; }
.refct-history-panel .refct-history-icon[data-refct-history-icon="history"],
.refct-history-panel .refct-history-icon[data-refct-history-icon="search"] { width: 14px; height: 14px; }
.refct-history-panel .refct-history-icon[data-refct-history-icon="plus"] { width: 15px; height: 15px; }
.refct-history-panel .refct-history-icon[data-refct-history-icon="close"] { width: 17px; height: 17px; }
.refct-history-panel .refct-panel-header > [data-refct-action="close-history"] { display: flex; align-items: center; justify-content: center; font: 13.3333px Arial; transition: background .18s,color .18s,border-color .18s; }
.refct-history-actions { flex: none; padding: 0 .875rem .625rem; }
.refct-history-panel .refct-new-conversation { width: 100%; height: 2.25rem; flex: 0 1 auto; gap: .375rem; margin: 0; padding: 0; border: 1px solid rgba(255,236,160,.55); border-radius: .75rem; color: rgb(44,31,0); font-family: inherit; font-size: .8125rem !important; font-weight: 700 !important; line-height: normal; letter-spacing: .02em; box-shadow: inset 0 .0625rem 0 rgba(255,255,255,.45),0 .0625rem .125rem rgba(0,0,0,.18),0 .25rem .875rem rgba(240,147,43,.22); transition: transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s,filter .2s; }
.refct-history-panel .refct-new-conversation:hover { filter: brightness(1.05); transform: translateY(-.0625rem); box-shadow: inset 0 .0625rem 0 rgba(255,255,255,.5),0 .125rem .25rem rgba(0,0,0,.2),0 .375rem 1.125rem rgba(240,147,43,.32); }
.refct-history-panel .refct-search { gap: .5rem; padding: 0 .625rem; border-color: rgba(255,255,255,.08); background: rgba(0,0,0,.25); color: rgba(255,255,255,.45); transition: border-color .18s,background .18s; }
.refct-history-search-label { display: contents; }
.refct-history-panel .refct-search input { display: block; flex: 1; width: auto; height: auto; font-family: inherit; font-size: .75rem; font-weight: 400; line-height: normal; color: rgba(255,255,255,.9); }
.refct-history-panel .refct-history-search-clear { display: flex; align-items: center; justify-content: center; flex: none; width: 1.125rem; height: 1.125rem; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: rgba(255,255,255,.55); font: 13.3333px Arial; transition: background .15s,color .15s; }
.refct-history-result { flex: none; margin: 0; padding: 0 .9375rem .375rem; font-size: .6875rem; line-height: 1.5; color: inherit; }
.refct-history-body { display: flex; flex: 1; min-height: 0; overflow: hidden; padding-bottom: .5rem; }
.refct-history-list-wrapper { display: block; flex: 1; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; padding: 0 .625rem .25rem .875rem; scrollbar-width: thin; scrollbar-color: #d5bc3e30 transparent; }
.refct-history-panel .refct-history-list { display: block; flex: 0 1 auto; min-height: 0; overflow: visible; padding: 0; }
.refct-history-panel .refct-history-toolbar { flex: 0 1 auto; justify-content: space-between; gap: .5rem; margin: 0 0 .375rem; padding: .25rem 0 0 .625rem; color: #fff; font-size: 1rem; line-height: 1.5; }
.refct-history-panel .refct-select-all { gap: .375rem; color: rgba(255,255,255,.45); font-size: .6875rem; line-height: 1; transition: background .15s,color .15s; }
.refct-history-panel .refct-history-batch-actions { display: flex; align-items: center; flex: none; gap: .3125rem; }
.refct-history-panel .refct-history-batch-actions .refct-icon-button { display: flex; align-items: center; justify-content: center; flex: none; width: 1.75rem; height: 1.75rem; padding: 0; border: 1px solid rgba(255,215,0,.18); border-radius: .5rem; background: rgba(255,215,0,.08); color: rgba(255,220,90,.9); font: 13.3333px Arial; transition: background .15s,border-color .15s,color .15s,transform .15s; }
.refct-history-panel .refct-history-batch-actions .red { border-color: rgba(255,80,80,.16); background: rgba(255,80,80,.08); color: rgba(255,130,130,.9); }
.refct-history-panel .refct-history-batch-actions button:disabled { opacity: .38; }
.refct-history-panel .refct-history-item { align-items: center; gap: .5rem; margin-bottom: .25rem; padding: .625rem .5rem .625rem .375rem; border-radius: .5625rem; transition: background .15s,border-color .15s,box-shadow .15s; }
.refct-history-panel .refct-history-check { display: flex; align-items: center; justify-content: center; flex: none; width: 1rem; opacity: .72; transition: opacity .15s; }
.refct-history-panel .refct-item-check,.refct-history-panel .refct-select-all input { appearance: none; display: grid; place-items: center; flex: none; width: .875rem; height: .875rem; margin: 0; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: .25rem; background: rgba(255,255,255,.03); color: #000; accent-color: auto; font: 13.3333px Arial; transition: .15s; }
.refct-history-panel .refct-item-check:hover,.refct-history-panel .refct-select-all input:hover { border-color: rgba(255,215,0,.5); background: rgba(255,215,0,.08); }
.refct-history-panel .refct-item-check:checked,.refct-history-panel .refct-select-all input:checked { border-color: rgba(255,215,0,.85); background: linear-gradient(135deg,rgb(255,231,104),rgb(245,178,24)); }
.refct-history-panel .refct-item-check::before,.refct-history-panel .refct-select-all input::before { content: ""; box-sizing: content-box; width: .42rem; height: .24rem; border: 0; border-left: 1px solid rgb(40,32,0); border-bottom: 1px solid rgb(40,32,0); background: transparent; box-shadow: none; transform: scale(0); transition: transform .12s; }
.refct-history-panel .refct-item-check:checked::before,.refct-history-panel .refct-select-all input:checked::before { transform: rotate(-45deg); }
.refct-history-panel .refct-history-model-icon { display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; margin: 0; border: 1px solid rgba(255,255,255,.08); border-radius: .5rem; background: linear-gradient(rgb(44,47,58),rgb(30,32,40)); color: rgba(235,238,245,.72); }
.refct-history-panel .refct-history-model-icon > img,.refct-history-panel .refct-history-model-icon > svg { display: block; width: 1.25rem; height: 1.25rem; border-radius: .25rem; }
.refct-history-panel .refct-history-copy { overflow: hidden; transition: opacity .2s; }
.refct-history-panel .refct-rename-input { display: inline-block; vertical-align: baseline; width: 100%; height: auto; margin: 0 0 .25rem; padding: .125rem .25rem; border: 1px solid rgba(255,215,0,.6); border-radius: .25rem; outline: 0; background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); font-family: inherit; font-size: .8125rem; font-weight: 400; line-height: 1.3; }
.refct-history-panel .refct-history-name { gap: .25rem; margin: 0 0 .25rem; overflow: hidden; font-size: .8125rem; line-height: 1.3; color: rgba(255,255,255,.85); }
.refct-history-panel .refct-history-name > button { flex: 1; min-width: 0; width: auto; font-size: inherit !important; line-height: inherit; color: inherit; }
.refct-history-panel .refct-history-category { display: flex; align-items: center; justify-content: center; flex: none; padding: .0625rem .25rem; border: 1px solid rgba(100,149,237,.25); border-radius: .25rem; background: rgba(100,149,237,.12); color: rgb(150,185,255); font-size: .625rem; line-height: 1; }
.refct-history-panel .refct-history-meta { justify-content: space-between; flex-wrap: nowrap; gap: .25rem; margin: 0; overflow: visible; color: rgba(255,255,255,.35); font-size: .6875rem; line-height: 1.5; }
.refct-history-meta-left { display: flex; align-items: center; gap: .375rem; }
.refct-history-rounds { flex: none; color: rgba(255,215,0,.5); }
.refct-history-panel .refct-history-date { align-items: normal; gap: normal; padding: 0; color: inherit; font-size: inherit; line-height: 1.35; font-variant-numeric: normal; transition: opacity .15s; }
.refct-history-date > span { display: block; overflow: hidden; }
.refct-history-date > span:last-child { color: rgba(255,255,255,.25); }
.refct-history-panel .refct-history-item-actions { position: absolute; right: .4375rem; bottom: .5rem; align-self: auto; flex-wrap: nowrap; width: auto; gap: .125rem; padding: .1875rem; border: 1px solid rgba(255,255,255,.12); border-radius: .5625rem; background: rgba(32,35,44,.96); box-shadow: 0 .1875rem .5rem rgba(0,0,0,.3); color: rgba(255,255,255,.35); font-size: .6875rem; line-height: 1.5; opacity: 0; pointer-events: none; transition: opacity .15s; }
.refct-history-panel .refct-history-item:hover .refct-history-item-actions,.refct-history-panel .refct-history-item:focus-within .refct-history-item-actions { opacity: 1; pointer-events: auto; }
.refct-history-panel .refct-history-item-actions .refct-icon-button { display: flex; align-items: center; justify-content: center; flex: 0 1 auto; width: 1.1875rem; height: 1.1875rem; padding: 0; border-radius: .375rem; background: transparent; color: rgba(255,255,255,.75); font: 13.3333px Arial; transition: .15s; }
.refct-history-panel .refct-history-item-actions [data-history-action="export"] { color: rgba(255,215,0,.85); }
.refct-history-panel .refct-history-item-actions [data-history-action="transfer"] { color: rgba(0,202,224,.85); }

/* Transfer default layout measured independently of the other dialogs. */
.refct-transfer-overlay, .refct-transfer-overlay * { transition: background-color .25s,color .2s,border-color .25s,box-shadow .25s; }
.refct-transfer-overlay { position: fixed; z-index: 1000; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10,10,12,.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #000; font-size: 1rem; font-weight: 400; line-height: 1.5; }
.refct-transfer-dialog { position: absolute; z-index: auto; top: 50%; left: 50%; transform: translate(-50%,-50%); display: flex; flex-direction: column; width: 90%; max-width: 25rem; max-height: 85vh; margin: 0; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 1rem; background: linear-gradient(135deg,rgba(22,24,30,.95),rgba(16,17,22,.98)); color: #000; box-shadow: 0 10px 40px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.05); }
.refct-transfer-dialog .refct-transfer-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.refct-transfer-dialog .refct-transfer-header h3 { margin: 0; color: #fff; font-size: 1rem; font-weight: 600; line-height: 1.5; }
.refct-transfer-dialog .refct-transfer-close { display: flex; align-items: center; justify-content: center; padding: .25rem; margin: 0; border: 0; border-radius: .375rem; background: transparent; color: rgba(255,255,255,.45); font: 400 13.3333px Arial; transition: .2s; }
.refct-transfer-icon { display: block; }
.refct-transfer-dialog .refct-transfer-info { display: flex; align-items: center; padding: .75rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.04); background: rgba(255,255,255,.02); font-size: .8125rem; line-height: 1.5; }
.refct-transfer-dialog .refct-transfer-info-label { flex-shrink: 0; color: rgba(255,255,255,.4); }
.refct-transfer-dialog .refct-transfer-info-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3b82f6; font-weight: 500; }
.refct-transfer-dialog .refct-transfer-search-section { padding: .75rem 1.25rem .5rem; }
.refct-transfer-dialog .refct-transfer-search-wrapper { position: relative; display: flex; align-items: center; }
.refct-transfer-dialog [data-refct-transfer-icon="search"] { position: absolute; left: .75rem; width: 14px; height: 14px; color: rgba(255,255,255,.3); }
.refct-transfer-dialog #refct-transfer-search { width: 100%; height: 2.125rem; padding: 0 2rem; margin: 0; outline: none; border: 1px solid rgba(255,255,255,.08); border-radius: .5rem; background: rgba(0,0,0,.25); color: #fff; font: 400 .8125rem Arial; transition: .2s; }
.refct-transfer-dialog #refct-transfer-search::placeholder { color: rgb(117,117,117); opacity: 1; }
.refct-transfer-dialog #refct-transfer-search:focus { border-color: #3b82f6; background: rgba(0,0,0,.35); box-shadow: 0 0 0 2px rgba(59,130,246,.15); }
.refct-transfer-dialog .refct-transfer-search-clear { position: absolute; right: .75rem; display: flex; align-items: center; justify-content: center; padding: .125rem; margin: 0; border: 0; border-radius: 50%; background: transparent; color: rgba(255,255,255,.3); font: 400 13.3333px Arial; }
.refct-transfer-dialog .refct-transfer-list { flex: 1; min-height: 12rem; max-height: 20rem; overflow: auto; padding: .5rem 1.25rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.refct-transfer-dialog .refct-transfer-list::-webkit-scrollbar { width: .25rem; }
.refct-transfer-dialog .refct-transfer-grid { display: flex; flex-direction: column; gap: .5rem; }
.refct-transfer-dialog .refct-transfer-empty { display: flex; align-items: center; justify-content: center; padding: 3rem 0; color: rgba(255,255,255,.35); font-size: .8125rem; line-height: 1.5; }
.refct-transfer-dialog .refct-transfer-model { appearance: none; position: relative; display: flex; align-items: center; width: 100%; padding: .625rem .75rem; margin: 0; border: 1px solid rgba(255,255,255,.04); border-radius: .5rem; background: rgba(255,255,255,.02); color: #000; font: inherit; text-align: left; cursor: pointer; transition: .2s; }
.refct-transfer-dialog .refct-transfer-model.is-selected { border-color: rgba(59,130,246,.4); background: rgba(59,130,246,.08); }
.refct-transfer-dialog .refct-transfer-avatar-wrapper { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 1.75rem; height: 1.75rem; margin-right: .75rem; border-radius: .375rem; background: rgba(255,255,255,.05); overflow: hidden; }
.refct-transfer-dialog .refct-transfer-avatar { display: block; width: 100%; height: 100%; object-fit: cover; }
.refct-transfer-dialog .refct-transfer-model-info { display: block; flex: 1; min-width: 0; }
.refct-transfer-dialog .refct-transfer-model-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: .8125rem; font-weight: 500; line-height: 1.5; }
.refct-transfer-dialog .refct-transfer-model-desc { display: block; margin-top: .125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.35); font-size: .75rem; line-height: 1.5; }
.refct-transfer-dialog .refct-transfer-indicator { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 1rem; height: 1rem; margin-left: .5rem; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; transition: .2s; }
.refct-transfer-dialog .refct-transfer-indicator-inner { display: block; width: .5rem; height: .5rem; border-radius: 50%; background: #3b82f6; opacity: 0; transform: scale(.5); transition: .2s; }
.refct-transfer-dialog .refct-transfer-model.is-selected .refct-transfer-indicator { border-color: #3b82f6; }
.refct-transfer-dialog .refct-transfer-model.is-selected .refct-transfer-indicator-inner { opacity: 1; transform: scale(1); }
.refct-transfer-dialog .refct-transfer-footer { display: flex; justify-content: flex-end; gap: .75rem; padding: .875rem 1.25rem; border-top: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.15); }
.refct-transfer-dialog .refct-transfer-footer > button { display: flex; align-items: center; justify-content: center; gap: .375rem; height: 2.125rem; padding: 0 1rem; margin: 0; border: 1px solid rgba(255,255,255,.1); border-radius: .5rem; background: transparent; color: rgba(255,255,255,.7); font: 500 .8125rem Arial; transition: .2s; }
.refct-transfer-dialog #refct-transfer-save { border: 0; background: #3b82f6; color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,.3); }
.refct-transfer-dialog #refct-transfer-save:disabled { border: 1px solid rgba(255,255,255,.02); background: rgba(255,255,255,.04); color: rgba(255,255,255,.25); box-shadow: none; opacity: 1; cursor: not-allowed; }
@media (max-width:900px) {
  /* Keep the transfer above the existing local history sheet. */
  .refct-transfer-overlay { z-index: 10010; }
  .refct-transfer-dialog { position: fixed; z-index: auto; inset: auto 0 0; width: 100%; max-width: 100%; max-height: 80vh; border-radius: 1rem 1rem 0 0; transform: none; }
}
.refct-history-panel .refct-history-item-actions [data-history-action="delete"] { color: rgba(255,135,135,.9); }
@media (max-width:900px) {
  .refct-history-panel { color: #000; }
  .refct-history-panel .refct-history-drag { display: flex; align-items: center; justify-content: center; flex: none; width: auto; height: auto; margin: 0; padding: .5rem 0 .125rem; border-radius: 0; background: transparent; }
  .refct-history-panel .refct-history-drag > span { display: block; width: 2.5rem; height: .25rem; border-radius: 999px; background: rgba(255,255,255,.18); }
  .refct-history-panel .refct-panel-header { padding: .375rem .875rem .5rem; }
  .refct-history-panel .refct-history-toolbar { color: #000; }
  .refct-history-panel .refct-history-item { padding-block: .8125rem; }
  .refct-history-panel .refct-history-item-actions { position: static; flex: none; flex-wrap: nowrap; gap: .125rem; width: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; opacity: 1; pointer-events: auto; }
  .refct-history-panel .refct-history-item-actions .refct-icon-button { width: 1.75rem; height: 1.75rem; }
}
/* The observed wide-screen manual entry reuses the existing button and module.
   Narrow-screen controls retain their previous presentation until observed. */
@media (min-width:1880px) {
  .refct-help-button.refct-help-wide, .refct-help-button.refct-help-wide * { box-sizing: border-box; }
  .refct-help-button.refct-help-wide { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30; display: block; place-items: normal; width: auto; height: 3rem; margin: 0; padding: 0; border: none; background: none; border-radius: 62.5rem; box-shadow: none; color: #000; font-family: Arial; font-size: 13.3333px; font-weight: 400; line-height: normal; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
  body:not(.media-mode):has(#composer-island:not(.is-collapsed)) #refct-help.refct-help-wide { display: block; }
  .refct-help-button.refct-help-wide:active { transform: scale(.94); }
  .refct-help-wide .refct-manual-halo { position: absolute; top: -.4375rem; right: -.4375rem; width: 3.875rem; height: 3.875rem; border-radius: 50%; background: conic-gradient(rgba(0,202,224,.6),rgba(124,159,255,.4),rgba(168,85,247,.55),rgba(0,202,224,.6)); mask-image: radial-gradient(closest-side,rgba(0,0,0,.9)45%,rgba(0,0,0,.4)72%,transparent 100%); opacity: .35; z-index: -1; pointer-events: none; will-change: transform; animation: refct-manual-halo-spin 8s linear infinite; transition: opacity .3s; }
  .refct-help-wide:hover .refct-manual-halo { opacity: .75; }
  .refct-help-wide .refct-manual-core { position: relative; display: flex; align-items: center; height: 3rem; border-radius: 62.5rem; border: .0625rem solid rgba(0,202,224,.32); background: radial-gradient(120% 120% at 70% 25%,rgba(0,202,224,.1),rgba(255,255,255,0)65%),linear-gradient(155deg,rgba(30,32,40,.88),rgba(20,22,28,.88)); backdrop-filter: blur(1.25rem) saturate(1.4); box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.35),0 0 .875rem rgba(0,202,224,.16),inset 0 .0625rem rgba(255,255,255,.08); overflow: hidden; transition: border-color .3s,box-shadow .3s; }
  .refct-help-wide:hover .refct-manual-core { border-color: rgba(0,202,224,.6); box-shadow: 0 .75rem 1.875rem rgba(0,0,0,.45),0 0 1.5rem rgba(0,202,224,.32),inset 0 .0625rem rgba(255,255,255,.12); }
  .refct-help-wide .refct-manual-label { max-width: 0; padding-left: 0; opacity: 0; transform: translate(.5rem); overflow: hidden; white-space: nowrap; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: rgba(255,255,255,.92); transition: max-width .45s cubic-bezier(.34,1.56,.64,1),padding .45s cubic-bezier(.34,1.56,.64,1),opacity .3s .05s,transform .45s cubic-bezier(.34,1.56,.64,1); }
  .refct-help-wide:hover .refct-manual-label { max-width: 10rem; padding-left: 1.0625rem; opacity: 1; transform: translate(0); }
  .refct-help-wide .refct-manual-icon-wrap { position: relative; width: 3rem; height: 3rem; flex: 0 0 3rem; display: flex; align-items: center; justify-content: center; }
  .refct-help-wide .refct-manual-icon { width: 1.625rem; height: 1.625rem; display: block; filter: drop-shadow(0 0 .375rem rgba(0,202,224,.45)); animation: refct-manual-nudge 6s ease-in-out infinite; }
  .refct-help-wide .refct-manual-shine { position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: linear-gradient(100deg,transparent 12%,rgba(255,255,255,.22)50%,transparent 88%); transform: skew(-12deg) translate(-30%); pointer-events: none; animation: refct-manual-shine 5s ease-in-out infinite; }
  .refct-help-wide .refct-manual-icon-wrap, .refct-help-wide .refct-manual-icon, .refct-help-wide .refct-manual-icon *, .refct-help-wide .refct-manual-shine { transition: background-color .25s,color .2s,border-color .25s,box-shadow .25s; }
  @keyframes refct-manual-halo-spin { 100% { transform: rotate(360deg); } }
  @keyframes refct-manual-nudge { 0%,76%,100% { transform: none; } 82% { transform: scale(1.12) rotate(-8deg); } 88% { transform: scale(1.06) rotate(6deg); } 94% { transform: scale(1); } }
  @keyframes refct-manual-shine { 0%,60% { transform: skew(-12deg) translate(-30%); } 100% { transform: skew(-12deg) translate(400%); } }
}
@media (min-width:1880px) and (prefers-reduced-motion:reduce) {
  .refct-help-wide :is(.refct-manual-halo,.refct-manual-icon,.refct-manual-shine) { animation: none; }
}

/* Inline chat media task cards. */
.refct-message-media{padding:0 calc(.9078rem * var(--refct-scale)) calc(.6809rem * var(--refct-scale));min-width:0;overflow:visible}

.refct-chat-media{width:100%;max-width:30rem;margin:.4rem 0;padding:.55rem .65rem;border-radius:.75rem;background:#06b6d40a;border:1px solid #06b6d429;box-sizing:border-box}
.refct-media-header{display:flex;align-items:center;gap:.4rem;min-width:0}.refct-media-header strong{font-size:.72rem;font-weight:600;color:#ffffff99;white-space:nowrap}.refct-media-model{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.66rem;color:#ffffff59}
.refct-media-status,.refct-media-note,.refct-media-error{margin:.4rem 0 0;font-size:.68rem;line-height:1.5;overflow-wrap:anywhere}.refct-media-status{display:flex;gap:.4rem;color:#22d3eee6}.refct-media-note{color:#ffffff73}.refct-media-error,.refct-chat-media.state-failed .refct-media-status{color:#f87171e6}.refct-chat-media.state-not_configured .refct-media-status{color:#fbbf24d9}
.refct-media-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));gap:.4rem;margin-top:.5rem}.refct-media-result{min-width:0;overflow:hidden;border-radius:.5rem;border:1px solid #ffffff0f;background:#ffffff08}.refct-media-result.is-audio{grid-column:1/-1;padding:.4rem}
.refct-media-image-link{display:block}.refct-media-image-link img{display:block;width:100%;max-height:24rem;object-fit:contain}.refct-media-video{display:block;width:100%;max-height:24rem;background:#000;border-radius:.5rem}.refct-media-audio{display:block;width:100%;max-width:100%}.refct-media-download{display:inline-block;padding:.3rem .4rem;color:#22d3eee6;font-size:.64rem}
.refct-media-prompt{margin-top:.45rem}.refct-media-prompt summary{display:inline-flex;gap:.25rem;padding:.15rem .3rem;color:#ffffff73;font-size:.64rem;cursor:pointer}.refct-media-prompt summary::before{content:'▸'}.refct-media-prompt[open] summary::before{content:'▾'}.refct-media-prompt .is-open,.refct-media-prompt[open] .is-closed{display:none}.refct-media-prompt[open] .is-open{display:inline}.refct-media-prompt-text{max-height:11rem;overflow-y:auto;margin-top:.3rem;padding:.4rem .45rem;border:1px solid #ffffff0f;border-radius:.45rem;background:#ffffff08;font-size:.64rem;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}
html[data-display-theme="light"] .refct-media-header strong{color:#464e5f}html[data-display-theme="light"] :is(.refct-media-model,.refct-media-note,.refct-media-prompt summary){color:#0009}html[data-display-theme="light"] .refct-media-result,html[data-display-theme="light"] .refct-media-prompt-text{background:#00000008;border-color:#00000012}
