/*
 * nova-finder.css — G:Finder (finder.tpl and its parts): the feed of cards, who liked the viewer,
 * the pairs, a profile, the viewer's own profile in 4 steps, the layers. Light and night mode, phones.
 */

.ele_fd_page,
.ele_fd_layer {
    --fd-accent: #2563EB;
    --fd-accent-hover: #1D4ED8;
    --fd-accent-ink: #ffffff;
    --fd-accent-soft: #eff6ff;
    --fd-accent-line: #bfdbfe;
    --fd-like: #E11D48;
    --fd-like-hover: #be123c;
    --fd-like-soft: #fff1f2;
    --fd-like-line: #fecdd3;
    --fd-like-ink: #881337;
    --fd-surface: var(--ele-gray-surface, #ffffff);
    --fd-inner: #f6f7f9;
    --fd-input: var(--ele-gray-input, #e2e4e8);
    --fd-border: var(--ele-gray-border, #dcdfe3);
    --fd-text: #111827;
    --fd-muted: #4b5563;
    --fd-faint: #6b7280;
    --fd-online: #16a34a;
    --fd-photo-bg: #d6d9de;
    --fd-shadow: 0 10px 30px rgba(17, 24, 39, 0.16);
    --fd-radius: 22px;
    color: var(--fd-text);
    font-family: 'Gilroy', Roboto, sans-serif;
}
body.night-mode .ele_fd_page,
body.night-mode .ele_fd_layer {
    --fd-accent: #22D3EE;
    --fd-accent-hover: #67e8f9;
    --fd-accent-ink: #04212a;
    --fd-accent-soft: rgba(34, 211, 238, 0.12);
    --fd-accent-line: rgba(34, 211, 238, 0.35);
    --fd-like: #f43f5e;
    --fd-like-hover: #fb7185;
    --fd-like-soft: rgba(244, 63, 94, 0.14);
    --fd-like-line: rgba(244, 63, 94, 0.35);
    --fd-like-ink: #fecdd3;
    --fd-inner: #1a1a1a;
    --fd-text: #f3f4f6;
    --fd-muted: #c4c9d0;
    --fd-faint: #9ca3af;
    --fd-online: #4ade80;
    --fd-photo-bg: #2a2a2a;
    --fd-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.ele_fd_page *,
.ele_fd_page *::before,
.ele_fd_page *::after,
.ele_fd_layer *,
.ele_fd_layer *::before,
.ele_fd_layer *::after {
    box-sizing: border-box;
}
.ele_fd_page .is-hidden,
.ele_fd_page [hidden],
.ele_fd_layer .is-hidden,
.ele_fd_layer[hidden] {
    display: none !important;
}


/* ------------------------------- */
/* Layout */
/* ------------------------------- */

.ele_fd_layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.ele_fd_main {
    flex: 1 1 auto;
    min-width: 0;
}
.ele_fd_side {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 76px;
}


/* ------------------------------- */
/* Buttons */
/* ------------------------------- */

.ele_fd_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--fd-border);
    border-radius: 14px;
    background: var(--fd-surface);
    color: var(--fd-text) !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease, opacity 0.18s ease;
}
.ele_fd_btn:hover {
    background: var(--fd-input);
}
.ele_fd_btn:active {
    transform: scale(0.97);
}
.ele_fd_btn:disabled,
.ele_fd_btn.is-busy {
    opacity: 0.6;
    pointer-events: none;
}
.ele_fd_btn_primary {
    border-color: var(--fd-accent);
    background: var(--fd-accent);
    color: var(--fd-accent-ink) !important;
}
.ele_fd_btn_primary:hover {
    border-color: var(--fd-accent-hover);
    background: var(--fd-accent-hover);
}
.ele_fd_btn_like {
    border-color: var(--fd-like);
    background: var(--fd-like);
    color: #ffffff !important;
}
.ele_fd_btn_like:hover {
    border-color: var(--fd-like-hover);
    background: var(--fd-like-hover);
}
.ele_fd_btn_ghost {
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #ffffff !important;
}
.ele_fd_btn_ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}
.ele_fd_btn_wide {
    width: 100%;
}
.ele_fd_btn_big {
    min-height: 52px;
    font-size: 16px;
}

.ele_fd_icon_btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--fd-border);
    border-radius: 14px;
    background: var(--fd-surface);
    color: var(--fd-text) !important;
    cursor: pointer;
    transition: background-color 0.18s ease;
}
.ele_fd_icon_btn:hover {
    background: var(--fd-input);
}
.ele_fd_icon_btn_plain {
    border-color: transparent;
    background: transparent;
}
.ele_fd_me_btn {
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--fd-surface);
    box-shadow: 0 0 0 1px var(--fd-border);
}
.ele_fd_me_btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* the round buttons under a card */
.ele_fd_round {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 1px solid var(--fd-border);
    border-radius: 50%;
    background: var(--fd-surface);
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
    cursor: pointer;
    transition: transform 0.14s ease, background-color 0.18s ease;
}
.ele_fd_round:hover {
    transform: scale(1.06);
}
.ele_fd_round:active {
    transform: scale(0.94);
}
.ele_fd_round_skip {
    color: var(--fd-muted);
}
.ele_fd_round_msg {
    color: var(--fd-accent);
}
.ele_fd_round_like {
    width: 72px;
    height: 72px;
    border: 0;
    background: var(--fd-like);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.35);
}
.ele_fd_round_like:hover {
    background: var(--fd-like-hover);
}

