.replacement-layout { flex: 1; min-height: 0; overflow: auto; padding: 6px 0 24px; }
.replacement-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 18px; }
.replacement-header h2 { font-size: 21px; margin: 0 0 6px; }
.replacement-header p, .replacement-help { color: var(--muted); line-height: 1.65; margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.replacement-new { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 116px; min-height: 40px; flex: 0 0 116px; white-space: nowrap; font-size: 13px; }
.replacement-new span { font-size: 20px; line-height: 1; }
.replacement-columns { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); border-top: 1px solid var(--line); }
.replacement-inputs { padding: 20px 22px 12px 0; border-right: 1px solid var(--line); min-width: 0; }
.replacement-output { padding: 20px 0 12px 24px; min-width: 0; }
.replacement-step { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.replacement-step:last-child { margin-bottom: 0; }
.replacement-step h3 { margin: 0 0 14px; font-size: 14px; display: flex; align-items: center; gap: 9px; }
.replacement-step h3 > span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #2b3039; color: #bac8e0; font-size: 11px; flex: 0 0 23px; }
.replacement-file { position: relative; display: grid; place-items: center; gap: 7px; min-height: 74px; padding: 14px; border: 1px dashed #444952; border-radius: 7px; background: #1b1e23; color: #bec4cf; cursor: pointer; text-align: center; font-size: 12px; }
.replacement-file:hover { border-color: #6c839c; background: #222832; }
.replacement-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.replacement-source { width: 100%; max-height: 230px; background: #0d0f12; margin-top: 12px; border-radius: 5px; }
.replacement-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 14px; }
.replacement-choice { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); cursor: pointer; }
.replacement-choice:has(input:checked) { border-color: #7a9bc3; background: #243142; }
.replacement-choice input { margin: 0; padding: 0; width: 14px; height: 14px; accent-color: #83a6d6; }
.replacement-target { display: grid; gap: 10px; padding-bottom: 14px; }
.replacement-target > strong { color: #c4cede; font-size: 12px; }
.replacement-target img { width: 76px; height: 76px; object-fit: contain; background: #111316; border: 1px solid var(--line); border-radius: 5px; }
.replacement-product-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #c4cede; font-size: 12px; min-height: 32px; }
.replacement-product-heading > span { color: var(--muted); white-space: nowrap; }
.replacement-product-row { display: grid; gap: 10px; padding: 12px 0 16px; border-top: 1px solid var(--line); min-width: 0; }
.replacement-product-row label { min-width: 0; overflow-wrap: anywhere; }
.replacement-product-row input { width: 100%; min-width: 0; font-size: 12px; }
.replacement-product-content { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; }
.replacement-product-image { position: relative; display: block; width: 64px; height: 86px; cursor: pointer; border-radius: 5px; overflow: hidden; }
.replacement-product-image img { width: 100%; height: 100%; box-sizing: border-box; }
.replacement-product-image > span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: #0009; opacity: 0; font-size: 12px; transition: opacity .15s; }
.replacement-product-image:hover > span, .replacement-product-image:focus-within > span { opacity: 1; }
.replacement-product-image > input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.replacement-product-names { display: grid; gap: 8px; min-width: 0; }
.replacement-product-names > label { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 5px; align-items: center; font-size: 11px; line-height: 1.5; }
.replacement-product-names > label > span { white-space: nowrap; }
.replacement-product-names input { min-height: 38px; padding: 7px; }
.replacement-product-heading .icon-button { width: 30px; height: 30px; padding: 0; flex: 0 0 30px; }
.replacement-fields { display: grid; gap: 12px; margin: 12px 0; }
.replacement-fields select, .replacement-fields input, .replacement-fields textarea, .replacement-manual select { min-width: 0; width: 100%; font-size: 12px; }
.replacement-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.replacement-actions button { min-height: 38px; font-size: 12px; }
.replacement-layout button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.replacement-status { padding: 10px 13px; margin: 0 0 17px; border-left: 3px solid #7a9bc3; background: #202630; font-size: 12px; color: #c9d7eb; line-height: 1.65; overflow-wrap: anywhere; }
.replacement-status[data-error="true"] { border-color: #dc847e; color: #f2b2ac; background: #342526; }
.replacement-empty { display: grid; place-items: center; text-align: center; min-height: 180px; color: #7d8796; border: 1px dashed var(--line); padding: 24px; font-size: 13px; line-height: 1.8; }
.replacement-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 10px; margin: 12px 0; }
.replacement-frame { min-width: 0; margin: 0; position: relative; }
.replacement-frame img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: contain; background: #101215; border: 1px solid #3c4553; border-radius: 5px; }
.replacement-frame figcaption { color: #a9b4c5; font-size: 11px; line-height: 1.6; padding-top: 5px; overflow-wrap: anywhere; }
.replacement-reference-question { font-size: 11px; line-height: 1.6; color: #bdcbe0; margin: 8px 0; }
.replacement-reference-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.replacement-reference-actions button { font-size: 10px; padding: 6px; min-height: 30px; }
.replacement-strip { display: flex; overflow-x: auto; gap: 8px; padding: 10px 0; margin-bottom: 12px; max-width: 100%; }
.replacement-strip button { background: #1b1f25; color: #aab9d0; border: 1px solid #353b46; padding: 4px; border-radius: 4px; width: 95px; flex: 0 0 95px; font-size: 10px; }
.replacement-strip img { width: 85px; height: 53px; object-fit: contain; display: block; margin-bottom: 4px; }
.replacement-manual { border-top: 1px solid var(--line); padding-top: 14px; }
.replacement-manual summary { cursor: pointer; color: #b4c6df; font-size: 12px; }
.replacement-manual-target { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: start; gap: 12px; margin-top: 14px; }
.replacement-manual-target img { width: 90px; height: 70px; object-fit: contain; background: #111316; }
.replacement-manual-target > div { display: grid; gap: 7px; min-width: 0; }
.replacement-check { display: flex; align-items: start; gap: 7px; font-size: 11px; line-height: 1.6; margin-top: 8px; }
.replacement-check input { width: 14px; height: 14px; margin: 2px 0 0; flex: 0 0 14px; }
.replacement-mode { display: grid; gap: 9px; margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.replacement-mode legend { color: #b4c6df; padding: 0 5px; }
.replacement-effects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 14px; align-items: start; }
.replacement-effect { min-width: 0; margin: 0; }
.replacement-effect img { display: block; height: 200px; width: 100%; object-fit: contain; background: #101215; border: 1px solid #374340; border-radius: 5px; }
.replacement-effect figcaption { font-size: 11px; color: #a1b4ab; padding: 7px 0; line-height: 1.6; overflow-wrap: anywhere; }
.replacement-effect progress { width: 100%; height: 6px; accent-color: #79a8db; }
.replacement-effect-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.replacement-effect-actions button { min-height: 32px; padding: 6px 9px; font-size: 11px; }
.replacement-effect-error { color: #f2b2ac; }
.replacement-compare { width: min(900px, 94vw); max-height: 90vh; box-sizing: border-box; padding: 18px; color: #d7e1ef; background: #181d24; border: 1px solid #465365; border-radius: 12px; overflow: auto; }
.replacement-compare::backdrop { background: #000a; }
.replacement-compare header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.replacement-compare header h3 { font-size: 15px; margin: 0; }
.replacement-compare-images { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.replacement-compare-images figure { margin: 0; min-width: 0; }
.replacement-compare-images figcaption { text-align: center; font-size: 12px; margin-bottom: 8px; }
.replacement-compare-images img { display: block; width: 100%; height: min(60vh, 460px); object-fit: contain; background: #0d0f12; }
.replacement-confirmed { color: #8fe1b0; font-size: 12px; }
.replacement-duration, .replacement-generation-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.replacement-result video { width: 100%; max-height: 500px; background: #0d0f12; }
.replacement-recommendations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.replacement-candidate { margin: 0; min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.replacement-candidate img { display: block; width: 100%; height: 130px; object-fit: contain; background: #101215; }
.replacement-candidate figcaption { color: #a1b4ab; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.replacement-candidate-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.replacement-candidate-heading strong { min-width: 0; overflow-wrap: anywhere; }
.replacement-candidate-heading button { flex: 0 0 30px; width: 30px; height: 30px; padding: 0; }
@media (max-width: 1050px) { .replacement-columns { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); } .replacement-inputs { padding-right: 16px; } .replacement-output { padding-left: 16px; } }
@media (max-width: 760px) { .replacement-columns { display: block; } .replacement-inputs { border-right: 0; padding: 16px 0; } .replacement-output { padding: 0; } .replacement-header { align-items: center; } }
@media (hover: none) { .replacement-product-image > span { inset: auto 0 0; min-height: 25px; opacity: 1; } }
