.duel-shell,
.duel-results-shell {
    display: grid;
    gap: 20px;
}

.duel-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
}

.duel-hero.is-final {
    position: relative;
    overflow: hidden;
    border-color: rgba(212,175,55,.46);
    background:
        radial-gradient(circle at 88% 18%, rgba(212,175,55,.2), transparent 34%),
        linear-gradient(145deg, rgba(212,175,55,.09), rgba(255,255,255,.02));
    box-shadow: 0 0 54px rgba(212,175,55,.12);
}

.duel-final-badge {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 14px !important;
    padding: 7px 12px;
    border: 1px solid rgba(255,226,149,.48);
    border-radius: 999px;
    color: var(--color-gold-light) !important;
    background: rgba(212,175,55,.12);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1 !important;
    text-transform: uppercase;
}

.duel-final-context {
    margin-top: 10px;
}

.duel-final-audience {
    width: fit-content;
    margin: 14px 0 0;
    padding-left: 13px;
    border-left: 2px solid var(--color-gold-light);
    color: var(--color-gold-light) !important;
    font-weight: 650;
}

.duel-hero h1,
.duel-results-shell h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(38px, 8vw, 72px);
    line-height: .94;
    letter-spacing: -.04em;
}

.duel-hero p,
.duel-progress-card p,
.duel-completed-card p,
.duel-results-shell p {
    max-width: 760px;
    color: var(--color-muted);
    line-height: 1.65;
}

.duel-progress-orb {
    display: grid;
    place-items: center;
    justify-self: end;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1px solid rgba(212,175,55,.36);
    background: radial-gradient(circle, rgba(212,175,55,.2), rgba(255,255,255,.03));
    box-shadow: 0 0 58px rgba(212,175,55,.18);
}

.duel-progress-orb strong {
    font-family: var(--font-display);
    color: var(--color-gold-light);
    font-size: 52px;
    line-height: 1;
}

.duel-progress-orb span {
    color: var(--color-muted);
    font-size: 13px;
    text-align: center;
}

.duel-alert {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(212,175,55,.22);
    border-radius: 14px;
    background: rgba(212,175,55,.08);
    color: var(--color-gold-light);
}

.duel-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
}

.duel-progress-head h2 {
    margin: 0;
}

.progress-bar {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(212,175,55,.2);
    background: rgba(255,255,255,.04);
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #fff0bd, #d7a24d 48%, #9d641e);
    box-shadow: 0 0 22px rgba(212,175,55,.35);
}

.duel-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.duel-progress-meta span {
    padding: 8px 11px;
    border: 1px solid rgba(212,175,55,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    color: var(--color-muted);
    font-size: 13px;
}

.duel-form {
    display: grid;
    gap: 18px;
}

.duel-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.duel-card {
    appearance: none;
    display: grid;
    padding: 0;
    cursor: pointer;
    text-align: left;
    color: inherit;
    border-color: rgba(212,175,55,.18);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.duel-card:hover,
.duel-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(212,175,55,.46);
    box-shadow: 0 0 42px rgba(212,175,55,.18);
    outline: none;
}

.duel-card-photo {
    display: grid;
    min-height: 430px;
    place-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(212,175,55,.18);
    background: linear-gradient(145deg, rgba(212,175,55,.14), rgba(255,255,255,.025));
}

.duel-card-photo img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
}

.duel-card-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.duel-name {
    font-family: var(--font-display);
    color: var(--color-text);
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1;
}

.duel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.duel-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(212,175,55,.16);
    color: var(--color-muted);
    background: rgba(255,255,255,.025);
    font-size: 13px;
}

.duel-phrase {
    color: var(--color-gold-light);
    line-height: 1.5;
}

.duel-select-hint {
    display: inline-flex;
    justify-self: start;
    margin-top: 6px;
    padding: 9px 12px;
    border-radius: 999px;
    color: #1f1403;
    background: linear-gradient(135deg, #fff0bd, #d7a24d 48%, #9d641e);
    font-weight: 700;
}

.duel-bottom-actions,
.duel-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.duel-bottom-actions p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    text-align: center;
}

.duel-completed-card {
    display: grid;
    gap: 14px;
    justify-items: start;
}

.duel-results-card {
    display: grid;
    gap: 10px;
}

.duel-results-note {
    max-width: 280px;
    color: var(--color-muted);
    font-size: 13px;
    text-align: right;
}

.duel-results-list {
    display: grid;
    gap: 12px;
}

