    /* ── Profile Page & Settings ── */
    .profile-page {
        position: fixed;
        inset: 0;
        z-index: 700;
        background: #F9F8F4;
        transform: translateY(100%);
        transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
        will-change: transform;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .profile-page.open {
        transform: translateY(0);
    }
    .profile-page-header {
        display: flex;
        align-items: center;
        position: relative;
        padding: 12px 20px;
        max-width: 480px;
        margin: 0 auto;
    }
    .profile-page-title-group {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .profile-page-logo {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        line-height: 1;
    }
    .profile-page-logo svg {
        display: block;
        height: calc(1cap + 5px);
        width: auto;
    }
    .profile-page-title {
        font-family: 'Onest', sans-serif;
        font-size: 17px;
        font-weight: 600;
        color: var(--text);
        white-space: nowrap;
    }
    .profile-page-close {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: rgba(255,255,255,0.85);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
        border: 1px solid rgba(255,255,255,0.9);
        transition: transform 0.3s ease;
    }
    .profile-page-close:active { transform: scale(0.92); }
    .profile-page-close svg { width: 26px; height: 26px; stroke: #000; display: block; }
    .profile-user-block {
        display: flex;
        justify-content: center;
        padding: 10px 20px 24px;
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
    .profile-user-pill {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        background: rgba(255,255,255,0.45);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255,255,255,0.6);
        border-radius: 50px;
        padding: 6px 16px 6px 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .profile-user-avatar {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
        background: rgba(0,0,0,0.06);
    }
    .profile-user-name {
        font-family: 'Onest', sans-serif;
        font-size: 17px;
        font-weight: 450;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .profile-page-content {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        padding: 12px 20px 40px;
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    /* ── Settings Section Label ── */
    .settings-section-label {
        font-family: 'Onest', sans-serif;
        font-size: 14px;
        font-weight: 400;
        color: rgba(26,26,26,0.55);
        text-align: left;
        padding-left: 8px;
        margin-bottom: -2.5px;
    }
    body.dark .settings-section-label { color: rgba(255,255,255,0.55); }

    /* ── Settings Rows ── */
    .settings-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 9.5px 0 9.5px 8px;
        cursor: pointer;
        user-select: none;
        width: 100%;
        box-sizing: border-box;
    }
    .settings-row-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .settings-row-icon svg { width: 21px; height: 21px; stroke: var(--text); }
    #profileHapticRow .settings-row-icon svg { width: 25px; height: 25px; position: relative; top: -1px; }
    .settings-row-label { font-family: 'Onest', sans-serif; font-size: 16px; font-weight: 500; color: var(--text); flex: 1; }
    .settings-row-value { font-family: 'Onest', sans-serif; font-size: 15px; font-weight: 500; color: rgba(26,26,26,0.55); }
    .settings-row-chevron-wrap { position: relative; display: flex; align-items: center; flex-shrink: 0; }
    .settings-row-chevron { width: 18px; height: 18px; stroke: rgba(26,26,26,1); stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s ease; will-change: transform; transform: rotate(0deg); }
    .settings-row.open .settings-row-chevron { transform: rotate(90deg); }

    /* ── iOS Toggle ── */
    .settings-row-toggle { cursor: pointer; }
    .ios-toggle {
        position: relative;
        width: 66px;
        height: 28px;
        background: #D1D1D6;
        border-radius: 100px;
        box-shadow: none;
        flex-shrink: 0;
        transition: background 0.3s ease, box-shadow 0.3s ease;
    }
    .ios-toggle.on {
        background: #4A90D9;
        box-shadow: none;
    }
    .ios-toggle-thumb {
        position: absolute;
        top: 2.5px;
        left: 2.8px;
        width: 37px;
        height: 23px;
        background: #ffffff;
        border-radius: 100px;
        box-shadow: none;
        transition: transform 0.3s ease, width 0.12s ease;
        will-change: transform;
    }
    .ios-toggle.on .ios-toggle-thumb { transform: translateX(23.4px); }

    body.dark .ios-toggle { background: #3A3A3C; box-shadow: none; }
    body.dark .ios-toggle.on { background: #4A90D9; box-shadow: none; }
    body.dark .ios-toggle-thumb {
        background: #ffffff;
        box-shadow: none;
        top: 2.5px;
        left: 2.8px;
        width: 37px;
        height: 23px;
        border-radius: 100px;
    }
    body.dark .ios-toggle.on .ios-toggle-thumb { transform: translateX(23.4px); }

    /* Lang dropdown */
    .settings-lang-dropdown {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: fit-content;
        min-width: 160px;
        background: rgba(250,250,248,1);
        border: 1px solid rgba(255,255,255,0.9);
        border-radius: 22px;
        padding: 4px 0;
        box-shadow: 0 8px 28px rgba(61,53,41,0.12), 0 2px 6px rgba(61,53,41,0.06);
        z-index: 50;
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
        transform-origin: top right;
        pointer-events: none;
        transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1);
    }
    .settings-lang-dropdown.open {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: all;
    }
    .settings-lang-option {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 16px;
        font-family: 'Onest', sans-serif;
        font-size: 15px;
        color: #1A1A1A;
        cursor: pointer;
        user-select: none;
        transition: background 0.15s;
    }
    .settings-lang-option:active { background: rgba(0,0,0,0.04); }
    .settings-lang-option.active { font-weight: 500; }
    .settings-lang-option .opt-check { width: 15px; height: 15px; flex-shrink: 0; opacity: 0; color: #1A1A1A; }
    .settings-lang-option.active .opt-check { opacity: 1; }

    body.dark .settings-row-icon svg { stroke: #fff; }
    body.dark .settings-row-label { color: #fff; }
    body.dark .settings-row-value { color: rgba(255,255,255,0.55); }
    body.dark .settings-row-chevron { stroke: #ffffff; }
    body.dark .settings-lang-dropdown { background: #111111; border-color: rgba(255,255,255,0.1); box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
    body.dark .settings-lang-option { color: #ffffff; }
    body.dark .settings-lang-option:active { background: rgba(255,255,255,0.06); }
    body.dark .settings-lang-option .opt-check { color: #ffffff; }

    body.dark .profile-user-pill { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
    body.dark .profile-user-name { color: #fff; }
    body.dark .profile-user-avatar { background: rgba(255,255,255,0.1); }
    body.dark .profile-page { background: #141413; }
    body.dark .profile-page-close {
        background: rgba(255,255,255,0.06);
        border-color: rgba(255,255,255,0.1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    body.dark .profile-page-close svg { stroke: #fff; }
    body.dark .profile-page-title { color: #fff; }

    /* ── Legal: архивные редакции ── */
    /* Плашка архивной редакции. Геометрия и цвет сняты с эталонного скрина
       и пересчитаны на нашу колонку 720px (коэффициент 0.562):
       заливка #3D3D3B, внутренний отступ 52→29px, радиус скруглён
       сильнее эталона по просьбе,
       кегль — 1.065 от «Действует с…», интерлиньяж 1.5.
       Заливка светлее тёмного фона #141413, поэтому одна на обе темы. */
    .legal-archive-notice {
        font-family: 'Inter', sans-serif;
        font-size: 17.5px;
        font-weight: 700;
        line-height: 1.5;
        text-align: center;
        color: #F9F8F4;
        background: #3D3D3B;
        border-radius: 26px;
        padding: 29px 36px;
        margin: 51px 0 124px;
    }

    .legal-archive-link {
        color: inherit;
        text-decoration: underline;
        text-underline-offset: 3px;
        text-decoration-skip-ink: none;
        -webkit-text-decoration-skip: none;
    }

    .legal-meta-left { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }

    .legal-superseded {
        font-family: 'Inter', sans-serif;
        font-size: 14px;
        font-weight: 500;
        color: rgba(26,26,26,0.5);
        margin: 0;
    }

    /* Кегль, цвет и вес — ровно как у .terms-effective и .terms-lang-trigger,
       отличие только в подчёркивании. margin-left:auto прижимает ссылку
       к правому краю мета-строки, вплотную к переключателю языка. */
    .legal-prev-link {
        font-family: 'Inter', sans-serif;
        font-size: 16.5px;
        font-weight: 700;
        color: var(--color-fg);
        text-decoration: underline;
        text-underline-offset: 3px;
        /* Сплошная линия: по умолчанию браузер разрывает её под выносными
           элементами — в кириллице это «р», «у», «д», «ц», «щ». */
        text-decoration-skip-ink: none;
        -webkit-text-decoration-skip: none;
        margin-left: auto;
    }
    .legal-prev-link + .terms-lang { margin-left: 14px; }

    body.dark .legal-superseded { color: rgba(255,255,255,0.5); }