.ele_fd_badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--fd-like);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}


/* ------------------------------- */
/* Head and tabs */
/* ------------------------------- */

.ele_fd_head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.ele_fd_title {
    flex: 1 1 auto;
    margin: 0;
    color: var(--fd-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.ele_fd_head_row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.ele_fd_tabs {
    display: flex;
    gap: 4px;
    min-width: 0;
    padding: 4px;
    border-radius: 14px;
    background: var(--fd-input);
}
.ele_fd_tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    color: var(--fd-muted) !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
    transition: background-color 0.18s ease, color 0.18s ease;
}
.ele_fd_tab:hover {
    color: var(--fd-text) !important;
}
.ele_fd_tab.active {
    background: var(--fd-surface);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.12);
    color: var(--fd-text) !important;
    font-weight: 700;
}


/* ------------------------------- */
/* Cards: photos */
/* ------------------------------- */

.ele_fd_media {
    position: relative;
    overflow: hidden;
    background: var(--fd-photo-bg);
    user-select: none;
    -webkit-user-select: none;
}
.ele_fd_photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.ele_fd_photo.is-active {
    opacity: 1;
}
.ele_fd_segs {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    gap: 4px;
}
.ele_fd_segs span {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
}
.ele_fd_segs span.is-active {
    background: rgba(255, 255, 255, 0.95);
}
.ele_fd_tap {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.ele_fd_tap_prev {
    left: 0;
    width: 40%;
}
.ele_fd_tap_next {
    right: 0;
    width: 60%;
}
.ele_fd_stamp {
    position: absolute;
    top: 46px;
    z-index: 4;
    padding: 6px 14px;
    border: 3px solid #ffffff;
    border-radius: 12px;
    color: #ffffff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.04em;
    opacity: 0;
    pointer-events: none;
}
.ele_fd_stamp_like {
    left: 22px;
    transform: rotate(-12deg);
    background: var(--fd-like);
}
.ele_fd_stamp_skip {
    right: 22px;
    transform: rotate(12deg);
    background: #374151;
}
.ele_fd_likes_you {
    position: absolute;
    top: 22px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--fd-like);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}


/* the photo column with its thumbnails */
.ele_fd_gallery,
.ele_fd_profile_gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.ele_fd_thumbs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}
.ele_fd_thumb {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--fd-photo-bg);
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.18s ease, border-color 0.18s ease;
}
.ele_fd_thumb:hover {
    opacity: 0.9;
}
.ele_fd_thumb.is-active {
    border-color: var(--fd-accent);
    opacity: 1;
}
.ele_fd_thumb:focus-visible {
    outline: 2px solid var(--fd-accent);
    outline-offset: 2px;
}
.ele_fd_thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ------------------------------- */
/* Cards: text */
/* ------------------------------- */

.ele_fd_name_row,
.ele_fd_profile_name {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ele_fd_name {
    margin: 0;
    color: inherit;
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.ele_fd_name span {
    font-weight: 500;
}
.ele_fd_verified {
    flex: none;
}
.ele_fd_open {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
}
.ele_fd_presence {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 500;
}
.ele_fd_dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fd-online);
}
.ele_fd_dot.is-off {
    background: #9ca3af;
}
.ele_fd_chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.ele_fd_chip {
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--fd-input);
    color: var(--fd-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}
.ele_fd_chip.is-common {
    background: var(--fd-accent-soft);
    color: var(--fd-accent);
    font-weight: 700;
}
.ele_fd_chip_goal {
    background: var(--fd-like-soft);
    color: var(--fd-like);
    font-weight: 700;
}
.ele_fd_about {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-line;
}
.ele_fd_prompt {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--fd-inner);
}
.ele_fd_prompt_q {
    margin: 0;
    color: var(--fd-muted);
    font-size: 13px;
    font-weight: 700;
}
.ele_fd_prompt_a {
    margin: 4px 0 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}
.ele_fd_open_link {
    display: inline-block;
    margin-top: 12px;
    color: var(--fd-accent) !important;
    font-size: 14px;
    font-weight: 600;
}


/* ------------------------------- */
/* The feed */
/* ------------------------------- */

