/* МЕНЮ ПО АВАТАРКЕ + «МОЙ ПРОФИЛЬ» / «БОНУСЫ» / «НАСТРОЙКИ» (31.10.2026).
   Раскладку меню взяли у GiftsBattle (их скриншот: плашка ранга сверху, ниже
   пункты с иконками), ранги и их числа — у RubUP (`rub/assets/js/data/mock.js`,
   `rub/assets/js/vip-medal.js`), цвета — наши: стекло, розово-фиолетовый градиент.

   Всё живёт под классами `.me-*`, ничего из чужого кода не переопределяем. */

/* ── само меню ─────────────────────────────────────────────────────────── */
.me-menu {
    position: fixed;
    z-index: 200;
    top: 72px;
    right: 10px;
    width: min(312px, calc(100vw - 20px));
    padding: 10px;
    border-radius: 20px;
    background: rgba(16, 9, 24, .93);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(182, 2, 206, .28);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .62), 0 0 34px rgba(239, 2, 203, .16);
    transform-origin: top right;
    opacity: 0;
    transform: translateY(-8px) scale(.97);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}
.me-menu.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* плашка ранга: у них «Ранга нет», у нас всегда есть уровень */
.me-rank {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(135deg, rgba(182, 2, 206, .18), rgba(239, 2, 203, .12));
    color: #fff;
    font: 700 14px/1.2 var(--me-font, 'Montserrat', system-ui, sans-serif);
    text-align: left;
    cursor: pointer;
}
.me-rank__medal { flex: none; display: block; }
.me-rank__t { display: flex; flex-direction: column; min-width: 0; }
.me-rank__name { font-weight: 800; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-rank__sub { font-size: 11.5px; font-weight: 600; color: rgba(244, 238, 252, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-rank__chev { margin-left: auto; flex: none; opacity: .6; }

.me-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #fff;
    font: 700 15px/1.1 var(--me-font, 'Montserrat', system-ui, sans-serif);
    text-align: left;
    cursor: pointer;
    transition: background-color .14s ease;
}
.me-item:hover,
.me-item:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
.me-item__ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(182, 2, 206, .18);
    box-shadow: inset 0 0 0 1px rgba(239, 2, 203, .22);
    color: #fdb2f8;
}
.me-item__ico svg { width: 19px; height: 19px; display: block; }
.me-item__chev { margin-left: auto; opacity: .45; }

/* ── лист (профиль / бонусы / настройки) ───────────────────────────────── */
.me-sheet {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: rgba(6, 3, 10, .68);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
.me-sheet.show { opacity: 1; pointer-events: auto; }
.me-sheet__panel {
    display: flex;
    flex-direction: column;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(180deg, #1c0f28 0%, #120a1b 42%, #0b0611 100%);
    border: 1px solid rgba(182, 2, 206, .26);
    border-bottom: 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
    transform: translateY(14px);
    transition: transform .2s ease;
    overflow: hidden;
}
.me-sheet.show .me-sheet__panel { transform: none; }
@media (min-width: 720px) {
    .me-sheet { align-items: center; justify-content: center; }
    .me-sheet__panel { width: min(560px, calc(100vw - 40px)); max-height: 86vh; border-radius: 22px; border-bottom: 1px solid rgba(182, 2, 206, .26); }
}
.me-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.me-head__title { font: 800 17px/1.2 var(--me-font, 'Montserrat', system-ui, sans-serif); color: #fff; }
.me-head__x {
    margin-left: auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: #fff;
    cursor: pointer;
}
.me-body { padding: 14px 16px 22px; overflow-y: auto; overscroll-behavior: contain; }

/* ── «Мой профиль» ─────────────────────────────────────────────────────── */
.me-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.me-hero__ava {
    flex: none;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(182, 2, 206, .2);
    box-shadow: 0 0 0 2px rgba(239, 2, 203, .45), 0 8px 22px rgba(239, 2, 203, .25);
}
.me-hero__t { min-width: 0; }
.me-hero__name { font: 800 18px/1.2 var(--me-font, 'Montserrat', system-ui, sans-serif); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-hero__login { font-size: 13px; font-weight: 600; color: rgba(244, 238, 252, .6); }

.me-progress {
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 0 0 0 1px rgba(182, 2, 206, .2);
}
.me-progress__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.me-progress__lbl { font: 700 13px/1 var(--me-font, 'Montserrat', system-ui, sans-serif); color: rgba(244, 238, 252, .72); }
.me-progress__val { font: 800 13px/1 var(--me-font, 'Montserrat', system-ui, sans-serif); color: #fdb2f8; }
.me-bar { position: relative; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .10); overflow: hidden; }
.me-bar__fill {
    position: absolute; inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef02cb, #b602ce);
    box-shadow: 0 0 14px rgba(239, 2, 203, .55);
}
.me-progress__ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; font-weight: 600; color: rgba(244, 238, 252, .5); }

.me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.me-stat {
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .045);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.me-stat__k { font-size: 11.5px; font-weight: 600; color: rgba(244, 238, 252, .55); margin-bottom: 4px; }
.me-stat__v { font: 800 16px/1.1 var(--me-font, 'Montserrat', system-ui, sans-serif); color: #fff; }
.me-stat__v i { font-style: normal; font-size: 12px; opacity: .7; margin-left: 2px; }

.me-sub { font: 800 14px/1.2 var(--me-font, 'Montserrat', system-ui, sans-serif); color: #fff; margin: 4px 0 8px; }
.me-hist { display: flex; flex-direction: column; gap: 6px; }
.me-hist__row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    font-size: 13px; font-weight: 600; color: rgba(244, 238, 252, .8);
}
.me-hist__g { font-weight: 800; color: #fff; }
.me-hist__bet { margin-left: auto; color: rgba(244, 238, 252, .55); }
.me-hist__p { min-width: 62px; text-align: right; font-weight: 800; }
.me-hist__p.is-up { color: #4ade80; }
.me-hist__p.is-down { color: #ff6ad5; }
.me-empty { padding: 14px; text-align: center; font-size: 13px; color: rgba(244, 238, 252, .5); }

/* ── «Бонусы»: путь уровней ────────────────────────────────────────────── */
.me-ladder { display: flex; flex-direction: column; gap: 8px; }
.me-lv {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.me-lv.is-current {
    background: linear-gradient(135deg, rgba(182, 2, 206, .22), rgba(239, 2, 203, .14));
    box-shadow: inset 0 0 0 1px rgba(239, 2, 203, .45), 0 8px 22px rgba(239, 2, 203, .18);
}
.me-lv.is-locked { opacity: .55; }
.me-lv__t { min-width: 0; flex: 1 1 auto; }
.me-lv__name { font: 800 14.5px/1.2 var(--me-font, 'Montserrat', system-ui, sans-serif); color: #fff; }
.me-lv__from { font-size: 11.5px; font-weight: 600; color: rgba(244, 238, 252, .55); margin-top: 2px; }
.me-lv__perks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.me-perk {
    display: inline-flex; align-items: center; gap: 4px;
    height: 20px; padding: 0 7px; border-radius: 99px;
    background: rgba(255, 255, 255, .07);
    font-size: 11px; font-weight: 700; color: #ffc8f4;
    white-space: nowrap;
}
.me-lv__badge {
    align-self: flex-start;
    padding: 2px 7px; border-radius: 99px;
    background: linear-gradient(135deg, #ef02cb, #b602ce);
    font-size: 10.5px; font-weight: 800; color: #fff;
    letter-spacing: .02em;
}

/* ── «Настройки» ───────────────────────────────────────────────────────── */
.me-set { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.me-set:last-child { border-bottom: 0; }
.me-set__t { flex: 1 1 auto; min-width: 0; }
.me-set__n { font: 700 14px/1.2 var(--me-font, 'Montserrat', system-ui, sans-serif); color: #fff; }
.me-set__s { font-size: 11.5px; font-weight: 600; color: rgba(244, 238, 252, .5); margin-top: 2px; }
.me-switch {
    flex: none;
    position: relative;
    width: 46px; height: 26px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}
.me-switch::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .8);
    transition: transform .16s ease, background .16s ease;
}
.me-switch[aria-checked="true"] {
    background: linear-gradient(135deg, #ef02cb, #b602ce);
    border-color: rgba(255, 255, 255, .3);
}
.me-switch[aria-checked="true"]::after { transform: translateX(20px); background: #fff; }

/* «сократить анимации» — гасим наши декоративные анимации, когда игрок сам попросил */
html.me-no-motion *,
html.me-no-motion *::before,
html.me-no-motion *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
}

/* лист открыт — фон не прокручиваем */
body.me-sheet-open { overflow: hidden; }

/* ── ALT-DRAWER: боковое меню слева (23.11.2026) ────────────────────────────
   Слово владельца: «вместо кнопки „Профиль“ — кнопка „Меню“, она открывает слева боковое меню
   с красивыми большими стеклянными кнопками и теми же пунктами, что были на плашке по аватарке;
   а нажатие на аватарку — просто профиль».
   Всё наше: стекло + розово-фиолетовый градиент, крупные кнопки 62 px, свечение по нажатию. */
.me-drawer { position: fixed; inset: 0; z-index: 1300; pointer-events: none; }
.me-drawer__bg {
    position: absolute; inset: 0;
    /* ALT-DRAWERRIGHT: меню выезжает СПРАВА налево — подсветка от правого верхнего угла.
       Левше — зеркально (см. html.me-hand-left). Затемнение и блюр — как было до 25.11. */
    background: radial-gradient(120% 80% at 100% 0%, rgba(183, 12, 158, .20), rgba(6, 3, 10, .62) 60%);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .22s ease;
}
.me-drawer__panel {
    position: absolute; right: 0; left: auto; top: 0; bottom: 0;
    width: min(88vw, 352px);
    display: flex; flex-direction: column; gap: 10px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 26px 0 0 26px;
    background:
        linear-gradient(160deg, rgba(122, 22, 104, .30), rgba(24, 9, 28, .92) 55%),
        rgba(18, 8, 22, .88);
    -webkit-backdrop-filter: blur(26px) saturate(155%); backdrop-filter: blur(26px) saturate(155%);
    border: 1px solid rgba(249, 181, 204, .18); border-right: 0;
    box-shadow: -26px 0 70px rgba(0, 0, 0, .62), 0 0 46px rgba(239, 2, 203, .16);
    /* ALT-DRAWERTRANS (25.11.2026): вернул выезд на transition — с keyframes на телефоне
       владелец видел мигание кнопок внутри панели (каждый `.me-glass` с blur внутри
       анимируемого слоя). Как было раньше, но зеркально (справа). */
    transform: translateX(102%);
    transition: transform .28s cubic-bezier(.22, .9, .25, 1);
    overflow-y: auto; overscroll-behavior: contain;
}
/* ALT-HAND-LEFT: «я левша» — панель выезжает слева (как было до 25.11.2026) */
html.me-hand-left .me-drawer__bg {
    background: radial-gradient(120% 80% at 0% 0%, rgba(183, 12, 158, .20), rgba(6, 3, 10, .62) 60%);
}
html.me-hand-left .me-drawer__panel {
    left: 0; right: auto;
    border-radius: 0 26px 26px 0;
    border: 1px solid rgba(249, 181, 204, .18); border-left: 0;
    box-shadow: 26px 0 70px rgba(0, 0, 0, .62), 0 0 46px rgba(239, 2, 203, .16);
    transform: translateX(-102%);
}
/* пока JS меняет сторону — без анимации, иначе закрытая панель «переезжает» через экран */
html.me-no-anim .me-drawer__panel,
html.me-no-anim .me-drawer__bg { transition: none !important; }
.me-drawer.show { pointer-events: auto; }
.me-drawer.show .me-drawer__bg { opacity: 1; }
.me-drawer.show .me-drawer__panel { transform: none; }
html.me-hand-left .me-drawer.show .me-drawer__panel { transform: none; }

/* шапка: аватарка, имя, ранг */
.me-drawer__head { display: flex; align-items: center; gap: 11px; padding: 4px 2px 8px; }
.me-drawer__ava {
    flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
    background: linear-gradient(135deg, #ef02cb, #75027f);
    box-shadow: 0 0 0 1px rgba(249, 181, 204, .35), 0 8px 20px rgba(239, 2, 203, .28);
}
.me-drawer__ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-drawer__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me-drawer__name {
    font: 800 16px/1.15 Unbounded, Montserrat, system-ui, sans-serif; color: #fff;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-drawer__rank { display: flex; align-items: center; gap: 6px; min-width: 0; }
.me-drawer__rank .me-rank__name { font: 700 11.5px/1 Montserrat, system-ui, sans-serif; color: #f9b5cc; }
.me-drawer__x {
    margin-left: auto; flex: none; width: 34px; height: 34px; display: grid; place-items: center;
    border: 0; border-radius: 50%; cursor: pointer; color: #fff;
    background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.me-drawer__x:active { transform: scale(.94); }

/* большие стеклянные кнопки */
.me-drawer__list { display: flex; flex-direction: column; gap: 9px; }
.me-glass {
    position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
    min-height: 62px; padding: 11px 13px; border: 0; border-radius: 18px; cursor: pointer; text-align: left;
    color: #fff; overflow: hidden;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 42%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(160deg, rgba(182, 2, 206, .26), rgba(40, 10, 46, .58));
    -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .18), inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 22px rgba(0, 0, 0, .34);
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.me-glass::after {           /* блик по верхней кромке — «стекло» */
    content: ""; position: absolute; inset: 0 0 auto; height: 46%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.me-glass:active { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) {
    .me-glass:hover {
        box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .34), inset 0 1px 0 rgba(255, 255, 255, .28), 0 14px 28px rgba(0, 0, 0, .42), 0 0 26px rgba(239, 2, 203, .28);
    }
}
.me-glass__ico {
    flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: #fff;
    background: linear-gradient(140deg, rgba(239, 2, 203, .42), rgba(117, 2, 127, .5));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 6px 14px rgba(0, 0, 0, .28);
}
.me-glass__ico svg { width: 21px; height: 21px; }
.me-glass__txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.me-glass__txt b { font: 800 15.5px/1.2 Montserrat, system-ui, sans-serif; letter-spacing: .01em; }
.me-glass__txt i { font: 600 11.5px/1.25 Montserrat, system-ui, sans-serif; font-style: normal; color: rgba(255, 255, 255, .62); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-glass__chev { margin-left: auto; flex: none; color: rgba(255, 255, 255, .5); display: grid; place-items: center; }

/* подвал панели */
.me-drawer__foot { margin-top: auto; padding: 10px 4px 0; }
.me-drawer__foot .me-rank__sub { font: 600 11.5px/1.35 Montserrat, system-ui, sans-serif; color: rgba(255, 255, 255, .55); }

html.me-drawer-open, html.me-drawer-open body { overflow: hidden; }
html.me-no-motion .me-drawer__panel, html.me-no-motion .me-drawer__bg, html.me-no-motion .me-glass { transition-duration: 1ms; }
@media (max-width: 380px) {
    .me-drawer__panel { width: 92vw; }
    .me-glass { min-height: 58px; }
    .me-glass__txt b { font-size: 14.5px; }
}

/* ── ALT-DRAWER2 (23.11.2026): логотип в шапке панели (только ПК), аватарка и ранг — снизу ── */
.me-drawer__brand {
    display: none;                       /* на телефоне в меню логотипа нет */
    align-items: center; justify-content: center;
    padding: 6px 6px 12px;
}
.me-drawer__brand img { display: block; height: 44px; width: auto; }
@media (min-width: 1024px) {
    .me-drawer__brand { display: flex; }
}
.me-drawer__x {
    position: absolute; right: 12px; top: calc(12px + env(safe-area-inset-top, 0px));
    margin-left: 0;
}
.me-drawer__panel { padding-top: calc(52px + env(safe-area-inset-top, 0px)); }
@media (min-width: 1024px) { .me-drawer__panel { padding-top: calc(12px + env(safe-area-inset-top, 0px)); } }

/* ── ALT-DRAWER3 (23.11.2026): ТЕЛЕФОН — панель компактная, крестик не под кнопками Telegram,
   и меню можно смахнуть пальцем влево (просьба владельца). ─────────────────────────────────── */
@media (max-width: 1023px) {
    .me-drawer__panel {
        top: var(--topbar-h, 0px);              /* старт ПОД шапкой Telegram — крестик не перекрыт */
        width: min(86vw, 318px);
        padding: 46px 12px calc(14px + env(safe-area-inset-bottom, 0px));   /* сверху место под крестик */
        /* ALT-CORNER (28.11.2026, владелец: «угол не закруглён левый»): панель стоит СПРАВА
           (left:auto; right:0), поэтому скруглять надо ЛЕВЫЕ углы. Было `0 20px 20px 0` —
           скругление уходило за правый край экрана и левый угол выглядел рубленым.
           Для режима «я левша» правило ниже (html.me-hand-left) перебивает по специфичности. */
        border-radius: 20px 0 0 20px;
        gap: 8px;
        transition: transform .26s cubic-bezier(.22, .9, .25, 1);
    }
    .me-drawer__panel.is-dragging { transition: none; }
    .me-drawer__x { right: 10px; top: 10px; width: 30px; height: 30px; }
    .me-drawer__list { gap: 7px; }
    .me-glass { min-height: 54px; padding: 8px 11px; gap: 10px; border-radius: 15px; }
    .me-glass__ico { width: 34px; height: 34px; border-radius: 11px; }
    .me-glass__ico svg { width: 18px; height: 18px; }
    .me-glass__txt b { font-size: 14px; }
    .me-glass__txt i { font-size: 10.5px; }
    .me-drawer__me { padding: 10px; gap: 9px; border-radius: 15px; }
    .me-drawer__me .me-drawer__ava { width: 38px; height: 38px; }
    .me-drawer__me .me-drawer__name { font-size: 14px; }
    .me-drawer__me .me-rank__sub { font-size: 10.5px; max-width: 170px; }
    /* «ручка» у правого края: видно, что панель смахивается */
    .me-drawer__panel::after {
        content: ""; position: absolute; right: 6px; top: 50%; width: 3px; height: 46px;
        margin-top: -23px; border-radius: 3px; background: rgba(255, 255, 255, .18);
    }
}

/* аватарка + ник + ранг внизу панели */
.me-drawer__me {
    margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 12px 12px 12px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03) 55%, rgba(182, 2, 206, .16));
    -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .18), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.me-drawer__me .me-drawer__ava { width: 44px; height: 44px; }
.me-drawer__me .me-drawer__name { font-size: 15px; }
.me-drawer__me .me-rank__sub {
    display: block; font: 600 11px/1.3 Montserrat, system-ui, sans-serif; color: rgba(255, 255, 255, .55);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px;
}


/* ══════════════════ ALT-SMOOTH2 (28.11.2026) ══════════════════
   Владелец: «именно при нажатии на нижнюю кнопку „Меню“ всё начинает дёргаться,
   какие-то квадраты, глаза аж режет». Что происходит при нажатии: панель выезжает
   (transform .28 s) и ВНУТРИ неё 8 плашек `.me-glass` с `backdrop-filter: blur(14px)`,
   у самой панели `blur(26px)`, у подложки — полноэкранный `blur(3px)`. Пока слой
   движется, WebView пересобирает размытие каждый кадр: на телефоне это и есть
   «квадраты» (каждая плашка проявляется своей областью размытия) и рывки.
   Здесь только телефон: убираем размытие, подложки у этих элементов и так почти
   плотные (.58–.88), вид не меняется. «Как было» — открыть со `?v=…&smooth=0`. */
@media (max-width: 1023.98px) {
  html:not(.alt-nosmooth) .me-glass,
  html:not(.alt-nosmooth) .me-glass::after,
  html:not(.alt-nosmooth) .me-drawer__panel,
  html:not(.alt-nosmooth) .me-drawer__bg,
  html:not(.alt-nosmooth) .me-drawer__me {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* панель и плашки остаются стеклянными за счёт градиентов, но чуть плотнее —
     иначе без блюра сквозь них просвечивает экран под ними.
     Тут же ФОН МЕНЮ из нашего листа (ALT-MENUART): на телефоне его задаёт это правило,
     потому что специфичность `html:not(.alt-nosmooth) .me-drawer__panel` выше, чем у
     обычного `.me-drawer__panel` в конце файла. */
  html:not(.alt-nosmooth) .me-drawer__panel {
    background:
      linear-gradient(180deg, rgba(10, 4, 13, .22) 0%, rgba(10, 4, 13, .52) 40%, rgba(8, 3, 10, .80) 100%),
      url('me/menu-panel.webp?v=mn01') center top / 126% auto no-repeat,
      linear-gradient(160deg, rgba(122, 22, 104, .38), rgba(24, 9, 28, .94) 55%),
      #0d0512;
  }
  /* ALT-SMOOTH3 (28.11.2026): владелец — «при нажатии на „Меню“ одно зависание на секунду,
     меню исчезает и потом появляется». Это выезд панели: на телефоне кадры идут по 100–200 мс,
     и панель, ползущая 0.28 с, на полпути выглядит как «пропала». Показываем сразу (как уже
     сделано их же классом `me-no-motion`), затемнение под панелью остаётся плавным — оно на
     opacity и кадры не тормозит. */
  html:not(.alt-nosmooth) .me-drawer__panel {
    transition-duration: 1ms !important;
  }
  html:not(.alt-nosmooth) .me-drawer__bg {
    transition-duration: .16s !important;
  }
}

/* ══════════════════ ALT-MENUART (28.11.2026) ══════════════════
   Просьба владельца: «хочу чтобы в меню при открытии был фон вот этот — Неоновая панель
   с кроликом и иконками.png» + «иконки поменяй на наши новые из той же папки».
   Лист нарезан скриптом: фон — `assets/me/menu-panel.webp` (526×1004, альфа, 65 КБ),
   иконки — `assets/me/icon-*.webp` (128 px, альфа, 5–8 КБ). Плитка иконки стала тёмной
   подложкой: неоновый рисунок на прежнем розовом градиенте сливался.
   Версия ссылок — `?v=mn01`, поднимать при переклейке листа. */
.me-drawer__panel {
    /* затемняющая плёнка ПОВЕРХ арта (первый слой в списке — самый верхний), иначе за
       карточками слишком пёстро и текст читается хуже */
    background-image:
        linear-gradient(180deg, rgba(10, 4, 13, .22) 0%, rgba(10, 4, 13, .52) 40%, rgba(8, 3, 10, .80) 100%),
        url('me/menu-panel.webp?v=mn01');
    background-repeat: no-repeat, no-repeat;
    background-position: center top, center top;
    background-size: cover, 126% auto;
    background-color: #0d0512;
    /* ALT-MENUBLACK2 (28.11.2026): владелец — «края надо жирнее». Чёрная рамка панели 3px
       (настоящий border, у прижатого к экрану края — 0) + внутренняя обводка 3px + затухание
       46px по кромкам, чтобы чёрная кромка читалась и поверх арта. Розовое свечение не возвращаем. */
    border: 3px solid rgba(0, 0, 0, .95);
    border-right: 0;
    box-shadow:
        inset 0 0 0 3px rgba(0, 0, 0, .95),
        inset 0 0 46px rgba(0, 0, 0, .9),
        -12px 0 34px rgba(0, 0, 0, .7);
}
/* «я левша»: панель прижата к левому краю — рамка чёрная, но без левой стороны.
   (правило `html.me-hand-left .me-drawer__panel` в середине файла задаёт розовую рамку
   и перебивает обычный селектор по специфичности — поэтому дублируем здесь) */
html.me-hand-left .me-drawer__panel {
    border: 3px solid rgba(0, 0, 0, .95);
    border-left: 0;
    box-shadow:
        inset 0 0 0 3px rgba(0, 0, 0, .95),
        inset 0 0 46px rgba(0, 0, 0, .9),
        12px 0 34px rgba(0, 0, 0, .7);
}
/* карточки пунктов — стиль «Настройки → Устройство» (.ui-cat): тот же розовый radial,
   верхний блик и внутреннее кольцо. Владелец: «сами кнопки иметь такой же стиль». */
.me-glass {
    background:
        linear-gradient(146deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .05) 34%, rgba(255, 255, 255, 0) 56%),
        radial-gradient(120% 130% at -6% -18%, rgba(255, 155, 230, .34), rgba(239, 2, 203, .14) 42%, rgba(117, 2, 127, 0) 68%),
        radial-gradient(130% 150% at 0% 0%, rgba(239, 2, 203, .24), rgba(117, 2, 127, .16) 52%, rgba(22, 9, 28, .68));
    box-shadow:
        inset 0 0 0 1px rgba(249, 181, 204, .30),
        inset 0 1px 0 rgba(255, 255, 255, .34),
        0 12px 26px rgba(0, 0, 0, .42);
}
/* крестик «Закрыть»: чёрная подложка, жирный штрих (CSS перебивает атрибуты SVG) */
.me-drawer__x {
    background: rgba(0, 0, 0, .62);
    color: #fff;
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .26), 0 6px 16px rgba(0, 0, 0, .5);
}
.me-drawer__x svg { width: 20px; height: 20px; stroke-width: 3; }
/* телефон: крестик справа, крупнее и жирнее */
@media (max-width: 1023px) {
    .me-drawer__x { width: 36px; height: 36px; right: 12px; top: 10px; }
    .me-drawer__x svg { width: 21px; height: 21px; stroke-width: 3.2; }
}
/* ПК: крестик СЛЕВА (владелец 28.11.2026), ещё крупнее */
@media (min-width: 1024px) {
    .me-drawer__x { left: 14px; right: auto; width: 38px; height: 38px; top: calc(12px + env(safe-area-inset-top, 0px)); }
    .me-drawer__x svg { width: 22px; height: 22px; stroke-width: 3.2; }
}
.me-glass__ico {
    background: rgba(12, 6, 16, .42);
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .26), 0 6px 14px rgba(0, 0, 0, .28);
}
.me-glass__ico img.me-ico { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ── ALT-FLATFRAMES (29.11.2026, владелец: «в других менюшках посмотри, где портит вид — рамки убрать»):
   панель меню и её карточки — без розовых неоновых обводок, как обычное стекло. Состояния (`.me-lv.is-current`,
   прогресс, плитки иконок) оставлены: это индикаторы, а не рамки вокруг блоков. */
.me-drawer__panel,
html.me-hand-left .me-drawer__panel,
.me-sheet__panel {
    border: 1px solid rgba(255, 255, 255, .12);
}
.me-glass,
.me-glass:hover,
.me-drawer__me,
.me-glass__ico {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .14),
        0 10px 24px rgba(0, 0, 0, .42);
}
.me-sheet__panel { border-bottom: 0; }
