.cf-wrap {
    --cf-bg: #050b1f;
    --cf-card: #0b1636;
    --cf-line: #1c2b59;
    --cf-text: #ffffff;
    --cf-muted: #a9b6dc;
    background: var(--cf-bg);
    color: var(--cf-text);
    font-weight: 700;
    padding: 48px 28px;
    border-radius: 14px;
    box-sizing: border-box;
    line-height: 1.5;
}
.cf-wrap *, .cf-wrap *::before, .cf-wrap *::after { box-sizing: border-box; }

.cf-wrap h1, .cf-wrap h2, .cf-wrap h3 {
    color: var(--cf-text);
    font-weight: 800;
    margin: 0 0 14px;
}
.cf-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 28px !important;
}
.cf-wrap h2 { font-size: 1.5rem; }
.cf-wrap h3 { font-size: 1.05rem; margin-bottom: 4px; }
.cf-wrap p { margin: 0 0 12px; }

/* Fases */
.cf-phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.cf-phase {
    background: var(--cf-card);
    border: 2px solid var(--cf-line);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cf-phase-name { font-weight: 800; font-size: 1.05rem; }
.cf-dates { color: var(--cf-muted); font-size: .9rem; }
.cf-badge {
    align-self: flex-start;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 10px;
    border-radius: 999px;
    border: 2px solid var(--cf-text);
}
.cf-badge.cf-open { background: var(--cf-text); color: var(--cf-bg); }
.cf-badge.cf-soon, .cf-badge.cf-closed, .cf-badge.cf-undefined { color: var(--cf-muted); border-color: var(--cf-muted); }

/* Avisos */
.cf-notice {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 2px solid;
}
.cf-notice-ok { border-color: #5ad28c; background: rgba(90, 210, 140, .1); }
.cf-notice-error { border-color: #ff7a7a; background: rgba(255, 122, 122, .1); }

/* Paneles y formularios */
.cf-panel {
    background: var(--cf-card);
    border: 2px solid var(--cf-line);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.cf-form { display: flex; flex-direction: column; gap: 14px; }
.cf-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; }
.cf-form input[type="text"],
.cf-form input[type="email"],
.cf-form input[type="file"] {
    background: var(--cf-bg);
    color: var(--cf-text);
    border: 2px solid var(--cf-line);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
}
.cf-form input:focus { outline: none; border-color: var(--cf-text); }
.cf-form label.cf-consent {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    font-weight: 700;
    font-size: .85rem;
    color: var(--cf-muted);
    line-height: 1.45;
}
.cf-form label.cf-consent input { margin-top: 3px; flex: 0 0 auto; }
.cf-form label.cf-consent a { color: var(--cf-text); text-decoration: underline; }
.cf-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }

.cf-btn {
    display: inline-block;
    background: var(--cf-text);
    color: var(--cf-bg);
    border: 2px solid var(--cf-text);
    border-radius: 8px;
    padding: 10px 18px;
    font-size: .95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    cursor: pointer;
    text-align: center;
    transition: background .15s, color .15s;
}
.cf-btn:hover { background: transparent; color: var(--cf-text); }

/* Galería */
.cf-gallery-section h2 { text-align: center; margin-bottom: 24px; }
.cf-empty { text-align: center; color: var(--cf-muted); }
.cf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}
.cf-card {
    background: var(--cf-card);
    border: 2px solid var(--cf-line);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.cf-img img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.cf-card-body { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.cf-author { color: var(--cf-muted); font-size: .9rem; margin: 0 !important; }
.cf-votes { font-weight: 800; margin: 6px 0 8px !important; }

.cf-vote summary { list-style: none; }
.cf-vote summary::-webkit-details-marker { display: none; }
.cf-vote .cf-form { margin-top: 12px; }

.cf-delete { margin-top: 10px; }
.cf-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--cf-muted);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* Premios / información */
.cf-prizes {
    background: var(--cf-card);
    border: 2px solid var(--cf-text);
    border-radius: 10px;
    padding: 24px;
    margin: 0 auto 36px;
    max-width: 760px;
    text-align: center;
}
.cf-prizes h2 { text-transform: uppercase; letter-spacing: .04em; }
.cf-prizes-text p:last-child { margin-bottom: 0; }
.cf-prizes-text a { color: var(--cf-text); text-decoration: underline; }

/* Avisos y textos auxiliares */
.cf-hint {
    font-size: .85rem;
    color: var(--cf-muted);
    border-left: 3px solid var(--cf-text);
    padding-left: 10px;
}
.cf-sub { text-align: center; color: var(--cf-muted); max-width: 720px; margin: 0 auto 24px !important; }

.cf-btn-ghost { background: transparent; color: var(--cf-text); }
.cf-btn-ghost:hover { background: var(--cf-text); color: var(--cf-bg); }
.cf-card-body > .cf-btn { width: 100%; margin-bottom: 8px; }
.cf-vote summary.cf-btn { width: 100%; }

/* Pantalla de votación: todas las fotos con el mismo tamaño y completamente visibles */
.cf-grid-vote .cf-img {
    aspect-ratio: 4 / 3;
    background: #02060f;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cf-grid-vote .cf-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Pantalla final: podio */
.cf-results h2 { text-align: center; font-size: 2rem; margin-bottom: 8px; }
.cf-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: end;
}
.cf-win .cf-img {
    aspect-ratio: 4 / 3;
    background: #02060f;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cf-win .cf-img img { width: 100%; height: 100%; object-fit: contain; }
.cf-medal {
    background: var(--cf-text);
    color: var(--cf-bg);
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px;
}
.cf-place-1 { order: 2; border-color: var(--cf-text); }
.cf-place-2 { order: 1; }
.cf-place-3 { order: 3; }
.cf-place-1 .cf-medal { font-size: 1.15rem; padding: 14px; }

/* Ampliar foto */
.cf-lightbox {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 96vw;
    max-height: 96vh;
    color: #fff;
}
.cf-lightbox::backdrop { background: rgba(2, 6, 15, .92); }
.cf-lb-inner { position: relative; text-align: center; padding: 8px; }
.cf-lb-inner img {
    display: block;
    max-width: 92vw;
    max-height: 82vh;
    margin: 0 auto;
    border-radius: 8px;
}
.cf-lb-cap { font-weight: 800; margin: 12px 0 0; color: #fff; }
.cf-lb-close {
    position: absolute;
    top: -6px;
    right: -2px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #050b1f;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 800px) {
    .cf-podium { grid-template-columns: 1fr; }
    .cf-place-1, .cf-place-2, .cf-place-3 { order: 0; }
}

@media (max-width: 600px) {
    .cf-wrap { padding: 32px 16px; }
    .cf-img img { height: 200px; }
}
