/* ==========================================================================
   DESIGN D — Clear Desk Tool UI (Black Edition)
   New layout chrome · same dark studio palette as Design C
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap");

body.tool-ui-d {
    --td-bg: #070b14;
    --td-surface: rgba(15, 23, 42, 0.92);
    --td-ink: #f8fafc;
    --td-muted: #94a3b8;
    --td-line: #243044;
    --td-accent: #a3e635;
    --td-accent-2: #67e8f9;
    --td-accent-soft: rgba(163, 230, 53, 0.12);
    --td-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --td-radius: 18px;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    background: var(--td-bg) !important;
    color: var(--td-ink) !important;
    min-height: 100vh;
}

body.tool-ui-d .rd-c-glow {
    display: block !important;
}

/* ---- Nav ---- */
body.tool-ui-d .navbar {
    background: rgba(7, 11, 20, 0.88) !important;
    border-bottom: 1px solid var(--td-line) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(16px);
    position: sticky !important;
    top: 0;
    z-index: 1000;
}

body.tool-ui-d .navbar::before,
body.tool-ui-d .navbar::after {
    display: none !important;
}

body.tool-ui-d .nav-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 60px;
    gap: 1rem;
}

body.tool-ui-d .nav-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.35rem 0.85rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.tool-ui-d .nav-menu > li {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

body.tool-ui-d .nav-menu a,
body.tool-ui-d .dropdown-trigger {
    color: #94a3b8 !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    padding: 0.4rem 0.15rem !important;
    text-decoration: none !important;
}

body.tool-ui-d .nav-menu a:hover,
body.tool-ui-d .dropdown-trigger:hover {
    color: var(--td-accent) !important;
}

body.tool-ui-d .nav-menu a::after,
body.tool-ui-d .dropdown-trigger::after {
    display: none !important;
}

body.tool-ui-d .nav-menu li.nav-dropdown {
    position: relative !important;
}

body.tool-ui-d .dropdown-menu,
body.tool-ui-d .tools-dropdown {
    background: #0f172a !important;
    border: 1px solid var(--td-line) !important;
    border-radius: 14px !important;
    box-shadow: var(--td-shadow) !important;
    left: 0 !important;
    right: auto !important;
    top: calc(100% + 10px) !important;
    margin-top: 0 !important;
    transform: translateY(-6px) scale(0.98) !important;
    min-width: 12.5rem !important;
    width: max-content !important;
    max-width: min(22rem, calc(100vw - 1.5rem)) !important;
    padding: 0.4rem !important;
    overflow: hidden !important;
}

body.tool-ui-d .nav-dropdown.active .tools-dropdown,
body.tool-ui-d .nav-dropdown.active .dropdown-menu {
    transform: translateY(0) scale(1) !important;
}

body.tool-ui-d .nav-dropdown .tools-dropdown.multi-column {
    left: 50% !important;
    transform: translateX(-50%) translateY(-6px) scale(0.98) !important;
    min-width: 460px !important;
    width: auto !important;
    max-width: min(640px, calc(100vw - 1.5rem)) !important;
    padding: 1.1rem 1.15rem !important;
}

body.tool-ui-d .nav-dropdown.active .tools-dropdown.multi-column {
    transform: translateX(-50%) translateY(0) scale(1) !important;
}

body.tool-ui-d .dropdown-item,
body.tool-ui-d .dropdown-item a {
    color: #e2e8f0 !important;
    white-space: nowrap !important;
}

body.tool-ui-d .tools-dropdown .dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 0.7rem 0.85rem !important;
    margin: 0 !important;
    min-height: 0 !important;
    border-radius: 10px !important;
}

body.tool-ui-d .dropdown-item:hover,
body.tool-ui-d .tools-dropdown .dropdown-item:hover {
    background: rgba(103, 232, 249, 0.1) !important;
    color: #67e8f9 !important;
}

body.tool-ui-d .dropdown-category-title {
    color: var(--td-accent) !important;
    padding: 0.15rem 0.7rem 0.55rem !important;
    margin: 0 !important;
}

body.tool-ui-d .mobile-menu-toggle span {
    background: #e2e8f0 !important;
}

@media (min-width: 1025px) {
    body.tool-ui-d .nav-menu > li {
        display: flex !important;
        align-items: center !important;
    }
}

@media (max-width: 768px) {
    body.tool-ui-d .nav-menu {
        background: #0b1220 !important;
        border-top-color: var(--td-line) !important;
    }
}

/* ---- Hero ---- */
body.tool-ui-d .page-hero,
body.tool-ui-d .td-hero,
body.tool-ui-d .rd-ct-hero {
    background: transparent !important;
    padding: 1.5rem 0 0.75rem !important;
    border: 0 !important;
    text-align: left !important;
}

body.tool-ui-d .td-crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.85rem;
}

body.tool-ui-d .td-crumb a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
}

body.tool-ui-d .td-crumb a:hover {
    color: #67e8f9;
}

body.tool-ui-d .td-crumb strong {
    color: #e2e8f0;
}

body.tool-ui-d .td-hero-card {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.95), rgba(11, 18, 32, 0.98));
    border: 1px solid var(--td-line);
    border-radius: 22px;
    box-shadow: var(--td-shadow);
    padding: 1.25rem 1.35rem;
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 1.25rem;
    align-items: center;
}

body.tool-ui-d .td-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--td-accent);
    background: var(--td-accent-soft);
    border: 1px solid rgba(163, 230, 53, 0.28);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    margin-bottom: 0.55rem;
}

body.tool-ui-d .td-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--td-accent);
    box-shadow: 0 0 8px var(--td-accent);
    display: inline-block;
}

