/* Seven menu pages: phone cards and forms; desktop uses the original styles. */
.gx-mobile-top-action { display: none; }
/* Settings belong opposite the list title, on both phone and desktop. */
html body.gx-body .gx-moderation-list-heading { display: none !important; }
html body.gx-body .gx-panel__head.gx-moderation-heading {
    display: flex;
    position: relative;
    flex-wrap: wrap;
    align-items: center;
    min-height: 44px;
}
html body.gx-body .gx-moderation-heading > h2 {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-right: 60px;
    margin: 0;
}
html body.gx-body .gx-moderation-heading > .gx-cases-panel.gx-mod-settings {
    position: static;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}
html body.gx-body .gx-moderation-heading > .gx-mod-settings:not([open]) { flex-basis: 0; width: 0; }
html body.gx-body .gx-moderation-heading > .gx-mod-settings > summary {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--ves-accent-line, var(--gx-gold-line, #766324));
    border-radius: 10px;
    background: var(--ves-raised, var(--gx-card-2, #211e14));
    color: var(--ves-accent, var(--gx-gold, #f5c518));
    font-size: 16px;
    list-style: none;
    cursor: pointer;
}
html body.gx-body .gx-moderation-heading > .gx-mod-settings > summary::-webkit-details-marker { display: none; }
html body.gx-body .gx-moderation-heading > .gx-mod-settings > summary::before,
html body.gx-body .gx-moderation-heading > .gx-mod-settings > summary::after { display: none; }
@media (max-width: 767.98px) {
    html[data-gx-mobile-page] body.gx-body {
        --gx-mobile-accent: var(--ves-accent, var(--gx-gold, #f5c518));
        --gx-mobile-line: var(--ves-accent-line, var(--gx-gold-line, rgba(245,197,24,.35)));
        --gx-mobile-panel: var(--ves-panel, var(--gx-card, #15151a));
        --gx-mobile-raised: var(--ves-raised, var(--gx-card-2, #1b1b22));
        --gx-mobile-text: var(--ves-text, var(--gx-text, #ececf1));
        --gx-mobile-muted: var(--ves-muted, var(--gx-muted, #8b8b99));
    }
    html[data-gx-mobile-page] body.gx-body :is(.gx-stats, .gx-page-block, .gx-panel, .gx-page-body, .gx-cases-panel, .gx-cases-toolbar, .gx-team, .gx-feedback) {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    html[data-gx-mobile-page] body.gx-body .gx-container > .gx-row { margin-left: 0 !important; margin-right: 0 !important; }
    html[data-gx-mobile-page] body.gx-body :is(.gx-stats, .gx-page-block, .gx-cases-panel, .gx-cases-toolbar) {
        padding: 14px !important;
        border-radius: 14px;
        background: var(--gx-mobile-panel) !important;
        background-image: none !important;
        border-color: var(--gx-mobile-line) !important;
        color: var(--gx-mobile-text);
    }
    html[data-gx-mobile-page] body.gx-body :is(.gx-stats__head, .gx-panel__head, .gx-cases-heading) {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
    }
    html[data-gx-mobile-page] body.gx-body :is(.gx-stats__head, .gx-panel__head, .gx-cases-heading) h2 {
        font-size: 21px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }
    html[data-gx-mobile-page] body.gx-body :is(.gx-stats__head, .gx-panel__head) > div { min-width: 0; }
    html[data-gx-mobile-page] body.gx-body .gx-panel__head > :is(.gx-panel__eyebrow, p) { flex-basis: 100%; }
    html[data-gx-mobile-page] body.gx-body :is(.gx-stats__head p, .gx-panel__head p, .gx-page-lead, .gx-mod-counts) {
        color: var(--gx-mobile-muted);
        overflow-wrap: anywhere;
    }
    html[data-gx-mobile-page="complaints"] body.gx-body .gx-mobile-top-action {
        display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px;
        padding: 10px 14px; border: 1px solid var(--gx-mobile-line); border-radius: 9px;
        color: var(--gx-mobile-accent); background: var(--gx-mobile-raised); text-decoration: none;
    }
    html[data-gx-mobile-page="complaints"] body.gx-body .gx-mobile-source-action { display: none; }
    html[data-gx-mobile-page] body.gx-body :is(.gx-cases-toolbar, .gx-users__toolbar) {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    html[data-gx-mobile-page] body.gx-body :is(.gx-cases-toolbar > *, .gx-users__toolbar > *, .gx-inline-server, .gx-mod-server-picker) {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }
    html[data-gx-mobile-page] body.gx-body .gx-cases-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
    html[data-gx-mobile-page] body.gx-body .gx-cases-tab { flex: 1 1 110px; min-width: 0; white-space: normal; }
    html[data-gx-mobile-page] body.gx-body :is(.gx-cases-search, .gx-users__search) { min-width: 0; }
    html[data-gx-mobile-page] body.gx-body .gx-cases-search { display: flex; gap: 8px; }
    html[data-gx-mobile-page] body.gx-body .gx-cases-search input { min-width: 0; width: 0; flex: 1; }
    html[data-gx-mobile-page] body.gx-body :is(.gx-case-btn, .gx-cases-tab, .gx-unban__cta, .gx-group-trigger, .gx-server-select__toggle) {
        min-height: 44px;
        max-width: 100%;
        box-sizing: border-box;
    }
    html[data-gx-mobile-page] body.gx-body :is(.gx-case-btn:not(.is-danger), .gx-cases-tab.is-active) {
        background: var(--gx-mobile-raised) !important;
        border-color: var(--gx-mobile-line) !important;
        color: var(--gx-mobile-accent) !important;
    }
    html[data-gx-mobile-page] body.gx-body :is(.gx-server-select__toggle, .gx-server-select__menu, .gx-group-trigger, .gx-group-options) {
        max-width: 100%;
        background: var(--gx-mobile-raised) !important;
        border-color: var(--gx-mobile-line) !important;
        color: var(--gx-mobile-text) !important;
    }
    html[data-gx-mobile-page] body.gx-body :is(.gx-server-select__option, .gx-group-options button) {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* Only prepared list tables become cards. Modal/detail tables are excluded. */
    html[data-gx-mobile-page] body.gx-body .gx-mobile-table-wrap {
        overflow: visible !important; width: 100%; padding: 0; border: 0 !important;
        background: transparent; box-shadow: none;
    }
    /* Search and standalone punishment cards share the page, without a nested box. */
    html[data-gx-mobile-page="blocks"] body.gx-body .gx-cases-panel.gx-moderation-list-panel {
        padding: 0 !important;
        margin: 0;
        border: 0 !important;
        border-radius: 0;
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
    }
    html[data-gx-mobile-page="blocks"] body.gx-body .gx-moderation-list-panel > .gx-cases-search { margin: 0 0 16px; }
    html[data-gx-mobile-page="blocks"] body.gx-body .gx-moderation-list-panel > .gx-mod-counts { margin: 0 0 18px; }
    html[data-gx-mobile-page] body.gx-body table.gx-mobile-table {
        display: block;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100%;
        border: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0;
        table-layout: auto;
        background: transparent !important;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-table > :is(thead, colgroup) { display: none; }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-table > tbody { display: block; width: 100%; }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-table > tbody > .gx-mobile-record {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
        padding: 13px;
        margin: 0 0 12px;
        border: 1px solid var(--gx-mobile-line);
        border-radius: 12px;
        background: var(--gx-mobile-raised);
        color: var(--gx-mobile-text);
        animation: none !important;
    }
    html[data-gx-mobile-page] body.gx-body table.gx-mobile-table > tbody > .gx-mobile-record > td {
        display: block;
        height: auto !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: var(--gx-mobile-text);
        font-size: 13px;
        text-align: left;
        white-space: normal !important;
        overflow: visible;
        overflow-wrap: anywhere;
        line-height: 1.5;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record > td[data-gx-mobile-label]::before {
        content: attr(data-gx-mobile-label);
        display: block;
        margin-bottom: 4px;
        color: var(--gx-mobile-muted);
        font-size: 11px;
        font-weight: 400;
    }
    html[data-gx-mobile-page] body.gx-body table.gx-mobile-table > tbody > .gx-mobile-record > td[data-gx-mobile-field="player"] {
        order: -1;
        grid-column: 1 / -1;
        padding-bottom: 12px !important;
        border-bottom: 1px solid var(--gx-mobile-line) !important;
        font-weight: 700;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record > td[data-gx-mobile-field="player"]::before,
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record > td[data-gx-mobile-field="action"]::before { display: none; }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record > td[data-gx-mobile-field="wide"] { grid-column: 1 / -1; }
    /* A linked administrator keeps avatar, nickname and badge on one line. */
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record > td[data-gx-mobile-field="wide"] > a.user-profile {
        display: flex; flex-wrap: nowrap; align-items: center; gap: 10px;
        width: 100%; max-width: 100%; min-width: 0;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record a.user-profile > :is(i, .gx-account-name) {
        flex: 1 1 auto; min-width: 0; max-width: 100%; inline-size: auto !important;
        white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis;
        overflow-wrap: normal; word-break: normal;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record a.user-profile > :is(.gx-avatar, .small_us_av) {
        flex: 0 0 28px; --gx-avatar-size: 28px; width: 28px !important; height: 28px !important;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record a.user-profile > .gx-store-name-badge { flex: 0 0 22px; }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record > td[data-gx-mobile-field="wide"] > .gx-ban-nick--admin {
        display: block; max-width: 100%; white-space: nowrap !important;
        overflow: hidden; text-overflow: ellipsis;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record > td[data-gx-mobile-field="player"] > .gx-ban-nick--player {
        display: block; max-width: 100%; white-space: nowrap !important;
        overflow: hidden; text-overflow: ellipsis;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record > td[data-gx-mobile-field="action"] { grid-column: 1 / -1; order: 2; }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record > td[data-gx-mobile-field="action"] > :is(a, button) {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        padding: 9px 12px;
        border: 1px solid var(--gx-mobile-line);
        border-radius: 9px;
        background: var(--gx-mobile-panel);
        color: var(--gx-mobile-accent);
        text-decoration: none;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record td :is(p, .gx-case-user) { margin: 0; white-space: normal; }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record td[data-gx-mobile-field="player"] a {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-record td[data-gx-mobile-field="player"] :is(img, .gx-avatar, .gx-case-avatar-fallback) {
        flex-shrink: 0;
        width: 38px;
        height: 38px;
        object-fit: cover;
        border-radius: 50%;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-table > tbody > .hidden-tr,
    html[data-gx-mobile-page] body.gx-body .gx-mobile-table > tbody > .hidden-tr > td {
        display: block;
        height: 0 !important;
        min-height: 0;
        padding: 0 !important;
        border: 0 !important;
    }
    html[data-gx-mobile-page] body.gx-body .gx-mobile-empty-row,
    html[data-gx-mobile-page] body.gx-body .gx-mobile-empty-row > td { display: block; width: 100%; min-width: 0; white-space: normal; }
    html[data-gx-mobile-page] body.gx-body :is(.gx-cases-pager, .pagination, #pagination2) { max-width: 100%; flex-wrap: wrap; gap: 6px; }

    /* Users keep every existing action, with readable primary buttons. */
    html[data-gx-mobile-page="users"] body.gx-body .gx-users__list { gap: 12px; }
    html[data-gx-mobile-page="users"] body.gx-body .gx-users .gx-users__card {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding: 14px;
        background: var(--gx-mobile-raised);
        border: 1px solid var(--gx-mobile-line);
        border-radius: 12px;
    }
    html[data-gx-mobile-page="users"] body.gx-body .gx-users__player { grid-column: 1; grid-row: 1; }
    html[data-gx-mobile-page="users"] body.gx-body .gx-users .gx-users__num { grid-column: 2; grid-row: 1; color: var(--gx-mobile-muted); width: auto; }
    html[data-gx-mobile-page="users"] body.gx-body .gx-users .gx-users__id { display: none; }
    html[data-gx-mobile-page="users"] body.gx-body :is(.gx-users__name, .gx-users__group) { white-space: normal; overflow-wrap: anywhere; }
    html[data-gx-mobile-page="users"] body.gx-body .gx-users .gx-users__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
    html[data-gx-mobile-page="users"] body.gx-body .gx-users .gx-users__actions :is(a, button) {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: auto;
        border-color: var(--gx-mobile-line);
        color: var(--gx-mobile-accent) !important;
        order: 1;
    }
    html[data-gx-mobile-page="users"] body.gx-body .gx-users .gx-users__actions [data-gx-mobile-action="primary"] {
        flex: 1 1 100%;
        width: 100%;
        gap: 8px;
        padding: 9px;
        order: 0;
    }
    html[data-gx-mobile-page="users"] body.gx-body [data-gx-mobile-action="primary"]::after { content: attr(aria-label); font-size: 12px; }
    html[data-gx-mobile-page="users"] body.gx-body .gx-users__friend-feedback { flex-basis: 100%; max-width: 100%; }

    /* Application form and contacts use the project's own content and names. */
    html[data-gx-mobile-page="applications"] body.gx-body .gx-team__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    html[data-gx-mobile-page="applications"] body.gx-body :is(.gx-team__rules, .gx-team__form) {
        padding: 14px;
        border: 1px solid var(--gx-mobile-line);
        border-radius: 12px;
        background: var(--gx-mobile-raised);
        overflow-wrap: anywhere;
    }
    html[data-gx-mobile-page="applications"] body.gx-body .gx-team__rules { margin-bottom: 16px; }
    html[data-gx-mobile-page="applications"] body.gx-body .gx-team__rules :is(ol, ul) { padding-left: 20px; }
    html[data-gx-mobile-page="applications"] body.gx-body .gx-team__field { min-width: 0; }
    html[data-gx-mobile-page="applications"] body.gx-body .gx-team__field :is(input, select, textarea) {
        width: 100%; max-width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box;
        background: var(--gx-mobile-panel) !important; color: var(--gx-mobile-text) !important; border-color: var(--gx-mobile-line) !important;
    }
    html[data-gx-mobile-page="applications"] body.gx-body .gx-team__submit { width: 100%; min-height: 44px; background: var(--gx-mobile-accent); }
    html[data-gx-mobile-page="contacts"] body.gx-body .gx-contact-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0 0 18px; }
    html[data-gx-mobile-page="contacts"] body.gx-body .gx-contact-list__item {
        display: flex; flex-direction: column; gap: 8px; padding: 14px; margin: 0;
        border: 1px solid var(--gx-mobile-line); border-radius: 12px; background: var(--gx-mobile-raised);
        min-width: 0; overflow-wrap: anywhere;
    }
    html[data-gx-mobile-page="contacts"] body.gx-body .gx-contact-list__item strong { color: var(--gx-mobile-text); }
    html[data-gx-mobile-page="contacts"] body.gx-body .gx-contact-list__sep { display: none; }
    html[data-gx-mobile-page="contacts"] body.gx-body .gx-contact-list__item a { color: var(--gx-mobile-accent) !important; overflow-wrap: anywhere; word-break: normal; }
    html[data-gx-mobile-page="contacts"] body.gx-body .gx-contact-list__empty { margin: 0; }
    html[data-gx-mobile-page="contacts"] body.gx-body .gx-dl__link-row { grid-template-columns: minmax(0, 1fr); }
    html[data-gx-mobile-page="contacts"] body.gx-body .gx-dl__field { min-width: 0; }
    html[data-gx-mobile-page="contacts"] body.gx-body .gx-dl__field input { min-width: 0; max-width: 100%; }

    /* Frame, name and counters occupy separate rows on phone profiles. */
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__hero-brand {
        position: relative; top: auto; right: auto; align-items: center;
        padding: 16px 16px 0; text-align: center; overflow-wrap: anywhere;
    }
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__hero-inner {
        flex-direction: column !important; flex-wrap: nowrap !important;
        align-items: center !important; gap: 28px; padding: 24px 18px 20px; min-height: 0;
    }
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__avatar-wrap {
        flex: 0 0 auto; width: 96px; height: 96px; margin: 0;
    }
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__avatar-wrap > .gx-avatar {
        --gx-avatar-size: 96px !important;
        width: 96px !important; height: 96px !important;
    }
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__intro {
        flex: 0 1 auto; width: 100%; min-width: 0; padding: 0; text-align: center;
    }
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__name {
        display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px;
        max-width: 100%; margin: 0 0 10px; font-size: 22px; line-height: 1.4;
        white-space: normal; overflow-wrap: anywhere;
    }
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__name > span {
        min-width: 0; max-width: 100%; white-space: normal !important; overflow-wrap: anywhere;
    }
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__activity {
        display: block; margin: 0; white-space: normal; overflow-wrap: anywhere;
    }
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__quick {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px;
        width: 100%; margin-top: 20px;
    }
    html body.gx-body.gx-profile-hub-page #gxProfile .gx-profile__stat-pill {
        min-width: 0; align-items: center; text-align: center; overflow-wrap: anywhere;
    }

    /* The nickname gets its own full-width row in the knife ranking card. */
    html body.gx-body .gx-rating-page.gx-knife-rating .svinorez-neiro-list > .svinorez-neiro-row {
        display: grid !important; grid-template-columns: minmax(0, 1fr) auto;
        align-items: center; gap: 12px; min-width: 0;
    }
    html body.gx-body .gx-rating-page.gx-knife-rating .svinorez-neiro-row > .svinorez-neiro-nick {
        grid-column: 1 / -1; grid-row: 1; width: 100%; min-width: 0;
        overflow-wrap: normal; word-break: normal;
    }
    html body.gx-body .gx-rating-page.gx-knife-rating .svinorez-neiro-row > .svinorez-neiro-pos { grid-column: 1; grid-row: 2; }
    html body.gx-body .gx-rating-page.gx-knife-rating .svinorez-neiro-row > .svinorez-neiro-val { grid-column: 2; grid-row: 2; justify-self: end; }
    html body.gx-body .gx-rating-page.gx-knife-rating .svinorez-neiro-nick > .gx-account-card {
        display: flex; flex-wrap: nowrap; align-items: center; gap: 12px;
        width: 100%; min-width: 0; max-width: 100%; padding: 4px 0;
    }
    html body.gx-body .gx-rating-page.gx-knife-rating .svinorez-neiro-nick .gx-account-name {
        display: block;
        flex: 1 1 auto; min-width: 0; max-width: 100%; inline-size: auto !important;
        white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis;
        overflow-wrap: normal; word-break: normal;
    }
    html body.gx-body .gx-rating-page.gx-knife-rating .svinorez-neiro-nick .gx-account-card > .gx-avatar {
        flex: 0 0 32px; width: 32px !important; height: 32px !important;
    }
}