.ele_fd_stack {
    position: relative;
}
.ele_fd_card {
    display: none;
    position: relative;
    touch-action: pan-y;
}
.ele_fd_card.is-current {
    display: grid;
    z-index: 2;
}
.ele_fd_card.is-next {
    display: grid;
    position: absolute;
    inset: 0;
    z-index: 1;
    transform: scale(0.96) translateY(10px);
    opacity: 0.6;
    pointer-events: none;
}
.ele_fd_card.is-dragging {
    transition: none !important;
}
.ele_fd_card.is-leaving {
    transition: transform 0.32s ease, opacity 0.32s ease;
    pointer-events: none;
}
.ele_fd_card.is-back {
    transition: transform 0.22s ease;
}

.ele_fd_actions {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 22px;
    padding: 14px 0 4px;
}
.ele_fd_action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--fd-muted);
    font-size: 12px;
    font-weight: 600;
}
.ele_fd_action .ele_fd_round_like {
    margin-top: -6px;
}
.ele_fd_action kbd {
    display: none;
    padding: 1px 5px;
    border: 1px solid var(--fd-border);
    border-radius: 6px;
    background: var(--fd-inner);
    color: var(--fd-muted);
    font-family: inherit;
    font-size: 11px;
    box-shadow: none;
}

.ele_fd_empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 28px;
    border: 1px solid var(--fd-border);
    border-radius: var(--fd-radius);
    background: var(--fd-surface);
    color: var(--fd-like);
    text-align: center;
}
.ele_fd_empty h2 {
    margin: 4px 0 0;
    color: var(--fd-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 20px;
    font-weight: 800;
}
.ele_fd_empty p {
    max-width: 360px;
    margin: 0 0 6px;
    color: var(--fd-muted);
    font-size: 14px;
    line-height: 1.45;
}


/* ------------------------------- */
/* Boxes */
/* ------------------------------- */

.ele_fd_box,
.ele_fd_card_box {
    padding: 16px;
    border: 1px solid var(--fd-border);
    border-radius: 20px;
    background: var(--fd-surface);
}
.ele_fd_box_head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}
.ele_fd_box_head h2 {
    flex: 1;
    display: flex;
    align-items: center;
    margin: 0;
    color: var(--fd-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 800;
}
.ele_fd_box_head a {
    color: var(--fd-accent) !important;
    font-size: 13px;
    font-weight: 600;
}
.ele_fd_box_title {
    margin: 0 0 6px;
    color: var(--fd-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
}
.ele_fd_box_text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}
.ele_fd_box_answer {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.ele_fd_box_note {
    margin: 10px 0 0;
    color: var(--fd-faint);
    font-size: 12px;
}
.ele_fd_chips_light {
    margin-top: 0;
}
.ele_fd_subtitle {
    margin: 0 0 12px;
    color: var(--fd-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 800;
}
.ele_fd_lead {
    margin: 0 0 14px;
    color: var(--fd-muted);
    font-size: 14px;
    line-height: 1.45;
}
.ele_fd_hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--fd-inner);
    color: var(--fd-muted);
    font-size: 14px;
    line-height: 1.4;
}
.ele_fd_hint_like {
    border: 1px solid var(--fd-like-line);
    background: var(--fd-like-soft);
    color: var(--fd-like-ink);
}
.ele_fd_hint_like svg {
    flex: none;
    color: var(--fd-like);
}
.ele_fd_hint_info {
    flex-wrap: wrap;
    justify-content: space-between;
    border: 1px solid var(--fd-accent-line);
    background: var(--fd-accent-soft);
    color: var(--fd-text);
}


/* ------------------------------- */
/* Who liked the viewer */
/* ------------------------------- */

.ele_fd_likes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.ele_fd_like {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--fd-border);
    border-radius: 18px;
    background: var(--fd-surface);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.ele_fd_like.is-gone {
    opacity: 0;
    transform: scale(0.94);
}
.ele_fd_like_photo {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    background: var(--fd-photo-bg);
    color: #ffffff !important;
}
.ele_fd_like_photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ele_fd_like_photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 12, 18, 0.8) 0%, rgba(10, 12, 18, 0) 50%);
}
.ele_fd_like_name,
.ele_fd_like_goal {
    position: absolute;
    left: 12px;
    right: 12px;
    z-index: 1;
}
.ele_fd_like_name {
    bottom: 28px;
    font-size: 17px;
    font-weight: 800;
}
.ele_fd_like_goal {
    bottom: 10px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.92;
}
.ele_fd_like_note {
    margin: 10px 10px 0;
    padding: 8px 10px;
    border-radius: 12px 12px 12px 4px;
    background: var(--fd-accent-soft);
    color: var(--fd-text);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.ele_fd_like_btns {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding: 10px;
}
.ele_fd_like_btns .ele_fd_btn {
    flex: 1;
    min-height: 40px;
    padding: 0;
}


/* ------------------------------- */
/* All profiles */
/* ------------------------------- */

.ele_fd_tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.ele_fd_tile {
    display: block;
    color: #ffffff !important;
    text-decoration: none !important;
}
.ele_fd_tile_photo {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: var(--fd-photo-bg);
    transition: transform 0.18s ease;
}
.ele_fd_tile:hover .ele_fd_tile_photo {
    transform: translateY(-2px);
}
.ele_fd_tile_photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ele_fd_tile_photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 12, 18, 0.82) 0%, rgba(10, 12, 18, 0) 48%);
}
.ele_fd_tile_badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(10, 12, 18, 0.6);
    font-size: 11px;
    font-weight: 700;
}
.ele_fd_tile_badge.is-pair,
.ele_fd_tile_badge.is-likes {
    background: var(--fd-like);
}
.ele_fd_tile_online {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #22c55e;
}
.ele_fd_tile_text {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ele_fd_tile_name {
    overflow: hidden;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ele_fd_tile_goal {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.92;
}
.ele_fd_more {
    margin-top: 14px;
}


/* ------------------------------- */
/* The pairs */
/* ------------------------------- */

.ele_fd_fresh {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}
.ele_fd_fresh::-webkit-scrollbar {
    display: none;
}
.ele_fd_fresh_item {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 76px;
    color: var(--fd-text) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
}
.ele_fd_fresh_ring {
    display: block;
    width: 72px;
    height: 72px;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E11D48, #F97316);
}
.ele_fd_fresh_ring img {
    width: 100%;
    height: 100%;
    border: 2px solid var(--fd-surface);
    border-radius: 50%;
    object-fit: cover;
}
.ele_fd_pair {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--fd-border);
    transition: opacity 0.25s ease;
}
.ele_fd_pair:first-of-type {
    border-top: 0;
}
.ele_fd_pair.is-gone {
    opacity: 0;
}
.ele_fd_pair_avatar {
    position: relative;
    flex: none;
    width: 52px;
    height: 52px;
}
.ele_fd_pair_avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.ele_fd_pair_avatar .ele_fd_dot {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--fd-surface);
}
.ele_fd_pair_body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ele_fd_pair_name {
    color: var(--fd-text) !important;
    font-size: 15px;
    font-weight: 700;
}
.ele_fd_pair_meta {
    overflow: hidden;
    color: var(--fd-muted);
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ele_fd_new {
    margin-left: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--fd-like);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}
