.section-help {
    margin: -5px 0 14px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.photo-uploader-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.photo-preview-panel {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
}

.photo-preview-frame {
    width: 160px;
    aspect-ratio: 4 / 5;
    border: 1px solid #c7d2dc;
    border-radius: 9px;
    overflow: hidden;
    position: relative;
    background: #eef2f6;
}

.photo-preview-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            180deg,
            #f7f9fb 0%,
            #e3e9ef 100%
        );
    color: #748395;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: column;
    padding-bottom: 16px;
}

.photo-placeholder span {
    position: relative;
    z-index: 3;
    font-size: 10px;
    font-weight: 700;
}

.placeholder-head {
    width: 54px;
    height: 54px;
    top: 35px;
    position: absolute;
    border-radius: 50%;
    background: #b9c5d0;
}

.placeholder-body {
    width: 122px;
    height: 88px;
    bottom: 27px;
    position: absolute;
    border-radius: 65px 65px 18px 18px;
    background: #b9c5d0;
}

.is-hidden {
    display: none !important;
}

.photo-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--blue);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.photo-options-panel {
    min-width: 0;
}

.photo-main-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.photo-action-button {
    min-height: 37px;
    padding: 8px 12px;
    border: 1px solid #8ea7bf;
    border-radius: 6px;
    background: white;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.photo-action-button:hover {
    background: #eef5fb;
}

.photo-drop-zone {
    margin-top: 11px;
    min-height: 90px;
    padding: 16px;
    border: 2px dashed #b7c6d4;
    border-radius: 8px;
    background: #f8fafc;
    color: #526171;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.photo-drop-zone strong {
    font-size: 11px;
}

.photo-drop-zone span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.photo-drop-zone:hover,
.photo-drop-zone:focus,
.photo-drop-zone.is-dragging {
    border-color: var(--blue);
    background: #edf5fb;
    outline: none;
}

.photo-status {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.photo-status.is-error {
    color: #a4261d;
    font-weight: 700;
}

.photo-dialog {
    width: min(96vw, 820px);
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 11px;
    overflow: hidden;
    background: white;
    color: var(--text);
    box-shadow: 0 24px 70px rgba(5, 20, 35, 0.35);
}

.photo-dialog::backdrop {
    background: rgba(7, 18, 30, 0.78);
    backdrop-filter: blur(3px);
}

.photo-dialog-content {
    display: flex;
    flex-direction: column;
}

.photo-dialog-header {
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.photo-dialog-header strong {
    color: var(--navy);
    display: block;
    font-size: 14px;
}

.photo-dialog-header span {
    margin-top: 3px;
    color: var(--muted);
    display: block;
    font-size: 10px;
}

.photo-dialog-close {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef1f5;
    color: #394759;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.photo-editor-stage {
    height: min(66vh, 590px);
    min-height: 360px;
    position: relative;
    overflow: hidden;
    background: #17202a;
}

.photo-editor-stage > img {
    display: block;
    max-width: 100%;
}

.photo-silhouette-guide {
    display: none;
    position: absolute;
    z-index: 2000;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.78);
    box-shadow:
        0 0 0 9999px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.silhouette-head {
    width: 48%;
    height: 53%;
    top: 8%;
    left: 26%;
    position: absolute;
    border: 2px dashed rgba(255, 255, 255, 0.78);
    border-radius: 48% 48% 44% 44% / 40% 40% 58% 58%;
    background: rgba(255, 255, 255, 0.035);
}

.silhouette-shoulders {
    width: 90%;
    height: 35%;
    bottom: -7%;
    left: 5%;
    position: absolute;
    border: 2px dashed rgba(255, 255, 255, 0.66);
    border-bottom: 0;
    border-radius: 50% 50% 0 0;
    background: rgba(255, 255, 255, 0.025);
}

.photo-editor-controls {
    padding: 9px 12px;
    border-top: 1px solid #35414d;
    background: #202b36;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.photo-editor-controls button {
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #526273;
    border-radius: 5px;
    background: #2c3946;
    color: white;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.photo-editor-controls button:hover {
    background: #3a4a5a;
}

.photo-dialog-footer {
    padding: 11px 13px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.photo-primary-button,
.photo-secondary-button {
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.photo-primary-button {
    border: 1px solid var(--burgundy);
    background: var(--burgundy);
    color: white;
}

.photo-secondary-button {
    border: 1px solid #cbd5df;
    background: white;
    color: var(--navy);
}

.webcam-dialog {
    width: min(96vw, 700px);
}

.webcam-stage {
    min-height: 380px;
    background: #111820;
    display: grid;
    place-items: center;
}

.webcam-stage video {
    width: 100%;
    max-height: 68vh;
    display: block;
    object-fit: contain;
    transform: scaleX(-1);
}

.cropper-container {
    font-size: 0;
}

.cropper-view-box {
    outline: 1px solid rgba(255, 255, 255, 0.55);
    outline-color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 680px) {
    .photo-uploader-layout {
        grid-template-columns: 1fr;
    }

    .photo-preview-frame {
        width: 145px;
    }

    .photo-main-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .photo-action-button {
        width: 100%;
    }

    .photo-editor-stage {
        height: 61vh;
        min-height: 320px;
    }

    .photo-editor-controls {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .photo-dialog-footer {
        flex-direction: column-reverse;
    }

    .photo-dialog-footer button {
        width: 100%;
    }

    .webcam-stage {
        min-height: 320px;
    }
}

/* GUIA FOTO CARNET */

.photo-silhouette-guide::before {
    content: '';
    position: absolute;
    top: 38%;
    left: 31%;
    width: 38%;
    border-top: 1px dashed rgba(255, 255, 255, 0.42);
}

.photo-silhouette-guide::after {
    content: 'Cara i part superior de les espatlles';
    position: absolute;
    right: 6px;
    bottom: 6px;
    left: 6px;
    padding: 4px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.48);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-size: 9px;
    font-weight: 700;
}

@media (max-width: 680px) {
    .silhouette-head {
        width: 52%;
        height: 54%;
        top: 7%;
        left: 24%;
    }

    .silhouette-shoulders {
        width: 94%;
        height: 34%;
        bottom: -8%;
        left: 3%;
    }
}
/* GUIA FOTOGRAFIA MOLT VISIBLE */

.photo-silhouette-guide {
    border: 4px solid #00e5ff !important;
    box-shadow:
        0 0 0 9999px rgba(0, 0, 0, 0.58),
        inset 0 0 0 2px rgba(0, 0, 0, 0.55) !important;
}

.silhouette-head {
    width: 62% !important;
    height: 68% !important;
    top: 4% !important;
    left: 19% !important;

    border: 4px solid #ffe600 !important;
    border-radius: 48% 48% 44% 44% / 40% 40% 58% 58% !important;

    background: rgba(255, 230, 0, 0.08) !important;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.55),
        0 0 14px rgba(255, 230, 0, 0.7);
}

.silhouette-head::before {
    content: 'POSA LA CARA AQUÍ';

    position: absolute;
    z-index: 4;
    top: 47%;
    left: 50%;

    padding: 5px 8px;
    border-radius: 5px;

    background: #ffe600;
    color: #111111;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;

    transform: translate(-50%, -50%);
}

.silhouette-head::after {
    content: '';

    position: absolute;
    z-index: 3;
    top: 37%;
    right: 10%;
    left: 10%;

    border-top: 3px solid #ff3b30;

    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.45);
}

.silhouette-shoulders {
    width: 108% !important;
    height: 34% !important;
    bottom: -15% !important;
    left: -4% !important;

    border: 4px solid #00e5ff !important;
    border-bottom: 0 !important;
    border-radius: 50% 50% 0 0 !important;

    background: rgba(0, 229, 255, 0.05) !important;
}

.photo-silhouette-guide::before {
    content: '';

    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    left: 50%;

    border-left: 2px solid rgba(0, 229, 255, 0.55);

    transform: translateX(-50%);
}

.photo-silhouette-guide::after {
    content: 'CARA · COLL · PART SUPERIOR DE LES ESPATLLES' !important;

    position: absolute !important;
    z-index: 5 !important;
    right: 8px !important;
    bottom: 8px !important;
    left: 8px !important;

    padding: 6px 8px !important;
    border-radius: 5px !important;

    background: #00e5ff !important;
    color: #06131a !important;

    text-align: center !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    letter-spacing: 0.03em !important;
}

@media (max-width: 680px) {
    .silhouette-head {
        width: 66% !important;
        height: 69% !important;
        top: 3% !important;
        left: 17% !important;
    }

    .silhouette-head::before {
        font-size: 9px;
    }

    .silhouette-shoulders {
        width: 112% !important;
        height: 32% !important;
        bottom: -15% !important;
        left: -6% !important;
    }
}