body.tool-ui-d .td-hero h1,
body.tool-ui-d .td-hero .page-title {
    margin: 0 0 0.4rem !important;
    font-family: Sora, "Plus Jakarta Sans", sans-serif !important;
    font-size: clamp(1.6rem, 3vw, 2.2rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.04em !important;
    line-height: 1.12 !important;
    color: #f8fafc !important;
    background: none !important;
    -webkit-text-fill-color: #f8fafc !important;
    text-align: left !important;
}

body.tool-ui-d .td-hero h1 span,
body.tool-ui-d .td-hero .page-title span {
    background: linear-gradient(110deg, #67e8f9, #a3e635) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

body.tool-ui-d .td-hero p,
body.tool-ui-d .td-hero .page-description {
    margin: 0 !important;
    color: var(--td-muted) !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    max-width: 520px;
    text-align: left !important;
}

body.tool-ui-d .td-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

body.tool-ui-d .td-step {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--td-line);
    border-radius: 14px;
    padding: 0.7rem 0.75rem;
}

body.tool-ui-d .td-step b {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--td-accent);
    letter-spacing: 0.06em;
    margin-bottom: 0.2rem;
}

body.tool-ui-d .td-step span {
    font-size: 0.84rem;
    font-weight: 700;
    color: #e2e8f0;
}

body.tool-ui-d .td-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

body.tool-ui-d .td-trust span {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    padding: 0.28rem 0.6rem;
}

/* ---- Workspace ---- */
body.tool-ui-d .upscaler-section,
body.tool-ui-d .td-workspace,
body.tool-ui-d .tool-section,
body.tool-ui-d section.upscaler-section {
    background: transparent !important;
    padding: 1rem 0 2rem !important;
}

body.tool-ui-d .filter-layout,
body.tool-ui-d .td-layout {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    align-items: start !important;
}

body.tool-ui-d .face-swap-uploads {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.85rem !important;
    width: 100% !important;
    align-items: stretch !important;
    flex: 0 0 auto !important;
}

body.tool-ui-d .face-swap-uploads .upload-subtitle {
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e8f0;
    text-align: center;
    margin: 0 0 0.35rem;
}

body.tool-ui-d .face-swap-uploads .upload-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.tool-ui-d .face-swap-uploads .upload-box-modern {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

body.tool-ui-d .face-swap-uploads .upload-content-modern,
body.tool-ui-d .face-swap-uploads .upload-preview-modern {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 200px !important;
    height: 100% !important;
    padding: 0.65rem !important;
    box-sizing: border-box !important;
}

body.tool-ui-d .face-swap-uploads .upload-title-modern {
    font-size: 0.82rem !important;
    margin-bottom: 0.25rem !important;
}

body.tool-ui-d .face-swap-uploads .upload-description-modern {
    font-size: 0.72rem !important;
    opacity: 0.75;
}

/* Video face swap — filename only, no media preview */
body.tool-ui-d .face-swap-uploads.vfs-no-preview .upload-box-modern.has-file .upload-content-modern {
    display: none !important;
}

body.tool-ui-d .face-swap-uploads.vfs-no-preview .upload-selected-modern {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 200px;
    padding: 1rem 0.85rem;
    box-sizing: border-box;
    position: relative;
    text-align: center;
}

body.tool-ui-d .face-swap-uploads.vfs-no-preview .upload-box-modern.has-file .upload-selected-modern {
    display: flex !important;
}

body.tool-ui-d .face-swap-uploads.vfs-no-preview .upload-selected-inner {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: calc(100% - 2.5rem);
}

body.tool-ui-d .face-swap-uploads.vfs-no-preview .upload-selected-inner strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: #e2e8f0;
    word-break: break-all;
}

body.tool-ui-d .face-swap-uploads.vfs-no-preview .upload-selected-inner span {
    font-size: 0.72rem;
    color: #94a3b8;
}

body.tool-ui-d .face-swap-uploads.vfs-no-preview .upload-selected-modern .remove-image-modern {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
}

body.tool-ui-d .face-swap-uploads.studio-audio-preview .upload-preview-modern.studio-audio-preview-wrap {
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    padding: 1rem 0.9rem;
    box-sizing: border-box;
}

body.tool-ui-d .face-swap-uploads.studio-audio-preview .upload-box-modern.has-preview .upload-preview-modern.studio-audio-preview-wrap {
    display: flex !important;
}

body.tool-ui-d .face-swap-uploads.studio-audio-preview .upload-box-modern.has-preview .vfs-upload-trigger {
    display: none !important;
}

body.tool-ui-d .studio-audio-preview-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
    padding: 1.1rem 1rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(8, 14, 26, 0.55);
    box-sizing: border-box;
}

body.tool-ui-d .studio-audio-preview-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    max-width: calc(100% - 2rem);
    text-align: center;
}

body.tool-ui-d .studio-audio-preview-meta strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: #e2e8f0;
    word-break: break-all;
}

body.tool-ui-d .studio-audio-preview-meta span {
    font-size: 0.72rem;
    color: #94a3b8;
}

body.tool-ui-d .studio-audio-player {
    width: 100%;
    max-width: 420px;
    height: 40px;
    border-radius: 999px;
}

body.tool-ui-d .studio-audio-preview-card .remove-image-modern {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
}

body.tool-ui-d .face-swap-uploads.vfs-no-preview label.vfs-upload-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Video face swap — single-column studio (no preview panel) */
body.tool-ui-d .vfs-studio-section .vfs-studio-layout {
    display: block !important;
    max-width: 680px;
    margin: 0 auto;
    grid-template-columns: unset !important;
}

body.tool-ui-d .vfs-studio-panel {
    width: 100%;
    padding: 1.35rem 1.25rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: linear-gradient(165deg, rgba(8, 18, 36, 0.92) 0%, rgba(12, 24, 48, 0.88) 100%);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.06), 0 24px 48px rgba(0, 0, 0, 0.35);
}

body.tool-ui-d .vfs-studio-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

body.tool-ui-d .vfs-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 4.5rem;
    opacity: 0.45;
}

body.tool-ui-d .vfs-step.is-active {
    opacity: 1;
}

body.tool-ui-d .vfs-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #e0f2fe;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

body.tool-ui-d .vfs-step.is-active .vfs-step-num {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    border-color: transparent;
    color: #0c1222;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
}

body.tool-ui-d .vfs-step-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

body.tool-ui-d .vfs-step.is-active .vfs-step-label {
    color: #bae6fd;
}

body.tool-ui-d .vfs-step-connector {
    flex: 1 1 auto;
    max-width: 2.5rem;
    height: 2px;
    margin-top: -1rem;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), rgba(56, 189, 248, 0.35), rgba(56, 189, 248, 0.15));
    border-radius: 999px;
}

body.tool-ui-d .vfs-result-zone {
    margin-top: 1rem;
    min-height: 0;
    border: none;
    background: transparent;
    padding: 0;
}

body.tool-ui-d .vfs-result-zone:not(.td-has-result) {
    border: 1.5px dashed rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(8, 14, 26, 0.4);
}

body.tool-ui-d .vfs-idle-state,
body.tool-ui-d .vfs-processing-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.35rem 1rem;
    gap: 0.35rem;
}

body.tool-ui-d .vfs-idle-icon {
    opacity: 0.35;
    margin-bottom: 0.25rem;
    color: #64748b;
}

body.tool-ui-d .vfs-idle-state h3,
body.tool-ui-d .vfs-processing-state h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
}

body.tool-ui-d .vfs-idle-state p,
body.tool-ui-d .vfs-processing-state p {
    margin: 0;
    font-size: 0.78rem;
    color: #64748b;
    max-width: 28rem;
    line-height: 1.45;
}

body.tool-ui-d .vfs-processing-ring {
    width: 44px;
    height: 44px;
    margin-bottom: 0.35rem;
    border-radius: 999px;
    border: 3px solid rgba(56, 189, 248, 0.15);
    border-top-color: #38bdf8;
    animation: spin 0.9s linear infinite;
}

body.tool-ui-d .vfs-download-card,
body.tool-ui-d .cp-result.vfs-download-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 1.5rem 1.25rem 1.35rem !important;
    gap: 0.45rem !important;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.08) 0%, rgba(8, 18, 36, 0.6) 100%);
    border: 1px solid rgba(52, 211, 153, 0.28);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.08);
}

body.tool-ui-d .vfs-download-badge,
body.tool-ui-d .cp-result.vfs-download-card .vfs-download-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    width: 3.25rem !important;
    height: 3.25rem !important;
    margin: 0 auto 0.15rem !important;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

body.tool-ui-d .vfs-download-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ecfdf5;
}

body.tool-ui-d .vfs-download-sub {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

body.tool-ui-d .vfs-download-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100% !important;
    max-width: 320px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0c1222 !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.tool-ui-d .vfs-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45);
}

body.tool-ui-d .vfs-studio-panel .process-container .btn-generate {
    width: 100%;
    margin-top: 0.15rem;
}