.duel-result-row {
    display: grid;
    grid-template-columns: 58px 58px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(212,175,55,.16);
    background: rgba(255,255,255,.025);
}

.duel-result-row:hover {
    border-color: rgba(212,175,55,.38);
    box-shadow: 0 0 30px rgba(212,175,55,.12);
}

.duel-result-rank {
    color: var(--color-gold-light);
    font-family: var(--font-display);
    font-size: 28px;
}

.duel-result-info {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.duel-result-info strong {
    color: var(--color-text);
    font-size: 18px;
}

.duel-result-info small,
.duel-result-stat small {
    color: var(--color-muted);
}

.duel-result-stat {
    display: grid;
    gap: 2px;
    text-align: right;
}

.duel-result-stat strong {
    color: var(--color-gold-light);
    font-size: 24px;
}

@media (max-width: 820px) {
    .duel-hero {
        grid-template-columns: 1fr;
    }

    .duel-progress-orb {
        justify-self: start;
        width: 128px;
        height: 128px;
    }

    .duel-card-photo,
    .duel-card-photo img {
        min-height: 340px;
    }

    .duel-result-row {
        grid-template-columns: 44px 52px minmax(0, 1fr);
    }

    .duel-result-stat {
        grid-column: 2 / -1;
        text-align: left;
    }

    .duel-progress-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .duel-results-note {
        text-align: left;
    }
}

/* =========================================================
   Duel — две участницы в одной строке
   ========================================================= */

.duel-form {
    width: 100%;
    max-width: 1040px;
    margin-right: auto;
    margin-left: auto;
}

.duel-question {
    margin: 4px 0 0;

    color: var(--color-text);

    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 500;
    line-height: 1.08;
    text-align: center;
}

.duel-cards-grid {
    position: relative;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;

    min-width: 0;
}

/*
 * Сама карточка больше не является кнопкой.
 */
.duel-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    padding: 0;
    overflow: hidden;

    color: inherit;
    text-align: left;

    border-color: rgba(212, 175, 55, 0.22);

    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.duel-card:hover {
    transform: translateY(-3px);

    border-color: rgba(212, 175, 55, 0.52);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

/*
 * Ссылка занимает фото и информационную часть карточки.
 */
.duel-card-profile {
    position: relative;

    display: flex;
    flex: 1;
    flex-direction: column;

    min-width: 0;

    color: inherit;
    text-decoration: none;
}

.duel-card-profile:focus-visible {
    outline: 2px solid var(--color-gold-light);
    outline-offset: -3px;
}

/* Метки A и B */



/* Фотография */

.duel-card-photo {
    position: relative;

    display: grid;
    place-items: center;

    width: 100%;
    min-height: 0 !important;
    aspect-ratio: 4 / 5;

    overflow: hidden;

    border-bottom: 1px solid rgba(212, 175, 55, 0.2);

    background:
        radial-gradient(
            circle at 50% 10%,
            rgba(212, 175, 55, 0.18),
            rgba(7, 7, 6, 0.98)
        );
}

.duel-card-photo::after {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 2;

    background:
        linear-gradient(
            180deg,
            transparent 58%,
            rgba(5, 5, 5, 0.74) 100%
        );

    pointer-events: none;
}

.duel-card-photo img {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 0 !important;

    object-fit: cover;
    object-position: center top;

    transition: transform 300ms ease;
}

.duel-card:hover .duel-card-photo img {
    transform: scale(1.025);
}

.duel-card-photo .participant-initials {
    width: 100%;
    height: 100%;
    min-height: 0;

    border-radius: 0;
}

/* Информация */

.duel-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;

    min-width: 0;
    padding: 18px;
}

.duel-name {
    display: block;

    max-width: 100%;

    color: var(--color-text);

    font-family: var(--font-display);
    font-size: clamp(27px, 4vw, 42px);
    line-height: 1;

    overflow-wrap: anywhere;
}

.duel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    min-width: 0;
}

.duel-meta span {
    display: inline-flex;

    max-width: 100%;
    padding: 6px 9px;

    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 9px;

    color: var(--color-muted);
    background: rgba(255, 255, 255, 0.025);

    font-size: 12px;
    line-height: 1.3;

    overflow-wrap: anywhere;
}