.ele_fd_pair .ele_fd_btn {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}


/* ------------------------------- */
/* Side column */
/* ------------------------------- */

.ele_fd_side_pairs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ele_fd_side_pair {
    display: block;
    width: 52px;
    height: 52px;
    padding: 3px;
    border-radius: 50%;
    background: var(--fd-border);
}
.ele_fd_side_pair.is-new {
    background: linear-gradient(135deg, #E11D48, #F97316);
}
.ele_fd_side_pair img {
    width: 100%;
    height: 100%;
    border: 2px solid var(--fd-surface);
    border-radius: 50%;
    object-fit: cover;
}
.ele_fd_side_note {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--fd-like-soft);
    color: var(--fd-like-ink);
    font-size: 13px;
    line-height: 1.4;
}
.ele_fd_side_likes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.ele_fd_side_likes a {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: var(--fd-photo-bg);
}
.ele_fd_side_likes img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ele_fd_side_muted {
    margin: 0 0 10px;
    color: var(--fd-muted);
    font-size: 13px;
    line-height: 1.4;
}
.ele_fd_side_muted:last-child {
    margin-bottom: 0;
}
.ele_fd_progress {
    height: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--fd-input);
}
.ele_fd_progress span {
    display: block;
    height: 100%;
    background: var(--fd-accent);
}


/* ------------------------------- */
/* A profile */
/* ------------------------------- */

.ele_fd_profile_top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.ele_fd_profile_top_title {
    flex: 1;
    color: var(--fd-muted);
    font-size: 15px;
    font-weight: 600;
}
.ele_fd_profile_grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ele_fd_profile_gallery .ele_fd_media_page {
    aspect-ratio: 4 / 5;
    border-radius: var(--fd-radius);
}
.ele_fd_profile_body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ele_fd_profile_body > .ele_fd_presence {
    margin: -8px 0 0;
    color: var(--fd-muted);
}
.ele_fd_profile_body .ele_fd_hint {
    margin: 0;
}
.ele_fd_facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.ele_fd_facts span {
    display: block;
    color: var(--fd-muted);
    font-size: 12px;
    font-weight: 600;
}
.ele_fd_facts b {
    display: block;
    margin-top: 2px;
    font-size: 15px;
}
.ele_fd_profile_actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 4px 0;
}
.ele_fd_profile_actions .ele_fd_hint {
    flex: 1;
}


/* ------------------------------- */
/* The viewer's own profile */
/* ------------------------------- */

