/* Ruptline · interfaz guiada temporal para herramientas */

/* El documento nunca se desplaza en una herramienta guiada: el único scroll
   pertenece al lienzo central. Así la navegación permanece siempre visible. */
html.has-rl-guided-tools,
html.has-rl-guided-tools body.has-rl-public-app {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.has-rl-guided-tools .rl-public-app.is-tools {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden !important;
}

body.has-rl-guided-tools .rl-public-app.is-tools .rl-app-surface {
    min-height: 0;
    max-height: calc(100dvh - 20px);
    overflow: hidden !important;
}

@media (min-width: 761px) {
    body.has-rl-guided-tools .rl-public-app.is-tools .site-app-rail {
        position: sticky;
        top: 0;
        align-self: start;
        height: 100dvh;
    }
}

/* Evita que la interfaz heredada aparezca antes de que JavaScript construya
   el recorrido guiado. El temporizador del head la recupera si JS falla. */
html.rl-guided-booting [data-image-compressor],
html.rl-guided-booting [data-image-converter],
html.rl-guided-booting [data-background-remover],
html.rl-guided-booting [data-qr-studio],
html.rl-guided-booting [data-whatsapp-link],
html.rl-guided-booting [data-ai-detector],
html.rl-guided-booting .rl-public-view > main.service-page {
    visibility: hidden !important;
}

.rl-public-app.is-tools .rl-app-scroll {
    height: auto;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scroll-padding-block: 18px;
    scrollbar-gutter: stable;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overflow-anchor: none;
}

.rl-public-app.is-tools .rl-public-view {
    min-height: 100%;
    overflow: visible !important;
}

.rl-guided-tool {
    --rl-guide-accent: #111111;
    --rl-guide-accent-rgb: 17, 17, 17;
    --rl-guide-signal-ink: #111111;
    --rl-guide-signal-green: #6f55f4;
    --rl-guide-signal-green-rgb: 111, 85, 244;
    min-height: 100% !important;
    color: var(--rl-app-text) !important;
    background: var(--rl-app-surface) !important;
    filter: none !important;
    letter-spacing: 0 !important;
}

html[data-ally-theme="dark"] .rl-guided-tool {
    --rl-guide-signal-ink: #f7f7f5;
    --rl-guide-signal-green: #a997ff;
    --rl-guide-signal-green-rgb: 169, 151, 255;
}

.rl-guided-tool [hidden] {
    display: none !important;
}

.rl-guided-tool[data-rl-guide-kind="converter"] {
    --rl-guide-accent: #6657d9;
    --rl-guide-accent-rgb: 102, 87, 217;
}

.rl-guided-tool[data-rl-guide-kind="background"] {
    --rl-guide-accent: #1677d2;
    --rl-guide-accent-rgb: 22, 119, 210;
}

.rl-guided-tool[data-rl-guide-kind="qr"] {
    --rl-guide-accent: #e65328;
    --rl-guide-accent-rgb: 230, 83, 40;
}

.rl-guided-tool[data-rl-guide-kind="whatsapp"] {
    --rl-guide-accent: #16a86b;
    --rl-guide-accent-rgb: 22, 168, 107;
}

.rl-guided-tool[data-rl-guide-kind="detector"] {
    --rl-guide-accent: #b34fb4;
    --rl-guide-accent-rgb: 179, 79, 180;
}

.rl-guided-tool[data-rl-guide-kind="disebo"] {
    --rl-guide-accent: #3757c8;
    --rl-guide-accent-rgb: 55, 87, 200;
}

.rl-guided-tool > .tool-hero,
.rl-guided-tool > .service-hero-section,
.rl-guided-tool .tool-side-column,
.rl-guided-tool .bg-processing-modal {
    display: none !important;
}

.rl-guided-tool .tool-workspace-section {
    padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 34px) 72px !important;
    color: var(--rl-app-text) !important;
    background: var(--rl-app-surface) !important;
}

.rl-guided-tool .tool-workspace-layout {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: block !important;
}

.rl-guided-tool .tool-main-column {
    width: 100%;
    min-width: 0;
}

.rl-guide-shell {
    width: min(100%, 860px);
    margin: 0 auto;
    color: var(--rl-app-text);
}

.rl-guide-heading {
    padding: clamp(14px, 2vw, 24px) 8px clamp(26px, 4vw, 42px);
}

