/* ============================================================
   SEE YOU - Design System
   Source of truth: Figma "See You _ Dating Website" → Design System
   Loaded LAST in header.tpl so tokens & component styles win.
   Rebrand: purple #7000E3 → coral/pink #fd2e63 (+ purple→pink gradient).

   Scope: auth-flow modals only, by id -
     #ko_modal_signin, #ko_modal_signup, #ko_modal_new_signup, #ko_modal_forgot
   (NOT .ko_modal_desktop - that class is also used by search/buy_vip/complain.)
   ============================================================ */

/* ============================================================
   TYPEFACE  -  Satoshi (Fontshare / Indian Type Foundry)
   Files live in css/fonts/satoshi/ (paths are relative to THIS file).

   Two layers on purpose:
     1) static woff2 cuts for 300/400/500/700  - the fallback
     2) the variable file inside @supports      - the real thing

   A browser that understands variable fonts re-declares the family
   from the single Satoshi-Variable file and gets every weight in
   between (incl. the 600 the project uses in 3 places, for which
   Satoshi ships no static Semibold). Everything older keeps the
   four static cuts. No italics: the project uses none.
   ============================================================ */

@font-face {
    font-family: 'Satoshi';
    src: url('fonts/satoshi/Satoshi-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Satoshi';
    src: url('fonts/satoshi/Satoshi-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Satoshi';
    src: url('fonts/satoshi/Satoshi-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Satoshi';
    src: url('fonts/satoshi/Satoshi-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@supports (font-variation-settings: normal) {
    @font-face {
        font-family: 'Satoshi';
        src: url('fonts/satoshi/Satoshi-Variable.woff2') format('woff2'),
             url('fonts/satoshi/Satoshi-Variable.woff')  format('woff');
        font-weight: 300 900;
        font-style: normal;
        font-display: swap;
    }
}

:root {
    --ds-coral:        #fd2e63;
    --ds-coral-15:     rgba(253, 46, 99, .15);
    --ds-coral-bg:     #feeaef;
    --ds-purple:       #8436ec;
    --ds-gradient:     linear-gradient(90deg, #8436ec 0%, #fd2e63 100%);
    --ds-dark:         #161616;
    --ds-dark-70:      rgba(22, 22, 22, .7);
    --ds-dark-15:      rgba(22, 22, 22, .15);
    --ds-white:        #ffffff;
    --ds-radius:       12px;
    --ds-radius-pill:  100px;
    --ds-font: 'Satoshi', -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ============================================================
   FONT MIGRATION  -  retiring the old Google Fonts
   The five <link> tags are gone from header.tpl. Comfortaa and
   Montserrat were loaded but never referenced anywhere, so they
   just vanish. Philosopher and Roboto Condensed were in use, and
   the legacy rules below would fall back to a browser default if
   left alone - so they get pointed at Satoshi instead.

   Note on inheritance: `body { ... !important }` does NOT force
   descendants. An inherited value always loses to a declaration
   applied directly to an element, importance included - so the
   icon fonts (.fa / FontAwesome, codropsicons, slick) keep their
   own font-family and are untouched by this block.
   ============================================================ */

body {
    font-family: var(--ds-font) !important;   /* beats custom.css:1462 Helvetica */
}

/* form controls don't inherit font by default in any browser */
input,
select,
textarea,
button {
    font-family: inherit;
}

/* One focus for every field: a coral border, no glow. The screens set
   their own fields with more specific rules that say the same thing;
   this catches the rest, which would otherwise show bootstrap's blue
   glow (.form-control:focus in bootstrap.min.css) - e.g. the group
   selectors of the support filters on the grid pages and in the chat. */
.form-control:focus {
    border-color: var(--ds-coral);
    outline: none;
    -webkit-box-shadow: none;
            box-shadow: none;
}

/* was 'Philosopher' !important in custom.css (1474-1515) -
   same selectors, same weight, this file just loads later */
.feed_title a,
.category-tag,
.suggested,
.nav-link,
.user-tag,
#nav ul li a,
#mobile-nav-link ul li a {
    font-family: var(--ds-font) !important;
}

/* ============================================================
   SCROLLBARS  (same bar in every scrolling box)
   Legacy styled only main.custom-scroll: an 8px lane on #F5F5F5
   with an inset shadow and a grey #e0e0e0 thumb. Every other box
   that scrolls - the conversation, the list of chats, dropdowns,
   textareas - kept the browser default, so one page could show
   two different bars. One quiet bar everywhere instead: 8 lane,
   no track, a dark pill at 20 % with a 2px breathing gap that
   darkens on hover. Boxes that deliberately hide their bar (the
   photo strip) carry a class and keep winning on specificity.
   ============================================================ */
/* Firefox has no ::-webkit-scrollbar, so it gets the standard pair. It
   must stay behind this query: chrome 121 and up understand the same two
   properties and, when they are set, they win and the ::-webkit rules
   below are ignored, which left chrome drawing its own native bar. */
/* 2026-10-31: the thin lilac bar the intro frame got is the one for
   the whole site. The standard pair is set everywhere - chrome 121+
   and firefox draw exactly that bar from it; older webkit falls
   through to the ::-webkit rules below, recoloured to match. */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(132, 54, 236, .25) transparent;
}

*::-webkit-scrollbar,
.custom-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}

*::-webkit-scrollbar-track,
.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    -webkit-box-shadow: none;
}

*::-webkit-scrollbar-thumb,
.custom-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(132, 54, 236, .25);
    /* the transparent border plus content-box clipping leaves the
       pill 4 wide inside the 8 lane, so it never touches the edge */
    border: 2px solid transparent;
    background-clip: content-box;
    border-radius: var(--ds-radius-pill);
    box-shadow: none;
    -webkit-box-shadow: none;
}

*::-webkit-scrollbar-thumb:hover,
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(132, 54, 236, .45);
}

*::-webkit-scrollbar-corner,
.custom-scroll::-webkit-scrollbar-corner {
    background: transparent;
}

/* ============================================================
   GLOBAL CONTAINER  (same on every page)
   Legacy: #superwrapper is hard-capped at 1140px, sidebar
   #ko_fixed_cont floats right at 240px, content #wrapper fills
   the rest. Figma is drawn on 1920 (content ~1640 + sidebar 280).
   Widen the container and keep the sidebar/content in sync so the
   content actually fills the extra width (no island on the left).
   Only for wide screens; the mobile/tablet breakpoints below 1141px
   keep the legacy behaviour.
   ============================================================ */
@media (min-width: 1141px) {
    #superwrapper {
        width: min(1760px, calc(100% - 40px)) !important;
    }
    #ko_fixed_cont,
    #ko_fixed_cont .affix {
        width: 280px !important;   /* Figma sidebar = 280 (was 240) */
    }
    #wrapper {
        width: auto !important;    /* kill legacy fixed width so it fills */
        margin-right: 304px !important;  /* 280 sidebar + 24 gap */
        margin-left: 0 !important;
    }
    /* Bootstrap `.affix` pins the sidebar to the VIEWPORT (right:28px),
       so on a wide monitor the centred container pulls away and the
       sidebar detaches to the far right. Re-anchor the fixed sidebar to
       the container's right edge with the same centring maths, so it
       stays put on scroll AND stays aligned at any viewport width. */
    #ko_fixed_cont .affix {
        position: fixed !important;
        top: 0 !important;
        left: auto !important;
        right: calc((100vw - min(1760px, 100vw - 40px)) / 2) !important;
    }
}

/* ============================================================
   Shared modal chrome (all four auth modals)
   ============================================================ */

/* centre the modal in the viewport (bootstrap 3 pins it to the top).
   flex + margin:auto is scroll-safe: a modal taller than the screen still
   scrolls from the top instead of clipping. */
#ko_modal_signin.modal.in,
#ko_modal_signup.modal.in,
#ko_modal_new_signup.modal.in,
#ko_modal_forgot.modal.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#ko_modal_signin .modal-dialog,
#ko_modal_signup .modal-dialog,
#ko_modal_new_signup .modal-dialog,
#ko_modal_forgot .modal-dialog {
    width: 444px;
    max-width: calc(100% - 48px);
    margin: auto;
}

#ko_modal_signin .modal-content.modal-form,
#ko_modal_signup .modal-content.modal-form,
#ko_modal_new_signup .modal-content.modal-form,
#ko_modal_forgot .modal-content.modal-form {
    border: none;
    border-radius: var(--ds-radius);
    overflow: hidden;
    font-family: var(--ds-font);
    box-shadow: 0 22px 50px rgba(18, 20, 28, .12);
}

/* header: light-pink bar, coral title, close as white pill (left) */
#ko_modal_signin .modal-header,
#ko_modal_signup .modal-header,
#ko_modal_new_signup .modal-header,
#ko_modal_forgot .modal-header {
    background: var(--ds-coral-bg) !important;
    border-bottom: none;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
}
#ko_modal_signin .modal-header .modal-title,
#ko_modal_signup .modal-header .modal-title,
#ko_modal_new_signup .modal-header .modal-title,
#ko_modal_forgot .modal-header .modal-title {
    font-family: var(--ds-font);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.4px;
    color: var(--ds-coral);
    margin: 0;
}
#ko_modal_signin .modal-header .close,
#ko_modal_signup .modal-header .close,
#ko_modal_new_signup .modal-header .close,
#ko_modal_forgot .modal-header .close {
    float: none;
    margin: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ds-white);
    border-radius: var(--ds-radius-pill);
    color: var(--ds-coral) !important;
    opacity: 1 !important;
    font-size: 18px;
    line-height: 1;
    text-shadow: none;
}

/* body */
#ko_modal_signin .modal-body,
#ko_modal_signup .modal-body,
#ko_modal_new_signup .modal-body,
#ko_modal_forgot .modal-body {
    padding: 24px;
    direction: rtl;
}

/* labels */
#ko_modal_signin .form-group label,
#ko_modal_signup .form-group label,
#ko_modal_new_signup .form-group label,
#ko_modal_new_signup .modal-body > label,
#ko_modal_forgot .form-group label {
    font-family: var(--ds-font);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: -0.24px;
    color: var(--ds-dark);
    text-align: right;
    display: block;
    margin-bottom: 4px;
}

#ko_modal_signin .form-group,
#ko_modal_signup .form-group,
#ko_modal_new_signup .form-group,
#ko_modal_forgot .form-group {
    margin-bottom: 20px;
}

/* inputs & selects */
#ko_modal_signin .form-control,
#ko_modal_signup .form-control,
#ko_modal_new_signup .form-control,
#ko_modal_forgot .form-control {
    height: 48px;
    border: 1px solid var(--ds-dark-15);
    border-radius: var(--ds-radius);
    padding: 13px 16px;
    font-family: var(--ds-font);
    font-size: 16px;
    color: var(--ds-dark);
    background: var(--ds-white);
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
#ko_modal_signin .form-control::placeholder,
#ko_modal_signup .form-control::placeholder,
#ko_modal_new_signup .form-control::placeholder,
#ko_modal_forgot .form-control::placeholder {
    color: var(--ds-dark-70);
}
/* focus is the one every field on the site uses: a coral border and
   no glow (the purple ring these modals had was their own) */
#ko_modal_signin .form-control:focus,
#ko_modal_signup .form-control:focus,
#ko_modal_new_signup .form-control:focus,
#ko_modal_forgot .form-control:focus {
    border-color: var(--ds-coral);
    outline: none;
    box-shadow: none;
}
/* dropdown arrow on the left (RTL) for <select>; value flush-right */
#ko_modal_new_signup select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 44px;
    direction: rtl;
    text-align: right;
    text-align-last: right;   /* align the selected value consistently */
}

/* footer buttons: gradient primary + outlined secondary, both pills */
#ko_modal_signin .modal-footer,
#ko_modal_signup .modal-footer,
#ko_modal_new_signup .modal-footer,
#ko_modal_forgot .modal-footer {
    padding: 0 24px 24px;
    border-top: none;
    display: flex;
    gap: 16px;
    direction: rtl;
}
#ko_modal_signin .modal-footer .btn,
#ko_modal_signup .modal-footer .btn,
#ko_modal_new_signup .modal-footer .btn,
#ko_modal_forgot .modal-footer .btn {
    flex: 1 1 0;
    height: 48px;
    border-radius: var(--ds-radius-pill);
    font-family: var(--ds-font);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s, box-shadow .2s;
}
#ko_modal_signin .modal-footer .ko_btn_submit,
#ko_modal_signup .modal-footer .ko_btn_submit,
#ko_modal_new_signup .modal-footer .ko_btn_submit,
#ko_modal_forgot .modal-footer .ko_btn_submit {
    background: var(--ds-gradient) !important;
    border: none;
    color: var(--ds-white) !important;
    opacity: 1;
}
#ko_modal_signin .modal-footer .ko_btn_submit:hover,
#ko_modal_signup .modal-footer .ko_btn_submit:hover,
#ko_modal_new_signup .modal-footer .ko_btn_submit:hover,
#ko_modal_forgot .modal-footer .ko_btn_submit:hover {
    box-shadow: 0 8px 20px rgba(253, 46, 99, .3);
}
/* the secondary pill is the same everywhere: white with a 1px gradient
   ring (the report, search, VIP and confirm dialogs already had it;
   these four had a flat purple border) */
#ko_modal_signin .modal-footer .ko_btn_cancel,
#ko_modal_signup .modal-footer .ko_btn_cancel,
#ko_modal_new_signup .modal-footer .ko_btn_cancel,
#ko_modal_forgot .modal-footer .ko_btn_cancel {
    border: 1px solid transparent !important;
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box !important;
    color: var(--ds-dark) !important;
}

/* custom coral checkbox (remember-me, terms) */
#ko_modal_signin input[type="checkbox"],
#ko_modal_new_signup input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 1.5px solid var(--ds-dark-15);
    border-radius: 6px;
    background: var(--ds-white);
    cursor: pointer;
    vertical-align: middle;
    position: relative;
    margin: 0;
}
#ko_modal_signin input[type="checkbox"]:checked,
#ko_modal_new_signup input[type="checkbox"]:checked {
    background: var(--ds-coral);
    border-color: var(--ds-coral);
}
#ko_modal_signin input[type="checkbox"]:checked::after,
#ko_modal_new_signup input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ============================================================
   Register (new_sign_up) - stepper, intro, date row, stage-3 extras
   ============================================================ */

#ko_modal_new_signup .control-label.ds-intro {
    text-align: center;
    margin: 4px 0 0;
    font-family: var(--ds-font);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.24px;
    color: var(--ds-dark-70);
}

/* stepper: circles spread full width, connector line behind, numbers 01/02/03 */
#ko_modal_new_signup .ml-stepper-nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 12px 24px 4px;
}
#ko_modal_new_signup .ml-stepper-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 24px;
    left: 24px;
    height: 1.5px;
    background: var(--ds-coral-15);
    transform: translateY(-50%);
    z-index: 0;
}
#ko_modal_new_signup .ml-stepper-nav-item {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--ds-coral-15);
    border-radius: var(--ds-radius-pill);
    font-family: var(--ds-font);
    font-weight: 500;
    font-size: 14px;
    color: var(--ds-dark-70);
    background: var(--ds-white);
}
/* completed step (active, not the current one): solid coral fill */
#ko_modal_new_signup .ml-stepper-nav-item.active {
    background: var(--ds-coral);
    border-color: var(--ds-coral);
    color: var(--ds-white);
    font-weight: 700;
}
/* current step = an active step immediately before a pending one → coral ring.
   Stage 1: 01 ring; stage 2: 02 ring; stage 3: none pending → all stay filled.
   Matches Figma exactly across all three stages. */
#ko_modal_new_signup .ml-stepper-nav-item.active:has(+ .ml-stepper-nav-item.disabled) {
    background: var(--ds-white);
    color: var(--ds-coral);
    border-color: var(--ds-coral);
}
#ko_modal_new_signup .ml-stepper-nav-item span {
    position: static;
    display: block;
}
#ko_modal_new_signup .ml-stepper-nav-item span::before {
    content: '0';   /* zero-pad → 01 / 02 / 03 */
}

/* three date selects: equal thirds, full row (override serg_custom float 28/38/34) */
#ko_modal_new_signup .form-group[data-type="birthdate"] .clearfix {
    display: flex;
    gap: 16px;
    width: 100%;
}
/* bootstrap .clearfix adds ::before/::after (display:table); inside a flex
   container they become phantom flex items and steal width/gaps, so the three
   selects don't fill the row. Remove them. */
#ko_modal_new_signup .form-group[data-type="birthdate"] .clearfix::before,
#ko_modal_new_signup .form-group[data-type="birthdate"] .clearfix::after {
    display: none;
}
/* Native <select> does not reliably right-align its closed value across
   browsers, so centre the three date values for a consistent, even row.
   (arrow stays pinned left via the shared select rule) */
#ko_modal_new_signup .form-group[data-type="birthdate"] select.form-control {
    text-align: center;
    text-align-last: center;
    padding-left: 30px;
    padding-right: 12px;
}
#ko_modal_new_signup .form-group[data-type="birthdate"] .smallinput,
#ko_modal_new_signup .form-group[data-type="birthdate"] .smallinput + .smallinput,
#ko_modal_new_signup .form-group[data-type="birthdate"] .smallinput + .smallinput + .smallinput {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    float: none;
    margin: 0;
}

/* stage 3: terms line + captcha */
#ko_modal_new_signup .modal-body > span {
    display: block;
    font-family: var(--ds-font);
    font-size: 12px;
    color: var(--ds-dark-70);
    margin: 4px 0;
}
#ko_modal_new_signup .modal-body a {
    color: var(--ds-coral) !important;
    text-decoration: underline;
}
/* checkbox that precedes the terms line */
#ko_modal_new_signup .modal-body > input[type="checkbox"] {
    float: right;
    margin: 2px 0 0 8px;
}
/* captcha: image on the left, code input on the right (one row, RTL) */
#ko_modal_new_signup .ds-captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: rtl;
    margin-top: 8px;
}
#ko_modal_new_signup .ds-captcha-row .form-control {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    display: block;
}
#ko_modal_new_signup #captchaimg {
    flex: 0 0 auto;
    height: 48px;
    width: auto;
    border-radius: var(--ds-radius);
    border: 1px solid var(--ds-dark-15);
    cursor: pointer;
}

/* ============================================================
   Sign in - remember-me + forgot row
   ============================================================ */

#ko_modal_signin .modal-body .clearfix {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
#ko_modal_signin .form-group-half {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
#ko_modal_signin .form-group-half label {
    margin: 0;
    font-size: 14px;
    color: var(--ds-dark-70);
}
#ko_modal_signin .forgot-password a {
    font-family: var(--ds-font);
    font-size: 14px;
    color: var(--ds-coral) !important;
    text-decoration: underline;
}

/* ============================================================
   Sign up (quick email) - terms line
   ============================================================ */

#ko_modal_signup .modal-body > span {
    display: block;
    font-family: var(--ds-font);
    font-size: 12px;
    color: var(--ds-dark-70);
    margin-top: 12px;
}
#ko_modal_signup .modal-body a {
    color: var(--ds-coral) !important;
    text-decoration: underline;
}

/* ============================================================
   Mobile - tighten date row so 3 selects always fit
   ============================================================ */

@media (max-width: 480px) {
    #ko_modal_new_signup .form-group[data-type="birthdate"] .clearfix {
        gap: 8px;
    }
    #ko_modal_new_signup .form-group[data-type="birthdate"] select.form-control {
        padding: 13px 10px 13px 26px;
        background-position: left 8px center;
        font-size: 14px;
    }
}

/* ============================================================
   PROFILE PAGE  (account/front.tpl → #wrapper#wrapper.page-user)
   Source: Figma "Profile" node 88:26057 (own-profile view)
   Scoped to #wrapper.page-user so other pages are untouched.
   ============================================================ */

#wrapper.page-user {
    font-family: var(--ds-font);
}

/* the legacy close cross over the first photo (a.link-back, shown by
   serg_responsive.css:109 from 768 down): the bar's burger and logo
   are the way out on a tablet or phone, so the cross goes everywhere
   under 1141. Desktop never showed it. */
@media (max-width: 1140px) {
    #wrapper.page-user a.link-back {
        display: none !important;
    }
}

/* Container width + sidebar alignment are handled globally in the GLOBAL
   CONTAINER block near the top of this file (superwrapper widened, #wrapper
   fills, #ko_fixed_cont .affix re-anchored to the container edge). */

/* ---- Photo gallery (top strip, rounded, clipped) ---------- */
/* Figma: container radius-12 overflow-clip, photos 338x391 in a
   horizontal strip. Template is a lightbox grid (no slider markup);
   we make it a rounded, horizontally-scrollable strip.            */
#wrapper.page-user .photo-gallery-wrapper {
    height: auto;              /* override legacy 150px clamp */
    background: transparent;   /* override legacy blue #02538c */
    border-radius: var(--ds-radius);
    overflow: hidden;
    margin-bottom: 40px;
}
#wrapper.page-user .photo_gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    direction: ltr;
}
#wrapper.page-user .photo_gallery::-webkit-scrollbar { display: none; }

#wrapper.page-user .photo_gallery .gallery-item {
    position: relative;
    flex: 0 0 338px;
    width: 338px;
    height: 391px;
    display: block;
    overflow: hidden;
}
#wrapper.page-user .photo_gallery .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- No photo at all: placeholder must read as one gallery tile ----
   The template swaps the whole strip for .photo-gallery-placeholder > img,
   and the legacy CSS drew that as a 150x150 image on a full width #414141
   band. Give it the exact tile geometry instead, so the profile looks the
   same whether or not a photo is set.                                */
#wrapper.page-user .photo-gallery-placeholder {
    width: 338px;
    height: 391px;
    background: #f6f6f6;
    border-radius: var(--ds-radius);
    overflow: hidden;
    margin-bottom: 40px;
}
#wrapper.page-user .photo-gallery-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Private photo: blurred image + glass badge (bottom-right) */
#wrapper.page-user .photo_gallery .gallery-item:has(.private-toggle) img {
    filter: blur(24px) !important;   /* beat global `img{filter:…!important}` in custom.css */
    -webkit-filter: blur(24px) !important;
    transform: scale(1.1);           /* hide blur edge bleed */
}
#wrapper.page-user .photo_gallery .private-toggle {
    position: absolute;
    top: auto;            /* override legacy top:10px so bottom wins */
    left: auto;
    bottom: 12px;
    right: 12px;
    height: auto;         /* override legacy fixed 24px */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    padding: 8px 16px;
    border-radius: var(--ds-radius);
    background: rgba(22, 22, 22, .1);
    -webkit-backdrop-filter: blur(50px);
    backdrop-filter: blur(50px);
    color: var(--ds-white);
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}
#wrapper.page-user .photo_gallery .private-toggle i { font-size: 20px; }

/* ---- Own photos: the gear button and the menu under it ----------------
   Only the member's own gallery (/account) carries `.buttons`, and the
   legacy stylesheet drew it as a dark veil over the whole photo, with a
   bordered circle for the trigger and a menu stretched to the photo's
   width, with a black rule under every row.
   The mockup leaves the photo untouched, puts a 40x40 glass square in the
   corner (same recipe as the private badge above) and hangs a white card
   under it that is only as wide as its longest line: 12px inset, 4px under
   the button, 10/16 padding, rows 33 tall, 14px labels, icon on the right
   of the label and no rules between the rows.                          */
#wrapper.page-user .photo-gallery-wrapper .buttons {
    background: transparent !important;   /* legacy rgba(0,0,0,.2) veil */
    padding-top: 0 !important;
}
#wrapper.page-user .photo-gallery-wrapper .buttons .dropdown-toggle {
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    border-radius: var(--ds-radius) !important;
    background: rgba(22, 22, 22, .1) !important;
    -webkit-backdrop-filter: blur(50px);
    backdrop-filter: blur(50px);
    box-shadow: none !important;
}
#wrapper.page-user .photo-gallery-wrapper .buttons .dropdown-toggle i {
    font-size: 22px;
    line-height: 1;
    color: var(--ds-white);
}
#wrapper.page-user .photo-gallery-wrapper .buttons .dropdown-menu {
    top: 56px;           /* 12 inset + 40 button + 4 gap */
    left: 12px;
    right: auto;
    width: max-content;
    min-width: 0;
    max-width: calc(100% - 24px);
    margin: 0;
    padding: 10px 0;
    border: none;
    border-radius: var(--ds-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .12);
    background: var(--ds-white);
    overflow: hidden;
}
#wrapper.page-user .photo-gallery-wrapper .buttons .dropdown-menu li a {
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* rtl: rows start at the right edge */
    gap: 12px;
    height: 33px;
    padding: 0 16px;
    border-bottom: none;
    background: transparent;
    font-family: var(--ds-font);
    font-size: 14px;
    line-height: 33px;
    color: var(--ds-dark);
    white-space: nowrap;
}
#wrapper.page-user .photo-gallery-wrapper .buttons .dropdown-menu li a:hover,
#wrapper.page-user .photo-gallery-wrapper .buttons .dropdown-menu li a:focus {
    background: #f6f6f6;
    color: var(--ds-dark);
}
#wrapper.page-user .photo-gallery-wrapper .buttons .dropdown-menu li a i {
    flex: 0 0 16px;
    width: 16px;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    color: var(--ds-dark);
}
#wrapper.page-user .photo-gallery-wrapper .buttons .dropdown-menu li a span {
    display: inline;
}

/* ---- Gallery when bxSlider is active (real site loads bxslider JS) ----
   bxSlider wraps .photo_gallery in .bx-wrapper > .bx-viewport and caps the
   viewport at a fixed width (shows ~2 photos) with grey sprite arrows.
   Make it fill the container (rounded strip, more photos) and restyle the
   prev/next controls as Figma's white/purple 56px circular arrows.        */
#wrapper.page-user .photo-gallery-wrapper .bx-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 40px !important;
    border-radius: var(--ds-radius);
    overflow: hidden;
    box-shadow: none;
    background: transparent;
}
#wrapper.page-user .photo-gallery-wrapper .bx-viewport {
    width: 100% !important;
    height: 391px !important;
    left: 0 !important;
    border-radius: var(--ds-radius);
}
#wrapper.page-user .photo-gallery-wrapper .bx-controls-direction a {
    width: 56px !important;
    height: 56px !important;
    margin-top: -28px !important;
    border-radius: 50% !important;
    background: var(--ds-white) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .24) !important;
    text-indent: 0 !important;
    z-index: 60;
}
/* the mockup draws a full 24x18 arrow with a tail, painted with the brand
   gradient, not a chevron: a mask over the gradient gives both at once  */
#wrapper.page-user .photo-gallery-wrapper .bx-controls-direction a::before {
    content: '';
    position: absolute;
    top: 19px;              /* (56 - 18) / 2 */
    width: 24px;
    height: 18px;
    border: none;
    /* the mockup paints the arrow with the middle slice of the brand
       gradient, so the head reads magenta rather than blue violet   */
    background: linear-gradient(90deg, #b332b5 0%, #f32e6d 100%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 9H1.5'/%3E%3Cpath d='M9.5 1 1.5 9l8 8'/%3E%3C/svg%3E") center / 24px 18px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 9H1.5'/%3E%3Cpath d='M9.5 1 1.5 9l8 8'/%3E%3C/svg%3E") center / 24px 18px no-repeat;
}
#wrapper.page-user .photo-gallery-wrapper .bx-prev { left: 32px !important; right: auto !important; }
#wrapper.page-user .photo-gallery-wrapper .bx-prev::before { left: 16px; }
#wrapper.page-user .photo-gallery-wrapper .bx-next { right: 32px !important; left: auto !important; }
#wrapper.page-user .photo-gallery-wrapper .bx-next::before { right: 16px; transform: scaleX(-1); }

/* ---- Main row: buttons (left 305) + info list (right 1215) - */
#wrapper.page-user > .clearfix {
    display: flex;
    direction: ltr;      /* buttons left, info right (children keep rtl) */
    align-items: flex-start;
    gap: 40px;
}
/* neutralise bootstrap grid floats/paddings inside the flex row */
#wrapper.page-user > .clearfix > .left-column,
#wrapper.page-user > .clearfix > .front-clfx {
    float: none;
    padding: 0;
    margin: 0;
}
#wrapper.page-user > .clearfix > .left-column {
    flex: 0 0 305px;
    max-width: 305px;
}
#wrapper.page-user > .clearfix > .front-clfx {
    flex: 1 1 auto;
    min-width: 0;
}

/* ---- Left buttons column (vertical stack, centred) -------- */
#wrapper.page-user .profile-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    direction: rtl;
}
#wrapper.page-user .profile-buttons .btn-block {
    width: 100%;
    float: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 24px 0;
    margin: 0;
    border: none;
}
/* divider line between buttons (Figma "Vector 31", full width) */
#wrapper.page-user .profile-buttons .btn-block + .btn-block {
    border-top: 1px solid var(--ds-dark-15);
}
/* the 32 above an action belongs to the rule it follows. The first
   action has no rule above it on a plain profile, so it opens the
   column flush; in operator mode the <hr> under the test block
   supplies that space itself. */
#wrapper.page-user .profile-buttons > .btn-block:first-child {
    padding-top: 0;
}
/* plain 48px line icon - override legacy 70px purple circle chrome */
#wrapper.page-user .profile-buttons .btn-block > a,
#wrapper.page-user .left-column .btn-block a.ko_btn_message {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 0;
    background: none;
    color: var(--ds-dark);
    text-decoration: none;
}
#wrapper.page-user .profile-buttons .btn-block > a i,
#wrapper.page-user .left-column .btn-block a i {
    font-size: 40px;
    line-height: 48px;
    color: var(--ds-dark) !important;   /* Figma: Dark/100 - beat rebrand coral */
}
#wrapper.page-user .profile-buttons .btn-block > a { color: var(--ds-dark) !important; }
#wrapper.page-user .profile-buttons .btn-block > a:hover,
#wrapper.page-user .profile-buttons .btn-block > a:hover i { color: var(--ds-coral) !important; }
#wrapper.page-user .profile-buttons .btn-block p {
    margin: 0;
    font-family: var(--ds-font);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--ds-dark);
}

/* ---- Info list (right column) ---------------------------- */
/* legacy .front-clfx has grey borders on BOTH sides (#ccc) - replace with a
   single dark/10 divider on the left edge (the side facing the buttons). */
#wrapper.page-user .front-clfx {
    direction: rtl;
    border-right: none;
    border-left: 1px solid var(--ds-dark-15);
}
#wrapper.page-user #data {
    border-right: none;
    border-left: none;
    /* legacy padding-top:20 sat on top of the first row's own 32, which
       pushed the list out of step with the left column */
    padding: 0;
}
/* profile name - template renders this as a heading, NOT a labelled
   "שם" row like Figma (flagged to user). Styled as first list item. */
#wrapper.page-user #data .username {
    margin: 0;
    padding: 32px 0;
    border-bottom: 1px solid var(--ds-dark-15);
    font-family: var(--ds-font);
    font-size: 28px;
    line-height: 36px;
    font-weight: 700;
    color: var(--ds-dark);
    text-align: right;
    direction: rtl;
}
#wrapper.page-user #data .username span { font-weight: 700; }
#wrapper.page-user #data .username .online-sensor {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
#wrapper.page-user #data .username .online-sensor.online  { background: #2ecc71; }
#wrapper.page-user #data .username .online-sensor.offline { background: var(--ds-dark-15); }

/* the row rhythm in Figma is 136 per pair: 32 above the label, a 32
   line for it, 12 to the value, a 28 line, 32 below. Both lines run
   flush to the divider, no extra inset on the right. */
#wrapper.page-user #data .data-title {
    margin: 0;
    padding: 32px 0 0;
    font-family: var(--ds-font);
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    color: var(--ds-dark);
    text-align: right;
}
#wrapper.page-user #data .data-value {
    margin: 0;
    padding: 12px 0 32px;
    font-family: var(--ds-font);
    font-size: 20px;
    font-weight: 500;
    color: var(--ds-dark-70);
    text-align: right;
    line-height: 28px;
    /* a user-typed word with no spaces (about me) ran out of the
       column on the tablet; break it rather than overflow */
    overflow-wrap: anywhere;
    word-break: break-word;
}
#wrapper.page-user #data hr {
    margin: 0;
    border: none;
    border-top: 1px solid var(--ds-dark-15);
}
/* last row: drop trailing divider (Figma has border between rows only) */
#wrapper.page-user #data hr:last-of-type { display: none; }

/* ---- Tablet ----------------------------------------------
   Figma keeps the 338x391 tile at every width; on 768 the strip runs
   edge to edge (the 32 page gutter is cancelled), on 375 one tile
   fills the column and keeps the rounded corners. */
@media (max-width: 1140px) and (min-width: 768px) {
    #wrapper.page-user .photo-gallery-wrapper {
        width: auto;
        margin-left: -32px;
        margin-right: -32px;
        margin-bottom: 20px;
        border-radius: 0;
    }
    /* placeholder keeps the tile width, but starts at the screen edge like
       the first photo of the strip does */
    #wrapper.page-user .photo-gallery-placeholder {
        margin-left: -32px;
        margin-right: -32px;
        margin-bottom: 20px;
        border-radius: 0;
    }
}
/* ---- Stack buttons above info on narrow screens ----------- */
@media (max-width: 767px) {
    #wrapper.page-user > .clearfix {
        flex-direction: column;
        gap: 24px;
    }
    #wrapper.page-user > .clearfix > .left-column,
    #wrapper.page-user > .clearfix > .front-clfx {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
    }
    #wrapper.page-user .profile-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }
    #wrapper.page-user .profile-buttons .btn-block {
        flex: 1 1 0;
        padding: 20px 8px;
        gap: 12px;
    }
    #wrapper.page-user .profile-buttons .btn-block p {
        font-size: 15px;
        line-height: 1.3;
        white-space: normal;
    }
    #wrapper.page-user .profile-buttons .btn-block + .btn-block {
        border-top: none;
        border-right: 1px solid var(--ds-dark-15);
    }
    #wrapper.page-user #data {
        border-right: none;
    }
    #wrapper.page-user .photo-gallery-wrapper {
        margin-bottom: 24px;
    }
    /* one tile fills the strip, and bxSlider writes that width on the
       slide itself; flex-basis would win over it and stretched a slide
       to the width of the whole track */
    #wrapper.page-user .photo_gallery .gallery-item {
        flex: 0 0 auto;
        width: auto;
    }
    /* one tile fills the column, so the placeholder does too */
    #wrapper.page-user .photo-gallery-placeholder {
        width: 100%;
        margin-bottom: 24px;
    }
    #wrapper.page-user #data .username { font-size: 24px; padding-top: 24px; padding-bottom: 24px; }
    #wrapper.page-user #data .data-title { font-size: 20px; padding-top: 24px; }
    #wrapper.page-user #data .data-value { font-size: 17px; padding-bottom: 24px; }
}

/* ============================================================
   SIDEBAR  (#ko_fixed_cont)
   Figma: Design System -> Sidebar -> "Sidebar / Type=Logged", 280x1200.

   Measured off the mockup (280pt wide):
     content column   232 wide, 24 gutters both sides
     menu row         44 tall, 12 gap  -> 56 pitch
     icon             24, sits 14 in from the row's right edge
     text             16, gap 16 to the icon
     user card        232 x 76, radius 12, 1px #e8e8e8, avatar 48
   Markup is untouched: this restyles column_left.tpl as it stands.
   ============================================================ */

/* custom.css:1678 pins the whole sidebar to Helvetica with !important */
#user-menu a,
#sidebar-logo p {
    font-family: var(--ds-font) !important;
}

#ko_fixed_cont .affix {
    background: var(--ds-white);
}

/* ---- logo + tagline ---- */
/* The Figma logo is one lockup: the SEEYOU wordmark AND the Hebrew
   tagline under it, 190x68, gradient baked into the file. So the <img>
   the template prints and the <p> tagline next to it both step aside
   and the <a> itself carries the artwork. Markup stays untouched.
   NOTE: the tagline is now part of the image, i.e. no longer editable
   from admin via $logo['tagline']. Say the word if it must stay text. */
#sidebar-logo {
    padding: 40px 24px 0;
    text-align: center;
}

#sidebar-logo a {
    display: block;
    width: 190px;
    max-width: 100%;
    height: 68px;
    margin: 0 auto;
    background: url("logo.svg") no-repeat center center;
    background-size: contain;
}

#sidebar-logo a img,
#sidebar-logo p {
    display: none;
}

/* ---- user card ---- */
#user-menu {
    margin: 0;
}

#user-menu a.user_profile_link {
    display: block;
    height: 76px;
    margin: 35px 24px 32px;
    padding: 14px;
    background: var(--ds-white);
    border: 1px solid #e8e8e8;
    border-radius: var(--ds-radius);
    direction: rtl;
    overflow: hidden;
    text-decoration: none;
}

.user_profile_link img.circle {
    float: right;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

/* the two lines sit against the avatar, and a nickname that is a full
   email address is cut with an ellipsis instead of leaving the card */
#user-menu a.user_profile_link > div {
    display: block;
    margin-right: 60px;
    padding-right: 0;
    text-align: right;
}

#user-menu a.user_profile_link > div.user-nickname,
#user-menu a.user_profile_link > div.user-id {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#user-menu a.user_profile_link > div.user-nickname {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: var(--ds-dark);
}

#user-menu a.user_profile_link > div.user-id {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #8a8a8a;
}

/* the rule above the menu is not in the redesign */
#user-menu > hr {
    display: none;
}

/* ---- menu rows ---- */
#user-menu .ffspan {
    margin: 0 24px 12px;
    padding: 0 !important;
    border: none;
}

#user-menu .ffspan a {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 14px;
    border-radius: var(--ds-radius);
    font-size: 16px;
    font-weight: 500;
    color: var(--ds-dark);
    text-decoration: none;
    transition: background-color .15s ease;
}

/* direction:rtl puts the <em> first == rightmost; margin-left is the
   gap towards the label sitting to its left. */
#user-menu .ffspan a em.fa {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-left: 16px;
    font-size: 24px;
    line-height: 1;
    vertical-align: middle;
}

/* every icon in this menu is one of the remapped (masked) ones, so the
   mask can be filled with the brand gradient instead of a flat colour */
#user-menu .ffspan a em.fa:before {
    background-color: transparent;
    background-image: var(--ds-gradient);
}

#user-menu .ffspan a:hover {
    background-color: var(--ds-coral-bg);
    color: var(--ds-dark);
}

#user-menu .ffspan a.active {
    background-image: var(--ds-gradient);
    color: var(--ds-white);
}

#user-menu .ffspan a.active em.fa:before {
    background-image: none;
    background-color: var(--ds-white);
}

/* unread counter: Figma draws a quiet 24px grey disc at the far end of
   the row, not a coral alert badge (measured 24x24, #f6f6f6, 13px) */
#user-menu .ffspan a i[data-counter] {
    margin-right: auto;
    background: #f6f6f6;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 500;
    line-height: 24px;
    font-style: normal;
    text-align: center;
    color: #6a6a6a;
    float: none;
}

#user-menu .ffspan a.active i[data-counter] {
    background: var(--ds-white);
    color: var(--ds-coral);
}

/* ============================================================
   HOMEPAGE  -  user grid
   Figma: Homepage @ 1920 / 768 / 375 (exports measured at 1x)

   Measured off the mockups:
     desktop 1920  page pad-left 40, sidebar 280 flush right, gap 40
                   4 columns, 16 gap  ->  card 378
     tablet   768  page pad 32, 2 columns, 16 gap  ->  card 344
     mobile   375  page pad 24, 1 column           ->  card 328
     photo         378 tall at every width, cover
     card          radius 16, soft shadow, white
     content       name 20/700, about 14/400 #6a6a6a, actions 48 circles
     per breakpoint: desktop shows name+about+actions,
                     tablet name+about, mobile name only

   The markup (common/home.tpl + common/user_thumb.tpl) is untouched;
   the pieces the design drops are hidden per breakpoint.
   ============================================================ */

/* ---- page shell ---- */
@media (min-width: 1141px) {
    #wrapper.has-bottom-line,
    body #wrapper {
        margin-right: 320px !important;  /* 280 sidebar + 40 gap */
        margin-left: 0 !important;
        padding-left: 40px;
        width: auto !important;
    }
    #superwrapper {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    #ko_fixed_cont,
    #ko_fixed_cont .affix {
        width: 280px !important;
    }
    #ko_fixed_cont .affix {
        right: 0 !important;
        left: auto !important;
    }
}

/* ---- the grid ---- */
#wrapper .grid#grid,
#wrapper ul.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    float: none;
    width: auto;
}

#wrapper .grid > li.thumbnail,
#wrapper .grid > li.news-box {
    display: block;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 16px;
    background: var(--ds-white);
    box-shadow: 0 4px 16px rgba(22, 22, 22, .08);
    overflow: hidden;
}

/* ---- photo ---- */
#wrapper .grid > li .avatar-link {
    display: block;
    position: relative;
    height: 378px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #ededf2;
}

#wrapper .grid > li .avatar-link > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    max-width: none;
}

/* ---- text block ---- */
#wrapper .grid > li > a.open-profile {
    display: block;
    padding: 20px 16px 0;
    text-align: center;
    text-decoration: none;
}

#wrapper .grid > li .ko_grid_item_title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    color: var(--ds-dark) !important;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* the online dot sits to the LEFT of the name in RTL, i.e. after it in
   source order, which is exactly how user_thumb.tpl prints it */
#wrapper .grid > li .ko_grid_item_title .online-sensor {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 8px 2px 0;
    border-radius: 50%;
    background: var(--ds-coral);
    vertical-align: middle;
}

#wrapper .grid > li .ko_grid_item_title .online-sensor.offline {
    background: #c9c9d1;
}

/* the age line is not in the redesign */
#wrapper .grid > li .user-age {
    display: none !important;
}

#wrapper .grid > li .ko_grid_item_desc {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #6a6a6a !important;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- action buttons ---- */
#wrapper .grid > li .ko_grid_item_buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    padding: 16px 16px 20px;
    margin: 0;
    border: none !important;
    background: none;
}

#wrapper .grid > li .ko_grid_item_buttons > div {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

#wrapper .grid > li .ko_grid_item_buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--ds-white);
    box-shadow: 0 2px 10px rgba(22, 22, 22, .12);
}

#wrapper .grid > li .ko_grid_item_buttons a .fa {
    font-size: 24px;
    line-height: 1;
    width: 24px;
    height: 24px;
}

/* lock / unlock in purple, like / chat in coral - as drawn in Figma */
#wrapper .grid > li .ko_pf_request .fa:before {
    background-color: transparent;
    background-image: linear-gradient(135deg, var(--ds-purple), #b03bb0);
}

#wrapper .grid > li .ko_btn_love .fa:before,
#wrapper .grid > li .ko_link_massage .fa:before {
    background-color: transparent;
    background-image: var(--ds-gradient);
}

/* the like button reads as the primary action: a touch larger */
#wrapper .grid > li .ko_btn_love {
    width: 56px !important;
    height: 56px !important;
}

#wrapper .grid > li .ko_btn_love .fa {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

/* ============ tablet: two columns, no action row ============ */
@media (max-width: 1140px) {
    #wrapper .grid#grid,
    #wrapper ul.grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    #wrapper,
    #wrapper.has-bottom-line {
        margin: 0 !important;
        padding: 0 32px;
        width: auto !important;
    }
    #wrapper .grid > li .ko_grid_item_buttons {
        display: none;
    }
    #wrapper .grid > li > a.open-profile {
        padding-bottom: 20px;
    }
}

/* ============ mobile: one column, name only ============ */
@media (max-width: 767px) {
    #wrapper .grid#grid,
    #wrapper ul.grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    #wrapper,
    #wrapper.has-bottom-line {
        padding: 0 24px;
    }
    #wrapper .grid > li .ko_grid_item_desc {
        display: none;
    }
}

/* serg_responsive.css gives every avatar a decorative blob clip-path on
   small screens (.avatar-clip-style-1..5) and pins it to 187x262. The
   redesign draws a plain rounded rectangle, so both go. */
#wrapper .grid > li .avatar-link,
#wrapper .grid > li a.avatar-link[class*="avatar-clip-style-"] {
    clip-path: none !important;
    width: auto !important;
    height: 378px !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* The mockup draws a bare photo, but three data-driven badges can land
   on it and none of them was ever restyled: "new" was a red rectangle
   from serg_custom.css:1373, the photo counter a grey slab from
   custom.css:2007, and both used to collide with the "last active"
   pill in the bottom-right. They now share the photo's four corners at
   the same 12px inset and the same pill shape as the operator badges:
       top-left      group / id   (operator only)
       top-right     new
       bottom-left   photo count
       bottom-right  last active                                     */
#wrapper .grid > li .avatar-link .ko_new,
#wrapper .grid > li .avatar-link .images-counter {
    position: absolute;
    z-index: 2;
    height: 28px;
    padding: 0 12px !important;
    border-radius: 10px !important;
    font-family: var(--ds-font);
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 28px !important;
    color: var(--ds-white) !important;
    text-shadow: none !important;
    white-space: nowrap;
}

#wrapper .grid > li .avatar-link .ko_new {
    top: 12px;
    right: 12px;
    bottom: auto;
    left: auto;
    background: var(--ds-gradient) !important;
}

#wrapper .grid > li .avatar-link .ko_new span {
    color: var(--ds-white) !important;
}

#wrapper .grid > li .avatar-link .images-counter {
    left: 12px;
    right: auto;
    bottom: 12px;
    top: auto;
    background-color: rgba(22, 22, 22, .3) !important;
}

#wrapper .grid > li .avatar-link .images-counter .fa {
    margin-left: 6px;
    font-size: 16px;
    vertical-align: -2px;
}

/* ---- grid fixes ----
   `.grid` also carries bootstrap's .clearfix, whose ::before/::after
   become real grid items and eat the first cell (row 1 ends up with a
   single card). Same trap as the birthdate row in the signup modal. */
#wrapper .grid::before,
#wrapper .grid::after {
    content: none !important;
    display: none !important;
}

#wrapper,
#wrapper .grid > li,
#wrapper .grid > li * {
    box-sizing: border-box;
}

#wrapper .grid > li > a.open-profile,
#wrapper .grid > li .ko_grid_item_desc,
#wrapper .grid > li .ko_grid_item_title {
    display: block !important;
    height: auto !important;
    float: none !important;
    width: auto !important;
}

@media (max-width: 1140px) {
    #wrapper,
    #wrapper.has-bottom-line,
    body #wrapper {
        padding-left: 32px !important;
        padding-right: 32px !important;
        margin: 0 !important;
        width: 100% !important;
        float: none !important;
    }
}

@media (max-width: 767px) {
    #wrapper,
    #wrapper.has-bottom-line,
    body #wrapper {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

/* ---- breathing room under the last block ----
   Legacy ends every page flush with its last element, so the save button
   or the last card touches the bottom of the scroller. The mockups leave
   40px of white under the content at every width. The chat runs its own
   full height layout and the settings page already carries its own 56px,
   so both keep what they have.                                        */
#superwrapper > #wrapper:not(.message-wrapper):not(.ko_account_page) {
    padding-bottom: 40px;
}

/* rows sit further apart than columns in the mockups (24 vs 16) */
#wrapper .grid#grid,
#wrapper ul.grid {
    column-gap: 16px;
    row-gap: 24px;
}

@media (max-width: 1140px) {
    #wrapper .grid > li > a.open-profile {
        padding-bottom: 24px;
    }
}

@media (max-width: 767px) {
    #wrapper .grid > li > a.open-profile {
        padding-bottom: 20px;
    }
}

/* ---- IMPORTANT: the photo anchor carries BOTH classes ----
   user_thumb.tpl prints class="avatar-link thumb-image open-profile ...",
   so `a.open-profile` alone also selects the photo. Everything meant for
   the text block has to exclude it. */
#wrapper .grid > li > a.avatar-link {
    padding: 0 !important;
}

#wrapper .grid > li > a.open-profile:not(.avatar-link) {
    display: block !important;
    height: auto !important;
    padding: 24px 16px 0 !important;
    text-align: center;
    text-decoration: none;
}

/* legacy #grid rules set 13px + their own padding/margins on the title */
#wrapper .grid > li .ko_grid_item_title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 24px !important;
}

#wrapper .grid > li .ko_grid_item_desc {
    margin: 4px 0 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 20px !important;
}

/* the tablet card is photo + name + description (no buttons) and the
   mobile one is photo + name, so each closes its own text block:
   Figma measures 88 under the photo on 768 and 60 on 375. */
@media (max-width: 1140px) {
    #wrapper .grid > li > a.open-profile:not(.avatar-link) {
        padding-bottom: 16px !important;
    }
    /* serg_responsive.css:312 zeroes this margin with !important at a
       deeper specificity, so the selector has to reach the same depth */
    #wrapper .grid > li .ko_grid_item_desc,
    #wrapper #grid_desktop.grid-mobile > ul > li > a:not(.thumb-image) .ko_grid_item_desc {
        margin: 4px 0 0 !important;
    }
}

@media (max-width: 767px) {
    #wrapper .grid > li > a.open-profile:not(.avatar-link) {
        padding: 20px 16px 16px !important;
    }
}

/* ---- fix: don't break the only-desktop / only-mobile title toggle ----
   user_thumb.tpl prints the name twice (full + short). Forcing display
   on .ko_grid_item_title showed both. Toggle them explicitly instead. */
#wrapper .grid > li .ko_grid_item_title.only-mobile {
    display: none !important;
}

#wrapper .grid > li .ko_grid_item_title.only-desktop {
    display: block !important;
}

#wrapper .grid > li .ko_grid_item_buttons {
    padding: 16px 16px 20px;
}

@media (max-width: 767px) {
    #wrapper .grid > li .ko_grid_item_title.only-mobile {
        display: block !important;
    }
    #wrapper .grid > li .ko_grid_item_title.only-desktop {
        display: none !important;
    }
    /* the mobile card in Figma is photo + name, nothing else - but the
       liked-me list is a different card and keeps both */
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_desc,
    #wrapper #grid_desktop.grid-mobile .grid > li .user-date {
        display: none !important;
    }
}

/* the action row reads lock - like - chat from the left in Figma; the
   page is RTL, so the flex row has to run the other way */
#wrapper .grid > li .ko_grid_item_buttons {
    flex-direction: row-reverse;
}

/* top of the content column */
@media (min-width: 1141px) {
    #wrapper,
    #wrapper.has-bottom-line {
        padding-top: 40px;
    }
}

@media (max-width: 1140px) {
    #wrapper,
    #wrapper.has-bottom-line,
    body #wrapper {
        padding-top: 24px !important;
    }
}

/* ---- action buttons, corrected against the Figma export ----
   lock and chat are 48 rounded squares (r14), like is a 56 circle;
   all three are white with a soft tinted shadow, no border.
   Icon fills sampled from the export: lock #8436ec flat,
   chat #fd2e63 flat, like the purple->pink gradient. */
#wrapper .grid > li .ko_grid_item_buttons {
    gap: 32px;
}

#wrapper .grid > li .ko_grid_item_buttons a {
    width: 48px !important;
    height: 48px !important;
    border: none !important;
    border-radius: 14px;
    background: var(--ds-white) !important;
    box-shadow: 0 4px 12px rgba(22, 22, 22, .10);
}

#wrapper .grid > li .ko_pf_request {
    box-shadow: 0 4px 14px rgba(132, 54, 236, .20);
}

#wrapper .grid > li .ko_link_massage {
    box-shadow: 0 4px 14px rgba(253, 46, 99, .18);
}

#wrapper .grid > li .ko_btn_love {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 16px rgba(253, 46, 99, .22);
}

#wrapper .grid > li .ko_pf_request .fa:before {
    background-image: none;
    background-color: var(--ds-purple);
}

#wrapper .grid > li .ko_link_massage .fa:before {
    background-image: none;
    background-color: var(--ds-coral);
}

#wrapper .grid > li .ko_btn_love .fa:before {
    background-color: transparent;
    background-image: var(--ds-gradient);
}

/* the block above lost to `.ko_grid_item_buttons a`, which is more
   specific - re-state the per-button rules at the same depth */
#wrapper .grid > li .ko_grid_item_buttons a.ko_pf_request {
    box-shadow: 0 4px 14px rgba(132, 54, 236, .20);
}

#wrapper .grid > li .ko_grid_item_buttons a.ko_link_massage {
    box-shadow: 0 4px 14px rgba(253, 46, 99, .18);
}

#wrapper .grid > li .ko_grid_item_buttons a.ko_btn_love {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 16px rgba(253, 46, 99, .22);
}

#wrapper .grid > li .ko_grid_item_buttons a.ko_btn_love .fa {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

/* ============================================================
   PROFILE PAGE - two fixes found by diffing against the Figma
   export at 1920:

   1) the main row is `.clearfix`, and bootstrap's ::before/::after
      become flex items. With `gap: 40px` that inserted a phantom
      40px before the buttons column and swallowed 40px at the end,
      so the divider landed at x=426 instead of 385 and the info
      list came out 1134 wide instead of 1215.
      (Third time this bites: signup date row, homepage grid, here.)

   2) the 40px channel between content and sidebar showed the legacy
      #F8F8F8 body colour. In Figma the whole page is white.
   ============================================================ */
#wrapper.page-user > .clearfix::before,
#wrapper.page-user > .clearfix::after {
    content: none !important;
    display: none !important;
}

html,
body,
#superwrapper,
main {
    background-color: var(--ds-white) !important;
}

/* ============================================================
   BORDER AUDIT  -  every rule line, checked against the Figma
   export at 1920 by scanning both images for vertical/horizontal
   runs. Sampled colours, not guessed:

     sidebar divider   x=1640, full height, 1px #e8e8e8   (was MISSING)
     column divider    x=385,  1px #e8e8e8
     info row rules    x 426..1599, 1px #e8e8e8   (started at 386 - no inset)
     button dividers   x 40..344,  1px #f3f3f3   (lighter than the rest)

   Also removed: serg_custom.css:76 puts a second vertical line on
   .left-column (border-right #eee at x=345), so two lines sat 40px
   apart with an empty channel between them.
   ============================================================ */

:root {
    --ds-line:      #e8e8e8;
    --ds-line-soft: #f3f3f3;
}

/* 1. kill the legacy second vertical line */
#wrapper.page-user .left-column,
.page-user .left-column {
    border-right: none !important;
}

/* 2. the info list is inset 40 from the divider */
#wrapper.page-user > .clearfix > .front-clfx {
    box-sizing: border-box;
    padding-left: 40px;
    border-left: 1px solid var(--ds-line);
    border-right: none;
}

/* 3. the sidebar carries a full-height rule on its left edge -
      present on the profile AND the homepage in Figma */
@media (min-width: 1141px) {
    #ko_fixed_cont .affix {
        box-sizing: border-box;
        border-left: 1px solid var(--ds-line);
        height: 100vh;
    }
}

/* 4. exact line colours */
#wrapper.page-user #data .username,
#wrapper.page-user #data .front-list-item,
#wrapper.page-user #data > div,
#wrapper.page-user #data > p {
    border-bottom-color: var(--ds-line);
}

#wrapper.page-user .profile-buttons .btn-block + .btn-block {
    border-top-color: var(--ds-line-soft);
}

/* the legacy `.divider:after` paints its own #eee bar inside the column,
   on top of the border-top above - one line is enough */
.page-user .left-column .divider:after {
    display: none !important;
}

/* 5. custom.css:2296 rings the like button in coral with !important;
      in the profile column Figma draws a plain line icon */
#wrapper.page-user .profile-buttons a.ko_btn_love,
#wrapper.page-user .left-column a.ko_btn_love,
#wrapper.page-user .left-column .btn-block a.ko_btn_message {
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
}

/* ---- profile left column: icons ----
   Sampled the export: all three glyphs are drawn with the brand
   gradient (#ab34c0 -> #f72f6b), not Dark/100 as the earlier pass
   assumed. Size in Figma is ~43px, centred at x=192 in the 305 column. */
#wrapper.page-user .left-column .btn-block a i,
#wrapper.page-user .profile-buttons .btn-block > a i {
    font-size: 44px !important;
    width: 44px;
    height: 44px;
    line-height: 44px;
}

#wrapper.page-user .left-column .btn-block a i:before,
#wrapper.page-user .profile-buttons .btn-block > a i:before {
    background-color: transparent;
    background-image: var(--ds-gradient);
}

/* "מחובר" prints above the buttons and pushes the whole column down;
   Figma has nothing there - the column starts at the first button */
#wrapper.page-user .left-column .column_online_info {
    display: none !important;
}

/* block pitch in the left column: Figma divider-to-divider is 153
   (591 -> 744); 24px padding gave 138, so 32 it is */
#wrapper.page-user .profile-buttons .btn-block {
    padding: 32px 0;
}

/* ============================================================
   MOBILE / TABLET HEADER
   Figma: "Ipad/Menu" 768 and "Mobile/Menu" 375 (the 47px status bar
   in the export is a device mock and is not part of the web header).

   tablet  768   bar 75 tall, pad 0 32
                 logo 120x42 left | 5 nav items (icon 24 over a 14px
                 label, 26 apart) | avatar 40 | burger, 32 from right
                 dropdown holds only the 4 items not in the bar
   mobile  375   bar 63 tall, pad 0 24, logo + burger only
                 dropdown holds all 9 items

   dropdown rows 48 tall, 1px #e8e8e8 under each, label right-aligned
   with a 24px gradient icon after it (16 gap).

   Markup: column_left.tpl now always prints .header-logo, carries the
   avatar in .ko_mobile_avatar inside the bar, and the dropdown list
   has the four rows that only existed in the icon strip.
   ============================================================ */

/* The sidebar is a desktop-only element: at 1140 and below the bar
   carries the logo, the counters and the burger, and the open burger
   menu re-uses #ko_fixed_cont as its dropdown card (the 768-1140 and
   767 blocks further down bring it back with display:block !important).
   responsive.css only hid the sidebar from 768 down, so between 769
   and 1140 the page showed BOTH the bar and the sidebar, each with its
   own logo and menu. Hide it for the whole tablet range here; the
   logged-out page restores it as an in-flow block (see below). */
@media (max-width: 1140px) {
    #ko_fixed_cont {
        display: none;
    }
}

@media (max-width: 1140px) {

    #ko_mobile_header {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 26px;
        row-gap: 0;
        box-sizing: border-box;
        height: 75px;
        min-height: 75px !important;
        padding: 0 32px;
        background: var(--ds-white) !important;
        border-bottom: none !important;
        box-shadow: none !important;
    }

    /* let the children of both groups become items of the bar itself */
    #ko_mobile_icons,
    #ko_mobile_nav {
        display: contents !important;
    }

    /* right-to-left running order: burger, avatar, home, search,
       messages, likes, visitors, then the logo pushed to the far left.
       Home leads the row (it used to close it on the left) so the
       sequence reads home, search, messages, likes, visitors from the
       burger on every width. */
    #ko_mobile_nav_toggle              { order: 1; }
    #ko_mobile_header .ko_mobile_avatar { order: 2; }
    #ko_mobile_icons .ko_mob_icon:nth-child(1) { order: 3; }   /* home     */
    #ko_mobile_icons .ko_mob_icon:nth-child(5) { order: 4; }   /* search   */
    #ko_mobile_icons .ko_mob_icon:nth-child(2) { order: 5; }   /* messages */
    #ko_mobile_icons .ko_mob_icon:nth-child(3) { order: 6; }   /* likes    */
    #ko_mobile_icons .ko_mob_icon:nth-child(4) { order: 7; }   /* visitors */
    #ko_mobile_header .header-logo     { order: 9; margin-inline-start: auto; }
    #ko_mobile_nav_links               { order: 10; }

    /* ---- logo ---- */
    #ko_mobile_header .header-logo {
        width: 120px;
        height: 42px;
        margin-top: 0;
        margin-bottom: 0;
        background: url("logo.svg") no-repeat center center;
        background-size: contain;
        text-align: initial;
    }
    #ko_mobile_header .header-logo a,
    #ko_mobile_header .header-logo img,
    #ko_mobile_header .header-logo p {
        display: none;
    }
    #ko_mobile_header .header-logo a {
        display: block;
        width: 100%;
        height: 100%;
        text-indent: -9999px;
        overflow: hidden;
    }

    /* ---- nav items in the bar ---- */
    #ko_mobile_header .ko_mob_icon {
        position: relative;
        width: auto !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }
    #ko_mobile_header .ko_mob_icon > a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 0;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.2;
        color: var(--ds-dark) !important;
        text-decoration: none;
        white-space: nowrap;
    }
    #ko_mobile_header .ko_mob_icon > a > i.fa {
        display: block;
        width: 24px;
        height: 24px;
        font-size: 24px;
        line-height: 1;
        margin: 0;
    }
    #ko_mobile_header .ko_mob_icon > a > i.fa:before {
        background-color: transparent;
        background-image: var(--ds-gradient);
    }
    #ko_mobile_header .ko_mob_icon > a > span {
        display: block;
        position: static;
        font-size: 14px;
    }
    /* unread pill sits on the icon */
    #ko_mobile_header .ko_mob_icon > i[data-counter] {
        position: absolute;
        top: -4px;
        left: calc(50% + 6px);
        width: 18px;
        height: 18px;
        border-radius: 9px;
        background: var(--ds-coral);
        color: var(--ds-white);
        font: 700 11px/18px var(--ds-font);
        font-style: normal;
        text-align: center;
        display: block;
    }

    /* ---- avatar ---- */
    #ko_mobile_header .ko_mobile_avatar a {
        display: block;
        width: 40px;
        height: 40px;
    }
    #ko_mobile_header .ko_mobile_avatar img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
    }
    #ko_mobile_header .ko_mobile_avatar span {
        display: none;
    }

    /* ---- burger ---- */
    #ko_mobile_nav_toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        margin: 0 !important;
        line-height: 1 !important;
        font-size: 26px !important;
        /* every Figma frame draws the burger flat #161616, not in the
           brand gradient the rest of the bar's icons use */
        color: var(--ds-dark) !important;
    }
    #ko_mobile_nav_toggle .fa:before {
        background-color: currentColor;
        background-image: none;
    }

    /* ---- dropdown ---- */
    #ko_mobile_nav_links {
        flex: 0 0 100%;
        width: calc(100% + 64px);
        margin: 0 -32px;
        background: var(--ds-white);
        box-shadow: 0 8px 24px rgba(22, 22, 22, .10);
    }
    #ko_mobile_nav_links ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    #ko_mobile_nav_links ul > li {
        margin: 0;
        padding: 0;
        border: none;
        border-bottom: 1px solid var(--ds-line);
    }
    #ko_mobile_nav_links ul > li > a {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        height: 48px;
        padding: 0 32px;
        font-size: 16px;
        font-weight: 400;
        line-height: 48px;
        color: var(--ds-dark) !important;
        text-decoration: none;
    }
    #ko_mobile_nav_links ul > li > a > i.fa {
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
        font-size: 24px;
        line-height: 1;
        margin: 0;
    }
    #ko_mobile_nav_links ul > li > a > i.fa:before {
        background-color: transparent;
        background-image: var(--ds-gradient);
    }
    /* "מאמרים" is not in the redesign */
    #ko_mobile_nav_links ul > li > a > i.fa-book {
        display: none;
    }
    #ko_mobile_nav_links ul > li:has(> a > i.fa-book) {
        display: none;
    }
    /* on tablet the first five live in the bar already */
    #ko_mobile_nav_links ul > li:nth-child(-n+5) {
        display: none;
    }

    /* content clears the fixed bar */
    body {
        padding-top: 75px;
    }
    #wrapper,
    #wrapper.has-bottom-line,
    body #wrapper {
        padding-top: 28px !important;
    }
}

/* ============ mobile: logo, avatar and burger ============ */
@media (max-width: 767px) {
    #ko_mobile_header {
        height: 63px;
        min-height: 63px !important;
        padding: 0 24px;
    }
    #ko_mobile_header .ko_mob_icon {
        display: none !important;
    }
    /* The 375 mockup draws only the logo and the burger, but then the
       phone has no way into the profile at all: the dropdown carries the
       nine sections and none of them is "my page". Keep the same 36px
       avatar the tablet bar uses, next to the burger.               */
    #ko_mobile_header .ko_mobile_avatar {
        display: block !important;
    }
    #ko_mobile_header .ko_mobile_avatar a,
    #ko_mobile_header .ko_mobile_avatar img {
        width: 36px;
        height: 36px;
    }
    #ko_mobile_header .header-logo {
        height: 41px;
    }
    #ko_mobile_nav_links {
        width: calc(100% + 48px);
        margin: 0 -24px;
    }
    #ko_mobile_nav_links ul > li > a {
        padding: 0 24px;
    }
    /* every row shows on mobile */
    #ko_mobile_nav_links ul > li:nth-child(-n+5) {
        display: block;
    }
    #ko_mobile_nav_links ul > li:has(> a > i.fa-book) {
        display: none;
    }
    body {
        padding-top: 63px;
    }
    #wrapper,
    #wrapper.has-bottom-line,
    body #wrapper {
        padding-top: 27px !important;
    }
}

/* the document root is LTR on this site (RTL is applied per container),
   so the header bar has to declare it itself - otherwise the whole row
   and every dropdown line come out mirrored */
@media (max-width: 1140px) {
    #ko_mobile_header {
        direction: rtl;
    }
    /* <i> is the first child, so plain RTL order already puts the icon
       on the right and the label to its left - no row-reverse needed */
    #ko_mobile_nav_links ul > li > a {
        flex-direction: row;
    }
}

/* the dropdown hangs off the bar instead of being a flex item - as a
   wrapped flex line it inherited the bar's padding and came out offset */
@media (max-width: 1140px) {
    #ko_mobile_nav_links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        margin: 0;
    }
}

/* #ko_mobile_nav carries .clearfix; with display:contents its
   ::before/::after become zero-width flex items of the bar, and with
   column-gap:26 that quietly added 52px of dead space on the right.
   (Fourth appearance of this pattern: signup date row, homepage grid,
   profile main row, and now the header.) */
@media (max-width: 1140px) {
    #ko_mobile_nav::before,
    #ko_mobile_nav::after,
    #ko_mobile_header::before,
    #ko_mobile_header::after {
        content: none !important;
        display: none !important;
    }
}

/* Figma only pins 1920 / 768 / 375. A hard 4 columns between 1141 and
   1900 squeezed the card down to ~200px (Figma draws it at 378), so on
   desktop the track count follows the width and the card stays near 378:
   1920 -> 4 x 378, ~1500 -> 3 x 369, 1200 -> 2 x 412. */
@media (min-width: 1141px) {
    #wrapper .grid#grid,
    #wrapper ul.grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* ============================================================
   HOMEPAGE CARD - three things caught in review
   ============================================================ */

/* 1. serg_custom.css:1509 builds the "mutual like" icon out of TWO
      FontAwesome hearts: the glyph in ::before, nudged 6/9, plus a
      second heart in ::after (content "\f004") hanging below-right
      with a white outline. design-icons.css already maps
      .fa-heart-double to the real two-heart glyph from Figma, so the
      ::after is a leftover heart floating under the button. */
#wrapper .grid > li .ko_grid_item_buttons i.fa-heart-double,
.fa-heart-double {
    position: static !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 28px !important;
    line-height: 1 !important;
}
#wrapper .grid > li .ko_grid_item_buttons i.fa-heart-double:before,
.fa-heart-double:before {
    position: static !important;
    top: auto !important;
    left: auto !important;
}
#wrapper .grid > li .ko_grid_item_buttons i.fa-heart-double:after,
.fa-heart-double:after {
    content: none !important;
    display: none !important;
}

/* 2. the text block of every card carries a legacy border-bottom #eee,
      which drew a grey rule between the description and the buttons.
      Figma has no line inside the card. */
#wrapper .grid > li > a.open-profile,
#wrapper .grid > li > a.open-profile:not(.avatar-link) {
    border: none !important;
}

/* ---- non-VIP name masking ----
   The backend puts .text-smeary on a card name only where the paywall
   applies: dating/matches.php (the /likeme page) and dating/visitor.php
   set `smeary` for a regular member, common/home.php and search do not.

   serg_custom.css:1979 masked it with `color: transparent` plus
   `text-shadow: 0 0 10px #000`, which paints a dark slab that still
   reads as text. Replaced with a real blur on the actual ink.
   Tried and rejected: a tighter text-shadow keeps the online dot crisp
   but leaves the name legible, which defeats the point. The dot lives
   inside the title, so the filter softens it too - acceptable, the
   whole line is "locked" anyway.
   The chat keeps its own treatment (serg_custom.css:923), untouched.
   Note: the name is still present in the HTML source; this is a visual
   mask, not access control. */
#wrapper .grid > li .text-smeary,
#wrapper .grid > li .ko_grid_item_title.text-smeary {
    color: var(--ds-dark) !important;
    text-shadow: none !important;
    filter: blur(4px);
    -webkit-filter: blur(4px);
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
}

/* ============================================================
   Second review pass on the homepage
   ============================================================ */

/* 1. the grey frame around the whole grid was a box-shadow, not a
      border: `.full-column` carries
      `box-shadow: 0 1px 1px 1px rgba(190,190,190,.5)` from the legacy
      sheet, which outlines the section on all four sides. */
#wrapper .full-column,
#wrapper .full-column.search-hide {
    box-shadow: none !important;
    border: none !important;
}

/* 2. card chrome straight off the Figma inspector:
      Product Card 378x540, corner radius 12, fill #FFFFFF,
      1px outside stroke, drop shadow X0 Y4 blur 24 #000000 8%.
      Was: radius 16, blur 16, no stroke. */
#wrapper .grid > li.thumbnail,
#wrapper .grid > li.news-box {
    border: 1px solid var(--ds-line) !important;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
}

/* 3. pagination
      Figma: "See You _ Dating Website 1" -> Homepage / Ipad / Mobile.
      ko_pagination.php never emits page numbers - at most two links,
      next and previous, in that DOM order, each carrying an <i class=
      "fa fa-chevron-circle-left|right">. The design draws them as two
      soft grey squares centred under the grid, arrow left then arrow
      right, which is exactly that DOM order on an ltr row.

      Measured off the 1920 export (identical on 768 and 375):
        button   64 x 64, radius 16, #f6f6f6
        gap      8, centred in the content column
        arrow    24 box, glyph 18 x 14, #161616
        above    32 under the last card row  */
#wrapper .pagination,
#wrapper ul.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    float: none;
    /* the page is rtl in places; the pair is drawn left arrow first */
    direction: ltr;
}

#wrapper .pagination > li {
    display: block;
    float: none;
    margin: 0;
    padding: 0;
    border: none;
}

#wrapper .pagination > li > a,
#wrapper .pagination > li > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: #f6f6f6;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    color: var(--ds-dark);
    text-decoration: none;
    transition: background-color .15s ease;
}

#wrapper .pagination > li > a > i.fa {
    display: block;
    width: 24px;
    height: 24px;
    margin: 0;
    font-size: 24px;
    line-height: 24px;
    color: var(--ds-dark);
}

#wrapper .pagination > li > a:hover {
    background: #ededed;
}

/* KoPagination only prints a link when the page exists, so this state
   is defensive - the harness fakes it */
#wrapper .pagination > li.disabled > a {
    opacity: .4;
    cursor: default;
}

/* legacy pins .pagination li to 40x40, so the buttons overflowed it on
   both sides and swallowed the 8px gap */
#wrapper .pagination > li,
#wrapper ul.pagination > li {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1 !important;
}

/* .pagination also carries .clearfix - same phantom flex items again */
#wrapper .pagination::before,
#wrapper .pagination::after {
    content: none !important;
    display: none !important;
}

/* responsive.css:583 hides the in-flow pagination from 768 down and
   swaps in the fixed .bottom-line bar, which splits the two arrows to
   opposite edges of the screen and paints a grey strip behind them.
   No Figma frame has that bar: every export draws the same centred
   pair under the grid, so the in-flow one comes back and the bar goes.
   The pagination stays a real control at every width, it just stops
   being duplicated. */
@media (max-width: 768px) {
    #wrapper nav {
        display: block;
    }

    #wrapper + .bottom-line {
        display: none !important;
    }
}

/* ============================================================
   REPORT + MESSAGE MODALS
   Figma: 9 exports = two designs.
     "דיווח על משתמש"  444x247 @1920 - header 60, label, 48 select,
                       footer 24/16 with two 48 pills
     "הודעה / שגיאה"   400x126 @1920 - header 60 + one line of body,
                       no footer
     tablet 402 wide, mobile 100% - 48

   Covers the report modal (#ko_modal_complain), the injected info box
   (#info_box) and every bootbox dialog - the "sent a like", "already
   asked", "no photos" messages all come from bootbox.alert() in
   js/communications.js, not from a template.
   ============================================================ */

/* centre in the viewport, same as the auth modals */
#ko_modal_complain.modal.in,
#ko_modal_search.modal.in,
#info_box.modal.in,
.bootbox.modal.in,
.bootbox-alert.modal.in,
.bootbox-confirm.modal.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#ko_modal_complain .modal-dialog,
.bootbox-confirm .modal-dialog {
    width: 444px;
    max-width: calc(100% - 48px);
    margin: auto;
}

#info_box .modal-dialog,
.bootbox-alert .modal-dialog,
.bootbox .modal-dialog {
    width: 400px;
    max-width: calc(100% - 48px);
    margin: auto;
}

@media (max-width: 1140px) {
    #ko_modal_complain .modal-dialog,
    .bootbox-confirm .modal-dialog {
        width: 402px;
    }
}

#ko_modal_complain .modal-content,
#ko_modal_search .modal-content,
#info_box .modal-content,
.bootbox .modal-content,
.bootbox-alert .modal-content,
.bootbox-confirm .modal-content {
    border: none;
    /* custom.css paints the shell #f7f7f7; it shows through wherever the
       body and the footer do not meet edge to edge */
    background: var(--ds-white);
    border-radius: var(--ds-radius);
    overflow: hidden;
    font-family: var(--ds-font);
    box-shadow: 0 22px 50px rgba(18, 20, 28, .12);
}

/* ---- header: pink bar, coral title, white round close on the left ---- */
#ko_modal_complain .modal-header,
#ko_modal_search .modal-header,
#info_box .modal-header,
.bootbox .modal-header,
.bootbox-alert .modal-header,
.bootbox-confirm .modal-header {
    background: var(--ds-coral-bg) !important;
    border-bottom: none !important;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* the markup prints the close button before the title (bootstrap
       convention). In an rtl header that puts the X on the right, but
       Figma has the title on the right and the X on the left, so the
       row is laid out in reverse. */
    direction: rtl;
    flex-direction: row-reverse;
    min-height: 60px;
}

#ko_modal_complain .modal-header .modal-title,
#ko_modal_search .modal-header .modal-title,
#info_box .modal-header .modal-title,
.bootbox .modal-header .modal-title,
.bootbox-alert .modal-header .modal-title,
.bootbox-confirm .modal-header .modal-title {
    font-family: var(--ds-font);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--ds-coral) !important;
    margin: 0;
    padding: 0 4px;
    text-align: right;
}

#ko_modal_complain .modal-header .close,
#ko_modal_search .modal-header .close,
#info_box .modal-header .close,
.bootbox .modal-header .close,
.bootbox-alert .modal-header .close,
.bootbox-confirm .modal-header .close {
    float: none !important;
    margin: 0 !important;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ds-white) !important;
    border: none;
    border-radius: var(--ds-radius-pill);
    color: var(--ds-coral) !important;
    opacity: 1 !important;
    /* Figma draws a 14x14 cross in the 36 disc; the &times; glyph
       renders at about 0.47em, so 30px lands on 14 */
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
}

/* ---- body ---- */
#ko_modal_complain .modal-body,
#info_box .modal-body,
.bootbox .modal-body,
.bootbox-alert .modal-body,
.bootbox-confirm .modal-body {
    padding: 24px !important;
    direction: rtl;
    background: var(--ds-white) !important;
    text-align: right;
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 1.4;
    color: var(--ds-dark);
}

/* the legacy sheet draws a dashed grey frame around bootbox text */
.bootbox .bootbox-body,
.bootbox-alert .bootbox-body,
.bootbox-confirm .bootbox-body {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: right;
    direction: rtl;
}

/* a plain message has no buttons in Figma - X and the backdrop close it */
.bootbox-alert .modal-footer,
#info_box .modal-footer {
    display: none !important;
}

/* ---- report modal: label + select ---- */
#ko_modal_complain .form-group {
    margin-bottom: 0;
}

#ko_modal_complain .form-group label {
    font-family: var(--ds-font);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: -0.24px;
    color: var(--ds-dark);
    text-align: right;
    display: block;
    margin-bottom: 4px;
}

#ko_modal_complain select.form-control {
    height: 48px;
    width: 100%;
    border: 1px solid var(--ds-dark-15);
    border-radius: var(--ds-radius);
    padding: 13px 44px 13px 16px;
    font-family: var(--ds-font);
    font-size: 16px;
    color: var(--ds-dark);
    background-color: var(--ds-white);
    box-shadow: none;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    direction: rtl;
    text-align: right;
    text-align-last: right;
}

#ko_modal_complain select.form-control:focus {
    border-color: var(--ds-coral);
    outline: none;
    box-shadow: none;
}

/* ============================================================
   ADD PHOTO TO GALLERY (#modal_upload_photo)
   The body is a native file input plus the legacy checkbox, and
   both came through raw: the browser's own grey button, the file
   name glued to it, and the 90s bevelled tick box.
   The mockup wraps the pair in a pink dashed plate and turns the
   browser button into a gradient outlined pill. Measured off the
   1920 export: plate 354 x 130, radius 12, 2px dashes 10 on 8 in
   #fd2e63 over #fff7f9, 24 padding, 14 between the two rows;
   pill 32 tall with a 1px gradient edge, 8 to the file name;
   box 24 with the same edge, 12 to its label, label 14/18 grey.
   Markup untouched.
   ============================================================ */
/* every frame in the export draws this one 402 wide, including 1920,
   where the shared bootbox-confirm rule would stretch it to 444 */
#modal_upload_photo .modal-dialog {
    width: 402px;
}
#modal_upload_photo .modal-body .bootbox-body {
    box-sizing: border-box;
    padding: 24px !important;      /* the shared bootbox rule zeroes it */
    border-radius: var(--ds-radius);
    background: #fff7f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' fill='none'%3E%3Crect width='100%25' height='100%25' rx='12' ry='12' stroke='%23fd2e63' stroke-width='4' stroke-dasharray='10 8'/%3E%3C/svg%3E") center / 100% 100% no-repeat !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
    direction: rtl;
    text-align: right;
}

/* ---- the file row: pill first (left), file name after it ---- */
#modal_upload_photo #file_new_image {
    display: block;
    width: 100%;
    max-width: 100%;
    /* Chrome gives the control a fixed intrinsic width and lays its own
       shadow content out itself, so the pair can only be anchored, not
       reordered: rtl keeps it flush with the right edge of the plate and
       lets a long file name grow into the empty space on the left.   */
    direction: rtl;
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 32px;
    color: var(--ds-dark);
}
#modal_upload_photo #file_new_image::file-selector-button,
#modal_upload_photo #file_new_image::-webkit-file-upload-button {
    height: 32px;
    padding: 0 16px;
    margin: 0 0 0 8px;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-pill);
    background: linear-gradient(#fff7f9, #fff7f9) padding-box,
                var(--ds-gradient) border-box;
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 500;
    color: var(--ds-dark);
    cursor: pointer;
}

/* ---- the checkbox row ---- */
#modal_upload_photo .form-group-checkbox,
#modal_upload_photo .form-group-checkbox .form-control {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    height: auto;
}
#modal_upload_photo .form-group-checkbox .form-control {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    direction: rtl;
}
/* the legacy fake box (an empty label with a bevel) gives way to the
   real input, styled the same way as the one on the settings page */
#modal_upload_photo .form-control-checkbox {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0;
    position: static;
}
#modal_upload_photo .form-control-checkbox > label {
    display: none;
}
#modal_upload_photo .form-control-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    visibility: visible;
    float: none;
    margin: 0;
    width: 24px;
    height: 24px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: linear-gradient(#fff7f9, #fff7f9) padding-box,
                var(--ds-gradient) border-box;
    cursor: pointer;
    position: relative;
}
#modal_upload_photo .form-control-checkbox input[type="checkbox"]:checked {
    background: var(--ds-gradient) border-box;
}
#modal_upload_photo .form-control-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 11px;
    border: solid var(--ds-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
#modal_upload_photo .form-group-checkbox .form-control > label.overflow-dots {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-family: var(--ds-font);
    font-size: 14px;
    line-height: 18px;
    color: #5c5c5c;
    text-align: right;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    cursor: pointer;
}

/* ---- footer: gradient primary + gradient-outlined secondary ---- */
/* .modal-footer carries bootstrap's clearfix, whose two pseudo-elements
   become flex items and eat two of the three gaps - the buttons came
   out 174 instead of 190. Same trap as the homepage grid and the
   filter rows. */
#ko_modal_complain .modal-footer::before,
#ko_modal_complain .modal-footer::after,
#ko_modal_search .modal-footer::before,
#ko_modal_search .modal-footer::after,
.bootbox-confirm .modal-footer::before,
.bootbox-confirm .modal-footer::after {
    content: none !important;
    display: none !important;
}

#ko_modal_complain .modal-footer,
#ko_modal_search .modal-footer,
.bootbox-confirm .modal-footer {
    padding: 0 24px 24px !important;
    border-top: none !important;
    background: var(--ds-white) !important;
    display: flex;
    gap: 16px;
    direction: rtl;
}

#ko_modal_complain .modal-footer .btn,
#ko_modal_search .modal-footer .btn,
.bootbox-confirm .modal-footer .btn {
    flex: 1 1 0;
    height: 48px;
    margin: 0 !important;
    padding: 0 16px;
    border-radius: var(--ds-radius-pill);
    font-family: var(--ds-font);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s, box-shadow .2s;
}

/* bootbox gives its buttons .btn-primary / .btn-default, but every
   confirm the site opens (communications.js - delete chat, block,
   photo requests...) passes its own className: ko_btn_submit and
   ko_btn_cancel, and message.js passes btn-success / btn-danger. Those
   fell through to the legacy flat #7000E3 box and the grey-bordered
   white one, so all four pairs are listed. */
#ko_modal_complain .modal-footer .ko_btn_submit,
#ko_modal_search .modal-footer .ko_btn_submit,
.bootbox-confirm .modal-footer .btn-primary,
.bootbox-confirm .modal-footer .ko_btn_submit,
.bootbox-confirm .modal-footer .btn-success {
    background: var(--ds-gradient) !important;
    border: none !important;
    color: var(--ds-white) !important;
    opacity: 1;
}

#ko_modal_complain .modal-footer .ko_btn_submit:hover,
#ko_modal_search .modal-footer .ko_btn_submit:hover,
.bootbox-confirm .modal-footer .btn-primary:hover,
.bootbox-confirm .modal-footer .ko_btn_submit:hover,
.bootbox-confirm .modal-footer .btn-success:hover {
    box-shadow: 0 8px 20px rgba(253, 46, 99, .3);
}

/* Figma draws the secondary outline as a gradient, not a flat purple:
   fill and border are two backgrounds clipped to different boxes */
#ko_modal_complain .modal-footer .ko_btn_cancel,
#ko_modal_search .modal-footer .ko_btn_cancel,
.bootbox-confirm .modal-footer .btn-default,
.bootbox-confirm .modal-footer .ko_btn_cancel,
.bootbox-confirm .modal-footer .btn-danger {
    border: 1px solid transparent !important;
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box !important;
    color: var(--ds-dark) !important;
}

/* the message line in Figma is a softer grey than the rest of the UI:
   sampled #5c5c5c, while the report modal's label, select value and
   button text all come out exactly #161616 */
#info_box .modal-body,
.bootbox .modal-body,
.bootbox-alert .modal-body,
.bootbox .bootbox-body,
.bootbox-alert .bootbox-body {
    color: #5c5c5c;
}

/* ---- "just registered" modal (#ko_modal_endsignup) ----------------
   header.tpl prints it once, right after signup, while the session
   carries first_entering. It came with a flat purple bar, a white
   cross and the text in a dashed grey frame, none of which exists in
   the system. Same message modal as the alerts above: 400 wide, pink
   header 60 tall, coral title on the right, white round close on the
   left, white body 24 all round. The markup is a .border div, not a
   .modal-body, so the body rules are restated for it.              */
#ko_modal_endsignup.modal.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* the template prints its own backdrop inside the modal with an inline
   height of 1100px, so on a taller screen the bottom stayed unshaded */
#ko_modal_endsignup > .modal-backdrop {
    height: 100% !important;
}

#ko_modal_endsignup .modal-dialog {
    width: 400px;
    max-width: calc(100% - 48px);
    margin: auto;
}

#ko_modal_endsignup .modal-content {
    border: none;
    background: var(--ds-white);
    border-radius: var(--ds-radius);
    overflow: hidden;
    font-family: var(--ds-font);
    box-shadow: 0 22px 50px rgba(18, 20, 28, .12);
}

#ko_modal_endsignup .modal-header {
    background: var(--ds-coral-bg) !important;
    border-bottom: none !important;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* close button is printed before the title, so the row is reversed
       to put the title on the right and the cross on the left */
    direction: rtl;
    flex-direction: row-reverse;
    min-height: 60px;
}

#ko_modal_endsignup .modal-header .modal-title {
    font-family: var(--ds-font);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--ds-coral) !important;
    margin: 0;
    padding: 0 4px;
    text-align: right;
}

#ko_modal_endsignup .modal-header .close {
    float: none !important;
    margin: 0 !important;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ds-white) !important;
    border: none;
    border-radius: var(--ds-radius-pill);
    color: var(--ds-coral) !important;
    opacity: 1 !important;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
}

/* the text block: dashed frame out, message type in */
#ko_modal_endsignup .modal-content > .border {
    border: none !important;
    background: var(--ds-white) !important;
    margin: 0 !important;
    padding: 24px !important;
    direction: rtl;
    text-align: right;
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 1.4;
    color: #5c5c5c;
}

/* first line is the greeting; the template wraps it in its own span */
#ko_modal_endsignup .modal-content > .border > span:first-child {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.36px;
    color: var(--ds-dark);
}


/* ============================================================
   OPERATOR VIEW  ($is_test)
   Figma: "See You _ Dating Website 4" -> Homepage / Ipad / Mobile
   and the logged sidebar in test-user mode.

   Everything here only fires on markup that the templates print
   when $is_test is true, so a normal member never sees any of it.
   Markup untouched: the four filter rows, the two photo badges,
   the "Was Active" pill, the sidebar test block and the Go-to-ID
   form are all restyled from the outside.

   Measured off the 1920 export (1:1):
     filter control   40 tall, radius 10, 1px #ffe0e7,
                      1px #ffeff3 between segments, active #fd2e63
     row 1            colour control 5x131, online 2x129
     row 2            email 3x80, group type 7x80
     rule under rows  1px #f3f3f3, 24 below the last row
     photo badges     28 tall, radius 10, 12 in from the photo
     "Was Active"     32 tall, pill, #fd2e63, 12 from bottom/right
     sidebar pills    40 tall, pill, 232 wide split 112/8/112
     Go to ID         48 circle button + 176 input, 8 gap
   ============================================================ */

/* ---- filter rows ------------------------------------------ */

/* the wrapper is a float-based .clearfix in the old CSS; the two
   pseudo-elements would otherwise become grid/flex items and open
   a phantom column (same trap as the homepage grid and the header) */
#wrapper .filters-wrapper::before,
#wrapper .filters-wrapper::after,
#wrapper .filters-wrapper .user-filter::before,
#wrapper .filters-wrapper .user-filter::after {
    content: none !important;
    display: none !important;
}

#wrapper .filters-wrapper {
    width: auto !important;
    margin: 0 0 24px !important;
    padding: 0 0 24px !important;
    border-bottom: 1px solid var(--ds-line-soft);
    font-family: var(--ds-font);
}

/* The 2x2 layout needs the colour bar (655) and the group-type bar
   (558) side by side, i.e. 1233 of content column plus the gap. The
   column is the viewport minus the 320 sidebar and the 2x40 gutters,
   so the grid only earns its keep from about 1660 up; under that it
   wraps like the tablet does instead of running under the sidebar. */
@media (min-width: 1660px) {
    #wrapper .filters-wrapper.two-column {
        display: grid;
        grid-template-columns: max-content max-content;
        justify-content: space-between;
        align-items: start;
        gap: 20px;
    }

    /* DOM order is online, colour, group type, email */
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(1) { order: 2; }
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(2) { order: 1; }
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(3) { order: 4; }
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(4) { order: 3; }

    /* the two controls sharing a column are different widths, so the
       narrower one must not stretch: left column hugs 40, right 1600 */
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(2),
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(4) { justify-self: start; }
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(1),
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(3) { justify-self: end; }
}

/* narrow desktop / tablet / mobile: one wrapping flex row, design
   order is colour, group type, email confirm, online */
@media (max-width: 1659px) {
    #wrapper .filters-wrapper.two-column {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 16px 20px;
    }

    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(1) { order: 4; }
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(2) { order: 1; }
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(3) { order: 2; }
    #wrapper .filters-wrapper.two-column > .user-filter:nth-child(4) { order: 3; }
}

/* matches.tpl carries a fifth control, so it just wraps */
#wrapper .filters-wrapper.three-column {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px 20px;
}

/* one control = one pill-less rounded bar. The 1px gap between the
   segments IS the divider: the bar's own background shows through,
   which keeps the line correct whatever flex direction a control
   uses and never doubles up against the outer border. */
#wrapper .filters-wrapper .user-filter {
    display: flex;
    width: auto !important;
    max-width: 100%;
    height: 40px;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    gap: 1px;
    border: 1px solid #ffe0e7;
    border-radius: 10px;
    overflow: hidden;
    background: #ffeff3;
    font-size: 16px !important;
    line-height: 1;
}

#wrapper .filters-wrapper .user-filter > a,
#wrapper .filters-wrapper .user-filter > select {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto !important;
    min-width: 131px;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 12px !important;
    float: none !important;
    border: none !important;
    border-radius: 0 !important;
    background: var(--ds-white);
    color: var(--ds-dark);
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none !important;
    transition: background-color .15s ease, color .15s ease;
}

/* markup is <i></i>Label, the design puts the icon after the label */
#wrapper .filters-wrapper .user-filter > a {
    flex-direction: row-reverse;
}

#wrapper .filters-wrapper .user-filter > a:hover {
    background: #fff7f9;
}

#wrapper .filters-wrapper .user-filter > a.active {
    background: var(--ds-coral) !important;
    border-color: var(--ds-coral) !important;
    color: var(--ds-white) !important;
}

/* the group selector: native chevron off, Figma chevron on the left */
#wrapper .filters-wrapper .user-filter > select {
    padding: 0 12px 0 40px !important;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    cursor: pointer;
}

/* the msystem colours are the label colour in the redesign, not a
   swatch: Red / Yellow / Green tint their own text and icon */
/* style.css:7243 owns .red/.green/.yellow globally with !important,
   so the redesign palette has to answer in kind - on the link and on
   the <i> inside it, which paints itself with currentColor */
#wrapper .filters-wrapper .user-filter > a.red,
#wrapper .filters-wrapper .user-filter > a.red > i    { color: #ff383c !important; }
#wrapper .filters-wrapper .user-filter > a.yellow,
#wrapper .filters-wrapper .user-filter > a.yellow > i { color: #ff8d28 !important; }
#wrapper .filters-wrapper .user-filter > a.green,
#wrapper .filters-wrapper .user-filter > a.green > i  { color: #34c759 !important; }

#wrapper .filters-wrapper .user-filter > a.red.active,
#wrapper .filters-wrapper .user-filter > a.yellow.active,
#wrapper .filters-wrapper .user-filter > a.green.active,
#wrapper .filters-wrapper .user-filter > a.active > i {
    color: var(--ds-white) !important;
}

/* the empty <i> used to be a sprite PNG; design-icons.css now fills
   it with the Figma person / group / heart mask in currentColor. Only
   the four classes that actually got a mask are listed - anything
   else keeps its old sprite instead of turning into a black block. */
#wrapper .filters-wrapper .user-filter > a.all-users > i,
#wrapper .filters-wrapper .user-filter > a.online-users > i,
#wrapper .filters-wrapper .user-filter > a.liked-users > i,
#wrapper .filters-wrapper .user-filter > a.double-liked-users > i {
    flex: 0 0 20px;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    background-image: none;
    background-color: currentColor;
    vertical-align: middle;
}

/* segment widths: row 1 is 131 wide, the "advanced" rows are 80,
   the online pair is 129. Below 768 every control goes full width
   and the segments share it. */
#wrapper .filters-wrapper .user-filter.advanced > a {
    min-width: 80px;
    padding: 0 8px !important;
}

#wrapper .filters-wrapper #filter-online > a {
    min-width: 129px;
}

/* DOM order in every control is the reverse of the design order
   (all -> ... -> first), except the colour bar which leads with
   its <select>; that one gets explicit orders instead. */
#wrapper .filters-wrapper #filter-online,
#wrapper .filters-wrapper .user-filter.advanced,
#wrapper .filters-wrapper .user-filter.liked-filter {
    flex-direction: row-reverse;
}

#wrapper .filters-wrapper .user-filter > select { order: 0; }
#wrapper .filters-wrapper .user-filter > select ~ a:nth-of-type(1) { order: 4; }  /* All    */
#wrapper .filters-wrapper .user-filter > select ~ a:nth-of-type(2) { order: 3; }  /* Green  */
#wrapper .filters-wrapper .user-filter > select ~ a:nth-of-type(3) { order: 2; }  /* Yellow */
#wrapper .filters-wrapper .user-filter > select ~ a:nth-of-type(4) { order: 1; }  /* Red    */

@media (max-width: 767px) {
    #wrapper .filters-wrapper .user-filter {
        width: 100% !important;
    }

    #wrapper .filters-wrapper .user-filter > a {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 6px !important;
    }

    #wrapper .filters-wrapper .user-filter > select {
        flex: 0 0 auto;
        min-width: 113px;
    }

    #wrapper .filters-wrapper .user-filter.advanced > a,
    #wrapper .filters-wrapper #filter-online > a {
        min-width: 0;
    }

    /* the colour bar drops its person icons on mobile - five labels
       plus five icons do not fit 327 and the design leaves them out;
       the online bar keeps its two */
    #wrapper .filters-wrapper .user-filter > select ~ a > i {
        display: none !important;
    }
}

/* ---- photo badges ----------------------------------------- */
/* a.thumb-image is the photo box itself (position:relative), so the
   three badges hang off it and stay put at every breakpoint */

#wrapper #grid li a.thumb-image .ko_test_user_group,
#wrapper #grid li a.thumb-image .ko_test_user_id {
    position: absolute;
    left: 12px;
    right: auto;
    height: 28px;
    padding: 0 12px !important;
    border-radius: 10px !important;
    font-family: var(--ds-font);
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 28px !important;
    color: var(--ds-white) !important;
    text-shadow: none !important;
    white-space: nowrap;
}

/* group keeps the colour the admin configured (inline style) */
#wrapper #grid li a.thumb-image .ko_test_user_group {
    top: 12px;
}

#wrapper #grid li a.thumb-image .ko_test_user_id {
    top: 52px;
    background-color: rgba(22, 22, 22, .3) !important;
}

#wrapper #grid li a.thumb-image .lastact {
    position: absolute;
    right: 12px;
    left: auto;
    bottom: 12px;
    top: auto;
    height: 32px;
    padding: 0 16px !important;
    border-radius: var(--ds-radius-pill) !important;
    background-color: var(--ds-coral) !important;
    font-family: var(--ds-font);
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 32px !important;
    color: var(--ds-white) !important;
    white-space: nowrap;
}

/* serg_responsive.css pulls the pill down to 5px on the mobile grid */
#wrapper #grid_desktop.grid-mobile > ul > li > a.thumb-image .lastact {
    bottom: 12px;
}

@media (max-width: 767px) {
    #wrapper #grid li a.thumb-image .lastact {
        height: 28px;
        padding: 0 12px !important;
        font-size: 14px !important;
        line-height: 28px !important;
    }
}

/* ---- sidebar: test user mode ------------------------------ */
/* the two <hr> above the menu are hidden for a normal member; in
   operator mode the design uses them to fence the test block off */
#user-menu:has(.ko_customer_status) > hr {
    display: block;
    height: 0;
    margin: 32px 24px !important;
    border: none;
    border-top: 1px solid var(--ds-line);
}

#user-menu > a[title="Change mode"] {
    display: block;
    margin: 0 24px 8px;
    font-family: var(--ds-font);
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: var(--ds-dark) !important;
    text-decoration: none !important;
    direction: ltr;
    text-align: left;
}

#user-menu > a[title="Change mode"] b {
    font-weight: 700;
}

#user-menu .ko_customer_status {
    display: flex;
    flex-direction: row-reverse;   /* the sidebar is rtl; "Set On" goes left */
    gap: 8px;
    width: auto !important;
    margin: 0 24px !important;
    padding: 0 !important;
}

#user-menu .ko_customer_status > a.ko_customer_status_item,
#user-menu .ko_customer_status > span.ko_customer_status_item {
    display: flex !important;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: 40px;
    margin: 0 !important;
    padding: 0 8px !important;
    float: none !important;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-pill) !important;
    background: #f6f6f6 !important;
    background-color: #f6f6f6 !important;
    font-family: var(--ds-font);
    font-size: 16px !important;
    font-weight: 500;
    line-height: 1;
    color: var(--ds-dark) !important;
    text-decoration: none !important;
    white-space: nowrap;
}

/* the first control is the action ("Set On"): gradient outline AND
   gradient label. Three background layers, three different clips -
   text for the label, padding-box for the white fill, border-box
   for the outline. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    #user-menu .ko_customer_status > a.ko_customer_status_item:first-of-type,
    #user-menu .ko_customer_status > span.ko_customer_status_item:first-of-type {
        position: relative;
        background-image: var(--ds-gradient) !important;
        background-color: transparent !important;
        -webkit-background-clip: text !important;
                background-clip: text !important;
        color: transparent !important;
    }

    /* the label already spends the element's background, so the 1px
       gradient outline is a masked ring on top of it */
    #user-menu .ko_customer_status > a.ko_customer_status_item:first-of-type::before,
    #user-menu .ko_customer_status > span.ko_customer_status_item:first-of-type::before {
        content: "";
        position: absolute;
        top: 0; right: 0; bottom: 0; left: 0;
        padding: 1px;
        border-radius: inherit;
        background: var(--ds-gradient);
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
                mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
                mask-composite: exclude;
        pointer-events: none;
    }
}

/* ---- sidebar: go to ID ------------------------------------ */
.affix .search-by-id,
#ko_mobile_nav_links .search-by-id {
    display: flex;
    /* the sidebar is rtl, so plain "row" already puts the labelled
       field on the right and the round search button on its left,
       which is the order Figma draws */
    direction: rtl;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    margin: 0 24px !important;
    padding: 32px 0 24px !important;
    border-top: 1px solid var(--ds-line);
}

.affix .search-by-id::before,
.affix .search-by-id::after,
#ko_mobile_nav_links .search-by-id::before,
#ko_mobile_nav_links .search-by-id::after {
    content: none !important;
    display: none !important;
}

.affix .search-by-id .form-group,
#ko_mobile_nav_links .search-by-id .form-group {
    flex: 1 1 auto;
    width: auto !important;
    margin: 0 !important;
    float: none !important;
}

.affix .search-by-id label.control-label,
#ko_mobile_nav_links .search-by-id label.control-label {
    display: block;
    margin: 0 0 6px;
    padding: 0;
    font-family: var(--ds-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--ds-dark);
    text-align: right;
}

.affix .search-by-id input.form-control,
#ko_mobile_nav_links .search-by-id input.form-control {
    width: 100% !important;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #dcdcdc;
    border-radius: var(--ds-radius);
    background: var(--ds-white);
    box-shadow: none;
    font-family: var(--ds-font);
    font-size: 16px;
    color: var(--ds-dark);
    direction: ltr;
    text-align: right;
}

.affix .search-by-id input.form-control:focus,
#ko_mobile_nav_links .search-by-id input.form-control:focus {
    border-color: var(--ds-coral);
    box-shadow: none;
    outline: none;
}

.affix .search-by-id button,
#ko_mobile_nav_links .search-by-id button {
    display: flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    border: 1px solid transparent !important;
    border-radius: 50% !important;
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box !important;
    box-shadow: none;
    cursor: pointer;
}

/* the Figma glass is filled, not an outline, so this one icon is a
   mask of its own rather than the shared .fa-search remap */
.affix .search-by-id button i.fa:before,
#ko_mobile_nav_links .search-by-id button i.fa:before {
    display: none !important;
}

.affix .search-by-id button i.fa,
#ko_mobile_nav_links .search-by-id button i.fa {
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 !important;
    background: var(--ds-gradient);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='8.6' cy='8.6' r='6.6' fill='%23000'/%3E%3Cpath d='M13.6 13.6L17.6 17.6' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='8.6' cy='8.6' r='6.6' fill='%23000'/%3E%3Cpath d='M13.6 13.6L17.6 17.6' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: contain;
            mask-size: contain;
}

/* ---- the same blocks inside the mobile / tablet menu -------- */
/* the burger menu prints the test rows as plain <li>, so they only
   need the row padding back and the uppercase off */
#ko_mobile_nav_links li > a[title="Change mode"] {
    display: block;
    margin: 0 !important;
    padding: 14px 16px !important;
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 400;
    color: var(--ds-dark) !important;
    text-align: left;
    text-transform: none !important;
    direction: ltr;
}

#ko_mobile_nav_links li > a[title="Change mode"] b {
    font-weight: 700;
}

#ko_mobile_nav_links .ko_customer_status {
    margin: 0 16px 12px !important;
}

#ko_mobile_nav_links .search-by-id {
    margin: 0 !important;
    padding: 12px 16px 16px !important;
    border-top: none;
}

/* ---- profile page: the operator info block ----------------- */
/* front.tpl prints five <p class="ko_test_info"> above the action
   buttons. Figma centres them in the 304 column, 18/24 with a 14
   gap, and turns the group value into a soft grey chip. */
#wrapper.page-user .left-column p.ko_test_info {
    margin: 0 0 14px;
    font-family: var(--ds-font);
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: var(--ds-dark);
    text-align: center;
}

#wrapper.page-user .left-column p.ko_test_info span.ko_test_user_group {
    display: inline-block;
    height: 28px;
    margin-right: 4px;
    padding: 0 12px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 28px !important;
    color: var(--ds-dark) !important;
    text-shadow: none !important;
    vertical-align: middle;
}

/* the <hr> that closes the block is the same rule as the rest of
   the column (styled at the top of the PROFILE PAGE section) */
#wrapper.page-user .left-column p.ko_test_info + hr {
    margin: 32px 0;
}


/* ============================================================
   SUPPORT / OPERATOR PROFILE  ($ko_customer_test on account/front)
   Figma: "See You _ Dating Website 7" -> Homepage / User's Profile
   plus its Ipad and Mobile frames.

   Measured off the 1920 export (1:1):
     right column     content 426..1599, row pitch 136
     label            24/32 bold, 32 above the divider it follows
     value            20/28, 12 under the label, 32 to the next rule
     report link      18, centred, brand gradient, 20 under the list
     mobile           info rows right aligned, action row of three
   ============================================================ */

/* the report line: front.tpl used to print it as a .data-title with
   text-align, margin-top:-20px and font-size inline and a leftover
   purple on the link; it now carries .ds-report-line and nothing
   inline. Figma paints the link with the brand gradient (sampled
   #af34bc at the first letter, #f22f70 at the last) */
#wrapper.page-user #data .ds-report-line > a {
    display: inline-block;
    font-family: var(--ds-font);
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
    color: var(--ds-coral);
    text-decoration: none;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    #wrapper.page-user #data .ds-report-line > a {
        background-image: var(--ds-gradient);
        -webkit-background-clip: text;
                background-clip: text;
        color: transparent;
    }
}

/* Figma leaves 20 under the list before the link */
#wrapper.page-user #data .ds-report-line {
    margin: 20px 0 0;
    padding: 0;
    /* the size, weight, line and colour it had as a .data-title with
       font-size: 16px inline, so the line box keeps its 32 height */
    font-size: 16px;
    font-weight: 700;
    line-height: 32px;
    color: var(--ds-dark);
    text-align: center;
}

/* ---- mobile ------------------------------------------------ */
@media (max-width: 767px) {
    /* the column rule is a desktop/tablet device: stacked, it would
       hang down the left edge of the info list */
    #wrapper.page-user > .clearfix > .front-clfx {
        padding-left: 0;
        border-left: none;
    }

    /* Figma right-aligns the operator lines on mobile (they are centred
       in the two-column layouts) */
    #wrapper.page-user .left-column p.ko_test_info {
        margin: 0 0 16px;
        text-align: right;
    }

    #wrapper.page-user .left-column p.ko_test_info + hr {
        margin: 8px 0 0;
    }
}


/* ============================================================
   PLAIN PROFILE  (account/front without $ko_customer_test)
   Figma: "See You _ Dating Website 9" -> Homepage / User's Profile
   plus its Ipad and Mobile frames. Same page as the support view
   with the operator block removed, so the only differences are in
   how the left column opens and closes.
   ============================================================ */

/* .profile-buttons carries the legacy `divider` class, which paints a
   #eee rule under the last action. Figma closes the column there. */
#wrapper.page-user .left-column .profile-buttons {
    border-bottom: none !important;
}

@media (max-width: 767px) {
    /* stacked, the three actions become one row: they share a single
       top edge, so none of them keeps the column padding - the row as
       a whole sits 24 under the gallery (Figma measures 25) */
    #wrapper.page-user .profile-buttons > .btn-block,
    #wrapper.page-user .profile-buttons > .btn-block:first-child {
        padding: 0 8px !important;
        gap: 12px;
    }
    #wrapper.page-user .left-column .profile-buttons {
        margin-bottom: 8px;
    }
    /* the third label is two words and has to wrap, not clip: legacy
       #grid/profile rules put nowrap + ellipsis on it */
    #wrapper.page-user .profile-buttons > .btn-block > p {
        max-width: 100%;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        font-size: 14px;
        line-height: 18px;
    }
}


/* ============================================================
   SEARCH MODAL  (#ko_modal_search)
   Figma: "See You _ Dating Website 10" -> Search / Ipad / Mobile.
   The same dialog for a regular member and for the support account.

   Chrome (dialog, pink header, round close, footer buttons) is shared
   with the report modal above; this block is the body only.

   Measured off the 1920 export (1:1):
     dialog        444 wide, header 60, body padding 24
     field column  190 wide, 16 gutter, control 48 tall, radius 10
     label         14/20 over the control, 4 under it
     row pitch     86
     age label     18, right aligned, 24 under the last control
     slider        track 4 gradient, grips 16 white with a 2 ring
     footer        two 190 buttons; on 375 they stack, search on top
   ============================================================ */

#ko_modal_search .modal-dialog {
    width: 444px;
    max-width: calc(100% - 48px);
    margin: auto;
}

#ko_modal_search .modal-body {
    padding: 24px 24px 0 !important;
    direction: rtl;
    background: var(--ds-white);
}

/* bootstrap floats the two columns; Figma pairs them, and in an rtl
   grid the first one (.pull-right, the gender side) lands on the right
   exactly as the markup intends */
#ko_modal_search .modal-body .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    margin: 0;
}

#ko_modal_search .modal-body .row::before,
#ko_modal_search .modal-body .row::after {
    content: none !important;
    display: none !important;
}

#ko_modal_search .modal-body .row > [class*="col-"] {
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    min-width: 0;
}

#ko_modal_search .form-group {
    margin: 0 0 20px;
    padding: 0;
}

#ko_modal_search .form-group h5 {
    margin: 0;
    padding: 0;
    font-family: var(--ds-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: var(--ds-dark);
    text-align: right;
}

/* the control: native chevron off, Figma chevron on the left */
#ko_modal_search select.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 42px;
    border: 1px solid #dcdcdc;
    border-radius: var(--ds-radius);   /* every field on the site is 12 */
    background-color: var(--ds-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%238a8a8a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    box-shadow: none;
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 400;
    color: var(--ds-dark);
    text-align: right;
    cursor: pointer;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    transition: border-color .15s ease;
}

#ko_modal_search select.form-control:focus {
    border-color: var(--ds-coral);
    box-shadow: none;
    outline: none;
}

/* ---- age row ---------------------------------------------- */
/* the <h5> already prints "גיל 18-80": the template puts the two
   numbers in .leftLabelText / .rightLabelText inside it. The pair of
   labels the markup repeats UNDER the track is not in the design. */
#ko_modal_search .modal-body > .form-group {
    margin: 0;
}

#ko_modal_search .modal-body > .form-group > h5 {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    direction: ltr;
    text-align: right;
}

/* the grips stick 6 out of the 4px track, so the wrapper reserves that
   room top and bottom instead of letting them collide with the label */
#ko_modal_search .nstSlider-wrapper {
    padding: 13px 0 6px;
}

/* the markup repeats the two age numbers under the track; the heading
   already carries them and Figma shows nothing there */
#ko_modal_search .nstSlider-wrapper .clearfix {
    display: none !important;
}

/* every geometry line here has to be !important: custom.css:1608 and
   :1854 pin the track to 5px #ccc and ring the grips in 4px #7000E3,
   all with !important of their own */
#ko_modal_search .nstSlider {
    position: relative;
    width: 100% !important;
    height: 4px !important;
    margin: 0 !important;
    padding: 0;
    border: none !important;
    border-radius: 2px !important;
    background: var(--ds-line) !important;
    box-shadow: none;
    direction: ltr;
}

#ko_modal_search .nstSlider .bar {
    position: absolute;
    top: 0;
    height: 4px !important;
    margin: 0 !important;
    border-radius: 2px !important;
    background: var(--ds-gradient) !important;
    box-shadow: none;
}

#ko_modal_search .nstSlider .leftGrip,
#ko_modal_search .nstSlider .rightGrip {
    position: absolute;
    top: 0 !important;
    width: 16px !important;
    height: 16px !important;
    margin-top: -6px !important;
    border-radius: 50% !important;
    background: var(--ds-white) !important;
    box-shadow: none;
    cursor: pointer;
}

/* Figma samples each ring off the same gradient the track uses, so the
   left grip reads purple and the right one coral */
#ko_modal_search .nstSlider .leftGrip  { border: 2px solid #ad33bd !important; }
#ko_modal_search .nstSlider .rightGrip { border: 2px solid #f03073 !important; }

#ko_modal_search .modal-footer {
    margin-top: 24px;
}

@media (max-width: 767px) {
    /* serg_responsive.css:412 rebuilds this modal on small screens as
       "label 90 on the right, control beside it" and floats both. Figma
       keeps the desktop shape: label over control, two columns of 131,
       and stacks only the buttons - search on top. */
    #ko_modal_search form .form-group > h5 {
        float: none;
        width: auto;
        margin-bottom: 0;
        line-height: 18px;
    }

    #ko_modal_search form .form-group > select,
    #ko_modal_search form .form-group > .form-control,
    #ko_modal_search form .form-group > .nstSlider-wrapper {
        float: none;
        width: 100%;
    }

    #ko_modal_search form .form-group > .nstSlider-wrapper {
        margin-top: 0;
    }

    #ko_modal_search .modal-footer {
        flex-direction: column;
    }

    /* custom.css:1373 pins .buttontr to 160; harmless while the footer
       is a row (flex-basis wins) but not once it stacks */
    #ko_modal_search .modal-footer .btn {
        flex: 0 0 48px;
        width: 100%;
        margin-bottom: 0;
    }
}


/* ============================================================
   CHAT  (dating/message) - regular member view
   Figma: "See You _ Dating Website 11" -> Messages / Ipad / Mobile
   and the "Product Card" frames, which are the conversation on 768
   and 375.

   Measured off the 1920 export (1:1):
     columns       conversation 1124 | list 516, rule #e8e8e8
     header        88 tall, avatar 56, name 20 bold, chevron right
     bubble        max 560, radius 12, padding 16/20, 16/24 text
                   incoming = brand gradient, mine = #feeef3
     avatar        56, 16 from the bubble
     meta          16, 14 under the bubble, date left, status right
     composer      send 52 coral circle, two 28 icons, input 56
     list card     133 tall, avatar 100, padding 0 40, active #feeef3
   ============================================================ */

/* the page is one full-height flex row: conversation, then list */
#wrapper.message-wrapper .messages-wrapper::before,
#wrapper.message-wrapper .messages-wrapper::after,
#wrapper.message-wrapper .single-user::before,
#wrapper.message-wrapper .single-user::after,
#wrapper.message-wrapper .chat-message::before,
#wrapper.message-wrapper .chat-message::after,
#wrapper.message-wrapper .chat-message-inner::before,
#wrapper.message-wrapper .chat-message-inner::after,
#wrapper.message-wrapper .header::before,
#wrapper.message-wrapper .header::after,
#wrapper.message-wrapper .create-message::before,
#wrapper.message-wrapper .create-message::after {
    content: none !important;
    display: none !important;
}

/* every other page leaves a 40 gutter between the content and the
   sidebar; the chat runs its list right up against the rule */
#wrapper.message-wrapper {
    padding: 0 !important;
    font-family: var(--ds-font);
}

@media (min-width: 1141px) {
    body #wrapper.message-wrapper {
        margin-right: 280px !important;
    }
}

/* The chat is a fixed height screen: the conversation and the list of
   chats scroll each on its own, the page itself never scrolls. Legacy
   pinned the screen to a flat 100vh and, below 768, to 100vh minus its
   old 56 bar. The new bar is 75 on tablet and 63 on phones, so the box
   was that much taller than the screen and the input row ended up below
   the fold, out of reach because the page itself does not scroll. The
   offset is that bar, and it goes back to zero when the chat hides the
   bar to open a conversation full screen.                            */
/* the bar the screen has to clear, inherited by everything below */
:root                      { --ds-chat-offset: 0px; }
@media (max-width: 1140px) { :root { --ds-chat-offset: 75px; } }
@media (max-width: 767px)  { :root { --ds-chat-offset: 63px; } }
/* opening a conversation on a phone hides the bar (communications.js puts
   .hidden on it), so the padding that was clearing the bar has to go too,
   otherwise the input row is pushed below the edge of the screen */
body:has(#ko_mobile_header.hidden) { --ds-chat-offset: 0px; }
@media (max-width: 1140px) {
    body:has(#ko_mobile_header.hidden) { padding-top: 0; }
    /* bootstrap gives .hidden display:none; state it here as well so the
       bar really leaves the screen even where bootstrap is not loaded */
    #ko_mobile_header.hidden { display: none !important; }
}

/* The screen is laid out as a column from the scroller down, so anything
   the page prints above the chat - today the e-mail confirmation strip,
   which is 132 tall on a phone - keeps its own height and the chat takes
   exactly what is left. A flat calc() could not know about it, and the
   composer ended up that far below the fold with no way to scroll to it. */
#wrapper.message-wrapper {
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;               /* nothing spills below the screen */
}

/* On this site the element that scrolls is <main>, not the window. The
   chat screen is exactly one <main> tall, but the footer leaves a couple
   of 1px tracking images after it, and those inline images add a text
   line of about 20 px - enough for <main> to scroll and carry the whole
   chat, header and input row included, up and down as one block. On the
   chat screen only the two panes may scroll, so both boxes around them
   are pinned to the screen.                                          */
main:has(> #superwrapper > #wrapper.message-wrapper) {
    height: calc(100vh - var(--ds-chat-offset));
    height: calc(100dvh - var(--ds-chat-offset));
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#superwrapper:has(> #wrapper.message-wrapper) {
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* and the pixels themselves leave the flow, so the phantom line is gone
   in every browser, with or without :has(). They still load. */
main > img[width="1"] {
    position: absolute;
    left: 0;
    bottom: 0;
}

#wrapper.message-wrapper .messages-wrapper {
    display: flex;
    align-items: stretch;
    padding-top: 0;   /* the list and the conversation start at the top */
    /* the screen box above gives the height; this row just fills it */
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
}

#wrapper.message-wrapper .message-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    float: none;
    width: auto;
    min-width: 0;
    /* legacy fixes this column to calc(100vh - 56px) on phones; let the
       flex row give it the height instead, or the input row drifts */
    height: auto;
    min-height: 0;
}

/* Figma gives the list 516 of the 1640 content column - just under a
   third. A flat 42 % cap made it eat the conversation on narrower
   desktops; the floor keeps the card readable down at 1141. */
#wrapper.message-wrapper .users-list {
    flex: 0 0 516px;
    max-width: 32%;
    min-width: 340px;
    float: none;
    width: auto;
    border-left: 1px solid var(--ds-line);
    display: flex;
    flex-direction: column;
    /* same as the conversation column: height comes from the flex row,
       not from the legacy calc(100vh - 57px) */
    height: auto;
    min-height: 0;
}
/* the list of chats is the scrolling part; the filters above it stay put */
#wrapper.message-wrapper .users-list-wrapper {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ---- empty states: the two speech bubbles --------------------
   Archive 17 draws the same gradient outline icon twice: 426 in the
   conversation pane while a chat list is open but no chat is picked,
   and 550 filling the whole area when there is not a single chat -
   and in that second frame the list column and its divider are gone
   entirely. The icon is traced from the export into
   css/messages-empty.svg, gradient and all, so it scales cleanly.
   `.message-container` is a flex column, so `margin: auto` on its
   one pseudo child centres the icon on both axes.              */
/* serg_custom.css:777 paints the old grey chat-placeholder.png on the
   column itself; the loader keeps its own background */
#wrapper.message-wrapper .message-container:not(.has-loader) {
    background-image: none;
}
#wrapper.message-wrapper .message-container:not(.has-messages)::before {
    content: '';
    margin: auto;
    flex: 0 0 auto;
    width: min(426px, 62%);
    max-width: 426px;
    aspect-ratio: 1 / 1;
    background: url("messages-empty.svg") center center / contain no-repeat;
}
/* no conversations at all: drop the empty list column, grow the icon.
   The test account keeps its filter strip, so the column only goes
   when there are no filters either.                             */
#wrapper.message-wrapper .users-list:not(:has(.single-user)):not(:has(.user-filter)) {
    display: none;
}
#wrapper.message-wrapper .messages-wrapper:not(:has(.single-user)) .message-container:not(.has-messages)::before {
    width: min(550px, 70%);
    max-width: 550px;
}

/* ---- conversation header ----------------------------------- */
#wrapper.message-wrapper .message-container > .header {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    height: 88px;
    padding: 0 40px;
    background: var(--ds-white);
    border-bottom: 1px solid var(--ds-line);
}

/* the avatar is a dropdown trigger; strip the button chrome */
#wrapper.message-wrapper .header .button-wrapper.dropdown {
    flex: 0 0 56px;
    order: 1;
    float: none;
    width: 56px;
    /* the wrapper is 41 tall from the legacy button metrics, so the
       56 avatar hung out of the bottom instead of centring */
    height: 56px;
}

#wrapper.message-wrapper .header .dropdown-toggle.button {
    display: block;
    width: 56px;
    height: 56px;
    line-height: 1;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    box-shadow: none;
    overflow: hidden;
}

#wrapper.message-wrapper .header .dropdown-toggle.button img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

#wrapper.message-wrapper .header .username {
    order: 2;
    flex: 1 1 auto;
    float: none;
    width: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    direction: rtl;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: var(--ds-dark);
}

#wrapper.message-wrapper .header .username .online-sensor {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: var(--ds-coral);
}

#wrapper.message-wrapper .header .username .online-sensor.offline {
    background: var(--ds-dark-15);
}

/* the operator build of this header (messages_block.tpl, is_test)
   ships two <p> instead of the name + sensor: the username and the
   companion's online_info. Figma draws only the name and a dot, but
   the words are information the operator works from, so they stay -
   set as the redesign's secondary line rather than dropped. */
#wrapper.message-wrapper .header .username > p {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: var(--ds-dark);
}

#wrapper.message-wrapper .header .username > p + p {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #5d5d5d;
    white-space: nowrap;
}

/* the back control: Figma draws a plain chevron, the markup ships a
   legacy arrow png */
#wrapper.message-wrapper .header .button-wrapper.hidden-desktop {
    flex: 0 0 24px;
    order: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
}

#wrapper.message-wrapper .header a.go-back img {
    display: none;
}

#wrapper.message-wrapper .header a.go-back {
    display: block;
    width: 24px;
    height: 24px;
    line-height: 1;
    background-color: var(--ds-dark);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 5L16 12L9 19' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 5L16 12L9 19' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
}

/* ---- message list ------------------------------------------ */
/* the conversation is the only scrolling part of its column: the header
   above and the input row below stay in place */
#wrapper.message-wrapper .messages-container {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--ds-white);
}

#wrapper.message-wrapper .messages-container-inner {
    padding: 32px 40px;
}

#wrapper.message-wrapper .chat-message {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 0 0 32px;
    padding: 0;
}

#wrapper.message-wrapper .chat-message.my-message {
    flex-direction: row-reverse;
}

#wrapper.message-wrapper .chat-message > img {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    margin: 0;
    float: none;
    border-radius: 50%;
    object-fit: cover;
}

/* a run of messages from the same person prints no avatar, so the
   bubbles have to keep the column the first one opened */
#wrapper.message-wrapper .chat-message > .chat-message-inner:first-child {
    margin-left: 72px;
}

#wrapper.message-wrapper .chat-message.my-message > .chat-message-inner:first-child {
    margin-left: 0;
    margin-right: 72px;
}

#wrapper.message-wrapper .chat-message .chat-message-inner {
    float: none;
    width: auto;
    max-width: 560px;
    min-width: 0;
    margin: 0;
}

#wrapper.message-wrapper .chat-message .message-content {
    display: block;
    margin: 0;
    padding: 16px 20px;
    border: none;
    border-radius: var(--ds-radius);
    background: var(--ds-gradient);
    color: var(--ds-white);
    font-family: var(--ds-font) !important;
    font-size: 16px;
    line-height: 24px;
    direction: rtl;
    word-wrap: break-word;
}

#wrapper.message-wrapper .chat-message.my-message .message-content {
    background: var(--ds-coral-bg);
    color: var(--ds-dark);
}

/* the legacy speech-bubble tail is not in the redesign */
#wrapper.message-wrapper .chat-message .message-content::before,
#wrapper.message-wrapper .chat-message .message-content::after {
    content: none !important;
    display: none !important;
}

/* date on the left, "sent" on the right, both under the bubble */
#wrapper.message-wrapper .chat-message-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    direction: rtl;
}

#wrapper.message-wrapper .chat-message-inner > .message-content {
    flex: 0 0 100%;
    margin-bottom: 14px;
}

#wrapper.message-wrapper .chat-message-inner > .date,
#wrapper.message-wrapper .chat-message-inner > .status {
    float: none;
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 20px;
    color: var(--ds-dark);
}

#wrapper.message-wrapper .chat-message-inner > .status {
    order: 1;
    margin-left: auto;
}

#wrapper.message-wrapper .chat-message-inner > .date {
    order: 2;
}

/* ---- composer ---------------------------------------------- */
#wrapper.message-wrapper .create-message {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
    height: auto;
    padding: 24px 40px 40px;
    direction: rtl;
    background: var(--ds-white);
    border-top: 1px solid var(--ds-line);
}

#wrapper.message-wrapper .create-message > .content {
    order: 1;
    flex: 1 1 auto;
    float: none;
    width: auto !important;
    min-width: 0;
    height: 56px;
    padding: 15px 20px;
    border: 1px solid #dcdcdc;
    border-radius: var(--ds-radius);
    background: var(--ds-white);
    font-family: var(--ds-font) !important;
    font-size: 16px;
    line-height: 24px;
    color: var(--ds-dark);
    overflow-y: auto;
}

#wrapper.message-wrapper .create-message > .content:focus {
    border-color: var(--ds-coral);
    outline: none;
}

#wrapper.message-wrapper .create-message > button {
    order: 2;
    flex: 0 0 28px;
    float: none;
    width: 28px;
    height: 28px;
    padding: 0;
    line-height: 1;
    border: none;
    border-radius: 0;
    background: none !important;
    color: #5c5c5c;
    font-size: 26px;
}

#wrapper.message-wrapper .create-message > button:hover {
    color: var(--ds-coral) !important;
    background: none !important;
}

#wrapper.message-wrapper .create-message > button > i,
#wrapper.message-wrapper .create-message > button > svg {
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 !important;
    font-size: 28px;
    line-height: 28px;
}

/* The conversation helper button ships an inline SVG of one thick
   bubble; archive 17 draws two thin overlapping round bubbles. Traced
   from the export into css/chat-suggest.svg and used as a mask, so the
   button keeps its colour and hover. The button itself only appears
   when the group is enabled in Dating menu -> conversation helper. */
#wrapper.message-wrapper .create-message > button > svg {
    display: none !important;
}
#wrapper.message-wrapper .create-message > button:has(> svg)::before {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    background: currentColor;
    -webkit-mask: url("chat-suggest.svg") center center / 28px 28px no-repeat;
            mask: url("chat-suggest.svg") center center / 28px 28px no-repeat;
}

/* the composer is a contenteditable div, so the prompt from the mockup
   has to be drawn rather than set as a placeholder attribute */
#wrapper.message-wrapper .create-message > .content:empty:not(:focus)::before {
    content: "\05D4\05E7\05DC\05D3/\05D9\0020\05D4\05D5\05D3\05E2\05D4...";  /* "הקלד/י הודעה..." */
    color: #9a9a9a;
    pointer-events: none;
}

/* the submit is the coral disc at the far left of the row */
#wrapper.message-wrapper .create-message > button[type="submit"] {
    order: 9;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ds-coral) !important;
    color: var(--ds-white);
}

#wrapper.message-wrapper .create-message > button[type="submit"]:hover {
    color: var(--ds-white) !important;
    background: var(--ds-coral) !important;
    box-shadow: 0 8px 20px rgba(253, 46, 99, .3);
}

#wrapper.message-wrapper .create-message > button[type="submit"] > i {
    width: 24px;
    height: 24px;
    font-size: 24px;
    line-height: 24px;
}

/* ---- users list -------------------------------------------- */
#wrapper.message-wrapper .users-list-wrapper {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-y: auto;
}

/* a compact row, the same 88 as the conversation header next to it,
   with the header's 56 avatar (was 133 / 100) */
#wrapper.message-wrapper .users-list-wrapper .single-user {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 88px;
    padding: 0 24px;
    direction: rtl;
    border-bottom: 1px solid var(--ds-line);
    text-decoration: none !important;
    transition: background-color .15s ease;
}

/* the separator used to be a :after bar sitting inside the padding */
#wrapper.message-wrapper .users-list-wrapper .single-user:after {
    display: none !important;
}

#wrapper.message-wrapper .users-list-wrapper .single-user:hover,
#wrapper.message-wrapper .users-list-wrapper .single-user.active {
    background: #ffeef3;
}

/* users_list.tpl puts an inline violet inner glow on a row that has
   queued robot messages. That is an operator hint and the mockup has
   nothing like it, so it only stays for the accounts that run the
   robot: the test account is the one whose column carries the filter
   strip above the list.                                          */
#wrapper.message-wrapper .users-list:not(:has(.user-filter)) .single-user {
    box-shadow: none !important;
}

#wrapper.message-wrapper .single-user .user-logo {
    flex: 0 0 56px;
    float: none;
    width: 56px;
    height: 56px;
    margin: 0;
    border-radius: 50%;
    /* serg_custom.css:678 clips this box, which cut the unread counter
       in half against the circle; the <img> rounds itself, so the clip
       is not needed */
    overflow: visible;
}

#wrapper.message-wrapper .single-user .user-logo img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

#wrapper.message-wrapper .single-user .user-logo .online-sensor {
    display: none;
}

/* unread counter: serg_custom.css:754 pins it to a 20px #ff4000 square
   at the bottom-left of the 70 avatar, which no longer lines up */
#wrapper.message-wrapper .single-user .user-logo {
    position: relative;
}

#wrapper.message-wrapper .single-user .user-logo i[data-counter] {
    top: auto;
    bottom: -2px;
    left: -4px;
    z-index: 1;
    width: 22px;
    height: 22px;
    border: 2px solid var(--ds-white);
    border-radius: 50%;
    background: var(--ds-coral);
    font-family: var(--ds-font);
    font-size: 11px;
    font-weight: 500;
    font-style: normal;
    line-height: 18px;
    text-align: center;
    color: var(--ds-white);
}

/* date on the left of the first line, name on the right, preview under
   both */
#wrapper.message-wrapper .single-user .message-data {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    row-gap: 2px;
    column-gap: 12px;
    flex: 1 1 auto;
    float: none;
    width: auto;
    min-width: 0;
    padding: 0;
}

#wrapper.message-wrapper .single-user .message-data .username {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    color: var(--ds-dark);
}

/* long names end in an ellipsis instead of pushing the row apart; the
   name sits in its own span (users_list.tpl / messages_block.tpl), so it
   can shrink while the online dot next to it keeps its 8px */
#wrapper.message-wrapper .single-user .message-data .username .ds-name,
#wrapper.message-wrapper .header .username .ds-name {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#wrapper.message-wrapper .header .username > p:first-child {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#wrapper.message-wrapper .single-user .message-data .username .online-sensor {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: var(--ds-coral);
    position: static;
}

#wrapper.message-wrapper .single-user .message-data .username .online-sensor.offline {
    background: var(--ds-dark-15);
}

#wrapper.message-wrapper .single-user .message-data .date {
    grid-column: 2;
    grid-row: 1;
    float: none;
    font-size: 13px;
    font-weight: 400;
    line-height: 22px;
    color: var(--ds-dark);
    white-space: nowrap;
}

#wrapper.message-wrapper .single-user .message-data .message {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: #737373;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- tablet and mobile ------------------------------------- */
/* serg_responsive.css already swaps the two panes at this width: the
   list fills the screen until a conversation is open. Only the sizes
   change - Figma keeps the same card and the same bubbles. */
@media (max-width: 1140px) {
    #wrapper.message-wrapper .users-list {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
        border-left: none;
    }

    #wrapper.message-wrapper .users-list-wrapper .single-user {
        padding: 0 32px;
    }

    #wrapper.message-wrapper .messages-wrapper {
        padding-top: 0;
    }

    #wrapper.message-wrapper .messages-container-inner {
        padding: 24px 32px;
    }

    #wrapper.message-wrapper .create-message {
        padding: 16px 32px;
    }
}

/* the chat is a full-height app screen: the legacy fixed footer logo
   (.bottom-line, 48 tall on small screens) would sit on top of the
   composer, and Figma ends the screen with the composer */
#wrapper.message-wrapper + .bottom-line {
    display: none !important;
}

/* serg_responsive.css:35 shows one pane at a time from 768 down, but it
   does it with display:block/none at a lower specificity than the flex
   layout above, so both panes were surviving. Restated here - and for
   the whole tablet range, not only from 768: between 769 and 1140 the
   two panes shared the width with the sidebar and the conversation
   pane was squeezed to ~130-260px. The tablet comment above already
   says the list fills the screen until a conversation is open. */
@media (max-width: 1140px) {
    #wrapper.message-wrapper .message-container {
        display: none;
    }

    #wrapper.message-wrapper .message-container.has-messages {
        display: flex;
    }

    #wrapper.message-wrapper .message-container.has-messages + .users-list {
        display: none;
    }

    /* with no conversations at all there is no list to fill the screen,
       so the empty-state icon takes the pane here too */
    #wrapper.message-wrapper .messages-wrapper:not(:has(.single-user)) .message-container {
        display: flex;
    }
}

@media (max-width: 767px) {
    #wrapper.message-wrapper .users-list-wrapper .single-user {
        height: 88px;
        padding: 0 16px;
        gap: 12px;
    }

    #wrapper.message-wrapper .single-user .user-logo,
    #wrapper.message-wrapper .single-user .user-logo img {
        flex-basis: 56px;
        width: 56px;
        height: 56px;
    }

    #wrapper.message-wrapper .messages-container-inner {
        padding: 16px 24px;
    }

    #wrapper.message-wrapper .chat-message > img {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    #wrapper.message-wrapper .chat-message > .chat-message-inner:first-child {
        margin-left: 56px;
    }

    #wrapper.message-wrapper .chat-message.my-message > .chat-message-inner:first-child {
        margin-left: 0;
        margin-right: 56px;
    }

    #wrapper.message-wrapper .create-message {
        gap: 12px;
        padding: 12px 16px;
    }
}


/* ============================================================
   CHAT  (dating/message) - support / operator view
   Figma: "See You _ Dating Website 12" -> Messages / Ipad / Mobile

   Same screen as the member chat, plus the three operator filter
   rows that index.tpl prints above the conversation list under
   <?php if( $is_test ) ?>. Measured off the 1920 export (1:1):

     list column     516 wide, filters inset 40 each side -> 436
     row 1           40 tall, 2 equal segments of 218
     group select    48 tall, full width, chevron left
     row 3 (colour)  40 tall, 4 equal segments of 109
     row 4 (group)   40 tall, 7 equal segments of 62.3
     gaps            16 between the rows
     block padding   40 top and bottom on 1920, 24 on 768 / 375
     divider         1px #e8e8e8 edge to edge under the block
     bar chrome      radius 10, 1px #ffeef3, active #fd2e63
     label colour    #5d5d5d, active #fff
     msystem labels  red #ff383c, yellow #ff8d28, green #34c759

   The rows are ordered right to left in the design, which is the
   DOM order, so the containers just get direction: rtl. The 1px
   divider between segments is a shared border collapsed with a
   -1px margin, which keeps the bar looking continuous even though
   the four msystem links sit next to a <select> that wraps onto
   its own line.
   ============================================================ */

/* the rows are float-based .clearfix blocks; the two pseudo
   elements would otherwise become flex items (8th time) */
#wrapper.message-wrapper .users-list .user-filter::before,
#wrapper.message-wrapper .users-list .user-filter::after {
    content: none !important;
    display: none !important;
}

#wrapper.message-wrapper .users-list .user-filter {
    display: flex;
    flex-wrap: wrap;
    width: auto !important;
    margin: 0 40px 16px !important;
    padding: 0 !important;
    float: none !important;
    direction: rtl;
    font-family: var(--ds-font);
    line-height: 1;
}

/* .messages-wrapper already carries 24 of the 40 above row 1 */
#wrapper.message-wrapper .users-list #filter-online {
    margin-top: 16px !important;
}

#wrapper.message-wrapper .users-list #filter-group {
    margin-bottom: 40px !important;
}

/* the rule under the block runs the full 516, not the 436 the
   rows are inset to, so it belongs to the list that follows */
#wrapper.message-wrapper .users-list #filter-group + .users-list-wrapper {
    border-top: 1px solid var(--ds-line);
}

/* one segment. The bar is drawn segment by segment so that the
   msystem row can share its container with the <select>. */
#wrapper.message-wrapper .users-list .user-filter > a {
    display: flex !important;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto !important;
    min-width: 0;
    height: 40px;
    margin: 0 !important;
    padding: 0 8px !important;
    float: none !important;
    border: 1px solid #ffeef3 !important;
    border-radius: 0 !important;
    background: var(--ds-white);
    color: #5d5d5d;
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none !important;
    transition: background-color .15s ease, color .15s ease;
}

/* rtl: the second link sits to the LEFT of the first, so its
   right border is the shared one */
#wrapper.message-wrapper .users-list .user-filter > a + a {
    margin-right: -1px !important;
}

#wrapper.message-wrapper .users-list .user-filter > a:first-of-type {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

#wrapper.message-wrapper .users-list .user-filter > a:last-of-type {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
}

#wrapper.message-wrapper .users-list .user-filter > a:hover {
    background: #fff7f9;
}

#wrapper.message-wrapper .users-list .user-filter > a.active {
    position: relative;
    z-index: 1;
    background: var(--ds-coral) !important;
    border-color: var(--ds-coral) !important;
    color: var(--ds-white) !important;
}

/* style.css:7243 owns .red / .yellow / .green globally with
   !important, so the redesign palette has to answer in kind - on
   the link and on the <i>, which paints itself with currentColor */
#wrapper.message-wrapper .users-list .user-filter > a.red,
#wrapper.message-wrapper .users-list .user-filter > a.red > i    { color: #ff383c !important; }
#wrapper.message-wrapper .users-list .user-filter > a.yellow,
#wrapper.message-wrapper .users-list .user-filter > a.yellow > i { color: #ff8d28 !important; }
#wrapper.message-wrapper .users-list .user-filter > a.green,
#wrapper.message-wrapper .users-list .user-filter > a.green > i  { color: #34c759 !important; }

#wrapper.message-wrapper .users-list .user-filter > a.red.active,
#wrapper.message-wrapper .users-list .user-filter > a.yellow.active,
#wrapper.message-wrapper .users-list .user-filter > a.green.active,
#wrapper.message-wrapper .users-list .user-filter > a.active > i {
    color: var(--ds-white) !important;
}

/* the empty <i> was a sprite PNG; design-icons.css fills the four
   mapped classes with the Figma mask in currentColor. Every link
   in the colour row also carries .online-users, so all four get
   the person; #filter-online's first link carries .all-users and
   gets the group of three. .advanced has no <i> at all. */
#wrapper.message-wrapper .users-list .user-filter > a.all-users > i,
#wrapper.message-wrapper .users-list .user-filter > a.online-users > i {
    flex: 0 0 24px;
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    background-image: none;
    background-color: currentColor;
    vertical-align: middle;
}

/* the language file spells these lower case; Figma sets them as
   Red / Yellow / Green / All */
#wrapper.message-wrapper .users-list #filter-msystem > a {
    text-transform: capitalize;
}

/* the group selector owns its own line above the colour segments */
#wrapper.message-wrapper .users-list #filter-msystem > select {
    flex: 0 0 100%;
    order: -1;
    width: 100% !important;
    height: 48px;
    margin: 0 0 16px !important;
    padding: 0 16px !important;
    border: 1px solid #dcdcdc !important;
    border-radius: var(--ds-radius) !important;
    background-color: var(--ds-white);
    color: var(--ds-dark);
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 46px;
    /* "1+2 Group" is a weak number run next to a latin one: an rtl
       base direction would reorder it to "Group 1+2", so the box
       stays ltr and is right aligned instead */
    direction: ltr;
    text-align: right;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    box-shadow: none !important;
    cursor: pointer;
}

/* tablet and mobile: the list is the whole screen, the block keeps
   the same rows and drops to a 24 inset (32 on the Ipad frame) */
@media (max-width: 1140px) {
    #wrapper.message-wrapper .users-list .user-filter {
        margin-left: 32px !important;
        margin-right: 32px !important;
    }

    #wrapper.message-wrapper .users-list #filter-online {
        margin-top: 24px !important;
    }

    #wrapper.message-wrapper .users-list #filter-group {
        margin-bottom: 24px !important;
    }
}

@media (max-width: 767px) {
    #wrapper.message-wrapper .users-list .user-filter {
        margin-left: 24px !important;
        margin-right: 24px !important;
    }

    #wrapper.message-wrapper .users-list .user-filter > a {
        padding: 0 4px !important;
        font-size: 14px;
    }

    /* 375 leaves the colour row 327 for four labels: the Mobile
       frame drops their person icons and keeps the two in row 1 */
    #wrapper.message-wrapper .users-list #filter-msystem > a > i {
        display: none !important;
    }
}

/* ---- operator group badge on the list avatar ---------------- */
/* users_list.tpl hangs <div class="group"><span
   class="group-of-chat-user" style="background-color:X">N</span>
   on the photo whenever the operator has a group for that chat.
   Figma does not draw it (the frame has no groups set), so it is
   restyled to the redesign language rather than invented: the same
   26 disc-and-ring as the unread counter, mirrored to the other
   side of the avatar so the two never collide. The colour stays
   the one the template prints inline. */
#wrapper.message-wrapper .single-user .user-logo .group {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: visible;
    pointer-events: none;
}

#wrapper.message-wrapper .single-user .user-logo .group span.group-of-chat-user {
    position: absolute;
    right: -2px;
    bottom: 2px;
    left: auto;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border: 2px solid var(--ds-white);
    border-radius: 100px;
    color: var(--ds-white);
    font-family: var(--ds-font);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
}

@media (max-width: 767px) {
    #wrapper.message-wrapper .single-user .user-logo .group span.group-of-chat-user {
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        font-size: 11px;
    }
}


/* ============================================================
   START SCREEN  (logged out)
   Figma: "See You" -> Desktop 1920 / Ipad 768 / Mobile 375

   The same three screens as the member home, minus the member
   sidebar: the auth buttons take its place, the intro paragraph
   sits under them and the three info links pin to the bottom.

   Measured off the exports (1:1):
     sidebar        280 wide, content column 232, rule #e8e8e8
     buttons        232 x 48, pill, 16 apart, first 32 under the logo
                    order: signin (gradient), signup, search (rings)
     intro          232 wide, 16/24, #161616, justified, 32 under
     info links     pinned bottom, right aligned, gradient text
     768 header     logo left, three pills 48 tall 12 apart, burger
     768 / 375      intro full width, inset 32 / 24, then the grid
     info links     centred at the bottom on both

   Markup: the three pills in the tablet bar are the one insert -
   column_left.tpl prints them under !$is_logged next to the logo,
   because the sidebar copies are hidden at that width and the
   dropdown copies cannot be lifted out of a collapsed panel.
   ============================================================ */

/* ---- sidebar column, logged out ---------------------------- */
.logged-out #ko_fixed_cont .affix {
    display: flex;
    flex-direction: column;
}

/* The column is a flex box with its own height, so every child is a
   flex item and shrinks by default once the content is taller than
   the viewport - which is what browser zoom does: at 110% the 900px
   window is 818 CSS px and the 48px pills were squeezed to 18-30 with
   their padding gone. The logo, the intro and the links keep their
   size. The pills are the only thing that gives, and only down to 36:
   on a plain 900 tall window with the current intro they sit at 39,
   above the floor, so at 100% the column looks exactly as it did.
   Past the floor the column scrolls, through the overflow-y: auto
   below, as it already did at 110% and up. */
.logged-out #ko_fixed_cont .affix > * {
    flex: 0 0 auto;
}
.logged-out #ko_fixed_cont .affix > .buttontr {
    flex-shrink: 1;
    min-height: 36px;
}

/* serg_custom.css:2023 sizes these 200 x auto and centres them with
   a 20 gap; Figma gives the sidebar's full 232 column and 48 tall */
.logged-out #ko_fixed_cont .buttontr {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 232px !important;
    max-width: calc(100% - 48px);
    height: 48px;
    margin: 0 auto 16px !important;
    padding: 0 16px !important;
    border: 1px solid transparent !important;
    border-radius: var(--ds-radius-pill) !important;
    background: var(--ds-white);
    /* custom.css:1373 pins .buttontr to color: #fff !important */
    color: var(--ds-dark) !important;
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none !important;
    transition: filter .15s ease;
}

/* DOM order is signup, signin, search, and that is the order the
   product wants (sign up first, then sign in, then search); the
   first one carries the 32 above the group */
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_signup"],
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_new_signup"] { order: 1; margin-top: 32px !important; }
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_signin"] { order: 2; }
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_search"] { order: 3; }

/* the fill and the ring carry the same id as the rule above, or that
   one wins on specificity. The colour keeps !important: custom.css:1373
   pins .buttontr to color: #fff that way. */
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_signin"] {
    background: var(--ds-gradient);
    color: var(--ds-white) !important;
}

/* white pill with a 1px gradient ring: two backgrounds, one clipped
   to the padding box and one to the border box */
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_signup"],
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_new_signup"],
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_search"] {
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box;
}

.logged-out #ko_fixed_cont .buttontr:hover,
.logged-out #ko_fixed_cont .buttontr:focus {
    filter: brightness(.97);
}

/* ---- intro paragraph --------------------------------------- */
.logged-out #ko_fixed_cont .text-about {
    order: 4;
    width: 232px;
    max-width: calc(100% - 48px);
    /* the last button already contributes its own 16 below */
    margin: 16px auto 0 !important;
    /* the links plate is fixed and 84 tall; the text ends above it */
    padding: 0 0 100px !important;
    direction: rtl;
}

/* the intro comes from admin and can be longer than the viewport; the
   column scrolls rather than clipping it under the fixed plate */
@media (min-width: 1141px) {
    .logged-out #ko_fixed_cont .affix {
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* the header is empty in the design; keep it styled in case admin
   fills it, but do not leave a gap when it is blank */
.logged-out .text-about h3 {
    margin: 0 0 12px;
    font-family: var(--ds-font);
    font-size: 20px;
    font-weight: 600;
    font-style: normal;
    line-height: 28px;
    color: var(--ds-dark);
    text-align: right;
}

.logged-out .text-about h3:empty {
    display: none;
}

/* responsive.css:495 sets its own line-height under 980 and
   serg_custom.css:2108 its own margin, so this rule carries the id and
   the extra class to outrank both */
.logged-out #ko_fixed_cont .text-about p {
    margin: 0;
    padding: 0;
    font-family: var(--ds-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    /* Figma reads -2%, which is -0.02em in CSS */
    letter-spacing: -0.02em;
    color: var(--ds-dark);
    text-align: justify;
}

/* the gap between paragraphs: it carries the id as well, so it beats
   the margin: 0 of the rule above on specificity rather than force */
.logged-out #ko_fixed_cont .text-about p + p {
    margin-top: 24px;
}

/* ---- the three info links ---------------------------------- */
/* serg_custom.css:2458 already pins this bar to the bottom; it also
   draws a #ccc hairline above it and floats the links into thirds.
   The block carries .clearfix as well, so both pseudo-elements have to
   go or the ::after becomes a flex item and eats a whole 28 gap - that
   is what pushed "צור קשר" into two lines at 270 (9th time this trap
   has come up in this redesign). */
.logged-out #ko_fixed_cont .additional-links::before,
.logged-out #ko_fixed_cont .additional-links::after {
    content: none !important;
    display: none !important;
}

/* the bar is fixed to the viewport, so it needs its own white plate -
   without it the intro text runs underneath and shows through. The
   plate is 270 wide, which clears the column's left rule, and the
   links keep their 24 inset from the right edge. */
.logged-out #ko_fixed_cont .additional-links {
    order: 5;
    display: flex;
    /* the bar is rtl, so "start" is its right edge */
    justify-content: flex-start;
    gap: 28px;
    width: 270px !important;
    right: 0;
    left: auto;
    bottom: 0;
    padding: 24px 24px 40px !important;
    direction: rtl;
    background: var(--ds-white);
}

.logged-out #ko_fixed_cont .additional-links a {
    float: none !important;
    width: auto !important;
    padding: 0;
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
    text-decoration: none !important;
    /* Figma paints each link with the brand gradient, not a flat pink */
    background: var(--ds-gradient);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent !important;
    -webkit-text-fill-color: transparent;
}

.logged-out #ko_fixed_cont .additional-links a:hover {
    filter: brightness(1.1);
    text-decoration: none !important;
}

/* ---- tablet and mobile ------------------------------------- */
/* the sidebar container is display:none under 1141 (see the header
   section). For the logged out screen it comes back as a plain block that carries only the
   intro and the links: it already sits between the fixed header and
   the grid in the DOM, so no reordering is needed. */
@media (max-width: 1140px) {
    .logged-out #ko_fixed_cont {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }

    .logged-out #ko_fixed_cont .affix {
        position: static !important;
        display: block;
        width: 100% !important;
        height: auto !important;
        right: auto !important;
        left: auto !important;
        border: none !important;
        background: transparent;
    }

    /* the sidebar copies of the logo and the buttons step aside -
       the header bar carries both at this width */
    .logged-out #ko_fixed_cont #sidebar-logo,
    .logged-out #ko_fixed_cont .buttontr {
        display: none !important;
    }

    .logged-out #ko_fixed_cont .text-about {
        width: auto;
        max-width: none;
        margin: 24px 0 0 !important;
        padding: 0 32px !important;
    }
    /* the intro paragraph is a homepage thing: the sidebar carries it
       on every page on desktop, but inlined above the content on a
       tablet or phone it sat on top of the rules, the contact form and
       every article. home.tpl marks its wrapper .home_page; with no
       intro to show the whole in-flow sidebar block goes with it. */
    .logged-out:not(:has(#wrapper.home_page)) #ko_fixed_cont .text-about,
    .logged-out:not(:has(#wrapper.home_page)) #ko_fixed_cont {
        display: none !important;
    }

    /* the three links (rules, articles, contact) are already rows of
       the burger menu at this width, so the fixed bar that repeated
       them along the bottom edge goes, and the page no longer has to
       end 96px early for it. Desktop keeps the bar in the sidebar. */
    .logged-out #ko_fixed_cont .additional-links {
        display: none !important;
    }


    /* ---- the auth pills in the header bar ---- */
    /* #ko_mobile_nav is display:contents, so these are flex items of
       #ko_mobile_header: order 1 is the burger at the right edge */
    .logged-out #ko_mobile_header .ko_mobile_auth {
        order: 2;
        display: flex;
        flex: 0 0 auto;
        align-self: center;
        align-items: center;
        /* the bar itself is rtl; the group opts out of the inherited
           flip and orders its pills itself: read from the burger
           leftwards they go sign up, sign in, search - the same
           sequence the sidebar stacks on desktop */
        direction: ltr;
        gap: 12px;
        margin: 0 20px 0 0;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_search"] { order: 1; }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"] { order: 2; }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"] { order: 3; }

    /* the bar already carries a 26 column-gap for the member icon row
       and the logo already absorbs the slack with margin-inline-start:
       auto. The guest bar spaces its own items instead, so the gap
       goes to zero and the 20 before the burger is the pills' margin. */
    .logged-out #ko_mobile_header {
        column-gap: 0;
    }

    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: auto !important;
        min-width: 100px;
        height: 48px;
        direction: rtl;
        margin: 0 !important;
        padding: 0 20px !important;
        border: 1px solid transparent !important;
        border-radius: var(--ds-radius-pill) !important;
        background:
            linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
            var(--ds-gradient) border-box !important;
        color: var(--ds-dark) !important;
        font-family: var(--ds-font);
        font-size: 16px;
        font-weight: 400;
        line-height: 1;
        text-align: center;
        text-decoration: none !important;
        white-space: nowrap;
        box-shadow: none !important;
    }

    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"] {
        background: var(--ds-gradient) !important;
        color: var(--ds-white) !important;
    }
}

@media (max-width: 767px) {
    /* the Mobile frame keeps only the logo and the burger in the bar,
       but a guest then had nothing to tap: the three pills stay, in a
       phone size (36 tall, no minimum width, 14px label), which fits
       next to the burger on a 375 screen. The logo is the bottom bar. */
    .logged-out #ko_mobile_header .ko_mobile_auth {
        gap: 8px;
        margin: 0 12px 0 0;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr {
        min-width: 0;
        height: 36px;
        padding: 0 14px !important;
        font-size: 14px;
    }

    .logged-out #ko_fixed_cont .text-about {
        margin-top: 32px !important;
        padding: 0 24px !important;
    }

}

/* ---- logged-out dropdown ------------------------------------ */
/* The tablet rule in the header section hides the first five rows
   because, logged in, those five live in the bar. Logged out the list
   is home, sign up, sign in, search, rules, articles, contact - so the
   same rule left only "צור קשר" in the open menu. Here the bar carries
   the logo (home) and the three pills, so the dropdown holds rules,
   articles and contact: the three links the sidebar's bottom bar used
   to repeat at this width (that bar is gone above). Articles keeps the
   document glyph design-icons.css already maps for .fa-book. */
@media (max-width: 1140px) {
    .logged-out #ko_mobile_nav_links ul > li {
        display: block;
    }
    /* sign up, sign in and search are the pills in the bar; home stays
       as the first row - the logo is small and many do not read it as
       the way back */
    .logged-out #ko_mobile_nav_links ul > li:nth-child(n+2):nth-child(-n+4) {
        display: none;
    }
    .logged-out #ko_mobile_nav_links ul > li:has(> a > i.fa-book) {
        display: block;
    }
    .logged-out #ko_mobile_nav_links ul > li > a > i.fa-book {
        display: block;
    }
}


/* ============================================================
   LIKED ME  (dating/matches -> /likeme, and dating/visitor)
   Figma: "See You _ Dating Website 2"
     Liked Me      1920, regular member
     Liked Me-1    1920, support account, five filter controls
     Ipad / Ipad-1 768, the list card
     Mobile / Mobile-1  375, the bare list row

   Three things separate this screen from the homepage grid:
     the mutual like is a filled gradient disc, not an outline;
     the operator block carries five controls instead of four;
     under 768 the photo grid becomes a list of compact rows.

   Measured off the exports (1:1):
     like disc     56 circle, brand gradient, white glyph
     filters       controls 40 tall, 24 apart, rows 20 (16 on 768)
     1920 row 1    msystem 656 left, online 260 + liked 276 right
     1920 row 2    email 240 left, group 560 right
     768 card      229 x 96, radius 12, padding 16, avatar 64 right
     768 grid      3 columns, 8 apart, rows 16
     375 row       97 tall, no card, 1px #ebebeb edge to edge
     badge         the mobile heart, 28, coral, on the avatar's
                   bottom left corner
   ============================================================ */

/* ---- 1. mutual like -------------------------------------- */
/* user_thumb.tpl adds .disabled once the like exists and swaps the
   glyph for fa-heart / fa-heart-double; Figma fills the whole disc */
#wrapper .grid > li .ko_grid_item_buttons a.ko_btn_love.disabled {
    background: var(--ds-gradient) !important;
}

#wrapper .grid > li .ko_grid_item_buttons a.ko_btn_love.disabled .fa:before {
    background-image: none;
    background-color: var(--ds-white);
}

/* ---- 2. the five operator controls ------------------------ */
/* DOM order is liked, online, msystem, group, email; the design
   reads msystem, online, liked on the first row and email, group on
   the second, so every control gets an explicit order and the block
   wraps into those two rows on its own. */
#wrapper .filters-wrapper.three-column > .user-filter:nth-child(3) { order: 10; }  /* msystem */
#wrapper .filters-wrapper.three-column > .user-filter:nth-child(2) { order: 20; }  /* online  */
#wrapper .filters-wrapper.three-column > .user-filter:nth-child(1) { order: 30; }  /* liked   */
#wrapper .filters-wrapper.three-column > .user-filter:nth-child(5) { order: 40; }  /* email   */
#wrapper .filters-wrapper.three-column > .user-filter:nth-child(4) { order: 50; }  /* group   */

#wrapper .filters-wrapper.three-column {
    gap: 16px 24px;
}

/* matches.tpl's online control has no id, unlike home.tpl's, so the
   pair is recognised by the classes its links carry */
#wrapper .filters-wrapper .user-filter:has(> a.all-users) {
    flex-direction: row-reverse;
}

/* the two-row layout needs the full 1240 of content: 656 + 24 + 260
   + 24 + 276. That is a 1600 viewport once the sidebar and the two
   gutters are out, so the grid only earns its keep from there up and
   the block wraps like the tablet below it. */
@media (min-width: 1620px) {
    #wrapper .filters-wrapper.three-column {
        display: grid;
        grid-template-columns: max-content 1fr max-content;
        column-gap: 24px;
        row-gap: 20px;
        align-items: start;
    }

    /* the cell is as wide as the widest control in the column, so the
       narrower one has to hug its start edge instead of stretching */
    #wrapper .filters-wrapper.three-column > .user-filter:nth-child(3) { grid-area: 1 / 1; justify-self: start; }
    #wrapper .filters-wrapper.three-column > .user-filter:nth-child(2) { grid-area: 1 / 2; justify-self: end; }
    #wrapper .filters-wrapper.three-column > .user-filter:nth-child(1) { grid-area: 1 / 3; }
    #wrapper .filters-wrapper.three-column > .user-filter:nth-child(5) { grid-area: 2 / 1; justify-self: start; }
    #wrapper .filters-wrapper.three-column > .user-filter:nth-child(4) { grid-area: 2 / 2 / 3 / 4; justify-self: end; }
}

/* ---- 3. the list card, tablet and down --------------------- */
/* matches.tpl and visitor.tpl mark their grid .list-mobile, and
   serg_responsive.css:125 already switches to a float list there.
   Figma draws a proper card instead: avatar on the right with the
   like badge on it, name above a line of text and date.
   The card covers the whole tablet range (1140 and down, same edge as
   the header bar), not only 768: between 769 and 1140 the page was
   still printing the desktop photo cards. Figma draws three per row
   on the 768 frame; the product decision is TWO per row on tablet,
   so the card stays wide enough for the text line and the date. */
@media (max-width: 1140px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #wrapper #grid_desktop.list-mobile ul.grid > li {
        display: flex !important;
        /* children are photo, text, buttons: reversed puts the photo
           on the right, which is where the design has it */
        flex-direction: row-reverse;
        align-items: center;
        gap: 16px;
        height: 96px !important;
        margin: 0;
        padding: 16px !important;
        border: none;
        border-radius: var(--ds-radius);
        background: var(--ds-white);
        box-shadow: 0 4px 16px rgba(22, 22, 22, .08);
        overflow: visible;
    }

    #wrapper #grid_desktop.list-mobile ul.grid > li::before,
    #wrapper #grid_desktop.list-mobile ul.grid > li::after {
        content: none !important;
        display: none !important;
    }

    /* the avatar */
    #wrapper #grid_desktop.list-mobile ul.grid > li > .thumb-image {
        position: relative;
        flex: 0 0 64px;
        width: 64px !important;
        height: 64px !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        /* design-system.css:1195 gives the homepage photo a #ededf2
           placeholder ground and a square corner; neither belongs on a
           64 avatar */
        border-radius: 50% !important;
        background: none !important;
        overflow: visible;
    }

    #wrapper #grid_desktop.list-mobile ul.grid > li > .thumb-image img {
        position: static !important;
        width: 64px !important;
        height: 64px !important;
        border-radius: 50% !important;
        object-fit: cover;
    }

    /* nothing else belongs on the photo in list mode */
    #wrapper #grid_desktop.list-mobile ul.grid > li > .thumb-image .images-counter,
    #wrapper #grid_desktop.list-mobile ul.grid > li > .thumb-image .lastact,
    #wrapper #grid_desktop.list-mobile ul.grid > li > .thumb-image .ko_test_user_group,
    #wrapper #grid_desktop.list-mobile ul.grid > li > .thumb-image .ko_test_user_id,
    #wrapper #grid_desktop.list-mobile ul.grid > li > .thumb-image .ko_new,
    #wrapper #grid_desktop.list-mobile ul.grid > li > .ko_grid_item_buttons {
        display: none !important;
    }

    /* dating/matches.php prints the like state as an <i> with class
       only-mobile inside the photo link; serg_responsive.css:227 hides
       it and paints it flat red. Figma puts it on the avatar's bottom
       left corner in coral. */
    /* !important on the box: the homepage-card fix above puts
       `position: static !important` on every .fa-heart-double, which
       dropped the mutual-like badge back into the flow next to the
       name instead of on the avatar's corner. */
    #wrapper #grid_desktop.list-mobile ul.grid > li > .thumb-image > i.fa {
        display: block !important;
        position: absolute !important;
        top: auto !important;
        left: 2px !important;
        bottom: -4px !important;
        width: 28px;
        height: 28px;
        z-index: 2;
        font-size: 28px;
        line-height: 28px;
        color: var(--ds-coral) !important;
    }

    #wrapper #grid_desktop.list-mobile ul.grid > li > .thumb-image > i.fa:before {
        background-color: currentColor;
        background-image: none;
    }

    /* the text column: name on one row, text and date on the next */
    #wrapper #grid_desktop.list-mobile ul.grid > li > a:not(.thumb-image) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-content: center;
        row-gap: 8px;
        column-gap: 8px;
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        margin: 0;
        padding: 0 !important;
        float: none !important;
        border: none;
        direction: rtl;
        text-align: right;
    }

    /* user_thumb.tpl prints the name twice and the legacy toggle picks
       one at 768 and the other below it; both carry the same name here,
       so both get the same treatment and whichever shows is right */
    #wrapper #grid_desktop.list-mobile ul.grid > li .ko_grid_item_title,
    #wrapper #grid_desktop.list-mobile ul.grid > li .user-age {
        grid-column: 1 / -1;
        grid-row: 1;
        margin: 0 !important;
        font-family: var(--ds-font);
        font-size: 16px;
        font-weight: 700;
        line-height: 20px;
        color: var(--ds-dark);
        text-align: right;
    }

    #wrapper #grid_desktop.list-mobile ul.grid > li .user-age {
        font-size: 14px;
        font-weight: 400;
        line-height: 18px;
    }

    #wrapper #grid_desktop.list-mobile ul.grid > li .ko_grid_item_desc {
        grid-column: 1;
        grid-row: 2;
        margin: 0;
        font-family: var(--ds-font);
        font-size: 14px;
        font-weight: 400;
        line-height: 18px;
        color: #6a6a6a;
        /* the legacy card centres this line; the design keeps it on
           the right, under the name and against the avatar */
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #wrapper #grid_desktop.list-mobile ul.grid > li .ko_grid_item_desc .visitor_date {
        display: inline;
    }

    /* On the visitors page that line is not a description but the visit
       sentence, and the date sits at its end, so a single line with an
       ellipsis cut off exactly the part that matters. Let it take two
       lines there; the card keeps its 96 because two 18px lines still
       fit under the name. */
    #wrapper.visitor_page #grid_desktop.list-mobile ul.grid > li .ko_grid_item_desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        white-space: normal;
    }

    /* serg_responsive.css:268 pulls the date out of flow into the card's
       top left corner; the design keeps it on the same line as the text */
    #wrapper #grid_desktop.list-mobile ul.grid > li .user-date {
        position: static !important;
        grid-column: 2;
        grid-row: 2;
        margin: 0;
        font-family: var(--ds-font);
        font-size: 14px;
        font-weight: 400;
        line-height: 18px;
        color: var(--ds-dark);
        white-space: nowrap;
    }
}

/* the Mobile frame drops the card: full width rows separated by a
   hairline that runs edge to edge, so the row breaks out of the
   column's 24 inset and carries the padding itself */
@media (max-width: 599px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        margin: 0 -24px;
    }

    #wrapper #grid_desktop.list-mobile ul.grid > li {
        height: 97px !important;
        padding: 16px 24px !important;
        border-radius: 0;
        border-bottom: 1px solid #ebebeb !important;
        background: none;
        box-shadow: none;
    }
}

/* ============================================================
   SUBSCRIPTION PLANS  (common/subscriptions.tpl)
   Figma: "Buy Subscription" 1920 + Ipad 768 + Mobile 375.

   Only the three plan tiles come from our template; everything
   else on that screen (the two info cards, the heading, the
   terms checkbox, the button, the card logos and the legal
   text) is the page body written in the admin, so it is not
   touched here.

   The template prints, per plan, a radio and a label with two
   rows: .label (unused) + .month + .cost, then .desc with the
   plan description from the settings. Measured off the 1920
   export (1:1):
     tile        504 x 124, radius 16, 1px #e8e8e8, gap 24
     selected    same box with the brand gradient as the border
     radio       40 ring, 2px gradient, 20 dot when chosen
     period/price 24/34, #161616, 2px #f3f3f3 hairline between
     description 14/18, #a7a7a7, right aligned under the line
     phone       tile full width, period/price 18/26
   ============================================================ */

/* whatever the admin text wraps the three columns in, it has to close the
   float row, or the block after the plans rides up next to them */
#wrapper *:has(> div > input[name="subscription_type"])::after {
    content: '';
    display: block;
    clear: both;
}

/* the three bootstrap columns the template prints */
#wrapper div:has(> input[name="subscription_type"]) {
    float: right;
    width: calc((100% - 48px) / 3);
    margin: 0 0 0 24px;
    padding: 0;
}
#wrapper div:has(> #sub_type_3) { margin-left: 0; }

/* the radio itself stays in the page (it carries the state and the
   data-cost the payment script reads), it is only taken out of sight */
#wrapper input[name="subscription_type"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

#wrapper input[name="subscription_type"] + label {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    height: 124px;
    margin: 0;
    /* 32 padding + 40 ring + 24 gap keeps the text clear of the circle */
    padding: 0 96px 0 32px;
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    background: var(--ds-white);
    font-family: var(--ds-font);
    font-weight: 400;
    direction: rtl;
    text-align: right;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

/* the label carries .clearfix, whose two pseudo-elements would become
   flex items; both are redefined here, so neither can (11th time) */
#wrapper input[name="subscription_type"] + label::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 32px;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border: 2px solid transparent;
    border-radius: 50%;
    /* gradient ring: fill clipped to the padding box, gradient to the border */
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box;
    clear: none;
    display: block;
}

#wrapper input[name="subscription_type"] + label::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 42px;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border-radius: 50%;
    background: var(--ds-gradient);
    opacity: 0;
    clear: none;
    display: block;
}

#wrapper input[name="subscription_type"]:checked + label::after { opacity: 1; }

#wrapper input[name="subscription_type"]:checked + label {
    border-color: transparent;
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box;
}

#wrapper input[name="subscription_type"]:focus-visible + label {
    box-shadow: 0 0 0 3px rgba(132, 54, 236, .16);
}

/* row one: period, hairline, price */
#wrapper input[name="subscription_type"] + label > div {
    float: none;
    width: auto;
}
#wrapper input[name="subscription_type"] + label > div:first-child {
    display: flex;
    align-items: center;
    gap: 16px;
}
#wrapper input[name="subscription_type"] + label .label { display: none; }

#wrapper input[name="subscription_type"] + label .month,
#wrapper input[name="subscription_type"] + label .cost {
    /* legacy sizes these at 40 and 60 per cent of the label and floats
       them, so in the design's box the text ran out of its own width.
       They size to their text here, and the nowrap that the template
       used to print inline lives here now. */
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    float: none;
    white-space: nowrap;
    font-size: 24px;
    font-weight: 500;
    line-height: 34px;
    letter-spacing: -0.48px;
    color: var(--ds-dark);
}
#wrapper input[name="subscription_type"] + label .month {
    padding-left: 16px;
    border-left: 2px solid var(--ds-line-soft);
}

/* row two: the plan description from the settings. It used to carry
   12px, a fixed 27 height and centre alignment inline; an empty
   description leaves no gap. */
#wrapper input[name="subscription_type"] + label .desc {
    font-size: 16px;
    height: auto;
    text-align: right;
    line-height: 22px;
    font-weight: 400;
    color: #a7a7a7;
}
#wrapper input[name="subscription_type"] + label .desc:empty { display: none; }

/* ---- below 1560 the tiles stack, full width -----------------
   Three tiles side by side need 376 each (248 of text plus the 128
   the circle and the paddings take), so the row stops fitting the
   moment the content column drops under 1176; the template prints
   the period and the price nowrap, so anything narrower would spill
   out of the tile instead of wrapping. */
@media (max-width: 1559px) {
    #wrapper div:has(> input[name="subscription_type"]) {
        float: none;
        width: 100%;
        margin: 0 0 24px;
    }
    #wrapper div:has(> #sub_type_3) { margin-bottom: 0; }
}

@media (max-width: 767px) {
    #wrapper div:has(> input[name="subscription_type"]) {
        margin-bottom: 16px;
    }
    #wrapper input[name="subscription_type"] + label {
        padding: 0 88px 0 24px;
    }
    #wrapper input[name="subscription_type"] + label::before { right: 24px; }
    #wrapper input[name="subscription_type"] + label::after  { right: 34px; }
    #wrapper input[name="subscription_type"] + label .month,
    #wrapper input[name="subscription_type"] + label .cost {
        font-size: 18px;
        line-height: 26px;
        letter-spacing: -0.36px;
    }
    #wrapper input[name="subscription_type"] + label .month {
        padding-left: 12px;
    }
    #wrapper input[name="subscription_type"] + label > div:first-child { gap: 12px; }
}

/* ============================================================
   SUBSCRIPTION PAGE  (information_id=7, body written in the admin)
   Figma: "Buy Subscription" 1920 + Ipad 768 + Mobile 375.

   The body of that page is HTML kept in the admin, and it was
   rewritten to match the design: a .ds-sub wrapper with plain
   blocks instead of the old bootstrap rows. Everything the
   payment script needs is still there and untouched - the
   agree_terms checkbox, #accept1 / #accept2, the hidden #amt,
   #amt_id and #accepted, both #sub_iframe blocks with
   #payment_processor and #payment-frame, and the
   [subscriptions ...] shortcode the controller replaces with
   common/subscriptions.tpl.

   Measured off the 1920 export (1:1):
     card       768 x 240, #fafafa, radius 16, padding 32
     heading    32/44 bold, 24/32 in the payment card
     list row   28 icon + 16/28 text, rows 16 apart
     checkbox   32, radius 8, gradient border
     button     190 x 48 pill, gradient
     logos      75 x 48, step 24
     legal      16/28 #5c5c5c on a 960 measure
   ============================================================ */

#wrapper .info-page-text {
    padding: 0;
}

#wrapper .ds-sub {
    font-family: var(--ds-font);
    direction: rtl;
    text-align: right;
    color: var(--ds-dark);
}

#wrapper .ds-sub .ds-sub-h {
    margin: 0 0 16px;
    font-size: 32px;
    font-weight: 700;
    line-height: 44px;
    letter-spacing: -0.64px;
    color: var(--ds-dark);
}
#wrapper .ds-sub .ds-sub-h-sm {
    margin-bottom: 4px;
    font-size: 24px;
    line-height: 32px;
    letter-spacing: -0.48px;
}

/* ---- the two cards on top ---------------------------------- */
#wrapper .ds-sub .ds-sub-row {
    display: flex;
    align-items: stretch;
    gap: 24px;
    margin: 0 0 46px;
}
#wrapper .ds-sub .ds-sub-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 32px;
    background: #fafafa;
    border-radius: 16px;
}

#wrapper .ds-sub .ds-sub-list {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: right;
}
#wrapper .ds-sub .ds-sub-list li,
#wrapper .ds-sub .ds-sub-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
    color: var(--ds-dark);
    text-align: right;
}
#wrapper .ds-sub .ds-sub-list li + li {
    margin-top: 16px;
}

/* the icons are drawn here rather than pulled from /image, which is
   not part of the repository and cannot be deployed with the theme */
#wrapper .ds-sub .ds-sub-list li::before,
#wrapper .ds-sub .ds-sub-info::before {
    content: '';
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 28px 28px;
}
#wrapper .ds-sub .ds-sub-list li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none'%3E%3Ccircle cx='14' cy='14' r='13' stroke='%2334c759' stroke-width='2'/%3E%3Cpath d='M8.5 14.4l3.6 3.6 7.4-7.4' stroke='%2334c759' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#wrapper .ds-sub .ds-sub-info::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none'%3E%3Ccircle cx='14' cy='14' r='13' stroke='%23ff383c' stroke-width='2'/%3E%3Cpath d='M14 12.8v6.4' stroke='%23ff383c' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='14' cy='8.9' r='1.3' fill='%23ff383c'/%3E%3C/svg%3E");
}

#wrapper .ds-sub .ds-sub-note {
    margin: 0;
    font-size: 16px;
    line-height: 28px;
    color: #5c5c5c;
    text-align: right;
}

/* ---- plans -------------------------------------------------- */
#wrapper .ds-sub .ds-sub-plans {
    margin: 0 0 40px;
}
#wrapper .ds-sub .ds-sub-plans > .ds-sub-h {
    margin-bottom: 14px;
}
#wrapper .ds-sub .ds-sub-plans-row::after {
    content: '';
    display: block;
    clear: both;
}

/* ---- terms row: checkbox, link, button --------------------- */
#wrapper .ds-sub .ds-sub-terms {
    margin: 0 0 48px;
}
#wrapper .ds-sub .ds-sub-agree {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 24px;
}
#wrapper .ds-sub .ds-sub-agree label {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--ds-dark);
    cursor: pointer;
}
#wrapper .ds-sub .ds-sub-agree .siteTerms {
    color: var(--ds-coral);
    text-decoration: none;
}
#wrapper .ds-sub .ds-sub-agree .siteTerms:hover {
    text-decoration: underline;
}
#wrapper .ds-sub .ds-sub-agree input[type="checkbox"] {
    -webkit-appearance: none;
            appearance: none;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 1.5px solid transparent;
    border-radius: 8px;
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box;
    cursor: pointer;
}
#wrapper .ds-sub .ds-sub-agree input[type="checkbox"]:checked {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3E%3Cpath d='M3.5 9.3l3.7 3.7 7.3-7.3' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat padding-box,
        var(--ds-gradient) padding-box,
        var(--ds-gradient) border-box;
}

#wrapper .ds-sub .ds-sub-btn {
    display: block;
    width: 190px;
    height: 48px;
    margin: 0;
    padding: 0 16px;
    border: none;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-gradient);
    color: var(--ds-white);
    font-family: var(--ds-font);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.36px;
    line-height: 48px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow .2s;
}
#wrapper .ds-sub .ds-sub-btn:hover {
    box-shadow: 0 8px 20px rgba(253, 46, 99, .3);
}

/* ---- the payment frames stay exactly as the payment code
        expects them; only the spacing around is ours --------- */
#wrapper .ds-sub .ds-sub-frame {
    margin: 0 0 40px;
}

/* ---- accepted cards ---------------------------------------- */
#wrapper .ds-sub .ds-sub-pay {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0 0 52px;
}
#wrapper .ds-sub .ds-sub-pay-text {
    flex: 1 1 auto;
    min-width: 0;
}
#wrapper .ds-sub .ds-sub-pay .ds-sub-note {
    line-height: 24px;
}
#wrapper .ds-sub .ds-sub-logos {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 0 0 auto;
    direction: ltr;
}
#wrapper .ds-sub .ds-sub-logos img {
    width: 75px;
    height: 48px;
    object-fit: contain;
}

/* ---- security and terms ------------------------------------ */
#wrapper .ds-sub .ds-sub-legal p {
    max-width: 960px;
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 28px;
    color: #5c5c5c;
    text-align: right;
}
#wrapper .ds-sub .ds-sub-mails {
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 28px;
}
#wrapper .ds-sub .ds-mail {
    color: var(--ds-coral);
    text-decoration: none;
    white-space: nowrap;
}
#wrapper .ds-sub .ds-mail:hover {
    text-decoration: underline;
}
#wrapper .ds-sub .ds-sub-sep {
    margin: 0 8px;
    color: var(--ds-dark-15);
}

/* ---- tablet and phone -------------------------------------- */
@media (max-width: 1140px) {
    #wrapper .ds-sub .ds-sub-row {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 32px;
    }
    #wrapper .ds-sub .ds-sub-pay {
        flex-direction: column;
        align-items: stretch;
    }
    #wrapper .ds-sub .ds-sub-logos {
        justify-content: space-between;
        gap: 16px;
    }
    #wrapper .ds-sub .ds-sub-logos img {
        width: calc((100% - 32px) / 3);
        max-width: 182px;
        height: auto;
    }
}

@media (max-width: 767px) {
    /* the admin editor likes to stamp a font-size onto the pasted markup,
       and an inline size would beat these, so the phone sizes insist */
    #wrapper .ds-sub .ds-sub-h {
        font-size: 24px !important;
        line-height: 32px;
        letter-spacing: -0.48px;
    }
    #wrapper .ds-sub .ds-sub-h-sm {
        font-size: 20px !important;
        line-height: 28px;
    }
    #wrapper .ds-sub .ds-sub-card {
        padding: 24px;
    }
    #wrapper .ds-sub .ds-sub-logos {
        justify-content: flex-start;
        gap: 12px;
    }
    #wrapper .ds-sub .ds-sub-logos img {
        width: calc((100% - 24px) / 3);
        max-width: 90px;
    }
    #wrapper .ds-sub .ds-sub-btn {
        width: 100%;
    }
}

/* ============================================================
   CMS TEXT PAGES  (Rules / About / Privacy / Contact us ...)
   information/information.tpl -> <div class="info-page-text">
   The body of these pages is HTML typed in the admin, so the
   block below is typography only: it never assumes a class,
   an id or an order, it just gives every heading, paragraph
   and list the size, colour and rhythm of the export.

   The admin editor leaves its own leftovers in that HTML -
   font-size: 13px / 12px / small, Arial, color: #222 - and an
   inline style beats a stylesheet, so the reset insists.
   Everything the page inherits (size, family, colour) is set
   once on the container and forced to inherit below it, which
   is why the headings carry their size on the block itself
   and not on the <strong> inside.

   Excluded: the subscription page (information_id=7). Its body
   is the .ds-sub block from the section above, so the guard
   :not(:has(.ds-sub, .ds-contact)) keeps these rules off it.

   Measured off Rules.png (1920), Ipad.png (768), Mobile.png (375) -
   the same type on all three, only the column changes:
     column     1560 / 704 / 327  (already what the layout gives)
     body       16/28  #5c5c5c
     heading    24/34  #161616 bold, no underline, 44 above
     block gap  24 (the &nbsp; spacer divs of the CMS text)
     bullet     6px dot on the right edge, text inset 14
   ============================================================ */

#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) {
    padding: 0;
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 28px;
    color: #5c5c5c;
    text-align: right;
    direction: rtl;
}

/* the editor's leftovers - see the note above */
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) * {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
}

/* The rhythm is the stylesheet's: 24 between blocks, and because
   sibling margins collapse, a heading's 44 above wins over it on its
   own. This asks the CMS text to carry no empty <div>&nbsp;</div>
   spacers - with them a gap becomes 24 + 28 + 24. The cleaned body
   that goes into the admin has them removed, and the inline
   margin-left:-1.0cm of the last paragraph goes with them. */
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) div,
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) p {
    margin: 0 0 24px !important;
    padding: 0 !important;
}
/* the title of the Rules page carries .text-center, and the export
   right-aligns it like everything else */
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) .text-center {
    text-align: right !important;
}

/* headings: <div><u><strong>..</strong></u></div>, and the page title,
   which is <div class="text-center"><strong>..</strong></div>. Matching
   the <u>/<strong> as the only child keeps a bold word inside a running
   paragraph at body size. */
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) div:has(> u > strong),
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) div:has(> strong:only-child),
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) p:has(> u > strong),
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) p:has(> strong:only-child),
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) h1,
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) h2,
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) h3,
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) h4,
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) .h1,
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) .h2,
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) .h3,
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) .h4 {
    margin: 44px 0 24px !important; /* 44 above: it collapses with the 24 below the block before */
    font-size: 24px !important;
    line-height: 34px !important;
    font-weight: 700;
    letter-spacing: -0.48px;
    color: var(--ds-dark) !important;
}
/* the title opens the page, so it keeps no space above it. The four
   selectors repeat the shapes above on purpose: :has() carries the
   weight of what it holds, so anything shorter would lose to them. */
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) > div:first-child:has(> u > strong),
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) > div:first-child:has(> strong:only-child),
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) > p:first-child:has(> u > strong),
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) > p:first-child:has(> strong:only-child) {
    margin-top: 0 !important;
}
/* the export underlines nothing */
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) u {
    text-decoration: none;
}

/* lists ---------------------------------------------------- */
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) ul,
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) ol {
    margin: 24px 0;
    text-align: right;
}
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) ul {
    padding: 0 14px 0 0;
    list-style: none;
}
/* the numbers are the page's own (<ol start="6"> and up continue the
   count), so the marker stays native - the inset only makes room for
   three digits */
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) ol {
    padding: 0 34px 0 0;
    list-style: decimal;
}
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) li {
    margin: 0 0 24px;
    text-align: right;
}
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) li:last-child {
    margin-bottom: 0;
}
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) ul > li {
    position: relative;
}
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) ul > li::before {
    content: '';
    position: absolute;
    top: 11px;
    right: -14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5c5c5c;
}

/* links ---------------------------------------------------- */
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) a {
    color: var(--ds-coral) !important;
    text-decoration: none;
}
#wrapper .info-page-text:not(:has(.ds-sub, .ds-contact)) a:hover {
    text-decoration: underline;
}

/* ============================================================
   CONTACT PAGE  (information_id=9)
   Body HTML from the admin wrapped in .ds-contact, plus the
   [contact_note] shortcode. That shortcode is NOT ours: the
   controller swaps it for a note only logged-in members see -
   three lines in one <b>, then the picture that shows where the
   member id sits in the sidebar. The page prints the shortcode
   twice on purpose: .ds-contact-note keeps the text and drops
   the picture, .ds-contact-pic keeps the picture and drops the
   text, so the export's order (note, cards, picture) comes out
   of one string the controller builds in one piece. A guest
   gets an empty string for both, and nothing shows.

   Measured off Contact Us.png (1920), Ipad.png (768), Mobile.png (375):
     card      768 x 124, radius 12, border 1px #e8e8e8, padding 0 32
     circle    56, brand gradient, white glyph 26
     label     20/28 #161616, value 24/34 coral, hairline 2px between
     sub       14/20 #5c5c5c
     picture   419 x 705, right edge of the column, full width on phone
     rhythm    40 between blocks
   ============================================================ */

#wrapper .info-page-text:has(.ds-contact) {
    padding: 0;
}

#wrapper .ds-contact {
    font-family: var(--ds-font);
    direction: rtl;
    text-align: right;
    font-size: 16px;
    line-height: 28px;
    color: var(--ds-dark);
}

#wrapper .ds-contact .ds-contact-h {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 700;
    line-height: 34px;
    letter-spacing: -0.48px;
    color: var(--ds-dark);
}

/* ---- the note the controller builds -------------------------
   Two divs and the picture, in one string. The picture belongs
   to the other copy of the shortcode, so it is hidden here.     */
#wrapper .ds-contact .ds-contact-note {
    margin: 0 0 40px;
}
#wrapper .ds-contact .ds-contact-note-top {
    margin: 0 0 16px;
    color: #5c5c5c;
}
#wrapper .ds-contact .ds-contact-note-text {
    color: var(--ds-dark);
}
#wrapper .ds-contact .ds-contact-note img,
#wrapper .ds-contact .ds-contact-note > br {
    display: none;
}
/* fallback: before the controller was updated the same shortcode
   returned all three lines inside one <b> separated by <br>, and
   this keeps that shape readable if the two ever get out of step */
#wrapper .ds-contact .ds-contact-note b {
    display: block;
    font-weight: 400;
    color: var(--ds-dark);
}
#wrapper .ds-contact .ds-contact-note b::first-line {
    color: #5c5c5c;
}
#wrapper .ds-contact .ds-contact-note b br ~ br {
    display: none;
}

/* ---- the two cards ----------------------------------------- */
/* the export puts the phone card on the left and the mail card on the
   right, which is the reverse of the reading order they keep when they
   stack, so the row is reversed rather than the markup */
#wrapper .ds-contact .ds-contact-row {
    display: flex;
    flex-direction: row-reverse;
    /* row-reverse in an rtl column runs left to right, so flex-end
       packs the pair against the right edge of the text column while
       the phone card keeps its place to the left of the mail one */
    justify-content: flex-end;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0 0 40px;
}
/* each card is only as wide as its own two lines, not half the column */
#wrapper .ds-contact .ds-contact-card {
    display: flex;
    flex: 0 1 auto;
    min-width: 0;
    align-items: center;
    gap: 24px;
    min-height: 124px;
    padding: 16px 32px;
    background: var(--ds-white);
    border: 1px solid #e8e8e8;
    border-radius: var(--ds-radius);
}

#wrapper .ds-contact .ds-contact-ic {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ds-gradient);
    font-size: 0;
    line-height: 0;
    position: relative;
}
#wrapper .ds-contact .ds-contact-ic::before {
    content: '';
    position: absolute;
    inset: 15px;
    background: var(--ds-white);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: contain;
            mask-size: contain;
}
#wrapper .ds-contact .ds-contact-ic-phone::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.15 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1C10.85 21 3 13.15 3 3.5c0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.15 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1C10.85 21 3 13.15 3 3.5c0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
}
#wrapper .ds-contact .ds-contact-ic-mail::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M6.5 4h11A4.5 4.5 0 0 1 22 8.5v7a4.5 4.5 0 0 1-4.5 4.5h-11A4.5 4.5 0 0 1 2 15.5v-7A4.5 4.5 0 0 1 6.5 4Zm-1.2 5.4L12 15.6l6.7-5.2-1.1-1.4L12 13.3 6.4 9z'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M6.5 4h11A4.5 4.5 0 0 1 22 8.5v7a4.5 4.5 0 0 1-4.5 4.5h-11A4.5 4.5 0 0 1 2 15.5v-7A4.5 4.5 0 0 1 6.5 4Zm-1.2 5.4L12 15.6l6.7-5.2-1.1-1.4L12 13.3 6.4 9z'/%3E%3C/svg%3E");
}

#wrapper .ds-contact .ds-contact-body {
    min-width: 0;
}
#wrapper .ds-contact .ds-contact-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}
#wrapper .ds-contact .ds-contact-label {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 34px;
    color: var(--ds-dark);
}
#wrapper .ds-contact .ds-contact-value {
    flex: 0 1 auto;
    min-width: 0;
    margin-right: 16px;
    padding-right: 16px;
    border-right: 2px solid #f3f3f3;
    font-size: 24px;
    line-height: 34px;
    color: var(--ds-coral);
    text-decoration: none;
    word-break: break-word;
    direction: ltr;
}
#wrapper .ds-contact .ds-contact-value:hover {
    text-decoration: underline;
}
#wrapper .ds-contact .ds-contact-sub {
    font-size: 14px;
    line-height: 20px;
    color: #5c5c5c;
}
/* the opening hours move to the next line whole, they never split
   across the dash */
#wrapper .ds-contact .ds-nb {
    white-space: nowrap;
}

/* ---- the picture from the shortcode ------------------------- */
#wrapper .ds-contact .ds-contact-pic {
    margin: 0 0 40px;
    font-size: 0;
    line-height: 0;
}
#wrapper .ds-contact .ds-contact-pic > div,
#wrapper .ds-contact .ds-contact-pic b,
#wrapper .ds-contact .ds-contact-pic br {
    display: none;
}
#wrapper .ds-contact .ds-contact-pic img {
    /* the controller now points at /Sidebar.png in the project root
       (/image is in .gitignore and does not deploy); content keeps the
       page right even where the old src is still being served */
    content: url("/Sidebar.png");
    display: block;
    width: 419px;
    height: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: 0;
}

#wrapper .ds-contact .ds-contact-foot {
    margin: 0;
    color: var(--ds-dark);
}

/* ---- tablet: the cards stack and take the whole column -------- */
@media (max-width: 1140px) {
    #wrapper .ds-contact .ds-contact-row {
        display: block;
    }
    /* tablet illustration: the iPad menu screen (768 x 1024) */
    #wrapper .ds-contact .ds-contact-pic img {
        content: url("/Menuipad.png");
        width: 100%;
        max-width: 768px;
    }
    #wrapper .ds-contact .ds-contact-card + .ds-contact-card {
        margin-top: 24px;
    }
}

/* ---- phone -------------------------------------------------- */
@media (max-width: 767px) {
    #wrapper .ds-contact {
        font-size: 14px;
        line-height: 22px;
    }
    #wrapper .ds-contact .ds-contact-h {
        margin-bottom: 16px;
        font-size: 20px !important;
        line-height: 28px;
        letter-spacing: -0.4px;
    }
    #wrapper .ds-contact .ds-contact-note {
        margin-bottom: 24px;
    }
    #wrapper .ds-contact .ds-contact-row {
        display: block;
        margin-bottom: 24px;
    }
    #wrapper .ds-contact .ds-contact-card {
        min-height: 0;
        padding: 28px 24px;
    }
    #wrapper .ds-contact .ds-contact-card + .ds-contact-card {
        margin-top: 16px;
    }
    /* the hairline goes with the single line: label, value and hours
       stack right-aligned next to the circle */
    #wrapper .ds-contact .ds-contact-line {
        display: block;
    }
    #wrapper .ds-contact .ds-contact-label {
        display: block;
        font-size: 16px !important;
        line-height: 24px;
    }
    #wrapper .ds-contact .ds-contact-value {
        display: block;
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 18px !important;
        line-height: 26px;
    }
    #wrapper .ds-contact .ds-contact-sub {
        font-size: 12px !important;
        line-height: 18px;
    }
    #wrapper .ds-contact .ds-contact-pic {
        margin-bottom: 24px;
    }
    /* phone illustration: the mobile menu screen (375 x 812) */
    #wrapper .ds-contact .ds-contact-pic img {
        content: url("/Menu.png");
        width: 100%;
        max-width: 375px;
    }
}

/* ============================================================
   "CONFIRM YOUR E-MAIL" STRIP
   header.tpl prints #email_approve_ticket as the first child of
   <main> for a logged-in member whose address is not confirmed
   (never on /message, /likeme, /visitors). Everything about it
   is written inline in that echo - the yellow, the 12px, the
   50 x 22 button - so every line below has to insist.

   Three things were wrong besides the colour. Legacy pinned it
   with `position: absolute; top: 48px` for the old 48px mobile
   bar, and the new header is 75 and 63, so on a phone half the
   strip sat under it. The strip ran the full width of <main>
   and slid under the fixed sidebar. And the hidden <form> is a
   block, which broke the sentence onto its own line.
   ============================================================ */

#email_approve_ticket {
    position: static !important;   /* beats serg_responsive.css:46 */
    /* the sidebar carries the vertical rule on its left edge, 280 in
       from the window, and the strip runs right up to that rule; the
       text keeps the page gutters through the padding below */
    width: auto;
    /* <main> is the box that scrolls, so its 8px scrollbar lane sits
       under the fixed sidebar while the strip ends 8px short of it.
       100vw - 100% is exactly that lane (0 when the page is short and
       there is no bar), so the strip always meets the sidebar's rule */
    margin: 0 calc(280px - (100vw - 100%)) 0 0;
    padding: 12px 40px;
    background: var(--ds-coral-bg);
    font-family: var(--ds-font) !important;
    font-size: 14px;
    line-height: 22px;
    color: var(--ds-dark);
    direction: rtl;
    text-align: right;
}

/* the hidden form only carries the address for the ajax call */
#email_approve_ticket > form {
    display: none;
}

/* close: the white round button of the modals, on the left like there */
#email_approve_ticket .ds-ticket-close {
    float: left;
    width: 24px;
    height: 24px;
    margin: 0 0 0 -8px;
    border-radius: 50%;
    background: var(--ds-white);
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    position: relative;
}
#email_approve_ticket .ds-ticket-close::before {
    content: '';
    position: absolute;
    inset: 5px;
    background: var(--ds-coral);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-864,-72)'%3E %3Cpath d='M868.5 91.5L883.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M883.5 91.5L868.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-864,-72)'%3E %3Cpath d='M868.5 91.5L883.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M883.5 91.5L868.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: contain;
            mask-size: contain;
}

/* the send button: the pill of the design system instead of the
   50 x 22 purple box the template used to write inline */
#email_approve_ticket a.buttontr {
    position: relative;
    display: inline-block;
    width: auto;
    height: 32px;
    padding: 0 20px;
    margin: 0 6px;
    border: 0;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-gradient);
    font-size: 14px;
    font-weight: 500;
    line-height: 32px;
    /* custom.css:1373 pins .buttontr to color: #fff !important */
    color: var(--ds-white) !important;
    text-decoration: none;
    vertical-align: middle;
}
#email_approve_ticket a.buttontr:hover,
#email_approve_ticket a.buttontr:focus {
    opacity: .9;
    color: var(--ds-white) !important;
}

/* the "change my address" link */
#email_approve_ticket a[href="/settings"] {
    color: var(--ds-coral) !important;
    text-decoration: underline;
    white-space: nowrap;   /* it moves to the next line whole, not mid-phrase */
}

@media (max-width: 1140px) {
    #email_approve_ticket {
        margin-right: 0;
        padding: 12px 32px;
    }
}

@media (max-width: 767px) {
    #email_approve_ticket {
        padding: 12px 24px;
        font-size: 13px;
        line-height: 20px;
    }
    #email_approve_ticket a.buttontr {
        height: 28px;
        padding: 0 16px;
        line-height: 28px;
    }
}

/* ============================================================
   PHOTO PREVIEW  (lightbox2, vendors/lightbox)
   The profile gallery opens its photos with lightbox2, and the
   library still looked like 2012: a 4px white frame with a 3px
   radius, an "Image 2 of 5" bar under it with a 30px close
   sprite, and the whole thing pinned near the top of the page
   rather than the middle of the screen. The export has none of
   that: the picture sits in the middle of a grey screen with a
   12px radius and a chevron on each side.

   Two notes on why it is done this way. Both boxes go to
   position: fixed, because on this site the scroller is <main>
   and not the window, so the absolute overlay the library sets
   only covered the first screen. And the white frame goes from
   the CSS, not from JS: lightbox2 reads the border width of
   .lb-image once, when it builds itself, so with the border at
   0 it sizes the container to the picture exactly.

   Measured off the export: backdrop #5c5c5c over white, which
   is #333 at the library's .8; radius 12; chevron 24, white.
   ============================================================ */

.lightboxOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    /* the mobile header sits at 10000, and at 9999 the veil stopped
       short of it: the bar stayed lit while the page behind went grey */
    z-index: 10050 !important;
    background-color: #333 !important;
}

.lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0;
    bottom: 0;
    z-index: 10051 !important;
    width: 100% !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

/* the picture */
.lightbox .lb-image {
    border: 0 !important;
    border-radius: var(--ds-radius);
}
.lightbox .lb-outerContainer {
    background: transparent !important;
    border-radius: var(--ds-radius);
}

/* the caption bar carries the close button and the counter, and the
   export has neither: outside the picture closes it, so does Esc */
.lightbox .lb-dataContainer {
    display: none !important;
}

/* the two chevrons, always visible, 24 in from each edge */
.lightbox .lb-nav a.lb-prev,
.lightbox .lb-nav a.lb-next {
    width: 72px !important;
    background: none !important;
    opacity: 1 !important;
    position: relative;
}
.lightbox .lb-nav a.lb-prev { float: left; }
.lightbox .lb-nav a.lb-next { float: right; }

.lightbox .lb-nav a.lb-prev::before,
.lightbox .lb-nav a.lb-next::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    background: var(--ds-white);
    opacity: .85;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: contain;
            mask-size: contain;
}
.lightbox .lb-nav a.lb-prev::before {
    left: 24px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-912,-120)'%3E %3Cpath d='M927 139.92L920.48 133.4C919.71 132.63 919.71 131.37 920.48 130.6L927 124.08' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-912,-120)'%3E %3Cpath d='M927 139.92L920.48 133.4C919.71 132.63 919.71 131.37 920.48 130.6L927 124.08' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
}
.lightbox .lb-nav a.lb-next::before {
    right: 24px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-912,-72)'%3E %3Cpath d='M920.91 91.92L927.43 85.4C928.2 84.63 928.2 83.37 927.43 82.6L920.91 76.08' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-912,-72)'%3E %3Cpath d='M920.91 91.92L927.43 85.4C928.2 84.63 928.2 83.37 927.43 82.6L920.91 76.08' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
}
.lightbox .lb-nav a.lb-prev:hover::before,
.lightbox .lb-nav a.lb-next:hover::before {
    opacity: 1;
}

@media (max-width: 767px) {
    .lightbox {
        padding: 16px;
    }
    .lightbox .lb-nav a.lb-prev,
    .lightbox .lb-nav a.lb-next {
        width: 56px !important;
    }
    .lightbox .lb-nav a.lb-prev::before { left: 16px; }
    .lightbox .lb-nav a.lb-next::before { right: 16px; }
}

/* ============================================================
   ACCOUNT PAGES  (/settings and /account)
   Figma archive 11 "Profile" 1920, Ipad 768, Mobile 375.

   The markup is untouched: everything below is layout and paint
   on the classes settings.tpl already prints. Two places use
   `order`, because the export groups the fields differently from
   the order the template writes them - the two password fields
   share a row, and the blocked list comes before the private
   photo list. Nothing is moved in the DOM.

   Measured off the 1920 export:
     column     rail 0..385 with a #e8e8e8 rule, content 425..1600
     heading    20/28 bold #161616, 32 under it
     label      14/20 #999999, field 48 tall, radius 8, #dcdcdc
     grid       2 fields per row here, 3 in the mail block, gap 40/24
     button     180 x 48 pill, brand gradient, 32 above
     section    2px #f3f3f3 rule with 40 either side
     card       488 x 90, radius 12, avatar 56, checkbox 24
   ============================================================ */

/* ---- shell ------------------------------------------------- */
#wrapper.ko_account_page > .clearfix {
    background-color: var(--ds-white);
}
#wrapper.ko_account_page > .clearfix > .left-column {
    width: 24%;
    padding: 0;
    border-right: none !important;
}
#wrapper.ko_account_page > .clearfix > .front-clfx {
    box-sizing: border-box;
    width: 76%;
    padding-left: 40px;
    padding-right: 0;   /* bootstrap's .col-sm-8 adds 15; the column runs to the edge */
    border-left: 1px solid var(--ds-line);
    /* legacy runs a second #ccc rule down the right edge of the column,
       right where the page already ends; the export has only the two
       lines - the rail divider and the sidebar's */
    border-right: none;
}
#wrapper.ko_account_page,
#wrapper.settings-clfx {
    border-left: none;
}
#wrapper.ko_account_page .mobile-fixer,
#wrapper.ko_account_page .full-column,
#wrapper.ko_account_page .news-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    box-shadow: none !important;
}
#wrapper.ko_account_page .profile_settings_page {
    box-sizing: border-box;
    padding: 40px 0 56px;
    background-color: var(--ds-white);
    direction: rtl;
    text-align: right;
}
#wrapper.ko_account_page .profile_settings_page .actions:empty {
    display: none;
}

/* ---- left rail: same icons as the profile column ----------- */
#wrapper.ko_account_page .left-column .btn-block a.ko_btn_message {
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    width: auto;
    height: auto;
    line-height: 1;
}
#wrapper.ko_account_page .left-column .btn-block a i {
    font-size: 44px !important;
    width: 44px;
    height: 44px;
    line-height: 44px;
}
#wrapper.ko_account_page .left-column .btn-block a i:before {
    background-color: transparent;
    background-image: var(--ds-gradient);
}
#wrapper.ko_account_page .left-column .btn-block p {
    margin: 24px 0 0;
    font-size: 16px;
    line-height: 22px;
    color: var(--ds-dark);
    text-align: center;
}
#wrapper.ko_account_page .profile-buttons .btn-block {
    padding: 32px 0;
    text-align: center;
}
#wrapper.ko_account_page .profile-buttons .btn-block + .btn-block {
    border-top: 1px solid var(--ds-line-soft);
}
/* the legacy `.divider:after` paints a second bar under the whole block */
#wrapper.ko_account_page .left-column .divider:after {
    display: none !important;
}

/* ---- headings ---------------------------------------------- */
#wrapper.ko_account_page .profile_settings_page h4 {
    margin: 0 0 32px;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: -0.4px;
    color: var(--ds-dark);
    text-align: right;
}

/* ---- the field grid ---------------------------------------- */
/* grid, not flex: two equal columns that always add up, whatever the
   column width rounds to */
#wrapper.ko_account_page .ko_form_profile_settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 40px;
    margin: 0;
}
#wrapper.ko_account_page .ko_form_profile_settings .form-group {
    min-width: 0;
    margin: 0;
    padding: 0;
}
/* the export pairs the two password fields on one row and puts the
   visibility select next to the address, which is not the order the
   template writes them in */
#wrapper.ko_account_page > .clearfix .profile_settings_page > .ko_form_profile_settings > .form-group:nth-of-type(1) { order: 2; }
#wrapper.ko_account_page > .clearfix .profile_settings_page > .ko_form_profile_settings > .form-group:nth-of-type(2) { order: 4; }
#wrapper.ko_account_page > .clearfix .profile_settings_page > .ko_form_profile_settings > .form-group:nth-of-type(3) { order: 3; }
#wrapper.ko_account_page > .clearfix .profile_settings_page > .ko_form_profile_settings > .form-group:nth-of-type(4) { order: 1; }

#wrapper.ko_account_page .ko_settings_block .ko_form_profile_settings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* and in the mail block the export reads them right to left */
#wrapper.ko_account_page .ko_settings_block .ko_form_profile_settings > .form-group:nth-of-type(1) { order: 3; }
#wrapper.ko_account_page .ko_settings_block .ko_form_profile_settings > .form-group:nth-of-type(2) { order: 2; }
#wrapper.ko_account_page .ko_settings_block .ko_form_profile_settings > .form-group:nth-of-type(3) { order: 1; }

#wrapper.ko_account_page .form-group h5 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #999999;
    text-align: right;
}

#wrapper.ko_account_page .form-group .form-control {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #dcdcdc;
    border-radius: var(--ds-radius);   /* every field on the site is 12 */
    background-color: var(--ds-white);
    font-family: var(--ds-font);
    font-size: 16px !important;
    line-height: 46px;
    color: var(--ds-dark);
    text-align: right;
    box-shadow: none;
}
#wrapper.ko_account_page .form-group .form-control:focus {
    border-color: var(--ds-coral);
    outline: none;
    box-shadow: none;
}
#wrapper.ko_account_page .form-group select.form-control {
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    padding-left: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9.5L12 15.5L18 9.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
}
#wrapper.ko_account_page .form-group select.form-control[disabled] {
    opacity: .6;
}
#wrapper.ko_account_page .form-group p.error {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--ds-coral);
}

/* ---- the save buttons -------------------------------------- */
#wrapper.ko_account_page .profile_settings_page button.ko_btn_submit,
#wrapper.ko_account_page .profile_settings_page .buttontr.btn {
    flex: 0 0 auto;
    grid-column: 1 / -1;      /* its own row under the fields */
    justify-self: start;      /* rtl: the right edge of the column */
    order: 9;                 /* the fields carry orders 1..4, it comes last */
    width: 180px;
    height: 48px;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-gradient);
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 48px;
    color: var(--ds-white);
    text-align: center;
}
#wrapper.ko_account_page .profile_settings_page button.ko_btn_submit:hover {
    opacity: .9;
    color: var(--ds-white);
}

/* ---- the two list blocks ----------------------------------- */
#wrapper.ko_account_page .ko_settings_block {
    margin: 40px 0 0;
    padding: 40px 0 0;
    border-top: 2px solid var(--ds-line-soft);
}
/* the export shows the blocked list first */
#wrapper.ko_account_page .profile_settings_page {
    display: flex;
    flex-direction: column;
}
#wrapper.ko_account_page .profile_settings_page > .ko_settings_block:nth-of-type(2) { order: 3; }
#wrapper.ko_account_page .profile_settings_page > .ko_settings_block:nth-of-type(3) { order: 5; }
#wrapper.ko_account_page .profile_settings_page > .ko_settings_block:nth-of-type(4) { order: 4; }

#wrapper.ko_account_page .ko_settings_block form:not(.ko_form_profile_settings) {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
}
/* the empty float-clearer becomes the line break before the button */
#wrapper.ko_account_page .ko_settings_block form > .clearfix {
    flex: 0 0 100%;
    height: 0;
    margin: 0;
}

#wrapper.ko_account_page .ko_settings_pf_item {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 1 488px;
    box-sizing: border-box;
    min-width: 0;
    height: 90px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius);
    background: var(--ds-white);
}
#wrapper.ko_account_page .ko_settings_pf_item > a {
    flex: 0 0 auto;
    display: block;
    width: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
    border: 0;
}
#wrapper.ko_account_page .ko_settings_pf_item > a img {
    width: 56px;
    height: 56px;
    margin: 0;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
#wrapper.ko_account_page .ko_settings_pf_item > span {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    line-height: 22px;
}
#wrapper.ko_account_page .ko_settings_pf_item > span a {
    color: var(--ds-dark);
    text-decoration: none;
}
#wrapper.ko_account_page .ko_settings_pf_item > input[type="checkbox"] {
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: 0 auto 0 0;   /* pushed to the far side of the card */
    border: 1.5px solid var(--ds-coral);
    border-radius: 6px;
    background: var(--ds-white);
    cursor: pointer;
    position: relative;
    top: 0;              /* legacy drops it 44px down the card */
    vertical-align: middle;
}
#wrapper.ko_account_page .ko_settings_pf_item > input[type="checkbox"]:checked {
    border-color: transparent;
    background: var(--ds-gradient);
}
#wrapper.ko_account_page .ko_settings_pf_item > input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 4px;
    width: 7px;
    height: 12px;
    border: solid var(--ds-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ---- tablet: the rail stays beside the content, fields go one up ---- */
@media (max-width: 1140px) {
    #wrapper.ko_account_page > .clearfix > .left-column {
        width: 41%;
    }
    #wrapper.ko_account_page > .clearfix > .front-clfx {
        width: 59%;
        padding-left: 16px !important;
    }
    #wrapper.ko_account_page .profile_settings_page {
        padding: 32px 0 48px !important;
    }
    #wrapper.ko_account_page .ko_form_profile_settings,
    #wrapper.ko_account_page .ko_settings_block .ko_form_profile_settings {
        grid-template-columns: minmax(0, 1fr);
    }
    #wrapper.ko_account_page .ko_settings_pf_item {
        flex: 0 0 100%;
    }
    #wrapper.ko_account_page .profile-buttons .btn-block {
        padding: 24px 0;
    }
    /* one field per row: the export reads them in the order the
       template writes them, so the desktop regrouping is dropped */
    #wrapper.ko_account_page .profile_settings_page .ko_form_profile_settings > .form-group {
        order: 0;
    }
}

/* ---- phone: the rail moves above the form, its two blocks side by
        side with a rule between them and one under the pair -------- */
@media (max-width: 767px) {
    #wrapper.ko_account_page > .clearfix {
        display: block;
    }
    #wrapper.ko_account_page > .clearfix > .left-column,
    #wrapper.ko_account_page > .clearfix > .front-clfx {
        float: none;
        width: 100%;
        padding-left: 0 !important;
        border-left: 0;
    }
    #wrapper.ko_account_page > .clearfix > .left-column {
        border-bottom: 1px solid var(--ds-line);
    }
    #wrapper.ko_account_page .profile-buttons {
        display: flex;
    }
    #wrapper.ko_account_page .profile-buttons .btn-block {
        flex: 1 1 0;
        min-width: 0;
        padding: 24px 0;
    }
    #wrapper.ko_account_page .profile-buttons .btn-block + .btn-block {
        border-top: 0;
        border-left: 1px solid var(--ds-line-soft);
    }
    #wrapper.ko_account_page .left-column .btn-block p {
        margin-top: 16px;
        font-size: 15px;
    }
    /* #wrapper already gives the page its 24 gutters at this width */
    #wrapper.ko_account_page .profile_settings_page {
        padding: 32px 0 40px !important;
    }
    #wrapper.ko_account_page .profile_settings_page h4 {
        font-size: 18px;
        line-height: 26px;
        margin-bottom: 24px;
    }
}

/* ============================================================
   EDIT PROFILE  (/account)
   Figma archive 12 "Profile" 1920, Ipad 768, Mobile 375.

   Markup untouched again: the template prints one .form-group
   after another and the export lays them out three to a row, so
   the grid does the arranging and `order` does the pairing. In
   the DOM nothing moves, and below 1140 the regrouping is
   dropped and the fields read in template order.

   Measured off the 1920 export:
     column    content 425..1600, same as the settings page
     row 1-2   three fields, 360 each, gap 40
     row 3     two fields, 559 each
     label     12/16 #161616 right above the field, no asterisk
     field     48 tall, radius 8, #dcdcdc, chevron on the left
     about     one line "label (counter)", box 96 tall
     button    180 x 48 pill at the right edge, 32 above
   ============================================================ */

/* the row that holds both columns used to carry a grey #F7F7F7
   inline; the export is white */
#wrapper.page-user-account > .clearfix {
    background-color: var(--ds-white);
}

#wrapper.page-user-account form.ko_form_profile {
    display: grid;
    /* six tracks: a normal field spans two, the pair in the third
       row spans three, the note and the button span all six */
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px 40px;
    margin: 0;
}
#wrapper.page-user-account form.ko_form_profile > .form-group {
    grid-column: span 2;
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* the export reads each row right to left, which is the reverse of
   the order the template writes the fields in */
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_username)          { order: 3; }
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#sel_gender)           { order: 2; }
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#sel_sex_orientation)  { order: 1; }
#wrapper.page-user-account form.ko_form_profile > .form-group:has([name="birthdate_date"]) {
    order: 4;
    grid-column: 1 / -1;
}
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_relationship)      { order: 5; grid-column: span 3; }
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_region)            { order: 6; grid-column: span 3; }
#wrapper.page-user-account form.ko_form_profile > #relationshiptype-form-trigger         { order: 7; grid-column: span 3; }
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_about_me)          { order: 8; grid-column: 1 / -1; }
#wrapper.page-user-account form.ko_form_profile > button {
    order: 9;
    grid-column: 1 / -1;
    justify-self: start;
}

/* the three birthdate selects sit in the same three tracks */
#wrapper.page-user-account form.ko_form_profile > .form-group > .clearfix {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}
/* the clearfix pseudos would count as two more cells and push a select
   onto a second row */
#wrapper.page-user-account form.ko_form_profile > .form-group > .clearfix::before,
#wrapper.page-user-account form.ko_form_profile > .form-group > .clearfix::after {
    display: none;
}
#wrapper.page-user-account form.ko_form_profile > .form-group > .clearfix > .form-control:nth-of-type(1) { order: 3; }
#wrapper.page-user-account form.ko_form_profile > .form-group > .clearfix > .form-control:nth-of-type(2) { order: 2; }
#wrapper.page-user-account form.ko_form_profile > .form-group > .clearfix > .form-control:nth-of-type(3) { order: 1; }
#wrapper.page-user-account form.ko_form_profile .form-control.smallinput {
    width: 100%;
    float: none;
    margin: 0;
}

/* ---- labels ------------------------------------------------ */
#wrapper.page-user-account form.ko_form_profile label {
    display: block;
    float: none;
    width: auto;
    margin: 0 0 4px;
    padding: 0;
    font-size: 12px !important;
    font-weight: 400;
    line-height: 16px;
    color: var(--ds-dark);
    text-align: right;
}
/* the export marks no field with an asterisk */
#wrapper.page-user-account form.ko_form_profile label sup {
    display: none;
}

/* ---- fields ------------------------------------------------ */
#wrapper.page-user-account form.ko_form_profile .form-control {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #dcdcdc;
    border-radius: var(--ds-radius);   /* every field on the site is 12 */
    background-color: var(--ds-white);
    font-family: var(--ds-font);
    font-size: 16px !important;
    line-height: 46px;
    color: var(--ds-dark);
    text-align: right;
    box-shadow: none;
}
#wrapper.page-user-account form.ko_form_profile select.form-control {
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    padding-left: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9.5L12 15.5L18 9.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
}
#wrapper.page-user-account form.ko_form_profile .form-control:focus {
    border-color: var(--ds-coral);
    outline: none;
    box-shadow: none;
}
#wrapper.page-user-account form.ko_form_profile select.form-control[disabled] {
    opacity: .6;
}

/* ---- "about me": label and counter share one line ----------- */
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_about_me) > label,
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_about_me) > div {
    display: inline;
}
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_about_me) > div {
    font-size: 12px;
    line-height: 16px;
    color: #999999;
}
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_about_me) > div::before { content: '('; }
#wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_about_me) > div::after  { content: ')'; }
#wrapper.page-user-account form.ko_form_profile textarea.form-control {
    height: 96px;
    padding: 12px 16px;
    line-height: 24px;
    resize: vertical;
    margin-top: 4px;
}
#wrapper.page-user-account form.ko_form_profile textarea.form-control::placeholder {
    color: #999999 !important;
}

/* ---- the save button --------------------------------------- */
#wrapper.page-user-account form.ko_form_profile button.ko_btn_submit {
    width: 180px;
    height: 48px;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-gradient);
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 48px;
    color: var(--ds-white);
    text-align: center;
}
#wrapper.page-user-account form.ko_form_profile button.ko_btn_submit:hover {
    opacity: .9;
    color: var(--ds-white);
}
#wrapper.page-user-account form.ko_form_profile .help-block {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--ds-coral);
}

/* ---- tablet and phone: one field per row, template order ----
   the selectors repeat the ones above on purpose: :has(#id) carries
   an id's weight, so anything shorter would lose to them here */
@media (max-width: 1140px) {
    #wrapper.page-user-account form.ko_form_profile {
        grid-template-columns: minmax(0, 1fr);
    }
    #wrapper.page-user-account form.ko_form_profile > .form-group,
    #wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_username),
    #wrapper.page-user-account form.ko_form_profile > .form-group:has(#sel_gender),
    #wrapper.page-user-account form.ko_form_profile > .form-group:has(#sel_sex_orientation),
    #wrapper.page-user-account form.ko_form_profile > .form-group:has([name="birthdate_date"]),
    #wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_relationship),
    #wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_region),
    #wrapper.page-user-account form.ko_form_profile > #relationshiptype-form-trigger,
    #wrapper.page-user-account form.ko_form_profile > .form-group:has(#in_about_me) {
        grid-column: 1 / -1;
        order: 0;
    }
    #wrapper.page-user-account form.ko_form_profile > button {
        order: 1;
        grid-column: 1 / -1;
    }
    /* the birthdate keeps its three columns and its order - the year
       stays on the right on every width, as in the exports */
    #wrapper.page-user-account form.ko_form_profile > .form-group > .clearfix {
        gap: 16px;
    }
}

@media (max-width: 767px) {
    /* the export reads the three blocks left to right: upload, view,
       settings - the reverse of the order the template writes them */
    #wrapper.page-user-account .profile-buttons {
        flex-direction: row-reverse;
    }
    #wrapper.page-user-account form.ko_form_profile > button {
        width: 100%;
    }
}

/* ============================================================
   MOBILE <=767: the production split of the navigation

   Top bar   burger on the right, the three counters on the left
             (messages, likes, visitors). No logo, no avatar.
   Bottom    the logo becomes a bar fixed to the bottom of every
             screen and stays the way home; the pagination arrows
             ride in it at the edges, the way production had them.
   Menu      the first row is the profile card (avatar, nickname,
             id on two lines) instead of the home row; the three
             sections that moved into the bar leave the list.

   All of it is CSS: the markup already prints every piece, the
   pieces only change place.
   ============================================================ */
@media (max-width: 767px) {

    /* ---------- top bar ---------- */
    /* all five sections ride in the bar, search included (it used to
       drop into the menu on a phone) */
    main.logged-in #ko_mobile_header #ko_mobile_icons .ko_mob_icon:nth-child(1),
    main.logged-in #ko_mobile_header #ko_mobile_icons .ko_mob_icon:nth-child(5),
    main.logged-in #ko_mobile_header .ko_mob_icon.mobile_action_message,
    main.logged-in #ko_mobile_header .ko_mob_icon.mobile_action_matches,
    main.logged-in #ko_mobile_header .ko_mob_icon.mobile_action_visitors {
        display: block !important;
    }

    /* the profile moved into the menu, so the bar drops the avatar */
    main.logged-in #ko_mobile_header .ko_mobile_avatar {
        display: none !important;
    }

    /* from the burger leftwards: home, search, messages, likes,
       visitors - the tablet sequence, spread across the row */
    #ko_mobile_header #ko_mobile_icons .ko_mob_icon:nth-child(1) { order: 2; }   /* home     */
    #ko_mobile_header #ko_mobile_icons .ko_mob_icon:nth-child(5) { order: 3; }   /* search   */
    #ko_mobile_header .ko_mob_icon.mobile_action_message  { order: 4; }
    #ko_mobile_header .ko_mob_icon.mobile_action_matches  { order: 5; }
    #ko_mobile_header .ko_mob_icon.mobile_action_visitors { order: 6; }
    main.logged-in #ko_mobile_header {
        justify-content: space-between;
        column-gap: 8px;
    }

    #ko_mobile_header .ko_mob_icon > a {
        gap: 3px;
    }
    #ko_mobile_header .ko_mob_icon > a > i.fa {
        width: 22px;
        height: 22px;
        font-size: 22px;
    }
    #ko_mobile_header .ko_mob_icon > a > span {
        font-size: 11px;
        font-weight: 500;
    }
    #ko_mobile_header .ko_mob_icon > i[data-counter] {
        top: -6px;
        width: 16px;
        height: 16px;
        border-radius: 8px;
        font-size: 10px;
        line-height: 16px;
    }

    /* ---------- the logo, fixed at the bottom ---------- */
    #ko_mobile_header .header-logo {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10000;
        width: auto;
        height: 56px;
        margin: 0;
        background-color: var(--ds-white);
        background-size: 104px auto;
        background-position: center center;
        box-shadow: 0 -4px 20px rgba(22, 22, 22, .10);
    }

    /* content clears it - the scroller is main.custom-scroll, so the
       room has to come from the wrapper, not from body */
    #superwrapper > #wrapper:not(.message-wrapper) {
        padding-bottom: 72px !important;
    }

    /* the arrows come back into the bar instead of sitting under the
       grid, and the duplicate logo inside it goes */
    #wrapper nav {
        display: none;
    }
    #wrapper + .bottom-line {
        display: flex !important;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10001;
        align-items: center;
        width: auto;
        height: 56px;
        padding: 0 16px;
        background: none;
        box-shadow: none;
    }
    #wrapper + .bottom-line .footer-logo {
        display: none;
    }
    /* the arrows belong to the screens that list users; everywhere else
       the bar carries the logo alone */
    #wrapper:not(:has(ul.grid)) + .bottom-line {
        display: none !important;
    }
    #wrapper + .bottom-line nav {
        display: block;
        width: 100%;
    }
    #wrapper + .bottom-line .pagination {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    /* .pagination carries .clearfix, and its ::before/::after become
       flex items that eat the space-between */
    #wrapper + .bottom-line .pagination::before,
    #wrapper + .bottom-line .pagination::after {
        content: none !important;
        display: none !important;
    }
    #wrapper + .bottom-line .pagination > li {
        float: none !important;
        margin: 0 !important;
        border: none;
    }
    #wrapper + .bottom-line .pagination > li > a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        border: none;
        border-radius: 12px;
        background: #f6f6f6;
    }
    /* the template prints a legacy png arrow; the redesign draws the
       same long arrow the gallery uses */
    #wrapper + .bottom-line .pagination > li > a > img {
        display: none;
    }
    #wrapper + .bottom-line .pagination > li > a::before {
        content: '';
        width: 20px;
        height: 15px;
        background: var(--ds-dark);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 9H1.5'/%3E%3Cpath d='M9.5 1 1.5 9l8 8'/%3E%3C/svg%3E") center / 20px 15px no-repeat;
                mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 9H1.5'/%3E%3Cpath d='M9.5 1 1.5 9l8 8'/%3E%3C/svg%3E") center / 20px 15px no-repeat;
    }
    #wrapper + .bottom-line .pagination > li.prev-page > a::before {
        transform: scaleX(-1);
    }

    /* the chat ends above the bar, not under it */
    :root {
        --ds-chat-offset: 119px;
    }

    /* ---------- the menu ---------- */
    /* the five sections that live in the bar leave the list; the
       profile card, payment, rules, contact and sign out stay */
    main.logged-in #ko_mobile_nav_links ul > li:nth-child(1),
    main.logged-in #ko_mobile_nav_links ul > li:nth-child(2),
    main.logged-in #ko_mobile_nav_links ul > li:nth-child(3),
    main.logged-in #ko_mobile_nav_links ul > li:nth-child(4),
    main.logged-in #ko_mobile_nav_links ul > li:nth-child(5) {
        display: none;
    }

    /* the sidebar card from the desktop becomes the first row: it is
       the only markup on the page carrying nickname and id together */
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont {
        display: block !important;
        position: fixed;
        top: 63px;
        left: 0;
        right: 0;
        z-index: 9999;
        width: auto;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: visible;
        background: var(--ds-white);
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont .affix {
        position: static !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont .affix > *:not(#user-menu),
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont #user-menu > *:not(a.user_profile_link) {
        display: none !important;
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont #user-menu a.user_profile_link {
        height: 72px;
        margin: 0;
        padding: 16px 24px;
        border: none;
        border-bottom: 1px solid var(--ds-line);
        border-radius: 0;
        box-shadow: none;
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont .user_profile_link img.circle {
        margin-top: 0;
    }

    /* the list starts under the card */
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_mobile_nav_links {
        top: calc(100% + 72px);
    }
}

/* serg_custom.css:2512 pins the legacy grey page title to the top of the
   screen, exactly where the redesign's bar lives, so on the CMS pages
   (subscription, terms, contact) it covered the whole header. Every one
   of those bodies carries its own heading, so the strip goes; on a page
   that also prints a back arrow it stays, in the flow, under the bar. */
@media (max-width: 1140px) {
    /* information.php now keeps the header bar on these pages
       ($mobile_menu = true), so the burger is the way back and the
       whole legacy strip goes, arrow included; the rules under it
       stay for any page that still prints the row without the bar */
    .h1.has-subline.only-mobile {
        display: none !important;
    }
    .h1.has-subline.only-mobile:has(.go-back) {
        position: relative !important;
        z-index: auto !important;
        padding: 0 24px !important;
        background: none !important;
        border-bottom: none !important;
        font-size: 20px;
        font-weight: 700;
        line-height: 28px;
        color: var(--ds-dark);
        text-align: center;
    }

    /* serg_custom.css:2486 leaves the back link as the legacy purple
       png; draw the redesign's chevron instead, the same one the chat
       header uses, and hang it off the title row */
    .h1.has-subline .go-back img {
        display: none;
    }
    .h1.has-subline .go-back {
        display: block;
        top: 50%;
        right: 24px;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        background-color: var(--ds-dark);
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 5L16 12L9 19' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
                mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 5L16 12L9 19' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        -webkit-mask-repeat: no-repeat;
                mask-repeat: no-repeat;
        -webkit-mask-position: center;
                mask-position: center;
    }
    /* the spacer that compensated for the fixed strip (inline 48px) */
    .h1.has-subline.only-mobile + .only-mobile {
        margin-top: 0 !important;
        height: 0 !important;
    }
}

/* ============================================================
   BLOCKED CONVERSATION

   serg_custom.css:862 paints a 250x250 grey `/image/icons/lock.png`
   above the line. Drawn like the other empty states instead: the
   vuesax lock, outlined in the brand gradient, over a centred label.
   ============================================================ */
#wrapper.message-wrapper .messages-wrapper .blocked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    position: relative;
    margin: auto;
    padding: 24px 0 0;
    background: none;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: var(--ds-dark);
    text-align: center;
}

#wrapper.message-wrapper .messages-wrapper .blocked::before {
    content: '';
    flex: 0 0 auto;
    width: min(240px, 60vw);
    max-width: 240px;
    aspect-ratio: 1 / 1;
    background: url("blocked-lock.svg") center center / contain no-repeat;
}

/* ============================================================
   TABLET 768..1140: the profile moves into the menu too

   Same as the phone: the bar drops the avatar and the first row of
   the open menu is the sidebar card, with the nickname and the id.
   Only the offsets differ, because the bar is 75 tall here.
   ============================================================ */
@media (min-width: 768px) and (max-width: 1140px) {

    main.logged-in #ko_mobile_header .ko_mobile_avatar {
        display: none !important;
    }

    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont {
        display: block !important;
        position: fixed;
        top: 75px;
        left: 0;
        right: 0;
        z-index: 9999;
        width: auto;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: visible;
        background: var(--ds-white);
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont .affix {
        position: static !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont .affix > *:not(#user-menu),
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont #user-menu > *:not(a.user_profile_link) {
        display: none !important;
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont #user-menu a.user_profile_link {
        height: 76px;
        margin: 0;
        padding: 14px 32px;
        border: none;
        border-bottom: 1px solid var(--ds-line);
        border-radius: 0;
        box-shadow: none;
    }

    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_mobile_nav_links {
        top: calc(100% + 76px);
    }
}

/* ============================================================
   CONVERSATION HELPER (support account)

   suggestions.tpl ships its own <style> in the body, so every rule
   here is one level more specific than the template's - the card,
   the two preset rows, both switch buttons and the send button get
   the redesign's shapes, colours and icons.
   ============================================================ */
#wrapper #conversation-helper .container {
    padding: 24px;
    border-radius: var(--ds-radius);
    box-shadow: 0 4px 24px rgba(22, 22, 22, .12);
    font-family: var(--ds-font);
}

#wrapper #conversation-helper .heading {
    padding-bottom: 0;
}

#wrapper #conversation-helper .heading h3 {
    /* room on both sides so a wrapped title never runs under the cross */
    padding: 0 34px;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: 0;
    color: var(--ds-dark);
}

/* the close is the same 24px cross the modals use */
#wrapper #conversation-helper .heading .close-btn {
    top: 2px;
    left: 0;
}
#wrapper #conversation-helper .heading .close-btn a {
    display: block;
    width: 24px;
    height: 24px;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    background-color: var(--ds-dark);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-864,-72)'%3E %3Cpath d='M868.5 91.5L883.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M883.5 91.5L868.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-864,-72)'%3E %3Cpath d='M868.5 91.5L883.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M883.5 91.5L868.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
}

#wrapper #conversation-helper .divider {
    height: 1px;
    margin: 16px 0 20px;
    background: var(--ds-line);
    border-radius: 0;
}

#wrapper #conversation-helper .object-block {
    margin-bottom: 12px;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #f7f7f7;
}

#wrapper #conversation-helper .object-block:last-of-type {
    margin-bottom: 20px;
}

#wrapper #conversation-helper .title {
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: var(--ds-dark);
}

#wrapper #conversation-helper .content {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #6a6a6a;
}

/* the two decorative clip-art icons give way to the set's own,
   painted with the brand gradient like every other icon */
#wrapper #conversation-helper .heading-block svg {
    display: none;
}

#wrapper #conversation-helper .topic .title::before,
#wrapper #conversation-helper .message .title::before {
    content: '';
    display: inline-block;
    vertical-align: -5px;
    width: 24px;
    height: 24px;
    margin-left: 10px;
    background: var(--ds-gradient);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
}

#wrapper #conversation-helper .topic .title::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-576,-72)'%3E %3Cpath d='M598 82V87C598 92 596 94 591 94H585C580 94 578 92 578 87V81C578 76 580 74 585 74H590' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M598 82H594C591 82 590 81 590 78V74L598 82Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M583 85H589' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M583 89H587' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-576,-72)'%3E %3Cpath d='M598 82V87C598 92 596 94 591 94H585C580 94 578 92 578 87V81C578 76 580 74 585 74H590' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M598 82H594C591 82 590 81 590 78V74L598 82Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M583 85H589' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M583 89H587' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
}

#wrapper #conversation-helper .message .title::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-192,-72)'%3E %3Cpath d='M209 92.5H199C196 92.5 194 91 194 87.5V80.5C194 77 196 75.5 199 75.5H209C212 75.5 214 77 214 80.5V87.5C214 91 212 92.5 209 92.5Z' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M209 81L205.87 83.5C204.84 84.32 203.15 84.32 202.12 83.5L199 81' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-192,-72)'%3E %3Cpath d='M209 92.5H199C196 92.5 194 91 194 87.5V80.5C194 77 196 75.5 199 75.5H209C212 75.5 214 77 214 80.5V87.5C214 91 212 92.5 209 92.5Z' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M209 81L205.87 83.5C204.84 84.32 203.15 84.32 202.12 83.5L199 81' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
}

/* "switch" is the outlined pill the redesign uses for secondary
   actions: white inside, gradient hairline outside */
#wrapper #conversation-helper button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(#f7f7f7, #f7f7f7) padding-box,
                var(--ds-gradient) border-box;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: var(--ds-dark);
    box-shadow: none;
    transition: none;
}

#wrapper #conversation-helper button:hover {
    background: linear-gradient(#fff, #fff) padding-box,
                var(--ds-gradient) border-box;
    transform: none;
}

#wrapper #conversation-helper button[disabled],
#wrapper #conversation-helper button:disabled {
    opacity: .4;
    color: var(--ds-dark);
}

/* and "send" is the primary gradient pill */
#wrapper #conversation-helper .send-button {
    display: block;
    height: 48px;
    min-width: 140px;
    margin: 0 auto;
    padding: 0 32px;
    border-radius: 999px;
    background: var(--ds-gradient);
    box-shadow: none;
    font-size: 16px;
    font-weight: 700;
    line-height: 48px;
    color: var(--ds-white);
    text-decoration: none;
}

#wrapper #conversation-helper .send-button:hover {
    transform: none;
    box-shadow: none;
    color: var(--ds-white);
}

/* ============================================================
   CHAT HEADER MENU (profile / block / delete)

   Same card the gallery gear opens on /account: a white sheet only
   as wide as its longest line, 10/16 padding, 33 tall rows, 14px
   labels with a 16px icon at the right edge and no rules between
   the rows. Bootstrap's own dropdown chrome (240 fixed width, 42
   rows, grey text, a border under each row, ltr) goes.
   ============================================================ */
#wrapper.message-wrapper .header .button-wrapper .dropdown-menu {
    top: 60px;            /* 56 avatar + 4 */
    left: 0;
    right: auto;
    width: max-content;
    min-width: 0;
    max-width: 260px;
    margin: 0;
    padding: 10px 0;
    border: none;
    border-radius: var(--ds-radius);
    background: var(--ds-white);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .12);
    direction: rtl;
    overflow: hidden;
}

#wrapper.message-wrapper .header .dropdown-menu .list-group-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    height: 33px;
    margin: 0;
    padding: 0 16px;
    border: none;
    border-radius: 0;
    background: transparent;
    font-family: var(--ds-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 33px;
    color: var(--ds-dark);
    white-space: nowrap;
    text-decoration: none;
}

#wrapper.message-wrapper .header .dropdown-menu .list-group-item:hover,
#wrapper.message-wrapper .header .dropdown-menu .list-group-item:focus {
    background: #f6f6f6;
    color: var(--ds-dark);
}

#wrapper.message-wrapper .header .dropdown-menu .list-group-item i.fa {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    color: var(--ds-dark);
}

/* ============================================================
   CMS PAGES: air under the title row

   The heading that carries the back arrow sat straight on top of the
   first block of the admin body. Same row is used by the subscription
   page, the rules and the contact page.
   ============================================================ */
@media (max-width: 1140px) {
    .h1.has-subline.only-mobile:has(.go-back) {
        padding-top: 8px !important;
        padding-bottom: 24px !important;
    }
}

/* ============================================================
   EMOTICON PICKER (chat composer)

   conversation_helper/emoticons.tpl styles the sheet inline: a bare
   white box with a 1px #e0e0e0 border, square corners, no shadow,
   one endless row of images and a default blue link for the close.
   The images themselves are untouched here - only the sheet around
   them: a card in the redesign's shape, the images wrapped into a
   grid, and the close turned into the set's cross.
   ============================================================ */
#wrapper.message-wrapper #emoticon-list {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 6px;
    left: 16px !important;
    right: auto !important;
    bottom: calc(100% + 8px) !important;
    z-index: 1000;
    box-sizing: border-box;
    width: min(340px, calc(100% - 32px)) !important;
    max-height: 264px;
    padding: 12px !important;
    overflow-y: auto;
    border: none !important;
    border-radius: var(--ds-radius) !important;
    background: var(--ds-white) !important;
    box-shadow: 0 4px 24px rgba(22, 22, 22, .12);
}

/* the template's own `.d-none` still wins, it carries !important */
#wrapper.message-wrapper #emoticon-list > div:first-child {
    flex: 0 0 100%;
    position: relative;
    height: 24px;
    margin: 0 0 4px;
}

#wrapper.message-wrapper #emoticon-list > div:first-child > p {
    display: none;
}

#wrapper.message-wrapper #emoticon-list > div:first-child > div {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    font-size: 0 !important;
}

#wrapper.message-wrapper #emoticon-list > div:first-child a {
    display: block;
    width: 24px;
    height: 24px;
    cursor: pointer;
    background-color: var(--ds-dark);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-864,-72)'%3E %3Cpath d='M868.5 91.5L883.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M883.5 91.5L868.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-864,-72)'%3E %3Cpath d='M868.5 91.5L883.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M883.5 91.5L868.5 76.5' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
}

/* the emoticons keep their own size; they only get a cell to sit in */
#wrapper.message-wrapper #emoticon-list > img {
    flex: 0 0 auto;
    margin: 0 !important;
    cursor: pointer;
}

@media (max-width: 767px) {
    #wrapper.message-wrapper #emoticon-list {
        left: 12px !important;
        width: min(300px, calc(100% - 24px)) !important;
        max-height: 220px;
    }
}

/* ============================================================
   "NEED A SUBSCRIPTION" MODAL (#ko_modal_byu_vip)

   Same shell as the other message modals: 400 wide, pink header 60
   tall with the coral title on the right and the white round close
   on the left, white body, and a footer of two 48 pills. Replaces
   the flat #7000E3 bar, the dashed frame and the purple rectangle.
   ============================================================ */
#ko_modal_byu_vip.modal.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#ko_modal_byu_vip .modal-dialog {
    width: 400px;
    max-width: calc(100% - 48px);
    margin: auto;
}

#ko_modal_byu_vip .modal-content {
    border: none;
    background: var(--ds-white);
    border-radius: var(--ds-radius);
    overflow: hidden;
    font-family: var(--ds-font);
    box-shadow: 0 22px 50px rgba(18, 20, 28, .12);
}

#ko_modal_byu_vip .modal-header {
    background: var(--ds-coral-bg) !important;
    border-bottom: none !important;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    flex-direction: row-reverse;
    min-height: 60px;
}

#ko_modal_byu_vip .modal-header .modal-title {
    font-family: var(--ds-font);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--ds-coral) !important;
    margin: 0;
    padding: 0 4px;
    text-align: right;
}

#ko_modal_byu_vip .modal-header .close {
    float: none !important;
    margin: 0 !important;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ds-white) !important;
    border: none;
    border-radius: var(--ds-radius-pill);
    color: var(--ds-coral) !important;
    opacity: 1 !important;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
}

#ko_modal_byu_vip .modal-content > .border {
    border: none !important;
    background: var(--ds-white) !important;
    margin: 0 !important;
    padding: 24px !important;
    direction: rtl;
    text-align: right;
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 1.4;
    color: #5c5c5c;
}

#ko_modal_byu_vip .modal-footer::before,
#ko_modal_byu_vip .modal-footer::after {
    content: none !important;
    display: none !important;
}

#ko_modal_byu_vip .modal-footer {
    padding: 0 24px 24px !important;
    border-top: none !important;
    background: var(--ds-white) !important;
    display: flex;
    gap: 16px;
    direction: rtl;
}

/* the primary sits in its own <form>, so the form is the flex item */
#ko_modal_byu_vip .modal-footer > form {
    flex: 1 1 0;
    margin: 0;
}

#ko_modal_byu_vip .modal-footer .btn {
    width: 100%;
    flex: 1 1 0;
    height: 48px;
    margin: 0 !important;
    padding: 0 16px;
    border-radius: var(--ds-radius-pill);
    font-family: var(--ds-font);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ko_modal_byu_vip .modal-footer .ko_btn_submit {
    background: var(--ds-gradient) !important;
    border: none !important;
    color: var(--ds-white) !important;
    opacity: 1;
}

#ko_modal_byu_vip .modal-footer .ko_btn_cancel {
    border: 1px solid transparent !important;
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box !important;
    color: var(--ds-dark) !important;
}

/* ============================================================
   MAIL CONFIRMED / BROKEN LINK PAGES

   account/confirm_email.tpl and account/fake_customer_error.tpl are
   the same skeleton: one <h3> loose at the top of an otherwise empty
   page, inside a stack of legacy fixers. The message becomes a card
   centred in the column, in the system's type.
   ============================================================ */
#wrapper.ko_account_page:has(> .full-column > .badoofixer) > .full-column {
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 0 24px !important;
}

#wrapper.ko_account_page:has(> .full-column > .badoofixer) .badoofixer {
    display: none;
}

#wrapper.ko_account_page:has(> .full-column > .badoofixer) .mobile-fixer > #wrapper {
    display: block !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#wrapper.ko_account_page:has(> .full-column > .badoofixer) .mobile-fixer .full-column {
    float: none !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#wrapper.ko_account_page:has(> .full-column > .badoofixer) .news-wrapper {
    display: block;
    box-sizing: border-box;
    min-height: 0 !important;
    max-width: 480px;
    /* the template pins margin-top:-40px inline with !important on the
       column, so the card carries the extra 40 itself */
    margin: 80px auto 40px !important;
    padding: 40px 32px !important;
    border: 1px solid var(--ds-line) !important;
    border-radius: var(--ds-radius);
    background: var(--ds-white) !important;
    box-shadow: 0 4px 24px rgba(22, 22, 22, .06);
    text-align: center;
}

#wrapper.ko_account_page:has(> .full-column > .badoofixer) .news-wrapper h3 {
    margin: 0;
    font-family: var(--ds-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: var(--ds-dark);
    text-align: center;
}

/* the legacy "back to top" link is not part of the redesign */
#wrapper.ko_account_page:has(> .full-column > .badoofixer) a.cd-top {
    display: none !important;
}

/* ============================================================
   SUPPORT ACCOUNT: the operator block moves to the top of the menu

   column_left.tpl prints "Test user mode" and "Go to ID" in the
   middle of the list, between the sections and the footer links. On
   the phone and the tablet they belong right under the profile card,
   so the list becomes a column and those two rows are ordered first.
   ============================================================ */
@media (max-width: 1140px) {
    #ko_mobile_nav_links ul {
        display: flex;
        flex-direction: column;
    }
    #ko_mobile_nav_links ul > li:has(> a[title="Change mode"]) {
        order: -2;
    }
    #ko_mobile_nav_links ul > li:has(> form.search-by-id) {
        order: -1;
    }
    /* first in the list, so its rule off the sidebar is not needed */
    #ko_mobile_nav_links .search-by-id {
        padding-top: 16px !important;
        border-top: none;
    }
}

/* ============================================================
   SUPPORT ACCOUNT: group letter reads dark on its colour

   The badge takes its fill from the message system inline (green,
   yellow, red or black), and white type on the yellow and the green
   was barely legible. Dark on every colour, with the one exception
   that cannot work: a black fill keeps the white letter.
   ============================================================ */
#wrapper #grid li a.thumb-image .ko_test_user_group,
#wrapper.message-wrapper .single-user .user-logo .group span.group-of-chat-user {
    color: var(--ds-dark) !important;
}

#wrapper #grid li a.thumb-image .ko_test_user_group[style*="black"],
#wrapper.message-wrapper .single-user .user-logo .group span.group-of-chat-user[style*="black"] {
    color: var(--ds-white) !important;
}

/* ============================================================
   PREVIEW AVATAR PICKER  (/account, member with no photo of his own)

   Figma "Profile" and "Profile-1" from archive 19: a 40 glass square
   with the refresh icon in the corner of the placeholder photo, and a
   740 modal with a three column grid of 220 x 249 tiles, a radio in
   the corner of each, and the usual two pills in the footer.
   ============================================================ */
#wrapper.page-user .photo-gallery-placeholder {
    position: relative;
}

#wrapper.page-user .photo-gallery-placeholder .avatar-mask-toggle {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--ds-radius);
    background: rgba(22, 22, 22, .1);
    -webkit-backdrop-filter: blur(50px);
            backdrop-filter: blur(50px);
    text-decoration: none;
}

#wrapper.page-user .photo-gallery-placeholder .avatar-mask-toggle i.fa {
    display: block;
    width: 22px;
    height: 22px;
    margin: 0;
    font-size: 22px;
    line-height: 1;
}

#wrapper.page-user .photo-gallery-placeholder .avatar-mask-toggle i.fa:before {
    background-color: var(--ds-white);
    background-image: none;
}

/* ---- the modal ---- */
#modal_avatar_mask.modal.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#modal_avatar_mask .modal-dialog {
    width: 740px;
    max-width: calc(100% - 48px);
    margin: auto;
}

/* the pool holds a multiple of three, so the grid is always full rows.
   On a short desktop window the dialog narrows just enough for all three
   rows to stay on screen instead of hiding the last one behind a scroll:
   3 rows of (w * 249 / 220) plus gaps, padding, header and footer */
@media (min-width: 768px) {
    #modal_avatar_mask .modal-dialog {
        width: clamp(420px, calc((100vh - 264px) * 0.8835 + 72px), 740px);
    }
}

#modal_avatar_mask .modal-content {
    border: none;
    border-radius: var(--ds-radius);
    background: var(--ds-white);
    overflow: hidden;
    font-family: var(--ds-font);
    box-shadow: 0 22px 50px rgba(18, 20, 28, .12);
}

#modal_avatar_mask .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    direction: rtl;
    min-height: 60px;
    padding: 12px 16px;
    border-bottom: none !important;
    background: var(--ds-coral-bg) !important;
}

#modal_avatar_mask .modal-header .modal-title {
    margin: 0;
    padding: 0 4px;
    font-family: var(--ds-font);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--ds-coral) !important;
    text-align: right;
}

#modal_avatar_mask .modal-header .close {
    float: none !important;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 !important;
    border: none;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-white) !important;
    color: var(--ds-coral) !important;
    opacity: 1 !important;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
}

#modal_avatar_mask .modal-body {
    padding: 24px !important;
    max-height: calc(100vh - 192px);
    overflow-y: auto;
    background: var(--ds-white) !important;
}

#modal_avatar_mask .avatar-mask-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    direction: rtl;
}

#modal_avatar_mask .avatar-mask-item {
    position: relative;
    display: block;
    box-sizing: border-box;
    aspect-ratio: 220 / 249;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #f6f6f6;
    overflow: hidden;
    text-decoration: none;
}

#modal_avatar_mask .avatar-mask-item img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

/* the chosen tile carries the brand gradient as its frame */
#modal_avatar_mask .avatar-mask-item.active {
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box;
}

#modal_avatar_mask .avatar-mask-radio {
    position: absolute;
    top: 10px;
    left: 10px;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    border: 2px solid var(--ds-white);
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

#modal_avatar_mask .avatar-mask-item.active .avatar-mask-radio {
    border-width: 3px;
    background: var(--ds-gradient);
}

#modal_avatar_mask .modal-footer::before,
#modal_avatar_mask .modal-footer::after {
    content: none !important;
    display: none !important;
}

/* cancel on the left, save on the right, as the frame draws them */
#modal_avatar_mask .modal-footer {
    display: flex;
    direction: ltr;
    gap: 16px;
    padding: 20px 24px 24px !important;
    border-top: none !important;
    background: var(--ds-white) !important;
}

#modal_avatar_mask .modal-footer .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    height: 48px;
    margin: 0 !important;
    padding: 0 16px;
    border-radius: var(--ds-radius-pill);
    font-family: var(--ds-font);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.36px;
    text-decoration: none;
}

#modal_avatar_mask .modal-footer .ko_btn_cancel {
    border: 1px solid transparent !important;
    background:
        linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
        var(--ds-gradient) border-box !important;
    color: var(--ds-dark) !important;
}

#modal_avatar_mask .modal-footer .ko_btn_submit {
    border: none !important;
    background: var(--ds-gradient) !important;
    color: var(--ds-white) !important;
}

#modal_avatar_mask .modal-footer .ko_btn_submit.disabled {
    background: #ededed !important;
    color: #9a9a9a !important;
    cursor: default;
}

@media (max-width: 767px) {
    #modal_avatar_mask .modal-dialog {
        max-width: calc(100% - 24px);
    }
    /* on a phone the card takes at most 80% of the screen: header and footer
       keep their height, the grid in the middle is what shrinks and scrolls */
    #modal_avatar_mask .modal-content {
        display: flex;
        flex-direction: column;
        max-height: 80vh;
    }
    #modal_avatar_mask .modal-header,
    #modal_avatar_mask .modal-footer {
        flex: 0 0 auto;
    }
    #modal_avatar_mask .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        padding: 16px !important;
        max-height: none;
    }
    #modal_avatar_mask .avatar-mask-grid {
        gap: 8px;
    }
    #modal_avatar_mask .modal-footer {
        padding: 16px !important;
        gap: 12px;
    }
    #modal_avatar_mask .modal-footer .btn {
        height: 44px;
        font-size: 16px;
    }
}

/* ============================================================
   ARTICLES  (information/articles.tpl, /articles and /articles/slug)

   The list is built in controller/information/articles.php: a
   bootstrap .row of .col-sm-3 "team-member" boxes with inline
   flex/margins, an inline <style> that paints the titles #333, and
   the page title as a plain <h1 style="text-align:center">. All of
   that lands inside .info-page-text, so the CMS typography above
   (inherit !important on everything, 24 under every div, coral
   links) was also laid over it - which is why the grid ran ragged
   and the titles came out coral.

   No Figma frame for this page. Drawn with the card language of
   the rest of the site: square photo, radius 12, name under it,
   coral on hover, the grid centred in the column.
     desktop   4 per row, gap 32/24
     tablet    3 per row
     phone     2 per row (157 wide tiles on a 375 screen)
   ============================================================ */

/* the page title - the <h1> before the grid; on a single article
   it wraps a link back to the list */
#wrapper .info-page-text:has(#team) > h1 {
    margin: 0 0 32px !important;
    font-family: var(--ds-font) !important;
    font-size: 32px !important;
    line-height: 40px !important;
    font-weight: 700;
    letter-spacing: -0.64px;
    color: var(--ds-dark) !important;
    text-align: center !important;
}
#wrapper .info-page-text:has(#team) > h1 a {
    color: inherit !important;
    text-decoration: none;
}

/* "more articles" on a single article, and the article's own title */
#wrapper .info-page-text:has(#team) > .h4 {
    margin: 48px 0 24px !important;
    font-size: 24px !important;
    line-height: 34px !important;
    font-weight: 700;
    color: var(--ds-dark) !important;
    text-align: center !important;
}

/* bootstrap's .container / .row, and the inline flex on the row */
#wrapper .info-page-text #team,
#wrapper .info-page-text #team .container,
#wrapper .info-page-text #team .team-members {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
#wrapper .info-page-text #team .row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 24px;
    margin: 0 !important;
    padding: 0 !important;
    direction: rtl;
}
#wrapper .info-page-text #team .row::before,
#wrapper .info-page-text #team .row::after {
    content: none !important;
    display: none !important;
}

/* the card: the .col-sm-3 carries inline min-height and auto
   margins, bootstrap adds float + 25% + 15px gutters */
#wrapper .info-page-text #team .col-sm-3 {
    float: none !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#wrapper .info-page-text #team .team-member {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

/* the photo: square, rounded, cropped; a soft ground shows through
   where the article has no image (the placeholder file is missing) */
#wrapper .info-page-text #team .member-image {
    margin: 0 !important;
    padding: 0 !important;
}
#wrapper .info-page-text #team .member-image a {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--ds-radius);
    background: linear-gradient(135deg, #f4effc 0%, #feeaef 100%);
}
/* /includes/images/no_image_216x144_12.jpg is not on the server, so
   the fallback <img> rendered as a broken-image icon; the tinted
   ground above is the placeholder instead */
#wrapper .info-page-text #team .member-image img[src*="no_image"] {
    display: none !important;
}
#wrapper .info-page-text #team .member-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
    transition: transform .3s ease;
}
#wrapper .info-page-text #team .team-member:hover .member-image img {
    transform: scale(1.04);
}

/* the title: two lines at most, dark, coral on hover */
#wrapper .info-page-text #team .member-info {
    margin: 0 !important;
    padding: 0 !important;
}
#wrapper .info-page-text #team .member-info h3,
#wrapper .info-page-text #team .member-info h4 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 24px !important;
    font-weight: 700;
    letter-spacing: -0.36px;
    color: var(--ds-dark) !important;
}
#wrapper .info-page-text #team .member-info a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: inherit !important;
    line-height: inherit !important;
    color: var(--ds-dark) !important;
    text-decoration: none !important;
    transition: color .2s ease;
}
#wrapper .info-page-text #team .team-member:hover .member-info a {
    color: var(--ds-coral) !important;
}

@media (max-width: 1140px) {
    #wrapper .info-page-text:has(#team) > h1 {
        margin-bottom: 24px !important;
    }
    #wrapper .info-page-text #team .row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px 16px;
    }
}
@media (max-width: 767px) {
    #wrapper .info-page-text:has(#team) > h1 {
        font-size: 24px !important;
        line-height: 34px !important;
        letter-spacing: -0.48px;
    }
    #wrapper .info-page-text #team .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 12px;
    }
    #wrapper .info-page-text #team .member-info h3,
    #wrapper .info-page-text #team .member-info h4 {
        font-size: 16px !important;
        line-height: 22px !important;
    }
    #wrapper .info-page-text #team .team-member {
        gap: 12px;
    }
}

/* ============================================================
   TZ 2026-10-31  (doc "SeeYou - ТЗ по экранам")
   Overrides on top of everything above. One sub-block per screen;
   each quotes the line of the doc it answers.
   ============================================================ */

/* ---- 1.1 homepage cards, every width ----------------------------
   "все картинки квадратные, неймы вправо, формы кнопок одинаковые -
    квадратные, цвет иконок одинаковым градиентом, онлайн статус в
    левую часть карточки" */

/* the photo: a square, whatever the grid gives it */
#wrapper #grid_desktop.grid-mobile .grid > li .avatar-link {
    height: auto !important;
    aspect-ratio: 1 / 1;
}

/* the text block reads from the right; the dot sits alone at the
   left end of the name row */
#wrapper #grid_desktop.grid-mobile .grid > li > a.open-profile:not(.avatar-link) {
    text-align: right;
    direction: rtl;
}
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title {
    position: relative;
    padding-left: 20px;
    text-align: right;
}
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title .online-sensor {
    position: absolute;
    left: 0;
    top: 50%;
    margin: 0 !important;
    transform: translateY(-50%);
}
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_desc {
    text-align: right;
}

/* the three actions: one shape (48 rounded square), one icon paint
   (the header's gradient), one shadow */
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons {
    gap: 20px;
    justify-content: flex-end;
    direction: rtl;
}
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons a,
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons a.ko_btn_love,
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons a.ko_pf_request,
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons a.ko_link_massage {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    border: 1px solid #ececf0 !important;
    background: var(--ds-white) !important;
    box-shadow: 0 2px 8px rgba(22, 22, 22, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons a:hover {
    transform: translateY(-2px);
    border-color: transparent !important;
    box-shadow: 0 8px 20px rgba(132, 54, 236, .18);
}
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons a .fa,
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons a.ko_btn_love .fa {
    width: 24px;
    height: 24px;
    font-size: 24px;
}
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons a .fa:before,
#wrapper #grid_desktop.grid-mobile .grid > li .ko_pf_request .fa:before,
#wrapper #grid_desktop.grid-mobile .grid > li .ko_link_massage .fa:before,
#wrapper #grid_desktop.grid-mobile .grid > li .ko_btn_love .fa:before {
    background-color: transparent !important;
    background-image: var(--ds-gradient) !important;
}

/* ---- 1.1 tablet: "кнопки градиентом верхние - все закрасить" ---- */
@media (max-width: 1140px) {
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr,
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"] {
        background: var(--ds-gradient) !important;
        color: var(--ds-white) !important;
    }
}

/* ---- 1.1 phone: the card is the photo -------------------------
   "статус вверх уходит и кол-во фото слева добавляется": the name
   rides over the photo, bottom right; the photo count bottom left;
   the online dot in the top right corner; nothing under the photo. */
@media (max-width: 767px) {
    #wrapper #grid_desktop.grid-mobile .grid > li {
        position: relative;
    }
    #wrapper #grid_desktop.grid-mobile .grid > li .avatar-link {
        border-radius: 16px;
    }
    #wrapper #grid_desktop.grid-mobile .grid > li .avatar-link::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 45%;
        background: linear-gradient(180deg, rgba(22,22,22,0) 0%, rgba(22,22,22,.55) 100%);
        pointer-events: none;
        z-index: 1;
    }
    /* the text link covers the whole card (so the dot can sit in its
       top corner) but lets clicks through to the photo link below */
    #wrapper #grid_desktop.grid-mobile .grid > li > a.open-profile:not(.avatar-link) {
        position: absolute;
        inset: 0;
        z-index: 2;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-end;
        padding: 0 16px 14px !important;
        pointer-events: none;
    }
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title,
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title.only-mobile {
        position: static;
        padding-left: 0;
        font-size: 20px;
        line-height: 24px;
        color: var(--ds-white) !important;
        text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
    }
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title .online-sensor {
        position: absolute;
        left: auto;
        right: 12px;
        top: 12px;
        bottom: auto;
        transform: none;
        width: 12px;
        height: 12px;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
    }
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_desc,
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons {
        display: none !important;
    }
    #wrapper #grid_desktop.grid-mobile .grid > li .avatar-link .images-counter {
        left: 12px;
        bottom: 14px;
        z-index: 2;
    }
    /* test accounts: "was active" rides above the name, same corner */
    #wrapper #grid_desktop.grid-mobile > ul > li > a.thumb-image .lastact {
        bottom: 52px;
        right: 12px;
        z-index: 2;
    }
}

/* ---- 2. sidebar: the intro in a "ברוכים הבאים" frame ------------
   TZ: the intro paragraph sits under the three buttons inside a pink
   plate (the palette's coral tint) with a "ברוכים הבאים" title and no
   icon - desktop, tablet and phone (the phone and tablet only show it
   on the homepage, see the rule above). The admin header is blank on
   the site, so the title is drawn by CSS; an admin header, when set,
   replaces it. */
.logged-out #ko_fixed_cont .text-about {
    box-sizing: border-box;
    padding: 20px 18px 22px !important;
    border-radius: 16px;
    background: var(--ds-coral-bg);
}
/* the fixed links plate: the frame ends above it */
@media (min-width: 1141px) {
    .logged-out #ko_fixed_cont .text-about {
        margin-bottom: 100px !important;
    }
}
.logged-out #ko_fixed_cont .text-about h3,
.logged-out #ko_fixed_cont .text-about h3:empty {
    display: block;
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    line-height: 26px;
    color: var(--ds-purple);
    text-align: right;
    direction: rtl;
}
.logged-out #ko_fixed_cont .text-about h3:empty::before {
    content: "ברוכים הבאים";
}
.logged-out #ko_fixed_cont .text-about p {
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
    color: var(--ds-dark);
    text-align: right;
}
.logged-out #ko_fixed_cont .text-about p + p {
    margin-top: 14px;
}

/* ---- 2b. the three footer links: centred, with a hairline above and
   dots between them */
.logged-out #ko_fixed_cont .additional-links {
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 20px 16px 36px !important;
}
.logged-out #ko_fixed_cont .additional-links::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: var(--ds-line);
}
.logged-out #ko_fixed_cont .additional-links a {
    position: relative;
    padding: 0 12px;
    font-size: 15px;
    white-space: nowrap;
}
.logged-out #ko_fixed_cont .additional-links a + a::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -2px;
    width: 4px;
    height: 4px;
    margin-top: -2px;
    border-radius: 50%;
    background: var(--ds-gradient);
}

@media (max-width: 1140px) {
    .logged-out #ko_fixed_cont .text-about {
        margin: 24px 32px 0 !important;
        padding: 20px 20px 22px !important;
    }
}
@media (max-width: 767px) {
    .logged-out #ko_fixed_cont .text-about {
        margin: 20px 24px 0 !important;
        padding: 18px 16px 20px !important;
    }
}

/* ---- 3. a single article: hero cover + white text card ----------
   controller/information/articles.php now prints
     h1.ds-article__list-link (the old centred "מאמרים" link - hidden,
       the tag pill on the cover carries that link now)
     article.ds-article
       header.ds-article__hero > img.ds-article__cover
         + .ds-article__hero-text > a.ds-article__tag, h1.ds-article__title,
           .ds-article__meta (author | date)
       .ds-article__body (the CMS text)
   The CMS typography block above forces size/colour/margins on every
   element inside .info-page-text with !important, so these rules
   carry one extra class and !important where they have to win. */
#wrapper .info-page-text .ds-article__list-link {
    display: none !important;
}
#wrapper .info-page-text .ds-article {
    display: block;
    max-width: 1040px;
    margin: 0 auto 48px;
    direction: rtl;
}
#wrapper .info-page-text .ds-article .ds-article__hero {
    position: relative;
    display: block;
    aspect-ratio: 16 / 7;
    min-height: 320px;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 16px;
    background: var(--ds-gradient);
}
#wrapper .info-page-text .ds-article .ds-article__cover {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
}
/* the legibility veil under the text */
#wrapper .info-page-text .ds-article .ds-article__hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(22,22,22,0) 30%, rgba(22,22,22,.72) 100%);
    pointer-events: none;
}
#wrapper .info-page-text .ds-article .ds-article__hero-text {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 1;
    margin: 0 !important;
    padding: 32px 36px 28px !important;
    text-align: right;
}
#wrapper .info-page-text .ds-article .ds-article__tag {
    display: inline-block;
    margin: 0 0 14px;
    padding: 0 16px;
    height: 32px;
    border-radius: 999px;
    background: var(--ds-gradient);
    font-size: 14px !important;
    line-height: 32px !important;
    font-weight: 600;
    color: var(--ds-white) !important;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease;
}
#wrapper .info-page-text .ds-article .ds-article__tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(132,54,236,.3);
}
#wrapper .info-page-text .ds-article .ds-article__title {
    margin: 0 0 12px !important;
    font-size: 34px !important;
    line-height: 42px !important;
    font-weight: 700;
    letter-spacing: -0.68px;
    color: var(--ds-white) !important;
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
#wrapper .info-page-text .ds-article .ds-article__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 20px !important;
    color: rgba(255,255,255,.9) !important;
}
#wrapper .info-page-text .ds-article .ds-article__sep {
    opacity: .6;
}
#wrapper .info-page-text .ds-article .ds-article__body {
    margin: 24px 0 0 !important;
    padding: 36px 40px !important;
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    background: var(--ds-white);
    box-shadow: 0 4px 20px rgba(22,22,22,.04);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 16px !important;
    line-height: 28px !important;
    color: #5c5c5c !important;
    text-align: right;
}
#wrapper .info-page-text .ds-article .ds-article__body a {
    color: var(--ds-coral) !important;
}
/* a cover-less article: the gradient ground, same layout */
#wrapper .info-page-text .ds-article--no-image .ds-article__hero {
    aspect-ratio: auto;
    min-height: 0;
}
#wrapper .info-page-text .ds-article--no-image .ds-article__hero-text {
    position: static;
}
#wrapper .info-page-text .ds-article--no-image .ds-article__hero::after {
    content: none;
}

/* "מאמרים נוספים" under the article */
#wrapper .info-page-text:has(.ds-article) > .h4 {
    margin: 0 0 24px !important;
    text-align: right !important;
}

@media (max-width: 1140px) {
    #wrapper .info-page-text .ds-article .ds-article__hero {
        aspect-ratio: 16 / 8;
        min-height: 260px;
    }
    #wrapper .info-page-text .ds-article .ds-article__hero-text {
        padding: 24px 24px 22px !important;
    }
    #wrapper .info-page-text .ds-article .ds-article__title {
        font-size: 28px !important;
        line-height: 34px !important;
    }
    #wrapper .info-page-text .ds-article .ds-article__body {
        padding: 28px 28px !important;
    }
}
/* phone: the cover runs edge to edge (the column's side padding is
   undone), the text card keeps the column */
@media (max-width: 767px) {
    #wrapper .info-page-text .ds-article {
        margin-bottom: 32px;
    }
    #wrapper .info-page-text .ds-article .ds-article__hero {
        aspect-ratio: 4 / 3;
        min-height: 0;
        margin: 0 -24px !important;
        border-radius: 0;
    }
    #wrapper .info-page-text .ds-article .ds-article__hero-text {
        padding: 20px 20px 18px !important;
    }
    #wrapper .info-page-text .ds-article .ds-article__tag {
        height: 28px;
        padding: 0 14px;
        margin-bottom: 10px;
        font-size: 13px !important;
        line-height: 28px !important;
    }
    #wrapper .info-page-text .ds-article .ds-article__title {
        margin-bottom: 8px !important;
        font-size: 22px !important;
        line-height: 28px !important;
        letter-spacing: -0.44px;
    }
    #wrapper .info-page-text .ds-article .ds-article__meta {
        font-size: 13px !important;
    }
    #wrapper .info-page-text .ds-article .ds-article__body {
        margin-top: 16px !important;
        padding: 20px 18px !important;
        border-radius: 12px;
        font-size: 15px !important;
        line-height: 26px !important;
    }
}

/* ---- 8a. sign-up stepper: on stage 3 the third circle is the current
   step, so it keeps the ring like 01 and 02 did on their stage ---- */
#ko_modal_new_signup .ml-stepper-nav-item.active:last-child {
    background: var(--ds-white);
    color: var(--ds-coral);
    border-color: var(--ds-coral);
}

/* ---- 8b. motion: small, quiet, everywhere ------------------------
   The TZ asks for "neat, unobtrusive css animations - the site should
   come alive". Everything here is short (under 400ms), eases out, and
   is switched off for people who asked their OS for reduced motion. */
@keyframes ds-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
@keyframes ds-pop-in {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: none; }
}
@keyframes ds-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(46,204,113,.45); }
    70%  { box-shadow: 0 0 0 6px rgba(46,204,113,0); }
    100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}

/* the grid cards float in one after the other on load */
#wrapper .grid > li {
    /* backwards, not both: once it has played the card is back on its
       normal styles, so the hover lift below still works */
    animation: ds-fade-up .45s cubic-bezier(.2,.7,.2,1) backwards;
}
#wrapper .grid > li:nth-child(1)  { animation-delay: .03s; }
#wrapper .grid > li:nth-child(2)  { animation-delay: .08s; }
#wrapper .grid > li:nth-child(3)  { animation-delay: .13s; }
#wrapper .grid > li:nth-child(4)  { animation-delay: .18s; }
#wrapper .grid > li:nth-child(5)  { animation-delay: .23s; }
#wrapper .grid > li:nth-child(6)  { animation-delay: .28s; }
#wrapper .grid > li:nth-child(7)  { animation-delay: .33s; }
#wrapper .grid > li:nth-child(8)  { animation-delay: .38s; }
#wrapper .grid > li:nth-child(9)  { animation-delay: .43s; }
#wrapper .grid > li:nth-child(n+10) { animation-delay: .48s; }

/* a card lifts a little under the pointer, its photo zooms a touch */
#wrapper #grid_desktop.grid-mobile .grid > li {
    transition: transform .25s ease, box-shadow .25s ease;
}
#wrapper #grid_desktop.grid-mobile .grid > li:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(22,22,22,.10);
}
#wrapper #grid_desktop.grid-mobile .grid > li .avatar-link {
    overflow: hidden;
}
#wrapper #grid_desktop.grid-mobile .grid > li .avatar-link > img {
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
#wrapper #grid_desktop.grid-mobile .grid > li:hover .avatar-link > img {
    transform: scale(1.04);
}

/* the online dot breathes */
#wrapper .online-sensor.online,
#ko_fixed_cont .online-sensor.online {
    animation: ds-pulse 2.4s ease-out infinite;
}

/* every pill button: lift on hover, press on click */
.buttontr,
#wrapper .btn,
#ko_fixed_cont .buttontr,
#ko_mobile_header .buttontr {
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease, color .18s ease;
}
.buttontr:hover,
#wrapper .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(132,54,236,.16);
}
.buttontr:active,
#wrapper .btn:active,
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons a:active {
    transform: translateY(0) scale(.97);
    box-shadow: none;
    transition-duration: .08s;
}

/* the sidebar rows and the burger rows slide a few px toward the text */
#ko_fixed_cont .additional-links a,
#ko_fixed_cont ul > li > a,
#ko_mobile_nav_links ul > li > a {
    transition: color .18s ease, transform .18s ease, background-color .18s ease;
}
#ko_fixed_cont ul > li > a:hover,
#ko_mobile_nav_links ul > li > a:hover {
    transform: translateX(-3px);
}

/* modals pop in instead of just appearing; the burger dropdown fades */
.modal.fade.in .modal-dialog,
.modal.fade.show .modal-dialog {
    animation: ds-pop-in .28s cubic-bezier(.2,.7,.2,1) both;
}
#ko_mobile_nav_links.collapse.in {
    animation: ds-fade-up .25s ease-out both;
}

/* links in copy: the underline grows in from the right */
#wrapper .info-page-text a:not(.ds-article__tag),
.ds-article__body a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 100% 100%;
    background-size: 0 1px;
    transition: background-size .25s ease;
    text-decoration: none !important;
}
#wrapper .info-page-text a:not(.ds-article__tag):hover,
.ds-article__body a:hover {
    background-size: 100% 1px;
}

/* the article cover zooms a touch under the pointer */
#wrapper .info-page-text .ds-article .ds-article__cover {
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
#wrapper .info-page-text .ds-article .ds-article__hero:hover .ds-article__cover {
    transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
    #wrapper .grid > li,
    .modal.fade.in .modal-dialog,
    .modal.fade.show .modal-dialog,
    #ko_mobile_nav_links.collapse.in,
    #wrapper .online-sensor.online,
    #ko_fixed_cont .online-sensor.online {
        animation: none !important;
    }
    #wrapper #grid_desktop.grid-mobile .grid > li,
    #wrapper #grid_desktop.grid-mobile .grid > li .avatar-link > img,
    .buttontr, #wrapper .btn,
    #wrapper .info-page-text .ds-article .ds-article__cover {
        transition: none !important;
        transform: none !important;
    }
}

/* ---- 4. the profile page as cards ---------------------------------
   account/front.tpl now prints
     #wrapper.page-user.ds-profile.ds-gender-{m|f|t|x}[.ds-profile--own]
       .ds-profile-hero  > p.ds-profile-name (name, age, online dot)
                         + .photo-gallery-wrapper | .photo-gallery-placeholder
       .clearfix > .left-column (the action cards) + .front-clfx (the info card)
   and every .data-title row carries a .ds-row-icon.
   The hero is tinted by gender: pink for women, blue for men, a
   lilac mix for everyone else. */
#wrapper.page-user.ds-profile .ds-profile-hero {
    position: relative;
    box-sizing: border-box;
    margin: 0 0 24px;
    padding: 24px 28px 28px;
    border-radius: 20px;
    overflow: hidden;
    background:
        radial-gradient(70% 90% at 15% 20%, #efe2fb 0%, rgba(239,226,251,0) 60%),
        radial-gradient(60% 80% at 85% 70%, #fde2ea 0%, rgba(253,226,234,0) 60%),
        #faf4f9;
}
#wrapper.page-user.ds-profile.ds-gender-m .ds-profile-hero {
    background:
        radial-gradient(70% 90% at 15% 20%, #e1eafb 0%, rgba(225,234,251,0) 60%),
        radial-gradient(60% 80% at 85% 70%, #eae4fb 0%, rgba(234,228,251,0) 60%),
        #f3f6fd;
}
#wrapper.page-user.ds-profile.ds-gender-t .ds-profile-hero,
#wrapper.page-user.ds-profile.ds-gender-x .ds-profile-hero {
    background:
        radial-gradient(70% 90% at 15% 20%, #e9e3fb 0%, rgba(233,227,251,0) 60%),
        radial-gradient(60% 80% at 85% 70%, #fbe6f1 0%, rgba(251,230,241,0) 60%),
        #f7f4fc;
}
/* the name row: name, age, the dot - on top of the hero */
#wrapper.page-user.ds-profile .ds-profile-name {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    padding: 0;
    direction: rtl;
    text-align: right;
    font-family: var(--ds-font);
    font-size: 28px;
    line-height: 36px;
    font-weight: 700;
    color: var(--ds-dark);
}
#wrapper.page-user.ds-profile .ds-profile-name .online-sensor {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ds-dark-15);
}
#wrapper.page-user.ds-profile .ds-profile-name .online-sensor.online {
    background: #2ecc71;
}
/* the slider is shorter now: it no longer runs the full card */
#wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-wrapper,
#wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-placeholder {
    width: auto;
    max-width: 720px;
    margin: 0 !important;
    border-radius: var(--ds-radius);
}
#wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-wrapper .bx-wrapper {
    margin: 0 !important;
}
/* the edit page keeps the full width (TZ 5) */
#wrapper.page-user.ds-profile--own .ds-profile-hero .photo-gallery-wrapper {
    max-width: none;
}

/* ---- the row of cards under the hero ---- */
#wrapper.page-user.ds-profile > .clearfix {
    gap: 24px;
    align-items: flex-start;
}
#wrapper.page-user.ds-profile > .clearfix > .left-column {
    flex: 0 0 320px;
    max-width: 320px;
}
/* actions: one card each, icon on the right, text after it, no chevron */
#wrapper.page-user.ds-profile .profile-buttons {
    gap: 12px;
    border: none !important;
}
#wrapper.page-user.ds-profile .profile-buttons > .btn-block,
#wrapper.page-user.ds-profile .profile-buttons > .btn-block:first-child {
    position: relative;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 14px 16px !important;
    border: 1px solid var(--ds-line) !important;
    border-radius: 16px;
    background: var(--ds-white);
    box-shadow: 0 2px 10px rgba(22,22,22,.04);
    direction: rtl;
    text-align: right;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#wrapper.page-user.ds-profile .profile-buttons > .btn-block:hover {
    transform: translateY(-2px);
    border-color: transparent !important;
    box-shadow: 0 10px 24px rgba(132,54,236,.14);
}
#wrapper.page-user.ds-profile .profile-buttons .btn-block > a,
#wrapper.page-user.ds-profile .left-column .btn-block a.ko_btn_message {
    position: static;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #f3ecfd 0%, #fde9ef 100%) !important;
}
/* the whole card is the link */
#wrapper.page-user.ds-profile .profile-buttons .btn-block > a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
}
#wrapper.page-user.ds-profile .profile-buttons .btn-block > a i,
#wrapper.page-user.ds-profile .left-column .btn-block a i {
    width: 26px;
    height: 26px;
    font-size: 26px !important;
    line-height: 26px;
}
#wrapper.page-user.ds-profile .profile-buttons .btn-block p {
    margin: 0;
    font-size: 17px;
    line-height: 22px;
    font-weight: 700;
}

/* the info card */
#wrapper.page-user.ds-profile > .clearfix > .front-clfx {
    padding: 6px 28px !important;
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    background: var(--ds-white);
    box-shadow: 0 2px 10px rgba(22,22,22,.04);
}
#wrapper.page-user.ds-profile #data .data-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 0 0;
    font-size: 20px;
    line-height: 28px;
}
#wrapper.page-user.ds-profile #data .data-title .ds-row-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    background-color: transparent;
    background-image: var(--ds-gradient);
}
#wrapper.page-user.ds-profile #data .data-value {
    padding: 8px 34px 22px 0;
    font-size: 17px;
    line-height: 26px;
}
#wrapper.page-user.ds-profile #data hr {
    border-top-color: var(--ds-line);
}
#wrapper.page-user.ds-profile #data .ds-report-line {
    margin: 8px 0 12px;
}

/* ---- tablet: the same cards; the photo strip stays inside the hero
   (the earlier rules ran it edge to edge) ---- */
@media (max-width: 1140px) {
    #wrapper.page-user.ds-profile .ds-profile-hero {
        padding: 20px 20px 24px;
        border-radius: 16px;
    }
    #wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-wrapper,
    #wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-placeholder {
        margin: 0 !important;
        border-radius: var(--ds-radius);
    }
    #wrapper.page-user.ds-profile .ds-profile-name {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 16px;
    }
    #wrapper.page-user.ds-profile > .clearfix > .left-column {
        flex: 0 0 280px;
        max-width: 280px;
    }
    #wrapper.page-user.ds-profile > .clearfix > .front-clfx {
        padding: 4px 20px !important;
    }
}
/* ---- phone: stacked; the three actions stay one row (as the
   current phone screen does), each in its own card, icon over label ---- */
@media (max-width: 767px) {
    #wrapper.page-user.ds-profile .ds-profile-hero {
        padding: 16px 16px 16px;
        margin-bottom: 16px;
    }
    #wrapper.page-user.ds-profile .ds-profile-name {
        font-size: 22px;
        line-height: 28px;
        margin-bottom: 12px;
    }
    #wrapper.page-user.ds-profile > .clearfix {
        gap: 16px;
    }
    #wrapper.page-user.ds-profile > .clearfix > .left-column {
        flex: 1 1 auto;
        max-width: 100%;
    }
    #wrapper.page-user.ds-profile .profile-buttons {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 0;
    }
    #wrapper.page-user.ds-profile .profile-buttons > .btn-block,
    #wrapper.page-user.ds-profile .profile-buttons > .btn-block:first-child {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        justify-content: center;
        padding: 14px 8px 12px !important;
        gap: 10px;
        border: 1px solid var(--ds-line) !important;
        border-right: 1px solid var(--ds-line) !important;
    }
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
    }
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a i {
        width: 24px;
        height: 24px;
        font-size: 24px !important;
        line-height: 24px;
    }
    #wrapper.page-user.ds-profile .profile-buttons .btn-block p {
        font-size: 13px;
        line-height: 16px;
        text-align: center;
        white-space: normal !important;
    }
    #wrapper.page-user.ds-profile > .clearfix > .front-clfx {
        padding: 2px 16px !important;
        border: 1px solid var(--ds-line);
    }
    #wrapper.page-user.ds-profile #data .data-title {
        padding-top: 18px;
        font-size: 18px;
        line-height: 24px;
    }
    #wrapper.page-user.ds-profile #data .data-title .ds-row-icon {
        flex-basis: 22px;
        width: 22px;
        height: 22px;
    }
    #wrapper.page-user.ds-profile #data .data-value {
        padding: 6px 32px 18px 0;
        font-size: 16px;
        line-height: 24px;
    }
}

/* ---- 5. edit profile (/account) and settings (/settings) as cards --
   account.tpl: the photos sit in the .ds-profile-hero (no name), the
   form is the info card - the rules of block 4 do most of it.
   settings.tpl: the auth section is wrapped in
   .ko_settings_block.ko_settings_block--auth, so all four sections
   are the same kind of block, and each one is a card. */
#wrapper.page-user.ds-profile--own > .clearfix > .left-column {
    padding: 0 !important;
}
#wrapper.page-user.ds-profile--own > .clearfix > .front-clfx {
    padding: 28px 28px 32px !important;
}
#wrapper.page-user.ds-profile--own .ds-profile-hero {
    padding: 20px;
}
/* the gallery placeholder (a new member, no photo yet) keeps its tile
   and sits on the tint like a photo would */
#wrapper.page-user.ds-profile--own .ds-profile-hero .photo-gallery-placeholder {
    background: rgba(255,255,255,.6);
}

/* settings: the left rail buttons become the same cards as on the profile */
#wrapper.ko_account_page.ds-settings > .clearfix {
    display: flex;
    direction: ltr;
    align-items: flex-start;
    gap: 24px;
    background: transparent;
}
#wrapper.ko_account_page.ds-settings > .clearfix > .left-column {
    flex: 0 0 320px;
    width: 320px;
    max-width: 320px;
    float: none;
}
#wrapper.ko_account_page.ds-settings > .clearfix > .front-clfx {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    float: none;
    padding: 0 !important;
    border: none;
}
#wrapper.ko_account_page.ds-settings .profile-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    direction: rtl;
    border: none !important;
}
#wrapper.ko_account_page.ds-settings .profile-buttons > .btn-block,
#wrapper.ko_account_page.ds-settings .profile-buttons > .btn-block + .btn-block {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    float: none;
    margin: 0;
    padding: 14px 16px !important;
    border: 1px solid var(--ds-line) !important;
    border-radius: 16px;
    background: var(--ds-white);
    box-shadow: 0 2px 10px rgba(22,22,22,.04);
    direction: rtl;
    text-align: right;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#wrapper.ko_account_page.ds-settings .profile-buttons > .btn-block:hover {
    transform: translateY(-2px);
    border-color: transparent !important;
    box-shadow: 0 10px 24px rgba(132,54,236,.14);
}
#wrapper.ko_account_page.ds-settings .left-column .btn-block a.ko_btn_message {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #f3ecfd 0%, #fde9ef 100%) !important;
}
#wrapper.ko_account_page.ds-settings .left-column .btn-block a.ko_btn_message::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
}
#wrapper.ko_account_page.ds-settings .left-column .btn-block a i {
    width: 26px;
    height: 26px;
    font-size: 26px !important;
    line-height: 26px;
}
#wrapper.ko_account_page.ds-settings .left-column .btn-block p {
    margin: 0;
    font-size: 17px;
    line-height: 22px;
    font-weight: 700;
    text-align: right;
}

/* the sections */
#wrapper.ko_account_page.ds-settings .profile_settings_page {
    padding: 0 0 24px !important;
    gap: 20px;
    background: transparent;
}
#wrapper.ko_account_page.ds-settings .ko_settings_block {
    box-sizing: border-box;
    margin: 0 !important;
    padding: 28px 28px 32px !important;
    border: 1px solid var(--ds-line) !important;
    border-radius: 16px;
    background: var(--ds-white);
    box-shadow: 0 2px 10px rgba(22,22,22,.04);
}
/* the order of the sections: auth, mail, blocked, private requests */
#wrapper.ko_account_page.ds-settings .profile_settings_page > .ko_settings_block:nth-of-type(2) { order: 1; }
#wrapper.ko_account_page.ds-settings .profile_settings_page > .ko_settings_block:nth-of-type(3) { order: 2; }
#wrapper.ko_account_page.ds-settings .profile_settings_page > .ko_settings_block:nth-of-type(4) { order: 4; }
#wrapper.ko_account_page.ds-settings .profile_settings_page > .ko_settings_block:nth-of-type(5) { order: 3; }
/* the auth form keeps its desktop pairing (it used to be a direct
   child of .profile_settings_page, the rules above matched it there) */
@media (min-width: 1141px) {
    #wrapper.ko_account_page.ds-settings .ko_settings_block--auth > .ko_form_profile_settings > .form-group:nth-of-type(1) { order: 2; }
    #wrapper.ko_account_page.ds-settings .ko_settings_block--auth > .ko_form_profile_settings > .form-group:nth-of-type(2) { order: 4; }
    #wrapper.ko_account_page.ds-settings .ko_settings_block--auth > .ko_form_profile_settings > .form-group:nth-of-type(3) { order: 3; }
    #wrapper.ko_account_page.ds-settings .ko_settings_block--auth > .ko_form_profile_settings > .form-group:nth-of-type(4) { order: 1; }
}
#wrapper.ko_account_page.ds-settings .profile_settings_page h4 {
    margin-bottom: 24px;
}

@media (max-width: 1140px) {
    #wrapper.ko_account_page.ds-settings > .clearfix > .left-column {
        flex-basis: 280px;
        width: 280px;
        max-width: 280px;
    }
    #wrapper.ko_account_page.ds-settings .ko_settings_block {
        padding: 24px 20px 28px !important;
    }
}
@media (max-width: 767px) {
    #wrapper.ko_account_page.ds-settings > .clearfix {
        flex-direction: column;
        gap: 16px;
    }
    #wrapper.ko_account_page.ds-settings > .clearfix > .left-column {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        border-bottom: none;
    }
    #wrapper.ko_account_page.ds-settings .profile-buttons {
        gap: 10px;
    }
    #wrapper.ko_account_page.ds-settings .profile-buttons > .btn-block,
    #wrapper.ko_account_page.ds-settings .profile-buttons > .btn-block + .btn-block {
        flex: 1 1 auto;
        padding: 12px 14px !important;
        border: 1px solid var(--ds-line) !important;
    }
    #wrapper.ko_account_page.ds-settings .left-column .btn-block a.ko_btn_message {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
    }
    #wrapper.ko_account_page.ds-settings .left-column .btn-block a i {
        width: 24px;
        height: 24px;
        font-size: 24px !important;
        line-height: 24px;
    }
    #wrapper.ko_account_page.ds-settings .left-column .btn-block p {
        margin: 0;
        font-size: 16px;
    }
    #wrapper.ko_account_page.ds-settings .profile_settings_page {
        padding: 0 0 16px !important;
        gap: 16px;
    }
    #wrapper.ko_account_page.ds-settings .ko_settings_block {
        padding: 20px 16px 24px !important;
        border-radius: 12px;
    }
    /* phone: every save button runs the full width of its card */
    #wrapper.ko_account_page.ds-settings .profile_settings_page button.ko_btn_submit,
    #wrapper.ko_account_page.ds-settings .profile_settings_page .buttontr.btn,
    #wrapper.page-user-account form.ko_form_profile button.ko_btn_submit {
        width: 100%;
        justify-self: stretch;
    }
    #wrapper.page-user.ds-profile--own > .clearfix > .front-clfx {
        padding: 20px 16px 24px !important;
    }
}

/* ---- 6. messages ---------------------------------------------------
   6a desktop: the conversation and the list are two cards with air
      between them instead of two panes split by a rule */
@media (min-width: 1141px) {
    #wrapper.message-wrapper .messages-wrapper {
        gap: 24px;
        padding: 24px 0 24px 24px;
        box-sizing: border-box;
    }
    #wrapper.message-wrapper .message-container,
    #wrapper.message-wrapper .users-list {
        border: 1px solid var(--ds-line);
        border-radius: 16px;
        background: var(--ds-white);
        box-shadow: 0 2px 10px rgba(22,22,22,.04);
        overflow: hidden;
    }
    #wrapper.message-wrapper .users-list {
        border-left: 1px solid var(--ds-line);
    }
    #wrapper.message-wrapper .message-container > .header {
        padding: 0 28px;
    }
    #wrapper.message-wrapper .messages-container-inner {
        padding: 28px 28px;
    }
    #wrapper.message-wrapper .create-message {
        padding: 20px 28px 28px;
    }
    #wrapper.message-wrapper .users-list-wrapper .single-user {
        padding: 0 20px;
    }
}

/* 6b the "more" button (profile / block / delete) at the end of the
   conversation header, on every width; the menu drops under it */
#wrapper.message-wrapper .message-container > .header {
    position: relative;
}
#wrapper.message-wrapper .header .button-wrapper.ds-chat-menu {
    order: 4;
    flex: 0 0 40px;
    float: none;
    width: 40px;
    height: 40px;
    margin-right: 8px;
}
#wrapper.message-wrapper .header .ds-chat-menu__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--ds-line);
    border-radius: 12px;
    background: var(--ds-white);
    box-shadow: none;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease;
}
#wrapper.message-wrapper .header .ds-chat-menu__btn span {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ds-dark);
}
#wrapper.message-wrapper .header .ds-chat-menu__btn:hover,
#wrapper.message-wrapper .header .open .ds-chat-menu__btn {
    background: var(--ds-coral-bg);
    border-color: transparent;
}
/* the menu is anchored to the header, not to the avatar, so it opens
   under the "more" button at the left edge */
#wrapper.message-wrapper .header .button-wrapper.dropdown {
    position: static;
}
#wrapper.message-wrapper .header .button-wrapper .dropdown-menu {
    top: 72px;
    left: 28px;
    right: auto;
    z-index: 1050;
}
@media (max-width: 1140px) {
    #wrapper.message-wrapper .header .button-wrapper .dropdown-menu {
        left: 32px;
    }
    #wrapper.message-wrapper .header .button-wrapper.ds-chat-menu {
        margin-right: 0;
        margin-left: 8px;
    }
}
@media (max-width: 767px) {
    #wrapper.message-wrapper .header .button-wrapper .dropdown-menu {
        left: 16px;
    }
}

/* 6c the list rows: the name line sits at the top of the row, next to
   the top of the avatar; the preview hangs under it */
#wrapper.message-wrapper .users-list-wrapper .single-user {
    align-items: flex-start;
    height: auto;
    min-height: 88px;
    padding-top: 16px;
    padding-bottom: 16px;
}
#wrapper.message-wrapper .single-user .message-data {
    align-items: start;
    align-self: flex-start;
    row-gap: 4px;
}
#wrapper.message-wrapper .single-user .message-data .username,
#wrapper.message-wrapper .single-user .message-data .date {
    line-height: 22px;
}
#wrapper.message-wrapper .single-user .message-data .message {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 6d the send button is the brand gradient everywhere */
#wrapper.message-wrapper .create-message > button[type="submit"],
#wrapper.message-wrapper .create-message > button[type="submit"]:hover {
    background: var(--ds-gradient) !important;
}
#wrapper.message-wrapper .create-message > button[type="submit"]:hover {
    box-shadow: 0 8px 20px rgba(132,54,236,.28);
}

/* 6e "new messages" - the pill with no icon, on its own line */
#wrapper.message-wrapper .new-messages-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 24px;
}
#wrapper.message-wrapper .new-messages-wrapper .line {
    flex: 1 1 auto;
    height: 1px;
    background: var(--ds-line);
    float: none;
    width: auto;
    margin: 0;
}
#wrapper.message-wrapper .new-messages-wrapper .text {
    flex: 0 0 auto;
    float: none;
    width: auto;
    margin: 0;
    padding: 0 16px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(var(--ds-white), var(--ds-white)) padding-box,
                var(--ds-gradient) border-box;
    font-family: var(--ds-font);
    font-size: 13px;
    font-weight: 500;
    line-height: 30px;
    color: var(--ds-coral);
}
#wrapper.message-wrapper .new-messages-wrapper .text::before,
#wrapper.message-wrapper .new-messages-wrapper .text i {
    content: none;
    display: none;
}

/* 6f tablet and phone bubbles: the desktop format, scaled */
@media (max-width: 1140px) {
    #wrapper.message-wrapper .chat-message {
        gap: 12px;
        margin-bottom: 20px;
    }
    #wrapper.message-wrapper .chat-message > img {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }
    #wrapper.message-wrapper .chat-message > .chat-message-inner:first-child {
        margin-left: 56px;
    }
    #wrapper.message-wrapper .chat-message.my-message > .chat-message-inner:first-child {
        margin-left: 0;
        margin-right: 56px;
    }
    #wrapper.message-wrapper .chat-message .chat-message-inner {
        max-width: min(560px, 78%);
    }
    #wrapper.message-wrapper .chat-message .message-content {
        padding: 12px 16px;
        font-size: 15px;
        line-height: 22px;
    }
    #wrapper.message-wrapper .chat-message-inner > .message-content {
        margin-bottom: 8px;
    }
    #wrapper.message-wrapper .chat-message-inner > .date,
    #wrapper.message-wrapper .chat-message-inner > .status {
        font-size: 13px;
        line-height: 18px;
        color: #737373;
    }
    #wrapper.message-wrapper .message-container > .header {
        height: 72px;
    }
    #wrapper.message-wrapper .header .button-wrapper.dropdown,
    #wrapper.message-wrapper .header .dropdown-toggle.button,
    #wrapper.message-wrapper .header .dropdown-toggle.button img {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }
    #wrapper.message-wrapper .header .username {
        font-size: 17px;
        line-height: 24px;
    }
}

/* 6g the "don't know what to write?" card: one layout on every width -
   centred on the screen, each suggestion a row with a tinted round
   icon on the right, the gradient send button full width */
#wrapper #conversation-helper .container {
    position: fixed;
    left: 50%;
    top: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100% - 32px));
    max-width: none;
    box-sizing: border-box;
    padding: 24px 24px 20px;
    border-radius: 20px;
}
#wrapper #conversation-helper .heading h3 {
    font-size: 22px;
    line-height: 30px;
}
#wrapper #conversation-helper .divider {
    display: none;
}
#wrapper #conversation-helper .object-block {
    position: relative;
    margin: 16px 0 0;
    padding: 18px 92px 18px 18px;
    border-radius: 16px;
    background: #f6f3fb;
}
#wrapper #conversation-helper .object-block.message {
    background: #f3f3f6;
}
#wrapper #conversation-helper .object-block:last-of-type {
    margin-bottom: 20px;
}
/* the icon badge: a 56 tinted disc at the right edge of the row */
#wrapper #conversation-helper .topic .title::before,
#wrapper #conversation-helper .message .title::before {
    content: '';
    position: absolute;
    top: 18px;
    right: 18px;
    width: 56px;
    height: 56px;
    margin: 0;
    border-radius: 50%;
    background: var(--ds-white);
    -webkit-mask: none;
            mask: none;
}
#wrapper #conversation-helper .topic .title::after,
#wrapper #conversation-helper .message .title::after {
    content: '';
    position: absolute;
    top: 34px;
    right: 34px;
    width: 24px;
    height: 24px;
    background: var(--ds-gradient);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: contain;
            mask-size: contain;
}
#wrapper #conversation-helper .topic .title::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M22 10V15C22 20 20 22 15 22H9C4 22 2 20 2 15V9C2 4 4 2 9 2H14' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M22 10H18C15 10 14 9 14 6V2L22 10Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7 13H13' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7 17H11' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M22 10V15C22 20 20 22 15 22H9C4 22 2 20 2 15V9C2 4 4 2 9 2H14' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M22 10H18C15 10 14 9 14 6V2L22 10Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7 13H13' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7 17H11' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#wrapper #conversation-helper .message .title::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M17 20.5H7C4 20.5 2 19 2 15.5V8.5C2 5 4 3.5 7 3.5H17C20 3.5 22 5 22 8.5V15.5C22 19 20 20.5 17 20.5Z' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17 9L13.87 11.5C12.84 12.32 11.15 12.32 10.12 11.5L7 9' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M17 20.5H7C4 20.5 2 19 2 15.5V8.5C2 5 4 3.5 7 3.5H17C20 3.5 22 5 22 8.5V15.5C22 19 20 20.5 17 20.5Z' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17 9L13.87 11.5C12.84 12.32 11.15 12.32 10.12 11.5L7 9' stroke='%23161616' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#wrapper #conversation-helper .title {
    font-size: 18px;
    line-height: 26px;
}
#wrapper #conversation-helper .content {
    font-size: 15px;
    line-height: 22px;
    color: #4a4a4a;
}
#wrapper #conversation-helper button {
    height: 32px;
    padding: 0 14px;
    margin-top: 10px;
    font-size: 13px;
    background: linear-gradient(#fff, #fff) padding-box,
                var(--ds-gradient) border-box;
}
#wrapper #conversation-helper .send-button {
    width: 100%;
    height: 52px;
    border-radius: 16px;
    font-size: 17px;
    line-height: 52px;
}
@media (max-width: 767px) {
    #wrapper #conversation-helper .container {
        padding: 20px 16px 16px;
    }
    #wrapper #conversation-helper .object-block {
        padding: 16px 80px 16px 14px;
    }
    #wrapper #conversation-helper .topic .title::before,
    #wrapper #conversation-helper .message .title::before {
        top: 16px;
        right: 14px;
        width: 48px;
        height: 48px;
    }
    #wrapper #conversation-helper .topic .title::after,
    #wrapper #conversation-helper .message .title::after {
        top: 28px;
        right: 26px;
    }
}

/* ---- 7. likes and visitors ---------------------------------------
   desktop: the same card as the homepage - square photo, name on the
   right with the dot on the left, three 48px square buttons with
   gradient icons (block 1 above only covered #grid_desktop.grid-mobile) */
@media (min-width: 1141px) {
    #wrapper #grid_desktop.list-mobile .grid > li .avatar-link,
    #wrapper #grid_desktop.list-mobile .grid > li > a.thumb-image {
        height: auto !important;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }
    #wrapper #grid_desktop.list-mobile .grid > li > a.open-profile:not(.thumb-image) {
        text-align: right;
        direction: rtl;
    }
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_title {
        position: relative;
        padding-left: 20px;
        text-align: right;
    }
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_title .online-sensor {
        position: absolute;
        left: 0;
        top: 50%;
        margin: 0 !important;
        transform: translateY(-50%);
    }
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_desc,
    #wrapper #grid_desktop.list-mobile .grid > li .user-age {
        text-align: right;
    }
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons {
        gap: 20px;
        justify-content: flex-end;
        direction: rtl;
    }
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons a,
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons a.ko_btn_love,
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons a.ko_pf_request,
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons a.ko_link_massage {
        width: 48px !important;
        height: 48px !important;
        border-radius: 14px !important;
        border: 1px solid #ececf0 !important;
        background: var(--ds-white) !important;
        box-shadow: 0 2px 8px rgba(22, 22, 22, .06);
        transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    }
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons a:hover {
        transform: translateY(-2px);
        border-color: transparent !important;
        box-shadow: 0 8px 20px rgba(132, 54, 236, .18);
    }
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons a .fa,
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons a.ko_btn_love .fa {
        width: 24px;
        height: 24px;
        font-size: 24px;
    }
    #wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons a .fa:before,
    #wrapper #grid_desktop.list-mobile .grid > li .ko_pf_request .fa:before,
    #wrapper #grid_desktop.list-mobile .grid > li .ko_link_massage .fa:before,
    #wrapper #grid_desktop.list-mobile .grid > li .ko_btn_love .fa:before {
        background-color: transparent !important;
        background-image: var(--ds-gradient) !important;
    }
    /* the card itself */
    #wrapper #grid_desktop.list-mobile .grid > li {
        border-radius: 16px;
        background: var(--ds-white);
        box-shadow: 0 4px 16px rgba(22,22,22,.06);
        transition: transform .25s ease, box-shadow .25s ease;
    }
    #wrapper #grid_desktop.list-mobile .grid > li:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 30px rgba(22,22,22,.10);
    }
}
/* tablet and phone: the online dot moves to the left end of the name
   row (it used to sit right after the name) */
@media (max-width: 1140px) {
    #wrapper #grid_desktop.list-mobile ul.grid > li .ko_grid_item_title {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        direction: rtl;
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li .ko_grid_item_title .online-sensor {
        position: static !important;
        flex: 0 0 10px;
        width: 10px;
        height: 10px;
        margin: 0 !important;
        border-radius: 50%;
    }
}

/* ---- 9. fixes after the first review of t=97 ------------------------ */
/* 9.1 the icon inside the card buttons: the mask is an inline-block on
   the text baseline, so it sat 3px low; a block has no baseline */
#wrapper #grid_desktop .grid > li .ko_grid_item_buttons a .fa,
#wrapper #grid_desktop .grid > li .ko_grid_item_buttons a .fa:before {
    display: block;
    vertical-align: 0;
    margin: 0;
}
#wrapper #grid_desktop .grid > li .ko_grid_item_buttons a .fa:before {
    width: 24px;
    height: 24px;
}

/* 9.2 the sidebar scrolls when the intro is long, but its scrollbar
   took 15px from the column and squeezed the buttons - the column
   still scrolls, the bar is just not drawn */
#ko_fixed_cont .affix {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#ko_fixed_cont .affix::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* 9.3 the three sidebar buttons are all the same: filled with the
   brand gradient (TZ: "цвет кнопок справа в меню одинаковый") */
.logged-out #ko_fixed_cont .buttontr,
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_signup"],
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_new_signup"],
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_search"],
.logged-out #ko_fixed_cont .buttontr[data-target="#ko_modal_signin"] {
    background: var(--ds-gradient) !important;
    border-color: transparent !important;
    color: var(--ds-white) !important;
}
.logged-out #ko_fixed_cont .buttontr:hover {
    filter: brightness(1.06);
}

/* 9.4 the footer links plate is as wide as the column, so "centred"
   is the centre of the sidebar, not of a 270 box hanging off its edge */
.logged-out #ko_fixed_cont .additional-links {
    width: 280px !important;
    right: 0;
}
@media (max-width: 1140px) {
    .logged-out #ko_fixed_cont .additional-links { width: 100% !important; }
}

/* 9.5 the profile hero as in the reference: the square photo strip
   sits at the left edge of the card, the name and the dot at the
   bottom right of the tinted area, which is a soft wave pattern
   (css/profile-bg-{f,m,x}.svg) rather than a flat tint */
#wrapper.page-user.ds-profile .ds-profile-hero {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    direction: ltr;
    padding: 0;
    background: url("profile-bg-x.svg") center / cover no-repeat, #f6f3fb;
}
#wrapper.page-user.ds-profile.ds-gender-f .ds-profile-hero {
    background: url("profile-bg-f.svg") center / cover no-repeat, #fbf3f8;
}
#wrapper.page-user.ds-profile.ds-gender-m .ds-profile-hero {
    background: url("profile-bg-m.svg") center / cover no-repeat, #f2f6fd;
}
#wrapper.page-user.ds-profile.ds-gender-t .ds-profile-hero {
    background: url("profile-bg-x.svg") center / cover no-repeat, #f6f3fb;
}
/* the strip: one square tile wide, flush with the card's left edge */
#wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-wrapper,
#wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-placeholder {
    order: 1;
    flex: 0 0 338px;
    width: 338px;
    max-width: 338px;
    height: 338px;
    margin: 0 !important;
    border-radius: 20px;
    overflow: hidden;
}
#wrapper.page-user.ds-profile .photo_gallery .gallery-item,
#wrapper.page-user.ds-profile .photo-gallery-placeholder {
    width: 338px;
    height: 338px;
    flex-basis: 338px;
}
#wrapper.page-user.ds-profile .photo-gallery-wrapper .bx-viewport {
    height: 338px !important;
}
#wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-wrapper .bx-wrapper {
    margin: 0 !important;
    border-radius: 20px;
}
/* the name: bottom right of the tinted area */
#wrapper.page-user.ds-profile .ds-profile-name {
    order: 2;
    flex: 1 1 auto;
    align-self: flex-end;
    justify-content: flex-start;
    margin: 0;
    padding: 24px 28px 28px;
    direction: rtl;
}
/* the edit page: the strip runs the full card, no name */
#wrapper.page-user.ds-profile--own .ds-profile-hero {
    padding: 0;
}
#wrapper.page-user.ds-profile--own .ds-profile-hero .photo-gallery-wrapper {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
}
#wrapper.page-user.ds-profile--own .ds-profile-hero .photo-gallery-placeholder {
    background: rgba(255,255,255,.55);
}

/* 9.6 the actions column is as wide as the photo and sits under it */
#wrapper.page-user.ds-profile > .clearfix > .left-column {
    flex: 0 0 338px;
    max-width: 338px;
}
/* 9.7 the action cards: icon at the right edge, the label starts
   right after it (it was centred in the leftover space) */
#wrapper.page-user.ds-profile .profile-buttons .btn-block p,
#wrapper.ko_account_page.ds-settings .left-column .btn-block p {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}
/* 9.8 the info rows: the value starts under the icon, not indented */
#wrapper.page-user.ds-profile #data .data-value {
    padding: 6px 0 20px;
}
#wrapper.page-user.ds-profile #data .data-title {
    padding-top: 20px;
}

@media (max-width: 1140px) {
    #wrapper.page-user.ds-profile .ds-profile-hero {
        padding: 0;
        border-radius: 16px;
    }
    #wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-wrapper,
    #wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-placeholder {
        border-radius: 16px;
    }
    #wrapper.page-user.ds-profile .ds-profile-name {
        padding: 20px 20px 22px;
        margin: 0;
    }
    #wrapper.page-user.ds-profile > .clearfix > .left-column {
        flex: 0 0 338px;
        max-width: 338px;
    }
}
/* phone: the photo fills the card, the name under it on the right */
@media (max-width: 767px) {
    #wrapper.page-user.ds-profile .ds-profile-hero {
        flex-direction: column;
        padding: 0;
    }
    #wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-wrapper,
    #wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-placeholder {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        height: auto;
        border-radius: 16px 16px 0 0;
    }
    #wrapper.page-user.ds-profile .photo_gallery .gallery-item,
    #wrapper.page-user.ds-profile .photo-gallery-placeholder {
        width: auto;
        height: auto;
        aspect-ratio: 1 / 1;
        flex-basis: auto;
    }
    #wrapper.page-user.ds-profile .photo-gallery-wrapper .bx-viewport {
        height: auto !important;
    }
    #wrapper.page-user.ds-profile .ds-profile-name {
        align-self: stretch;
        padding: 14px 16px 16px;
        margin: 0;
    }
    #wrapper.page-user.ds-profile > .clearfix > .left-column {
        flex: 1 1 auto;
        max-width: 100%;
    }
}
/* 9.9 the auth form is inside a .ko_settings_block now, and the mail
   block's three-column grid caught it: it keeps two columns */
@media (min-width: 1141px) {
    #wrapper.ko_account_page.ds-settings .ko_settings_block--auth .ko_form_profile_settings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* 9.10 the conversation header reads right to left like the mock:
   avatar at the right edge, the name right next to it, the "more"
   button (and, on tablet and phone, the back chevron) at the left */
#wrapper.message-wrapper .message-container > .header {
    direction: rtl;
}
#wrapper.message-wrapper .header .username {
    justify-content: flex-start;
    text-align: right;
}
#wrapper.message-wrapper .header .button-wrapper.ds-chat-menu {
    margin: 0 8px 0 0;
}
@media (min-width: 1141px) {
    /* the list is always on screen on desktop: nothing to go back to */
    #wrapper.message-wrapper .header .button-wrapper.hidden-desktop {
        display: none !important;
    }
}
@media (max-width: 1140px) {
    #wrapper.message-wrapper .header .button-wrapper.ds-chat-menu {
        margin: 0 8px 0 0;
    }
}

/* ---- 10. fixes after the second review ------------------------------ */
/* 10.1 the three card buttons sit in the middle of the card */
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_buttons,
#wrapper #grid_desktop.list-mobile .grid > li .ko_grid_item_buttons {
    justify-content: center;
}

/* 10.2 settings and profile: the rail cards and the first content card
   open on the same line. Three things pushed the content down - the
   legacy .news-wrapper is inline-block (a 5px line box), the empty
   .actions div keeps a 10px padding (it holds whitespace, so :empty
   never matched), and .profile-buttons carries .clearfix, whose
   ::before became the first flex item and ate one 12px gap. */
#wrapper.ko_account_page.ds-settings .news-wrapper {
    display: block !important;
}
#wrapper.ko_account_page.ds-settings .profile_settings_page .actions {
    display: none !important;
}
#wrapper.ko_account_page.ds-settings .profile-buttons::before,
#wrapper.ko_account_page.ds-settings .profile-buttons::after,
#wrapper.page-user.ds-profile .profile-buttons::before,
#wrapper.page-user.ds-profile .profile-buttons::after {
    content: none !important;
    display: none !important;
}

/* 10.3 messages, desktop: the list card keeps the same 24 from the
   sidebar as the conversation card keeps from the page edge */
@media (min-width: 1141px) {
    #wrapper.message-wrapper .messages-wrapper {
        padding: 24px;
    }
}

/* 10.4 the conversation header on desktop: the name keeps 16 from the
   avatar, and the three actions (show / block / delete) are buttons at
   the left end of the header instead of the "more" menu. Tablet and
   phone keep the menu. */
#wrapper.message-wrapper .header .username {
    padding: 0 16px;
}
@media (min-width: 1141px) {
    #wrapper.message-wrapper .header .button-wrapper.ds-chat-menu {
        display: none !important;
    }
    /* the wrapper dissolves: the avatar button and the menu become
       items of the header row themselves */
    #wrapper.message-wrapper .header .button-wrapper.dropdown {
        display: contents;
    }
    #wrapper.message-wrapper .header .dropdown-toggle.button {
        order: 1;
        flex: 0 0 56px;
    }
    #wrapper.message-wrapper .header .button-wrapper .dropdown-menu,
    #wrapper.message-wrapper .header .open .dropdown-menu {
        display: flex !important;
        position: static;
        order: 5;
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }
    #wrapper.message-wrapper .header .dropdown-menu .list-group-item {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        gap: 0;
        border: 1px solid var(--ds-line);
        border-radius: 12px;
        background: var(--ds-white);
        font-size: 0;        /* icon only; the label is the tooltip */
        line-height: 0;
        color: var(--ds-dark);
        transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
    }
    #wrapper.message-wrapper .header .dropdown-menu .list-group-item:hover,
    #wrapper.message-wrapper .header .dropdown-menu .list-group-item:focus {
        background: var(--ds-coral-bg);
        border-color: transparent;
        transform: translateY(-1px);
    }
    #wrapper.message-wrapper .header .dropdown-menu .list-group-item i.fa {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        font-size: 18px;
        line-height: 18px;
    }
    #wrapper.message-wrapper .header .dropdown-menu .list-group-item i.fa:before {
        background-color: transparent;
        background-image: var(--ds-gradient);
    }
}

/* ---- 11. own profile view (/user, front.tpl with is_my_page): the
   strip may run wide, but the name keeps a column of its own with
   real air around it instead of being squeezed against the photos */
@media (min-width: 1141px) {
    #wrapper.page-user.ds-profile--own .ds-profile-hero .ds-profile-name {
        flex: 0 0 auto;
        min-width: 360px;
        padding: 32px 40px 36px 32px;
        white-space: nowrap;
    }
    #wrapper.page-user.ds-profile--own .ds-profile-hero .photo-gallery-wrapper {
        flex: 1 1 auto;
        min-width: 338px;
    }
    #wrapper.page-user.ds-profile .ds-profile-name {
        padding: 28px 36px 32px 28px;
    }
}

/* ---- 12. two more after review three --------------------------------- */
/* 12.1 the mutual-like icon is a 28px box, and the 24px mask from 9.1
   sat in its top corner: the mask fills the box */
#wrapper #grid_desktop .grid > li .ko_grid_item_buttons a .fa-heart-double:before {
    width: 28px;
    height: 28px;
}
/* 12.2 the chat list: serg_custom.css:1390 nudges the date 7px down
   (position: relative; top: 7px); it sits on the name's line instead */
#wrapper.message-wrapper .single-user .message-data .date {
    position: static !important;
    top: auto !important;
    align-self: start;
    line-height: 22px;
}
#wrapper.message-wrapper .single-user .message-data .username {
    align-self: start;
}

/* ---- 13. review four --------------------------------------------- */
/* 13.1 phone: the page arrows in the bottom bar sit at the right */
@media (max-width: 767px) {
    #wrapper + .bottom-line .pagination {
        justify-content: flex-end;
        gap: 12px;
    }
}

/* 13.2 the logged-out sidebar on desktop: a column that never
   overlaps itself. The pills keep their 48 (they used to give way
   down to 36 when the intro was long), the intro frame takes
   whatever height is left and scrolls inside itself, and the three
   links are a normal last row of the column instead of a fixed
   plate painted over the frame and over the column's border. */
@media (min-width: 1141px) {
    .logged-out #ko_fixed_cont .affix {
        overflow: hidden;
    }
    .logged-out #ko_fixed_cont .affix > .buttontr {
        flex-shrink: 0;
        min-height: 48px;
    }
    .logged-out #ko_fixed_cont .text-about {
        flex: 1 1 auto;
        min-height: 140px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(132,54,236,.25) transparent;
        margin: 16px auto 0 !important;
    }
    .logged-out #ko_fixed_cont .additional-links {
        position: relative !important;   /* in flow; the hairline hangs off it */
        order: 5;
        flex: 0 0 auto;
        width: auto !important;
        margin: 16px 0 0;
        padding: 16px 16px 28px !important;
        background: transparent;
    }
    .logged-out #ko_fixed_cont .additional-links::before {
        left: 24px;
        right: 24px;
    }
}

/* ---- 14. the subscription page in the new card layout ----------------
   The CMS markup (.ds-sub) and common/subscriptions.tpl stay exactly
   as they are - every rule below is paint and layout only. */
#wrapper .ds-sub .ds-sub-row {
    gap: 24px;
    margin-bottom: 40px;
}
#wrapper .ds-sub .ds-sub-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 32px;
    border: 1px solid var(--ds-line);
    border-radius: 20px;
    background: var(--ds-white);
    box-shadow: 0 2px 10px rgba(22,22,22,.04);
}
#wrapper .ds-sub .ds-sub-row .ds-sub-card:first-child {
    background: #f2fbf5;
    border-color: #d6f0de;
}
#wrapper .ds-sub .ds-sub-row .ds-sub-card:last-child {
    background: #fdf1f6;
    border-color: #f8dbe7;
}
/* headings with an icon box on the right */
#wrapper .ds-sub .ds-sub-card .ds-sub-h,
#wrapper .ds-sub .ds-sub-plans > .ds-sub-h,
#wrapper .ds-sub .ds-sub-legal > .ds-sub-h {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 26px;
    line-height: 34px;
    letter-spacing: -0.52px;
}
#wrapper .ds-sub .ds-sub-card .ds-sub-h::before,
#wrapper .ds-sub .ds-sub-legal > .ds-sub-h::before,
#wrapper .ds-sub .ds-sub-pay .ds-sub-h::before {
    content: '';
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background-color: var(--ds-white);
    -webkit-mask: none;
    mask: none;
    position: relative;
}
/* the box tint per card; the glyph is the heading's ::after */
#wrapper .ds-sub .ds-sub-row .ds-sub-card:first-child .ds-sub-h::before {
    background-color: #e3f6ea;
}
#wrapper .ds-sub .ds-sub-row .ds-sub-card:last-child .ds-sub-h::before {
    background-color: #fbe0ea;
}
/* the glyphs: a masked element layered over the tinted box */
#wrapper .ds-sub .ds-sub-card .ds-sub-h,
#wrapper .ds-sub .ds-sub-legal > .ds-sub-h {
    position: relative;
}
#wrapper .ds-sub .ds-sub-card .ds-sub-h::after,
#wrapper .ds-sub .ds-sub-legal > .ds-sub-h::after {
    content: '';
    position: absolute;
    right: 11px;
    top: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: contain; mask-size: contain;
    background: var(--ds-gradient);
}
#wrapper .ds-sub .ds-sub-row .ds-sub-card:first-child .ds-sub-h::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 2.5 4.5 5.3v5.7c0 4.9 3.2 9.3 7.5 10.5 4.3-1.2 7.5-5.6 7.5-10.5V5.3L12 2.5z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.8 12l2.2 2.2 4.4-4.4' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 2.5 4.5 5.3v5.7c0 4.9 3.2 9.3 7.5 10.5 4.3-1.2 7.5-5.6 7.5-10.5V5.3L12 2.5z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.8 12l2.2 2.2 4.4-4.4' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background: #34c759;
}
#wrapper .ds-sub .ds-sub-row .ds-sub-card:last-child .ds-sub-h::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9.5 18.5h5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.5 21.5h3' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 2.5a6.5 6.5 0 0 0-3.8 11.8c.7.5 1.1 1.4 1.1 2.2h5.4c0-.8.4-1.7 1.1-2.2A6.5 6.5 0 0 0 12 2.5z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9.5 18.5h5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.5 21.5h3' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 2.5a6.5 6.5 0 0 0-3.8 11.8c.7.5 1.1 1.4 1.1 2.2h5.4c0-.8.4-1.7 1.1-2.2A6.5 6.5 0 0 0 12 2.5z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#wrapper .ds-sub .ds-sub-legal > .ds-sub-h::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7.5 10.5V8a4.5 4.5 0 0 1 9 0v2.5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5.5 10.5h13v10h-13z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 14.5v2.5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7.5 10.5V8a4.5 4.5 0 0 1 9 0v2.5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5.5 10.5h13v10h-13z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 14.5v2.5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#wrapper .ds-sub .ds-sub-legal > .ds-sub-h::before {
    background-color: #f3ecfd;
}
/* the pay card: the small heading gets the wallet the same way */
#wrapper .ds-sub .ds-sub-pay-text {
    position: relative;
    padding-right: 68px;
}
#wrapper .ds-sub .ds-sub-pay-text::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #f3ecfd;
}
#wrapper .ds-sub .ds-sub-pay-text::after {
    content: '';
    position: absolute;
    right: 11px;
    top: 11px;
    width: 30px;
    height: 30px;
    background: var(--ds-gradient);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3.5 7.5a2 2 0 0 1 2-2h13v3.5h-13a1 1 0 0 0 0 2h14.5a1 1 0 0 1 1 1v6.5a2 2 0 0 1-2 2h-13.5a2 2 0 0 1-2-2v-11z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.5 15h2.5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3.5 7.5a2 2 0 0 1 2-2h13v3.5h-13a1 1 0 0 0 0 2h14.5a1 1 0 0 1 1 1v6.5a2 2 0 0 1-2 2h-13.5a2 2 0 0 1-2-2v-11z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.5 15h2.5' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
#wrapper .ds-sub .ds-sub-pay .ds-sub-h::before,
#wrapper .ds-sub .ds-sub-pay .ds-sub-h::after {
    content: none;
}
#wrapper .ds-sub .ds-sub-pay {
    flex-direction: row;
    justify-content: space-between;
}
#wrapper .ds-sub .ds-sub-pay .ds-sub-h {
    font-size: 22px;
    line-height: 30px;
}
/* list rows and the note inside the cards */
#wrapper .ds-sub .ds-sub-list li,
#wrapper .ds-sub .ds-sub-info {
    gap: 12px;
    font-size: 16px;
    line-height: 26px;
}
#wrapper .ds-sub .ds-sub-list li + li {
    margin-top: 10px;
}
#wrapper .ds-sub .ds-sub-list li::before,
#wrapper .ds-sub .ds-sub-info::before {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    background-size: 24px 24px;
}
#wrapper .ds-sub .ds-sub-info::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none'%3E%3Ccircle cx='14' cy='14' r='13' stroke='%23fd2e63' stroke-width='2'/%3E%3Cpath d='M14 12.8v6.4' stroke='%23fd2e63' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='14' cy='8.9' r='1.3' fill='%23fd2e63'/%3E%3C/svg%3E");
}

/* ---- the plans ---- */
#wrapper .ds-sub .ds-sub-plans > .ds-sub-h {
    margin-bottom: 20px;
}
#wrapper .ds-sub .ds-sub-plans > .ds-sub-h::before {
    content: '';
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    background: var(--ds-gradient);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3.5 8.5 7.8 12.3 12 6l4.2 6.3 4.3-3.8-1.8 11H5.3L3.5 8.5z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6 20.5h12' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3.5 8.5 7.8 12.3 12 6l4.2 6.3 4.3-3.8-1.8 11H5.3L3.5 8.5z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6 20.5h12' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
#wrapper .ds-sub .ds-sub-plans-row {
    display: flex;
    align-items: stretch;
    gap: 24px;
    direction: rtl;
}
#wrapper .ds-sub .ds-sub-plans-row::after {
    content: none;
}
#wrapper .ds-sub .ds-sub-plans-row div:has(> input[name="subscription_type"]) {
    position: relative;
    /* a column, so the (legacy-floated) label gives the box its height */
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label {
    flex: 1 1 auto;
    float: none;
    width: auto;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label {
    height: auto;
    min-height: 168px;
    justify-content: center;
    gap: 10px;
    padding: 26px 28px 24px 84px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(22,22,22,.04);
}
/* the radio sits at the left edge now */
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::before {
    right: auto;
    left: 28px;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::after {
    right: auto;
    left: 38px;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"]:checked + label {
    border: 1px solid var(--ds-coral);
    background: #fdf3f7;
    box-shadow: 0 10px 28px rgba(253,46,99,.12);
}
/* period over price, no divider between them */
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label > div:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .month {
    padding: 0;
    border: none;
    font-size: 22px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: -0.44px;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .cost {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 30px;
    font-weight: 700;
    line-height: 36px;
    letter-spacing: -0.6px;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .cost::after {
    content: '';
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fde9ef url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3.5 8.5 7.8 12.3 12 6l4.2 6.3 4.3-3.8-1.8 11H5.3L3.5 8.5z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6 20.5h12' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
    background-color: #fde9ef;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .desc {
    font-size: 15px;
    line-height: 22px;
    color: #7a7a7a;
}
/* the first plan wears the "most popular" badge */
#wrapper .ds-sub .ds-sub-plans-row div:has(> #sub_type_1)::before {
    content: 'הפופולרי ביותר';
    position: absolute;
    top: -15px;
    left: 24px;
    z-index: 2;
    height: 30px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--ds-gradient);
    color: var(--ds-white);
    font-family: var(--ds-font);
    font-size: 13px;
    font-weight: 600;
    line-height: 30px;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(132,54,236,.25);
}

/* ---- the terms row: agreement on the right, the button on the left ---- */
#wrapper .ds-sub .ds-sub-terms {
    margin: 32px 0 40px;
}
#wrapper .ds-sub .ds-sub-terms::after {
    content: '';
    display: block;
    clear: both;
}
#wrapper .ds-sub .ds-sub-agree {
    float: right;
    margin: 4px 0 0;
}
#wrapper .ds-sub .ds-sub-btn {
    float: left;
    width: 320px;
    max-width: 100%;
    height: 56px;
    border-radius: 999px;
    font-size: 20px;
    line-height: 56px;
    padding: 0 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M20 12H4' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 6l-6 6 6 6' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), var(--ds-gradient);
    background-position: left 28px center, 0 0;
    background-size: 22px 22px, auto;
    background-repeat: no-repeat;
    box-shadow: 0 10px 24px rgba(132,54,236,.22);
}
#wrapper .ds-sub .ds-sub-btn:hover {
    box-shadow: 0 14px 30px rgba(132,54,236,.3);
}

/* ---- accepted cards ---- */
#wrapper .ds-sub .ds-sub-pay {
    padding: 24px 28px;
    border: 1px solid var(--ds-line);
    border-radius: 20px;
    background: var(--ds-white);
    margin-bottom: 24px;
}
#wrapper .ds-sub .ds-sub-logos {
    gap: 16px;
}
#wrapper .ds-sub .ds-sub-logos img {
    box-sizing: border-box;
    width: 150px;
    height: 76px;
    padding: 16px 22px;
    border: 1px solid var(--ds-line);
    border-radius: 14px;
    background: var(--ds-white);
}

/* ---- security and terms ---- */
#wrapper .ds-sub .ds-sub-legal {
    position: relative;
    overflow: hidden;
    padding: 28px 32px 28px 200px;
    border: 1px solid var(--ds-line);
    border-radius: 20px;
    background: var(--ds-white);
}
#wrapper .ds-sub .ds-sub-legal > .ds-sub-h {
    font-size: 24px;
    line-height: 32px;
    margin-bottom: 18px;
}
#wrapper .ds-sub .ds-sub-legal p {
    max-width: none;
    font-size: 15px;
    line-height: 26px;
}
/* the watermark shield in the empty corner */
#wrapper .ds-sub .ds-sub-legal::after {
    content: '';
    position: absolute;
    left: 32px;
    bottom: 24px;
    width: 150px;
    height: 150px;
    background: #ebe8f3;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 2.5 4.5 5.3v5.7c0 4.9 3.2 9.3 7.5 10.5 4.3-1.2 7.5-5.6 7.5-10.5V5.3L12 2.5z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.8 12l2.2 2.2 4.4-4.4' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 2.5 4.5 5.3v5.7c0 4.9 3.2 9.3 7.5 10.5 4.3-1.2 7.5-5.6 7.5-10.5V5.3L12 2.5z' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.8 12l2.2 2.2 4.4-4.4' stroke='%23161616' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}
#wrapper .ds-sub .ds-sub-mails {
    font-weight: 500;
}

/* ---- tablet ---- */
@media (max-width: 1140px) {
    #wrapper .ds-sub .ds-sub-row {
        flex-direction: row;
        gap: 16px;
    }
    #wrapper .ds-sub .ds-sub-card {
        padding: 22px 20px;
    }
    #wrapper .ds-sub .ds-sub-card .ds-sub-h,
    #wrapper .ds-sub .ds-sub-plans > .ds-sub-h,
    #wrapper .ds-sub .ds-sub-legal > .ds-sub-h {
        font-size: 22px;
        line-height: 30px;
    }
    #wrapper .ds-sub .ds-sub-plans-row {
        gap: 14px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label {
        min-height: 150px;
        padding: 22px 18px 20px 62px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::before {
        left: 16px;
        width: 32px;
        height: 32px;
        margin-top: -16px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::after {
        left: 24px;
        width: 16px;
        height: 16px;
        margin-top: -8px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .month {
        font-size: 18px;
        line-height: 24px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .cost {
        font-size: 22px;
        line-height: 28px;
        gap: 8px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .cost::after {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
        background-size: 16px 16px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .desc {
        font-size: 13px;
        line-height: 20px;
    }
    #wrapper .ds-sub .ds-sub-pay {
        flex-direction: row;
        align-items: center;
    }
    #wrapper .ds-sub .ds-sub-logos {
        justify-content: flex-start;
        gap: 12px;
    }
    #wrapper .ds-sub .ds-sub-logos img {
        width: 110px;
        max-width: none;
        height: 60px;
        padding: 12px 14px;
    }
    #wrapper .ds-sub .ds-sub-legal {
        padding: 24px 20px 24px 120px;
    }
    #wrapper .ds-sub .ds-sub-legal::after {
        width: 90px;
        height: 90px;
        left: 16px;
    }
}
/* ---- phone ---- */
@media (max-width: 767px) {
    #wrapper .ds-sub .ds-sub-row {
        flex-direction: column;
    }
    #wrapper .ds-sub .ds-sub-plans-row {
        flex-direction: column;
        gap: 18px;
    }
    /* stacked, each tile is as tall as its own content (the 1 1 0 of
       the row layout collapsed them in a column) */
    #wrapper .ds-sub .ds-sub-plans-row div:has(> input[name="subscription_type"]) {
        flex: 0 0 auto;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label {
        min-height: 0;
        padding: 20px 20px 18px 66px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::before { left: 20px; }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::after { left: 28px; }
    #wrapper .ds-sub .ds-sub-plans-row div:has(> #sub_type_1)::before {
        left: 16px;
    }
    #wrapper .ds-sub .ds-sub-agree,
    #wrapper .ds-sub .ds-sub-btn {
        float: none;
    }
    #wrapper .ds-sub .ds-sub-agree {
        margin-bottom: 20px;
    }
    #wrapper .ds-sub .ds-sub-btn {
        width: 100%;
    }
    #wrapper .ds-sub .ds-sub-pay {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 18px;
    }
    #wrapper .ds-sub .ds-sub-logos img {
        width: calc((100% - 24px) / 3);
        height: 56px;
        padding: 10px 12px;
    }
    #wrapper .ds-sub .ds-sub-legal {
        padding: 22px 18px 110px;
    }
    #wrapper .ds-sub .ds-sub-legal::after {
        left: 50%;
        margin-left: -40px;
        bottom: 14px;
        width: 80px;
        height: 80px;
    }
    #wrapper .ds-sub .ds-sub-card .ds-sub-h,
    #wrapper .ds-sub .ds-sub-plans > .ds-sub-h,
    #wrapper .ds-sub .ds-sub-legal > .ds-sub-h {
        font-size: 20px !important;
        line-height: 28px;
    }
}

/* 14b the savings pill (subscriptions.tpl prints .saving when a plan is
   cheaper per month than the first one): bottom left of the tile. The
   radio moves up to the first line on every tile, so the three tiles
   read the same with or without the pill. */
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label {
    justify-content: flex-start;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::before {
    top: 40px;
    margin-top: 0;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::after {
    top: 50px;
    margin-top: 0;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .saving {
    position: absolute;
    left: 24px;
    bottom: 18px;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fde9ef;
    font-size: 14px;
    font-weight: 700;
    line-height: 32px;
    color: var(--ds-coral);
    white-space: nowrap;
}
#wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label:has(.saving) {
    padding-bottom: 64px;
}
@media (max-width: 1140px) {
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::before { top: 34px; margin-top: 0; }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::after  { top: 42px; margin-top: 0; }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .saving {
        left: 16px;
        bottom: 14px;
        height: 28px;
        padding: 0 12px;
        font-size: 13px;
        line-height: 28px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label:has(.saving) {
        padding-bottom: 54px;
    }
}
@media (max-width: 767px) {
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::before { top: 30px; }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::after  { top: 38px; }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .saving { left: 20px; }
}

/* 14c the two top cards centre their content; the legal card's
   watermark shield sits on the vertical middle of the card */
#wrapper .ds-sub .ds-sub-row .ds-sub-card {
    align-items: center;
}
#wrapper .ds-sub .ds-sub-row .ds-sub-card .ds-sub-h,
#wrapper .ds-sub .ds-sub-row .ds-sub-card .ds-sub-list,
#wrapper .ds-sub .ds-sub-row .ds-sub-card .ds-sub-note {
    width: auto;
    max-width: 100%;
}
#wrapper .ds-sub .ds-sub-row .ds-sub-card .ds-sub-h {
    margin-bottom: 18px;
}
#wrapper .ds-sub .ds-sub-legal::after {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}
@media (max-width: 767px) {
    #wrapper .ds-sub .ds-sub-legal::after {
        top: auto;
        bottom: 14px;
        transform: none;
    }
}

/* 14d tablet: three tiles are narrow, so the radio moves to the top
   corner (the period line is short) and the price line is a step
   smaller - the crown no longer runs into the radio */
@media (max-width: 1140px) and (min-width: 768px) {
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label {
        padding: 18px 16px 18px 56px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::before {
        top: 18px;
        left: 14px;
        width: 30px;
        height: 30px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label::after {
        top: 25px;
        left: 21px;
        width: 16px;
        height: 16px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .cost {
        font-size: 20px;
        line-height: 26px;
        letter-spacing: -0.4px;
        gap: 6px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label .cost::after {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
        background-size: 14px 14px;
    }
    #wrapper .ds-sub .ds-sub-plans-row input[name="subscription_type"] + label:has(.saving) {
        padding-bottom: 50px;
    }
}

/* 15 settings: the page's top and bottom air came from
   .profile_settings_page (40 / 56), which block 5 zeroed when the
   sections became cards - the wrapper carries it now, like every
   other page */
@media (min-width: 1141px) {
    #wrapper.ko_account_page.ds-settings {
        padding-top: 40px;
        padding-bottom: 40px;
    }
}
@media (max-width: 1140px) {
    #wrapper.ko_account_page.ds-settings {
        padding-top: 24px;
        padding-bottom: 40px;
    }
}

/* 16 phone: the action buttons (profile, edit profile, settings) are
   one card - a row of icons, no labels */
@media (max-width: 767px) {
    #wrapper.page-user.ds-profile .profile-buttons,
    #wrapper.ko_account_page.ds-settings .profile-buttons {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        gap: 0;
        padding: 10px 8px;
        border: 1px solid var(--ds-line) !important;
        border-radius: 16px;
        background: var(--ds-white);
        box-shadow: 0 2px 10px rgba(22,22,22,.04);
    }
    #wrapper.page-user.ds-profile .profile-buttons > .btn-block,
    #wrapper.page-user.ds-profile .profile-buttons > .btn-block:first-child,
    #wrapper.ko_account_page.ds-settings .profile-buttons > .btn-block,
    #wrapper.ko_account_page.ds-settings .profile-buttons > .btn-block + .btn-block {
        flex: 0 0 auto;
        width: auto;
        padding: 0 !important;
        border: none !important;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        gap: 0;
    }
    #wrapper.page-user.ds-profile .profile-buttons > .btn-block:hover,
    #wrapper.ko_account_page.ds-settings .profile-buttons > .btn-block:hover {
        transform: none;
        box-shadow: none;
    }
    #wrapper.page-user.ds-profile .profile-buttons .btn-block p,
    #wrapper.ko_account_page.ds-settings .left-column .btn-block p {
        display: none;
    }
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a,
    #wrapper.page-user.ds-profile .left-column .btn-block a.ko_btn_message,
    #wrapper.ko_account_page.ds-settings .left-column .btn-block a.ko_btn_message {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        border-radius: 14px !important;
    }
    /* the card-wide hit area is not needed when the icon is the card */
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a::after,
    #wrapper.ko_account_page.ds-settings .left-column .btn-block a.ko_btn_message::after {
        content: none;
    }
}

/* 17 tablet and phone: the likes / visitors list and the chat list
   sit inside one card; the rows keep their hairlines inside it */
@media (max-width: 1140px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        gap: 0;
        margin: 0;
        border: 1px solid var(--ds-line);
        border-radius: 16px;
        background: var(--ds-white);
        box-shadow: 0 2px 10px rgba(22,22,22,.04);
        overflow: hidden;
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li {
        border-radius: 0 !important;
        border: none !important;
        border-bottom: 1px solid var(--ds-line) !important;
        background: none;
        box-shadow: none;
    }
    /* two columns on the tablet: the right-hand row of each pair carries
       the divider between the two */
    #wrapper #grid_desktop.list-mobile ul.grid > li:nth-child(odd) {
        border-left: 1px solid var(--ds-line) !important;
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li:last-child,
    #wrapper #grid_desktop.list-mobile ul.grid > li:nth-last-child(2):nth-child(odd) {
        border-bottom: none !important;
    }

    #wrapper.message-wrapper .users-list {
        box-sizing: border-box;
        margin: 16px 32px 16px;
        border: 1px solid var(--ds-line);
        border-radius: 16px;
        background: var(--ds-white);
        box-shadow: 0 2px 10px rgba(22,22,22,.04);
        overflow: hidden;
    }
    #wrapper.message-wrapper .users-list-wrapper .single-user {
        padding-left: 20px;
        padding-right: 20px;
    }
    #wrapper.message-wrapper .users-list-wrapper .single-user:last-child {
        border-bottom: none;
    }
}
@media (max-width: 767px) {
    #wrapper #grid_desktop.list-mobile ul.grid > li:nth-child(odd) {
        border-left: none !important;
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li:nth-last-child(2):nth-child(odd) {
        border-bottom: 1px solid var(--ds-line) !important;
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li:last-child {
        border-bottom: none !important;
    }
    #wrapper.message-wrapper .users-list {
        margin: 12px 16px 12px;
    }
    #wrapper.message-wrapper .users-list-wrapper .single-user {
        padding-left: 16px;
        padding-right: 16px;
    }
}
@media (max-width: 599px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        margin: 0;
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li {
        padding: 16px 18px !important;
    }
}

/* 17b tablet: the likes / visitors list is one column of rows inside
   the card, like the phone - two columns read as cards in a card */
@media (max-width: 1140px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        grid-template-columns: minmax(0, 1fr);
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li,
    #wrapper #grid_desktop.list-mobile ul.grid > li:nth-child(odd) {
        border-left: none !important;
        border-bottom: 1px solid var(--ds-line) !important;
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li:last-child {
        border-bottom: none !important;
    }
}

/* 17c the online dot's pulse takes the dot's own colour: coral in the
   lists and cards, green on the profile name */
@keyframes ds-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(253, 46, 99, .4); }
    70%  { box-shadow: 0 0 0 6px rgba(253, 46, 99, 0); }
    100% { box-shadow: 0 0 0 0 rgba(253, 46, 99, 0); }
}
@keyframes ds-pulse-green {
    0%   { box-shadow: 0 0 0 0 rgba(46, 204, 113, .45); }
    70%  { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
#wrapper.page-user.ds-profile .ds-profile-name .online-sensor.online {
    animation-name: ds-pulse-green;
}

/* 17d tablet, as sketched: one big frame that fills the screen, and
   inside it the rows as small cards, two per line. The phone keeps
   the frame with plain rows. */
@media (max-width: 1140px) and (min-width: 768px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 16px;
        min-height: calc(100vh - 260px);
        align-content: start;
        overflow: visible;
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li,
    #wrapper #grid_desktop.list-mobile ul.grid > li:nth-child(odd),
    #wrapper #grid_desktop.list-mobile ul.grid > li:last-child {
        border: 1px solid var(--ds-line) !important;
        border-radius: 12px !important;
        background: var(--ds-white);
    }
}

/* 17e tablet: the frame runs to the bottom of the screen and scrolls
   inside itself; every inner card keeps all four borders */
@media (max-width: 1140px) and (min-width: 768px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        box-sizing: border-box;
        /* bar 75 + page top 28 + page bottom 24 + 25 of air under the frame */
        height: calc(100vh - 152px);
        height: calc(100dvh - 152px);
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    #wrapper #grid_desktop.list-mobile ul.grid > li:nth-last-child(2):nth-child(odd),
    #wrapper #grid_desktop.list-mobile ul.grid > li:last-child {
        border: 1px solid var(--ds-line) !important;
        border-bottom: 1px solid var(--ds-line) !important;
    }
}
@media (max-width: 1140px) and (min-width: 768px) {
    /* the page itself does not scroll under the frame: the frame does */
    #superwrapper > #wrapper:has(#grid_desktop.list-mobile) {
        padding-bottom: 24px !important;
    }
}
@media (max-width: 1140px) and (min-width: 768px) {
    /* serg_responsive.css:366 gives the column a 100vh - 104 floor, which
       is what pushed the page 23px past the frame */
    #wrapper:has(#grid_desktop.list-mobile) .full-column {
        min-height: 0;
    }
}

/* 18 profile action buttons: the mutual-like glyph keeps a 28px box
   with !important from the homepage fix, and its mask sat on the
   baseline - every action icon here is a 26px block in a 26px box */
#wrapper.page-user.ds-profile .profile-buttons .btn-block > a i.fa,
#wrapper.page-user.ds-profile .profile-buttons .btn-block > a i.fa-heart-double,
#wrapper.ko_account_page.ds-settings .left-column .btn-block a i.fa {
    display: block;
    width: 26px !important;
    height: 26px !important;
    font-size: 26px !important;
    line-height: 26px !important;
    margin: 0;
}
#wrapper.page-user.ds-profile .profile-buttons .btn-block > a i.fa:before,
#wrapper.page-user.ds-profile .profile-buttons .btn-block > a i.fa-heart-double:before,
#wrapper.ko_account_page.ds-settings .left-column .btn-block a i.fa:before {
    display: block;
    width: 26px;
    height: 26px;
    margin: 0;
    vertical-align: 0;
}
@media (max-width: 767px) {
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a i.fa,
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a i.fa-heart-double,
    #wrapper.ko_account_page.ds-settings .left-column .btn-block a i.fa {
        width: 24px !important;
        height: 24px !important;
        font-size: 24px !important;
        line-height: 24px !important;
    }
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a i.fa:before,
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a i.fa-heart-double:before,
    #wrapper.ko_account_page.ds-settings .left-column .btn-block a i.fa:before {
        width: 24px;
        height: 24px;
    }
}


/* ============================================================
   FIX 2026-11  -  doc "SeeYou - правки по вёрстке (ноябрь)"
   One sub-block per ТЗ item, numbered 19.1 .. 19.14 in the
   order of the doc. Later rules win over the blocks above, so
   nothing above was edited; the few places that had to change
   are overridden here, with a note on what they replace.
   ============================================================ */

:root {
    --ds-online:      #22c55e;   /* green  - online */
    --ds-away:        #f5b301;   /* yellow - everything else */
    --ds-page-bg:     #f4f3f8;   /* the ground every card sits on */
    --ds-card-shadow: 0 6px 24px rgba(22, 22, 22, .06);
}

/* ---- 19.1 status dots: green = online, yellow = everything else
   (desktop/guest 31-10_21-32). Every dot on the site - the cards,
   the profile name, the chat header and the chat list, the sidebar
   card of a test account. The dots that were hidden stay hidden. */
#wrapper .online-sensor,
#ko_fixed_cont .online-sensor,
#ko_mobile_header .online-sensor {
    background-color: var(--ds-away) !important;
    background-image: none !important;
}
#wrapper .online-sensor.online,
#ko_fixed_cont .online-sensor.online,
#ko_mobile_header .online-sensor.online {
    background-color: var(--ds-online) !important;
}
/* the pulse follows the colour (it was coral) */
@keyframes ds-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
    70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---- 19.2 the open lock: design-icons.css (t=7) redraws
   .fa-unlock / .dsi-lock with the shackle clearly off the body. */

/* ---- 19.3 the intro text: justified on every width, and on the
   phone it runs the full width of its frame (01-11_00-47, mobile
   01-11_01-59). Tablet and phone show it on page 1 of the homepage
   only: home.tpl adds .ds-paged from page 2 on (mobile 01-11_01-08). */
.logged-out #ko_fixed_cont .text-about p {
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    text-align: justify !important;
    text-align-last: right;
}
@media (max-width: 1140px) {
    .logged-out:has(#wrapper.home_page.ds-paged) #ko_fixed_cont {
        display: none !important;
    }
}

/* ---- 19.4 every modal: the primary button at the RIGHT (RTL),
   the secondary at the left (31-10_22-46). The custom modals print
   submit first already; bootbox prints cancel first, so `order`
   sorts both the same way. */
.modal .modal-footer .ko_btn_submit,
.modal .modal-footer .btn-primary,
.modal .modal-footer .btn-success,
.bootbox .modal-footer .ko_btn_submit,
.bootbox-confirm .modal-footer .ko_btn_submit,
.bootbox-confirm .modal-footer .btn-primary,
.bootbox-confirm .modal-footer .btn-success {
    order: -1;
    float: none !important;
}
.modal .modal-footer .ko_btn_cancel,
.modal .modal-footer .btn-default,
.bootbox-confirm .modal-footer .ko_btn_cancel,
.bootbox-confirm .modal-footer .btn-default {
    order: 1;
    float: none !important;
}

/* ---- 19.5 phone: the page arrows sit at the two edges of the
   bottom bar, not together (mobile 01-11_01-08). Replaces 13.1. */
@media (max-width: 767px) {
    #wrapper + .bottom-line .pagination {
        justify-content: space-between;
        gap: 0;
    }
}

/* ---- 19.6 the photo counter comes back on the phone and tablet
   cards (mobile 31-10_22-17); serg_responsive.css:777 hid it. */
@media (max-width: 1140px) {
    #wrapper #grid_desktop.grid-mobile .grid > li .avatar-link .images-counter,
    #grid_desktop.grid-mobile > ul > li > a.thumb-image .images-counter {
        display: inline-block !important;
    }
}

/* ---- 19.7 the article: the cover carries the article NAME, the
   H1 heading opens the text card (01-11_01-52). articles.php prints
   p.ds-article__title on the cover and h1.ds-article__h1 in the body. */
#wrapper .info-page-text .ds-article .ds-article__body .ds-article__h1 {
    display: block;
    margin: 0 0 18px !important;
    padding: 0;
    font-family: var(--ds-font);
    font-size: 28px !important;
    line-height: 36px !important;
    font-weight: 700;
    letter-spacing: -0.56px;
    color: var(--ds-dark) !important;
    text-align: right;
    white-space: normal;
}
@media (max-width: 1140px) {
    #wrapper .info-page-text .ds-article .ds-article__body .ds-article__h1 {
        font-size: 24px !important;
        line-height: 32px !important;
    }
}
@media (max-width: 767px) {
    #wrapper .info-page-text .ds-article .ds-article__body .ds-article__h1 {
        margin-bottom: 12px !important;
        font-size: 20px !important;
        line-height: 28px !important;
        letter-spacing: -0.4px;
    }
}

/* ---- 19.8 contact page: the space is filled (03-11_01-36, tablet
   01-11_01-54, mobile 01-11_01-56). information.php now returns, for
   every visitor, the member note (members only) plus two figures:
   the desktop sidebar picture and the phone menu picture. The page
   is a grid: title; the two contact cards on the right with the
   note card on the left; the "we answer soon" line; the two
   pictures as cards. The old per-breakpoint `content: url()` swap
   on .ds-contact-pic img is switched off - each figure has its own
   picture now. */
#wrapper .ds-contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}
#wrapper .ds-contact .ds-contact-h {
    grid-column: 1 / -1;
    margin: 0;
}
/* the two cards, side by side, in the right column */
#wrapper .ds-contact .ds-contact-row {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0;
    min-width: 0;
}
#wrapper .ds-contact .ds-contact-card {
    flex: 1 1 auto;
    min-height: 124px;
}
#wrapper .ds-contact .ds-contact-card + .ds-contact-card {
    margin-top: 0 !important;
}
/* the member note is a card in the left column; a guest has no note,
   so the two contact cards take the whole row */
#wrapper .ds-contact .ds-contact-note {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 28px 32px;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius);
    background: var(--ds-coral-bg);
}
#wrapper .ds-contact .ds-contact-note:not(:has(.ds-contact-note-text)) {
    display: none;
}
#wrapper .ds-contact:not(:has(.ds-contact-note .ds-contact-note-text)) .ds-contact-row {
    grid-column: 1 / -1;
}
@media (min-width: 1141px) {
    #wrapper .ds-contact:not(:has(.ds-contact-note .ds-contact-note-text)) .ds-contact-row {
        flex-direction: row;
    }
}
#wrapper .ds-contact .ds-contact-note-top {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 26px;
    color: var(--ds-purple);
}
#wrapper .ds-contact .ds-contact-note-text {
    font-size: 16px;
    line-height: 26px;
    color: var(--ds-dark);
}
#wrapper .ds-contact .ds-contact-note .ds-contact-fig {
    display: none;
}
/* "we answer as soon as we can": one line across the grid */
#wrapper .ds-contact .ds-contact-foot {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 16px 24px;
    border-radius: var(--ds-radius);
    background: #f6f3fb;
    font-size: 16px;
    line-height: 24px;
    color: var(--ds-dark);
}
#wrapper .ds-contact .ds-contact-foot::before {
    content: '';
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    background: var(--ds-gradient);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9.25' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M12 7.5V12l3 2' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9.25' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M12 7.5V12l3 2' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* the two pictures: the wrapper dissolves, each figure is a grid cell */
#wrapper .ds-contact .ds-contact-pic {
    display: contents;
    margin: 0;
}
#wrapper .ds-contact .ds-contact-pic > div,
#wrapper .ds-contact .ds-contact-pic > picture,
#wrapper .ds-contact .ds-contact-pic > img {
    display: none;
}
#wrapper .ds-contact .ds-contact-pic img,
#wrapper .ds-contact .ds-contact-fig img {
    content: normal;
    width: auto;
    max-width: 100%;
    margin: 0;
}
#wrapper .ds-contact .ds-contact-fig {
    grid-row: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    padding: 28px;
    min-height: 420px;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius);
    background: var(--ds-white);
    overflow: hidden;
}
#wrapper .ds-contact .ds-contact-fig--desktop { grid-column: 1; }
#wrapper .ds-contact .ds-contact-fig--mobile  { grid-column: 2; }
#wrapper .ds-contact .ds-contact-fig img {
    display: block;
    max-height: 560px;
    height: auto;
    border-radius: 16px;
}
@media (max-width: 1140px) {
    #wrapper .ds-contact {
        gap: 20px;
    }
    /* tablet: the cards side by side across the row, the note under them */
    #wrapper .ds-contact .ds-contact-row {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: row;
        display: flex !important;
    }
    #wrapper .ds-contact .ds-contact-card {
        flex: 1 1 0;
        min-width: 0;
        padding: 20px 24px;
    }
    #wrapper .ds-contact .ds-contact-note {
        grid-column: 1 / -1;
        grid-row: 3;
        padding: 22px 24px;
    }
    #wrapper .ds-contact .ds-contact-label {
        font-size: 18px;
    }
    #wrapper .ds-contact .ds-contact-value {
        font-size: 20px;
    }
    #wrapper .ds-contact .ds-contact-foot {
        grid-row: 4;
    }
    #wrapper .ds-contact .ds-contact-fig {
        grid-row: 5;
        min-height: 0;
        padding: 20px;
    }
    #wrapper .ds-contact .ds-contact-fig img {
        max-height: 520px;
    }
}
@media (max-width: 767px) {
    #wrapper .ds-contact {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    #wrapper .ds-contact .ds-contact-row {
        flex-direction: column;
        gap: 16px;
        display: flex !important;
    }
    #wrapper .ds-contact .ds-contact-row,
    #wrapper .ds-contact .ds-contact-note,
    #wrapper .ds-contact .ds-contact-foot,
    #wrapper .ds-contact .ds-contact-fig--desktop,
    #wrapper .ds-contact .ds-contact-fig--mobile {
        grid-column: 1;
    }
    #wrapper .ds-contact .ds-contact-note {
        padding: 18px 20px;
    }
    #wrapper .ds-contact .ds-contact-foot {
        padding: 14px 16px;
        font-size: 14px;
        line-height: 22px;
    }
    /* the phone shows the phone picture; the desktop one would only
       be a long scroll of a screen the phone never sees */
    #wrapper .ds-contact .ds-contact-fig--desktop {
        display: none;
    }
    #wrapper .ds-contact .ds-contact-fig {
        padding: 16px;
    }
    #wrapper .ds-contact .ds-contact-fig img {
        max-height: none;
        width: 100%;
        max-width: 320px;
    }
}

/* ---- 19.9 the profile on the phone (mobile 01-11_22-58 and
   01-11_01-31): no tint under the name - the name is its own card
   with the status dot at its left edge; the action row is a plain
   frame with no fill under the icons, the icons pulled towards the
   middle; a back arrow at the top left instead of the cross; a
   little room above the photo. Tablet (01-11_22-48) keeps its
   layout and gets the same back arrow. */
#wrapper.page-user.ds-profile {
    position: relative;
}
@media (max-width: 1140px) {
    #wrapper.page-user a.link-back {
        display: flex !important;
        position: absolute;
        top: 52px;
        left: 36px;
        z-index: 70;   /* above the strip's edge shadows (55) and arrows (60) */
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--ds-white);
        box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
        color: var(--ds-dark);
        text-decoration: none;
    }
    #wrapper.page-user a.link-back i.fa,
    #wrapper.page-user a.link-back i.fa:before {
        display: block;
        width: 22px;
        height: 22px;
        font-size: 22px;
        line-height: 22px;
        margin: 0;
    }
    /* the cross glyph becomes a long arrow pointing out of the screen */
    #wrapper.page-user a.link-back i.fa-times:before {
        background: var(--ds-gradient);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12H3.5'/%3E%3Cpath d='M10 5.5 3.5 12l6.5 6.5'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
                mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12H3.5'/%3E%3Cpath d='M10 5.5 3.5 12l6.5 6.5'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
    }
}
@media (max-width: 767px) {
    #wrapper.page-user a.link-back {
        top: 44px;
        left: 28px;
    }
    /* the hero loses its tint; the photo is one card, the name the next */
    #wrapper.page-user.ds-profile .ds-profile-hero,
    #wrapper.page-user.ds-profile.ds-gender-f .ds-profile-hero,
    #wrapper.page-user.ds-profile.ds-gender-m .ds-profile-hero,
    #wrapper.page-user.ds-profile.ds-gender-t .ds-profile-hero,
    #wrapper.page-user.ds-profile.ds-gender-x .ds-profile-hero {
        gap: 12px;
        margin-top: 8px;
        background: none;
        overflow: visible;
        border-radius: 0;
    }
    #wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-wrapper,
    #wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-placeholder {
        border-radius: 16px;
        box-shadow: 0 2px 10px rgba(22, 22, 22, .04);
    }
    #wrapper.page-user.ds-profile .ds-profile-name {
        padding: 14px 16px;
        border: 1px solid var(--ds-line);
        border-radius: 16px;
        background: var(--ds-white);
        box-shadow: 0 2px 10px rgba(22, 22, 22, .04);
    }
    /* the dot at the far left of the card */
    #wrapper.page-user.ds-profile .ds-profile-name .online-sensor {
        margin-right: auto;
    }
    /* the action row: icons gathered in the middle, no fill under them */
    #wrapper.page-user.ds-profile .profile-buttons,
    #wrapper.ko_account_page.ds-settings .profile-buttons {
        justify-content: center;
        gap: 28px;
        padding: 10px 16px;
    }
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a,
    #wrapper.page-user.ds-profile .left-column .btn-block a.ko_btn_message,
    #wrapper.ko_account_page.ds-settings .left-column .btn-block a.ko_btn_message {
        background: transparent !important;
        border: none;
    }
}

/* ---- 19.10 the grids read right to left on every device: the
   first card at the right (01-11_02-34 "ВСЮДУ"). The home grid, the
   likes / visitors grid, the list variant. */
#wrapper .grid#grid,
#wrapper ul.grid,
#wrapper #grid_desktop.grid-mobile .grid,
#wrapper #grid_desktop.list-mobile ul.grid {
    direction: rtl;
}

/* ---- 19.11 the chat (desktop 01-11_02-17, tablet 01-11_02-23) */
/* the "show another" buttons of the "don't know what to write?"
   card are round icon buttons with a change-arrows glyph */
#wrapper #conversation-helper button {
    width: 40px;
    height: 40px;
    min-width: 0;
    padding: 0;
    margin-top: 10px;
    border-radius: 50%;
    font-size: 0;
    line-height: 0;
    color: transparent;
    position: relative;
}
#wrapper #conversation-helper button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    background: var(--ds-gradient);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12c0 5.52-4.48 10-10 10-3.1 0-5.9-1.4-7.7-3.6'/%3E%3Cpath d='M2 12C2 6.48 6.48 2 12 2c3.1 0 5.9 1.4 7.7 3.6'/%3E%3Cpath d='M20 2v4h-4'/%3E%3Cpath d='M4 22v-4h4'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12c0 5.52-4.48 10-10 10-3.1 0-5.9-1.4-7.7-3.6'/%3E%3Cpath d='M2 12C2 6.48 6.48 2 12 2c3.1 0 5.9 1.4 7.7 3.6'/%3E%3Cpath d='M20 2v4h-4'/%3E%3Cpath d='M4 22v-4h4'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}
#wrapper #conversation-helper button[disabled]::before,
#wrapper #conversation-helper button:disabled::before {
    opacity: .5;
}
/* tablet and phone: the back chevron stands away from the "more" dots */
@media (max-width: 1140px) {
    #wrapper.message-wrapper .header .button-wrapper.hidden-desktop {
        margin-left: 20px;
    }
}

/* ---- 19.12 the sliders (01-11_23-38, mobile 01-11_23-46): every
   strip has a soft shadow at both edges and its arrows as close to
   the edges as they go; on another member's page the strip is as
   wide as on your own page (the name keeps a column at the right).
   Phone: the private badge sits above the dots, the active dot is
   coral. */
#wrapper.page-user .photo-gallery-wrapper {
    position: relative;
}
#wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::before,
#wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 110px;
    z-index: 55;
    pointer-events: none;
    border-radius: inherit;
}
#wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::before {
    left: 0;
    background: linear-gradient(90deg, rgba(22, 22, 22, .42) 0%, rgba(22, 22, 22, 0) 100%);
}
#wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::after {
    right: 0;
    background: linear-gradient(270deg, rgba(22, 22, 22, .42) 0%, rgba(22, 22, 22, 0) 100%);
}
#wrapper.page-user .photo-gallery-wrapper .bx-controls-direction a {
    width: 48px !important;
    height: 48px !important;
    margin-top: -24px !important;
    z-index: 60;
}
#wrapper.page-user .photo-gallery-wrapper .bx-controls-direction a::before {
    top: 15px;
}
#wrapper.page-user .photo-gallery-wrapper .bx-prev { left: 12px !important; }
#wrapper.page-user .photo-gallery-wrapper .bx-prev::before { left: 12px; }
#wrapper.page-user .photo-gallery-wrapper .bx-next { right: 12px !important; }
#wrapper.page-user .photo-gallery-wrapper .bx-next::before { right: 12px; }
/* another member's page: the strip takes the hero, the name a column */
@media (min-width: 768px) {
    #wrapper.page-user.ds-profile .ds-profile-hero .photo-gallery-wrapper {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
    }
    #wrapper.page-user.ds-profile .ds-profile-name {
        flex: 0 0 auto;
        min-width: 300px;
        max-width: 42%;
    }
}
@media (max-width: 1140px) and (min-width: 768px) {
    #wrapper.page-user.ds-profile .ds-profile-name {
        min-width: 220px;
    }
    #wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::before,
    #wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::after {
        width: 80px;
    }
}
@media (max-width: 767px) {
    #wrapper.page-user .photo-gallery-wrapper::before,
    #wrapper.page-user .photo-gallery-wrapper::after {
        display: none;
    }
    #wrapper.page-user .photo_gallery .private-toggle {
        bottom: 40px;
    }
    .bx-wrapper .bx-pager {
        display: block !important;
        bottom: 12px;
    }
    .bx-wrapper .bx-pager.bx-default-pager a {
        width: 8px;
        height: 8px;
        margin: 0 4px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .65) !important;
        box-shadow: 0 0 4px rgba(0, 0, 0, .25);
    }
    .bx-wrapper .bx-pager.bx-default-pager a.active,
    .bx-wrapper .bx-pager.bx-default-pager a:hover {
        background: var(--ds-coral) !important;
    }
}

/* ---- 19.13 the subscription page (01-11_02-54 + the texts):
   "important to know" gets a colon and two more lines from
   information.php; its icon is a calm check instead of the red
   alert; the "most popular" badge is the same pill as the savings
   pills and sits where they sit; the terms row is a card with the
   button at the right and the checkbox at the left (on the phone
   the button goes above the checkbox). */
#wrapper .ds-sub .ds-sub-info::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none'%3E%3Ccircle cx='14' cy='14' r='13' stroke='%238436ec' stroke-width='2'/%3E%3Cpath d='M8.5 14.5l3.6 3.5 7.4-7.5' stroke='%238436ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#wrapper .ds-sub .ds-sub-row .ds-sub-card .ds-sub-info + .ds-sub-info {
    margin-top: 10px;
}
#wrapper .ds-sub .ds-sub-plans-row div:has(> #sub_type_1)::before {
    top: auto;
    bottom: 18px;
    left: 24px;
    height: 32px;
    padding: 0 14px;
    background: #fde9ef;
    color: var(--ds-coral);
    font-size: 14px;
    font-weight: 700;
    line-height: 32px;
    box-shadow: none;
}
#wrapper .ds-sub .ds-sub-plans-row div:has(> #sub_type_1) > label {
    padding-bottom: 64px;
}
@media (max-width: 1140px) {
    #wrapper .ds-sub .ds-sub-plans-row div:has(> #sub_type_1)::before {
        left: 16px;
        bottom: 14px;
        height: 28px;
        padding: 0 12px;
        font-size: 13px;
        line-height: 28px;
    }
    #wrapper .ds-sub .ds-sub-plans-row div:has(> #sub_type_1) > label {
        padding-bottom: 54px;
    }
}
@media (max-width: 767px) {
    #wrapper .ds-sub .ds-sub-plans-row div:has(> #sub_type_1)::before {
        left: 20px;
    }
}
/* the terms row as a card */
#wrapper .ds-sub .ds-sub-terms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 24px;
    direction: rtl;
    box-sizing: border-box;
    margin: 32px 0 24px;
    padding: 20px 28px;
    border: 1px solid var(--ds-line);
    border-radius: 20px;
    background: var(--ds-white);
}
#wrapper .ds-sub .ds-sub-terms::after {
    content: none;
}
#wrapper .ds-sub .ds-sub-btn {
    order: 1;
    float: none;
    margin: 0;
}
#wrapper .ds-sub .ds-sub-agree {
    order: 2;
    float: none;
    margin: 0;
}
@media (max-width: 767px) {
    #wrapper .ds-sub .ds-sub-terms {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px;
    }
    #wrapper .ds-sub .ds-sub-btn {
        width: 100%;
    }
    #wrapper .ds-sub .ds-sub-agree {
        margin-bottom: 0;
    }
}

/* ---- 19.14 everything in cards (desktop 03-11_01-34, 03-11_01-35,
   mobile 03-11_01-34, "Общее"): the page is a soft grey ground and
   every block on it is a white card with the same shadow - the
   sidebar, the content column, the chat and its list, and on tablet
   and phone the top bar, the open menu and the fixed bottom bar. */

/* desktop */
@media (min-width: 1141px) {
    html, body, #superwrapper, main {
        background-color: var(--ds-page-bg) !important;
    }
    /* the sidebar card */
    #ko_fixed_cont .affix,
    .logged-out #ko_fixed_cont .affix {
        top: 16px !important;
        right: 16px !important;
        box-sizing: border-box;
        height: calc(100vh - 32px) !important;
        border-left: none !important;
        border-radius: 20px;
        background: var(--ds-white);
        box-shadow: var(--ds-card-shadow);
    }
    #sidebar-logo {
        padding-top: 32px;
    }
    #user-menu a.user_profile_link {
        margin: 28px 20px 22px;
    }
    /* the menu: each row is a bordered pill, the current one gradient */
    #user-menu .ffspan {
        margin: 0 20px 10px;
    }
    #user-menu .ffspan a {
        height: 48px;
        padding: 0 16px;
        border: 1px solid var(--ds-line);
        border-radius: 12px;
        background-color: var(--ds-white);
    }
    #user-menu .ffspan a:hover {
        background-color: var(--ds-coral-bg);
        border-color: transparent;
    }
    #user-menu .ffspan a.active {
        border-color: transparent;
    }
    /* the content column card (the chat page lays its own cards) */
    #superwrapper > #wrapper:not(.message-wrapper) {
        box-sizing: border-box;
        width: auto !important;
        min-height: calc(100vh - 32px);
        height: auto;
        margin: 16px 320px 16px 16px !important;
        padding: 32px 32px 40px !important;
        border-radius: 20px;
        background: var(--ds-white);
        box-shadow: var(--ds-card-shadow);
    }
    /* the chat: the conversation and the list are two cards */
    #superwrapper > #wrapper.message-wrapper {
        margin: 16px 320px 16px 16px !important;
        background: transparent;
    }
    #wrapper.message-wrapper .messages-wrapper {
        padding: 0 !important;
        gap: 24px;
        background: transparent;
    }
    #wrapper.message-wrapper .message-container,
    #wrapper.message-wrapper .users-list {
        border-radius: 20px;
        border-left: none !important;
        background: var(--ds-white);
        box-shadow: var(--ds-card-shadow);
    }
    #wrapper.message-wrapper .users-list {
        overflow: hidden;
    }
    #wrapper.message-wrapper .message-container > .header {
        border-radius: 20px 20px 0 0;
    }
}

/* tablet and phone */
@media (max-width: 1140px) {
    html, body, #superwrapper, main {
        background-color: var(--ds-page-bg) !important;
    }
    /* the top bar is a card */
    #ko_mobile_header {
        top: 12px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        border-radius: 16px;
        box-shadow: var(--ds-card-shadow) !important;
    }
    body {
        padding-top: 87px;
    }
    /* the open menu hangs under the bar as a card of its own */
    #ko_mobile_nav_links {
        top: calc(100% + 8px);
        border-radius: 16px;
        box-shadow: var(--ds-card-shadow);
        overflow: hidden;
    }
    #ko_mobile_nav_links ul > li:last-child {
        border-bottom: none;
    }
    /* the current section in the menu */
    #ko_mobile_nav_links ul > li > a.active {
        background: var(--ds-gradient);
        color: var(--ds-white) !important;
    }
    #ko_mobile_nav_links ul > li > a.active > i.fa:before {
        background-image: none;
        background-color: var(--ds-white);
    }
    /* the current section in the bar (tablet; the phone bar below) */
    #ko_mobile_header .ko_mob_icon > a.active {
        margin: -6px -10px;
        padding: 6px 10px;
        border-radius: 12px;
        background: var(--ds-coral-bg);
    }
    #ko_mobile_header .ko_mob_icon > a.active > span {
        font-weight: 700;
        color: var(--ds-coral);
    }
    /* the logged-in menu: the profile card on top of the list, both in
       the same card */
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont {
        top: 95px;
        left: 12px;
        right: 12px;
        border-radius: 16px 16px 0 0;
        box-shadow: var(--ds-card-shadow);
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_mobile_nav_links {
        top: calc(100% + 8px + 76px);
        border-radius: 0 0 16px 16px;
    }
    /* the content card */
    #superwrapper > #wrapper:not(.message-wrapper) {
        box-sizing: border-box;
        width: auto !important;
        margin: 12px !important;
        padding: 24px !important;
        border-radius: 16px;
        background: var(--ds-white);
        box-shadow: var(--ds-card-shadow);
    }
    /* the chat is one card */
    #superwrapper > #wrapper.message-wrapper {
        margin: 12px !important;
        border-radius: 16px;
        background: var(--ds-white);
        box-shadow: var(--ds-card-shadow);
        overflow: hidden;
    }
    /* main starts under the bar card (87); the chat card's own
       12px margins live inside main */
    :root {
        --ds-chat-offset: 87px;
    }
    /* the guest intro sits between the bar and the content card */
    .logged-out #ko_fixed_cont .text-about {
        margin: 12px 12px 0 !important;
    }
}
/* 17e sized the tablet likes frame for a page without the card margins */
@media (max-width: 1140px) and (min-width: 768px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        height: calc(100dvh - 200px);
    }
}
@media (max-width: 767px) {
    body {
        padding-top: 75px;
    }
    /* the phone bar: the current section */
    #ko_mobile_header .ko_mob_icon > a.active {
        margin: -4px -6px;
        padding: 4px 6px;
        border-radius: 10px;
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont {
        top: 83px;
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_mobile_nav_links {
        top: calc(100% + 8px + 72px);
    }
    /* the content card clears the fixed bottom bar */
    #superwrapper > #wrapper:not(.message-wrapper) {
        margin: 12px 12px 80px !important;
        padding: 16px 16px 24px !important;
    }
    /* the fixed bottom bar (logo, and the page arrows on the grid) */
    #ko_mobile_header .header-logo {
        left: 12px;
        right: 12px;
        bottom: 12px;
        border-radius: 16px;
        box-shadow: var(--ds-card-shadow);
    }
    #wrapper + .bottom-line {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    /* bar card 75 + bottom bar card 68; the chat card's margins
       live inside main */
    :root {
        --ds-chat-offset: 143px;
    }
    /* the article cover ran edge to edge of the old 24 gutter */
    #wrapper .info-page-text .ds-article .ds-article__hero {
        margin: 0 -16px !important;
        border-radius: 16px 16px 0 0;
    }
    .logged-out #ko_fixed_cont .text-about {
        margin: 12px 12px 0 !important;
        padding: 18px 16px 20px !important;
    }
}

/* ---- 19.15 phone: the three guest pills are the same size and sit
   in the middle of the screen (mobile 01-11_01-08). The bar's burger
   stays at the right, the pills are centred on the screen itself. */
@media (max-width: 1140px) {
    .logged-out #ko_mobile_header .ko_mobile_auth {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0 !important;
        gap: 10px;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr {
        width: 112px !important;
        min-width: 0;
        padding: 0 !important;
    }
}
@media (max-width: 767px) {
    .logged-out #ko_mobile_header .ko_mobile_auth {
        gap: 6px;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr {
        width: 80px !important;
        height: 36px;
        font-size: 13px;
    }
}

/* ---- 19.16 the shadow on every main card, on every screen (review
   06.11: the .06 shadow of 19.14 was too faint to read as the
   reference). One shadow for the big cards (sidebar, content, chat,
   bars), a smaller one for the cards inside them. */
:root {
    /* lilac-tinted, like the reference (a grey .10 did not read on
       the grey ground); the ground itself goes a touch cooler */
    --ds-card-shadow:    0 12px 36px rgba(118, 52, 220, .16);
    /* the cards INSIDE a card keep the quiet hairline shadow they had
       (review 06.11: the tinted one is for the outer cards only) */
    --ds-card-shadow-sm: 0 2px 10px rgba(22, 22, 22, .04);
    --ds-page-bg:        #f6f5fb;
}
html, body, #superwrapper, main {
    background-color: var(--ds-page-bg) !important;
}
/* only the OUTER cards carry the shadow (review 06.11); the cards
   inside them keep whatever they had */
/* the big ones keep the strong shadow */
#ko_fixed_cont .affix,
.logged-out #ko_fixed_cont .affix,
#superwrapper > #wrapper:not(.message-wrapper),
#superwrapper > #wrapper.message-wrapper,
#wrapper.message-wrapper .message-container,
#wrapper.message-wrapper .users-list,
#ko_mobile_header,
#ko_mobile_nav_links,
#ko_mobile_header .header-logo,
#wrapper + .bottom-line,
main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont {
    box-shadow: var(--ds-card-shadow) !important;
}
@media (max-width: 1140px) {
    #superwrapper > #wrapper.message-wrapper .message-container,
    #superwrapper > #wrapper.message-wrapper .users-list {
        box-shadow: none !important;
    }
}
@media (max-width: 767px) {
    #wrapper + .bottom-line {
        box-shadow: none !important;   /* it rides on the logo card */
    }
}

/* ---- 19.17 the "confirm your e-mail" strip is a card too: it ends
   before the sidebar card (which now sits 16 in from the window) and
   keeps the card margins on every width (review 06.11, it ran under
   the sidebar). */
@media (min-width: 1141px) {
    #email_approve_ticket {
        margin: 16px 320px 0 16px;   /* same box as the content card */
        border-radius: 16px;
        box-shadow: var(--ds-card-shadow);
    }
}
@media (max-width: 1140px) {
    #email_approve_ticket {
        margin: 12px 12px 0;
        border-radius: 12px;
        box-shadow: var(--ds-card-shadow);
    }
}

/* ---- 19.18 the profile as the doc shows it (01-11_22-47, tablet
   22-48, phone 22-58, slider 23-38), review 06.11:
   - every row of the info card: the label and the value at the right,
     the icon at the LEFT edge of the card;
   - every action card: the label at the right, the icon at the left
     edge (edit profile and settings alike);
   - the strip's arrows are plain white chevrons at the very edges on
     the dark edge shadows - no discs. */
#wrapper.page-user.ds-profile #data .data-title {
    justify-content: space-between;
}
#wrapper.page-user.ds-profile #data .data-title .ds-row-icon {
    order: 2;
    margin-right: auto;
}
#wrapper.page-user.ds-profile .profile-buttons > .btn-block,
#wrapper.page-user.ds-profile .profile-buttons > .btn-block:first-child,
#wrapper.ko_account_page .left-column .btn-block {
    justify-content: space-between;
}
#wrapper.page-user.ds-profile .profile-buttons .btn-block > a,
#wrapper.page-user.ds-profile .left-column .btn-block a.ko_btn_message,
#wrapper.ko_account_page .left-column .btn-block > a,
#wrapper.ko_account_page .left-column .btn-block a.ko_btn_message {
    order: 2;
}
#wrapper.page-user.ds-profile .profile-buttons .btn-block p,
#wrapper.ko_account_page .left-column .btn-block p {
    order: 1;
    text-align: right;
}
/* the strip: deeper edge shadows, chevrons instead of discs */
#wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::before,
#wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::after {
    width: 130px;
}
#wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::before {
    background: linear-gradient(90deg, rgba(22, 22, 22, .58) 0%, rgba(22, 22, 22, 0) 100%);
}
#wrapper.page-user .photo-gallery-wrapper:has(.bx-controls-direction)::after {
    background: linear-gradient(270deg, rgba(22, 22, 22, .58) 0%, rgba(22, 22, 22, 0) 100%);
}
#wrapper.page-user .photo-gallery-wrapper .bx-controls-direction a {
    width: 44px !important;
    height: 44px !important;
    margin-top: -22px !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: .95;
    transition: transform .2s ease, opacity .2s ease;
}
#wrapper.page-user .photo-gallery-wrapper .bx-controls-direction a:hover {
    opacity: 1;
    transform: scale(1.12);
}
#wrapper.page-user .photo-gallery-wrapper .bx-controls-direction a::before {
    top: 8px;
    width: 28px;
    height: 28px;
    background: var(--ds-white);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4.5 7.5 12l7.5 7.5'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4.5 7.5 12l7.5 7.5'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35));
}
#wrapper.page-user .photo-gallery-wrapper .bx-prev { left: 10px !important; }
#wrapper.page-user .photo-gallery-wrapper .bx-prev::before { left: 8px; }
#wrapper.page-user .photo-gallery-wrapper .bx-next { right: 10px !important; }
#wrapper.page-user .photo-gallery-wrapper .bx-next::before { right: 8px; transform: scaleX(-1); }

/* ---- 19.19 the sidebar rows: Hebrew has no ascenders, so a label
   that is centred by its box sits visibly low next to the icon. The
   row keeps 48, the label moves up 2.5, the icon and the counter stay
   put (review 06.11). */
@media (min-width: 1141px) {
    #user-menu .ffspan a {
        box-sizing: border-box;
        padding-bottom: 5px;
    }
    #user-menu .ffspan a em.fa,
    #user-menu .ffspan a i[data-counter] {
        margin-top: 5px;
    }
}

/* ---- 19.20 the open menu on tablet and phone: the profile card at
   its top has round corners too (the white link inside painted over
   the frame's corners), review 06.11 */
@media (max-width: 1140px) {
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont {
        overflow: hidden;
    }
    main.logged-in:has(#ko_mobile_nav_toggle:not(.collapsed)) #ko_fixed_cont #user-menu a.user_profile_link {
        border-radius: 16px 16px 0 0;
    }
}

/* ---- 19.21 the open menu on tablet and phone appears in one go:
   bootstrap's .collapsing slid the list down over .35s while the
   profile card above it popped in at once, which read as a flicker
   (review 06.11). */
@media (max-width: 1140px) {
    #ko_mobile_nav_links.collapsing {
        transition: none !important;
        height: auto !important;
        overflow: hidden;
    }
    #ko_mobile_nav_links.collapse.in,
    #ko_mobile_nav_links.collapse.show {
        height: auto !important;
    }
}

/* ---- 19.22 the sidebar rows as in 03-11_01-35: the icon pinned at
   the right edge, the counter at the left edge, the label centred in
   the room between them (review 06.11). Replaces the flex row of
   19.14 / 19.19. */
@media (min-width: 1141px) {
    #user-menu .ffspan a {
        position: relative;
        justify-content: center;
        padding: 0 56px 3px 48px;
        text-align: center;
    }
    #user-menu .ffspan a em.fa {
        position: absolute;
        right: 16px;
        top: 50%;
        margin: -12px 0 0;
    }
    #user-menu .ffspan a i[data-counter] {
        position: absolute;
        left: 16px;
        top: 50%;
        margin: -12px 0 0;
    }
}


/* ============================================================
   FIX 2026-11-07  -  doc "SeeYou - правки по вёрстке №2 (07.11)"
   Block 20, one sub-block per ТЗ item.
   ============================================================ */

/* ---- 20.1 every page is one screen tall: the content card fills
   the height between the bars and scrolls INSIDE itself (Общее,
   20-54, 21-44, 21-03, 23-00). <main> stops scrolling; the page
   becomes a flex column: e-mail strip, then #superwrapper with the
   guest intro (tablet/phone) and #wrapper. On the pages that print
   a .full-column, that column is the flex column and the card is
   #grid_desktop (grid pages) or the column itself (text pages); the
   pagination <nav> then sits under the card as a card of its own
   (21-44). Pages without .full-column (profile, edit profile) are the
   card themselves. The chat page keeps its own rules (4.x / 19.14). */
main {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: calc(100vh - var(--ds-chat-offset));
    height: calc(100dvh - var(--ds-chat-offset));
    overflow: hidden !important;
}
#superwrapper {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: auto !important;
}
#superwrapper > #wrapper:not(.message-wrapper) {
    flex: 1 1 auto;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto;
    overscroll-behavior: contain;
}
/* a page that is the card itself (profile, edit profile) is a flex
   column from block 4; with the card's height now fixed, its blocks
   must not shrink (the hero clips its overflow, so it would) */
#superwrapper > #wrapper:not(.message-wrapper):not(:has(> .full-column)) > * {
    flex-shrink: 0;
}
/* a page with a column: the wrapper is just the flex frame, the
   column and its card do the work */
#superwrapper > #wrapper:not(.message-wrapper):has(> .full-column) {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: visible;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
}
#superwrapper > #wrapper:not(.message-wrapper) > .full-column {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}
/* the card: the grid box on the grid pages, the column on the rest */
#superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)),
#superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop {
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 32px 32px 40px;
    border-radius: 20px;
    background: var(--ds-white);
    box-shadow: var(--ds-card-shadow);
}
#superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop {
    width: auto !important;
    margin: 0 !important;
}
/* the pagination: its own card under the grid */
#superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav {
    flex: 0 0 auto;
    margin: 0;
    padding: 12px;
    border-radius: 16px;
    background: var(--ds-white);
    box-shadow: var(--ds-card-shadow);
}
#superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination {
    margin: 0;
}
/* the likes / visitors list keeps its frame; the frame fills the card
   and scrolls inside (replaces the fixed height of 17e / 19.14) */
#wrapper #grid_desktop.list-mobile {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#wrapper #grid_desktop.list-mobile ul.grid#grid {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    overflow-y: auto;
    overscroll-behavior: contain;
}
/* the chat page already sizes itself; nothing above may touch it */
#superwrapper:has(> #wrapper.message-wrapper) {
    overflow: hidden;
}
@media (max-width: 1140px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column {
        gap: 12px;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)),
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop {
        padding: 24px;
        border-radius: 16px;
    }
    /* the guest intro shares the screen with the grid card: it keeps
       at most a third of it and scrolls inside */
    .logged-out #ko_fixed_cont {
        flex: 0 0 auto;
        min-height: 0;
    }
    .logged-out #ko_fixed_cont .text-about {
        max-height: 36dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}
@media (max-width: 767px) {
    #superwrapper > #wrapper:not(.message-wrapper) {
        margin: 12px !important;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)),
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop {
        padding: 16px 16px 24px;
    }
}

/* ---- 20.2 contacts (21-21, 21-32, 21-53, Общее "тексты съезжают"):
   one card layout on every width - the icon at the left edge, the
   label / value / note stacked at the right; the title centred; the
   "we answer soon" line in the intro pink; the two pictures are the
   cropped ones (Sidebar-crop.png / Menu-crop.png, information.php)
   and on the phone both show, full card width. */
#wrapper .ds-contact .ds-contact-h {
    text-align: center;
}
#wrapper .ds-contact .ds-contact-card {
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}
#wrapper .ds-contact .ds-contact-ic {
    order: 2;
}
#wrapper .ds-contact .ds-contact-body {
    order: 1;
    flex: 1 1 auto;
    text-align: right;
}
#wrapper .ds-contact .ds-contact-line {
    display: block;
}
#wrapper .ds-contact .ds-contact-label {
    display: block;
    font-size: 18px;
    line-height: 26px;
}
#wrapper .ds-contact .ds-contact-value {
    display: block;
    margin: 2px 0 0;
    padding: 0;
    border: 0;
    font-size: 20px;
    line-height: 28px;
}
#wrapper .ds-contact .ds-contact-sub {
    margin-top: 2px;
}
/* (the line keeps its lilac; it is the sidebar intro that takes
   this colour - 20.3) */
#wrapper .ds-contact .ds-contact-fig img {
    max-height: 520px;
}
@media (max-width: 767px) {
    #wrapper .ds-contact .ds-contact-fig--desktop {
        display: flex;
    }
    #wrapper .ds-contact .ds-contact-fig {
        padding: 12px;
    }
    #wrapper .ds-contact .ds-contact-fig img {
        width: 100%;
        max-width: none;
        max-height: none;
    }
}

/* ---- 20.3 guest sidebar (21-32): the intro takes the lilac of the
   contact page's "we answer soon" line and gets a frame; the three
   links are a card of their own, centred on its height */
.logged-out #ko_fixed_cont .text-about {
    background: #f6f3fb;
    border: 1px solid rgba(132, 54, 236, .22);
}
@media (min-width: 1141px) {
    .logged-out #ko_fixed_cont .additional-links {
        box-sizing: border-box;
        height: 56px;
        margin: 16px 20px 20px !important;
        padding: 0 12px !important;
        border: 1px solid var(--ds-line);
        border-radius: 12px;
        background: var(--ds-white);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .logged-out #ko_fixed_cont .additional-links::before {
        content: none !important;
        display: none !important;
    }
    .logged-out #ko_fixed_cont .text-about {
        margin-bottom: 0 !important;
    }
}

/* ---- 20.4 subscription (21-55, 21-59): the "important to know"
   rows share one width so the checks line up at the right like the
   green card; on the tablet the terms card stacks - button full
   width, the checkbox line centred under it */
#wrapper .ds-sub .ds-sub-row .ds-sub-card .ds-sub-info {
    width: 100%;
    max-width: 420px;
    justify-content: flex-start;
}
@media (max-width: 1140px) {
    #wrapper .ds-sub .ds-sub-terms {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    #wrapper .ds-sub .ds-sub-btn {
        width: 100%;
    }
    #wrapper .ds-sub .ds-sub-agree {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin: 0;
        text-align: center;
    }
}

/* ---- 20.5 tablet and phone bar (22-00): the current section is a
   gradient pill, like the desktop sidebar */
@media (max-width: 1140px) {
    #ko_mobile_header .ko_mob_icon > a.active {
        background: var(--ds-gradient);
        color: var(--ds-white) !important;
    }
    #ko_mobile_header .ko_mob_icon > a.active > i.fa:before {
        background-image: none;
        background-color: var(--ds-white);
    }
    #ko_mobile_header .ko_mob_icon > a.active > span {
        color: var(--ds-white);
    }
}

/* ---- 20.6 guest phone (21-03): the three pills keep clear of the
   burger on a narrow phone - centred in the room left of it */
@media (max-width: 420px) {
    .logged-out #ko_mobile_header .ko_mobile_auth {
        left: 12px;
        right: 62px;
        transform: translateY(-50%);
        justify-content: center;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr {
        width: 76px !important;
    }
}

/* ---- 20.7 likes / visitors rows on tablet and phone (23-00): the
   avatar back at the right, the name and the date at its left - the
   grid's rtl (19.10) had flipped the row */
@media (max-width: 1140px) {
    #wrapper #grid_desktop.list-mobile ul.grid > li {
        direction: ltr;
    }
}

/* ---- 20.8 modals (Общее, гость): no jump on open. Bootstrap shows
   the box (display:block, the dialog at the top) one frame before it
   adds .in, and only then the flex centring of the earlier blocks
   kicked in - so the box flashed at the top and dropped to the
   middle. The centring now applies from the first frame, and the
   dialog's slide-in is off; the fade stays. */
#ko_modal_signin.modal[style*="display: block"],
#ko_modal_signup.modal[style*="display: block"],
#ko_modal_new_signup.modal[style*="display: block"],
#ko_modal_forgot.modal[style*="display: block"],
#ko_modal_complain.modal[style*="display: block"],
#ko_modal_search.modal[style*="display: block"],
#ko_modal_endsignup.modal[style*="display: block"],
#ko_modal_byu_vip.modal[style*="display: block"],
#modal_avatar_mask.modal[style*="display: block"],
#info_box.modal[style*="display: block"],
.bootbox.modal[style*="display: block"],
.bootbox-alert.modal[style*="display: block"],
.bootbox-confirm.modal[style*="display: block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.modal.fade .modal-dialog {
    transform: none !important;
    -webkit-transform: none !important;
    transition: none !important;
}
.modal.fade {
    transition: opacity .15s linear;
}
body.modal-open {
    padding-right: 0 !important;
}

/* ---- 20.9 the column is only a frame: the legacy sheet paints it
   white, which showed as a band between the grid card and the
   pagination card (review 07.11) */
#superwrapper > #wrapper:not(.message-wrapper) > .full-column {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}
#superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)) {
    background: var(--ds-white) !important;
    box-shadow: var(--ds-card-shadow) !important;
}
@media (min-width: 1141px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)) {
        padding: 32px 32px 40px !important;
    }
}
@media (max-width: 1140px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)) {
        padding: 24px !important;
    }
}
@media (max-width: 767px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)) {
        padding: 16px 16px 24px !important;
    }
}

/* ---- 20.10 grid pages (review 07.11): the grid card is exactly one
   screen tall and scrolls inside; the pagination card sits UNDER it,
   below the fold - the page scrolls down to it. (20.1 had shared the
   screen between the two.) The e-mail strip, when it shows, takes its
   height off the card so the first screen still ends with the card.
   The strip wraps to 2-4 lines depending on the width, so header.tpl
   measures it and sets --ds-strip inline on <html> (review 07.11: the
   strip is back on likes/visitors); the values below are the fallback
   without JS. */
:root {
    --ds-strip: 0px;
}
main:has(> #superwrapper > #wrapper > .full-column > #grid_desktop) {
    overflow-y: auto !important;
    overscroll-behavior: contain;
}
main:has(> #superwrapper > #wrapper > .full-column > #grid_desktop) > #superwrapper,
#superwrapper > #wrapper:not(.message-wrapper):has(> .full-column > #grid_desktop),
#superwrapper > #wrapper:not(.message-wrapper) > .full-column:has(> #grid_desktop) {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
}
#superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop {
    flex: 0 0 auto;
    height: calc(100vh - 32px - var(--ds-strip));
    height: calc(100dvh - 32px - var(--ds-strip));
}
@media (min-width: 1141px) {
    :root:has(#email_approve_ticket) {
        --ds-strip: 94px;   /* the strip (two lines) + its 16px above */
    }
}
@media (max-width: 1140px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop {
        height: calc(100vh - 111px - var(--ds-strip));
        height: calc(100dvh - 111px - var(--ds-strip));   /* bar card 87 + 12 above + 12 below */
    }
    :root:has(#email_approve_ticket) {
        --ds-strip: 100px;
    }
}
@media (max-width: 767px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop {
        height: calc(100vh - 167px - var(--ds-strip));
        height: calc(100dvh - 167px - var(--ds-strip));   /* bar card 75 + bottom bar 68 + 12 + 12 */
    }
    :root:has(#email_approve_ticket) {
        --ds-strip: 120px;
    }
}

/* ---- 20.11 the guest intro scrolls with its bar at the RIGHT, like
   every other box (the box is rtl, which put the bar on the left):
   the box itself goes ltr, its text stays rtl */
.logged-out #ko_fixed_cont .text-about {
    direction: ltr;
}
.logged-out #ko_fixed_cont .text-about > * {
    direction: rtl;
}

/* ---- 20.12 contacts: the "we answer soon" line is centred, the icon
   stays with the text */
#wrapper .ds-contact .ds-contact-foot {
    justify-content: center;
    text-align: center;
}

/* ---- 20.13 tablet and phone: the intro sits straight on the page
   ground there, and its lilac is the ground's own tint - the two
   merged and only the border was left floating. As an outer card it
   is white with the lilac frame and the card shadow (desktop keeps
   the lilac fill inside the sidebar card). */
@media (max-width: 1140px) {
    .logged-out #ko_fixed_cont .text-about {
        background: var(--ds-white);
        box-shadow: var(--ds-card-shadow);
    }
}

/* ---- 20.14 tablet: the logo in the bar is just a logo - 19.16 gave
   .header-logo the card shadow for the phone, where it is the fixed
   bottom bar; on the tablet it sits inside the bar card */
@media (min-width: 768px) {
    #ko_mobile_header .header-logo {
        box-shadow: none !important;
    }
}

/* ---- 20.15 the open menu does not blink (review 07.11): bootstrap
   shows the list in its .collapsing state (fully visible since 19.21)
   and only then adds .in - where 8b's ds-fade-up started it again at
   opacity 0. The fade goes; the list stays as it appeared. */
#ko_mobile_nav_links.collapse.in,
#ko_mobile_nav_links.collapse.show {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* ---- 20.17 contacts on the phone: both pictures, one under the other
   (19.8 had put both figures into grid row 5, so they overlapped and
   only one showed) */
@media (max-width: 767px) {
    #wrapper .ds-contact .ds-contact-foot,
    #wrapper .ds-contact .ds-contact-fig--desktop,
    #wrapper .ds-contact .ds-contact-fig--mobile {
        grid-row: auto;
    }
    #wrapper .ds-contact .ds-contact-fig--desktop {
        display: flex !important;
    }
}

/* ---- 20.19 contacts: the clock icon at the right edge of the line,
   the text stays centred */
#wrapper .ds-contact .ds-contact-foot {
    position: relative;
    padding-left: 56px;
    padding-right: 56px;
}
#wrapper .ds-contact .ds-contact-foot::before {
    position: absolute;
    top: 50%;
    right: 24px;
    margin-top: -12px;
}
@media (max-width: 767px) {
    #wrapper .ds-contact .ds-contact-foot {
        padding-left: 44px;
        padding-right: 44px;
    }
    #wrapper .ds-contact .ds-contact-foot::before {
        right: 14px;
    }
}

/* ---- 20.20 desktop likes / visitors (review 07.11): the cards were
   stretched to the card's full height - 20.1 had turned the grid box
   into a flex column for the tablet/phone frame. On desktop the box
   is a plain block that scrolls; the rows keep their own height. */
@media (min-width: 1141px) {
    #wrapper #grid_desktop.list-mobile {
        display: block;
        overflow-y: auto;
    }
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        flex: none;
        height: auto !important;
        min-height: 0;
        overflow: visible;
        align-content: start;
    }
}

/* ---- 20.21 the menu closes in one go (review 07.11): bootstrap marks
   the burger .collapsed at the start of the close, which hid the
   profile card at once while the list lingered in .collapsing for
   350ms - now the list goes with it */
@media (max-width: 1140px) {
    main:has(#ko_mobile_nav_toggle.collapsed) #ko_mobile_nav_links.collapsing {
        display: none !important;
    }
}

/* ---- 20.22 tablet and phone chat list (review 07.11): a card inside
   the card, inset the same on both sides. The list kept the desktop
   width rules (516px / min 340), so it ran past the right edge of the
   outer card and the outer card's overflow clipped the inset away. */
@media (max-width: 1140px) {
    /* the chat wrapper itself was still 100% wide + its 12px margins,
       so it ran 24px past the right edge of the screen */
    #superwrapper > #wrapper.message-wrapper {
        width: auto !important;
        box-sizing: border-box;
    }
    #superwrapper > #wrapper.message-wrapper .users-list {
        flex: 1 1 auto;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        box-sizing: border-box;
        align-self: stretch;
        margin: 16px !important;
    }
}
@media (max-width: 767px) {
    #superwrapper > #wrapper.message-wrapper .users-list {
        margin: 12px !important;
    }
}

/* ---- 20.23 tablet and phone likes / visitors (review 07.11): the
   frame fills the card and scrolls, but its rows keep their height -
   the grid was spreading them over the frame's full height */
@media (max-width: 1140px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        align-content: start;
        grid-auto-rows: max-content;
    }
}

/* ---- 20.24 tablet and phone: the guest intro lives inside the grid
   card, above the cards (home.tpl moves it there); from page 2 on it
   is gone, and the empty sidebar block it came from takes no room */
@media (max-width: 1140px) {
    .logged-out #ko_fixed_cont .text-about.ds-intro-inline {
        max-height: none;
        overflow: visible;
        margin: 0 0 24px !important;
        box-shadow: none;
        background: #f6f3fb;
    }
    #grid_desktop > .text-about.ds-intro-inline {
        box-sizing: border-box;
        margin: 0 0 24px !important;
        padding: 20px 20px 22px !important;
        border: 1px solid rgba(132, 54, 236, .22);
        border-radius: 16px;
        background: #f6f3fb;
        direction: ltr;
    }
    #grid_desktop > .text-about.ds-intro-inline > * {
        direction: rtl;
    }
    #grid_desktop > .text-about.ds-intro-inline h3,
    #grid_desktop > .text-about.ds-intro-inline h3:empty {
        display: block;
        margin: 0 0 12px;
        font-size: 20px;
        font-weight: 700;
        line-height: 26px;
        color: var(--ds-purple);
        text-align: right;
    }
    #grid_desktop > .text-about.ds-intro-inline h3:empty::before {
        content: "ברוכים הבאים";
    }
    #grid_desktop > .text-about.ds-intro-inline p {
        font-size: 14px;
        line-height: 1.5;
        color: var(--ds-dark);
        text-align: justify;
        text-align-last: right;
        margin: 0;
    }
    #grid_desktop > .text-about.ds-intro-inline p + p {
        margin-top: 14px;
    }
    #wrapper.ds-paged #grid_desktop > .text-about.ds-intro-inline {
        display: none;
    }
    .logged-out #ko_fixed_cont:not(:has(.text-about)) {
        display: none !important;
    }
}
@media (max-width: 767px) {
    #grid_desktop > .text-about.ds-intro-inline {
        margin-bottom: 16px !important;
        padding: 18px 16px 20px !important;
    }
}

/* ---- 20.25 tablet and phone likes / visitors (review 07.11): the
   inner frame sits in the card with the same inset as the chat list
   (20.22): 16px on a tablet, 12px on a phone - it had 24 / 16. */
@media (max-width: 1140px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop.list-mobile {
        padding: 16px !important;
    }
}
@media (max-width: 767px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop.list-mobile {
        padding: 12px !important;
    }
}

/* ---- 20.26 desktop and tablet pagination (review 07.11): the two
   arrows float at the bottom corners of the grid card, over the
   cards, with the card shadow - the separate pagination card under
   the fold is gone. The templates now print the link classes
   (next-page = the left arrow, prev-page = the right one), so each
   arrow keeps its corner when it is the only one (review 07.11: no
   extra band under the last row - the arrows simply float over it).
   On a phone the fixed bottom bar carries the arrows (base rules), so
   the in-flow pagination goes. */
@media (min-width: 768px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:has(> #grid_desktop) {
        position: relative;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 5;
        flex: none;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0;
        pointer-events: none;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination {
        position: relative;
        display: block;
        height: 0;
        margin: 0 !important;
        padding: 0;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li {
        position: absolute;
        bottom: 24px;
        pointer-events: auto;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li.next-page,
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li:not(.prev-page):first-child {
        left: 24px;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li.prev-page {
        right: 24px;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li > a {
        background: var(--ds-white);
        box-shadow: var(--ds-card-shadow);
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li > a:hover {
        background: #f6f6f6;
    }
}
@media (max-width: 1140px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li {
        bottom: 16px;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li.next-page,
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li:not(.prev-page):first-child {
        left: 16px;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li.prev-page {
        right: 16px;
    }
}
@media (max-width: 767px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav {
        display: none !important;
    }
}
/* the likes / visitors list on a tablet keeps its inner frame (inset
   16): the arrows sit inside that frame's corners, not on its border */
@media (min-width: 768px) and (max-width: 1140px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:has(> #grid_desktop.list-mobile) > nav .pagination > li {
        bottom: 32px;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:has(> #grid_desktop.list-mobile) > nav .pagination > li.next-page,
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:has(> #grid_desktop.list-mobile) > nav .pagination > li:not(.prev-page):first-child {
        left: 32px;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:has(> #grid_desktop.list-mobile) > nav .pagination > li.prev-page {
        right: 32px;
    }
}

/* ---- 20.27 edit-profile gallery (review 08.11):
   - your own private photos are not blurred on the edit page - the
     lock badge alone marks them (the blur stays on the public profile);
   - the edge shadows show only while there is somewhere to scroll:
     bxSlider marks both arrows .disabled when every photo already
     fits the strip, and the arrows are hidden with them. */
#wrapper.page-user.page-user-account .photo_gallery .gallery-item:has(.private-toggle) img {
    filter: none !important;
    -webkit-filter: none !important;
    transform: none;
}
#wrapper.page-user .photo-gallery-wrapper:not(:has(.bx-controls-direction a:not(.disabled)))::before,
#wrapper.page-user .photo-gallery-wrapper:not(:has(.bx-controls-direction a:not(.disabled)))::after {
    content: none !important;
    display: none !important;
}
#wrapper.page-user .photo-gallery-wrapper .bx-controls-direction a.disabled {
    display: none !important;
}

/* ---- 20.28 contacts on the phone (review 08.11): the note card holds
   text only - 20.17 forced the desktop picture on with !important and
   that copy of it inside the note came back. Member and guest alike. */
#wrapper .ds-contact .ds-contact-note .ds-contact-fig,
#wrapper .ds-contact .ds-contact-note .ds-contact-fig--desktop,
#wrapper .ds-contact .ds-contact-note .ds-contact-fig--mobile {
    display: none !important;
}

/* ---- 20.29 phone gallery pager (review 08.11): story-style bars
   instead of dots - equal segments across the photo, 4px tall, the
   current one white, the rest translucent. bxSlider prints the pager
   as .bx-pager > .bx-pager-item > a; the only slider with a pager is
   the profile gallery (own page, another member's page, edit page). */
@media (max-width: 767px) {
    .bx-wrapper .bx-pager,
    .bx-wrapper .bx-pager.bx-default-pager {
        display: flex !important;
        align-items: center;
        gap: 8px;
        box-sizing: border-box;
        left: 0;
        right: 0;
        bottom: 16px;
        width: auto;
        padding: 0 20px;
        font-size: 0;
        line-height: 0;
    }
    .bx-wrapper .bx-pager .bx-pager-item {
        display: block;
        flex: 1 1 0;
        min-width: 0;
        margin: 0;
        padding: 0;
    }
    .bx-wrapper .bx-pager.bx-default-pager a {
        display: block;
        width: 100%;
        height: 4px;
        margin: 0;
        border-radius: 2px;
        background: rgba(255, 255, 255, .45) !important;
        box-shadow: 0 0 3px rgba(0, 0, 0, .25);
        transition: background-color .2s ease;
    }
    .bx-wrapper .bx-pager.bx-default-pager a.active,
    .bx-wrapper .bx-pager.bx-default-pager a:hover {
        background: var(--ds-white) !important;
    }
    /* the private badge keeps clear of the bars */
    #wrapper.page-user .photo_gallery .private-toggle {
        bottom: 36px;
    }
}

/* ---- 20.30 page arrows in the brand gradient (review 08.11): the
   floating buttons on desktop / tablet and the bottom-bar buttons on
   the phone are filled with the gradient, the arrow is white - home,
   likes and visitors alike (one markup, one rule). */
@media (min-width: 768px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li > a,
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li > a:hover {
        background: var(--ds-gradient) !important;
        color: var(--ds-white);
        box-shadow: 0 8px 24px rgba(132, 54, 236, .35);
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li > a:hover {
        filter: brightness(1.08);
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > nav .pagination > li > a > i.fa {
        color: var(--ds-white);
    }
}
@media (max-width: 767px) {
    #wrapper + .bottom-line .pagination > li > a {
        background: var(--ds-gradient) !important;
        box-shadow: 0 6px 16px rgba(132, 54, 236, .3);
    }
    #wrapper + .bottom-line .pagination > li > a::before {
        background: var(--ds-white);
    }
}

/* ---- 20.31 modals (review 08.11, phone screenshots):
   - one close button everywhere: the 36px white disc with the large
     cross, always at the LEFT of the header (the auth modals printed
     the button first in an rtl row, which put it at the right);
   - the auth modals' labels take the search modal's size (14/18 -
     they were 12 and read tiny on a phone);
   - the "reset password" result is a message modal like the others:
     body text + a close button (footer.tpl prints it that way now),
     the legacy dashed .border box is restyled for any cached copy;
   - #ko_modal_info (settings / profile notice) joins the same look. */
#ko_modal_signin .modal-header,
#ko_modal_signup .modal-header,
#ko_modal_new_signup .modal-header,
#ko_modal_forgot .modal-header,
#ko_modal_info .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    flex-direction: row-reverse;
    min-height: 60px;
    padding: 12px 16px;
    border-bottom: none !important;
    background: var(--ds-coral-bg) !important;
}
#ko_modal_info .modal-header .modal-title {
    font-family: var(--ds-font);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--ds-coral) !important;
    margin: 0;
    padding: 0 4px;
    text-align: right;
}
#ko_modal_signin .modal-header .close,
#ko_modal_signup .modal-header .close,
#ko_modal_new_signup .modal-header .close,
#ko_modal_forgot .modal-header .close,
#ko_modal_info .modal-header .close {
    float: none !important;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 !important;
    border: none;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-white) !important;
    color: var(--ds-coral) !important;
    opacity: 1 !important;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
}
#ko_modal_info .modal-content {
    border: none;
    border-radius: var(--ds-radius);
    overflow: hidden;
    font-family: var(--ds-font);
    box-shadow: 0 22px 50px rgba(18, 20, 28, .12);
}
#ko_modal_info .modal-body {
    padding: 24px;
    direction: rtl;
    text-align: right;
    font-size: 16px;
    line-height: 1.4;
    color: var(--ds-dark);
}
/* labels as in the search modal */
#ko_modal_signin .form-group label,
#ko_modal_signup .form-group label,
#ko_modal_new_signup .form-group label,
#ko_modal_new_signup .modal-body > label,
#ko_modal_forgot .form-group label {
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
}
/* the reset-password result */
#ko_modal_forgot .ds-forgot-result,
#ko_modal_forgot .border {
    margin: 0;
    padding: 24px;
    border: none !important;
    border-radius: 0;
    background: var(--ds-white);
    direction: rtl;
    text-align: right;
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 1.4;
    color: var(--ds-dark);
}
#ko_modal_forgot .ds-forgot-result + .modal-footer {
    justify-content: flex-start;
}
/* one photo = nothing to page: no bar at all (20.29 follow-up) */
.bx-wrapper .bx-pager:not(:has(.bx-pager-item:nth-child(2))) {
    display: none !important;
}
/* the "simple, fast and free" line under the signup header: 14 like
   the labels, a little more air above it (review 08.11) */
#ko_modal_new_signup .control-label.ds-intro {
    margin: 16px 0 0;
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
}

/* ---- 20.32 phone: every input / select / textarea reads at 14px
   (review 08.11): the edit-profile form, the settings forms and the
   modals (sign in / up, reset password, search, report). Desktop and
   tablet keep 16. */
@media (max-width: 767px) {
    #wrapper.page-user-account form.ko_form_profile .form-control,
    #wrapper.page-user-account form.ko_form_profile select.form-control,
    #wrapper.page-user-account form.ko_form_profile textarea.form-control,
    #wrapper.ko_account_page .form-group .form-control,
    #wrapper.ko_account_page .form-group select.form-control,
    #ko_modal_signin .form-control,
    #ko_modal_signup .form-control,
    #ko_modal_new_signup .form-control,
    #ko_modal_forgot .form-control,
    #ko_modal_search select.form-control,
    #ko_modal_search .form-control,
    #ko_modal_complain select.form-control {
        font-size: 14px !important;
    }
    #wrapper.page-user-account form.ko_form_profile .form-control::placeholder,
    #wrapper.ko_account_page .form-group .form-control::placeholder,
    #ko_modal_signin .form-control::placeholder,
    #ko_modal_new_signup .form-control::placeholder,
    #ko_modal_forgot .form-control::placeholder {
        font-size: 14px;
    }
}
/* edit-profile labels: 14/18 like every other form label (they were
   12 - review 08.11) */
#wrapper.page-user-account form.ko_form_profile label {
    font-size: 14px !important;
    line-height: 18px;
    margin: 0 0 6px;
}

/* ============================================================
   FIX 2026-11-10  -  review 10.11 (phone)
   Block 21.
   ============================================================ */

/* ---- 21.1 phone home cards: radius 20, 10 between the cards */
@media (max-width: 767px) {
    #wrapper .grid#grid,
    #wrapper ul.grid {
        gap: 10px;
    }
    #wrapper #grid_desktop.grid-mobile .grid > li,
    #wrapper #grid_desktop.grid-mobile .grid > li.news-box {
        border-radius: 20px;
    }
    #wrapper #grid_desktop.grid-mobile .grid > li .avatar-link,
    #wrapper #grid_desktop.grid-mobile .grid > li .avatar-link > img {
        border-radius: 20px 20px 0 0;
    }
}

/* ---- 21.2 the typeface: Open Sans (Google Fonts, Hebrew subset
   included) everywhere - header.tpl loads it; Satoshi stays as the
   fallback until the file arrives */
:root {
    --ds-font: 'Open Sans', 'Open Sans Hebrew', 'Satoshi', -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ---- 21.3 phone bar, member (reference 10.11): thin dividers
   between the sections, the current one a gradient tile, bigger
   icons and counters */
@media (max-width: 767px) {
    #ko_mobile_header .ko_mob_icon > a {
        gap: 4px;
        padding: 4px 6px;
    }
    #ko_mobile_header .ko_mob_icon > a > i.fa {
        width: 26px;
        height: 26px;
        font-size: 26px;
    }
    #ko_mobile_header .ko_mob_icon > a > span {
        font-size: 12px;
    }
    #ko_mobile_header .ko_mob_icon > a.active {
        margin: 0;
        padding: 4px 6px;
        border-radius: 12px;
    }
    #ko_mobile_header .ko_mob_icon > i[data-counter] {
        top: -4px;
        left: calc(50% + 4px);
        width: 18px;
        height: 18px;
        border-radius: 9px;
        font-size: 11px;
        line-height: 18px;
        box-shadow: 0 0 0 2px var(--ds-white);
        z-index: 2;
    }
    /* the dividers: one at the left edge of every section but the
       leftmost (visitors) */
    #ko_mobile_header .ko_mob_icon:not(.mobile_action_visitors)::after {
        content: '';
        position: absolute;
        left: -4px;
        top: 50%;
        width: 1px;
        height: 40px;
        transform: translateY(-50%);
        background: #ececf1;
        pointer-events: none;
    }
}

/* ---- 21.4 phone bar, guest (reference 10.11): three outlined
   pills with an icon each - sign up tinted pink, sign in and search
   white; equal widths across the room left of the burger */
@media (max-width: 767px) {
    .logged-out #ko_mobile_header .ko_mobile_auth {
        left: 12px;
        right: 60px;
        transform: translateY(-50%);
        justify-content: stretch;
        gap: 6px;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr,
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"] {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0;
        height: 40px;
        gap: 5px;
        padding: 0 6px !important;
        border: 1px solid rgba(132, 54, 236, .45) !important;
        background: var(--ds-white) !important;
        color: var(--ds-purple) !important;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        background: var(--ds-coral-bg) !important;
        border-color: rgba(253, 46, 99, .35) !important;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr::before {
        content: '';
        flex: 0 0 auto;
        width: 18px;
        height: 18px;
        background-color: currentColor;
        -webkit-mask-repeat: no-repeat;
                mask-repeat: no-repeat;
        -webkit-mask-position: center;
                mask-position: center;
        -webkit-mask-size: contain;
                mask-size: contain;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"]::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-576,-120)'%3E %3Cpath d='M588.16 130.87C588.06 130.86 587.94 130.86 587.83 130.87C585.45 130.79 583.56 128.84 583.56 126.44C583.56 123.99 585.54 122 588 122C590.45 122 592.44 123.99 592.44 126.44C592.43 128.84 590.54 130.79 588.16 130.87Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M583.16 134.56C580.74 136.18 580.74 138.82 583.16 140.43C585.91 142.27 590.42 142.27 593.17 140.43C595.59 138.81 595.59 136.17 593.17 134.56C590.43 132.73 585.92 132.73 583.16 134.56Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-576,-120)'%3E %3Cpath d='M588.16 130.87C588.06 130.86 587.94 130.86 587.83 130.87C585.45 130.79 583.56 128.84 583.56 126.44C583.56 123.99 585.54 122 588 122C590.45 122 592.44 123.99 592.44 126.44C592.43 128.84 590.54 130.79 588.16 130.87Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M583.16 134.56C580.74 136.18 580.74 138.82 583.16 140.43C585.91 142.27 590.42 142.27 593.17 140.43C595.59 138.81 595.59 136.17 593.17 134.56C590.43 132.73 585.92 132.73 583.16 134.56Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"]::before,
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"]::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='8' r='4'/%3E%3Cpath d='M3.5 20c0-3.6 2.9-6 6.5-6 1.3 0 2.5.3 3.5.8'/%3E%3Cpath d='M18 14.5v6M15 17.5h6'/%3E%3C/svg%3E");
                mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='8' r='4'/%3E%3Cpath d='M3.5 20c0-3.6 2.9-6 6.5-6 1.3 0 2.5.3 3.5.8'/%3E%3Cpath d='M18 14.5v6M15 17.5h6'/%3E%3C/svg%3E");
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_search"]::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-96,-72)'%3E %3Cpath d='M107.5 93C112.75 93 117 88.75 117 83.5C117 78.25 112.75 74 107.5 74C102.25 74 98 78.25 98 83.5C98 88.75 102.25 93 107.5 93Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M118 94L116 92' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E %3Cg transform='translate(-96,-72)'%3E %3Cpath d='M107.5 93C112.75 93 117 88.75 117 83.5C117 78.25 112.75 74 107.5 74C102.25 74 98 78.25 98 83.5C98 88.75 102.25 93 107.5 93Z' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3Cpath d='M118 94L116 92' stroke='%23161616' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E");
    }
}
/* 21.4 follow-up (review 10.11): the pills have a light grey edge and
   the label and the icon are painted with the gradient (the label is
   in a <span> now - column_left.tpl) */
@media (max-width: 767px) {
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr,
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"] {
        border-color: #e4e2ea !important;
        color: var(--ds-purple) !important;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        border-color: #f0d9e2 !important;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr::before {
        background-color: transparent;
        background-image: var(--ds-gradient);
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr > span {
        background: var(--ds-gradient);
        -webkit-background-clip: text;
                background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
}
/* 21.3 follow-up (review 10.11): five equal cells between the edge
   and the burger, dividers exactly on the cell borders, every section
   a 56x56 square in the middle of its cell - the current one gets the
   gradient. Fits 360 and 390. */
@media (max-width: 767px) {
    main.logged-in #ko_mobile_header {
        padding: 0 12px;
        column-gap: 6px;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 56px;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon > a,
    main.logged-in #ko_mobile_header .ko_mob_icon > a.active {
        box-sizing: border-box;
        width: 56px;
        height: 56px;
        margin: 0;
        padding: 0;
        justify-content: center;
        gap: 3px;
        border-radius: 14px;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon > a > i.fa {
        width: 24px;
        height: 24px;
        font-size: 24px;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon > a > span {
        font-size: 11px;
        line-height: 1.1;
        max-width: 54px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon > i[data-counter] {
        top: 1px;
        left: calc(50% + 6px);
    }
    main.logged-in #ko_mobile_header .ko_mob_icon:not(.mobile_action_visitors)::after {
        left: -3px;
        height: 36px;
    }
    main.logged-in #ko_mobile_header #ko_mobile_nav_toggle {
        flex: 0 0 auto;
        margin: 0 0 0 4px !important;
    }
}
@media (max-width: 374px) {
    main.logged-in #ko_mobile_header .ko_mob_icon > a,
    main.logged-in #ko_mobile_header .ko_mob_icon > a.active {
        width: 52px;
        height: 52px;
        border-radius: 13px;
    }
}
/* 21.4 follow-up (review 10.11): the sign-up pill is not filled - it
   is pressed in: white with a soft tinted inner shadow */
@media (max-width: 767px) {
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        /* no fill: white like the other two, the state is the shadow -
           a soft inner one plus a faint outer one (review 10.11) */
        /* the shade sits at the bottom only and fades out very softly:
           a white-to-lilac gradient plus a bottom-only inset shadow */
        background: linear-gradient(180deg, var(--ds-white) 55%, #faf5f9 100%) !important;
        border-color: #e9e2ea !important;
        box-shadow: inset 0 -10px 12px -10px rgba(132, 54, 236, .12) !important;   /* the base pill rule pins none !important */
    }
}

/* ---- 21.5 guest phone bar, third take (reference 21:12): one
   outlined pill holds the three actions - sign up as a gradient pill
   at the right, sign in and search as plain purple labels with a thin
   divider between them; no icons, no shading. */
@media (max-width: 767px) {
    .logged-out #ko_mobile_header .ko_mobile_auth {
        box-sizing: border-box;
        height: 44px;
        padding: 3px;
        gap: 0;
        border: 1px solid #e4e2ea;
        border-radius: var(--ds-radius-pill);
        background: var(--ds-white);
        justify-content: space-between;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr,
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        flex: 1 1 0 !important;
        height: 36px;
        padding: 0 10px !important;
        border: none !important;
        border-radius: var(--ds-radius-pill) !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--ds-purple) !important;
        font-size: 14px;
        font-weight: 500;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr::before {
        content: none;
    }
    /* sign in / search: the label in the brand gradient (review 10.11) */
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr > span {
        background: var(--ds-gradient);
        -webkit-background-clip: text;
                background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
    /* sign up stays white on the gradient pill */
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"] > span,
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] > span {
        background: none;
        color: var(--ds-white);
        -webkit-text-fill-color: var(--ds-white);
    }
    /* sign up: the gradient pill */
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        flex: 1.15 1 0 !important;
        background: var(--ds-gradient) !important;
        color: var(--ds-white) !important;
        font-weight: 600;
    }
    /* the divider between search (left) and sign in */
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"] {
        position: relative;
        overflow: visible;   /* 21.4 clipped the pill - the divider at its rounded edge came out as an arc */
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"]::after {
        content: '';
        position: absolute;
        left: 0;
        top: 9px;
        bottom: 9px;
        width: 2px;
        border-radius: 1px;
        background: #d8c6d6;   /* review 10.11: 2px, text-tall, a pinkish grey */
    }
}

/* ---- 21.6 the guest intro is printed inside the grid card by
   home.tpl itself (no JS move any more - a phone that cached the old
   page kept showing it outside): desktop hides that copy and keeps
   the sidebar's, tablet and phone hide the sidebar's and keep this
   one. Looks as 20.24. */
@media (min-width: 1141px) {
    #grid_desktop > .text-about.ds-intro-static {
        display: none !important;
    }
}
@media (max-width: 1140px) {
    .logged-out #ko_fixed_cont {
        display: none !important;
    }
}
/* 21.5 follow-up (reference 21:56): soft shadows - a grey one under
   the outlined container, a tinted one under the sign-up pill */
@media (max-width: 767px) {
    .logged-out #ko_mobile_header .ko_mobile_auth {
        box-shadow: 0 4px 12px rgba(22, 22, 22, .10), 0 1px 2px rgba(22, 22, 22, .04);
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        box-shadow: 0 4px 10px rgba(253, 46, 99, .28), 0 1px 3px rgba(132, 54, 236, .18) !important;
    }
}

/* ---- 21.7 likes / visitors on tablet and phone (review 10.11): the
   scrolling frame is the list itself (ul.grid), and it was rtl, so
   its scrollbar sat at the LEFT. The frame goes ltr like every other
   scroll box (scrollbar right); the two-column order on a tablet is
   kept right-to-left by hand (odd rows in the right column). */
@media (max-width: 1140px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid {
        direction: ltr;
        grid-auto-flow: row dense;
    }
    #wrapper #grid_desktop.list-mobile ul.grid#grid > li:nth-child(odd)  { grid-column: 2; }
    #wrapper #grid_desktop.list-mobile ul.grid#grid > li:nth-child(even) { grid-column: 1; }
}
@media (max-width: 599px) {
    #wrapper #grid_desktop.list-mobile ul.grid#grid > li:nth-child(odd),
    #wrapper #grid_desktop.list-mobile ul.grid#grid > li:nth-child(even) { grid-column: 1; }
}

/* ---- 21.8 the content card keeps the SAME padding on every side
   (review 10.11): 32 desktop, 24 tablet, 16 phone - the bottom used
   to be 40 / 24. Text pages and grid pages alike. */
@media (min-width: 1141px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)),
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop:not(.list-mobile) {
        padding: 32px !important;
    }
}
@media (max-width: 1140px) {
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)),
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop:not(.list-mobile) {
        padding: 24px !important;
    }
}
@media (max-width: 767px) {
    #superwrapper > #wrapper:not(.message-wrapper) {
        padding: 16px !important;
    }
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column:not(:has(> #grid_desktop)),
    #superwrapper > #wrapper:not(.message-wrapper) > .full-column > #grid_desktop:not(.list-mobile) {
        padding: 16px !important;
    }
}

/* ---- 21.9 phone card typography in one place: change these three
   values to retune the name over the photo and the badges on it */
@media (max-width: 767px) {
    :root {
        --ds-card-name-size: 20px;
        --ds-card-name-weight: 700;
        --ds-card-badge-size: 14px;
    }
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title,
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title.only-mobile {
        font-size: var(--ds-card-name-size) !important;
        font-weight: var(--ds-card-name-weight) !important;
    }
    #wrapper #grid li a.thumb-image .lastact,
    #wrapper #grid_desktop.grid-mobile > ul > li > a.thumb-image .lastact,
    #wrapper .grid > li .avatar-link .ko_new span,
    #wrapper .grid > li .avatar-link .images-counter {
        font-size: var(--ds-card-badge-size) !important;
    }
}

/* ---- 21.10 chat: the private-photo request message (review 10.11,
   corrected): the bubble keeps the gradient and white text like every
   incoming message; its two buttons (approve / decline) are white
   pills with dark text */
#wrapper.message-wrapper .chat-message .message-content.pf-message {
    background: var(--ds-gradient);
    color: var(--ds-white);
    border: none;
}
#wrapper.message-wrapper .chat-message .message-content.pf-message a.pf-request-result,
#wrapper.message-wrapper .chat-message .message-content.pf-message a.pf-request-result.btn-success,
#wrapper.message-wrapper .chat-message .message-content.pf-message a.pf-request-result.btn-danger {
    background: var(--ds-white) !important;
    color: var(--ds-dark) !important;
    border: 1px solid var(--ds-white) !important;
    text-shadow: none;
}
#wrapper.message-wrapper .chat-message .message-content.pf-message a.pf-request-result:hover {
    background: #f6f6f6 !important;
}

/* ---- 21.11 the profile / settings notices (review 10.11): the
   "הודעה" box (#ko_modal_info - e-mail changed, profile saved) is
   the same message modal as the rest - the legacy dashed grey .okvir
   plate goes; and an upload error reads in the normal dark text, not
   red (account.tpl dropped its inline red; this keeps any cached copy
   in line) */
#ko_modal_info .written-content {
    margin: 0 !important;
    padding: 24px !important;
    direction: rtl;
    text-align: right;
    background: var(--ds-white);
}
#ko_modal_info .written-content .okvir {
    margin: 0;
    padding: 0;
    border: none !important;
    background: transparent;
    font-family: var(--ds-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--ds-dark);
}
#ko_modal_info .written-content .okvir p {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.4;
    color: var(--ds-dark);
}
#ko_modal_info .written-content .okvir p:last-child {
    margin-bottom: 0;
}
.bootbox-alert .bootbox-body [style*="color:red"],
.bootbox-alert .bootbox-body [style*="color: red"],
.bootbox-alert .bootbox-body .error,
#info_box .bootbox-body .error {
    color: var(--ds-dark) !important;
    text-align: right;
}

/* ---- 21.12 card titles (review 10.11): 600 / 18px on desktop and
   tablet, 600 / 16px on the phone - home, likes and visitors alike;
   on desktop the text block keeps the same 16 above the title as at
   its sides (it was 24). */
#wrapper .grid > li .ko_grid_item_title,
#wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title,
#wrapper #grid_desktop.list-mobile ul.grid > li .ko_grid_item_title {
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 24px;
}
@media (min-width: 1141px) {
    #wrapper .grid > li > a.open-profile:not(.thumb-image),
    #wrapper #grid_desktop.grid-mobile .grid > li > a.open-profile:not(.avatar-link),
    #wrapper #grid_desktop.list-mobile .grid > li > a.open-profile:not(.thumb-image) {
        padding-top: 16px !important;
    }
}
@media (max-width: 767px) {
    :root {
        --ds-card-name-size: 16px;
        --ds-card-name-weight: 600;
    }
    #wrapper .grid > li .ko_grid_item_title,
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title,
    #wrapper #grid_desktop.grid-mobile .grid > li .ko_grid_item_title.only-mobile,
    #wrapper #grid_desktop.list-mobile ul.grid > li .ko_grid_item_title {
        font-size: var(--ds-card-name-size) !important;
        font-weight: var(--ds-card-name-weight) !important;
        line-height: 22px;
    }
}

/* ---- 21.13 tablet guest bar = the phone one (review 10.11): the
   same segmented pill, centred between the logo and the burger */
/* ---- 21.5 guest phone bar, third take (reference 21:12): one
   outlined pill holds the three actions - sign up as a gradient pill
   at the right, sign in and search as plain purple labels with a thin
   divider between them; no icons, no shading. */
@media (min-width: 768px) and (max-width: 1140px) {
    .logged-out #ko_mobile_header .ko_mobile_auth {
        box-sizing: border-box;
        height: 44px;
        padding: 3px;
        gap: 0;
        border: 1px solid #e4e2ea;
        border-radius: var(--ds-radius-pill);
        background: var(--ds-white);
        justify-content: space-between;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr,
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        flex: 1 1 0 !important;
        height: 36px;
        padding: 0 10px !important;
        border: none !important;
        border-radius: var(--ds-radius-pill) !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--ds-purple) !important;
        font-size: 14px;
        font-weight: 500;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr::before {
        content: none;
    }
    /* sign in / search: the label in the brand gradient (review 10.11) */
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr > span {
        background: var(--ds-gradient);
        -webkit-background-clip: text;
                background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
    /* sign up stays white on the gradient pill */
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"] > span,
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] > span {
        background: none;
        color: var(--ds-white);
        -webkit-text-fill-color: var(--ds-white);
    }
    /* sign up: the gradient pill */
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        flex: 1.15 1 0 !important;
        background: var(--ds-gradient) !important;
        color: var(--ds-white) !important;
        font-weight: 600;
    }
    /* the divider between search (left) and sign in */
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"] {
        position: relative;
        overflow: visible;   /* 21.4 clipped the pill - the divider at its rounded edge came out as an arc */
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"]::after {
        content: '';
        position: absolute;
        left: 0;
        top: 9px;
        bottom: 9px;
        width: 2px;
        border-radius: 1px;
        background: #d8c6d6;   /* review 10.11: 2px, text-tall, a pinkish grey */
    }
}

/* 21.5 follow-up (reference 21:56): soft shadows - a grey one under
   the outlined container, a tinted one under the sign-up pill */
@media (min-width: 768px) and (max-width: 1140px) {
    .logged-out #ko_mobile_header .ko_mobile_auth {
        box-shadow: 0 4px 12px rgba(22, 22, 22, .10), 0 1px 2px rgba(22, 22, 22, .04);
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        box-shadow: 0 4px 10px rgba(253, 46, 99, .28), 0 1px 3px rgba(132, 54, 236, .18) !important;
    }
}
@media (min-width: 768px) and (max-width: 1140px) {
    .logged-out #ko_mobile_header .ko_mobile_auth {
        width: 380px;
        height: 46px;
    }
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr,
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signin"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_new_signup"],
    .logged-out #ko_mobile_header .ko_mobile_auth .buttontr[data-target="#ko_modal_signup"] {
        height: 38px;
        font-size: 15px;
    }
}

/* ---- 21.14 tablet member bar (review 10.11): the same thin dividers
   between the sections as on the phone - halfway across the 26px gap,
   none at the left of the leftmost section (visitors) */
@media (min-width: 768px) and (max-width: 1140px) {
    main.logged-in #ko_mobile_header .ko_mob_icon {
        position: relative;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon:not(.mobile_action_visitors)::after {
        content: '';
        position: absolute;
        left: -13px;
        top: 50%;
        width: 1px;
        height: 36px;
        transform: translateY(-50%);
        background: #e4e2ea;
        pointer-events: none;
    }
}
@media (min-width: 768px) and (max-width: 1140px) {
    /* the home tile overhangs its cell by 10 (the active pill's
       negative margin), so its divider moves out to stay centred */
    main.logged-in #ko_mobile_header #ko_mobile_icons .ko_mob_icon:nth-child(1)::after {
        left: -18px;
    }
}

/* ---- 21.15 phone bottom bar arrows (review 10.11): each arrow keeps
   its own side whatever the count, like the floating ones on tablet
   and desktop - next (←) at the left, previous (→) at the right. The
   space-between row put a lone arrow at the start (the right). */
@media (max-width: 767px) {
    #wrapper + .bottom-line .pagination {
        position: relative;
        justify-content: flex-start;
    }
    #wrapper + .bottom-line .pagination > li {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    #wrapper + .bottom-line .pagination > li.next-page { left: 0; right: auto; }
    #wrapper + .bottom-line .pagination > li.prev-page { right: 0; left: auto; }
}

/* ---- 21.16 settings, "mail updates" (review 10.11): a label that
   wraps to two lines pushed its select below the other two. Every
   field in the row is a column: label at the top, select at the
   bottom, so the three selects share one line whatever the labels do. */
#wrapper.ko_account_page .ko_form_profile_settings {
    align-items: stretch;
}
#wrapper.ko_account_page .ko_form_profile_settings > .form-group {
    display: flex;
    flex-direction: column;
}
#wrapper.ko_account_page .ko_form_profile_settings > .form-group > .form-control,
#wrapper.ko_account_page .ko_form_profile_settings > .form-group > select {
    margin-top: auto;
}

/* ---- 21.17 open conversation on tablet / phone (review 10.11): the
   top bar stays. The legacy flow hides it (column_left.tpl prints
   #ko_mobile_header.hidden for /message?user=..., communications.js
   adds .hidden when a conversation opens) - the bar is shown anyway
   and the chat card sits under it. On the phone the bottom logo bar
   steps aside so the composer keeps the full height. */
@media (max-width: 1140px) {
    #ko_mobile_header.hidden {
        display: flex !important;
        visibility: visible !important;   /* bootstrap's .hidden sets both */
    }
    body:has(#ko_mobile_header.hidden) {
        padding-top: 87px;
        --ds-chat-offset: 87px;
    }
}
@media (max-width: 767px) {
    body:has(#ko_mobile_header.hidden) {
        padding-top: 75px;
        --ds-chat-offset: 75px;
    }
    #ko_mobile_header.hidden .header-logo {
        display: none !important;
    }
}

/* ---- 21.18 phone member bar, even spacing (review 10.11): the five
   cells touch (no gap), each divider sits exactly on a cell border,
   and every tile is a square 12px narrower than its cell - so each
   icon is centred between its two dividers and the active tile never
   covers one. */
@media (max-width: 767px) {
    main.logged-in #ko_mobile_header {
        column-gap: 0;
    }
    main.logged-in #ko_mobile_header #ko_mobile_nav_toggle {
        margin: 0 0 0 8px !important;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon > a,
    main.logged-in #ko_mobile_header .ko_mob_icon > a.active {
        width: calc(100% - 12px);
        max-width: 54px;
        height: auto;
        aspect-ratio: 1 / 1;
        margin: 0 auto !important;   /* the cell is display:block !important (7.x), so centre the tile itself */
        border-radius: 12px;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon:not(.mobile_action_visitors)::after,
    main.logged-in #ko_mobile_header #ko_mobile_icons .ko_mob_icon:nth-child(1)::after {
        left: 0;
        height: 34px;
        transform: translate(-50%, -50%);
    }
}

/* ---- 21.19 #ko_modal_info (e-mail changed / profile saved): centred
   on the screen like every other modal (20.8 had no rule for it) and
   as wide as them - bootstrap's .modal-sm made it 300 */
/* the page script rewrites the modal's inline style (no "display:
   block" to hook on), so the dialog centres itself in the fixed box */
#ko_modal_info .modal-dialog,
#ko_modal_info .modal-dialog.modal-sm {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 444px;
    max-width: calc(100% - 48px);
    margin: 0;
    transform: translate(-50%, -50%) !important;
    -webkit-transform: translate(-50%, -50%) !important;
}
#ko_modal_info .modal-content {
    background: var(--ds-white) !important;
}

/* ---- 21.20 tablet member bar, even spacing (review 10.11): like the
   phone (21.18) - five equal cells that touch, dividers exactly on
   the cell borders, every section a square tile centred in its cell;
   the current one is the gradient square. */
@media (min-width: 768px) and (max-width: 1140px) {
    main.logged-in #ko_mobile_header {
        column-gap: 0;
    }
    main.logged-in #ko_mobile_header #ko_mobile_nav_toggle {
        margin: 0 0 0 12px !important;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon {
        flex: 0 0 76px;
        width: 76px !important;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon > a,
    main.logged-in #ko_mobile_header .ko_mob_icon > a.active {
        box-sizing: border-box;
        width: 58px;
        height: 58px;
        margin: 0 auto !important;
        padding: 0;
        justify-content: center;
        gap: 4px;
        border-radius: 14px;
    }
    main.logged-in #ko_mobile_header .ko_mob_icon > i[data-counter] {
        top: 2px;
        left: calc(50% + 6px);
    }
    main.logged-in #ko_mobile_header .ko_mob_icon:not(.mobile_action_visitors)::after,
    main.logged-in #ko_mobile_header #ko_mobile_icons .ko_mob_icon:nth-child(1)::after {
        left: 0;
        height: 36px;
        transform: translate(-50%, -50%);
    }
}

/* ---- 21.21 the card text block keeps the same 16 above the title as
   at its sides on the tablet too (21.12 did it for desktop only; the
   tablet still had 24 on top). The phone card is the photo with the
   name over it, and the likes / visitors rows have their own layout. */
@media (min-width: 768px) and (max-width: 1140px) {
    #wrapper .grid > li > a.open-profile:not(.thumb-image),
    #wrapper #grid_desktop.grid-mobile .grid > li > a.open-profile:not(.avatar-link) {
        padding-top: 16px !important;
    }
}

/* ---- 21.22 avatar picker footer (review 11.11): save at the right,
   cancel at the left - the order of every other modal (19.4). The
   footer is an ltr row with cancel first in the markup. */
#modal_avatar_mask .modal-footer .ko_btn_cancel { order: 1; }
#modal_avatar_mask .modal-footer .ko_btn_submit { order: 2; }

/* ---- 21.23 phone profile action row (review 11.11): the icons are
   bordered white squares again, the same tile as the card buttons -
   1px hairline, radius 14, a soft shadow */
@media (max-width: 767px) {
    #wrapper.page-user.ds-profile .profile-buttons .btn-block > a,
    #wrapper.page-user.ds-profile .left-column .btn-block a.ko_btn_message,
    #wrapper.ko_account_page.ds-settings .left-column .btn-block a.ko_btn_message {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--ds-line) !important;
        border-radius: 14px !important;
        background: var(--ds-white) !important;
        box-shadow: 0 4px 12px rgba(22, 22, 22, .08) !important;
    }
}

/* ---- 21.24 add-photo window: the square the user cut out in the
   cropper (js/ds-crop.js) shows under the file field before upload */
#modal_upload_photo .ds-upload-preview {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 0 0 auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(22, 22, 22, .10);
}
#modal_upload_photo .ds-upload-preview[hidden] {
    display: none;
}

/* ---- 21.25 private photos the viewer has access to (bug 28.11):
   the blur above (block 4) was put on every photo that carries the
   "private" badge, whether the owner had given access or not. The
   server already sends a blurred file when there is no access and the
   real one when there is, so once access is granted (front.php ->
   private_foto_request unlock, the wrapper gets .ds-pf-unlocked) the
   photo is shown as it is. The badge stays: the photo is still private. */
#wrapper.page-user .photo-gallery-wrapper.ds-pf-unlocked .photo_gallery .gallery-item:has(.private-toggle) img {
    filter: none !important;
    -webkit-filter: none !important;
    transform: none;
}