.ele_fd_me {
    width: 100%;
}
.ele_fd_me_head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.ele_fd_title_me {
    font-size: 26px;
}
.ele_fd_gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 24px;
    color: var(--fd-muted);
    text-align: center;
}
.ele_fd_gate h2 {
    margin: 0;
    color: var(--fd-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 20px;
    font-weight: 800;
}
.ele_fd_gate p {
    max-width: 380px;
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.45;
}
.ele_fd_form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--fd-border);
    border-radius: var(--fd-radius);
    background: var(--fd-surface);
}
.ele_fd_steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
.ele_fd_steps span {
    height: 4px;
    border-radius: 2px;
    background: var(--fd-input);
}
.ele_fd_steps span.is-done {
    background: var(--fd-accent);
}
.ele_fd_step_count {
    margin: -8px 0 0;
    color: var(--fd-muted);
    font-size: 13px;
    font-weight: 600;
}
.ele_fd_step {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.ele_fd_form:not(.is-wizard) .ele_fd_step + .ele_fd_step {
    padding-top: 18px;
    border-top: 1px solid var(--fd-border);
}
.ele_fd_form.is-wizard .ele_fd_step:not(.is-current) {
    display: none;
}
.ele_fd_step_title {
    float: none;
    width: auto;
    margin: 0 0 4px;
    color: var(--fd-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.ele_fd_step_lead {
    margin: 0 0 14px;
    color: var(--fd-muted);
    font-size: 14px;
    line-height: 1.45;
}
.ele_fd_field {
    min-width: 0;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}
.ele_fd_field legend,
.ele_fd_label {
    display: block;
    float: none;
    width: auto;
    margin: 0 0 8px;
    color: var(--fd-muted);
    font-size: 13px;
    font-weight: 700;
}
.ele_fd_field legend small {
    font-weight: 500;
}
.ele_fd_input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--fd-border);
    border-radius: 14px;
    background: var(--fd-surface);
    color: var(--fd-text);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.ele_fd_input:focus {
    border-color: var(--fd-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--fd-accent-soft);
}
textarea.ele_fd_input {
    resize: vertical;
}
.ele_fd_select {
    appearance: auto;
}
.ele_fd_counter {
    display: block;
    margin-top: 4px;
    color: var(--fd-faint);
    font-size: 12px;
    text-align: right;
}
.ele_fd_prompt_field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    background: var(--fd-inner);
}

/* photos of the form */
.ele_fd_photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.ele_fd_photo_slot,
.ele_fd_photo_add {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
}
.ele_fd_photo_slot {
    background: var(--fd-photo-bg);
}
.ele_fd_photo_slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ele_fd_photo_remove {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(10, 12, 18, 0.6);
    color: #ffffff;
    cursor: pointer;
}
.ele_fd_photo_cover {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 4px 8px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #111827;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.ele_fd_photo_slot:first-child .ele_fd_photo_cover {
    background: var(--fd-accent);
    color: var(--fd-accent-ink);
    cursor: default;
}
.ele_fd_photo_slot:not(:first-child) .ele_fd_photo_cover {
    opacity: 0.85;
}
.ele_fd_photo_slot:not(:first-child) .ele_fd_photo_cover::before {
    content: "Сделать ";
}
.ele_fd_photo_add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    border: 2px dashed var(--fd-border);
    background: var(--fd-inner);
    color: var(--fd-accent);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.ele_fd_photo_add input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.ele_fd_photo_add.is-busy {
    opacity: 0.6;
    pointer-events: none;
}
.ele_fd_pick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-height: 320px;
    margin-top: 12px;
    padding: 10px;
    overflow-y: auto;
    border-radius: 16px;
    background: var(--fd-inner);
}
.ele_fd_pick button {
    aspect-ratio: 1;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--fd-photo-bg);
    cursor: pointer;
}
.ele_fd_pick button:hover {
    border-color: var(--fd-accent);
}
.ele_fd_pick button.is-picked {
    border-color: var(--fd-accent);
    opacity: 0.5;
}
.ele_fd_pick img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ele_fd_pick_empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 12px;
    color: var(--fd-muted);
    font-size: 13px;
    text-align: center;
}