body.tool-ui-d .studio-single-upload {
    grid-template-columns: 1fr !important;
    max-width: 100%;
}

body.tool-ui-d .studio-image-preview .upload-box-modern.has-preview .upload-content-modern {
    display: none !important;
}

body.tool-ui-d .studio-image-preview .upload-preview-modern {
    display: none;
    flex-direction: column;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
}

body.tool-ui-d .studio-image-preview .upload-box-modern.has-preview .upload-preview-modern {
    display: flex !important;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
}

body.tool-ui-d .studio-image-preview .preview-image-wrapper {
    position: relative;
    width: 100%;
    min-height: 220px;
    max-height: none;
    height: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.85rem;
    box-sizing: border-box;
    border-radius: 16px;
    outline: 1.5px dashed rgba(103, 232, 249, 0.38);
    outline-offset: -1px;
    background: rgba(8, 14, 26, 0.35);
    overflow: hidden;
}

body.tool-ui-d .studio-image-preview .preview-image-wrapper img {
    position: static;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(220px - 1.7rem);
    min-height: 0;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
    background: transparent;
}

body.tool-ui-d .studio-image-preview .preview-image-wrapper .remove-image-modern {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
}

body.tool-ui-d .studio-video-preview .upload-box-modern.has-preview .upload-content-modern {
    display: none !important;
}

body.tool-ui-d .studio-video-preview .upload-preview-modern {
    display: none;
    flex-direction: column;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
}

body.tool-ui-d .studio-video-preview .upload-box-modern.has-preview .upload-preview-modern {
    display: flex !important;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
}

body.tool-ui-d .studio-video-preview .preview-image-wrapper {
    position: relative;
    width: 100%;
    min-height: 220px;
    max-height: none;
    height: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.85rem;
    box-sizing: border-box;
    border-radius: 16px;
    outline: 1.5px dashed rgba(103, 232, 249, 0.38);
    outline-offset: -1px;
    background: rgba(8, 14, 26, 0.35);
    overflow: hidden;
}

body.tool-ui-d .studio-video-preview .preview-image-wrapper video {
    position: static;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(220px - 1.7rem);
    min-height: 0;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
    border-radius: 0;
    background: transparent;
}

body.tool-ui-d .studio-video-preview .preview-image-wrapper .remove-image-modern {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
}

body.tool-ui-d .vfs-studio-panel .face-swap-uploads.vfs-no-preview .upload-selected-modern {
    border-radius: 16px;
    outline: 1.5px dashed rgba(103, 232, 249, 0.38);
    outline-offset: -1px;
    background: rgba(8, 14, 26, 0.35);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.08);
}

body.tool-ui-d .face-swap-uploads.vfs-with-preview .upload-box-modern.has-preview .upload-content-modern {
    display: none !important;
}

body.tool-ui-d .face-swap-uploads.vfs-with-preview .upload-preview-modern {
    display: none;
    flex-direction: column;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    flex: 1 1 auto;
}

body.tool-ui-d .face-swap-uploads.vfs-with-preview .upload-box-modern.has-preview .upload-preview-modern {
    display: flex !important;
}

body.tool-ui-d .face-swap-uploads.vfs-with-preview .preview-image-wrapper {
    position: relative;
    width: 100%;
    max-height: 220px;
    min-height: 0 !important;
    height: auto !important;
    flex: none !important;
    display: block !important;
    border-radius: 16px;
    outline: 1.5px dashed rgba(103, 232, 249, 0.38);
    outline-offset: -1px;
    background: rgba(8, 14, 26, 0.35);
    overflow: hidden;
    line-height: 0;
}

body.tool-ui-d .face-swap-uploads.vfs-with-preview .preview-image-wrapper img,
body.tool-ui-d .face-swap-uploads.vfs-with-preview .preview-image-wrapper video {
    position: static;
    width: 100%;
    height: auto;
    max-height: 220px;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 0;
    background: transparent;
}

body.tool-ui-d .face-swap-uploads.vfs-with-preview .preview-image-wrapper .remove-image-modern {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
}

body.tool-ui-d .studio-model-pick {
    margin: 0.85rem 0 0.25rem;
    text-align: center;
}

body.tool-ui-d .studio-model-title {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

body.tool-ui-d .studio-model-btns {
    display: flex;
    gap: 0.55rem;
    justify-content: center;
}

body.tool-ui-d .studio-model-btn {
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(8, 18, 36, 0.55);
    color: #bae6fd;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.tool-ui-d .studio-model-btn:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(14, 165, 233, 0.12);
}

body.tool-ui-d .studio-model-btn.active {
    border-color: transparent;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    color: #0c1222;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}

body.tool-ui-d .face-swap-uploads .preview-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 220px;
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

body.tool-ui-d .face-swap-uploads .preview-image-wrapper video,
body.tool-ui-d .face-swap-uploads .preview-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 220px;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    display: block;
}

body.tool-ui-d .face-swap-uploads .upload-preview-modern {
    display: none !important;
    flex-direction: column !important;
}

body.tool-ui-d .face-swap-uploads .upload-box-modern.has-preview .upload-content-modern {
    display: none !important;
}

body.tool-ui-d .face-swap-uploads .upload-box-modern.has-preview .upload-preview-modern {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 220px !important;
}

body.tool-ui-d .filter-input-panel #queuePanel:not(.active) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    border: none !important;
}

body.tool-ui-d .filter-input-panel.td-panel {
    align-self: start !important;
    justify-content: flex-start !important;
}

body.tool-ui-d .filter-input-panel .turnstile-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
}

body.tool-ui-d .filter-input-panel .process-container {
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
}

@media (max-width: 768px) {
    body.tool-ui-d .face-swap-uploads {
        grid-template-columns: 1fr;
    }
}

body.tool-ui-d .filter-input-panel,
body.tool-ui-d .filter-output-panel,
body.tool-ui-d .upscaler-container,
body.tool-ui-d .voice-tool-container,
body.tool-ui-d .td-panel {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.95), rgba(11, 18, 32, 0.98)) !important;
    border: 1px solid var(--td-line) !important;
    border-radius: var(--td-radius) !important;
    box-shadow: var(--td-shadow) !important;
    color: #e2e8f0 !important;
    padding: 1.1rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    max-width: none !important;
    position: relative !important;
    top: auto !important;
}

body.tool-ui-d .filter-output-panel {
    align-self: start !important;
    flex: 0 0 auto !important;
    height: fit-content !important;
    max-height: none !important;
    position: static !important;
    overflow: visible !important;
}

body.tool-ui-d .td-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    flex-shrink: 0;
    min-width: 0;
    position: relative;
    z-index: 2;
}

body.tool-ui-d .td-panel-head .td-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

body.tool-ui-d .td-panel-ico {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--td-accent-soft);
    color: var(--td-accent);
    font-size: 0.75rem;
    font-weight: 800;
}

body.tool-ui-d .td-panel-head strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
}

body.tool-ui-d .td-panel-head em {
    font-style: normal;
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 999px;
    padding: 0.28rem 0.6rem;
}

body.tool-ui-d .td-panel-head em.is-ready {
    color: #052e16;
    background: rgba(163, 230, 53, 0.85);
}