.duel-phrase {
    display: -webkit-box;
    overflow: hidden;

    color: var(--color-gold-light);

    line-height: 1.45;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.duel-open-profile {
    display: inline-flex;

    margin-top: auto;
    padding-top: 5px;

    color: var(--color-muted);

    font-size: 12px;
    font-weight: 600;
}

/* Кнопка выбора */

.duel-card-action {
    padding: 0 18px 18px;
}

.duel-select-button {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
    min-height: 48px;
    padding: 11px 14px;

    border: 1px solid rgba(229, 186, 82, 0.7);
    border-radius: 12px;

    color: var(--color-gold-light);
    background:
        linear-gradient(
            135deg,
            rgba(212, 175, 55, 0.1),
            rgba(255, 255, 255, 0.02)
        );

    font: inherit;
    font-weight: 750;

    cursor: pointer;

    transition:
        color 180ms ease,
        background 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}

.duel-select-button:hover,
.duel-select-button:focus-visible {
    color: #201503;

    border-color: #f0c968;

    background:
        linear-gradient(
            135deg,
            #fff0bd,
            #d7a24d 48%,
            #9d641e
        );

    transform: translateY(-1px);
    outline: none;
}

.duel-select-button:disabled {
    cursor: wait;
    opacity: 0.66;
}

/* Значок VS между карточками */

.duel-vs {
    position: absolute;
    top: 43%;
    left: 50%;
    z-index: 8;

    display: grid;
    place-items: center;

    width: 62px;
    height: 62px;

    border: 1px solid rgba(244, 207, 103, 0.78);
    border-radius: 50%;

    color: var(--color-gold-light);
    background:
        radial-gradient(
            circle,
            rgba(48, 32, 9, 0.98),
            rgba(5, 5, 5, 0.98)
        );

    box-shadow:
        0 0 0 7px rgba(5, 5, 5, 0.82),
        0 0 30px rgba(212, 175, 55, 0.24);

    font-family: var(--font-display);
    font-size: 22px;

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

    pointer-events: none;
}

/* =========================================================
   Телефон — карточки всё равно остаются рядом
   ========================================================= */

@media (max-width: 820px) {
    /*
     * Ранее в duel.css здесь устанавливалось:
     * .duel-cards-grid { grid-template-columns: 1fr; }
     *
     * Это правило ниже переопределяет его.
     */
    .duel-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .duel-question {
        font-size: clamp(27px, 8vw, 36px);
    }

    .duel-card {
        border-radius: 18px;
    }

    .duel-card-photo {
        min-height: 0 !important;
        aspect-ratio: 3 / 4;
    }

    .duel-card-photo img {
        min-height: 0 !important;
    }

    

    .duel-card-body {
        gap: 8px;
        padding: 11px 10px 10px;
    }

    .duel-name {
        font-size: clamp(21px, 6vw, 29px);
        line-height: 1.02;
    }

    .duel-meta {
        gap: 5px;
    }

    .duel-meta span {
        padding: 5px 7px;

        font-size: 10px;
        line-height: 1.25;
    }

    .duel-phrase {
        font-size: 12px;
        line-height: 1.35;

        -webkit-line-clamp: 3;
    }

    .duel-open-profile {
        font-size: 10px;
    }

    .duel-card-action {
        padding: 0 9px 10px;
    }

    .duel-select-button {
        min-height: 43px;
        padding: 9px 6px;

        border-radius: 9px;

        font-size: 14px;
    }

    .duel-vs {
        top: 39%;

        width: 46px;
        height: 46px;

        box-shadow:
            0 0 0 5px rgba(5, 5, 5, 0.86),
            0 0 22px rgba(212, 175, 55, 0.22);

        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .duel-cards-grid {
        gap: 6px;
    }

    .duel-card-body {
        padding-right: 8px;
        padding-left: 8px;
    }

    .duel-name {
        font-size: 21px;
    }

    /*
     * Очень длинное название области на маленьком
     * телефоне не должно растягивать карточку.
     */
    .duel-meta span {
        max-width: 100%;

        white-space: normal;
        overflow-wrap: anywhere;
    }

    .duel-vs {
        width: 42px;
        height: 42px;

        font-size: 14px;
    }
}
.duel-final-winner {
    display: grid;
    gap: 6px;

    margin: 20px 0;
    padding: 18px 20px;

    border: 1px solid rgba(225, 184, 76, .48);
    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            rgba(105, 14, 42, .92),
            rgba(52, 7, 24, .94)
        );
}

.duel-final-winner span {
    color: var(--color-gold-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.duel-final-winner a {
    width: fit-content;
    color: var(--color-text);
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1;
    text-decoration-color: rgba(225, 184, 76, .5);
    text-underline-offset: 5px;
}
