/* --- Чипы в шапке: баланс, корзина, онлайн ---
   Геометрия (высота, поля, пилюля, шрифт) у них общая с остальным рядом и
   лежит в блоке .header__side; здесь остаётся только их цвет и отклик */
.money-chip, .cart-chip, .ycoin-chip {
    background: var(--panel-2);
    font-variant-numeric: tabular-nums;
}
.money-chip { color: var(--accent); font-weight: 700; }
.money-chip:hover, .cart-chip:hover, .ycoin-chip:hover { border-color: var(--accent); }
.money-chip:active, .cart-chip:active, .ycoin-chip:active { transform: translateY(1px); }
.cart-chip { position: relative; color: var(--text); }
.cart-chip:hover { color: var(--text); }   /* корзина - значок, он не зеленеет */
/* YCoin - вторая валюта рядом с рублями: золотая монета + число + код.
   position:relative - под бейдж акции xN над чипом */
.ycoin-chip { position: relative; display: inline-flex; align-items: center; gap: 7px;
    color: #f3d9a4; font-weight: 700; }
.ycoin-chip i { color: #f59e0b; font-size: 14px; }
.ycoin-chip__num { color: var(--text); }
.ycoin-chip__cur { font-size: 11px; font-weight: 800; letter-spacing: .4px; color: #f59e0b; }
/* акция на курс обмена: золотая пилюля-счётчик над чипом, как cart-chip__count,
   но своим акцентом - акция про YCoin, а не про корзину */
.ycoin-chip__promo { position: absolute; top: -8px; right: -7px; min-width: 19px;
    height: 18px; padding: 0 5px; border-radius: 9px; background: #ffd166;
    color: #241a05; border: 2px solid var(--bg, #0b0a14);
    font-size: 10.5px; font-weight: 800; line-height: 14px; text-align: center;
    font-variant-numeric: tabular-nums; }
.cart-chip__count {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px;
    border-radius: 9px; background: var(--accent); color: #10130f;
    font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px;
}

/* колокольчик уведомлений: выпадашка на <details>, без JS */
.bell { position: relative; }
.bell__btn { position: relative; display: inline-flex; align-items: center;
    justify-content: center; width: 36px; height: 36px; border-radius: 50%;
    color: var(--muted); cursor: pointer; list-style: none;
    transition: color .15s ease, background-color .15s ease; }
.bell__btn::-webkit-details-marker { display: none; }
.bell__btn::marker { content: none; }
.bell__btn:hover { color: var(--text); background: var(--panel-2); }
.bell__btn[open] { color: var(--brand-light); }
.bell__btn i { font-size: 17px; }
.bell__count { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px;
    border-radius: 9px; background: var(--brand); color: #fff; font-size: 10px;
    font-weight: 700; display: grid; place-items: center; padding: 0 4px;
    border: 2px solid var(--bg, #0b0a14); }
.bell__drop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
    width: min(340px, 86vw); max-height: 380px; overflow-y: auto;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,.45); padding: 6px; }
.bell__item { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px;
    color: var(--text); text-decoration: none; }
.bell__item:hover { background: var(--panel-2); }
.bell__item b { font-size: 13.5px; }
.bell__item span { font-size: 12px; color: var(--muted); }
.bell__item--partner b::before { content: '\f0e0  '; font-family: 'Font Awesome 6 Free';
    font-weight: 900; color: var(--brand-light); }
.bell__item--support b::before { content: '\f075  '; font-family: 'Font Awesome 6 Free';
    font-weight: 900; color: var(--accent); }
.bell__item--wallet b::before { content: '\f555  '; font-family: 'Font Awesome 6 Free';
    font-weight: 900; color: var(--muted); }
.bell__empty { margin: 0; padding: 14px 12px; font-size: 13px; color: var(--muted);
    text-align: center; }
.bell__all { display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 4px; padding: 10px; border-radius: 10px; border-top: 1px solid var(--line);
    color: var(--brand-light); font-size: 13px; font-weight: 600; text-decoration: none; }
.bell__all:hover { background: var(--panel-2); }

/* страница истории уведомлений */
.ntf { max-width: 720px; margin: 0 auto; padding: 28px 0 48px; }
.ntf__title { display: flex; align-items: center; gap: 10px; font-size: 24px; margin: 0 0 20px; }
.ntf__title i { color: var(--brand-light); }
.ntf__group { margin-bottom: 22px; }
.ntf__group-title { display: flex; align-items: center; gap: 8px; font-size: 14px;
    text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.ntf__group-title i { color: var(--brand-light); }
.ntf__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ntf__item a { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px;
    background: var(--panel); border: 1px solid var(--line); color: var(--text);
    text-decoration: none; }
.ntf__item a:hover { border-color: var(--brand-light); }
.ntf__item b { font-size: 14px; }
.ntf__item span { font-size: 13px; color: var(--muted); }
.ntf__item time { font-size: 12px; color: var(--muted); justify-self: end; }

/* --- Мобильное меню на чекбоксе: без JS --- */
/* input.nav-toggle, а не .nav-toggle: правило `input[type="checkbox"]` (0-1-1)
   перебивало класс (0-1-0), и невидимый чекбокс оставался в потоке шапки,
   съедая 20px + gap и раздувая шапку на телефоне на сорок с лишним пикселей */
input.nav-toggle { position: absolute; width: 0; height: 0; margin: 0; opacity: 0;
    pointer-events: none; }
.nav-burger { display: none; width: 44px; height: 44px; flex: none; cursor: pointer;
    align-items: center; justify-content: center; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
    content: ''; display: block; width: 20px; height: 2px; background: var(--text); position: relative;
}
.nav-burger span::before { position: absolute; top: -6px; }
.nav-burger span::after { position: absolute; top: 6px; }

/* Шапка на ноутбуке и планшете: правый кластер перестаёт влезать в
   одну строку и переносился во вторую - рост шапки скакал вдвое.
   Правила ниже убавляют кластер по одному элементу, а не переносят его: ряд
   остаётся однострочным на любой ширине, а шаг смены состояния (гость/игрок)
   вообще ничего не двигает, потому что высоты у элементов общие */
@media (max-width: 1340px) {
    /* баланс и онлайн - первые кандидаты на уход: в шапке они стоили наложения
       пилюли на пункт меню, а оба есть в одном тапе (кошелёк - в кабинете,
       онлайн - на первом экране главной). Прячем саму рамку .head-balance:
       чипы внутри тоже уходят, пустая пилюля не должна висеть в ряду */
    .header__side .head-balance, .header .status { display: none; }
}
@media (max-width: 1040px) {
    /* ник становится лишним: аватар и есть вход в кабинет, а «MgPane…» с
       многоточием выглядит как сломанный интерфейс. Подпись гостя («Вход»)
       не трогаем: без неё пилюля осталась бы пустым кружком */
    .header__side .user-chip:not(.user-chip--empty) span { display: none; }
    .header__side .user-chip:not(.user-chip--empty) { padding: 0 5px; }
}
@media (max-width: 940px) {
    /* онлайн спрятан уже на 1340 px - правило оставлено на случай, если
       верхнее медиа-условие сдвинут: пилюля «1/200» не должна вернуться
       поверх «Сообщества» на полосе 861-910 px */
    .header .status { display: none; }
}

@media (max-width: 860px) {
    .nav-burger { display: flex; }
    .logo__img { height: 34px; }
    /* на телефоне полоса ниже: 44 px иконки + 10 px воздуха - выше не нужно */
    .header__inner { min-height: 68px; padding-block: 10px; gap: 12px; }
    /* шапка на телефоне не должна вылезать за экран: пилюля онлайна дублируется
       в первом экране главной, а её ширина и давала горизонтальный скролл */
    .header .status, .header__side .head-sep { display: none; }
    .header__side { gap: 6px; }
    .nav {
        /* top:100%, а не 68px: шапка на части экранов выше, и меню отрывалось бы от неё */
        position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column;
        gap: 0; background: var(--panel); border-bottom: 1px solid var(--line); padding: 6px 16px 12px;
        /* в ландшафте и на коротких экранах панель выше окна: прокручиваем её
           внутри, а не растягиваем страницу - горизонтального скролла тут быть не должно */
        max-height: calc(100vh - 58px); max-height: calc(100dvh - 58px); overflow-y: auto;
    }
    .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
    .nav a:last-child { border-bottom: 0; }
    /* в выпадающем меню пункты и так разделены линией, а активный держит
       цвет и жирность: полоска-подчёркивание рисовалась бы второй чертой */
    .nav a::after { display: none; }
    .nav a.is-active { font-weight: 700; }
    .nav-toggle:checked ~ .nav { display: flex; }
    /* чекбокс меню живёт в таб-порядке: без кольца с клавиатуры по нему не попасть */
    .nav-toggle:focus-visible ~ .nav-burger { outline: 2px solid var(--brand-light);
        outline-offset: 2px; border-radius: 8px; }
    table { display: block; overflow-x: auto; }
}

/* самый узкий телефон: слово-логотип уступает место знаку (ссылка остаётся и
   названием по alt), зато правый кластер встаёт в одну строку и у гостя, и у
   игрока - раньше гостевой набор «Вход + Регистрация» был шире игрового и
   переносился, из-за чего шапка на 360 px меняла рост вместе с состоянием */
@media (max-width: 420px) {
    .logo__text { display: none; }
    .header__inner { gap: 8px 10px; }
    .header__side { gap: 8px; }
}

/* --- Пагинация --- */
.pager { display: flex; gap: 6px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.pager a, .pager span {
    padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel);
    font-size: 14px;
}
.pager .is-current { background: var(--accent); color: #10130f; border-color: transparent; font-weight: 600; }
.pager .is-disabled { opacity: .4; }

/* --- Формы --- */
.field { display: grid; gap: 6px; }
.field__label { font-size: 14px; color: var(--muted); }
.req { color: var(--danger); margin-left: 3px; }
/* поле пароля с «глазиком»: кнопка сидит внутри поля, type переключает JS */
.field__pw { position: relative; display: block; }
.field__pw input { padding-right: 44px; }
.field__eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; cursor: pointer;
    font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 0;
    transition: color .15s ease, background .15s ease; }
.field__eye:hover { color: var(--brand-light); background: var(--panel-2); }
.field__eye:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 1px; }
.field__eye.is-on { color: var(--brand-light); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); }
/* сам чекбокс рисует общий слой контролов (см. «единый слой контролов») */
.check input[type=checkbox] { margin: 1px 0 0; }
.check a { color: var(--brand-light); text-decoration: underline; text-underline-offset: 2px; }
.check a:hover { color: #fff; }
.fielderror { color: var(--danger); font-size: 13px; font-style: normal; }

/* --- Корзина: позиции слева, «к оплате» справа --- */
.cart-title { margin-bottom: 2px; }
.cart-count { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); }
.cart__cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.cart__main { display: grid; gap: 12px; min-width: 0; }

.cart-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; }
.cart-alert { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 14px;
    color: #eab96a; background: rgba(224, 163, 60, .10); border: 1px solid rgba(224, 163, 60, .35); }
.cart-alert i { flex: none; margin-top: 2px; }

.cart-line { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto 130px 34px; gap: 14px;
    align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line__media { display: block; width: 60px; height: 60px; border-radius: 12px; overflow: hidden;
    background: var(--panel-2); border: 1px solid var(--line); }
.cart-line__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-line__info { min-width: 0; }
.cart-line__name { font-weight: 700; }
.cart-line__meta { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.cart-line__qty { display: grid; gap: 5px; justify-items: start; }
.cart-line__cap { font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.cart-line__sum { text-align: right; font-size: 17px; font-weight: 800; white-space: nowrap; }
.cart-line__del { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
    font: inherit; font-size: 14px; color: var(--muted); background: transparent; border: 1px solid var(--line);
    transition: color .15s ease, border-color .15s ease, background .15s ease; }
.cart-line__del:hover { color: var(--danger); border-color: var(--danger); background: rgba(217, 83, 79, .12); }

.cart-note { display: flex; gap: 9px; margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.cart-note i { flex: none; margin-top: 3px; color: var(--brand-light); }

.cart__side { display: grid; gap: 12px; position: sticky; top: 88px; align-self: start; }
.cart-summary { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.cart-summary__title { margin: 0 0 12px; font-size: 17px; }
.cart-summary__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.cart-summary__row span { font-size: 14px; color: var(--muted); }
.cart-summary__row b { font-size: 21px; color: var(--accent); }
.cart-summary__check { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 9px 11px;
    border-radius: 10px; font-size: 13px; color: #9bd87f;
    background: rgba(99, 176, 74, .12); border: 1px solid rgba(99, 176, 74, .3); }
.cart-summary__check b { color: inherit; }
.cart-summary__check.is-bad { color: #eab96a; background: rgba(224, 163, 60, .12); border-color: rgba(224, 163, 60, .32); }
.cart-summary__actions { display: grid; gap: 8px; margin-top: 16px; }
.cart-summary__clear { justify-self: center; padding: 2px; background: none; border: 0; cursor: pointer; font: inherit;
    font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.cart-summary__clear:hover { color: var(--danger); }
.cart-summary__back { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 13px;
    color: var(--brand-light); }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:disabled:hover { background: var(--accent); }

.cart-wallet { display: grid; gap: 2px; padding: 16px; border-radius: 16px; border: 1px solid var(--line);
    background: linear-gradient(150deg, rgba(99, 176, 74, .14), rgba(99, 176, 74, 0) 62%), var(--panel); }
.cart-wallet__label { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.cart-wallet__value { font-size: 24px; font-weight: 800; line-height: 1.15; color: var(--accent); }
.cart-wallet__link { font-size: 13px; color: var(--brand-light); }

.cart-empty { max-width: 460px; margin: 40px auto; text-align: center; padding: 40px 24px;
    background: var(--panel); border: 1px dashed var(--line); border-radius: 18px; }
.cart-empty__icon { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 18px;
    font-size: 24px; color: var(--brand-light); background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .35); }
.cart-empty__title { margin: 14px 0 6px; font-size: 22px; }
.cart-empty p { margin: 0 0 18px; }

/* --- Оформление заказа (шаги и итоги) --- */
.cart-total { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 17px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

@media (max-width: 900px) {
    .cart__cols { grid-template-columns: 1fr; }
    .cart__side { position: static; }
}
@media (max-width: 620px) {
    .cart-card { padding: 4px 14px; }
    .cart-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
    .cart-line__media { width: 48px; height: 48px; }
    .cart-line__info { flex: 1 1 150px; }
    .cart-line__qty { flex: 1 1 100%; justify-items: start; }
    .cart-line__sum { margin-left: auto; }
}

/* --- Шаги «как начать» в кабинете --- */
.steps { display: grid; gap: 10px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps li::before {
    counter-increment: step; content: counter(step); width: 26px; height: 26px; border-radius: 50%;
    background: var(--panel-2); color: var(--muted); display: grid; place-items: center; font-size: 13px;
}
.steps li.is-done { opacity: .6; }
.steps li.is-done::before { content: '✓'; background: var(--accent); color: #10130f; }

/* --- Пустые состояния --- */
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty__icon { font-size: 34px; display: block; margin-bottom: 8px; }

/* --- Хлебные крошки --- */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); text-decoration: underline; }


/* pending-состояние после сабмита: кнопка остаётся «включённой» для form data,
   но не реагирует на клики и приглушена */
.is-pending { opacity: .55; pointer-events: none; cursor: progress; }
