.perfil-form .btn-foto,
.comida-form .btn-foto,
.recorte .btn-foto,
.perfil-form .btn-foto-suave,
.comida-form .btn-foto-suave,
.recorte .btn-foto-suave {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: #F35C14;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
}

.perfil-form .btn-foto-suave,
.comida-form .btn-foto-suave,
.recorte .btn-foto-suave {
    background: #fff;
    color: #9a3412;
    border: 1px solid rgba(243, 92, 20, 0.35);
}

.recorte-acciones .btn-foto,
.recorte-acciones .btn-foto-suave {
    width: auto;
    min-width: 132px;
    font: inherit;
    font-weight: 800;
}

.recorte-acciones .btn-foto {
    border: 0;
    background: linear-gradient(135deg, #ff5a1f, #e10600);
    color: #fff;
}

.comida-form .btn-foto {
    width: auto;
    align-self: start;
    gap: 8px;
    border-radius: 14px;
    border: 1.5px solid rgba(243, 92, 20, 0.55);
    background: #fff;
    color: #9a3412;
}
.comida-form .btn-foto svg {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.perfil-form .btn-foto input,
.comida-form .btn-foto input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.recorte {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(27, 19, 13, 0.55);
}

.recorte[hidden] {
    display: none;
}

.recorte-caja {
    width: min(560px, 100%);
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    background: #fffdf9;
}

.recorte-titulo {
    margin: 0;
    font-weight: 800;
    text-align: center;
}

.recorte-ayuda {
    margin: 0;
    text-align: center;
    color: #6b5b52;
    font-size: 0.9rem;
    line-height: 1.4;
}

.recorte-escenario {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 18px;
    background: #2a211c;
    touch-action: none;
}

.recorte-escenario.recorte-banda {
    height: 280px;
}

.recorte-marco {
    position: absolute;
    border: 2px solid #fff;
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(27, 19, 13, 0.58);
    pointer-events: none;
}

.recorte-marco::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, transparent calc(33.33% - 1px), rgba(255, 255, 255, 0.7) calc(33.33% - 1px), rgba(255, 255, 255, 0.7) calc(33.33% + 1px), transparent calc(33.33% + 1px), transparent calc(66.66% - 1px), rgba(255, 255, 255, 0.7) calc(66.66% - 1px), rgba(255, 255, 255, 0.7) calc(66.66% + 1px), transparent calc(66.66% + 1px)),
        linear-gradient(to bottom, transparent calc(33.33% - 1px), rgba(255, 255, 255, 0.7) calc(33.33% - 1px), rgba(255, 255, 255, 0.7) calc(33.33% + 1px), transparent calc(33.33% + 1px), transparent calc(66.66% - 1px), rgba(255, 255, 255, 0.7) calc(66.66% - 1px), rgba(255, 255, 255, 0.7) calc(66.66% + 1px), transparent calc(66.66% + 1px));
}

.recorte-escenario img {
    position: absolute;
    max-width: none;
    user-select: none;
    pointer-events: none;
}

.recorte-mover {
    position: absolute;
    inset: 16px;
    z-index: 1;
    pointer-events: auto;
    cursor: move;
}

.recorte-borde {
    position: absolute;
    z-index: 2;
    pointer-events: auto;
    touch-action: none;
}

.recorte-borde[data-borde="n"],
.recorte-borde[data-borde="s"] {
    left: 22px;
    right: 22px;
    height: 18px;
    cursor: ns-resize;
}

.recorte-borde[data-borde="n"] { top: -9px; }
.recorte-borde[data-borde="s"] { bottom: -9px; }

.recorte-borde[data-borde="e"],
.recorte-borde[data-borde="w"] {
    top: 22px;
    bottom: 22px;
    width: 18px;
    cursor: ew-resize;
}

.recorte-borde[data-borde="e"] { right: -9px; }
.recorte-borde[data-borde="w"] { left: -9px; }

.recorte-borde[data-borde="n"]::after,
.recorte-borde[data-borde="s"]::after,
.recorte-borde[data-borde="e"]::after,
.recorte-borde[data-borde="w"]::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 99px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(27, 19, 13, 0.25);
}

.recorte-borde[data-borde="n"]::after,
.recorte-borde[data-borde="s"]::after {
    width: 36px;
    height: 5px;
    transform: translate(-50%, -50%);
}

.recorte-borde[data-borde="e"]::after,
.recorte-borde[data-borde="w"]::after {
    width: 5px;
    height: 36px;
    transform: translate(-50%, -50%);
}

.recorte-borde[data-borde="nw"],
.recorte-borde[data-borde="ne"],
.recorte-borde[data-borde="se"],
.recorte-borde[data-borde="sw"] {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(27, 19, 13, 0.25);
}

.recorte-borde[data-borde="nw"] { top: -8px; left: -8px; cursor: nwse-resize; }
.recorte-borde[data-borde="ne"] { top: -8px; right: -8px; cursor: nesw-resize; }
.recorte-borde[data-borde="se"] { bottom: -8px; right: -8px; cursor: nwse-resize; }
.recorte-borde[data-borde="sw"] { bottom: -8px; left: -8px; cursor: nesw-resize; }

.recorte-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

@media (max-width: 700px) {
    .recorte-escenario {
        height: 340px;
    }

    .recorte-escenario.recorte-banda {
        height: 240px;
    }
}