.rl-guide-heading-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.rl-guide-eyebrow {
    margin: 0;
    color: var(--rl-app-muted);
    font-size: 10px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rl-guide-session {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid var(--rl-app-line);
    border-radius: 10px;
    color: var(--rl-app-muted);
    background: var(--rl-app-panel);
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.rl-guide-session:hover,
.rl-guide-session:focus-visible {
    color: var(--rl-app-text);
    border-color: var(--rl-app-line-strong);
    outline: none;
}

.rl-guide-heading h1 {
    max-width: 680px;
    margin: 13px 0 0;
    color: var(--rl-app-text) !important;
    font: inherit !important;
    font-size: clamp(24px, 3.2vw, 40px) !important;
    font-weight: 480 !important;
    line-height: 1.05 !important;
    letter-spacing: -0.04em !important;
}

.rl-guide-heading > p:last-child {
    max-width: 630px;
    margin: 13px 0 0;
    color: var(--rl-app-muted) !important;
    font-size: 13px;
    line-height: 1.55;
    letter-spacing: 0;
}

.rl-guide-progress {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.rl-guide-progress span {
    width: 24px;
    height: 3px;
    border-radius: 99px;
    background: var(--rl-app-line-strong);
    transition: width 220ms ease, background 220ms ease, opacity 220ms ease;
}

.rl-guide-progress span.is-active {
    width: 42px;
    background: var(--rl-guide-accent);
}

.rl-guide-feed,
.rl-guide-form-stream {
    display: grid;
    gap: 18px;
}

.rl-guide-form-stream {
    margin: 0;
}

.rl-guide-turn {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    animation: rlGuideIn 260ms ease both;
}

.rl-guide-turn[hidden] {
    display: none !important;
}

.rl-guide-avatar {
    width: 30px;
    height: 30px;
    margin-top: 3px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--rl-app-line);
    border-radius: 10px;
    color: var(--rl-app-text);
    background: var(--rl-app-panel);
    overflow: hidden;
}

.rl-guide-avatar img {
    width: 19px;
    height: 19px;
    display: block;
    object-fit: contain;
}

.rl-guide-message {
    min-width: 0;
    width: min(100%, 760px);
    padding: 17px;
    border: 1px solid var(--rl-app-line);
    border-radius: 5px 20px 20px 20px;
    color: var(--rl-app-text);
    background: var(--rl-app-panel);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.025);
}

.rl-guide-turn.is-user {
    justify-content: flex-end;
}

.rl-guide-turn.is-user .rl-guide-message {
    width: auto;
    max-width: min(78%, 590px);
    padding: 12px 14px;
    border-color: transparent;
    border-radius: 18px 5px 18px 18px;
    color: #ffffff;
    background: var(--rl-guide-accent);
}

.rl-guide-turn.is-user strong,
.rl-guide-turn.is-user small {
    color: inherit !important;
}

.rl-guide-message-head {
    margin-bottom: 14px;
}

.rl-guide-message-head strong {
    display: block;
    color: var(--rl-app-text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.rl-guide-message-head p {
    margin: 5px 0 0;
    color: var(--rl-app-muted);
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0;
}

.rl-guide-control {
    min-width: 0;
}

.rl-guide-file {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rl-guide-file img {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.15);
}

.rl-guide-file span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.rl-guide-file strong {
    max-width: 430px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rl-guide-file small {
    font-size: 9px;
    opacity: 0.74;
}

.rl-guide-turn .compressor-step,
.rl-guide-turn .converter-step,
.rl-guide-turn .bg-upload-panel,
.rl-guide-turn .bg-result-panel,
.rl-guide-turn .whatsapp-preview-panel,
.rl-guide-turn .qr-panel-block,
.rl-guide-turn .qr-preview-panel {
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.rl-guide-turn .compressor-step + .compressor-step,
.rl-guide-turn .converter-step + .converter-step {
    border-left: 0 !important;
}

.rl-guide-turn .step-heading,
.rl-guide-turn .qr-step-heading,
.rl-guide-turn .qr-preview-heading > div > span {
    display: none !important;
}

.rl-guide-turn .selected-file {
    display: none !important;
}

.rl-guide-turn .upload-dropzone,
.rl-guide-turn .bg-dropzone {
    min-height: 190px;
    border-radius: 17px;
}

.rl-guide-turn .tool-primary-button,
.rl-guide-turn .tool-secondary-button,
.rl-guide-next,
.rl-guide-choice,
.rl-guide-link {
    border-radius: 13px !important;
    font-family: inherit !important;
    letter-spacing: 0 !important;
}

.rl-guide-next {
    width: 100%;
    min-height: 46px;
    margin-top: 14px;
    padding: 0 16px;
    border: 0;
    color: #ffffff;
    background: var(--rl-guide-accent);
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: transform 160ms ease, opacity 160ms ease;
}

.rl-guide-next:hover,
.rl-guide-choice:hover,
.rl-guide-link:hover {
    transform: translateY(-1px);
}

.rl-guide-next:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
}

.rl-guide-inline-error {
    margin: 9px 0 0;
    color: #c34141;
    font-size: 10px;
    line-height: 1.4;
}

.rl-guide-processing .rl-guide-message {
    overflow: hidden;
}

.rl-guide-processing-row {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.rl-guide-processing-copy strong {
    display: block;
    color: var(--rl-app-text);
    font-size: 13px;
    font-weight: 650;
}

.rl-guide-processing-copy span {
    display: block;
    margin-top: 5px;
    color: var(--rl-app-muted);
    font-size: 10px;
    line-height: 1.4;
}

/* Trazo cognitivo Ruptline: siete fragmentos abiertos se dispersan, se ordenan
   en una línea precisa y vuelven a separarse. Es plano, fino y sin contenedor. */
.rl-guide-signal {
    position: relative;
    width: 76px;
    height: 26px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.rl-guide-thinking-line {
    position: relative;
    width: 76px;
    height: 26px;
    display: block;
    overflow: visible;
}

.rl-guide-thinking-line i {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--rl-fragment-width);
    height: 1.5px;
    display: block;
    border-radius: 99px;
    background: var(--rl-guide-signal-green);
    opacity: 0.42;
    transform: translate(var(--rl-start-x), var(--rl-start-y));
    animation: rlGuideThinkingFragment 3.8s cubic-bezier(0.42, 0, 0.2, 1) infinite;
    animation-delay: calc(var(--rl-fragment-index) * 34ms);
    will-change: transform, opacity;
}

.rl-guide-thinking-sweep {
    position: absolute;
    top: 12px;
    left: 0;
    width: 17px;
    height: 1.5px;
    display: block;
    border-radius: 99px;
    opacity: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #5ad7a1 52%,
        transparent 100%
    );
    animation: rlGuideThinkingSweep 3.8s ease-in-out infinite;
    will-change: transform, opacity;
}

@keyframes rlGuideThinkingFragment {
    0%,
    10%,
    100% {
        opacity: 0.38;
        transform: translate(var(--rl-start-x), var(--rl-start-y));
    }
    34%,
    58% {
        opacity: 0.76;
        transform: translate(var(--rl-align-x), 12px);
    }
    82% {
        opacity: 0.42;
        transform: translate(var(--rl-end-x), var(--rl-end-y));
    }
}

@keyframes rlGuideThinkingSweep {
    0%,
    32% {
        opacity: 0;
        transform: translateX(0);
    }
    38% {
        opacity: 0.9;
    }
    57% {
        opacity: 0.9;
        transform: translateX(56px);
    }
    63%,
    100% {
        opacity: 0;
        transform: translateX(56px);
    }
}

.rl-guide-privacy {
    margin: 25px 0 0 41px;
    padding: 13px 15px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border: 1px solid var(--rl-app-line);
    border-radius: 14px;
    color: var(--rl-app-muted);
    background: color-mix(in srgb, var(--rl-app-panel) 70%, transparent);
    font-size: 10px;
    line-height: 1.48;
}

.rl-guide-privacy svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rl-guide-more {
    width: min(100%, 860px);
    margin: 22px auto 0;
    border-top: 1px solid var(--rl-app-line);
}

.rl-guide-more > summary {
    min-height: 52px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--rl-app-muted);
    font-size: 11px;
    cursor: pointer;
    list-style: none;
}

.rl-guide-more > summary::-webkit-details-marker {
    display: none;
}

.rl-guide-more > summary::after {
    content: "+";
    color: var(--rl-app-text);
    font-size: 17px;
    font-weight: 350;
}

.rl-guide-more[open] > summary::after {
    content: "−";
}

.rl-guide-more-content {
    padding-top: 10px;
}

.rl-guide-more-content > * {
    margin-top: 18px !important;
}

.rl-guide-more-content .ad-section:first-child {
    margin-top: 0 !important;
}

.rl-guide-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.rl-guide-choice {
    min-height: 86px;
    padding: 14px;
    display: grid;
    align-content: space-between;
    gap: 18px;
    border: 1px solid var(--rl-app-line);
    color: var(--rl-app-text);
    background: var(--rl-app-soft);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.rl-guide-choice strong {
    font-size: 12px;
    font-weight: 650;
}

.rl-guide-choice span {
    color: var(--rl-app-muted);
    font-size: 10px;
    line-height: 1.4;
}

.rl-guide-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rl-guide-link {
    min-height: 40px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rl-app-line);
    color: var(--rl-app-text);
    background: var(--rl-app-soft);
    font-size: 10px;
    font-weight: 650;
}

.rl-guide-link.is-primary {
    border-color: var(--rl-guide-accent);
    color: #ffffff;
    background: var(--rl-guide-accent);
}

.rl-guide-turn .whatsapp-preview-panel {
    margin-top: 14px;
}

.rl-guide-turn .phone-mockup {
    margin-inline: auto;
}

.rl-guide-turn .qr-preview-card,
.rl-guide-turn .qr-studio-card,
.rl-guide-turn .whatsapp-card,
.rl-guide-turn .bg-remover-card,
.rl-guide-turn .compressor-card,
.rl-guide-turn .converter-card,
.rl-guide-turn .detector-card {
    box-shadow: none !important;
}

.rl-guide-turn .qr-control-panel,
.rl-guide-turn .qr-studio-card,
.rl-guide-turn .whatsapp-card,
.rl-guide-turn .compressor-card,
.rl-guide-turn .converter-card,
.rl-guide-turn .detector-card,
.rl-guide-turn .bg-remover-card {
    display: block !important;
    border: 0 !important;
    background: transparent !important;
}

.rl-guide-turn .qr-preview-card {
    position: static !important;
}

.rl-guide-turn .qr-panel-block {
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

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

/* Ruptline mobile native document scroll · no focus zoom */
@media (max-width: 760px) {
    html.has-rl-guided-tools {
        width: 100%;
        height: auto !important;
        min-height: 100%;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: auto;
        -webkit-text-size-adjust: 100%;
    }

    html.has-rl-guided-tools body.has-rl-public-app.has-rl-guided-tools {
        position: static !important;
        width: 100%;
        height: auto !important;
        min-height: 100%;
        padding: 0 0 calc(62px + env(safe-area-inset-bottom)) !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        overscroll-behavior-y: auto;
    }

    body.has-rl-guided-tools .rl-public-app.is-tools {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto !important;
        min-height: calc(100svh - 62px - env(safe-area-inset-bottom)) !important;
        max-height: none !important;
        display: block;
        overflow: visible !important;
    }

    body.has-rl-guided-tools .rl-public-app.is-tools .rl-app-surface {
        width: 100%;
        height: auto !important;
        min-height: calc(100svh - 62px - env(safe-area-inset-bottom));
        max-height: none !important;
        display: block;
        overflow: visible !important;
    }

    body.has-rl-guided-tools .rl-public-app.is-tools .rl-app-topbar {
        position: sticky;
        top: 0;
        z-index: 450;
        width: 100%;
        min-height: 58px;
        background: color-mix(in srgb, var(--rl-app-surface) 96%, transparent);
    }

    body.has-rl-guided-tools .rl-public-app.is-tools .site-app-rail {
        position: fixed !important;
        top: auto;
        bottom: 0 !important;
    }

    body.has-rl-guided-tools .rl-public-app.is-tools .rl-app-scroll {
        position: static;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        overscroll-behavior-y: auto;
        scroll-behavior: auto;
        scrollbar-gutter: auto;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        overflow-anchor: none;
    }

    body.has-rl-guided-tools .rl-public-app.is-tools .rl-public-view {
        min-height: 0;
        height: auto !important;
        overflow: visible !important;
    }

    .rl-guided-tool .tool-workspace-section {
        padding: 14px 12px calc(118px + env(safe-area-inset-bottom)) !important;
    }

    body.has-rl-guided-tools :is(
        input:not([type="range"]):not([type="color"]):not([type="checkbox"]):not([type="radio"]),
        textarea,
        select,
        [contenteditable="true"]
    ) {
        font-size: 16px !important;
    }

    body.has-rl-guided-tools :is(button, a, input, textarea, select, label) {
        touch-action: manipulation;
    }

    .rl-guide-heading {
        padding-inline: 4px;
    }

    .rl-guide-heading-top {
        align-items: flex-start;
    }

    .rl-guide-heading h1 {
        font-size: clamp(22px, 8vw, 31px) !important;
    }

    .rl-guide-turn {
        gap: 7px;
    }

    .rl-guide-avatar {
        width: 27px;
        height: 27px;
        border-radius: 9px;
    }

    .rl-guide-avatar img {
        width: 17px;
        height: 17px;
    }

    .rl-guide-message {
        padding: 14px;
        border-radius: 4px 16px 16px 16px;
    }

    .rl-guide-turn.is-user .rl-guide-message {
        max-width: 88%;
    }

    .rl-guide-privacy {
        margin-left: 34px;
    }

    .rl-guide-choice-grid {
        grid-template-columns: 1fr;
    }

    .rl-guide-processing-row {
        align-items: center;
        flex-direction: row;
        gap: 12px;
    }

    .rl-guide-signal {
        width: 70px;
        height: 25px;
    }

    .rl-guide-thinking-line {
        width: 76px;
        height: 26px;
        transform: scale(0.92);
        transform-origin: left center;
    }

    .rl-guide-turn .upload-dropzone,
    .rl-guide-turn .bg-dropzone {
        min-height: 160px;
    }

    .rl-guide-turn .bg-result-stage {
        min-height: 340px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rl-guide-turn {
        animation: none !important;
    }

    .rl-guide-thinking-line i,
    .rl-guide-thinking-sweep {
        animation: none !important;
    }

    .rl-guide-thinking-line i {
        opacity: 0.62;
        transform: translate(var(--rl-align-x), 12px);
    }

    .rl-guide-thinking-sweep {
        opacity: 0;
    }
}


/* RUPTLINE_BG_GUIDED_PAINT_CHAT_R18L_2 */
.rl-bg-guide-selection {
    display: grid;
    gap: 12px;
}
.rl-bg-guide-selection-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--rl-app-line);
    border-radius: 18px;
    background:
        linear-gradient(45deg, rgba(125,125,125,.07) 25%, transparent 25%) 0 0/20px 20px,
        linear-gradient(-45deg, rgba(125,125,125,.07) 25%, transparent 25%) 0 10px/20px 20px,
        linear-gradient(45deg, transparent 75%, rgba(125,125,125,.07) 75%) 10px -10px/20px 20px,
        linear-gradient(-45deg, transparent 75%, rgba(125,125,125,.07) 75%) -10px 0/20px 20px,
        var(--rl-app-panel);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.rl-bg-guide-selection-canvas {
    display: block;
    width: 100%;
    max-height: min(56vh, 620px);
    object-fit: contain;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.rl-bg-guide-selection-help {
    margin: 0;
    color: var(--rl-app-muted);
    font-size: 12px;
    line-height: 1.55;
}
.rl-bg-guide-selection-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.rl-bg-guide-selection-actions .tool-primary-button,
.rl-bg-guide-selection-actions .tool-secondary-button {
    min-height: 38px;
}
@media (max-width: 620px) {
    .rl-bg-guide-selection-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .rl-bg-guide-selection-actions .tool-primary-button {
        grid-column: 1 / -1;
    }
}


/* RUPTLINE_PRECISION_CHAT_R18M_2_CSS */
.rl-bg-precision{
    display:grid;
    gap:12px;
    min-width:0;
}

.rl-bg-precision__quality{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}

.rl-bg-mode-chip{
    display:grid;
    gap:2px;
    min-width:0;
    padding:11px 12px;
    border:1px solid var(--rl-app-line);
    border-radius:14px;
    background:var(--rl-app-panel);
    color:var(--rl-app-text);
    text-align:left;
    cursor:pointer;
}

.rl-bg-mode-chip strong{
    font-size:13px;
    line-height:1.15;
}

.rl-bg-mode-chip span{
    color:var(--rl-app-muted);
    font-size:11px;
}

.rl-bg-mode-chip.is-active{
    border-color:color-mix(in srgb,var(--rl-app-accent,#6f55f4) 58%,transparent);
    background:color-mix(in srgb,var(--rl-app-accent,#6f55f4) 9%,var(--rl-app-panel));
    box-shadow:0 0 0 3px color-mix(in srgb,var(--rl-app-accent,#6f55f4) 8%,transparent);
}

.rl-bg-precision__stage{
    position:relative;
    width:100%;
    min-height:280px;
    overflow:hidden;
    border:1px solid var(--rl-app-line);
    border-radius:18px;
    background:
        linear-gradient(45deg,rgba(125,125,125,.06) 25%,transparent 25%) 0 0/20px 20px,
        linear-gradient(-45deg,rgba(125,125,125,.06) 25%,transparent 25%) 0 10px/20px 20px,
        linear-gradient(45deg,transparent 75%,rgba(125,125,125,.06) 75%) 10px -10px/20px 20px,
        linear-gradient(-45deg,transparent 75%,rgba(125,125,125,.06) 75%) -10px 0/20px 20px,
        var(--rl-app-panel);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

.rl-bg-precision__canvas{
    display:block;
    width:100%;
    height:auto;
    min-height:280px;
    max-height:min(58vh,650px);
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
}

.rl-bg-precision__zoombar,
.rl-bg-precision__tools,
.rl-bg-precision__minor-actions,
.rl-bg-precision__actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:7px;
}

.rl-bg-precision__zoombar button,
.rl-bg-precision__minor-actions button{
    min-height:34px;
    padding:0 11px;
    border:1px solid var(--rl-app-line);
    border-radius:999px;
    background:var(--rl-app-panel);
    color:var(--rl-app-text);
    cursor:pointer;
}

.rl-bg-precision__zoombar span{
    min-width:54px;
    color:var(--rl-app-muted);
    font-size:12px;
    font-weight:700;
    text-align:center;
}

.rl-bg-tool-chip{
    min-height:36px;
    padding:0 13px;
    border:1px solid var(--rl-app-line);
    border-radius:999px;
    background:var(--rl-app-panel);
    color:var(--rl-app-text);
    cursor:pointer;
    font-size:12px;
    font-weight:700;
}

.rl-bg-tool-chip.is-active{
    border-color:color-mix(in srgb,var(--rl-app-accent,#6f55f4) 58%,transparent);
    background:color-mix(in srgb,var(--rl-app-accent,#6f55f4) 10%,var(--rl-app-panel));
    color:var(--rl-app-accent,#6f55f4);
}

.rl-bg-precision__brush{
    display:grid;
    grid-template-columns:auto minmax(100px,1fr) 36px;
    align-items:center;
    gap:10px;
    padding:9px 11px;
    border:1px solid var(--rl-app-line);
    border-radius:14px;
    background:var(--rl-app-panel);
    color:var(--rl-app-muted);
    font-size:12px;
    font-weight:650;
}

.rl-bg-precision__brush input{
    width:100%;
    touch-action:pan-x;
}

.rl-bg-precision__brush output{
    color:var(--rl-app-text);
    text-align:right;
    font-variant-numeric:tabular-nums;
}

.rl-bg-precision__help{
    margin:0;
    color:var(--rl-app-muted);
    font-size:12px;
    line-height:1.5;
}

.rl-bg-precision__actions .tool-primary-button,
.rl-bg-precision__actions .tool-secondary-button{
    min-height:40px;
}

.rl-bg-precision__actions .tool-primary-button{
    flex:1 1 210px;
}

/*
 * El selector R18L-3/R18L-4 ya no aparece fuera del chat.
 * Se conserva el código para compatibilidad, pero no se renderiza.
 */
[data-rl-bg-sam-ui],
.rl-bg-smart-selection-canvas{
    display:none !important;
    pointer-events:none !important;
}

@media(max-width:620px){
    .rl-bg-precision__quality{
        grid-template-columns:1fr 1fr;
    }

    .rl-bg-precision__canvas{
        min-height:250px;
        max-height:52vh;
    }

    .rl-bg-precision__tools{
        display:grid;
        grid-template-columns:1fr 1fr 1fr;
    }

    .rl-bg-tool-chip{
        padding:0 8px;
    }

    .rl-bg-precision__actions{
        display:grid;
        grid-template-columns:1fr;
    }
}


/* RUPTLINE_PRECISION_UX_R18M_3
   Refinamiento visual del Precision Engine.
   No modifica el algoritmo de segmentación.
*/

.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-turn:not(.is-user) .rl-guide-message{
    width:min(100%,820px);
    max-width:820px;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision{
    gap:10px;
}

.rl-bg-precision__quality{
    gap:9px;
}

.rl-bg-mode-chip{
    position:relative;
    min-height:76px;
    padding:12px 13px;
    gap:7px;
    border-radius:16px;
    transition:
        transform .16s ease,
        border-color .16s ease,
        background .16s ease,
        box-shadow .16s ease;
}

.rl-bg-mode-chip:hover{
    transform:translateY(-1px);
}

.rl-bg-mode-chip:active{
    transform:scale(.985);
}

.rl-bg-mode-chip:focus-visible,
.rl-bg-tool-chip:focus-visible,
.rl-bg-precision__zoombar button:focus-visible,
.rl-bg-precision__minor-actions button:focus-visible{
    outline:3px solid color-mix(in srgb,var(--rl-app-accent,#6f55f4) 24%,transparent);
    outline-offset:2px;
}

.rl-bg-mode-chip.is-active{
    border-color:color-mix(in srgb,var(--rl-app-accent,#6f55f4) 72%,transparent);
    background:
        linear-gradient(
            145deg,
            color-mix(in srgb,var(--rl-app-accent,#6f55f4) 13%,var(--rl-app-panel)),
            color-mix(in srgb,var(--rl-app-accent,#6f55f4) 5%,var(--rl-app-panel))
        );
    box-shadow:
        0 8px 26px color-mix(in srgb,var(--rl-app-accent,#6f55f4) 11%,transparent),
        inset 0 1px 0 rgba(255,255,255,.12);
}

.rl-bg-mode-chip__top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:7px;
}

.rl-bg-mode-chip__top strong{
    font-size:13px;
    letter-spacing:-.01em;
}

.rl-bg-mode-chip__desc{
    color:var(--rl-app-muted);
    font-size:11px;
    line-height:1.35;
}

.rl-bg-mode-chip__speed,
.rl-bg-mode-chip__recommended{
    display:inline-flex;
    align-items:center;
    min-height:21px;
    padding:0 7px;
    border-radius:999px;
    font-size:9.5px;
    font-weight:800;
    white-space:nowrap;
}

.rl-bg-mode-chip__speed{
    background:color-mix(in srgb,var(--rl-app-text) 6%,transparent);
    color:var(--rl-app-muted);
}

.rl-bg-mode-chip__recommended{
    background:var(--rl-app-accent,#6f55f4);
    color:#fff;
    box-shadow:0 5px 14px color-mix(in srgb,var(--rl-app-accent,#6f55f4) 24%,transparent);
}

.rl-bg-precision__legend{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px 12px;
    min-height:30px;
    padding:2px 2px 0;
    color:var(--rl-app-muted);
    font-size:10.5px;
    font-weight:650;
}

.rl-bg-precision__legend span{
    display:inline-flex;
    align-items:center;
    gap:5px;
}

.rl-bg-precision__legend span:last-child{
    margin-left:auto;
}

.rl-bg-precision__legend i{
    width:8px;
    height:8px;
    border-radius:999px;
    box-shadow:0 0 0 3px rgba(127,127,127,.08);
}

.rl-bg-precision__legend i.is-keep,
.rl-bg-tool-chip__dot.is-keep{
    background:#6f55f4;
}

.rl-bg-precision__legend i.is-remove,
.rl-bg-tool-chip__dot.is-remove{
    background:#ef4444;
}

.rl-bg-precision__stage{
    isolation:isolate;
    min-height:320px;
    border-radius:20px;
    border-color:color-mix(in srgb,var(--rl-app-line) 84%,transparent);
    box-shadow:
        0 12px 36px rgba(0,0,0,.055),
        inset 0 1px 0 rgba(255,255,255,.10);
    transition:border-color .18s ease,box-shadow .18s ease;
}

.rl-bg-precision.has-selection .rl-bg-precision__stage{
    border-color:color-mix(in srgb,var(--rl-app-accent,#6f55f4) 44%,var(--rl-app-line));
    box-shadow:
        0 14px 40px color-mix(in srgb,var(--rl-app-accent,#6f55f4) 8%,transparent),
        inset 0 1px 0 rgba(255,255,255,.10);
}

.rl-bg-precision__canvas{
    min-height:320px;
}

.rl-bg-precision__zoombar{
    justify-content:center;
    gap:5px;
}

.rl-bg-precision__zoombar button{
    min-width:38px;
    min-height:36px;
    border-radius:10px;
    padding:0 10px;
    font-weight:750;
    transition:background .15s ease,transform .15s ease;
}

.rl-bg-precision__zoombar button:active{
    transform:scale(.96);
}

.rl-bg-precision__zoombar span{
    min-width:62px;
    font-variant-numeric:tabular-nums;
}

.rl-bg-precision__tools{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
    padding:4px;
    border:1px solid var(--rl-app-line);
    border-radius:14px;
    background:color-mix(in srgb,var(--rl-app-panel) 92%,transparent);
}

.rl-bg-tool-chip{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:40px;
    border:0;
    border-radius:10px;
    background:transparent;
    transition:background .15s ease,color .15s ease,box-shadow .15s ease;
}

.rl-bg-tool-chip.is-active{
    background:var(--rl-app-panel);
    box-shadow:
        0 3px 10px rgba(0,0,0,.07),
        inset 0 0 0 1px color-mix(in srgb,var(--rl-app-line) 82%,transparent);
}

.rl-bg-tool-chip__dot{
    width:8px;
    height:8px;
    border-radius:999px;
    flex:0 0 auto;
}

.rl-bg-tool-chip__move{
    width:13px;
    text-align:center;
    font-style:normal;
    font-size:14px;
    line-height:1;
}

.rl-bg-precision__brush{
    min-height:46px;
    grid-template-columns:auto minmax(100px,1fr) 48px;
    padding:8px 11px;
    border-radius:12px;
}

.rl-bg-precision__brush-label{
    color:var(--rl-app-text);
    font-weight:750;
}

.rl-bg-precision__brush input{
    accent-color:var(--rl-app-accent,#6f55f4);
}

.rl-bg-precision__brush output{
    font-size:10.5px;
    font-weight:800;
}

.rl-bg-precision__minor-actions{
    justify-content:flex-end;
}

.rl-bg-precision__minor-actions button{
    min-height:32px;
    border:0;
    background:transparent;
    color:var(--rl-app-muted);
    font-size:10.5px;
    font-weight:700;
}

.rl-bg-precision__minor-actions button:hover{
    background:color-mix(in srgb,var(--rl-app-text) 5%,transparent);
    color:var(--rl-app-text);
}

.rl-bg-precision__help{
    padding:10px 11px;
    border-radius:12px;
    background:color-mix(in srgb,var(--rl-app-accent,#6f55f4) 5%,transparent);
    line-height:1.45;
}

.rl-bg-precision__actions{
    display:grid;
    grid-template-columns:minmax(130px,.42fr) minmax(210px,1fr);
    gap:8px;
}

.rl-bg-precision__actions .tool-primary-button,
.rl-bg-precision__actions .tool-secondary-button{
    min-height:44px;
    border-radius:12px;
}

.rl-bg-precision__actions .tool-primary-button{
    width:100%;
}

.rl-bg-precision__actions .tool-primary-button:disabled{
    opacity:.48;
    cursor:not-allowed;
}

.rl-bg-precision.is-processing{
    pointer-events:none;
}

.rl-bg-precision.is-processing .rl-bg-precision__stage,
.rl-bg-precision.is-processing .rl-bg-precision__quality,
.rl-bg-precision.is-processing .rl-bg-precision__tools,
.rl-bg-precision.is-processing .rl-bg-precision__brush{
    opacity:.72;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-message .bg-result-panel{
    min-width:0 !important;
    padding:0 !important;
    border:0 !important;
    border-left:0 !important;
    background:transparent !important;
    box-shadow:none !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-message .bg-result-panel > .step-heading{
    display:none !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .bg-result-stage{
    min-height:360px !important;
    border-radius:18px !important;
    border:1px solid var(--rl-app-line) !important;
    box-shadow:0 10px 28px rgba(0,0,0,.05);
}

.rl-guided-tool[data-rl-guide-kind="background"] .bg-result-stage img[data-bg-result],
.rl-guided-tool[data-rl-guide-kind="background"] .bg-result-stage canvas[data-bg-editor-canvas]{
    max-height:560px !important;
    border-radius:18px !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .bg-result-actions{
    gap:8px !important;
    margin-top:10px !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .bg-edit-panel{
    margin-top:10px !important;
    padding:11px !important;
    border-radius:14px !important;
    border:1px solid var(--rl-app-line) !important;
    background:var(--rl-app-panel) !important;
    box-shadow:none !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .bg-edit-toolbar{
    gap:6px !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .bg-tool-button{
    min-height:38px;
    border-radius:10px !important;
}

@media(max-width:620px){
    .rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-turn:not(.is-user) .rl-guide-message{
        width:100%;
        max-width:100%;
    }

    .rl-bg-mode-chip{
        min-height:72px;
        padding:10px;
    }

    .rl-bg-mode-chip__recommended,
    .rl-bg-mode-chip__speed{
        font-size:8.5px;
        padding:0 5px;
    }

    .rl-bg-mode-chip__desc{
        font-size:10px;
    }

    .rl-bg-precision__legend{
        gap:5px 9px;
    }

    .rl-bg-precision__legend span:last-child{
        width:100%;
        margin-left:0;
    }

    .rl-bg-precision__stage,
    .rl-bg-precision__canvas{
        min-height:270px;
    }

    .rl-bg-precision__zoombar button{
        min-width:42px;
        min-height:42px;
    }

    .rl-bg-tool-chip{
        min-height:44px;
        padding:0 6px;
        font-size:11px;
    }

    .rl-bg-precision__brush{
        min-height:48px;
    }

    .rl-bg-precision__actions{
        grid-template-columns:1fr;
    }

    .rl-bg-precision__actions .tool-primary-button{
        order:-1;
        min-height:48px;
    }

    .rl-guided-tool[data-rl-guide-kind="background"] .bg-result-stage{
        min-height:280px !important;
    }
}


/* RUPTLINE_PRECISION_REFINO_R18M_4 */
.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-turn:not(.is-user) .rl-guide-message{
    width:min(100%,760px);
    max-width:760px;
    margin-inline:auto;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-message .rl-bg-precision{
    width:min(100%,740px);
    margin-inline:auto;
}

.rl-bg-precision__panpad{
    display:grid;
    justify-content:center;
    gap:6px;
    margin-top:-2px;
}

.rl-bg-precision__panpad-row{
    display:grid;
    grid-template-columns:repeat(3,44px);
    gap:6px;
}

.rl-bg-precision__panpad > button,
.rl-bg-precision__panpad-row > button{
    min-width:44px;
    min-height:38px;
    border:1px solid var(--rl-app-line);
    border-radius:10px;
    background:var(--rl-app-panel);
    color:var(--rl-app-text);
    font-weight:800;
    cursor:pointer;
}

.rl-bg-precision__panpad > button{
    width:44px;
    justify-self:center;
}

.rl-bg-precision__actions{
    grid-template-columns:minmax(140px,.5fr) minmax(140px,.56fr) minmax(220px,1fr);
}

.rl-bg-precision__actions .tool-secondary-button,
.rl-bg-precision__actions .tool-primary-button{
    width:100%;
}

@media(max-width:620px){
    .rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-turn:not(.is-user) .rl-guide-message,
    .rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-message .rl-bg-precision{
        width:100%;
        max-width:100%;
    }

    .rl-bg-precision__actions{
        grid-template-columns:1fr;
    }

    .rl-bg-precision__panpad-row{
        grid-template-columns:repeat(3,46px);
    }

    .rl-bg-precision__panpad > button,
    .rl-bg-precision__panpad-row > button{
        min-width:46px;
        min-height:42px;
    }
}


/* RUPTLINE_REMOVE_BG_DUAL_SYNC_R18M_5_R2 */
.rl-guided-tool[data-rl-guide-kind="background"]{
    width:min(100%,820px) !important;
    max-width:820px !important;
    margin-inline:auto !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-shell,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-feed{
    width:100% !important;
    max-width:100% !important;
    margin-inline:auto !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-turn{
    width:100% !important;
    max-width:100% !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-turn:not(.is-user) .rl-guide-message{
    width:min(100%,760px) !important;
    max-width:760px !important;
    margin-inline:auto !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision{
    width:100% !important;
    max-width:740px !important;
    margin-inline:auto !important;
}

@media(max-width:760px){
    .rl-guided-tool[data-rl-guide-kind="background"],
    .rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-turn:not(.is-user) .rl-guide-message,
    .rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision{
        width:100% !important;
        max-width:100% !important;
    }
}


/* RUPTLINE_REMOVE_BG_SINGLE_SOURCE_R18M_8 */
.rl-guided-tool[data-rl-guide-kind="background"]{
    width:min(100%,820px) !important;
    max-width:820px !important;
    margin-left:auto !important;
    margin-right:auto !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-shell,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-feed{
    width:100% !important;
    max-width:100% !important;
    margin-left:auto !important;
    margin-right:auto !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-guide-turn{
    width:100% !important;
    max-width:100% !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
.rl-guide-turn:not(.is-user) .rl-guide-message{
    width:min(100%,760px) !important;
    max-width:760px !important;
    margin-left:auto !important;
    margin-right:auto !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision{
    width:100% !important;
    max-width:740px !important;
    margin-left:auto !important;
    margin-right:auto !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__actions{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:8px !important;
    width:100% !important;
    min-width:0 !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__actions > button{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    white-space:normal !important;
}

body.rl-native-tool-open
[data-rl-native-tool-panel="remove_bg"]
.rl-native-tool-body{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    width:100% !important;
    min-width:0 !important;
}

body.rl-native-tool-open
[data-rl-native-tool-panel="remove_bg"]
.rl-native-tool-body > [data-background-remover]{
    flex:0 1 820px !important;
    width:min(100%,820px) !important;
    max-width:820px !important;
    margin-left:auto !important;
    margin-right:auto !important;
}

@media(max-width:700px){
    .rl-guided-tool[data-rl-guide-kind="background"],
    .rl-guided-tool[data-rl-guide-kind="background"]
    .rl-guide-turn:not(.is-user) .rl-guide-message,
    .rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision{
        width:100% !important;
        max-width:100% !important;
    }

    .rl-guided-tool[data-rl-guide-kind="background"]
    .rl-bg-precision__actions{
        grid-template-columns:1fr !important;
    }
}


/* RUPTLINE_REMOVE_BG_PREMIUM_UI_LOADER_R18M_9_R1 */
.rl-guided-tool[data-rl-guide-kind="background"] button .rl-bg-svg-icon,
.rl-guided-tool[data-rl-guide-kind="background"] a .rl-bg-svg-icon{
    width:17px;
    height:17px;
    flex:0 0 17px;
    display:inline-grid;
    place-items:center;
    color:currentColor;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-svg-icon svg{
    width:17px;
    height:17px;
    display:block;
    fill:none;
    stroke:currentColor;
    stroke-width:1.65;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.rl-guided-tool[data-rl-guide-kind="background"] button:has(> .rl-bg-svg-icon),
.rl-guided-tool[data-rl-guide-kind="background"] a:has(> .rl-bg-svg-icon){
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-mode]{
    justify-content:flex-start !important;
    align-items:flex-start !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-mode] > .rl-bg-svg-icon{
    margin-top:2px;
    width:18px;
    height:18px;
    flex-basis:18px;
}

.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-pan],
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-in],
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-out]{
    padding:0 !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-pan] .rl-bg-svg-icon,
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-in] .rl-bg-svg-icon,
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-out] .rl-bg-svg-icon{
    width:16px;
    height:16px;
    flex-basis:16px;
}

.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-pan] .rl-bg-svg-icon svg,
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-in] .rl-bg-svg-icon svg,
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-out] .rl-bg-svg-icon svg{
    width:16px;
    height:16px;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions button{
    min-height:48px !important;
    border-radius:13px !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions button::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    border-radius:inherit;
    background:linear-gradient(
        180deg,
        rgba(255,255,255,.12),
        rgba(255,255,255,0) 56%
    );
    opacity:.75;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-mode-chip__recommended::before{
    content:"";
}



/* RUPTLINE_REMOVE_BG_INLINE_SVG_R18M_9_R2 */
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-premium-svg{
    width:19px;height:19px;display:block;flex:0 0 19px;
    fill:none;stroke:currentColor;stroke-width:1.75;
    stroke-linecap:round;stroke-linejoin:round;overflow:visible;
}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-mode-chip{
    display:flex !important;align-items:flex-start !important;gap:11px !important;text-align:left !important;
}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-mode-chip__icon{
    display:grid;place-items:center;min-width:22px;padding-top:1px;
}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-mode-chip__body{min-width:0;flex:1 1 auto;}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-tool-chip,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__minor-actions button,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions button,
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-fit]{
    display:inline-flex !important;align-items:center !important;justify-content:center !important;gap:8px !important;
}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions button{min-height:50px !important;}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-action-copy{display:flex;flex-direction:column;align-items:flex-start;line-height:1.08;min-width:0;}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-action-copy strong{font:inherit;font-weight:720;}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-action-copy small{margin-top:3px;font-size:10.5px;opacity:.70;font-weight:560;}
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-pan],
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-in],
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-out]{display:grid !important;place-items:center !important;padding:0 !important;}
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-pan] .rl-bg-premium-svg,
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-in] .rl-bg-premium-svg,
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-zoom-out] .rl-bg-premium-svg{width:17px;height:17px;}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-tool-chip__dot,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-tool-chip__move{display:none !important;}
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-mode-chip__recommended::before{content:none !important;}



/* RUPTLINE_REMOVE_BG_MINIMAL_AI_R18M_10 */
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__panpad,
.rl-guided-tool[data-rl-guide-kind="background"] [data-rl-bg-tool="pan"],
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__minor-actions,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__help{
    display:none !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__tools{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:7px !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__zoombar{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__brush{
    padding:7px 2px !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__stage{
    position:relative !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__canvas{
    cursor:none !important;
}

.rl-bg-brush-preview{
    position:absolute;
    z-index:50;
    transform:translate(-50%,-50%);
    border-radius:999px;
    pointer-events:none;
    border:1.5px solid rgba(139,106,255,.98);
    background:rgba(111,85,244,.12);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.38),
        0 0 13px rgba(111,85,244,.24);
    transition:
        width .08s ease,
        height .08s ease,
        border-color .12s ease,
        background-color .12s ease;
}

.rl-bg-brush-preview.is-remove{
    border-color:rgba(239,68,68,.98);
    background:rgba(239,68,68,.10);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.35),
        0 0 13px rgba(239,68,68,.20);
}

.rl-bg-brush-preview[hidden]{
    display:none !important;
}



/* RUPTLINE_REMOVE_BG_BIREFNET_LITE_CHAT_CSS_R18M_12_R1 */
/* Cuatro acciones actuales: 2x2 en escritorio, una columna en móvil. */
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}
.rl-bg-precision__actions .rl-bg-pro-experimental{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    min-width:0;
}
.rl-bg-precision__actions .rl-bg-pro-experimental svg{
    width:18px;
    height:18px;
    flex:0 0 18px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.6;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.rl-bg-precision__actions .rl-bg-pro-experimental .rl-bg-action-copy{
    display:flex;
    min-width:0;
    flex-direction:column;
    align-items:flex-start;
    gap:1px;
    line-height:1.05;
}
.rl-bg-precision__actions .rl-bg-pro-experimental strong{
    font:inherit;
    font-weight:720;
}
.rl-bg-precision__actions .rl-bg-pro-experimental small{
    font-size:.64rem;
    font-weight:560;
    opacity:.62;
}
@media(max-width:700px){
    .rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions{
        grid-template-columns:1fr !important;
    }
}
@media(max-width:640px){
    .rl-bg-precision__actions .rl-bg-pro-experimental small{
        display:none;
    }
}


/* RUPTLINE_REMOVE_BG_BIREFNET_FULL_SINGLE_R18M_12_R2 */
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__quality,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__legend,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__tools,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__brush,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__minor-actions,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__help{
    display:none !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    width:100% !important;
    gap:0 !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions > button:not(.rl-bg-single-engine){
    display:none !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-single-engine{
    display:inline-flex !important;
    width:100% !important;
    min-height:54px !important;
    margin:0 !important;
    align-items:center !important;
    justify-content:center !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-single-engine .rl-bg-action-copy{
    align-items:flex-start !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-single-engine small{
    display:block !important;
    opacity:.66 !important;
}

@media(max-width:640px){
    .rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-single-engine small{
        display:block !important;
        font-size:.62rem !important;
    }
}


/* RUPTLINE_REMOVE_BG_FAST_ONLY_UI_CSS_R18M_13_R1 */
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__quality,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__legend,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__tools,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__brush,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__minor-actions,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__help,
.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-pro-experimental{
    display:none !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    width:100% !important;
}

.rl-guided-tool[data-rl-guide-kind="background"] .rl-bg-precision__actions > button:not([hidden]){
    width:100% !important;
}


/* RUPTLINE_REMOVE_BG_ONE_BUTTON_CSS_R18M_14 */

.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__actions{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    gap:0 !important;
    grid-template-columns:none !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__actions > button{
    display:none !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__actions > [data-rl-bg-fast-main="1"]{
    display:inline-flex !important;
    width:auto !important;
    min-width:176px !important;
    max-width:230px !important;
    min-height:44px !important;
    height:auto !important;
    margin:4px auto !important;
    padding:9px 16px !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    border-radius:12px !important;
    white-space:nowrap !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
[data-rl-bg-fast-main="1"] > svg,
.rl-guided-tool[data-rl-guide-kind="background"]
[data-rl-bg-fast-main="1"] .rl-bg-premium-svg{
    display:block !important;
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    max-width:18px !important;
    min-height:18px !important;
    max-height:18px !important;
    flex:0 0 18px !important;
    fill:none !important;
    stroke:currentColor !important;
    stroke-width:1.75 !important;
    stroke-linecap:round !important;
    stroke-linejoin:round !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
[data-rl-bg-fast-main="1"] .rl-bg-action-copy{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:center !important;
    min-width:0 !important;
    line-height:1.05 !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
[data-rl-bg-fast-main="1"] .rl-bg-action-copy strong{
    font-size:13px !important;
    font-weight:720 !important;
    line-height:1.05 !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
[data-rl-bg-fast-main="1"] .rl-bg-action-copy small{
    display:block !important;
    margin-top:2px !important;
    font-size:10px !important;
    font-weight:560 !important;
    opacity:.62 !important;
}

.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__quality,
.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__legend,
.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__tools,
.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__brush,
.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__minor-actions,
.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__help,
.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-precision__panpad,
.rl-guided-tool[data-rl-guide-kind="background"]
.rl-bg-pro-experimental{
    display:none !important;
}

@media(max-width:640px){
    .rl-guided-tool[data-rl-guide-kind="background"]
    .rl-bg-precision__actions > [data-rl-bg-fast-main="1"]{
        min-width:164px !important;
        max-width:210px !important;
        min-height:44px !important;
        padding:9px 14px !important;
    }
}
