/* Replica keeps the shared content workspace shell and owns only its creation surface. */
.chat-refresh .video-submode-switcher { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.replica-workspace[hidden], .replica-workspace [hidden] { display: none !important; }
body.chat-refresh[data-mode="replica"] .workbuddy-workbench { padding-top: 23px; }
body.chat-refresh[data-mode="replica"] .workbuddy-workbench h2 { font-size: clamp(25px, 2.4vw, 36px); }
body.chat-refresh[data-mode="replica"] .workbuddy-workbench > p { margin-top: 11px; }
body.chat-refresh[data-mode="replica"] .chat-content { margin-top: 20px; padding-bottom: 50px; }
body.chat-refresh[data-mode="replica"] #chatScroll,
body.chat-refresh[data-mode="replica"] #composerWrap { display: none !important; }
.replica-workspace { width: min(1040px, 100%); margin: 0 auto; color: #26302a; }
.replica-workspace *, .replica-workspace *::before, .replica-workspace *::after { box-sizing: border-box; }
.replica-workspace button, .replica-workspace input, .replica-workspace textarea, .replica-workspace select { font-family: inherit; }
.replica-workspace button { cursor: pointer; }
.replica-workspace button:disabled { cursor: not-allowed; }
.replica-workspace svg { display: inline-block; width: 17px; height: 17px; flex: 0 0 17px; vertical-align: middle; }
.replica-workspace input:focus, .replica-workspace textarea:focus, .replica-workspace select:focus { outline: 2px solid #a1bba0; outline-offset: 2px; }
.replica-workspace button:focus-visible, .replica-workspace a:focus-visible { outline-offset: 3px; }
.replica-demo-switcher { display: flex; align-items: center; gap: 16px; margin-bottom: 15px; padding: 11px 15px; border: 1px solid #e0e7d9; border-radius: 12px; background: #f5f8ef; }
.replica-demo-switcher > span { flex-shrink: 0; color: #81956e; font-size: 11px; }
.replica-demo-switcher > div { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid #e1e8d8; border-radius: 8px; background: #edf2e5; }
.replica-demo-switcher button { min-height: 30px; padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #8b9c7a; font-size: 11px; white-space: nowrap; }
.replica-demo-switcher button:hover { color: #597c40; }
.replica-demo-switcher button.is-active { border-color: #d5e1c8; background: #fff; color: #607f49; box-shadow: 0 2px 5px #5e783512; }
.replica-demo-switcher > small { margin-left: auto; color: #9eac90; font-size: 10px; white-space: nowrap; }
.replica-main-card { padding: 23px 25px 13px; border: 1px solid #e2e8df; border-radius: 21px; background: #fff; box-shadow: 0 9px 34px #2e49340a; }
.replica-editor-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 25px; }
.replica-source-section { min-width: 0; padding-right: 25px; border-right: 1px solid #edf0e9; }
.replica-replacements { min-width: 0; }
.replica-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 28px; margin-bottom: 13px; }
.replica-section-heading h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 14px; font-weight: 600; }
.replica-section-heading h3 > span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: #f0f4ed; color: #7f9d70; font-size: 10px; font-weight: 600; }
.replica-section-heading > small { color: #9ba596; font-size: 10px; }
.replica-prototype-tag { padding: 3px 7px; border: 1px solid #e6eae3; border-radius: 5px; color: #a0a99a; font-size: 9px; }
.replica-reference-input { padding: 13px; border: 1px dashed #cad8c4; border-radius: 12px; background: linear-gradient(135deg, #f8faf5, #f1f6ed); transition: background .2s, border .2s; }
.replica-reference-input.has-reference { overflow: hidden; padding: 0; border-style: solid; }
.replica-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 175px; padding: 5px 0; text-align: center; }
.replica-source-divider { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: #a0ad95; font-size: 10px; }
.replica-source-divider::before, .replica-source-divider::after { content: ""; flex: 1; height: 1px; background: #e0e7d9; }
.replica-dropzone .replica-upload-symbol { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 12px; border: 1px solid #e1e9da; border-radius: 13px; background: #fff; color: #89a871; box-shadow: 0 4px 10px #4e6a3d05; }
.replica-upload-symbol svg { width: 21px; height: 21px; }
.replica-dropzone > strong { max-width: 100%; overflow-wrap: anywhere; font-size: 12px; font-weight: 550; }
.replica-dropzone p { margin: 7px 0 13px; color: #9ba590; font-size: 10px; line-height: 1.5; }
.replica-dropzone > small { margin-top: 10px; color: #a7b09f; font-size: 9px; }
.replica-workspace .replica-outline { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 33px; padding: 7px 13px; border: 1px solid #d8e1d1; border-radius: 7px; background: #fff; color: #617c54; font-size: 11px; text-decoration: none; }
.replica-outline:hover { background: #f3f7ee; border-color: #a9c19c; }
.replica-outline svg { width: 14px; height: 14px; flex-basis: 14px; }
.replica-link-row { display: flex; align-items: center; gap: 8px; padding: 0 7px 0 10px; border: 1px solid #e6ebe2; border-radius: 8px; background: #fff; color: #9aa790; }
.replica-link-row > svg { width: 14px; height: 14px; flex-basis: 14px; }
.replica-link-row input { min-width: 0; width: 100%; height: 35px; border: 0; background: transparent; color: #485940; font-size: 10px; }
.replica-link-row input::placeholder { color: #a8b0a3; }
.replica-link-row input:focus { outline: 0; }
.replica-link-row:focus-within { border-color: #a1bb94; box-shadow: 0 0 0 2px #9bb58b12; }
.replica-link-row button { display: grid; place-items: center; width: 24px; height: 24px; padding: 4px; border: 0; border-radius: 5px; background: #f0f5eb; color: #799663; }
.replica-source-status { display: flex; align-items: center; gap: 5px; min-height: 16px; margin: 9px 0 0; color: #9ca894; font-size: 9px; line-height: 1.5; }
.replica-source-status svg { width: 12px; height: 12px; flex-basis: 12px; }
.replica-source-status.is-error { color: #af684c; }
.replica-reference-preview { position: relative; height: 270px; overflow: hidden; border-radius: 11px; background: #edf0e8; }
.replica-reference-preview video { display: block; width: 100%; height: 100%; object-fit: contain; background: #26302a; }
.replica-media-label { position: absolute; left: 10px; top: 9px; padding: 4px 7px; border: 1px solid #ffffff35; border-radius: 5px; background: #18332170; backdrop-filter: blur(8px); color: #fff; font-size: 9px; pointer-events: none; }
.replica-remove-reference { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; padding: 4px; border: 0; border-radius: 50%; background: #15241970; color: #fff; }
.replica-remove-reference svg { width: 14px; height: 14px; }
.replica-reference-caption { position: absolute; right: 0; bottom: 36px; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 11px 8px; background: linear-gradient(transparent, #0b1d1685); color: #fff; pointer-events: none; }
.replica-reference-caption strong { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.replica-reference-caption > span { flex-shrink: 0; font-size: 9px; }
.replica-objects-empty { display: flex; min-height: 267px; flex-direction: column; align-items: center; justify-content: center; gap: 13px; padding: 24px 12px; border: 1px solid #e9ede5; border-radius: 12px; background: #fbfcf9; text-align: center; }
.replica-objects-empty > span { display: flex; gap: 9px; color: #93a588; }
.replica-objects-empty > span > svg { width: 26px; height: 26px; }
.replica-objects-empty > strong { color: #607254; font-size: 14px; font-weight: 550; }
.replica-objects-empty p { margin: 0 0 3px; color: #8b9783; font-size: 12px; line-height: 1.9; }
.replica-objects-empty { margin-bottom: 14px; }
.replica-object-overview { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -2px 0 14px; color: #7e8f72; font-size: 11px; }
.replica-example-label { padding: 3px 6px; border: 1px solid #e5eade; border-radius: 4px; background: #f7f9f3; color: #8d9a81; font-size: 10px; }
.replica-mapping-head { display: grid; grid-template-columns: minmax(0, .85fr) 19px minmax(0, 1fr); gap: 9px; margin: 0 12px 9px; color: #849479; font-size: 11px; }
.replica-mapping-head > span:last-child { grid-column: 3; }
.replica-mapping-head small { margin-left: 4px; color: #a3ad9c; font-size: 10px; }
.replica-object-list { display: grid; gap: 9px; }
.replica-object-row { display: grid; grid-template-columns: minmax(0, .85fr) 19px minmax(0, 1fr); align-items: center; gap: 9px; min-width: 0; padding: 11px 12px 0; border: 1px solid #e4eade; border-radius: 10px; background: #fff; }
.replica-object-row.has-replacement { border-color: #c9d8bf; background: #fcfdf9; }
.replica-original-object { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.replica-object-thumb { display: inline-flex; flex: 0 0 44px; width: 44px; height: 54px; overflow: hidden; align-items: center; justify-content: center; border: 1px solid #e6ebdf; border-radius: 7px; background: #f2f5ed; }
.replica-object-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.replica-object-avatar { position: relative; display: flex; width: 100%; height: 100%; min-height: 44px; align-items: center; justify-content: center; color: #809572; background: #e7eede; }
.replica-object-avatar.avatar-b { color: #a38973; background: #f0e6dc; }
.replica-object-avatar svg { width: 26px; height: 26px; }
.replica-object-avatar b { position: absolute; bottom: 3px; right: 4px; font-size: 9px; font-weight: 550; }
.replica-object-description { display: grid; min-width: 0; }
.replica-object-description strong { color: #4c5e42; font-size: 12px; font-weight: 550; }
.replica-object-description small { display: block; overflow: hidden; max-width: 95px; margin-top: 4px; color: #7e8e72; font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.replica-object-arrow { color: #b3bea9; }
.replica-object-arrow svg { width: 17px; height: 17px; }
.replica-object-replacement { min-width: 0; border-radius: 7px; }
.replica-object-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; }
.replica-object-add button { padding: 0; border: 0; background: transparent; color: #78935f; font-size: 10px; white-space: nowrap; }
.replica-object-add button:first-child { min-height: 29px; padding: 5px 8px; border: 1px dashed #cddcc0; border-radius: 6px; background: #f8fbf4; font-size: 11px; }
.replica-object-add button:hover { color: #466b31; }
.replica-object-add svg { width: 11px; height: 11px; }
.replica-object-default { display: block; margin-top: 8px; color: #9aa78f; font-size: 10px; }
.replica-object-images { display: flex; gap: 5px; }
.replica-object-images figure { position: relative; flex: 0 1 48px; min-width: 0; height: 49px; margin: 0; }
.replica-object-images img { width: 100%; height: 100%; border: 1px solid #e2e9dc; border-radius: 6px; object-fit: cover; background: #f1f4ec; }
.replica-object-images figure > button { position: absolute; top: -5px; right: -4px; display: grid; place-items: center; width: 16px; height: 16px; padding: 2px; border: 1px solid #dce5d4; border-radius: 50%; background: #fff; color: #839475; }
.replica-object-images figure > button svg { width: 10px; height: 10px; }
.replica-add-angle { display: flex; flex: 0 1 48px; min-width: 0; height: 49px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 3px; border: 1px dashed #d5dfca; border-radius: 6px; background: #f8faf5; color: #91a17f; font-size: 17px; }
.replica-add-angle small { font-size: 8px; white-space: nowrap; }
.replica-replacement-actions { display: flex; justify-content: space-between; gap: 5px; margin-top: 7px; color: #94a086; font-size: 9px; white-space: nowrap; }
.replica-replacement-actions > button { padding: 0; border: 0; background: transparent; color: #77925e; font-size: 10px; }
.replica-object-row-foot { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; min-height: 28px; gap: 5px; padding: 6px 0; border-top: 1px solid #edf1e7; color: #a0aa96; font-size: 9px; }
.has-replacement .replica-object-row-foot { color: #88a071; }
.replica-object-row-foot svg { width: 11px; height: 11px; margin-right: 2px; }
.replica-object-row-foot button { padding: 3px 5px; border: 1px solid #ead9b6; border-radius: 4px; background: #fdf9ee; color: #a48348; font-size: 10px; }
.replica-more-objects { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; width: 100%; padding: 12px 0; border: 0; background: transparent; color: #718a5e; font-size: 11px; text-align: left; }
.replica-more-objects > span { overflow: hidden; max-width: 190px; color: #a1ad98; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.replica-more-objects > i { color: #7f9b69; font-size: 9px; font-style: normal; }
.replica-object-tools { display: flex; justify-content: space-between; gap: 8px; padding: 12px 0 14px; color: #9ba78f; font-size: 10px; }
.replica-object-tools button { padding: 0; border: 0; background: transparent; color: #7f936d; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.replica-reference-preview.is-storyboard { height: 295px; background: #eaf0e2; }
.replica-demo-scene { display: flex; height: 100%; min-width: 0; min-height: 170px; flex-direction: column; align-items: center; justify-content: center; gap: 13px; padding: 20px 14px; background: radial-gradient(ellipse at 85% 15%, #fff9eb 0, transparent 60%), linear-gradient(140deg, #edf3e5, #e2ebd6); text-align: center; }
.is-storyboard > .replica-demo-scene { padding-top: 35px; padding-bottom: 60px; }
.replica-demo-scene-kicker { color: #9aa78b; font-size: 7px; letter-spacing: 1.6px; }
.replica-demo-scene > strong { color: #5c714c; font-size: 17px; font-weight: 500; letter-spacing: -.4px; }
.replica-demo-cast { display: grid; grid-template-columns: repeat(var(--cast-count, 4), minmax(0, 1fr)); justify-content: center; gap: 8px; width: 100%; max-width: 270px; }
.replica-demo-cast figure { min-width: 0; margin: 0; }
.replica-demo-cast figure > img, .replica-demo-cast figure > .replica-object-avatar { display: flex; width: 100%; height: 72px; overflow: hidden; border: 1px solid #ffffffad; border-radius: 10px; background: #ffffff70; object-fit: contain; }
.replica-demo-cast .replica-object-avatar.avatar-b { background: #f1e4d5; }
.replica-demo-cast .replica-object-avatar svg { width: 34px; height: 34px; }
.replica-demo-cast figcaption { margin-top: 7px; color: #7c8c70; font-size: 9px; }
.replica-demo-scene-note { color: #96a287; font-size: 9px; }
.replica-storyboard-caption { position: absolute; bottom: 0; left: 0; display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 13px; border-top: 1px solid #d9e4ce; background: #f7faf2; color: #6d835b; }
.replica-storyboard-caption strong { font-size: 11px; font-weight: 500; }
.replica-storyboard-caption span { color: #96a386; font-size: 9px; }
.replica-note-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.replica-note-label span { color: #b2b8ae; font-size: 9px; }
.replica-workspace #replicaNote { display: block; width: 100%; height: 41px; min-height: 41px; max-height: 100px; margin: 0; padding: 9px 11px; border: 1px solid #e7ebe2; border-radius: 8px; background: #fafbf8; color: #4c5c43; font-size: 10px; line-height: 1.6; resize: vertical; }
.replica-workspace #replicaNote::placeholder { color: #adb6a5; }
.replica-auto-copy { display: flex; align-items: center; gap: 5px; margin: 9px 0 0; color: #9dab91; font-size: 9px; line-height: 1.5; }
.replica-auto-copy svg { width: 11px; height: 11px; flex-basis: 11px; }
.replica-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 19px; padding: 12px 0; border-top: 1px solid #eef1e9; }
.replica-toolbar-links { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; }
.replica-toolbar button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: #87977c; font-size: 10px; white-space: nowrap; }
.replica-toolbar button:disabled { opacity: .4; }
.replica-toolbar button svg { width: 13px; height: 13px; flex-basis: 13px; }
.replica-toolbar-links > span { color: #b2b9ab; font-size: 9px; }
.replica-settings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 13px; margin: 0 0 12px; border-radius: 9px; background: #f7f9f3; }
.replica-settings label { display: grid; gap: 7px; color: #849276; font-size: 10px; }
.replica-settings select { min-width: 0; width: 100%; min-height: 32px; padding: 4px 7px; border: 1px solid #e2e9da; border-radius: 6px; background: #fff; color: #60734f; font-size: 10px; }
.replica-generate-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 7px 0 3px; }
.replica-ready-message { display: grid; grid-template-columns: 5px minmax(0, 1fr); align-items: center; gap: 4px 7px; color: #98a38e; font-size: 10px; line-height: 1.7; }
.replica-ready-message > small { grid-column: 2; color: #a8b39d; font-size: 9px; }
.replica-status-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #b5bfab; }
.replica-status-dot.is-ready { background: #8ab557; box-shadow: 0 0 0 3px #edf5e4; }
.replica-generate-actions { display: flex; flex-direction: column; align-items: center; gap: 7px; flex-shrink: 0; }
.replica-generate { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 181px; min-height: 41px; padding: 10px 22px; border: 1px solid #97bd5e; border-radius: 9px; background: #a5cd68; color: #29411c; font-size: 12px !important; font-weight: 550 !important; box-shadow: 0 3px 7px #8caa4710; }
.replica-generate:hover { background: #97c357; }
.replica-generate:disabled { border-color: #e4e9df; background: #f0f3eb; color: #a6b29c; box-shadow: none; }
.replica-generate-actions small { color: #adb6a4; font-size: 8px; }
.replica-progress { padding: 14px; margin-bottom: 10px; border: 1px solid #e4ebd9; border-radius: 10px; background: #f7faef; }
.replica-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.replica-progress > div > span { display: flex; align-items: center; gap: 8px; color: #71875b; font-size: 11px; }
.replica-progress button { border: 0; background: transparent; color: #99a68c; font-size: 10px; }
.replica-progress progress { display: block; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 8px; accent-color: #99bc6c; background: #e9efdf; }
.replica-progress progress::-webkit-progress-bar { border-radius: 8px; background: #e9efdf; }
.replica-progress progress::-webkit-progress-value { border-radius: 8px; background: #99bc6c; }
.replica-progress small { display: block; margin-top: 8px; color: #a6b099; font-size: 9px; }
.replica-spinner { display: inline-block; width: 12px; height: 12px; flex: 0 0 12px; border: 1.5px solid #afc49b50; border-top-color: #86a367; border-radius: 50%; animation: replica-spin .9s linear infinite; }
@keyframes replica-spin { to { transform: rotate(360deg); } }
.replica-template-section { margin-top: 34px; }
.replica-template-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.replica-eyebrow { color: #a1af95; font-size: 8px; letter-spacing: 1.6px; }
.replica-template-heading h3 { margin: 7px 0 7px; color: #41513a; font-size: 19px; font-weight: 550; letter-spacing: -.3px; }
.replica-template-heading p { margin: 0; color: #a1ad99; font-size: 10px; }
.replica-template-count { align-self: flex-end; padding-bottom: 3px; color: #aab5a1; font-size: 10px; }
.replica-filters { display: flex; gap: 7px; margin: 19px 0 17px; overflow-x: auto; scrollbar-width: none; }
.replica-filters button { min-height: 28px; padding: 5px 13px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #97a48c; font-size: 10px; white-space: nowrap; }
.replica-filters button.is-active { border-color: #dce7d1; background: #eaf2df; color: #627f45; }
.replica-filters button:hover { background: #f0f5e9; }
.replica-template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.replica-template { min-width: 0; overflow: hidden; border: 1px solid #e5eae0; border-radius: 13px; background: #fff; transition: transform .2s, box-shadow .2s; }
.replica-template:hover { transform: translateY(-3px); box-shadow: 0 10px 25px #2743220c; }
.replica-template-cover { --cover-bg: #d8dfcb; position: relative; display: block; width: 100%; aspect-ratio: 4/4.7; overflow: hidden; padding: 0; border: 0; border-radius: 0; background: var(--cover-bg); text-align: left; }
.replica-template.rose .replica-template-cover { --cover-bg: #ead8d3; }
.replica-template.sand .replica-template-cover { --cover-bg: #ded5c4; }
.replica-template.coffee .replica-template-cover { --cover-bg: #bbae98; }
.replica-template.lavender .replica-template-cover { --cover-bg: #d5d2de; }
.replica-template.lime .replica-template-cover { --cover-bg: #d6dfb2; }
.replica-template.blue .replica-template-cover { --cover-bg: #c8d5dc; }
.replica-template.peach .replica-template-cover { --cover-bg: #e7d4bd; }
.replica-template-cover > img { width: 100%; height: 100%; object-fit: contain; padding: 30px 10px 45px; mix-blend-mode: multiply; transition: transform .4s; }
.replica-template-cover > img.is-person { padding: 0; object-fit: cover; object-position: center 40%; mix-blend-mode: normal; }
.replica-template-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, #1f2e2270); pointer-events: none; }
.replica-template-cover:hover > img { transform: scale(1.045); }
.replica-template-badge { position: absolute; z-index: 1; top: 10px; left: 10px; padding: 4px 7px; border: 1px solid #ffffff55; border-radius: 5px; background: #ffffffbf; color: #5f6a53; font-size: 8px; backdrop-filter: blur(7px); }
.replica-template-play { position: absolute; z-index: 1; left: 50%; top: 45%; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #ffffff80; border-radius: 50%; background: #ffffff40; color: #fff; opacity: 0; transform: translate(-50%, -50%); transition: opacity .2s; backdrop-filter: blur(5px); }
.replica-template-play svg { width: 14px; height: 14px; fill: #fff; }
.replica-template-cover:hover .replica-template-play, .replica-template-cover:focus-visible .replica-template-play { opacity: 1; }
.replica-template-cover > strong { position: absolute; z-index: 1; bottom: 25px; left: 13px; color: #fff; font-size: clamp(15px, 1.5vw, 22px); font-weight: 550; line-height: 1.5; letter-spacing: -.5px; text-shadow: 0 1px 8px #2b3b2d20; }
.replica-template-duration { position: absolute; z-index: 1; right: 9px; bottom: 8px; display: flex; align-items: center; gap: 3px; color: #ffffffc9; font-size: 8px; }
.replica-template-duration svg { width: 10px; height: 10px; flex-basis: 10px; }
.replica-template-copy { padding: 13px 12px 12px; }
.replica-template-copy h4 { margin: 0; overflow: hidden; color: #536249; font-size: 11px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; }
.replica-template-copy > p { margin: 7px 0 11px; overflow: hidden; color: #a8b09f; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.replica-template-copy > div { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.replica-template-copy > div > span { color: #a4af9a; font-size: 8px; }
.replica-template-copy button { display: inline-flex; align-items: center; gap: 2px; padding: 3px 0; border: 0; background: transparent; color: #779461; font-size: 9px; }
.replica-template-copy button svg { width: 11px; height: 11px; flex-basis: 11px; }
.replica-result { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 25px; margin-top: 22px; padding: 20px; border: 1px solid #dce8cf; border-radius: 17px; background: #fbfdf7; }
.replica-result-player { position: relative; height: 220px; overflow: hidden; border-radius: 10px; background: #e7eddf; }
.replica-result-player video { width: 100%; height: 100%; }
.replica-result-copy { align-self: center; min-width: 0; }
.replica-result-check { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e6f0da; color: #87a76c; }
.replica-result-copy h3 { margin: 10px 0; color: #526643; font-size: 20px; font-weight: 550; }
.replica-result-copy p { color: #97a38d; font-size: 11px; line-height: 1.7; }
.replica-result-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.replica-result-tags > span { padding: 4px 8px; border-radius: 5px; background: #eef4e6; color: #8a9f76; font-size: 9px; }
.replica-result-copy .replica-result-disclaimer { color: #adb6a4; font-size: 9px; }
.replica-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 15px; }
.replica-result-actions > button { display: flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: #8c9f7c; font-size: 10px; }
.replica-dialog { width: min(650px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 24px; border: 1px solid #e1e8db; border-radius: 18px; background: #fff; color: #53664a; box-shadow: 0 20px 100px #132a2340; }
.replica-dialog::backdrop { background: #142d233b; backdrop-filter: blur(5px); }
.replica-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 19px; }
.replica-dialog-heading h3 { margin: 7px 0 0; font-size: 20px; font-weight: 550; }
.replica-dialog-heading > button { display: grid; place-items: center; width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 7px; background: #f2f5ed; color: #95a489; }
.replica-library { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.replica-library button { position: relative; overflow: hidden; padding: 8px; border: 1px solid #e4eadc; border-radius: 9px; background: #fafcf7; color: #7f916f; text-align: left; }
.replica-library button:hover { border-color: #acc790; background: #f2f7eb; }
.replica-library img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 6px; }
.replica-library button > span { display: block; margin-top: 8px; font-size: 10px; line-height: 1.5; }
.replica-library button > svg { position: absolute; top: 10px; right: 10px; width: 17px; height: 17px; padding: 2px; border-radius: 50%; background: #adc98b; color: #fff; opacity: 0; }
.replica-library button:hover > svg { opacity: 1; }
.replica-dialog-intro { color: #92a084; font-size: 12px; line-height: 1.8; }
.replica-dialog-footnote { margin-top: 17px; color: #b0b8a6; font-size: 10px; line-height: 1.7; }
.replica-dialog-primary { display: flex; width: 100%; margin-top: 20px; }
.replica-template-video { display: block; width: 100%; height: min(420px, 50dvh); border-radius: 11px; background: #f0f4e9; object-fit: contain; }
.replica-material-preview { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 14px; align-items: center; }
.replica-material-preview > div:first-child video { width: 100%; height: 220px; border-radius: 9px; background: #eef2e8; }
.replica-material-preview > div:first-child strong { display: block; margin-top: 8px; color: #95a289; font-size: 11px; text-align: center; }
.replica-preview-assets { display: grid; gap: 10px; }
.replica-preview-assets figure { margin: 0; }
.replica-preview-assets img { width: 100%; max-height: 150px; object-fit: contain; border-radius: 8px; background: #f6f8f1; }
.replica-preview-assets figcaption { margin-top: 5px; color: #95a289; font-size: 10px; text-align: center; }
.replica-workspace .is-dragging { border-color: #8cb567; background: #eaf4dd; box-shadow: 0 0 0 3px #98b87a25; }
.replica-library-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #e9eee3; color: #8c9c80; font-size: 11px; line-height: 1.7; }
.replica-library-footer > button { flex-shrink: 0; }
.replica-occurrences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.replica-occurrences > article { min-width: 0; overflow: hidden; border: 1px solid #e2e9db; border-radius: 9px; background: #fbfcf8; }
.replica-occurrences .replica-demo-scene { min-height: 185px; padding: 17px 11px; gap: 10px; }
.replica-occurrences .replica-demo-scene > strong { font-size: 14px; }
.replica-occurrences .replica-demo-cast { gap: 4px; }
.replica-occurrences .replica-demo-cast figure > img, .replica-occurrences .replica-demo-cast figure > .replica-object-avatar { height: 54px; }
.replica-occurrences .replica-demo-cast figcaption { font-size: 8px; }
.replica-occurrences > article > strong { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 11px; font-size: 12px; font-weight: 500; }
.replica-occurrences > article > strong > small { color: #96a18c; font-size: 10px; font-weight: 400; }
.replica-occurrences > article > button { margin: 0 11px 11px; padding: 4px 0; border: 0; background: transparent; color: #8e9c81; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.replica-occurrence-still { display: flex; min-height: 130px; flex-direction: column; justify-content: center; align-items: center; gap: 9px; background: #f0f4e9; }
.replica-occurrence-still > img, .replica-occurrence-still > .replica-object-avatar { width: 70px; height: 78px; border-radius: 9px; object-fit: contain; }
.replica-occurrence-still > span:last-child { color: #a2ac97; font-size: 10px; }
.replica-managed-objects { display: grid; gap: 8px; }
.replica-managed-objects > div { display: flex; align-items: center; gap: 11px; padding: 9px; border: 1px solid #e6ecdf; border-radius: 8px; }
.replica-managed-objects strong { flex: 1; color: #657857; font-size: 12px; font-weight: 500; }
.replica-managed-objects button { flex-shrink: 0; padding: 5px 8px; border: 0; border-radius: 5px; background: #f1f5eb; color: #7a9364; font-size: 11px; }
.replica-merge-panel { margin-top: 19px; padding: 15px; border: 1px solid #e2e9d8; border-radius: 10px; background: #f8faf3; }
.replica-merge-panel h4 { margin: 0 0 14px; color: #6b805a; font-size: 13px; font-weight: 500; }
.replica-merge-panel > div { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); gap: 12px; align-items: end; }
.replica-merge-panel > div > span { padding-bottom: 9px; color: #a0af91; }
.replica-merge-panel label { display: grid; min-width: 0; gap: 7px; color: #95a286; font-size: 11px; }
.replica-merge-panel select { width: 100%; min-width: 0; height: 35px; padding: 5px; border: 1px solid #dfe7d5; border-radius: 6px; background: #fff; color: #6a7d5b; font-size: 11px; }
.replica-merge-panel p { margin: 11px 0; color: #9aa58d; font-size: 10px; line-height: 1.8; }
.replica-confirm-summary { padding: 12px; border: 1px solid #e2ebd8; border-radius: 8px; background: #f4f8ed; color: #789363; font-size: 12px; line-height: 1.8; }
.replica-confirm-mappings { display: grid; }
.replica-confirm-mappings > div { display: grid; grid-template-columns: 44px minmax(80px, .9fr) 22px minmax(110px, 1fr); gap: 11px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf1e7; }
.replica-confirm-mappings strong { font-size: 12px; font-weight: 500; }
.replica-confirm-mappings strong small { display: block; margin-top: 6px; color: #98a48d; font-size: 10px; font-weight: 400; }
.replica-confirm-mappings > div > span:nth-child(3) { color: #b1bea5; }
.replica-confirm-images { display: flex; gap: 6px; }
.replica-confirm-images > img { width: 43px; height: 51px; border: 1px solid #e1e8d9; border-radius: 6px; background: #f6f8f0; object-fit: cover; }
.replica-confirm-default { color: #a0ac94; font-size: 11px; }
.replica-shot-review { grid-column: 1 / -1; padding-top: 17px; border-top: 1px solid #e6eedc; }
.replica-shot-review > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 13px; }
.replica-shot-review strong { color: #6c8359; font-size: 12px; font-weight: 500; }
.replica-shot-review > div:first-child > span { color: #9aa88c; font-size: 10px; }
.replica-shot-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.replica-shot-grid article { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 12px; border: 1px solid #e2e9d9; border-radius: 8px; background: #fff; }
.replica-shot-grid article > span { color: #7e9170; font-size: 11px; }
.replica-shot-grid small { color: #a8b29d; font-size: 9px; white-space: nowrap; }
.replica-shot-grid article > strong { margin: 3px 0; font-size: 12px; }
.replica-shot-grid button { min-height: 27px; padding: 4px 7px; border: 1px solid #e1e9d7; border-radius: 5px; background: #f5f8ef; color: #8b9e78; font-size: 10px; white-space: nowrap; }
/* Keep supporting copy legible alongside the existing workspace typography. */
.replica-section-heading > small, .replica-prototype-tag { font-size: 10px; }
.replica-dropzone > strong { color: #53664a; font-size: 13px; }
.replica-dropzone p { color: #8d9c81; font-size: 11px; }
.replica-dropzone > small { font-size: 10px; }
.replica-note-label, .replica-workspace #replicaNote, .replica-link-row input { font-size: 11px; }
.replica-source-status, .replica-auto-copy { color: #8a9c7d; font-size: 10px; }
.replica-toolbar button { font-size: 11px; }
.replica-ready-message { color: #839574; font-size: 11px; }
.replica-template-heading p { color: #8e9f80; font-size: 11px; }
.replica-filters button { font-size: 11px; }
.replica-template-copy h4 { font-size: 12px; }
.replica-template-copy > p { color: #98a58c; font-size: 9px; }
.replica-template-copy > div > span { font-size: 9px; }
.replica-template-copy button { font-size: 10px; }
@media (min-width: 1600px) {
  .replica-workspace { width: min(1120px, 100%); }
  .replica-main-card { padding: 27px 30px 16px; }
  .replica-dropzone { min-height: 200px; }
  .replica-reference-preview { height: 295px; }
}
@media (max-width: 1100px) {
  .replica-demo-switcher { gap: 10px; }
  .replica-demo-switcher > small { display: none; }
  .replica-editor-grid { gap: 18px; }
  .replica-source-section { padding-right: 18px; }
  .replica-toolbar-links > span { display: none; }
  .replica-template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
  .replica-template-copy > div > span { font-size: 7px; }
  .replica-generate { min-width: 155px; }
  .replica-object-row, .replica-mapping-head { grid-template-columns: minmax(0, .9fr) 15px minmax(0, 1fr); gap: 7px; }
  .replica-object-thumb { width: 37px; height: 49px; flex-basis: 37px; }
  .replica-original-object { gap: 7px; }
  .replica-object-add { gap: 6px; }
  .replica-more-objects > span { max-width: 145px; }
  .replica-shot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  body.chat-refresh[data-mode="replica"] .workbuddy-workbench { padding-top: 28px; }
  .replica-template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .replica-demo-switcher { align-items: flex-start; flex-direction: column; gap: 9px; padding: 12px; }
  .replica-demo-switcher > div { width: 100%; }
  .replica-demo-switcher button { flex: 1; padding: 6px 9px; font-size: 10px; }
  .chat-refresh .content-workspace-tabs { gap: 24px; }
  .chat-refresh .content-workspace-tabs button { min-height: 48px; font-size: 13px; }
  body.chat-refresh[data-mode="replica"] .workbuddy-workbench h2 { gap: 10px; font-size: 22px; letter-spacing: -.7px; }
  body.chat-refresh[data-mode="replica"] .chat-hero-mark { width: 27px; height: 30px; flex-basis: 27px; }
  body.chat-refresh[data-mode="replica"] .workbuddy-workbench > p { font-size: 10px; }
  body.chat-refresh[data-mode="replica"] .chat-content { margin-top: 22px; }
  .replica-main-card { padding: 16px 15px 12px; border-radius: 15px; }
  .replica-editor-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .replica-source-section { padding-right: 0; padding-bottom: 17px; border-right: 0; border-bottom: 1px solid #edf0e9; }
  .replica-dropzone { min-height: 180px; }
  .replica-reference-preview { height: 240px; }
  .replica-toolbar { flex-wrap: wrap; gap: 13px; margin-top: 16px; }
  .replica-generate-footer { flex-direction: column; align-items: stretch; gap: 12px; }
  .replica-generate-actions, .replica-generate-actions .replica-generate { width: 100%; }
  .replica-ready-message { justify-content: center; }
  .replica-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .replica-template-section { margin-top: 28px; }
  .replica-template-heading h3 { font-size: 18px; }
  .replica-template-count { display: none; }
  .replica-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .replica-template-copy { padding: 11px 9px 10px; }
  .replica-template-copy h4 { font-size: 10px; }
  .replica-template-copy > div { flex-wrap: wrap; }
  .replica-template-cover > strong { font-size: 18px; }
  .replica-result { grid-template-columns: 100px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .replica-result-player { height: 180px; }
  .replica-result-copy h3 { font-size: 16px; }
  .replica-result-copy p { font-size: 10px; }
  .replica-library { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .replica-dialog { padding: 19px; }
  .replica-mapping-head { margin-left: 9px; margin-right: 9px; }
  .replica-object-row { padding-left: 9px; padding-right: 9px; }
  .replica-object-row, .replica-mapping-head { grid-template-columns: minmax(0, .85fr) 15px minmax(0, 1fr); gap: 7px; }
  .replica-original-object { gap: 7px; }
  .replica-object-description strong { font-size: 11px; }
  .replica-object-description small { max-width: 74px; }
  .replica-object-tools { font-size: 9px; }
  .replica-section-heading > small { font-size: 9px; }
  .replica-more-objects > span { max-width: 155px; }
  .replica-library-footer { flex-direction: column; align-items: stretch; }
  .replica-confirm-mappings > div { grid-template-columns: 34px minmax(60px, .85fr) 15px minmax(100px, 1fr); gap: 6px; }
  .replica-confirm-mappings .replica-object-thumb { width: 34px; height: 44px; }
  .replica-confirm-images { gap: 3px; }
  .replica-confirm-images > img { width: 31px; height: 40px; }
  .replica-occurrences { gap: 8px; }
  .replica-occurrences > article > strong { align-items: flex-start; flex-direction: column; padding: 9px; }
  .replica-occurrences .replica-demo-scene { min-height: 165px; gap: 8px; }
  .replica-occurrences .replica-demo-cast { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 130px; }
  .replica-occurrences .replica-demo-scene-kicker, .replica-occurrences .replica-demo-scene-note { display: none; }
  .replica-occurrences .replica-demo-cast figure > img, .replica-occurrences .replica-demo-cast figure > .replica-object-avatar { height: 45px; }
  .replica-shot-grid article { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .replica-spinner { animation: none; }
  .replica-workspace *, .replica-workspace *::before { scroll-behavior: auto; transition: none; }
}