/* choices */
.ele_fd_locked {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--fd-inner);
    color: var(--fd-muted);
    font-size: 14px;
}
.ele_fd_locked b {
    color: var(--fd-text);
}
.ele_fd_segment {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--fd-input);
}
.ele_fd_segment label,
.ele_fd_pill,
.ele_fd_goal {
    position: relative;
    margin: 0;
    cursor: pointer;
}
.ele_fd_segment input,
.ele_fd_pill input,
.ele_fd_goal input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ele_fd_segment span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 10px;
    color: var(--fd-muted);
    font-size: 14px;
    font-weight: 600;
}
.ele_fd_segment input:checked + span {
    background: var(--fd-surface);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.12);
    color: var(--fd-text);
    font-weight: 700;
}
.ele_fd_segment input:focus-visible + span,
.ele_fd_pill input:focus-visible + span,
.ele_fd_goal input:focus-visible + span {
    outline: 2px solid var(--fd-accent);
    outline-offset: 2px;
}
.ele_fd_goals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.ele_fd_goal span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 56px;
    height: 100%;
    padding: 10px 14px;
    border: 1px solid var(--fd-border);
    border-radius: 14px;
    background: var(--fd-surface);
}
.ele_fd_goal b {
    color: var(--fd-text);
    font-size: 15px;
}
.ele_fd_goal small {
    color: var(--fd-muted);
    font-size: 12px;
}
.ele_fd_goal input:checked + span {
    border: 2px solid var(--fd-accent);
    padding: 9px 13px;
    background: var(--fd-accent-soft);
}
.ele_fd_pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ele_fd_pill span {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 13px;
    border: 1px solid var(--fd-border);
    border-radius: 999px;
    background: var(--fd-surface);
    color: var(--fd-muted);
    font-size: 13px;
    font-weight: 600;
}
.ele_fd_pill input:checked + span {
    border-color: var(--fd-accent);
    background: var(--fd-accent-soft);
    color: var(--fd-accent);
    font-weight: 700;
}
.ele_fd_pill input:disabled:not(:checked) + span {
    opacity: 0.45;
    cursor: not-allowed;
}
.ele_fd_ages {
    display: flex;
    gap: 10px;
}
.ele_fd_ages label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--fd-muted);
    font-size: 14px;
    font-weight: 600;
}
/* "от" / "до" stay one word; the field takes the rest */
.ele_fd_ages label span {
    flex: none;
    white-space: nowrap;
}
.ele_fd_ages .ele_fd_input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}
.ele_fd_rules {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    counter-reset: fd-rule;
}
.ele_fd_rules li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--fd-inner);
    font-size: 14px;
    line-height: 1.4;
    counter-increment: fd-rule;
}
.ele_fd_rules li::before {
    content: counter(fd-rule);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--fd-accent);
    color: var(--fd-accent-ink);
    font-size: 13px;
    font-weight: 700;
}
.ele_fd_agree {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    cursor: pointer;
}
.ele_fd_agree input {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--fd-accent);
}
.ele_fd_agree a {
    color: var(--fd-accent) !important;
    font-weight: 600;
}
.ele_fd_form_error {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--fd-like-soft);
    color: var(--fd-like-ink);
    font-size: 14px;
    font-weight: 600;
}
.ele_fd_form_btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ele_fd_form_btns .js_fd-step-next,
.ele_fd_form_btns .js_fd-submit {
    flex: 1;
}


/* ------------------------------- */
/* Layers */
/* ------------------------------- */

body.ele_fd_locked_scroll {
    overflow: hidden;
}