body.tool-ui-d .td-panel-head em.is-processing {
    color: #082f49;
    background: rgba(103, 232, 249, 0.85);
}

/* Tighten captcha → run button spacing */
body.tool-ui-d .filter-input-panel .turnstile-wrapper {
    margin: 0 !important;
}

body.tool-ui-d .filter-input-panel .turnstile-container {
    padding: 0 !important;
    min-height: 0 !important;
}

body.tool-ui-d .filter-input-panel .process-container {
    margin: 0 !important;
}

body.tool-ui-d .filter-input-panel .success-message {
    margin: 0 !important;
}

body.tool-ui-d .filter-input-panel {
    gap: 0.55rem !important;
}

/* Upload — single panel border, expanded inner drop zone */
body.tool-ui-d .filter-input-panel .upload-container-modern,
body.tool-ui-d .filter-input-panel .upload-container-modern.td-upload {
    flex: 1 1 auto !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

body.tool-ui-d .filter-input-panel .upload-box-modern,
body.tool-ui-d .filter-input-panel .td-upload {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 260px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    transform: none !important;
    overflow: visible !important;
}

body.tool-ui-d .filter-input-panel .upload-box-modern::before {
    display: none !important;
}

body.tool-ui-d .filter-input-panel .upload-box-modern:hover,
body.tool-ui-d .filter-input-panel .upload-box-modern.drag-over {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

body.tool-ui-d .filter-input-panel .upload-content-modern {
    width: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 16px;
    outline: 1.5px dashed rgba(103, 232, 249, 0.38);
    outline-offset: -1px;
    background: rgba(8, 14, 26, 0.35);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.08);
    transition: outline-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.tool-ui-d .filter-input-panel .upload-box-modern:hover .upload-content-modern,
body.tool-ui-d .filter-input-panel .upload-box-modern.drag-over .upload-content-modern {
    outline-color: rgba(103, 232, 249, 0.72);
    background: rgba(103, 232, 249, 0.06);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.16);
}

body.tool-ui-d .filter-input-panel .upload-content-modern,
body.tool-ui-d .filter-input-panel .upload-preview-modern {
    width: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.85rem;
    border: none;
    border-radius: 16px;
    outline: 1.5px dashed rgba(103, 232, 249, 0.38);
    outline-offset: -1px;
    background: rgba(8, 14, 26, 0.35);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.08);
    box-sizing: border-box;
}

/* Single-upload preview only — face-swap dual uploads use .has-preview rules above */
body.tool-ui-d .filter-input-panel .upload-section .upload-preview-modern,
body.tool-ui-d .filter-input-panel .upload-box-modern:not(.has-preview) > .upload-preview-modern {
    display: none;
}

body.tool-ui-d .filter-input-panel .upload-section .upload-box-modern.has-preview .upload-preview-modern,
body.tool-ui-d .filter-input-panel .upload-box-modern.has-preview > .upload-preview-modern,
body.tool-ui-d .filter-input-panel .upload-preview-modern[style*="display: block"] {
    display: flex !important;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    max-width: none !important;
    margin: 0 !important;
}

body.tool-ui-d .filter-input-panel .upload-preview-modern .preview-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    position: relative;
}

body.tool-ui-d .filter-input-panel .upload-preview-modern .preview-image-wrapper img {
    width: auto;
    max-width: 100%;
    max-height: calc(260px - 1.7rem);
    height: auto;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
    box-shadow: none;
    border-radius: 12px;
}

body.tool-ui-d .filter-input-panel .upload-preview-modern .remove-image-modern {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
}

/* Face swap dual uploads — equal 50/50 columns (override single-upload panel rules above) */
body.tool-ui-d .filter-input-panel .face-swap-uploads .upload-box-modern {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.tool-ui-d .filter-input-panel .face-swap-uploads .upload-content-modern,
body.tool-ui-d .filter-input-panel .face-swap-uploads .upload-preview-modern {
    min-height: 200px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Video face swap — slot workspace (no media preview) */
body.tool-ui-d .vfs-studio {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    background: linear-gradient(165deg, rgba(8, 16, 32, 0.92) 0%, rgba(12, 22, 42, 0.78) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

body.tool-ui-d .vfs-studio-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(103, 232, 249, 0.12);
    background: rgba(6, 12, 24, 0.55);
}

body.tool-ui-d .vfs-studio-live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

body.tool-ui-d .vfs-studio-live svg {
    color: #4ade80;
    flex-shrink: 0;
}

body.tool-ui-d .vfs-studio-chip {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.65);
    color: #94a3b8;
    white-space: nowrap;
}

body.tool-ui-d .vfs-studio-chip.is-partial {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fcd34d;
    background: rgba(120, 53, 15, 0.35);
}

body.tool-ui-d .vfs-studio-chip.is-ready {
    border-color: rgba(74, 222, 128, 0.45);
    color: #86efac;
    background: rgba(20, 83, 45, 0.35);
}

body.tool-ui-d .vfs-studio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.85rem;
    align-items: stretch;
}

body.tool-ui-d .vfs-studio-bridge {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(103, 232, 249, 0.55);
    padding: 0 0.15rem;
}

body.tool-ui-d .vfs-slot {
    position: relative;
    min-height: 168px;
    border-radius: 14px;
    border: 1.5px dashed rgba(103, 232, 249, 0.32);
    background: rgba(8, 14, 26, 0.45);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    overflow: hidden;
}

body.tool-ui-d .vfs-slot:hover,
body.tool-ui-d .vfs-slot.is-dragover {
    border-color: rgba(103, 232, 249, 0.72);
    background: rgba(103, 232, 249, 0.06);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.14);
}

body.tool-ui-d .vfs-slot.is-filled {
    border-style: solid;
    border-color: rgba(74, 222, 128, 0.42);
    background: linear-gradient(145deg, rgba(20, 83, 45, 0.18) 0%, rgba(8, 14, 26, 0.55) 100%);
    cursor: default;
}

body.tool-ui-d .vfs-slot-step {
    position: absolute;
    top: 0.55rem;
    left: 0.6rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: rgba(103, 232, 249, 0.55);
}

body.tool-ui-d .vfs-slot-empty,
body.tool-ui-d .vfs-slot-filled {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 168px;
    padding: 1.35rem 0.85rem 0.85rem;
    box-sizing: border-box;
}

body.tool-ui-d .vfs-slot-filled {
    gap: 0.55rem;
}

body.tool-ui-d .vfs-slot-filled[hidden],
body.tool-ui-d .vfs-slot.is-filled .vfs-slot-empty {
    display: none !important;
}

body.tool-ui-d .vfs-slot.is-filled .vfs-slot-filled {
    display: flex !important;
}

body.tool-ui-d .vfs-slot-icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.55rem;
}

body.tool-ui-d .vfs-slot-icon--video {
    background: rgba(56, 189, 248, 0.12);
    color: #67e8f9;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22);
}

body.tool-ui-d .vfs-slot-icon--face {
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.22);
}

body.tool-ui-d .vfs-slot-title {
    margin: 0 0 0.25rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
}

body.tool-ui-d .vfs-slot-hint {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

body.tool-ui-d .vfs-slot-formats {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(148, 163, 184, 0.85);
    text-transform: uppercase;
}

body.tool-ui-d .vfs-slot-check {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.28);
}