.ele_fd_layer {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ele_fd_match {
    overflow-y: auto;
    padding: 28px;
    background: rgba(12, 14, 22, 0.94);
    color: #ffffff;
    animation: fd-fade 0.25s ease;
}
.ele_fd_match_inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 380px;
    margin: auto;
    text-align: center;
}
.ele_fd_match_pics {
    position: relative;
    width: 260px;
    height: 160px;
}
.ele_fd_match_pics img {
    position: absolute;
    top: 10px;
    width: 140px;
    height: 140px;
    border: 5px solid #0c0e16;
    border-radius: 50%;
    background: #2a2a2a;
    object-fit: cover;
}
.ele_fd_match_me {
    left: 0;
    transform: rotate(-6deg);
}
.ele_fd_match_them {
    right: 0;
    transform: rotate(6deg);
}
.ele_fd_match_heart {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border: 5px solid #0c0e16;
    border-radius: 50%;
    background: #E11D48;
    color: #ffffff;
    transform: translate(-50%, -50%);
    animation: fd-beat 0.9s ease 0.2s;
}
.ele_fd_match h2 {
    margin: 0;
    color: #ffffff;
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.ele_fd_match p {
    margin: 0 0 6px;
    color: #d1d5db;
    font-size: 16px;
    line-height: 1.45;
}
.ele_fd_match p b {
    color: #ffffff;
}

.ele_fd_sheet_layer {
    align-items: flex-end;
    background: rgba(12, 14, 22, 0.55);
    animation: fd-fade 0.2s ease;
}
.ele_fd_sheet {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 24px 24px 0 0;
    background: var(--fd-surface);
    color: var(--fd-text);
    animation: fd-rise 0.25s ease;
}
.ele_fd_sheet_grip {
    align-self: center;
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background: var(--fd-border);
}
.ele_fd_sheet_title {
    margin: 0;
    color: var(--fd-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 20px;
    font-weight: 800;
}
.ele_fd_sheet_note {
    margin: -4px 0 0;
    color: var(--fd-muted);
    font-size: 13px;
    line-height: 1.4;
}
.ele_fd_sheet .ele_fd_field {
    margin-bottom: 4px;
}
.ele_fd_sheet_btns {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.ele_fd_sheet_btns .ele_fd_btn {
    flex: 1;
    min-height: 50px;
}
.ele_fd_switch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.ele_fd_switch span {
    flex: 1;
}
.ele_fd_switch input {
    position: absolute;
    opacity: 0;
}
.ele_fd_switch i {
    position: relative;
    flex: none;
    width: 46px;
    height: 28px;
    border-radius: 14px;
    background: #d1d5db;
    transition: background-color 0.15s ease;
}
.ele_fd_switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: left 0.15s ease;
}
.ele_fd_switch input:checked + i {
    background: var(--fd-accent);
}
.ele_fd_switch input:checked + i::after {
    left: 21px;
}
.ele_fd_switch input:focus-visible + i {
    outline: 2px solid var(--fd-accent);
    outline-offset: 2px;
}

@keyframes fd-fade {
    from { opacity: 0; }
}
@keyframes fd-rise {
    from { transform: translateY(40px); opacity: 0; }
}
@keyframes fd-beat {
    40% { transform: translate(-50%, -50%) scale(1.25); }
}


/* ------------------------------- */
/* Desktop */
/* ------------------------------- */

@media (min-width: 992px) {
    .ele_fd_head_row {
        flex: none;
    }
    /* the viewer's own profile across the whole column: the photos in one row, the goals side by side */
    .ele_fd_form {
        padding: 24px 28px 28px;
    }
    .ele_fd_photos {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    .ele_fd_pick {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
    .ele_fd_goals {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .ele_fd_ages {
        max-width: 520px;
    }
    .ele_fd_segment {
        max-width: 520px;
    }
    .ele_fd_prompt_field {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }
    .ele_fd_form .js_fd-photo-pick {
        width: auto;
        align-self: flex-start;
    }
    .ele_fd_form_btns {
        justify-content: flex-end;
    }
    .ele_fd_form_btns .js_fd-step-back {
        margin-right: auto;
    }
    .ele_fd_form_btns .js_fd-step-next,
    .ele_fd_form_btns .js_fd-submit {
        flex: 0 0 auto;
        min-width: 240px;
    }
    /* the card: photos on the left, the text on the right */
    /* the card: a photo column (4:5, thumbnails under it) on the left, the text on the right */
    .ele_fd_card.is-current,
    .ele_fd_card.is-next {
        grid-template-columns: clamp(220px, 42%, 300px) minmax(0, 1fr);
        align-items: start;
        gap: 24px;
        min-height: 420px;
        padding: 20px;
        border: 1px solid var(--fd-border);
        border-radius: var(--fd-radius);
        background: var(--fd-surface);
    }
    .ele_fd_card .ele_fd_media {
        aspect-ratio: 4 / 5;
        border-radius: 18px;
    }
    .ele_fd_card .ele_fd_shade {
        display: none;
    }
    .ele_fd_info {
        display: flex;
        flex-direction: column;
        min-width: 0;
        padding-top: 4px;
    }
    .ele_fd_card .ele_fd_name {
        font-size: 32px;
    }
    .ele_fd_presence {
        color: var(--fd-muted);
    }
    .ele_fd_actions {
        gap: 20px;
        padding: 16px 0 0;
    }
    .ele_fd_action kbd {
        display: inline-block;
    }
    /* a profile: one block — the photos on the left, everything about them on the right */
    .ele_fd_profile {
        padding: 18px 24px 24px;
        border: 1px solid var(--fd-border);
        border-radius: var(--fd-radius);
        background: var(--fd-surface);
    }
    .ele_fd_profile_top {
        margin-bottom: 18px;
    }
    .ele_fd_profile_top .ele_fd_icon_btn {
        border-color: transparent;
        background: var(--fd-inner);
    }
    .ele_fd_profile_top .ele_fd_icon_btn:hover {
        background: var(--fd-input);
    }
    .ele_fd_profile_grid {
        display: grid;
        grid-template-columns: clamp(260px, 38%, 340px) minmax(0, 1fr);
        align-items: start;
        gap: 28px;
    }
    .ele_fd_profile_gallery {
        position: sticky;
        top: 76px;
    }
    .ele_fd_profile_gallery .ele_fd_media_page {
        border-radius: 18px;
    }
    .ele_fd_profile_body {
        gap: 12px;
        padding-top: 4px;
    }
    .ele_fd_profile_body .ele_fd_name {
        font-size: 34px;
    }
    .ele_fd_profile_body > .ele_fd_presence {
        margin: -4px 0 4px;
    }
    .ele_fd_profile_body .ele_fd_box {
        border-color: transparent;
        background: var(--fd-inner);
    }
    .ele_fd_profile_body .ele_fd_chip {
        background: var(--fd-surface);
    }
    .ele_fd_profile_body .ele_fd_chip.is-common {
        background: var(--fd-accent-soft);
    }
    .ele_fd_profile_actions {
        justify-content: flex-start;
        margin-top: 6px;
        padding: 16px 0 0;
        border-top: 1px solid var(--fd-border);
    }
    /* the arrows over the photos show on hover */
    .ele_fd_tap::after {
        content: "";
        position: absolute;
        top: 50%;
        width: 40px;
        height: 40px;
        margin-top: -20px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.92) center / 18px no-repeat;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        opacity: 0;
        transition: opacity 0.18s ease;
    }
    .ele_fd_tap_prev::after {
        left: 12px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 6l-6 6 6 6'/%3E%3C/svg%3E");
    }
    .ele_fd_tap_next::after {
        right: 12px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
    }
    .ele_fd_media:hover .ele_fd_tap::after {
        opacity: 1;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .ele_fd_side {
        flex-basis: 260px;
    }
}


/* ------------------------------- */
/* Tablets and phones */
/* ------------------------------- */

@media (max-width: 991px) {
    .ele_fd_side {
        display: none;
    }
    .ele_fd_title:not(.ele_fd_title_me) {
        display: none;
    }
    .ele_fd_head {
        margin-bottom: 10px;
    }
    .ele_fd_head_row {
        flex: 1 1 auto;
    }
    .ele_fd_tabs {
        flex: 1 1 auto;
    }
    .ele_fd_tab {
        flex: 1 1 auto;
        padding: 0 10px;
    }
    /* the card: one big photo, the text on it */
    .ele_fd_card.is-current,
    .ele_fd_card.is-next {
        height: max(400px, calc(100dvh - 330px));
        overflow: hidden;
        border-radius: 24px;
        box-shadow: var(--fd-shadow);
    }
    .ele_fd_card .ele_fd_gallery {
        grid-area: 1 / 1;
        display: block;
        height: 100%;
    }
    .ele_fd_card .ele_fd_media {
        height: 100%;
    }
    .ele_fd_card .ele_fd_thumbs {
        display: none;
    }
    .ele_fd_card .ele_fd_shade {
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(to top, rgba(10, 12, 18, 0.85) 0%, rgba(10, 12, 18, 0.35) 34%, rgba(10, 12, 18, 0) 56%);
        pointer-events: none;
    }
    .ele_fd_card .ele_fd_tap {
        bottom: 170px;
    }
    .ele_fd_card .ele_fd_info {
        grid-area: 1 / 1;
        align-self: end;
        z-index: 3;
        padding: 16px 18px 18px;
        color: #ffffff;
        pointer-events: none;
    }
    .ele_fd_card .ele_fd_info a {
        pointer-events: auto;
    }
    .ele_fd_card .ele_fd_open {
        display: inline-flex;
    }
    .ele_fd_card .ele_fd_chip {
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }
    .ele_fd_card .ele_fd_chip.is-common {
        border-color: transparent;
        background: rgba(255, 255, 255, 0.92);
        color: #1D4ED8;
    }
    .ele_fd_card .ele_fd_chip_goal {
        border-color: transparent;
        background: #ffffff;
        color: #111827;
    }
    .ele_fd_card .ele_fd_about {
        display: -webkit-box;
        margin-top: 10px;
        overflow: hidden;
        font-size: 14px;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        white-space: normal;
    }
    .ele_fd_card .ele_fd_prompt,
    .ele_fd_card .ele_fd_open_link {
        display: none;
    }
    .ele_fd_card .ele_fd_dot.is-off {
        background: #d1d5db;
    }
    .ele_fd_sheet_layer .ele_fd_sheet {
        max-width: none;
    }
}

@media (max-width: 668px) {
    /* "Все" is enough on a phone */
    .ele_fd_tab_more {
        display: none;
    }
    /* the tabs scroll sideways when they do not fit */
    .ele_fd_tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }
    .ele_fd_tabs::-webkit-scrollbar {
        display: none;
    }
    .ele_fd_tab {
        flex: 1 0 auto;
    }
    .ele_fd_tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .ele_fd_page {
        padding-left: 12px;
        padding-right: 12px;
    }
    .ele_fd_page.mt20 {
        margin-top: 10px !important;
    }
    .ele_fd_tab {
        font-size: 13px;
        padding: 0 8px;
    }
    .ele_fd_badge {
        margin-left: 4px;
    }
    .ele_fd_likes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .ele_fd_goals {
        grid-template-columns: minmax(0, 1fr);
    }
    .ele_fd_form {
        padding: 16px;
    }
    .ele_fd_pick {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .ele_fd_card_box {
        padding: 12px 14px;
    }
    .ele_fd_pair .ele_fd_btn {
        padding: 0 12px;
    }
}

/* narrow phones (320–400): the tabs and both buttons still fit in one row */
@media (max-width: 400px) {
    .ele_fd_head_row {
        gap: 6px;
    }
    .ele_fd_head_row .ele_fd_icon_btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    .ele_fd_tabs {
        gap: 2px;
        padding: 3px;
        border-radius: 12px;
    }
    .ele_fd_tab {
        height: 34px;
        padding: 0 6px;
        font-size: 12.5px;
    }
    .ele_fd_badge {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 11px;
    }
    .ele_fd_actions {
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ele_fd_card.is-leaving,
    .ele_fd_card.is-back,
    .ele_fd_photo,
    .ele_fd_match,
    .ele_fd_sheet,
    .ele_fd_sheet_layer,
    .ele_fd_match_heart {
        transition: none !important;
        animation: none !important;
    }
}