body.tool-ui-d .vfs-slot-file {
    min-width: 0;
    max-width: 100%;
}

body.tool-ui-d .vfs-slot-file strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

body.tool-ui-d .vfs-slot-file span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: #94a3b8;
}

body.tool-ui-d .vfs-slot-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

body.tool-ui-d .vfs-slot-change,
body.tool-ui-d .vfs-slot-clear {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    transition: background 0.15s ease, color 0.15s ease;
}

body.tool-ui-d .vfs-slot-change {
    color: #67e8f9;
    background: rgba(56, 189, 248, 0.12);
}

body.tool-ui-d .vfs-slot-change:hover {
    background: rgba(56, 189, 248, 0.22);
}

body.tool-ui-d .vfs-slot-clear {
    width: 28px;
    height: 28px;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
}

body.tool-ui-d .vfs-slot-clear:hover {
    background: rgba(239, 68, 68, 0.28);
}

@media (max-width: 720px) {
    body.tool-ui-d .vfs-studio-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    body.tool-ui-d .vfs-studio-bridge {
        transform: rotate(90deg);
        padding: 0;
    }
}

body.tool-ui-d .filter-output-panel .output-content-wrapper {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

body.tool-ui-d .filter-output-panel .output-content-wrapper.td-canvas {
    border: none !important;
    background: transparent !important;
    min-height: 0 !important;
    padding: 0 !important;
}

body.tool-ui-d .filter-output-panel #output,
body.tool-ui-d .filter-output-panel .output-container.td-canvas {
    flex: 0 0 auto;
    width: 100%;
    min-height: 260px;
    max-height: 260px;
    border: none;
    border-radius: 16px;
    outline: 1.5px dashed rgba(148, 163, 184, 0.28);
    outline-offset: -1px;
    background: rgba(8, 14, 26, 0.35);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

body.tool-ui-d .filter-output-panel #output.td-has-result,
body.tool-ui-d .filter-output-panel .output-container.td-has-result {
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    outline: 1.5px solid rgba(163, 230, 53, 0.28) !important;
    outline-offset: -1px;
    background:
        linear-gradient(45deg, #111827 25%, transparent 25%),
        linear-gradient(-45deg, #111827 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #111827 75%),
        linear-gradient(-45deg, transparent 75%, #111827 75%),
        #0b1220 !important;
    background-size: 18px 18px !important;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0 !important;
    justify-content: flex-start !important;
    padding: 1rem !important;
    display: flex !important;
    flex-direction: column !important;
}

body.tool-ui-d .filter-output-panel .cp-result,
body.tool-ui-d .filter-output-panel .cp-result-grid {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.tool-ui-d .filter-output-panel .cp-result-grid {
    justify-content: flex-start;
    align-content: start;
}

body.tool-ui-d .filter-output-panel .cp-result-frame,
body.tool-ui-d .filter-output-panel .result-image.cp-result-frame,
body.tool-ui-d .filter-output-panel .cp-result-grid .cp-result-frame {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    width: 100%;
}

body.tool-ui-d .filter-output-panel .cp-result-img,
body.tool-ui-d .filter-output-panel .cp-result-media img {
    max-height: min(360px, 50vh);
    box-shadow: none;
}

body.tool-ui-d .filter-output-panel .cp-result-actions {
    width: 100%;
    flex-shrink: 0;
    order: 10;
    position: static !important;
    margin-top: 0.85rem !important;
    padding-top: 0 !important;
}

body.tool-ui-d .filter-output-panel .cp-result-grid .cp-result {
    min-width: 0;
}

body.tool-ui-d .filter-output-panel .cp-result-grid .cp-result-actions {
    margin-top: 0.65rem !important;
    padding-top: 0 !important;
}

/* Upload */
body.tool-ui-d .upload-box-modern,
body.tool-ui-d .upload-container-modern,
body.tool-ui-d .td-upload,
body.tool-ui-d .image-upload-area {
    background: rgba(8, 14, 26, 0.55) !important;
    border: 1.5px dashed rgba(103, 232, 249, 0.35) !important;
    border-radius: 16px !important;
    min-height: 160px !important;
    flex: 0 0 auto !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.25rem !important;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

body.tool-ui-d .upload-box-modern:hover,
body.tool-ui-d .td-upload:hover,
body.tool-ui-d .upload-box-modern.drag-over {
    border-color: var(--td-accent) !important;
    background: rgba(163, 230, 53, 0.06) !important;
    transform: translateY(-1px);
}

body.tool-ui-d .upload-icon-modern {
    width: 2.5rem !important;
    height: 2.5rem !important;
    padding: 0.55rem !important;
    border-radius: 999px !important;
    background: rgba(103, 232, 249, 0.12) !important;
    color: #67e8f9 !important;
    stroke: #67e8f9 !important;
    box-sizing: content-box !important;
}

body.tool-ui-d .upload-icon-pulse {
    display: none !important;
}

body.tool-ui-d .upload-title-modern,
body.tool-ui-d .upload-content-modern h3 {
    color: #f8fafc !important;
    font-size: 0.95rem !important;
    font-weight: 750 !important;
    margin: 0.55rem 0 0.2rem !important;
}

body.tool-ui-d .upload-description-modern,
body.tool-ui-d .upload-content-modern p {
    color: var(--td-muted) !important;
    font-size: 0.8rem !important;
}

body.tool-ui-d .td-tip {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    background: rgba(163, 230, 53, 0.08);
    border: 1px solid rgba(163, 230, 53, 0.2);
    color: #d9f99d;
    font-size: 0.78rem;
    font-weight: 650;
}

body.tool-ui-d .td-tip p {
    margin: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
}

/* Output */
body.tool-ui-d .output-title-wrapper,
body.tool-ui-d .output-title {
    display: none !important;
}

body.tool-ui-d .filter-output-panel .output-content-wrapper,
body.tool-ui-d .filter-output-panel .output-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    flex: 0 0 auto !important;
}

body.tool-ui-d .filter-output-panel #output:not(.td-has-result),
body.tool-ui-d .filter-output-panel .output-container.td-canvas:not(.td-has-result) {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 260px !important;
    max-height: 260px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

body.tool-ui-d .filter-output-panel #output .output-placeholder,
body.tool-ui-d .filter-output-panel #output .bg-batch-status {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
}

body.tool-ui-d .filter-output-panel #output .output-placeholder h3,
body.tool-ui-d .filter-output-panel #output .output-placeholder p {
    margin-left: auto !important;
    margin-right: auto !important;
}

body.tool-ui-d .filter-output-panel #output .output-placeholder svg {
    display: block !important;
    margin: 0 auto 0.75rem !important;
}

body.tool-ui-d .output-placeholder {
    min-height: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

body.tool-ui-d .output-placeholder h3 {
    color: #e2e8f0 !important;
    font-size: 0.95rem !important;
    margin: 0.5rem 0 0.2rem !important;
}

body.tool-ui-d .output-placeholder p {
    color: #64748b !important;
    font-size: 0.8rem !important;
    max-width: 240px;
    margin: 0 auto !important;
}

body.tool-ui-d .output-placeholder svg {
    color: #67e8f9 !important;
    stroke: #67e8f9 !important;
    opacity: 0.7 !important;
}

body.tool-ui-d #output img,
body.tool-ui-d .td-canvas img {
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 12px;
}

/* Result card — dark studio preview (replaces white box) */
body.tool-ui-d #output .result-card,
body.tool-ui-d .td-canvas .result-card,
body.tool-ui-d .cp-result,
body.tool-ui-d .result-card.cp-result {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    animation: tdFadeIn 0.35s ease-out;
    position: static !important;
}

body.tool-ui-d #output .result-card::before,
body.tool-ui-d .td-canvas .result-card::before,
body.tool-ui-d .cp-result::before,
body.tool-ui-d .result-card.cp-result::before {
    display: none !important;
}

body.tool-ui-d #output .result-card:hover,
body.tool-ui-d .td-canvas .result-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

body.tool-ui-d #output .result-card img,
body.tool-ui-d .td-canvas .result-card img {
    margin: 0 !important;
}

body.tool-ui-d .cp-result-frame,
body.tool-ui-d .result-image.cp-result-frame {
    position: relative;
    width: 100%;
    min-height: 220px;
    padding: 0.85rem !important;
    border-radius: 16px !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    background:
        linear-gradient(45deg, #111827 25%, transparent 25%),
        linear-gradient(-45deg, #111827 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #111827 75%),
        linear-gradient(-45deg, transparent 75%, #111827 75%),
        #0b1220 !important;
    background-size: 18px 18px !important;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.tool-ui-d.td-var-cutout .cp-result-frame,
body.tool-ui-d.td-var-cutout .result-image.cp-result-frame {
    border-color: rgba(163, 230, 53, 0.22) !important;
    box-shadow: inset 0 0 0 1px rgba(163, 230, 53, 0.08) !important;
}

body.tool-ui-d .cp-result-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

body.tool-ui-d .cp-result-img,
body.tool-ui-d .cp-result-video,
body.tool-ui-d .cp-result-media img,
body.tool-ui-d .cp-result-media video {
    display: block;
    max-width: 100%;
    max-height: min(420px, 58vh);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    margin: 0 auto !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

body.tool-ui-d .cp-result-shield {
    position: absolute;
    inset: 0;
    z-index: 2;
}

body.tool-ui-d .cp-result-actions,
body.tool-ui-d .result-actions.cp-result-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.9rem !important;
    padding-top: 0.15rem;
}

body.tool-ui-d .cp-result-download,
body.tool-ui-d .cp-result-actions .btnx,
body.tool-ui-d #output .result-actions .btnx {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: min(100%, 220px);
    padding: 0.72rem 1.25rem !important;
    font-weight: 800 !important;
    font-size: 0.88rem !important;
    text-decoration: none !important;
    background: #22c55e !important;
    color: #fff !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.28) !important;
}

body.tool-ui-d .cp-result-download:hover,
body.tool-ui-d .cp-result-actions .btnx:hover,
body.tool-ui-d #output .result-actions .btnx:hover {
    background: #16a34a !important;
    color: #fff !important;
    transform: translateY(-1px);
}

body.tool-ui-d .cp-result-download svg,
body.tool-ui-d .cp-result-actions .btnx svg {
    flex-shrink: 0;
}

body.tool-ui-d #output.td-has-result,
body.tool-ui-d .td-canvas.td-has-result,
body.tool-ui-d .output-container.td-has-result {
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow: visible !important;
}

body.tool-ui-d #output center,
body.tool-ui-d .td-canvas center {
    width: 100%;
}

@keyframes tdFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Background remover — multi upload + batch results */
body.tool-ui-d .bg-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.55rem;
    width: 100%;
}

body.tool-ui-d .bg-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #0f172a;
}

body.tool-ui-d .bg-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.tool-ui-d .bg-preview-item .remove-image-modern {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #e2e8f0;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}

body.tool-ui-d .bg-add-more {
    margin-top: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px dashed rgba(103, 232, 249, 0.35);
    background: rgba(15, 23, 42, 0.55);
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

body.tool-ui-d .cp-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
    width: 100%;
}

body.tool-ui-d .cp-result-grid .cp-result {
    min-width: 0;
}

body.tool-ui-d .cp-result-grid .cp-result-img {
    max-height: min(280px, 42vh);
}

body.tool-ui-d .bg-batch-status {
    margin-top: 1rem;
    min-height: 140px !important;
}

body.tool-ui-d .cp-result-error {
    padding: 1rem !important;
    border: 1px solid rgba(248, 113, 113, 0.25) !important;
    border-radius: 12px !important;
    background: rgba(127, 29, 29, 0.15) !important;
}

body.tool-ui-d .cp-result-error .error-message {
    color: #fca5a5 !important;
    margin: 0 !important;
}

/* Controls */
body.tool-ui-d label,
body.tool-ui-d .form-label,
body.tool-ui-d .option-label,
body.tool-ui-d .scale-title,
body.tool-ui-d .section-subtitle {
    color: #cbd5e1 !important;
    font-weight: 700 !important;
}

body.tool-ui-d .selection-section {
    margin-top: 14px !important;
}

body.tool-ui-d .selection-btn {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #94a3b8 !important;
    border-radius: 999px !important;
    padding: 10px 18px !important;
}

body.tool-ui-d .selection-btn:hover {
    border-color: #67e8f9 !important;
    color: #e2e8f0 !important;
    background: rgba(15, 23, 42, 0.95) !important;
}

body.tool-ui-d .selection-btn.active {
    background: linear-gradient(135deg, #a3e635 0%, #67e8f9 100%) !important;
    border-color: transparent !important;
    color: #0b1220 !important;
    box-shadow: 0 4px 14px rgba(163, 230, 53, 0.25) !important;
}

body.tool-ui-d input[type="text"],
body.tool-ui-d input[type="number"],
body.tool-ui-d textarea,
body.tool-ui-d select,
body.tool-ui-d .prompt-textarea,
body.tool-ui-d .custom-dropdown-trigger {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 12px !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

body.tool-ui-d .custom-dropdown-trigger .dropdown-selected {
    flex: 1 1 auto;
    min-width: 0;
}

body.tool-ui-d .custom-dropdown-trigger .dropdown-arrow {
    flex-shrink: 0;
    margin-left: 12px;
    color: #67e8f9 !important;
    stroke: #67e8f9 !important;
    opacity: 1 !important;
    display: block !important;
    transition: transform 0.2s ease;
}

body.tool-ui-d .custom-dropdown.active .custom-dropdown-trigger .dropdown-arrow {
    transform: rotate(180deg);
}

body.tool-ui-d .custom-dropdown.active .custom-dropdown-trigger {
    border-color: #67e8f9 !important;
    box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.12) !important;
}

body.tool-ui-d input:focus,
body.tool-ui-d textarea:focus,
body.tool-ui-d select:focus {
    border-color: #67e8f9 !important;
    box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.12) !important;
    outline: none !important;
}

body.tool-ui-d .btn-generate,
body.tool-ui-d .td-run,
body.tool-ui-d button.btn-generate,
body.tool-ui-d .process-btn {
    background: linear-gradient(135deg, #a3e635, #84cc16) !important;
    color: #052e16 !important;
    border: none !important;
    border-radius: 999px !important;
    font: 800 0.9rem/1 "Plus Jakarta Sans", sans-serif !important;
    padding: 0.9rem 1.25rem !important;
    min-height: 48px !important;
    width: 100% !important;
    box-shadow: 0 10px 24px rgba(163, 230, 53, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
}

body.tool-ui-d .btn-generate:hover:not(:disabled),
body.tool-ui-d .td-run:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

body.tool-ui-d .btn-generate:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

body.tool-ui-d .btn-download,
body.tool-ui-d .btn-download-modern,
body.tool-ui-d .download-btn,
body.tool-ui-d .btnx {
    background: #67e8f9 !important;
    color: #082f49 !important;
    border-radius: 999px !important;
    border: none !important;
}

/* Output download buttons — green (overrides generic .btnx cyan above) */
body.tool-ui-d #output .cp-result-download,
body.tool-ui-d #output .download-btn,
body.tool-ui-d #output .btnx,
body.tool-ui-d #output .result-actions .btnx,
body.tool-ui-d #output .result-actions a,
body.tool-ui-d .filter-output-panel .cp-result-download,
body.tool-ui-d .filter-output-panel .download-btn,
body.tool-ui-d .filter-output-panel .cp-result-actions .btnx,
body.tool-ui-d .filter-output-panel .result-actions .btnx,
body.tool-ui-d .cp-result-download,
body.tool-ui-d .cp-result-actions .btnx {
    background: #22c55e !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.28) !important;
}

body.tool-ui-d #output .cp-result-download:hover,
body.tool-ui-d #output .download-btn:hover,
body.tool-ui-d #output .btnx:hover,
body.tool-ui-d #output .result-actions .btnx:hover,
body.tool-ui-d #output .result-actions a:hover,
body.tool-ui-d .filter-output-panel .cp-result-download:hover,
body.tool-ui-d .filter-output-panel .download-btn:hover,
body.tool-ui-d .filter-output-panel .cp-result-actions .btnx:hover,
body.tool-ui-d .filter-output-panel .result-actions .btnx:hover,
body.tool-ui-d .cp-result-download:hover,
body.tool-ui-d .cp-result-actions .btnx:hover {
    background: #16a34a !important;
    color: #fff !important;
}

/*
 * Authoritative result-preview layout. Matches on either the JS-applied
 * .td-has-result class or :has(.cp-result), so a result is never left with the
 * idle placeholder styling (centred flex + 260px cap) that made tall previews
 * overflow across the panel header.
 */
body.tool-ui-d .filter-output-panel {
    overflow: visible !important;
}

body.tool-ui-d .filter-output-panel .td-panel-head {
    width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto !important;
    z-index: 5;
}

body.tool-ui-d .filter-output-panel .output-content-wrapper,
body.tool-ui-d .filter-output-panel :is(#output, .output-container):is(.td-has-result, :has(.cp-result), :has(.prompt-result-card)) {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    overflow: visible !important;
}

body.tool-ui-d .filter-output-panel :is(#output, .output-container):is(.td-has-result, :has(.prompt-result-card)) .prompt-result-card {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
}

body.tool-ui-d .filter-output-panel :is(#output, .output-container):is(.td-has-result, :has(.cp-result)) .cp-result {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

body.tool-ui-d .filter-output-panel :is(#output, .output-container):is(.td-has-result, :has(.cp-result)) .cp-result-frame {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0.75rem !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(163, 230, 53, 0.22) !important;
    border-radius: 16px !important;
}

body.tool-ui-d .filter-output-panel :is(#output, .output-container):is(.td-has-result, :has(.cp-result)) .cp-result-media {
    display: flex !important;
    position: relative !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
}

body.tool-ui-d .filter-output-panel :is(#output, .output-container):is(.td-has-result, :has(.cp-result)) :is(.cp-result-img, .cp-result-video, .cp-result-media img, .cp-result-media video) {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 280px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    border-radius: 10px !important;
}

body.tool-ui-d .filter-output-panel :is(#output, .output-container):is(.td-has-result, :has(.cp-result)) .cp-result-actions {
    display: flex !important;
    position: static !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    margin: 0.85rem 0 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.tool-ui-d .filter-output-panel :is(#output, .output-container):is(.td-has-result, :has(.cp-result)) :is(.cp-result-actions .btnx, .cp-result-download) {
    display: inline-flex !important;
    width: auto !important;
    min-width: 220px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.tool-ui-d .btn-reset,
body.tool-ui-d .btn-secondary-modern {
    background: rgba(148, 163, 184, 0.1) !important;
    color: #e2e8f0 !important;
    border: 1px solid var(--td-line) !important;
    border-radius: 999px !important;
}

/* Variant accents */
body.tool-ui-d.td-tone-ocean .btn-generate,
body.tool-ui-d.td-tone-ocean .td-run {
    background: linear-gradient(135deg, #22d3ee, #38bdf8) !important;
    color: #082f49 !important;
    box-shadow: 0 10px 24px rgba(34, 211, 238, 0.28) !important;
}
body.tool-ui-d.td-tone-coral .btn-generate,
body.tool-ui-d.td-tone-coral .td-run {
    background: linear-gradient(135deg, #fb7185, #f43f5e) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.28) !important;
}
body.tool-ui-d.td-tone-amber .btn-generate,
body.tool-ui-d.td-tone-amber .td-run {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: #451a03 !important;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28) !important;
}
body.tool-ui-d.td-tone-violet .btn-generate,
body.tool-ui-d.td-tone-violet .td-run {
    background: linear-gradient(135deg, #a78bfa, #818cf8) !important;
    color: #1e1b4b !important;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.28) !important;
}

body.tool-ui-d.td-var-cutout .td-badge { color: #a3e635; background: rgba(163,230,53,0.12); border-color: rgba(163,230,53,0.28); }
body.tool-ui-d.td-var-generate .td-badge { color: #c4b5fd; background: rgba(167,139,250,0.14); border-color: rgba(167,139,250,0.35); }
body.tool-ui-d.td-var-mask .td-badge { color: #5eead4; background: rgba(45,212,191,0.12); border-color: rgba(45,212,191,0.3); }
body.tool-ui-d.td-var-video .td-badge { color: #93c5fd; background: rgba(96,165,250,0.14); border-color: rgba(96,165,250,0.35); }
body.tool-ui-d.td-var-audio .td-badge { color: #6ee7b7; background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.3); }
body.tool-ui-d.td-var-filter .td-badge { color: #fda4af; background: rgba(251,113,133,0.12); border-color: rgba(251,113,133,0.3); }

/* Below content */
body.tool-ui-d .feature-showcase-section,
body.tool-ui-d .faq,
body.tool-ui-d .content-section,
body.tool-ui-d .td-below {
    background: transparent !important;
    color: #e2e8f0 !important;
}

body.tool-ui-d .feature-showcase-section h2,
body.tool-ui-d .faq h2,
body.tool-ui-d .content-section h2 {
    color: #f8fafc !important;
}

body.tool-ui-d .faq-item,
body.tool-ui-d .faq-question {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid var(--td-line) !important;
    color: #e2e8f0 !important;
    border-radius: 14px !important;
}

body.tool-ui-d .faq-answer {
    color: var(--td-muted) !important;
}

body.tool-ui-d .footer {
    background: #020617 !important;
    color: #94a3b8 !important;
}

/* Background remover — SEO guide + unique FAQ */
body.tool-ui-d .bg-seo-wrap {
    padding: 2.5rem 0 1.5rem;
}

body.tool-ui-d .bg-seo-article {
    max-width: 780px;
    margin: 0 auto;
}

body.tool-ui-d .bg-seo-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #67e8f9;
    margin: 0 0 0.65rem;
}

body.tool-ui-d .bg-seo-title {
    font-family: Sora, "Plus Jakarta Sans", sans-serif !important;
    font-size: clamp(1.6rem, 3vw, 2.2rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.04em !important;
    line-height: 1.12 !important;
    color: #f8fafc !important;
    margin: 0 0 1rem;
}

body.tool-ui-d .bg-seo-title span {
    background: linear-gradient(110deg, #67e8f9, #a3e635) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

body.tool-ui-d .bg-faq-head h2 {
    font-family: Sora, "Plus Jakarta Sans", sans-serif !important;
    font-size: clamp(1.35rem, 2.2vw, 1.65rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: #f8fafc;
    margin: 0 0 0.5rem;
}

body.tool-ui-d .bg-seo-lead {
    font-size: 1.02rem;
    line-height: 1.75;
    color: #cbd5e1;
    margin: 0 0 1.5rem;
}

body.tool-ui-d .bg-seo-article h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #e2e8f0;
    margin: 1.75rem 0 0.55rem;
}

body.tool-ui-d .bg-seo-article p {
    font-size: 0.94rem;
    line-height: 1.75;
    color: #94a3b8;
    margin: 0 0 0.85rem;
}

body.tool-ui-d .bg-seo-article strong {
    color: #e2e8f0;
    font-weight: 700;
}

body.tool-ui-d .bg-seo-list {
    margin: 0 0 1rem;
    padding-left: 1.15rem;
    color: #94a3b8;
    font-size: 0.94rem;
    line-height: 1.7;
}

body.tool-ui-d .bg-seo-list li {
    margin-bottom: 0.35rem;
}

body.tool-ui-d .bg-seo-cta {
    margin-top: 1.5rem !important;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(103, 232, 249, 0.25);
    background: rgba(103, 232, 249, 0.06);
    color: #cbd5e1 !important;
}

body.tool-ui-d .bg-seo-cta a {
    color: #67e8f9;
    font-weight: 700;
    text-decoration: none;
}

body.tool-ui-d .bg-seo-cta a:hover {
    text-decoration: underline;
}

body.tool-ui-d .bg-seo-article a {
    color: #67e8f9;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(103, 232, 249, 0.35);
}

body.tool-ui-d .bg-seo-article a:hover {
    color: #a3e635;
    border-bottom-color: rgba(163, 230, 53, 0.55);
}

body.tool-ui-d .bg-related {
    padding: 1.5rem 0 2.5rem;
}

body.tool-ui-d .bg-related-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 1.35rem;
}

body.tool-ui-d .bg-related-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #67e8f9;
    background: rgba(103, 232, 249, 0.1);
    border: 1px solid rgba(103, 232, 249, 0.28);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    margin-bottom: 0.6rem;
}

body.tool-ui-d .bg-related-head h2 {
    font-family: Sora, "Plus Jakarta Sans", sans-serif !important;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: #f8fafc !important;
    margin: 0 0 0.45rem;
}

body.tool-ui-d .bg-related-head p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

body.tool-ui-d .bg-related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

body.tool-ui-d .bg-related-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(11, 18, 32, 0.85);
    text-decoration: none !important;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

body.tool-ui-d .bg-related-card:hover {
    border-color: rgba(103, 232, 249, 0.4);
    background: rgba(15, 23, 42, 0.95);
    transform: translateY(-2px);
}

body.tool-ui-d .bg-related-card strong {
    color: #f1f5f9;
    font-size: 0.9rem;
    font-weight: 800;
}

body.tool-ui-d .bg-related-card span {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.45;
}

@media (max-width: 900px) {
    body.tool-ui-d .bg-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    body.tool-ui-d .bg-related-grid {
        grid-template-columns: 1fr;
    }
}

body.tool-ui-d .bg-seo-faq {
    padding: 2rem 0 3rem;
}

body.tool-ui-d .bg-faq-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 1.75rem;
}

body.tool-ui-d .bg-faq-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a3e635;
    background: rgba(163, 230, 53, 0.12);
    border: 1px solid rgba(163, 230, 53, 0.28);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    margin-bottom: 0.65rem;
}

body.tool-ui-d .bg-faq-head p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

body.tool-ui-d .bg-faq-panels {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: 820px;
    margin: 0 auto;
}

body.tool-ui-d .bg-faq-panel {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    background: rgba(11, 18, 32, 0.85);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.tool-ui-d .bg-faq-panel.is-open,
body.tool-ui-d .bg-faq-panel[open] {
    border-color: rgba(103, 232, 249, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

body.tool-ui-d .bg-faq-panel summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
}

body.tool-ui-d .bg-faq-panel summary::-webkit-details-marker {
    display: none;
}

body.tool-ui-d .bg-faq-panel summary::after {
    content: '+';
    margin-left: auto;
    font-size: 1.1rem;
    font-weight: 400;
    color: #67e8f9;
    line-height: 1;
}

body.tool-ui-d .bg-faq-panel[open] summary::after {
    content: '−';
}

body.tool-ui-d .bg-faq-num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(103, 232, 249, 0.12);
    color: #67e8f9;
    font-size: 0.72rem;
    font-weight: 800;
}

body.tool-ui-d .bg-faq-panel.is-open .bg-faq-num,
body.tool-ui-d .bg-faq-panel[open] .bg-faq-num {
    background: rgba(163, 230, 53, 0.15);
    color: #a3e635;
}

body.tool-ui-d .bg-faq-body {
    padding: 0 1.1rem 1rem 3.85rem;
}

body.tool-ui-d .bg-faq-body p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #94a3b8;
}

body.tool-ui-d .footer-link {
    color: #a3e635 !important;
}

body.tool-ui-d #scrollToTopBtn {
    position: fixed !important;
    left: auto !important;
    right: 24px !important;
    bottom: 24px !important;
    background: var(--td-accent) !important;
    color: #052e16 !important;
    z-index: 1100 !important;
}

body.tool-ui-d .swal2-popup {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid var(--td-line) !important;
    font-size: 1rem !important;
    width: auto !important;
    min-width: 18em !important;
    max-width: min(28em, 92vw) !important;
    padding: 1.25rem 1.15rem !important;
    border-radius: 14px !important;
}

body.tool-ui-d .swal2-title {
    color: #f1f5f9 !important;
    font-size: 1.2rem !important;
}

body.tool-ui-d .swal2-html-container,
body.tool-ui-d .swal2-content {
    color: #cbd5e1 !important;
    font-size: 0.9375rem !important;
}

body.tool-ui-d .td-mask-tools,
body.tool-ui-d .tools-section.td-mask-tools {
    border: 1px dashed rgba(45, 212, 191, 0.35) !important;
    background: rgba(45, 212, 191, 0.06) !important;
    border-radius: 12px !important;
    padding: 0.75rem !important;
}

@media (max-width: 900px) {
    body.tool-ui-d .td-hero-card {
        grid-template-columns: 1fr;
    }

    body.tool-ui-d .filter-layout,
    body.tool-ui-d .td-layout {
        grid-template-columns: 1fr !important;
    }

    body.tool-ui-d .td-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
