/* Высота окна: 100dvh (учёт панелей ОС/браузера), иначе 100vh. + border-box везде — иначе padding + 100vh вылезает за экран. */
:root {
    --app-vh: 100vh;
    --brand-ink: #080A12;
    --brand-panel: #11152A;
    --brand-blue: #4856E8;
    --brand-violet: #8B5CF6;
    --brand-cyan: #22D3EE;
    --brand-grad: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    --brand-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 36px rgba(72, 86, 232, 0.18);
}
@supports (height: 100dvh) {
    :root {
        --app-vh: 100dvh;
    }
}
@supports (height: 100svh) {
    :root {
        --app-vh: 100svh;
    }
}
html {
    height: 100%;
    height: -webkit-fill-available;
    background-color: #080A12;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial;
    background-color: #12081c;
    background-image:
        linear-gradient(180deg, rgba(8, 10, 18, 0.72) 0%, rgba(18, 8, 28, 0.55) 45%, rgba(40, 8, 32, 0.62) 100%),
        url("/assets/custom/bg-plexus.jpg");
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Скроллбары как в «Смене мутаций» (WebKit / Chromium + Firefox) */
* {
    scrollbar-width: thin;
    scrollbar-color: #4a9fd0 rgba(255, 255, 255, 0.08);
}
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
*::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
*::-webkit-scrollbar-corner {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6ec8ff, #3c89c5);
    border-radius: 10px;
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7ed4ff, #559fd4);
}

/* Все кнопки: pointer + яркая подсветка при наведении (без ломки background-градиентов) */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.user-friend-btn,
.btn-admin,
.small-btn,
.notify-btn,
.admin-scope-btn,
.profile-edit-btn,
.profile-v2-social,
.pe-banner-preset,
.pe-frame-item,
.rating-ach-btn,
.menu button,
.card button,
.actions button,
[role="button"] {
    cursor: pointer;
    transition: filter 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
button:hover:not(:disabled):not([disabled]),
input[type="button"]:hover:not(:disabled),
input[type="submit"]:hover:not(:disabled),
input[type="reset"]:hover:not(:disabled),
.user-friend-btn:hover:not(:disabled),
.btn-admin:hover:not(:disabled),
.small-btn:hover:not(:disabled),
.notify-btn:hover:not(:disabled),
.admin-scope-btn:hover:not(:disabled),
.profile-edit-btn:hover:not(:disabled),
.profile-v2-social:hover:not(:disabled),
.pe-banner-preset:hover,
.pe-frame-item:hover:not(.locked),
.rating-ach-btn:hover,
.menu button:hover:not(:disabled),
.card button:hover:not(:disabled),
.actions button:hover:not(:disabled),
[role="button"]:hover:not([aria-disabled="true"]) {
    filter: brightness(1.28) saturate(1.25);
    box-shadow:
        0 0 0 2px rgba(125, 211, 252, 0.75),
        0 0 16px rgba(56, 189, 248, 0.55),
        0 0 32px rgba(168, 85, 247, 0.35),
        0 6px 16px rgba(0, 0, 0, 0.25);
}
.topbar .notify-btn:hover:not(:disabled),
.topbar .balance-btn:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.4);
}
button:active:not(:disabled):not([disabled]),
.user-friend-btn:active:not(:disabled),
.btn-admin:active:not(:disabled),
.small-btn:active:not(:disabled),
.profile-v2-social:active:not(:disabled),
[role="button"]:active:not([aria-disabled="true"]) {
    filter: brightness(1.12);
    transform: translateY(1px);
    box-shadow:
        0 0 0 2px rgba(125, 211, 252, 0.55),
        0 0 12px rgba(56, 189, 248, 0.35);
}
button:disabled,
button[disabled],
input[type="button"]:disabled,
input[type="submit"]:disabled,
.user-friend-btn:disabled,
.btn-admin:disabled,
.small-btn:disabled,
.profile-v2-social:disabled {
    cursor: not-allowed;
    filter: grayscale(0.15);
    opacity: 0.62;
    box-shadow: none;
    transform: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.16;
    background-image:
        url("/assets/custom/deco-7.png"),
        url("/assets/custom/deco-6.png"),
        url("/assets/custom/deco-5.png"),
        url("/assets/custom/deco-8.png"),
        url("/assets/custom/deco-2.png"),
        url("/assets/custom/deco-3.png");
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-size: 300px, 260px, 220px, 240px, 170px, 170px;
    background-position:
        right -40px top 46px,
        left -40px bottom 40px,
        56% 42%,
        72% 78%,
        20% 28%,
        38% 70%;
}

body.auth-login {
    overflow: hidden;
    height: var(--app-vh);
    max-height: var(--app-vh);
    min-height: var(--app-vh);
    min-height: -webkit-fill-available;
    overscroll-behavior: none;
    background-color: #080A12;
    background-image: none;
}
body.auth-login::before {
    display: none;
}

/* ===== LOGIN (premium launcher) ===== */
.login {
    --twod-ink: #080A12;
    --twod-panel: #11152A;
    --twod-blue: #4856E8;
    --twod-violet: #8B5CF6;
    --twod-cyan: #22D3EE;
    --twod-grad: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    min-height: var(--app-vh);
    min-height: -webkit-fill-available;
    height: var(--app-vh);
    max-height: var(--app-vh);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    background: var(--twod-ink);
}
.login-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #071018;
}
.login-bg-slide {
    position: absolute;
    inset: -3%;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.2s ease-in-out;
    will-change: opacity, transform;
    animation: none;
    z-index: 0;
    pointer-events: none;
}
.login-bg-slide.is-active {
    opacity: 1;
    z-index: 1;
    animation: loginBgKenBurns 12s ease-in-out forwards;
}
@keyframes loginBgKenBurns {
    from { transform: scale(1.06) translate3d(0, 0, 0); }
    to { transform: scale(1.14) translate3d(-1.4%, 0.8%, 0); }
}
.login-splash-dots {
    position: absolute;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(8, 10, 18, 0.35);
    border: 1px solid rgba(165, 180, 252, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.login-splash-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(226, 232, 240, 0.35);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.login-splash-dots button:hover {
    background: rgba(167, 139, 250, 0.75);
}
.login-splash-dots button.is-active {
    background: linear-gradient(115deg, #22D3EE, #8B5CF6);
    transform: scale(1.28);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
}
.login-bg-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 58% 72% at 18% 48%, rgba(8, 10, 18, 0.82) 0%, rgba(17, 21, 42, 0.45) 42%, transparent 74%),
        linear-gradient(90deg, rgba(8, 10, 18, 0.8) 0%, rgba(8, 10, 18, 0.45) 28%, rgba(8, 10, 18, 0.12) 52%, transparent 70%),
        linear-gradient(180deg, rgba(8, 10, 18, 0.32) 0%, transparent 24%, transparent 72%, rgba(8, 18, 28, 0.48) 100%);
}
.login-dino-glow {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    right: 6%;
    top: 28%;
    width: min(42vw, 520px);
    height: min(48vw, 560px);
    border-radius: 50%;
    background:
        radial-gradient(circle at 45% 42%, rgba(72, 86, 232, 0.22) 0%, rgba(139, 92, 246, 0.12) 38%, transparent 68%),
        radial-gradient(circle at 55% 55%, rgba(34, 211, 238, 0.12) 0%, transparent 55%);
    filter: blur(8px);
    animation: loginDinoGlowPulse 10s ease-in-out infinite alternate;
}
@keyframes loginDinoGlowPulse {
    from { opacity: 0.55; transform: scale(1); }
    to { opacity: 0.85; transform: scale(1.04); }
}
.login-fx {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.login-fx::before,
.login-fx::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.4;
    animation: loginFogFloat 16s ease-in-out infinite alternate;
}
.login-fx::before {
    width: 48vw;
    height: 48vw;
    left: -10%;
    bottom: -14%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.38), transparent 70%);
}
.login-fx::after {
    width: 32vw;
    height: 32vw;
    left: 16%;
    top: 6%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 70%);
    animation-delay: -6s;
}
@keyframes loginFogFloat {
    from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.28; }
    to { transform: translate3d(4%, -3%, 0) scale(1.08); opacity: 0.45; }
}
.login-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.6px 1.6px at 12% 28%, rgba(34, 211, 238, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 28% 72%, rgba(139, 92, 246, 0.65), transparent),
        radial-gradient(1.2px 1.2px at 48% 18%, rgba(72, 86, 232, 0.55), transparent),
        radial-gradient(1.4px 1.4px at 72% 42%, rgba(34, 211, 238, 0.45), transparent),
        radial-gradient(1.3px 1.3px at 82% 30%, rgba(139, 92, 246, 0.5), transparent),
        radial-gradient(1.2px 1.2px at 88% 68%, rgba(255, 255, 255, 0.35), transparent);
    animation: loginParticlesDrift 22s linear infinite;
    opacity: 0.6;
}
@keyframes loginParticlesDrift {
    from { transform: translateY(0); }
    to { transform: translateY(-18px); }
}

.login-beta-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    background:
        linear-gradient(rgba(8, 10, 18, 0.82), rgba(8, 10, 18, 0.82)) padding-box,
        var(--twod-grad) border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e0f2fe;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    cursor: pointer;
    box-shadow: none; opacity: 0.45;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.login-beta-badge:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
}
.login-beta-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--twod-grad);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
}

.login-shell {
    position: relative;
    z-index: 3;
    width: min(94vw, 560px);
    margin-left: clamp(24px, 8vw, 96px);
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
}
.login-shell::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 8%;
    width: 140%;
    height: 110%;
    transform: translateX(-50%);
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 50% at 50% 28%, rgba(72, 86, 232, 0.28) 0%, transparent 70%),
        radial-gradient(ellipse 70% 60% at 50% 55%, rgba(17, 21, 42, 0.72) 0%, rgba(8, 10, 18, 0.35) 55%, transparent 78%);
    filter: blur(2px);
}
.login-brand {
    text-align: center;
    padding: 4px 8px 0;
}
.login-brand-logo {
    display: none;
}
.login-brand-title {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: clamp(32px, 4.8vw, 46px);
    font-weight: 900;
    letter-spacing: 0.14em;
    line-height: 1.05;
    color: #f8fafc;
}
.login-brand-line {
    display: block;
}
.login-brand-title .grad {
    font-size: 1.15em;
    font-weight: 900;
    letter-spacing: 0.22em;
    background: var(--twod-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
    filter: drop-shadow(0 0 20px rgba(72, 86, 232, 0.5)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}
.login-brand-sub {
    margin: 14px 0 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--twod-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #8B5CF6;
    filter: drop-shadow(0 0 10px rgba(72, 86, 232, 0.25));
}
.login-brand-lead {
    margin: 8px 0 0;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.78);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.login-box {
    text-align: center;
    width: 100%;
    padding: 32px 28px 26px;
    margin: 0;
    border-radius: 24px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.78), rgba(8, 10, 18, 0.72)) padding-box,
        var(--twod-grad) border-box;
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 18px 50px rgba(0, 0, 0, 0.48),
        0 0 48px rgba(72, 86, 232, 0.22),
        0 0 18px rgba(139, 92, 246, 0.12);
}
.login-hint {
    margin: 18px 0 0;
    max-width: none;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 13px;
    line-height: 1.5;
    cursor: default;
}
.login-hint-text {
    display: inline;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(203, 213, 225, 0.78);
    background: none;
    -webkit-text-fill-color: unset;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
.login-hint:hover .login-hint-text {
    color: #e0f2fe;
    filter: none;
    background-image: none;
    text-shadow: 0 0 12px rgba(72, 86, 232, 0.55);
}
.login-box .btn.is-last-used {
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55), 0 0 18px rgba(72, 86, 232, 0.35);
}
.login-box .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.login-footer-links {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    margin-top: 4px;
}
.login-footer-discord {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    background:
        linear-gradient(rgba(8, 10, 18, 0.72), rgba(17, 21, 42, 0.78)) padding-box,
        var(--twod-grad) border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #e0f2fe;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 0 22px rgba(72, 86, 232, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.login-footer-discord:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 0 28px rgba(139, 92, 246, 0.4);
    color: #f8fafc;
}
.login-footer-discord svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: currentColor;
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.45));
}

.title {
    display: none;
}

.title-with-icon {
    display: inline-block;
}

.title-with-icon img {
    width: min(92vw, 620px);
    height: auto;
    object-fit: cover;
}

.login-box .btn {
    display: flex;
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
    min-height: 64px;
    padding: 16px 22px;
    border-radius: 14px;
    border: 1px solid rgba(246, 246, 246, 0.18);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    text-decoration: none;
    box-sizing: border-box;
}
.login-box .btn:last-of-type {
    margin-bottom: 0;
}
.login-box .btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}
.login-box .btn .btn-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(246, 246, 246, 0.95);
    padding: 5px;
    flex-shrink: 0;
}
.login-box .btn .btn-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-box .steam {
    background: linear-gradient(180deg, rgba(18, 22, 30, 0.96), rgba(8, 10, 14, 0.96));
    color: white;
    border-color: rgba(148, 163, 184, 0.28);
}
.login-box .steam:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 18px rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.35);
}
.login-box .discord {
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    color: white;
    border-color: rgba(165, 180, 252, 0.4);
}
.login-box .discord:hover {
    box-shadow: 0 8px 28px rgba(72, 86, 232, 0.4), 0 0 24px rgba(139, 92, 246, 0.35);
}
.btn .btn-icon.btn-icon-dark {
    background: rgba(8, 8, 12, 0.92);
}

@media (max-width: 900px) {
    .login {
        justify-content: center;
        align-items: center;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        height: var(--app-vh);
        max-height: var(--app-vh);
        min-height: var(--app-vh);
        min-height: -webkit-fill-available;
        padding:
            max(20px, env(safe-area-inset-top, 0px))
            18px
            max(20px, env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
    }
    .login-bg,
    .login-bg-shade,
    .login-dino-glow,
    .login-fx,
    .login-rain {
        position: fixed;
    }
    .login-bg {
        inset: 0;
    }
    .login-bg-slide {
        inset: 0;
        transform: none;
    }
    .login-bg-slide.is-active {
        animation: none;
        transform: scale(1.04);
    }
    .login-splash-dots {
        bottom: max(14px, env(safe-area-inset-bottom, 0px));
        padding: 7px 10px;
        gap: 8px;
    }
    .login-shell {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        gap: 14px;
        flex-shrink: 0;
        position: relative;
        z-index: 3;
    }
    .login-shell::before {
        width: 120%;
        height: 100%;
        top: 0;
    }
    .login-dino-glow {
        right: 50%;
        transform: translateX(50%);
        opacity: 0.3;
        top: 38%;
    }
    .login-bg-shade {
        background:
            radial-gradient(ellipse 95% 75% at 50% 40%, rgba(8, 10, 18, 0.82) 0%, rgba(8, 10, 18, 0.5) 48%, transparent 76%),
            linear-gradient(180deg, rgba(8, 10, 18, 0.5) 0%, rgba(8, 10, 18, 0.2) 30%, transparent 58%, rgba(40, 12, 6, 0.32) 100%);
    }
    .login-rain-drop {
        opacity: 0.45;
    }
    .login-brand {
        display: block;
        visibility: visible;
        opacity: 1;
        padding: 0 4px;
        margin: 0;
    }
    /* Android: без transparent fill — иначе заголовок может пропасть */
    .login-brand-title {
        font-size: clamp(24px, 6.5vw, 34px);
        gap: 4px;
    }
    .login-brand-title .grad {
        letter-spacing: 0.16em;
        font-size: 1.08em;
        background: none;
        -webkit-text-fill-color: #67e8f9;
        color: #67e8f9;
        filter: none;
        text-shadow:
            0 0 14px rgba(34, 211, 238, 0.55),
            0 0 28px rgba(139, 92, 246, 0.4);
    }
    .login-brand-sub {
        margin-top: 10px;
        font-size: 13px;
        background: none;
        -webkit-text-fill-color: #a5b4fc;
        color: #a5b4fc;
        filter: none;
        text-shadow: 0 0 12px rgba(72, 86, 232, 0.35);
    }
    .login-brand-lead {
        margin-top: 6px;
        font-size: 12px;
        line-height: 1.35;
        color: rgba(226, 232, 240, 0.8);
    }
    .login-box {
        padding: 20px 16px 16px;
        border-radius: 20px;
    }
    .login-box .btn {
        min-height: 52px;
        font-size: 15px;
        margin-bottom: 10px;
        padding: 12px 14px;
    }
    .login-hint {
        margin-top: 12px;
        font-size: 11px;
    }
    .login-footer-links {
        margin-top: 4px;
        margin-bottom: 0;
    }
    .login-footer-discord {
        padding: 10px 18px;
        font-size: 12px;
    }
    .login-beta-badge {
        top: max(10px, env(safe-area-inset-top, 0px));
        left: 12px;
    }
    .login-beta-badge {
        position: fixed;
    }
}
@media (max-width: 640px) {
    .login {
        padding:
            max(16px, env(safe-area-inset-top, 0px))
            14px
            max(16px, env(safe-area-inset-bottom, 0px));
    }
    .login-shell {
        max-width: 400px;
        gap: 12px;
    }
    .login-beta-badge {
        font-size: 10px;
        padding: 5px 10px;
    }
    .login-brand-title {
        font-size: clamp(22px, 6.8vw, 28px);
        letter-spacing: 0.08em;
    }
    .login-box {
        padding: 16px 12px 14px;
        border-radius: 18px;
    }
    .login-box .btn {
        min-height: 50px;
        font-size: 14px;
        border-radius: 12px;
        gap: 10px;
    }
    .login-box .btn .btn-icon {
        width: 28px;
        height: 28px;
    }
    .login-footer-discord {
        width: auto;
        min-width: 160px;
        max-width: none;
        justify-content: center;
    }
}
@media (max-width: 900px) and (max-height: 720px) {
    .login {
        justify-content: flex-start;
        padding-top: max(12px, env(safe-area-inset-top, 0px));
    }
    .login-shell {
        margin-top: 36px;
        gap: 10px;
    }
    .login-brand-lead {
        display: none;
    }
    .login-brand-sub {
        margin-top: 6px;
        font-size: 12px;
    }
    .login-brand-title {
        font-size: clamp(20px, 5.5vw, 26px);
    }
    .login-box {
        padding: 14px 12px 12px;
    }
    .login-box .btn {
        min-height: 46px;
        margin-bottom: 8px;
        font-size: 14px;
    }
    .login-hint {
        display: none;
    }
}
@media (max-width: 640px) and (max-height: 640px) {
    .login-brand-sub {
        font-size: 11px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .login-bg,
    .login-bg-slide,
    .login-bg-slide.is-active,
    .login-fx::before,
    .login-fx::after,
    .login-particles,
    .login-dino-glow,
    .login-rain-drop,
    .login-rain-bead {
        animation: none !important;
        transition: none !important;
    }
    .login-bg-slide.is-active {
        transform: none;
    }
    .login-rain-drop,
    .login-rain-bead {
        opacity: 0.35;
    }
}

/* Rain + glass droplets instead of fire/embers */
.login-rain {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.login-rain-falls,
.login-rain-glass {
    position: absolute;
    inset: 0;
}
.login-rain-drop {
    position: absolute;
    top: -12%;
    width: 1.5px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(186, 230, 253, 0.55) 35%, rgba(125, 211, 252, 0.85) 100%);
    box-shadow: 0 0 4px rgba(56, 189, 248, 0.25);
    animation: loginRainFall linear infinite;
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0) rotate(8deg);
}
@keyframes loginRainFall {
    0% { transform: translate3d(0, -10vh, 0) rotate(8deg); opacity: 0; }
    8% { opacity: 0.75; }
    90% { opacity: 0.55; }
    100% { transform: translate3d(10px, 115vh, 0) rotate(8deg); opacity: 0; }
}
.login-rain-bead {
    position: absolute;
    width: var(--bead-size, 5px);
    height: calc(var(--bead-size, 5px) * 1.35);
    border-radius: 55% 45% 60% 40% / 50% 55% 45% 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9) 0%, rgba(186, 230, 253, 0.45) 38%, rgba(56, 189, 248, 0.2) 70%, transparent 100%);
    box-shadow:
        inset 0 -1px 2px rgba(14, 165, 233, 0.35),
        0 0 6px rgba(125, 211, 252, 0.25);
    animation: loginRainBeadDrift ease-in-out infinite;
    opacity: 0.55;
    filter: blur(0.2px);
    will-change: transform, opacity;
}
@keyframes loginRainBeadDrift {
    0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.15; }
    15% { opacity: 0.7; }
    55% { transform: translate3d(6px, 28px, 0) scale(1.05); opacity: 0.55; }
    85% { opacity: 0.35; }
    100% { transform: translate3d(10px, 52px, 0) scale(0.92); opacity: 0.05; }
}
#testLoginModal.admin-detail-modal {
    background: rgba(8, 10, 18, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#testLoginModal .admin-detail-card,
#testLoginModal .test-login-card {
    width: min(440px, 94vw);
    text-align: left;
    padding: 28px 26px 24px;
    border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.88), rgba(8, 10, 18, 0.82)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 22px 56px rgba(0, 0, 0, 0.55),
        0 0 42px rgba(72, 86, 232, 0.22);
}
#testLoginModal h3 {
    margin: 0 0 8px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#testLoginModal .test-login-lead {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.72);
}
#testLoginModal label {
    display: block;
    margin: 0 0 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
}
#testLoginModal input {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 14px;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid rgba(72, 86, 232, 0.35);
    background: rgba(8, 10, 18, 0.65);
    color: #eef4ff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
#testLoginModal input::placeholder {
    color: rgba(148, 163, 184, 0.55);
}
#testLoginModal input:focus {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 3px rgba(72, 86, 232, 0.22), 0 0 16px rgba(139, 92, 246, 0.18);
}
#testLoginModal .support-action-row {
    display: flex;
    justify-content: stretch;
    gap: 10px;
    margin-top: 8px;
}
#testLoginModal .test-login-btn {
    flex: 1;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
#testLoginModal .test-login-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}
#testLoginModal .test-login-btn.cancel {
    background: linear-gradient(180deg, rgba(18, 22, 30, 0.96), rgba(8, 10, 14, 0.96));
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.28);
}
#testLoginModal .test-login-btn.cancel:hover {
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.2);
}
#testLoginModal .test-login-btn.submit {
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    color: #fff;
    border-color: rgba(165, 180, 252, 0.4);
    box-shadow: none; opacity: 0.45;
}
#testLoginModal .test-login-btn.submit:hover {
    box-shadow: 0 8px 28px rgba(72, 86, 232, 0.4), 0 0 24px rgba(139, 92, 246, 0.35);
}

/* ===== LAYOUT ===== */
.container {
    display: none;
    min-height: 0;
    height: var(--app-vh);
    max-height: var(--app-vh);
    overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 76px;
    align-self: stretch;
    min-height: 0;
    height: auto;
    padding: 16px 10px;
    overflow: hidden;
    transition: width 0.25s ease, padding 0.25s ease;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-right: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.55)) padding-box,
        linear-gradient(180deg, rgba(34, 211, 238, 0.35), rgba(72, 86, 232, 0.25), rgba(139, 92, 246, 0.3)) border-box;
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.28), inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar-main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 10px 6px 6px;
    border-top: 1px solid rgba(129, 140, 248, 0.22);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}
.sidebar-footer-card {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 6px;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.55), rgba(8, 10, 18, 0.4)) padding-box,
        linear-gradient(135deg, rgba(34, 211, 238, 0.35), rgba(72, 86, 232, 0.4), rgba(139, 92, 246, 0.35)) border-box;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.sidebar-deco-dino {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(8, 42, 62, 0.35);
    opacity: 1;
    line-height: 0;
    pointer-events: none;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.25);
}

.sidebar-deco-dino img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.55));
}

.sidebar-footer-copy {
    display: none;
    margin: 0;
    font-size: 9px;
    line-height: 1.3;
    color: rgba(148, 163, 184, 0.88);
    max-width: 100%;
}
.sidebar-footer-copy strong {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
    margin-bottom: 2px;
}

.sidebar:hover .sidebar-footer-copy {
    display: block;
}

.sidebar-footer-pay {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.sidebar:hover .sidebar-footer-pay {
    display: flex;
}

.sidebar-footer-pay .site-footer-pay-badge {
    min-height: 18px;
    padding: 0 7px;
    font-size: 8px;
    border-radius: 999px;
    background: rgba(8, 10, 18, 0.5);
    border-color: rgba(129, 140, 248, 0.28);
}

.sidebar:hover {
    width: 220px;
    padding: 18px 14px;
}

.logo {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 22px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(34, 211, 238, 0.4);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
    background: rgba(8, 10, 18, 0.5);
}

.menu button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(8, 10, 18, 0.42);
    border: 1px solid rgba(129, 140, 248, 0.22);
    color: #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.sidebar:hover .menu button {
    justify-content: flex-start;
}

.menu button img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    flex-shrink: 0;
}

.menu button .icon-profile {
    width: 18px;
    height: 18px;
}

.menu button .icon-dinos {
    width: 22px;
    height: 22px;
    border-radius: 0;
    filter: none;
    opacity: 1;
}

.menu button:hover {
    background: linear-gradient(115deg, rgba(34, 211, 238, 0.18), rgba(72, 86, 232, 0.28), rgba(139, 92, 246, 0.22));
    border-color: rgba(34, 211, 238, 0.45);
    color: #fff;
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.35);
    transform: translateY(-1px);
    filter: none;
}
.menu button:hover:not(:disabled) {
    filter: none;
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.35);
}

.menu button .nav-badge {
    position: absolute;
    right: 4px;
    bottom: 4px;
    min-width: 18px;
    height: 14px;
    padding: 0 3px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 14px;
    text-align: center;
    color: #0b1220;
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    opacity: 1;
    z-index: 2;
}
.logo .logo-text,
.menu .label {
    opacity: 0;
    width: 0;
    transition: opacity 0.2s ease, width 0.2s ease;
}

.sidebar:hover .logo .logo-text,
.sidebar:hover .menu .label {
    opacity: 1;
    width: auto;
}

/* ===== CONTENT ===== */
.content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
    height: 100%;
    max-height: 100%;
    padding: 8px 20px max(18px, env(safe-area-inset-bottom, 0px)) 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-main-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    /* запас снизу, чтобы футер и иконки не обрезались */
    padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: 20px;
}

.content-main-scroll > .section {
    position: relative;
    z-index: 1;
}

/* Верхняя панель (баланс, кнопки) — не уезжает при скролле основого контента */
.content-top-sticky {
    position: sticky;
    top: 0;
    z-index: 200;
    margin: 0 0 8px 0;
    padding: 2px 0 4px;
    background: linear-gradient(180deg, rgba(8, 10, 18, 0.92) 0%, rgba(8, 10, 18, 0.78) 85%, rgba(8, 10, 18, 0) 100%);
    box-shadow: none;
}

@supports (backdrop-filter: blur(4px)) {
    .content-top-sticky {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    position: relative;
    overflow: visible;
    z-index: 120;
    flex-wrap: wrap;
    min-height: 58px;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.88), rgba(8, 10, 18, 0.9)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: var(--brand-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.topbar-crawler-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    border-radius: inherit;
}

.topbar-crawler-video {
    position: absolute;
    pointer-events: none;
    left: 0;
    top: 0;
    width: 132px;
    height: 40px;
    object-fit: contain;
    opacity: 0;
    transform: translate3d(-180px, 0, 0) scale(0.95);
    transform-origin: center center;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.6));
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.topbar-ticker {
    flex: 1;
    min-width: 140px;
    height: 40px;
    margin: 0;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(8, 10, 18, 0.55);
    border: 1px solid rgba(72, 86, 232, 0.3);
    box-shadow: none;
}

.topbar-ticker::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--brand-grad);
    border-radius: 999px 0 0 999px;
    z-index: 3;
    pointer-events: none;
}

.topbar-ticker-viewport {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.topbar-ticker-scroll {
    display: flex;
    width: max-content;
    will-change: transform;
}

.topbar-ticker-scroll.topbar-ticker-scroll--idle {
    transform: none;
}

.topbar-ticker-group {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 0 28px 0 14px;
    white-space: nowrap;
}

.ticker-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(226, 232, 240, 0.92);
}

.ticker-chip-muted {
    font-weight: 500;
    opacity: 0.72;
    font-size: 12px;
}

.ticker-av {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(129, 140, 248, 0.35);
    flex-shrink: 0;
}

.ticker-ico {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.95;
    filter: drop-shadow(0 0 4px rgba(72, 86, 232, 0.35));
}

.ticker-sep-dot {
    opacity: 0.35;
    font-weight: 700;
    padding: 0 2px;
}

@media (prefers-reduced-motion: reduce) {
    .topbar-ticker-scroll {
        transform: none;
    }
}

.notify-wrap {
    position: relative;
}

.topbar .notify-btn,
.notify-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(72, 86, 232, 0.35);
    border-radius: 999px;
    background: rgba(17, 21, 42, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    padding: 0;
    transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.topbar .notify-btn:hover:not(:disabled),
.notify-btn:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.35);
    border-color: rgba(34, 211, 238, 0.55);
}

.notify-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.notify-dot {
    position: absolute;
    right: -2px;
    top: -2px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f87171, #db2777);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.45);
}

.notify-wrap > .notify-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(400px, 90vw);
    max-height: min(420px, 72vh);
    overflow-y: auto;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.98), rgba(8, 10, 18, 0.98)) padding-box,
        var(--brand-grad) border-box;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 12px;
    z-index: 10050;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 28px rgba(72, 86, 232, 0.25);
}

.notify-panel.hidden {
    display: none !important;
    pointer-events: none;
}

.action-timers-bar {
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-timer-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(17, 21, 42, 0.75);
    border: 1px solid rgba(72, 86, 232, 0.28);
    font-size: 12px;
}

.action-timer-chip button {
    border: none;
    border-radius: 999px;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: 700;
    background: var(--brand-grad);
    color: #fff;
}

.notify-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(8, 10, 18, 0.55);
    border: 1px solid rgba(129, 140, 248, 0.22);
    margin-bottom: 8px;
    color: #e2e8f0;
}

.notify-actions {
    display: inline-flex;
    gap: 6px;
}

.notify-actions button {
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
    background: rgba(72, 86, 232, 0.35);
    color: #fff;
    cursor: pointer;
}

.topbar-stats {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    padding: 0 4px;
}

.topbar-stats .al {
    color: #67e8f9;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}

.balance-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 9px 14px;
    background: var(--brand-grad);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.3);
    transition: filter 0.15s ease, transform 0.15s ease;
}

.balance-btn:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 0 22px rgba(72, 86, 232, 0.42);
}

.balance-btn img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(8, 10, 18, 0.5);
    border: 1px solid rgba(129, 140, 248, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lang-btn {
    border: none;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: rgba(226, 232, 240, 0.75);
    background: transparent;
    cursor: pointer;
}

.lang-btn.active {
    color: #fff;
    background: var(--brand-grad);
    box-shadow: 0 0 12px rgba(72, 86, 232, 0.4);
}

.sidebar-footer .lang-switch {
    margin: 0;
}

.lang-current-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background:
        linear-gradient(165deg, rgba(8, 42, 62, 0.55), rgba(8, 10, 18, 0.5)) padding-box,
        linear-gradient(135deg, rgba(34, 211, 238, 0.55), rgba(139, 92, 246, 0.45)) border-box;
    border: 1px solid transparent;
    color: #67e8f9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}

.sidebar .lang-current-badge {
    display: inline-flex;
}

.sidebar .lang-switch {
    display: none;
}

.sidebar:hover .lang-current-badge {
    display: none;
}

.sidebar:hover .lang-switch {
    display: inline-flex;
}

/* ===== CARDS ===== */
.cards {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.shop-filter,
.inventory-filter,
.ratings-filter {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 999px;
    background: rgba(34, 37, 44, 0.92);
    margin-bottom: 18px;
    overflow-x: auto;
    justify-content: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.ratings-filter {
    width: max-content;
    min-width: max-content;
    overflow-x: visible;
    flex-wrap: nowrap;
}

.section-sticky-head {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 2px 0 2px;
    background: linear-gradient(180deg, rgba(11, 15, 20, 0.96) 0%, rgba(11, 15, 20, 0.88) 100%);
    border-radius: 10px;
}

.section-sticky-head h2 {
    margin: 0;
    width: 100%;
    text-align: left;
}

.section-sticky-head .shop-filter,
.section-sticky-head .inventory-filter {
    margin: 0 auto;
    align-self: center;
}

#shop .section-sticky-head,
#inventory .section-sticky-head,
#clans .section-sticky-head,
#events .section-sticky-head {
    gap: 0;
    margin-bottom: 8px;
    padding: 0;
    top: 0;
}

#shop .section-sticky-head h2,
#inventory .section-sticky-head h2 {
    margin: 0 0 2px 0;
}

#shop .section-sticky-head .shop-filter,
#inventory .section-sticky-head .inventory-filter {
    margin: 0 auto 0;
    padding-top: 6px;
    padding-bottom: 6px;
}

#clans .section-sticky-head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px;
    width: 100%;
    max-width: min(1380px, calc(100vw - 24px));
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

#clans .section-sticky-head h2 {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
}

.clan-section-create-btn {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(217, 70, 239, 0.12));
    color: #f4f4f5;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 18px;
    cursor: pointer;
    white-space: nowrap;
}

.clan-section-create-btn:hover {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(217, 70, 239, 0.2));
}

.clan-create-modal-hint {
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.88;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-filter button,
.inventory-filter button,
.ratings-filter button {
    border: none;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #f6f6f6;
    padding: 12px 24px;
    font-size: 18px;
    white-space: nowrap;
    cursor: pointer;
}

.shop-filter button.active,
.inventory-filter button.active,
.ratings-filter button.active {
    background: rgba(255, 255, 255, 0.16);
}

.ratings-filter button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ratings-filter button img {
    width: 20px;
    height: 20px;
}

.users-search-wrap {
    max-width: 480px;
    margin: 0 auto 16px;
    padding: 0 8px;
}

.users-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(20, 26, 34, 0.95);
    color: #f6f6f6;
    font-size: 15px;
    outline: none;
}

.users-search-input::placeholder {
    color: rgba(246, 246, 246, 0.45);
}

.users-search-input:focus {
    border-color: rgba(196, 181, 253, 0.45);
}

.users-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 480px;
    margin: 12px auto 0;
    padding: 0 8px;
    font-size: 13px;
    color: rgba(234, 244, 255, 0.78);
}

.ratings-board {
    background: rgba(20, 26, 34, 0.95);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ratings-head {
    display: grid;
    grid-template-columns: 70px 1fr 88px 120px 108px 56px;
    gap: 12px;
    padding: 14px 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ratings-list {
    display: flex;
    flex-direction: column;
}

/* Внутренний скролл только для Рейтинга и Пользователей */
#ratings.active,
#users.active {
    display: flex;
    flex-direction: column;
    min-height: calc(var(--app-vh) - 170px);
    max-height: calc(var(--app-vh) - 170px);
    overflow: hidden;
}
#ratings.active .ratings-board,
#users.active .ratings-board {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}
#ratings.active .ratings-list,
#users.active .ratings-list {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

/* Заголовок резервирует ту же полосу скролла, что и список — колонки не «плывут» */
#ratings.active .ratings-head,
#users.active .ratings-head {
    scrollbar-gutter: stable;
}

.rating-row {
    display: grid;
    grid-template-columns: 70px 1fr 88px 120px 108px 56px;
    gap: 12px;
    padding: 14px 18px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rating-row:last-child {
    border-bottom: none;
}

/* Строка DIAMOND-пользователя в списках: лёгкий градиент как в оформлении профиля */
.rating-row.diamond-row {
    background: linear-gradient(100deg, rgba(8, 145, 178, 0.16), rgba(99, 102, 241, 0.10) 45%, rgba(192, 38, 211, 0.16));
    box-shadow: inset 3px 0 0 rgba(34, 211, 238, 0.55);
}
.chat-row.diamond-row {
    background: linear-gradient(100deg, rgba(8, 145, 178, 0.20), rgba(99, 102, 241, 0.13) 45%, rgba(192, 38, 211, 0.20));
    box-shadow: inset 3px 0 0 rgba(34, 211, 238, 0.55);
}
.chat-row.diamond-row.active {
    background: linear-gradient(100deg, rgba(8, 145, 178, 0.30), rgba(108, 99, 255, 0.30) 45%, rgba(192, 38, 211, 0.30));
}
/* Строка GOLD-пользователя: слабее и в золотых тонах */
.rating-row.gold-row {
    background: linear-gradient(100deg, rgba(217, 119, 6, 0.11), rgba(250, 204, 21, 0.06) 45%, rgba(180, 83, 9, 0.11));
    box-shadow: inset 3px 0 0 rgba(250, 204, 21, 0.45);
}
.chat-row.gold-row {
    background: linear-gradient(100deg, rgba(217, 119, 6, 0.15), rgba(250, 204, 21, 0.08) 45%, rgba(180, 83, 9, 0.15));
    box-shadow: inset 3px 0 0 rgba(250, 204, 21, 0.45);
}
.chat-row.gold-row.active {
    background: linear-gradient(100deg, rgba(217, 119, 6, 0.26), rgba(108, 99, 255, 0.22) 45%, rgba(180, 83, 9, 0.26));
}
/* Строка администрации (кроваво-красная) и модерации (синяя) */
.rating-row.admin-row {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.15), rgba(127, 29, 29, 0.08) 45%, rgba(153, 27, 27, 0.15));
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.6);
}
.chat-row.admin-row {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.19), rgba(127, 29, 29, 0.10) 45%, rgba(153, 27, 27, 0.19));
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.6);
}
.chat-row.admin-row.active {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.30), rgba(108, 99, 255, 0.22) 45%, rgba(153, 27, 27, 0.30));
}
.rating-row.mod-row {
    background: linear-gradient(100deg, rgba(59, 130, 246, 0.14), rgba(29, 78, 216, 0.07) 45%, rgba(37, 99, 235, 0.14));
    box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.6);
}
.chat-row.mod-row {
    background: linear-gradient(100deg, rgba(59, 130, 246, 0.18), rgba(29, 78, 216, 0.09) 45%, rgba(37, 99, 235, 0.18));
    box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.6);
}
.chat-row.mod-row.active {
    background: linear-gradient(100deg, rgba(59, 130, 246, 0.28), rgba(108, 99, 255, 0.24) 45%, rgba(37, 99, 235, 0.28));
}
/* Роль + привилегия: фон объединяет оба цвета, полоска остаётся ролевой */
.rating-row.admin-row.diamond-row, .chat-row.admin-row.diamond-row {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.17), rgba(99, 102, 241, 0.11) 50%, rgba(192, 38, 211, 0.15));
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.6);
}
.rating-row.admin-row.gold-row, .chat-row.admin-row.gold-row {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.16), rgba(250, 204, 21, 0.08) 50%, rgba(180, 83, 9, 0.14));
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.6);
}
.rating-row.mod-row.diamond-row, .chat-row.mod-row.diamond-row {
    background: linear-gradient(100deg, rgba(59, 130, 246, 0.16), rgba(99, 102, 241, 0.11) 50%, rgba(192, 38, 211, 0.15));
    box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.6);
}
.rating-row.mod-row.gold-row, .chat-row.mod-row.gold-row {
    background: linear-gradient(100deg, rgba(59, 130, 246, 0.15), rgba(250, 204, 21, 0.08) 50%, rgba(180, 83, 9, 0.14));
    box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.6);
}
/* Строка ютубера / контент-мейкера (специфичность #users/#ratings — иначе сетка списков перебивает фон) */
.rating-row.youtuber-row,
#users #usersRows .rating-row.youtuber-row,
#ratings #ratingsRows .rating-row.youtuber-row,
.clan-members-board.ratings-board .rating-row.youtuber-row {
    background: linear-gradient(100deg, rgba(255, 45, 85, 0.22), rgba(192, 38, 211, 0.12) 45%, rgba(190, 24, 93, 0.20)) !important;
    box-shadow: inset 3px 0 0 rgba(255, 45, 85, 0.75) !important;
}
.chat-row.youtuber-row {
    background: linear-gradient(100deg, rgba(255, 45, 85, 0.22), rgba(192, 38, 211, 0.12) 45%, rgba(190, 24, 93, 0.22));
    box-shadow: inset 3px 0 0 rgba(255, 45, 85, 0.7);
}
.chat-row.youtuber-row.active {
    background: linear-gradient(100deg, rgba(255, 45, 85, 0.32), rgba(108, 99, 255, 0.22) 45%, rgba(190, 24, 93, 0.32));
}
.rating-row.youtuber-row.diamond-row, .chat-row.youtuber-row.diamond-row,
#users #usersRows .rating-row.youtuber-row.diamond-row,
#ratings #ratingsRows .rating-row.youtuber-row.diamond-row {
    background: linear-gradient(100deg, rgba(255, 45, 85, 0.20), rgba(99, 102, 241, 0.12) 50%, rgba(192, 38, 211, 0.18)) !important;
    box-shadow: inset 3px 0 0 rgba(255, 45, 85, 0.75) !important;
}
.rating-row.youtuber-row.gold-row, .chat-row.youtuber-row.gold-row,
#users #usersRows .rating-row.youtuber-row.gold-row,
#ratings #ratingsRows .rating-row.youtuber-row.gold-row {
    background: linear-gradient(100deg, rgba(255, 45, 85, 0.18), rgba(250, 204, 21, 0.10) 50%, rgba(180, 83, 9, 0.16)) !important;
    box-shadow: inset 3px 0 0 rgba(255, 45, 85, 0.75) !important;
}
/* Строка Discord Booster: cyan → magenta */
.rating-row.booster-row,
#users #usersRows .rating-row.booster-row,
#ratings #ratingsRows .rating-row.booster-row,
.clan-members-board.ratings-board .rating-row.booster-row {
    background: linear-gradient(100deg, rgba(56, 189, 248, 0.14), rgba(168, 85, 247, 0.12) 50%, rgba(244, 114, 182, 0.16)) !important;
    box-shadow: inset 3px 0 0 rgba(244, 127, 255, 0.7) !important;
}
.chat-row.booster-row {
    background: linear-gradient(100deg, rgba(56, 189, 248, 0.16), rgba(168, 85, 247, 0.14) 50%, rgba(244, 114, 182, 0.18));
    box-shadow: inset 3px 0 0 rgba(244, 127, 255, 0.7);
}
.chat-row.booster-row.active {
    background: linear-gradient(100deg, rgba(56, 189, 248, 0.26), rgba(168, 85, 247, 0.22) 50%, rgba(244, 114, 182, 0.28));
}
.rating-row.admin-row.booster-row, .chat-row.admin-row.booster-row {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.16), rgba(168, 85, 247, 0.12) 50%, rgba(244, 114, 182, 0.14));
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.6);
}
.rating-row.mod-row.booster-row, .chat-row.mod-row.booster-row {
    background: linear-gradient(100deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.12) 50%, rgba(244, 114, 182, 0.14));
    box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.6);
}
.rating-row.youtuber-row.booster-row, .chat-row.youtuber-row.booster-row,
#users #usersRows .rating-row.youtuber-row.booster-row,
#ratings #ratingsRows .rating-row.youtuber-row.booster-row {
    background: linear-gradient(100deg, rgba(255, 45, 85, 0.18), rgba(168, 85, 247, 0.14) 50%, rgba(244, 114, 182, 0.18)) !important;
    box-shadow: inset 3px 0 0 rgba(255, 45, 85, 0.75) !important;
}
.rating-row.diamond-row.booster-row, .chat-row.diamond-row.booster-row {
    background: linear-gradient(100deg, rgba(8, 145, 178, 0.16), rgba(168, 85, 247, 0.14) 50%, rgba(244, 114, 182, 0.16));
}
.rating-row.gold-row.booster-row, .chat-row.gold-row.booster-row {
    background: linear-gradient(100deg, rgba(217, 119, 6, 0.12), rgba(168, 85, 247, 0.12) 50%, rgba(244, 114, 182, 0.14));
}
/* Плашки ролей рядом с ником в списках */
.admin-name-chip,
.mod-name-chip,
.youtuber-name-chip,
.youtuber-role-chip,
.booster-name-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    padding: 1px 7px 1px 4px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #fff;
    vertical-align: middle;
    background-size: 200% 100%;
    animation: diamondChipShimmer 2.8s ease-in-out infinite alternate;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.6;
}
.admin-name-chip {
    background: linear-gradient(100deg, #7f1d1d, #dc2626 50%, #991b1b 95%);
    border: 1px solid rgba(252, 165, 165, 0.5);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.35);
}
.mod-name-chip {
    background: linear-gradient(100deg, #1e3a8a, #3b82f6 50%, #1d4ed8 95%);
    border: 1px solid rgba(147, 197, 253, 0.5);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.35);
}
.youtuber-role-chip {
    background: linear-gradient(100deg, #7f1d1d, #e11d2e 50%, #991b1b 95%);
    border: 1px solid rgba(252, 165, 165, 0.55);
    box-shadow: 0 0 8px rgba(225, 29, 46, 0.4);
}
.youtuber-name-chip {
    background: linear-gradient(100deg, #9d174d, #ff2d55 50%, #c026d3 95%);
    border: 1px solid rgba(251, 113, 133, 0.55);
    box-shadow: 0 0 8px rgba(255, 45, 85, 0.35);
}
.booster-name-chip {
    background: linear-gradient(100deg, #38bdf8, #a855f7 48%, #f472b6 95%);
    border: 1px solid rgba(251, 207, 232, 0.65);
    box-shadow: 0 0 10px rgba(244, 127, 255, 0.45);
}
.clan-manager-name-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    padding: 1px 7px 1px 4px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #fff;
    vertical-align: middle;
    background: linear-gradient(100deg, #38bdf8, #a855f7 48%, #c026d3 95%);
    background-size: 200% 100%;
    border: 1px solid rgba(233, 213, 255, 0.65);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.45);
    animation: diamondChipShimmer 2.8s ease-in-out infinite alternate;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.6;
}
.admin-name-chip img,
.mod-name-chip img,
.youtuber-name-chip img,
.youtuber-role-chip img,
.booster-name-chip img,
.clan-manager-name-chip img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.rating-rank {
    font-weight: 800;
    color: rgba(255, 255, 255, 0.96);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rating-rank img {
    width: 22px;
    height: 22px;
}

.rating-player {
    font-weight: 700;
    color: #f4f6ff;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rating-player-with-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rating-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
}

.list-avatar-stack {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.list-avatar-stack .list-avatar-photo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    border-radius: 8px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.06);
}
.list-avatar-stack .list-avatar-diamond-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(34, 211, 238, 0.95);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.75), 0 0 14px rgba(217, 70, 239, 0.5), inset 0 0 6px rgba(99, 102, 241, 0.45);
    animation: diamondListRingPulse 2.4s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}
@keyframes diamondListRingPulse {
    0%, 100% { border-color: rgba(34, 211, 238, 0.95); box-shadow: 0 0 6px rgba(34, 211, 238, 0.65), 0 0 12px rgba(99, 102, 241, 0.4), inset 0 0 5px rgba(99, 102, 241, 0.35); }
    50% { border-color: rgba(217, 70, 239, 0.95); box-shadow: 0 0 10px rgba(217, 70, 239, 0.85), 0 0 18px rgba(34, 211, 238, 0.55), inset 0 0 7px rgba(217, 70, 239, 0.5); }
}
/* Мерцание рамки аватара у DIAMOND-пользователей */
.list-avatar-stack.is-diamond .list-avatar-frame {
    animation: diamondFrameFlicker 2.4s ease-in-out infinite;
}
.list-avatar-stack.is-diamond:not(:has(.list-avatar-frame)) .list-avatar-photo {
    animation: diamondFrameFlicker 2.4s ease-in-out infinite;
}
@keyframes diamondFrameFlicker {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 2px rgba(34, 211, 238, 0.35)); }
    50% { filter: brightness(1.35) drop-shadow(0 0 7px rgba(217, 70, 239, 0.8)); }
}
/* Волна блика, периодически проходящая по аватару DIAMOND-пользователя */
.list-avatar-stack.is-diamond::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.55) 50%, transparent 68%);
    background-size: 250% 100%;
    background-repeat: no-repeat;
    animation: diamondListSheen 2.8s linear infinite;
    z-index: 4;
    pointer-events: none;
}
@keyframes diamondListSheen {
    0% { background-position: 130% 0; }
    55% { background-position: -140% 0; }
    100% { background-position: -140% 0; }
}
/* Окантовка аватара в списках: красная у администрации, синяя у модерации */
.list-avatar-stack .list-avatar-admin-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(239, 68, 68, 0.9);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.7), inset 0 0 6px rgba(127, 29, 29, 0.5);
    animation: adminListRingPulse 2.6s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}
@keyframes adminListRingPulse {
    0%, 100% { border-color: rgba(239, 68, 68, 0.9); box-shadow: 0 0 6px rgba(220, 38, 38, 0.55), inset 0 0 5px rgba(127, 29, 29, 0.4); }
    50% { border-color: rgba(185, 28, 28, 0.95); box-shadow: 0 0 11px rgba(239, 68, 68, 0.85), inset 0 0 7px rgba(220, 38, 38, 0.55); }
}
.list-avatar-stack .list-avatar-mod-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(96, 165, 250, 0.9);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.65), inset 0 0 6px rgba(29, 78, 216, 0.45);
    animation: modListRingPulse 2.8s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}
@keyframes modListRingPulse {
    0%, 100% { border-color: rgba(96, 165, 250, 0.9); box-shadow: 0 0 6px rgba(59, 130, 246, 0.5), inset 0 0 5px rgba(29, 78, 216, 0.35); }
    50% { border-color: rgba(37, 99, 235, 0.95); box-shadow: 0 0 11px rgba(96, 165, 250, 0.8), inset 0 0 7px rgba(59, 130, 246, 0.5); }
}
.list-avatar-stack .list-avatar-youtuber-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(255, 45, 85, 0.9);
    box-shadow: 0 0 8px rgba(255, 45, 85, 0.7), inset 0 0 6px rgba(192, 38, 211, 0.45);
    animation: youtuberListRingPulse 2.6s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}
@keyframes youtuberListRingPulse {
    0%, 100% { border-color: rgba(255, 45, 85, 0.9); box-shadow: 0 0 6px rgba(255, 45, 85, 0.5), inset 0 0 5px rgba(190, 24, 93, 0.4); }
    50% { border-color: rgba(232, 121, 249, 0.95); box-shadow: 0 0 11px rgba(192, 38, 211, 0.8), inset 0 0 7px rgba(255, 45, 85, 0.5); }
}
.list-avatar-stack .list-avatar-booster-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(244, 127, 255, 0.95);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.65), 0 0 14px rgba(244, 127, 255, 0.55), inset 0 0 6px rgba(168, 85, 247, 0.45);
    animation: boosterListRingPulse 2.5s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}
@keyframes boosterListRingPulse {
    0%, 100% { border-color: rgba(56, 189, 248, 0.95); box-shadow: 0 0 6px rgba(56, 189, 248, 0.55), 0 0 12px rgba(168, 85, 247, 0.4), inset 0 0 5px rgba(168, 85, 247, 0.35); }
    50% { border-color: rgba(244, 127, 255, 0.98); box-shadow: 0 0 11px rgba(244, 127, 255, 0.85), 0 0 18px rgba(56, 189, 248, 0.55), inset 0 0 7px rgba(244, 114, 182, 0.5); }
}
.list-avatar-stack.is-booster .list-avatar-frame {
    animation: boosterFrameFlicker 2.5s ease-in-out infinite;
}
.list-avatar-stack.is-booster:not(:has(.list-avatar-frame)) .list-avatar-photo {
    animation: boosterFrameFlicker 2.5s ease-in-out infinite;
}
@keyframes boosterFrameFlicker {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 2px rgba(56, 189, 248, 0.35)); }
    50% { filter: brightness(1.28) drop-shadow(0 0 7px rgba(244, 127, 255, 0.8)); }
}
.list-avatar-stack.is-booster::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.5) 50%, transparent 68%);
    background-size: 250% 100%;
    background-repeat: no-repeat;
    animation: diamondListSheen 2.8s linear infinite;
    z-index: 4;
    pointer-events: none;
}
/* GOLD: те же эффекты, но мягче и в золотых тонах */
.list-avatar-stack .list-avatar-gold-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(250, 204, 21, 0.8);
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.5), inset 0 0 4px rgba(217, 119, 6, 0.35);
    animation: goldListRingPulse 3s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}
@keyframes goldListRingPulse {
    0%, 100% { border-color: rgba(250, 204, 21, 0.8); box-shadow: 0 0 5px rgba(250, 204, 21, 0.4), inset 0 0 4px rgba(217, 119, 6, 0.3); }
    50% { border-color: rgba(245, 158, 11, 0.9); box-shadow: 0 0 8px rgba(245, 158, 11, 0.6), inset 0 0 5px rgba(250, 204, 21, 0.4); }
}
.list-avatar-stack.is-gold .list-avatar-frame {
    animation: goldFrameFlicker 3s ease-in-out infinite;
}
.list-avatar-stack.is-gold:not(:has(.list-avatar-frame)) .list-avatar-photo {
    animation: goldFrameFlicker 3s ease-in-out infinite;
}
@keyframes goldFrameFlicker {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 1px rgba(250, 204, 21, 0.25)); }
    50% { filter: brightness(1.18) drop-shadow(0 0 4px rgba(245, 158, 11, 0.55)); }
}
.list-avatar-stack.is-gold::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    background: linear-gradient(115deg, transparent 34%, rgba(255, 244, 200, 0.35) 50%, transparent 66%);
    background-size: 250% 100%;
    background-repeat: no-repeat;
    animation: goldListSheen 3.6s linear infinite;
    z-index: 4;
    pointer-events: none;
}
@keyframes goldListSheen {
    0% { background-position: 130% 0; }
    55% { background-position: -140% 0; }
    100% { background-position: -140% 0; }
}
/* Плашка GOLD рядом с ником в списках */
.gold-name-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    padding: 1px 7px 1px 4px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #451a03;
    vertical-align: middle;
    background: linear-gradient(100deg, #d97706, #facc15 50%, #b45309 95%);
    background-size: 200% 100%;
    border: 1px solid rgba(253, 230, 138, 0.55);
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.25);
    animation: goldChipShimmer 3.2s ease-in-out infinite alternate;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.5;
}
.gold-name-chip img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}
@keyframes goldChipShimmer {
    from { background-position: 0% 0; }
    to { background-position: 100% 0; }
}
/* Плашка DIAMOND рядом с ником в списках */
.diamond-name-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    padding: 1px 7px 1px 4px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #fff;
    vertical-align: middle;
    background: linear-gradient(100deg, #0891b2, #6366f1 45%, #c026d3 90%);
    background-size: 200% 100%;
    border: 1px solid rgba(165, 243, 252, 0.5);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
    animation: diamondChipShimmer 2.6s ease-in-out infinite alternate;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.5;
}
.diamond-name-chip img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}
@keyframes diamondChipShimmer {
    from { background-position: 0% 0; }
    to { background-position: 100% 0; }
}
.list-avatar-stack .list-avatar-frame {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
}

.rating-level-col {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.level-badge {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.level-badge-lg {
    width: 68px;
    height: 68px;
}

.topbar-level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    line-height: 0;
}

.topbar-level-badge .level-badge {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 0 8px rgba(72, 86, 232, 0.4));
}

.level-badge-lg {
    width: 68px;
    height: 68px;
}

.rating-score {
    text-align: right;
    font-weight: 800;
    color: #8cc9ff;
}

.rating-alltime-strip {
    display: grid;
    grid-template-columns: minmax(140px, 1.6fr) repeat(3, minmax(90px, 1fr));
    width: 100%;
    gap: 12px;
    align-items: center;
    justify-items: center;
}

.rating-alltime-metric {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cfe8ff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    justify-content: center;
    min-height: 46px;
}

.rating-alltime-metric img {
    width: 19px;
    height: 19px;
    object-fit: contain;
    opacity: 0.95;
}

.rating-prize {
    text-align: right;
    font-weight: 700;
    font-size: 0.9rem;
    color: rgba(200, 170, 255, 0.95);
}

.ratings-prize-footnote {
    margin-top: 10px;
    padding: 0 4px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.55);
}

.ratings-reward-countdown {
    margin-top: 6px;
    padding: 0 4px;
    font-size: 0.84rem;
    font-weight: 700;
    color: rgba(145, 205, 255, 0.95);
}

.users-head {
    grid-template-columns: 70px minmax(160px, 1.4fr) 88px 140px 120px 56px minmax(180px, 230px);
}

/* Пользователи (сайт): одна сетка у шапки и строк */
#users .ratings-board .users-head,
#users #usersRows .rating-row {
    grid-template-columns: 70px minmax(160px, 1.4fr) 88px 140px 120px 56px minmax(180px, 230px);
}

#users .ratings-board .users-head > :nth-child(3),
#users .ratings-board .users-head > :nth-child(4),
#users .ratings-board .users-head > :nth-child(5),
#users .ratings-board .users-head > :nth-child(6),
#users #usersRows .rating-row > .rating-level-col,
#users #usersRows .rating-row > .rating-score,
#users #usersRows .rating-row > .rating-ach-col {
    text-align: center;
    justify-self: center;
}

#users .ratings-board .users-head > :nth-child(7),
#users #usersRows .rating-row > .rating-prize {
    text-align: right;
    justify-self: end;
}

/* Рейтинг: одна сетка у шапки и строк */
#ratings .ratings-board > .ratings-head,
#ratings #ratingsRows .rating-row {
    grid-template-columns: 70px minmax(160px, 1.4fr) 88px minmax(120px, 1fr) 108px 56px;
}

#ratings .ratings-board > .ratings-head > :nth-child(3),
#ratings .ratings-board > .ratings-head > :nth-child(4),
#ratings .ratings-board > .ratings-head > :nth-child(6),
#ratings #ratingsRows .rating-row > .rating-level-col,
#ratings #ratingsRows .rating-row > .rating-score,
#ratings #ratingsRows .rating-row > .rating-ach-col {
    text-align: center;
    justify-self: center;
}

#ratings .ratings-board > .ratings-head > :nth-child(5),
#ratings #ratingsRows .rating-row > .rating-prize {
    text-align: right;
    justify-self: end;
}

/* Админ «Список»: 6 колонок без «достижений» — заголовок и строки на одной сетке */
#admin-panel-users .admin-users-board .admin-users-head,
#admin-panel-users .admin-users-board #adminUsersListBody .rating-row {
    grid-template-columns: 70px minmax(180px, 1.5fr) 72px 120px 120px 120px;
}

#admin-panel-users .admin-users-board .admin-users-head > :nth-child(3),
#admin-panel-users .admin-users-board #adminUsersListBody .rating-row > .rating-level-col {
    text-align: center;
}

#admin-panel-users .admin-users-board .admin-users-head > :nth-child(4),
#admin-panel-users .admin-users-board .admin-users-head > :nth-child(5),
#admin-panel-users .admin-users-board #adminUsersListBody .rating-row > .rating-score {
    text-align: center;
    justify-self: center;
}

#admin-panel-users .admin-users-board .admin-users-head > :nth-child(6),
#admin-panel-users .admin-users-board #adminUsersListBody .rating-row > .rating-prize {
    text-align: right;
    justify-self: end;
}

.admin-server-bans-board .admin-server-bans-head,
.admin-server-bans-board .rating-row {
    grid-template-columns: 70px minmax(0, 1fr) minmax(100px, 120px) minmax(120px, 1.2fr) 88px 88px minmax(220px, 1fr);
}

.admin-active-stats-board .admin-active-stats-head,
.admin-active-stats-board .rating-row {
    grid-template-columns: 64px minmax(100px, 1.1fr) 72px minmax(90px, 1fr) 64px 56px 56px 56px 56px minmax(92px, 110px);
    font-size: 0.86rem;
}

.admin-active-stats-row-wrap {
    border-bottom: 1px solid rgba(123, 185, 255, 0.08);
}

.admin-active-stats-row-wrap .rating-row {
    border-bottom: none;
}

.admin-active-stats-inline-detail {
    margin: 0 4px 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(123, 185, 255, 0.22);
    background: rgba(10, 22, 38, 0.92);
}

.admin-active-stats-inline-detail h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: #eaf2ff;
}

.admin-active-stats-board .rating-prize .btn-admin {
    min-width: 78px;
    height: 32px;
    padding: 0 10px;
    font-size: 0.82rem;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.admin-scope-toggle {
    display: inline-flex;
    align-items: stretch;
    height: 40px;
    padding: 3px;
    gap: 2px;
    border-radius: 10px;
    border: 1px solid rgba(123, 185, 255, 0.28);
    background: rgba(7, 18, 32, 0.9);
    box-sizing: border-box;
}

.admin-scope-btn {
    appearance: none;
    border: 0;
    margin: 0;
    padding: 0 12px;
    border-radius: 8px;
    background: transparent;
    color: rgba(214, 232, 255, 0.72);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-scope-btn:hover {
    color: #eaf2ff;
    background: rgba(52, 97, 139, 0.35);
}

.admin-scope-btn.is-active {
    color: #eaf2ff;
    background: linear-gradient(180deg, rgba(52, 97, 139, 0.95) 0%, rgba(34, 70, 105, 0.98) 100%);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

#admin-panel-active-slot-stats .admin-user-search {
    grid-template-columns: minmax(180px, 1fr) auto auto auto;
    align-items: center;
}

#admin-panel-users .admin-user-search {
    grid-template-columns: auto minmax(160px, 1fr) auto;
    align-items: center;
}

@media (max-width: 900px) {
    #admin-panel-users .admin-user-search {
        grid-template-columns: 1fr;
    }
    #admin-panel-users .admin-user-search .admin-scope-toggle {
        width: 100%;
        justify-content: stretch;
    }
    #admin-panel-users .admin-user-search .admin-scope-btn {
        flex: 1 1 0;
        text-align: center;
    }
}

.admin-active-stats-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.admin-active-stats-chip {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px 10px;
}

.admin-active-stats-chip b {
    display: block;
    color: var(--muted, #93a0b4);
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.admin-server-bans-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

#usersRows .rating-row {
    grid-template-columns: 70px minmax(160px, 1.4fr) 88px 140px 120px 56px minmax(180px, 230px);
}

.ratings-board.alltime-no-prize .ratings-head,
.ratings-board.alltime-no-prize .rating-row,
#ratings .ratings-board.alltime-no-prize > .ratings-head,
#ratings .ratings-board.alltime-no-prize #ratingsRows .rating-row {
    grid-template-columns: 70px minmax(160px, 1.4fr) 88px minmax(480px, 2.2fr) 56px;
}

.ratings-board.clan-wars-rating .ratings-head,
.ratings-board.clan-wars-rating .rating-row,
#ratings .ratings-board.clan-wars-rating > .ratings-head,
#ratings .ratings-board.clan-wars-rating #ratingsRows .rating-row {
    grid-template-columns: 70px minmax(160px, 1.4fr) 96px minmax(420px, 2.4fr) minmax(140px, 1.1fr) 56px;
}

.ratings-board.clan-wars-rating .ratings-head > :nth-child(6),
.ratings-board.clan-wars-rating .rating-row > :nth-child(6) {
    display: none;
}

#ratings .ratings-board.clan-wars-rating > .ratings-head > :nth-child(3),
#ratings .ratings-board.clan-wars-rating #ratingsRows .rating-row > .rating-level-col {
    text-align: center;
    justify-self: center;
}

#ratings .ratings-board.clan-wars-rating > .ratings-head > :nth-child(4) {
    text-align: center;
    justify-self: stretch;
}

#ratings .ratings-board.clan-wars-rating > .ratings-head > :nth-child(5),
#ratings .ratings-board.clan-wars-rating #ratingsRows .rating-row > .rating-prize {
    text-align: right;
    justify-self: end;
}

.ratings-board.clan-wars-rating .rating-score {
    width: 100%;
    text-align: left;
    justify-self: stretch;
}

.rating-clanwars-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(78px, 1fr));
    width: 100%;
    gap: 10px;
    align-items: center;
    justify-items: center;
}

.rating-clanwars-strip.rating-alltime-head-strip > span {
    text-align: center;
}

.ratings-board.clan-wars-rating .rating-clanwars-strip {
    width: 100%;
    justify-content: flex-start;
}

.rating-clanwars-strip .rating-alltime-metric {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
}

.ratings-board.alltime-no-prize .ratings-head > :nth-child(5),
.ratings-board.alltime-no-prize .rating-row > :nth-child(5) {
    display: none;
}

.ratings-board.alltime-no-prize .rating-score {
    width: 100%;
    text-align: left;
    justify-self: stretch;
}

#ratings .ratings-board.alltime-no-prize > .ratings-head > :nth-child(4) {
    text-align: center;
    justify-self: stretch;
}

.ratings-board.alltime-no-prize .rating-alltime-strip {
    width: 100%;
    justify-content: flex-start;
}

.rating-alltime-head-strip {
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0.92;
    gap: 12px;
}

.rating-alltime-head-strip > span {
    text-align: center;
    white-space: nowrap;
}

.rating-ach-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-ach-btn {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px;
    cursor: pointer;
    line-height: 0;
}

.rating-ach-btn img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

.rating-ach-btn .ach-count {
    display: block;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    margin-top: 2px;
    color: rgba(200, 220, 255, 0.95);
}

.ach-widget-head {
    margin: 0 0 10px;
}

.ach-menu-head-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}

.ach-menu-ico {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 10px;
}

.ach-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 1.2em;
    margin: 8px 0 10px;
}

.ach-strip img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.achievements-list-card {
    max-width: 640px;
    max-height: min(90vh, 720px);
    overflow: auto;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.ach-tile {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.ach-tile.locked {
    opacity: 0.45;
}

.ach-tile img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 8px;
    display: block;
}

.ach-tile-title {
    font-weight: 800;
    font-size: 0.88rem;
    margin: 0 0 4px;
}

.ach-tile-desc {
    font-size: 0.78rem;
    opacity: 0.85;
    line-height: 1.35;
    margin: 0 0 6px;
}

.ach-tile-reward {
    font-size: 0.75rem;
    opacity: 0.8;
    margin: 0;
}

.status-icon-head {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: middle;
}

.user-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.user-status-badge.online {
    background: rgba(96, 224, 159, 0.18);
    color: #9ff3cc;
}

.user-status-badge.offline {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.active-dino-dots {
    display: inline-flex;
    gap: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

.active-dino-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.active-dino-dot.online {
    background: #36d399;
}

.active-dino-dot.offline {
    background: #c7ced9;
}

.voice-verify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 2px 10px;
    min-height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    vertical-align: middle;
    color: #fff;
    background: #c0392b;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, transform 0.12s ease;
}

.voice-verify-btn.is-verified {
    background: #1f9d63;
    border-color: rgba(96, 224, 159, 0.45);
}

.voice-verify-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.voice-verify-btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.voice-verify-cmd {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.35);
    color: #eaf4ff;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
}

.voice-verify-guide {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(96, 224, 159, 0.35);
    background: rgba(31, 157, 99, 0.12);
    font-size: 13px;
    line-height: 1.55;
    color: rgba(224, 236, 250, 0.95);
}

.voice-verify-guide ol {
    margin: 8px 0 0;
    padding-left: 20px;
}

.voice-verify-guide li {
    margin: 6px 0;
}

.voice-verify-guide code,
.voice-verify-mumble-addr {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    color: #b8e8ff;
}

.voice-verify-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 12px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.55);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.28), rgba(99, 102, 241, 0.22));
    color: #eaf4ff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.voice-verify-download-btn:hover {
    filter: brightness(1.08);
}

/* Proximity voice — модалка TWOD (из «Мои динозавры») */
.voice-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 8, 18, 0.72);
    backdrop-filter: blur(8px);
}
.voice-modal.hidden { display: none !important; }
.voice-modal-card {
    width: min(440px, 100%);
    max-height: min(92vh, 720px);
    overflow: auto;
    border-radius: 20px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background:
        radial-gradient(120% 80% at 10% 0%, rgba(34, 211, 238, 0.12), transparent 50%),
        radial-gradient(100% 70% at 100% 100%, rgba(139, 92, 246, 0.16), transparent 55%),
        linear-gradient(165deg, #0d1220 0%, #0a0e18 100%);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(34, 211, 238, 0.08);
    padding: 22px 22px 18px;
}
.voice-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.voice-modal-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(34, 211, 238, 0.85);
    font-weight: 700;
}
.voice-modal-title {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.voice-modal-close {
    appearance: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}
.voice-modal-close:hover { filter: brightness(1.1); }
.voice-modal-hero { margin-bottom: 16px; }
.voice-modal-headline {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}
.voice-modal-sub {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(148, 163, 184, 0.95);
}
.voice-toggle-btn {
    appearance: none;
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    box-shadow: 0 8px 28px rgba(72, 86, 232, 0.45);
}
.voice-toggle-btn:hover:not(:disabled) { filter: brightness(1.08); }
.voice-toggle-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}
.voice-toggle-btn.is-on {
    background: linear-gradient(115deg, #34d399 0%, #22D3EE 50%, #4856E8 100%);
}
.voice-toggle-btn.is-busy { opacity: 0.75; }
.voice-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.voice-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.25);
    flex-shrink: 0;
}
.voice-status-dot.is-connected {
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.3), 0 0 12px rgba(52, 211, 153, 0.55);
}
.voice-status-dot.is-connecting,
.voice-status-dot.is-reconnecting {
    background: #22D3EE;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.28);
    animation: voicePulse 1s ease-in-out infinite;
}
.voice-status-dot.is-error {
    background: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.28);
}
@keyframes voicePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}
#voiceStatusText {
    font-size: 13px;
    color: rgba(203, 213, 225, 0.95);
    line-height: 1.35;
}
.voice-config-hint {
    margin: 10px 0 0;
    font-size: 11px;
    color: rgba(100, 116, 139, 0.95);
    word-break: break-all;
}
.voice-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 16px 0 4px;
}
.voice-stat {
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.22);
    background: rgba(15, 23, 42, 0.55);
    padding: 10px 12px;
}
.voice-stat span {
    display: block;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.85);
    margin-bottom: 4px;
}
.voice-stat strong {
    font-size: 18px;
    color: #e2e8f0;
    font-weight: 800;
}
.voice-settings {
    margin-top: 16px;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: rgba(8, 12, 22, 0.65);
    overflow: hidden;
}
.voice-settings-toggle {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}
.voice-settings-toggle:hover { background: rgba(34, 211, 238, 0.06); }
.voice-settings-chev { color: #22D3EE; font-size: 12px; }
.voice-settings-body {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(129, 140, 248, 0.15);
}
.voice-field { margin-top: 12px; }
.voice-field label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
    margin-bottom: 6px;
    font-weight: 700;
}
.voice-field select {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: #0b1220;
    color: #e2e8f0;
    padding: 8px 12px;
    font-size: 13px;
}
.voice-field select:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.15);
}
.voice-mic-ico {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    border-radius: 4px;
    background: linear-gradient(115deg, #22D3EE, #8B5CF6);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.45);
}
.voice-mic-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.voice-mic-meter-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.95);
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.2);
}
.voice-mic-meter-bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22D3EE, #4856E8, #8B5CF6);
    transition: width 0.06s linear;
}
.voice-volume-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.voice-volume-row strong {
    font-size: 12px;
    color: #67e8f9;
    font-weight: 800;
}
.voice-field input[type="range"] {
    width: 100%;
    accent-color: #4856E8;
}
.voice-volume-marks {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(100, 116, 139, 0.95);
    margin-top: 4px;
}
.voice-perm-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.voice-perm-btn {
    appearance: none;
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.1);
    color: #a5f3fc;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.voice-perm-btn:hover { filter: brightness(1.08); }
.voice-mic-perm-hint {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(148, 163, 184, 0.9);
}
.voice-modal-foot {
    margin-top: 14px;
    font-size: 11px;
    color: rgba(100, 116, 139, 0.95);
    line-height: 1.4;
}

/* Population — сворачиваемый блок во вкладке «Мои динозавры» */
.dinos-pop-panel {
    border-radius: 20px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.92), rgba(8, 10, 18, 0.9)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28), 0 0 22px rgba(72, 86, 232, 0.14);
    overflow: hidden;
}
.dinos-pop-toggle {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border: 0;
    background: transparent;
    color: #e0f2fe;
    font: inherit;
    cursor: pointer;
    text-align: left;
}
.dinos-pop-toggle:hover { background: rgba(34, 211, 238, 0.06); }
.dinos-pop-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.dinos-pop-toggle-title {
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dinos-pop-toggle-meta {
    font-size: 12px;
    font-weight: 700;
    color: rgba(186, 198, 220, 0.85);
}
.dinos-pop-chevron {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
    font-size: 12px;
    transition: transform 160ms ease;
}
.dinos-pop-panel.is-open .dinos-pop-chevron { transform: rotate(180deg); }
.dinos-pop-body {
    display: none;
    padding: 0 14px 14px;
    border-top: 1px solid rgba(129, 140, 248, 0.22);
    max-height: none;
    overflow: visible;
}
.dinos-pop-panel.is-open .dinos-pop-body { display: block; }
.pop-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
    flex-shrink: 0;
}
.pop-status-dot.is-live { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
.pop-status-dot.is-off { background: #ef4444; }
.pop-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0 10px;
}
.pop-summary-item {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pop-summary-item span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(186, 198, 220, 0.65);
}
.pop-summary-item strong {
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #e0f2fe;
}
.pop-section-sub {
    margin: 0 0 10px;
    font-size: 11px;
    color: rgba(186, 198, 220, 0.7);
    line-height: 1.35;
}
.pop-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 1100px) {
    .pop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .pop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pop-card {
    width: 100%;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: rgba(8, 10, 18, 0.55);
    color: #e0f2fe;
    font: inherit;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: default;
}
.pop-card.is-unlockable { cursor: pointer; }
.pop-card.is-unlockable:hover {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(16, 185, 129, 0.12);
}
.pop-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}
.pop-card-name { font-weight: 700; font-size: 11px; line-height: 1.2; }
.pop-card-meta { font-size: 9px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.pop-card-count { font-weight: 800; font-size: 11px; font-variant-numeric: tabular-nums; color: #67e8f9; }
.pop-bar { height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.pop-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #22D3EE, #4856E8); width: 0%; }
.pop-empty {
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(129, 140, 248, 0.3);
    color: rgba(186, 198, 220, 0.75);
    font-size: 12px;
}
.pop-hint { margin: 8px 0 0; font-size: 10px; color: rgba(186, 198, 220, 0.45); }

.presence-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.presence-dot.online {
    background: #36d399;
}

.presence-dot.offline {
    background: #c7ced9;
}

.user-friend-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.user-friend-btn.pe-save-btn {
    background: linear-gradient(180deg, #34d399, #16a34a);
    border-color: rgba(22, 101, 52, 0.55);
    color: #05180d;
}
.user-friend-btn.pe-cancel-btn {
    background: linear-gradient(180deg, #fb7185, #dc2626);
    border-color: rgba(185, 28, 28, 0.55);
    color: #2a080c;
}

.user-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.user-friend-btn.small {
    padding: 7px 10px;
    font-size: 12px;
}

.messages-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.messages-list, .messages-chat {
    background: rgba(20, 26, 34, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px;
    min-height: 0;
}

#messages.active {
    display: flex;
    flex-direction: column;
    min-height: calc(var(--app-vh) - 170px);
    max-height: calc(var(--app-vh) - 170px);
    overflow: hidden;
}

.messages-list {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#messagesListRows {
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    padding-right: 4px;
}

.messages-chat {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.message-peer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-peer > img {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
}

.message-peer .list-avatar-stack {
    width: 34px;
    height: 34px;
}
.message-peer .list-avatar-stack .list-avatar-photo {
    width: 25px;
    height: 25px;
    border-radius: 6px;
}
.message-peer .list-avatar-stack .list-avatar-frame {
    border-radius: 0;
}

.chat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 8px;
    cursor: pointer;
}

.chat-row.active {
    background: rgba(108, 99, 255, 0.2);
}

.chat-feed {
    min-height: 0;
    max-height: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.chat-msg {
    max-width: 70%;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.chat-msg.mine {
    align-self: flex-end;
    background: rgba(122, 92, 255, 0.35);
}

.chat-compose {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.chat-compose input {
    flex: 1;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    padding: 10px;
}

.chat-head-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.chat-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chat-delete-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-delete-btn img {
    width: 16px;
    height: 16px;
}

.dino-action-overlay {
    position: absolute;
    inset: 8px;
    border-radius: 14px;
    background: rgba(8, 12, 20, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 14px;
}

.dino-action-overlay.visible {
    display: flex;
}

.dino-action-overlay-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 999px;
    background: rgba(28, 35, 48, 0.96);
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 26px rgba(0, 0, 0, 0.35);
}

.dino-action-overlay-card button {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
    color: #0f172a;
}

.slot-action-overlay {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: rgba(8, 12, 20, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 12px;
}

.slot-action-overlay.visible {
    display: flex;
}

.quest-dino-overlay {
    z-index: 55;
}

.quests-body {
    max-width: 560px;
}

.profile-quest-widget-inner .quest-card {
    margin-bottom: 0;
}

.quest-panel-host .quest-card {
    margin-bottom: 0;
}

.quest-card {
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.62)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3), 0 0 20px rgba(72, 86, 232, 0.1);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
.quest-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.quest-card-head img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.quest-card-title {
    font-weight: 800;
    font-size: 1.05rem;
}
.quest-progress-wrap {
    margin-top: 8px;
}
.quest-progress-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.quest-progress-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #34d399, #22d3ee);
    width: 0%;
    transition: width 0.25s ease;
}
.quest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.quest-actions .user-friend-btn.pe-save-btn {
    background: linear-gradient(180deg, #34d399, #16a34a);
    border-color: rgba(52, 211, 153, 0.55);
    color: #05180d;
}
.quest-actions .user-friend-btn.pe-cancel-btn {
    background: linear-gradient(180deg, #fb7185, #dc2626);
    border-color: rgba(251, 113, 133, 0.55);
    color: #2a080c;
}
.quest-actions .user-friend-btn.small:not(.pe-save-btn):not(.pe-cancel-btn) {
    background: linear-gradient(180deg, #ddd6fe, #c4b5fd);
    border-color: rgba(90, 70, 130, 0.45);
    color: #1a1428;
}

.mission-modal {
    position: fixed;
    inset: 0;
    z-index: 10140;
    background: rgba(5, 8, 12, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.mission-modal.hidden { display: none; }

.mission-modal-card {
    width: min(760px, 96vw);
    background: rgba(17, 24, 34, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.mission-modal-tabs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.mission-tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #dbeafe;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.mission-tab-btn.active {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.28), rgba(217, 70, 239, 0.26));
    border-color: rgba(186, 230, 253, 0.55);
}

.mission-card {
    background: rgba(20, 26, 34, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px;
}

.mission-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.mission-head img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.mission-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.mission-form-row label {
    font-size: 12px;
    opacity: 0.82;
}

.mission-form-row select,
.mission-form-row input {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: 10px;
    padding: 8px 10px;
}

.mission-form-row input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.mission-picker {
    position: relative;
}

.mission-picker-trigger {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}

.mission-picker.open .mission-picker-trigger {
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.mission-picker-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 35;
    max-height: min(260px, 40vh);
    overflow-y: auto;
    background: rgba(20, 26, 34, 0.99);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    padding: 6px;
}

.mission-picker-menu.hidden {
    display: none;
}

.mission-picker-option {
    width: 100%;
    border: none;
    background: transparent;
    color: #e5e7eb;
    text-align: left;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.mission-picker-option:hover {
    background: rgba(56, 189, 248, 0.16);
}

.mission-picker-empty {
    color: #9ca3af;
    font-size: 12px;
    padding: 8px 10px;
}

.mission-hint {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 6px;
}

.profile-task-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.profile-task-switch .small-btn {
    flex: 1;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
}

.widget.profile-quest-widget .profile-task-switch .small-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
}

.widget.profile-quest-widget .profile-task-switch .small-btn.active {
    border-color: rgba(225, 29, 46, 0.65);
    background: linear-gradient(180deg, rgba(225, 29, 46, 0.88), rgba(153, 27, 27, 0.95));
    color: #fff;
}

.profile-quest-widget .quest-card {
    background: rgba(12, 14, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Slot cards are narrower: smaller capsule than the server dino block */
.slot-action-overlay .dino-action-overlay-card {
    font-size: 16px;
    padding: 10px 14px;
    gap: 10px;
}

.slot-action-overlay .dino-action-overlay-card button {
    font-size: 15px;
    padding: 8px 14px;
}

.user-friend-btn img {
    width: 14px;
    height: 14px;
}

.user-friend-btn.is-friend {
    background: rgba(145, 205, 255, 0.22);
    border-color: rgba(145, 205, 255, 0.55);
    color: #b8dfff;
}

.user-player-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.user-player-cell .rating-avatar {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10060;
    padding: 16px;
}

#clanWarsChallengeModal,
#clanWarsRosterModal,
#clanWarsDetailModal {
    z-index: 10075;
}

.profile-modal.hidden {
    display: none;
}

.profile-modal.site-confirm-modal {
    z-index: 14000;
}

.profile-modal-card {
    width: min(560px, 96vw);
    border-radius: 18px;
    padding: 14px 16px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.9), rgba(8, 10, 18, 0.86)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 28px rgba(72, 86, 232, 0.14);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.profile-modal-card > .profile-modal-head h3 {
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.profile-modal-card .user-friend-btn.small {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
    border-radius: 10px;
}
.profile-modal-card .user-friend-btn.pe-save-btn {
    background: var(--brand-grad) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.35);
}
.profile-modal-card .user-friend-btn.pe-cancel-btn,
.profile-modal-card .user-friend-btn.small.pe-cancel-btn {
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
}
#profileEditModal.profile-modal {
    align-items: center;
    overflow-y: auto;
}
#profileEditModal .profile-modal-card.profile-edit-modal-card {
    width: min(520px, 96vw);
    max-height: min(88vh, 820px);
    margin: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px 14px 14px;
    box-sizing: border-box;
}
#profileEditModal .profile-edit-modal-card > .profile-modal-head {
    flex: 0 0 auto;
}
#profileEditModal .profile-edit-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
}
#profileEditModal .profile-edit-modal-footer {
    flex: 0 0 auto;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-modal-card.public-profile-modal-card {
    width: min(680px, 96vw);
    max-height: min(90vh, 860px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px;
}
.profile-modal-card.public-profile-modal-card > .profile-modal-head {
    flex: 0 0 auto;
}
.public-profile-body {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    overscroll-behavior: contain;
}
.public-profile-v2 .profile-v2-hero {
    margin-bottom: 8px;
    height: clamp(72px, 9vw, 110px);
    min-height: 72px;
    border-radius: 12px;
}
.public-profile-v2 .profile-v2-hero-inner {
    padding: 10px 14px;
}
.public-profile-v2 .profile-v2-hero-title {
    font-size: clamp(18px, 2.6vw, 28px);
}
.public-profile-v2 .profile-v2-hero-sub {
    font-size: 11px;
}
.public-profile-v2 .profile-v2-hero-quote {
    font-size: 11px;
    max-width: 42%;
}
.public-profile-v2 .profile-v2-identity {
    margin-bottom: 8px;
    padding: 10px;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
    box-sizing: border-box;
}
.public-profile-v2 .profile-v2-stats {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    min-width: 0;
}
.public-profile-v2 .profile-v2-id-main {
    min-width: 0;
    width: 100%;
}
.public-profile-v2.profile-v2 .profile-avatar-wrap,
.public-profile-v2 .profile-avatar-wrap {
    width: 118px;
    height: 118px;
}
.public-profile-v2 .profile-avatar-wrap .profile-avatar-img,
.public-profile-v2.profile-v2 .profile-avatar-img {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    object-fit: cover;
}
.public-profile-v2 .profile-avatar-wrap .profile-frame-img,
.public-profile-v2.profile-v2 .profile-frame-img {
    width: 118px;
    height: 118px;
    border-radius: 22px;
}
.public-profile-v2 .profile-v2-id-main .nick {
    display: none !important;
}
.public-profile-v2 .profile-v2-badge-row {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    margin-left: 4px;
    width: 100%;
}
.public-profile-v2 .profile-v2-badge-row .profile-role-badge,
.public-profile-v2 .profile-v2-badge-row .profile-admin-badge,
.public-profile-v2 .profile-v2-badge-row .profile-mod-badge,
.public-profile-v2 .profile-v2-badge-row .profile-diamond-badge,
.public-profile-v2 .profile-v2-badge-row .profile-gold-badge,
.public-profile-v2 .profile-v2-badge-row .profile-booster-badge,
.public-profile-v2 .profile-v2-badge-row .profile-content-maker-badge {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    font-size: 11px;
    padding: 6px 12px;
    margin: 0;
}
.public-profile-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    margin-top: 8px;
    width: 100%;
    box-sizing: border-box;
}
.public-profile-meta-grid .profile-v2-about-item,
.public-profile-meta-grid .profile-v2-meta-item {
    margin: 0;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
}
.public-profile-meta-grid .public-profile-status {
    overflow: visible;
}
.public-profile-meta-grid a {
    display: inline;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.public-profile-clan {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
}
.public-profile-clan .clan-tag {
    font-weight: 800;
    flex-shrink: 0;
}
.public-profile-clan .clan-name {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.public-profile-clan .clan-lv {
    opacity: 0.8;
    flex-shrink: 0;
}
.public-profile-status {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    white-space: normal;
    word-break: normal;
    overflow: visible;
}
.public-profile-status .status-online,
.public-profile-status .status-offline {
    white-space: nowrap;
}
.public-profile-status .status-online {
    color: #3ddc84;
    font-weight: 700;
}
.public-profile-status .status-offline {
    opacity: 0.8;
}
#profileStatusLine {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    white-space: normal;
    word-break: normal;
    overflow: visible;
}
#profileStatusLine .status-online,
#profileStatusLine .status-offline {
    white-space: nowrap;
}
#profileStatusLine .status-online {
    color: #3ddc84;
    font-weight: 700;
}
#profileStatusLine .status-offline {
    opacity: 0.8;
}
.public-profile-v2 .profile-v2-grid {
    grid-template-columns: 1fr;
    gap: 8px;
}
.public-profile-v2 .profile-v2-grid > .profile-v2-card {
    height: auto;
    padding: 10px 12px;
}
.public-profile-v2 .widget h3 {
    margin: 0 0 6px;
    font-size: 13px;
}
.public-profile-v2 .level-box {
    gap: 10px;
}
.public-profile-v2 .level-ring {
    width: 56px;
    height: 56px;
    box-shadow: 0 0 12px rgba(225, 29, 46, 0.2);
}
.public-profile-v2 .profile-v2-wars-strip {
    gap: 6px;
}
.public-profile-v2 .profile-v2-wars-rating {
    min-width: 52px;
    padding: 6px 8px;
}
.public-profile-v2 .profile-v2-wars-rating strong {
    font-size: 16px;
}
.public-profile-v2 .profile-v2-wars-metric {
    min-height: 0;
    padding: 5px 3px;
    gap: 2px;
    border-radius: 10px;
}
.public-profile-v2 .profile-v2-wars-metric img {
    width: 14px;
    height: 14px;
}
.public-profile-v2 .profile-v2-wars-metric b {
    font-size: 12px;
}
.public-profile-v2 .profile-v2-wars-metric span {
    font-size: 9px;
}
.public-profile-v2 .profile-v2-rating-block + .profile-v2-rating-block {
    padding-top: 8px;
}
.public-profile-v2 .ach-strip img {
    width: 34px;
    height: 34px;
}
.public-profile-v2 .ach-widget-summary {
    margin: 0 0 6px;
    font-size: 12px;
}
.public-profile-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.public-profile-closed-note {
    opacity: 0.9;
    margin: 0 0 8px;
    font-size: 13px;
}
@media (max-width: 700px) {
    .public-profile-meta-grid {
        grid-template-columns: 1fr;
    }
    .public-profile-clan {
        grid-column: auto;
    }
    .public-profile-v2 .profile-v2-wars-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.profile-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.profile-modal-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-modal-user > img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.support-modal {
    position: fixed;
    inset: 0;
    z-index: 10080;
    background: rgba(5, 8, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.support-modal.hidden { display: none; }
.support-modal-card {
    width: min(980px, 96vw);
    max-height: 92vh;
    overflow: auto;
    border-radius: 18px;
    padding: 14px 16px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.88), rgba(8, 10, 18, 0.84)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 28px rgba(72, 86, 232, 0.14);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.support-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.support-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}
.support-block {
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 14px;
    padding: 12px;
    background: rgba(8, 10, 18, 0.4);
}
.support-block h3 {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
}
.support-head h3 {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.support-modal-card .user-friend-btn.pe-save-btn {
    background: var(--brand-grad) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.35);
}
.support-modal-card .user-friend-btn.small {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
    border-radius: 10px;
}
.support-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.support-field label { font-size: 12px; opacity: 0.9; }
.support-field select,
.support-field textarea,
.support-field input[type="file"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.5);
    color: #e8eef8;
}
.support-field select option {
    background: #3b4350;
    color: #f2f6ff;
}
.support-field textarea { min-height: 120px; resize: vertical; }
.support-file-hint { font-size: 12px; opacity: 0.8; }
.support-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 60vh;
    overflow: auto;
}
.support-ticket-row {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
}
.support-ticket-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.support-ticket-status {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}
.support-ticket-status.open { border-color: rgba(94, 234, 212, 0.45); color: #99f6e4; }
.support-ticket-status.in_progress { border-color: rgba(96, 165, 250, 0.45); color: #bfdbfe; }
.support-ticket-status.pending { border-color: rgba(250, 204, 21, 0.45); color: #fde68a; }
.support-ticket-status.closed { border-color: rgba(248, 113, 113, 0.45); color: #fecaca; }
.support-ticket-msg { white-space: pre-wrap; font-size: 13px; line-height: 1.35; }
.support-ticket-row.has-unread {
    border-color: rgba(239, 68, 68, 0.65);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.18);
}
.support-ticket-unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    margin-left: 6px;
    vertical-align: middle;
}
.support-ticket-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.support-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 10095;
    background: rgba(5, 8, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.support-chat-modal.hidden { display: none; }
.support-chat-card {
    width: min(860px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.94), rgba(8, 10, 18, 0.9)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 28px rgba(72, 86, 232, 0.14);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.support-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(129, 140, 248, 0.22);
}
.support-chat-head > div {
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-weight: 900;
    letter-spacing: 0.03em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.support-chat-list {
    padding: 14px 16px;
    overflow: auto;
    max-height: 55vh;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.support-chat-item {
    max-width: 82%;
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 12px;
    padding: 8px 10px;
    background: rgba(8, 10, 18, 0.45);
}
.support-chat-item.mine {
    margin-left: auto;
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(72, 86, 232, 0.18);
}
.support-chat-item.admin {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.14);
}
.support-chat-meta {
    font-size: 11px;
    opacity: 0.78;
    margin-bottom: 4px;
}
.support-chat-text {
    white-space: pre-wrap;
    line-height: 1.35;
}
.support-chat-send {
    padding: 12px 16px 14px;
    border-top: 1px solid rgba(129, 140, 248, 0.22);
}
.support-chat-send textarea {
    width: 100%;
    min-height: 78px;
    box-sizing: border-box;
    resize: vertical;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.55);
    color: #e8eef8;
    margin-bottom: 8px;
}
.support-chat-send .user-friend-btn.pe-save-btn {
    background: var(--brand-grad) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
.support-action-modal {
    position: fixed;
    inset: 0;
    z-index: 10110;
    background: rgba(5, 8, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.support-action-modal.hidden { display: none; }
.support-action-card {
    width: min(480px, 96vw);
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.94), rgba(8, 10, 18, 0.9)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 28px rgba(72, 86, 232, 0.14);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.support-action-card h3 {
    margin: 0 0 8px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.support-action-card p {
    margin: 0 0 10px;
    opacity: 0.92;
    line-height: 1.35;
}
#supportAdminActionRoleSelect {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(18, 26, 38, 0.96);
    color: #e8eef8;
    margin-bottom: 10px;
}
#supportAdminActionRoleSelect option {
    background: #3b4350;
    color: #f2f6ff;
}
.support-action-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
#adminSupportStatusFilter {
    background: rgba(18, 26, 38, 0.96);
    color: #e8eef8;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    min-height: 38px;
    padding: 8px 10px;
}
#adminSupportStatusFilter option {
    background: #3b4350;
    color: #f2f6ff;
}
.admin-tab-btn.has-unread {
    position: relative;
}
.admin-tab-btn.has-unread::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}
@media (max-width: 980px) { .support-layout { grid-template-columns: 1fr; } }

.card {
    background: #141a22;
    padding: 15px;
    border-radius: 10px;
    width: 200px;
}

.card img {
    width: 100%;
    border-radius: 6px;
}

.product-card {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 26, 34, 0.95);
    padding: 0;
    overflow: hidden;
    position: relative;
}

.inv-info-btn {
    width: 100%;
    margin-top: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(217, 70, 239, 0.10));
    color: #7dd3fc;
    font-weight: 700;
    font-size: 0.9em;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.inv-info-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.inv-info-btn:hover {
    border-color: rgba(125, 211, 252, 0.85);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(217, 70, 239, 0.18));
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.clan-inv-info-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    margin: 0 2px;
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(217, 70, 239, 0.10));
    color: #7dd3fc;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.clan-inv-info-btn svg {
    width: 14px;
    height: 14px;
}

.clan-inv-info-btn:hover {
    border-color: rgba(125, 211, 252, 0.85);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.inv-source-line {
    margin-top: 6px;
    font-size: 0.8em;
    line-height: 1.3;
    color: #a5f3fc;
    opacity: 0.9;
}

.inv-info-rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 0.92em;
}

.inv-info-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}

.inv-info-row span:first-child {
    opacity: 0.75;
    flex-shrink: 0;
}

.inv-info-row span:last-child {
    text-align: right;
}

.product-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 0;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #141a22;
}

.product-body {
    padding: 12px;
}

#shopCards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

/* —— Shop redesign (как инвентарь) —— */
#shop.shop-redesign .shop-redesign-head {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 0;
}
#shop.shop-redesign .shop-redesign-head h2 { display: none; }
#shop.shop-redesign .inventory-filter.shop-filter {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(6px, 1vw, 12px);
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    margin: 0 0 10px;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.94), rgba(8, 10, 18, 0.92)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4), 0 0 32px rgba(72, 86, 232, 0.12);
}
#shop.shop-redesign .shop-filter > .tab {
    appearance: none;
    border: 0;
    border-radius: 14px;
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    padding: 10px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.65);
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
#shop.shop-redesign .shop-filter > .tab .n {
    min-width: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}
#shop.shop-redesign .shop-filter > .tab.on,
#shop.shop-redesign .shop-filter > .tab.active {
    color: #fff;
    background: var(--brand-grad);
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.45);
}
#shop.shop-redesign .shop-filter .inv-search {
    flex: 1.35 1 160px;
    min-width: 140px;
    max-width: 300px;
    margin-left: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(8, 10, 18, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
#shop.shop-redesign .shop-filter .inv-search .ico {
    width: 16px;
    height: 16px;
    opacity: 0.65;
    flex-shrink: 0;
}
#shop.shop-redesign .shop-filter .inv-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
}
#shop.shop-redesign .shop-filter .inv-search input::-webkit-search-cancel-button,
#shop.shop-redesign .shop-filter .inv-search input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
#shop.shop-redesign .shop-filter .inv-search .clear {
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
}
#shop.shop-redesign .shop-cards-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px 16px;
    padding: 4px 0 20px;
}
@media (max-width: 1200px) {
    #shop.shop-redesign .shop-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    #shop.shop-redesign .shop-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
#shop.shop-redesign .inv-card {
    --accent: rgba(72, 86, 232, 0.35);
    position: relative;
    display: flex;
    flex-direction: column;
    /* Арты квадратные — карточка 1:1, contain заполняет без полей и без кропа */
    aspect-ratio: 1 / 1;
    min-height: 0;
    height: auto;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(12, 16, 32, 0.06), rgba(8, 10, 18, 0.55)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
#shop.shop-redesign .inv-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 22px var(--accent);
}
#shop.shop-redesign .inv-card.is-pred { --accent: rgba(248, 113, 113, 0.28); }
#shop.shop-redesign .inv-card.is-herb { --accent: rgba(52, 211, 153, 0.28); }
#shop.shop-redesign .inv-card.is-omni { --accent: rgba(251, 191, 36, 0.28); }
#shop.shop-redesign .inv-card.is-boost {
    --accent: rgba(34, 211, 238, 0.35);
    background:
        linear-gradient(180deg, rgba(12, 24, 28, 0.06), rgba(8, 10, 18, 0.55)) padding-box,
        linear-gradient(115deg, #34d399 0%, #22D3EE 42%, #4856E8 100%) border-box;
}
#shop.shop-redesign .inv-card.is-unavailable { opacity: 0.55; filter: grayscale(0.35); }
#shop.shop-redesign .inv-card .art {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: 13px;
    background: transparent;
}
#shop.shop-redesign .inv-card .art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Квадратный арт + почти квадратная карточка: contain заполняет без кропа и без полей */
    object-fit: contain;
    object-position: center center;
    display: block;
    transform: none;
    transform-origin: center center;
    transition: transform 0.35s ease;
    filter: saturate(1.05) contrast(1.04);
}
#shop.shop-redesign .inv-card.is-boost .art img {
    object-position: center center;
    transform: none;
}
#shop.shop-redesign .inv-card:hover .art img { transform: scale(1.03); }
#shop.shop-redesign .inv-card.is-boost:hover .art img { transform: scale(1.03); }
#shop.shop-redesign .inv-card .art::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(8, 10, 18, 0.55) 0%, rgba(8, 10, 18, 0.12) 14%, transparent 26%, transparent 58%, rgba(8, 10, 18, 0.35) 78%, rgba(8, 10, 18, 0.82) 100%);
    pointer-events: none;
}
#shop.shop-redesign .inv-card .card-top {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    z-index: 4;
    pointer-events: none;
}
#shop.shop-redesign .inv-card .badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
}
#shop.shop-redesign .inv-card .badge {
    flex: 0 1 auto;
    min-width: 0;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
#shop.shop-redesign .inv-card .badge.pred {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(90, 18, 24, 0.55);
}
#shop.shop-redesign .inv-card .badge.herb {
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, 0.55);
    background: rgba(6, 55, 42, 0.55);
}
#shop.shop-redesign .inv-card .badge.omni {
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(69, 46, 10, 0.55);
}
#shop.shop-redesign .inv-card .badge.boost {
    color: #67e8f9;
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(8, 42, 62, 0.55);
}
#shop.shop-redesign .inv-card .panel {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: 4px 7px 7px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
}
#shop.shop-redesign .inv-card .title-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 18px rgba(0, 0, 0, 0.55);
}
#shop.shop-redesign .inv-card .title-block .name,
#shop.shop-redesign .inv-card .name {
    margin: 0;
    text-align: center;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: clamp(10px, 0.85vw, 12px);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}
#shop.shop-redesign .inv-card .latin { display: none; }
#shop.shop-redesign .inv-card .source {
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.28);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#shop.shop-redesign .inv-card .stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}
#shop.shop-redesign .inv-card.is-boost .stats { grid-template-columns: 1fr; }
#shop.shop-redesign .inv-card .stat {
    padding: 4px 3px 5px;
    border-radius: 9px;
    background: rgba(8, 10, 18, 0.45);
    border: 1px solid rgba(129, 140, 248, 0.22);
    text-align: center;
    backdrop-filter: blur(10px) saturate(1.15);
    -webkit-backdrop-filter: blur(10px) saturate(1.15);
}
#shop.shop-redesign .inv-card .stat span {
    display: block;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 1px;
}
#shop.shop-redesign .inv-card .stat strong {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #f8fafc;
}
#shop.shop-redesign .inv-card .stat.grow strong { color: #67e8f9; }
#shop.shop-redesign .inv-card .actions {
    display: flex;
    gap: 4px;
    align-items: stretch;
}
#shop.shop-redesign .inv-card .btn-main {
    flex: 1;
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    min-height: 30px;
    padding: 0 8px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    background: var(--brand-grad);
    cursor: pointer;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
    transition: filter 0.15s ease, transform 0.12s ease;
}
#shop.shop-redesign .inv-card .btn-main:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
#shop.shop-redesign .inv-card .btn-main:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(0.4);
    transform: none;
}
#shop.shop-redesign .shop-clan-hint {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(72, 86, 232, 0.12);
    color: #c4b5fd;
    font-size: 13px;
}

/* —— Рейтинг + Пользователи: glass как магазин/инвентарь —— */
#ratings.list-redesign,
#users.list-redesign {
    gap: 4px;
}
#ratings.list-redesign > h2,
#users.list-redesign > h2 {
    display: none;
}
#ratings.list-redesign.active,
#users.list-redesign.active {
    min-height: 0 !important;
    max-height: none !important;
    flex: 1 1 auto;
    overflow: hidden;
}
.content-main-scroll:has(#ratings.list-redesign.active),
.content-main-scroll:has(#users.list-redesign.active) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.content-main-scroll:has(#ratings.list-redesign.active) > .content-top-sticky,
.content-main-scroll:has(#users.list-redesign.active) > .content-top-sticky {
    flex-shrink: 0;
    margin-bottom: 4px;
}
.content-main-scroll:has(#ratings.list-redesign.active) > .site-footer,
.content-main-scroll:has(#users.list-redesign.active) > .site-footer {
    flex-shrink: 0;
    margin-top: 6px;
}
#ratings.list-redesign .ratings-filter,
#users.list-redesign .ratings-filter {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    gap: clamp(4px, 0.8vw, 8px);
    width: 100%;
    box-sizing: border-box;
    padding: 4px 6px;
    margin: 0 0 4px;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.62)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 20px rgba(72, 86, 232, 0.08);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    flex-shrink: 0;
}
#ratings.list-redesign .ratings-filter button,
#users.list-redesign .ratings-filter button {
    appearance: none;
    border: 0;
    border-radius: 12px;
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.7);
    background: transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
#ratings.list-redesign .ratings-filter button img,
#users.list-redesign .ratings-filter button img {
    width: 16px;
    height: 16px;
    opacity: 0.85;
    flex-shrink: 0;
}
#ratings.list-redesign .ratings-filter button:hover,
#users.list-redesign .ratings-filter button:hover {
    color: #fff;
    background: rgba(72, 86, 232, 0.22);
    transform: translateY(-1px);
}
#ratings.list-redesign .ratings-filter button.active,
#users.list-redesign .ratings-filter button.active {
    color: #fff;
    background: var(--brand-grad);
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.45);
}
#ratings.list-redesign .ratings-filter button.active img,
#users.list-redesign .ratings-filter button.active img {
    opacity: 1;
    filter: brightness(1.15);
}

#users.list-redesign .users-search-wrap {
    max-width: none;
    width: 100%;
    margin: 0 0 4px;
    padding: 0;
    flex-shrink: 0;
}
#users.list-redesign .users-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.7), rgba(8, 10, 18, 0.58)) padding-box,
        linear-gradient(115deg, rgba(34, 211, 238, 0.35), rgba(72, 86, 232, 0.45), rgba(139, 92, 246, 0.35)) border-box;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
#users.list-redesign .users-search-input::placeholder {
    color: rgba(148, 163, 184, 0.75);
}
#users.list-redesign .users-search-input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35), 0 0 22px rgba(72, 86, 232, 0.25);
}

#ratings.list-redesign .ratings-board,
#users.list-redesign .ratings-board {
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.55), rgba(8, 10, 18, 0.42)) padding-box,
        var(--brand-grad) border-box;
    border: 1px solid transparent;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32), 0 0 20px rgba(72, 86, 232, 0.08);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
}
#ratings.list-redesign .ratings-head,
#users.list-redesign .ratings-head {
    background: rgba(8, 10, 18, 0.35);
    border-bottom: 1px solid rgba(129, 140, 248, 0.22);
    color: rgba(165, 180, 252, 0.95);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 12px;
    gap: 8px;
}
#ratings.list-redesign .rating-row,
#users.list-redesign .rating-row {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease, box-shadow 0.15s ease;
    padding: 7px 12px;
    gap: 8px;
}
#ratings.list-redesign .list-avatar-stack,
#users.list-redesign .list-avatar-stack {
    width: 32px;
    height: 32px;
}
#ratings.list-redesign .list-avatar-stack .list-avatar-photo,
#users.list-redesign .list-avatar-stack .list-avatar-photo {
    width: 32px;
    height: 32px;
}
#ratings.list-redesign .rating-avatar,
#users.list-redesign .rating-avatar {
    width: 32px;
    height: 32px;
}
#ratings.list-redesign .rating-row:hover,
#users.list-redesign .rating-row:hover {
    background: rgba(72, 86, 232, 0.1);
}
#ratings.list-redesign .rating-row.admin-row,
#users.list-redesign .rating-row.admin-row {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.12), rgba(127, 29, 29, 0.05) 45%, rgba(153, 27, 27, 0.1));
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.55);
}
#ratings.list-redesign .rating-row.mod-row,
#users.list-redesign .rating-row.mod-row {
    background: linear-gradient(100deg, rgba(59, 130, 246, 0.11), rgba(29, 78, 216, 0.05) 45%, rgba(37, 99, 235, 0.1));
    box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.55);
}
#ratings.list-redesign .rating-row.booster-row,
#users.list-redesign .rating-row.booster-row {
    background: linear-gradient(100deg, rgba(168, 85, 247, 0.12), rgba(126, 34, 206, 0.05) 45%, rgba(192, 38, 211, 0.1));
    box-shadow: inset 3px 0 0 rgba(192, 132, 252, 0.55);
}
#ratings.list-redesign .rating-row.diamond-row,
#users.list-redesign .rating-row.diamond-row {
    background: linear-gradient(100deg, rgba(8, 145, 178, 0.12), rgba(99, 102, 241, 0.07) 45%, rgba(192, 38, 211, 0.12));
    box-shadow: inset 3px 0 0 rgba(34, 211, 238, 0.5);
}
#ratings.list-redesign .rating-row.gold-row,
#users.list-redesign .rating-row.gold-row {
    background: linear-gradient(100deg, rgba(217, 119, 6, 0.1), rgba(250, 204, 21, 0.05) 45%, rgba(180, 83, 9, 0.1));
    box-shadow: inset 3px 0 0 rgba(250, 204, 21, 0.45);
}
#ratings.list-redesign .rating-row.youtuber-row,
#users.list-redesign .rating-row.youtuber-row {
    background: linear-gradient(100deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05) 45%, rgba(185, 28, 28, 0.1));
    box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.5);
}
#ratings.list-redesign .rating-row.admin-row.diamond-row,
#users.list-redesign .rating-row.admin-row.diamond-row {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.13), rgba(99, 102, 241, 0.08) 50%, rgba(192, 38, 211, 0.12));
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.55);
}
#ratings.list-redesign .rating-row.admin-row.gold-row,
#users.list-redesign .rating-row.admin-row.gold-row {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.12), rgba(250, 204, 21, 0.07) 50%, rgba(180, 83, 9, 0.1));
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.55);
}
#ratings.list-redesign .rating-row.admin-row.booster-row,
#users.list-redesign .rating-row.admin-row.booster-row {
    background: linear-gradient(100deg, rgba(220, 38, 38, 0.12), rgba(168, 85, 247, 0.08) 50%, rgba(192, 38, 211, 0.1));
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.55);
}
#ratings.list-redesign .rating-row.mod-row.booster-row,
#users.list-redesign .rating-row.mod-row.booster-row {
    background: linear-gradient(100deg, rgba(59, 130, 246, 0.11), rgba(168, 85, 247, 0.08) 50%, rgba(192, 38, 211, 0.1));
    box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.55);
}
#ratings.list-redesign .rating-row.youtuber-row.booster-row,
#users.list-redesign .rating-row.youtuber-row.booster-row {
    background: linear-gradient(100deg, rgba(239, 68, 68, 0.1), rgba(168, 85, 247, 0.08) 50%, rgba(192, 38, 211, 0.1));
    box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.5);
}

#ratings.list-redesign .rating-score,
#users.list-redesign .rating-score {
    color: #67e8f9;
}
#ratings.list-redesign .rating-prize {
    color: #c4b5fd;
}
#ratings.list-redesign .rating-alltime-metric {
    background: rgba(8, 10, 18, 0.4);
    border: 1px solid rgba(129, 140, 248, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#ratings.list-redesign .ratings-prize-footnote,
#ratings.list-redesign .ratings-reward-countdown {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
#ratings.list-redesign .ratings-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.55), rgba(8, 10, 18, 0.4)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 0 16px rgba(72, 86, 232, 0.08);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    flex-shrink: 0;
}
#ratings.list-redesign .ratings-meta.is-hidden {
    display: none;
}
#ratings.list-redesign .ratings-prize-footnote {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 280px;
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(203, 213, 225, 0.88);
}
#ratings.list-redesign .ratings-meta-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-right: 2px;
}
#ratings.list-redesign .ratings-prize-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
    white-space: nowrap;
}
#ratings.list-redesign .ratings-prize-chip.place-1 {
    border-color: rgba(250, 204, 21, 0.45);
    color: #fde68a;
    background: rgba(69, 46, 10, 0.4);
}
#ratings.list-redesign .ratings-prize-chip.place-2 {
    border-color: rgba(148, 163, 184, 0.45);
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.5);
}
#ratings.list-redesign .ratings-prize-chip.place-3 {
    border-color: rgba(251, 146, 60, 0.45);
    color: #fdba74;
    background: rgba(67, 32, 10, 0.4);
}
#ratings.list-redesign .ratings-meta-note {
    flex: 1 1 180px;
    font-size: 11px;
    color: rgba(148, 163, 184, 0.85);
}
#ratings.list-redesign .ratings-reward-countdown {
    flex: 0 0 auto;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(8, 42, 62, 0.45);
    color: #67e8f9;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

#users.list-redesign .user-status-badge {
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#users.list-redesign .user-status-badge.online {
    background: rgba(52, 211, 153, 0.18);
    border-color: rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}
#users.list-redesign .user-status-badge.offline {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(148, 163, 184, 0.25);
    color: #94a3b8;
}
#users.list-redesign .user-friend-btn {
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(17, 21, 42, 0.55);
    color: #e2e8f0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: filter 0.15s ease, transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
#users.list-redesign .user-friend-btn:hover:not(:disabled) {
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(72, 86, 232, 0.28);
    color: #fff;
}
#users.list-redesign .user-friend-btn.is-friend {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(6, 55, 42, 0.4);
    color: #a7f3d0;
}
#users.list-redesign .users-list-footer {
    max-width: none;
    width: 100%;
    margin: 4px 0 0;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.55), rgba(8, 10, 18, 0.4)) padding-box,
        var(--brand-grad) border-box;
    color: #94a3b8;
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    flex-shrink: 0;
}
#users.list-redesign .users-list-footer #usersListCount {
    font-size: 12px;
    font-weight: 700;
    color: rgba(203, 213, 225, 0.9);
}
#users.list-redesign .users-pager {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}
#users.list-redesign .users-pager button {
    appearance: none;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
    border-radius: 10px;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
#users.list-redesign .users-pager button:hover:not(:disabled) {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(72, 86, 232, 0.28);
    transform: translateY(-1px);
}
#users.list-redesign .users-pager button.active {
    border-color: transparent;
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.4);
}
#users.list-redesign .users-pager button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
#users.list-redesign .users-pager .pager-gap {
    padding: 0 4px;
    color: #64748b;
    font-weight: 800;
}

@media (max-width: 900px) {
    #ratings.list-redesign .ratings-filter,
    #users.list-redesign .ratings-filter {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    #ratings.list-redesign .ratings-filter button,
    #users.list-redesign .ratings-filter button {
        flex: 1 1 calc(50% - 6px);
        font-size: 10px;
        padding: 9px 6px;
    }
    #ratings.list-redesign .ratings-reward-countdown {
        white-space: normal;
        width: 100%;
        text-align: center;
    }
}

.purchase-prime-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.08);
    cursor: pointer;
    font-weight: 700;
    color: #fde68a;
}
.purchase-prime-label input { width: 18px; height: 18px; accent-color: #f59e0b; }
.purchase-prime-label em {
    margin-left: auto;
    font-style: normal;
    font-weight: 700;
    color: #fbbf24;
}
.purchase-skin-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.purchase-skin-preview {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        conic-gradient(from 120deg, #22d3ee, #4856e8, #8b5cf6, #22d3ee);
    flex-shrink: 0;
}
.purchase-skin-preview.has-custom {
    background: var(--purchase-skin-swatch, var(--brand-grad));
}
.purchase-skin-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.purchase-skin-meta span {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.9);
}
.purchase-skin-btn {
    align-self: flex-start;
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    background: var(--brand-grad);
    cursor: pointer;
}
.purchase-skin-btn.ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
}

/* —— Inventory redesign —— */
.content-main-scroll:has(#inventory.inv-redesign.active) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.content-main-scroll:has(#inventory.inv-redesign.active) > .content-top-sticky {
    flex: 0 0 auto;
}
.content-main-scroll:has(#inventory.inv-redesign.active) > .site-footer {
    display: none;
}
#inventory.inv-redesign {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
#inventory.inv-redesign.active {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: 100%;
    overflow: hidden;
}
#inventory.inv-redesign .section-sticky-head.inv-redesign-head {
    display: block;
    width: 100%;
    max-width: none;
    margin-bottom: 8px;
    padding: 0;
    top: 0;
    z-index: 40;
    align-items: stretch;
    align-self: stretch;
    flex: 0 0 auto;
}
#inventory.inv-redesign .inv-redesign-head h2 { display: none; }
#inventory.inv-redesign .inventory-filter {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(6px, 1vw, 12px);
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    padding: 6px 8px;
    margin: 0 !important;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.94), rgba(8, 10, 18, 0.92)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4), 0 0 32px rgba(72, 86, 232, 0.12);
    overflow: visible;
    position: relative;
    z-index: 40;
    align-self: stretch !important;
}
#inventory.inv-redesign .inventory-filter > .tab,
#inventory.inv-redesign .inventory-filter > .stage-dd {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    justify-content: center;
}
#inventory.inv-redesign .inventory-filter > .stage-dd {
    position: relative;
}
#inventory.inv-redesign .inventory-filter button.tab {
    appearance: none;
    border: 0;
    border-radius: 14px;
    width: 100%;
    padding: 10px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.65);
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
#inventory.inv-redesign .inventory-filter button.tab .n {
    min-width: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}
#inventory.inv-redesign .inventory-filter button.tab:hover {
    color: #fff;
    background: rgba(72, 86, 232, 0.22);
    transform: translateY(-1px);
}
#inventory.inv-redesign .inventory-filter button.tab.on,
#inventory.inv-redesign .inventory-filter button.tab.active {
    color: #fff;
    background: var(--brand-grad);
    box-shadow: 0 0 20px rgba(72, 86, 232, 0.4);
}
#inventory.inv-redesign .inventory-filter button.tab.on .n,
#inventory.inv-redesign .inventory-filter button.tab.active .n {
    background: rgba(8, 10, 18, 0.35);
    color: #fff;
}
#inventory.inv-redesign .inventory-filter button.tab.tab-prime .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
    flex-shrink: 0;
}
#inventory.inv-redesign .inventory-filter button.tab.tab-prime.on .dot {
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}
#inventory.inv-redesign .inv-search {
    position: relative;
    flex: 0 0 200px;
    width: 200px;
    min-width: 170px;
    max-width: 200px;
    margin-left: 4px;
}
#inventory.inv-redesign .inv-search input {
    width: 100%;
    height: 42px;
    padding: 0 36px 0 38px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(8, 10, 18, 0.72);
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
}
#inventory.inv-redesign .inv-search input::-webkit-search-cancel-button,
#inventory.inv-redesign .inv-search input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
#inventory.inv-redesign .inv-search input::placeholder { color: rgba(148, 163, 184, 0.75); }
#inventory.inv-redesign .inv-search input:focus {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 3px rgba(72, 86, 232, 0.22);
}
#inventory.inv-redesign .inv-search .ico {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
    pointer-events: none;
}
#inventory.inv-redesign .inv-search .clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: none;
    place-items: center;
    padding: 0;
}
#inventory.inv-redesign .inv-search.has-value .clear { display: grid; }
#inventory.inv-redesign .stage-dd {
    position: relative;
    flex: 0 0 auto;
    z-index: 30;
}
#inventory.inv-redesign .stage-dd-btn .chev {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: 0.85;
    margin-left: 2px;
}
#inventory.inv-redesign .stage-dd.open .stage-dd-btn .chev {
    transform: translateY(1px) rotate(-135deg);
}
#inventory.inv-redesign .stage-dd-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 148px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.98), rgba(8, 10, 18, 0.98)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(72, 86, 232, 0.25);
    z-index: 60;
    display: none;
    flex-direction: column;
    gap: 2px;
}
#inventory.inv-redesign .stage-dd.open .stage-dd-menu { display: flex; }
#inventory.inv-redesign .stage-dd-menu[hidden] { display: none !important; }
#inventory.inv-redesign .stage-dd-menu button {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    background: transparent;
    color: rgba(226, 232, 240, 0.78);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
}
#inventory.inv-redesign .stage-dd-menu button:hover {
    color: #fff;
    background: rgba(72, 86, 232, 0.28);
}
#inventory.inv-redesign .stage-dd-menu button.on {
    color: #fff;
    background: var(--brand-grad);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}

#inventory.inv-redesign .inv-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr);
    gap: 10px 14px;
    align-items: stretch;
    width: 100%;
}
#inventory.inv-redesign .inv-body:has(.inv-pager[hidden]) {
    grid-template-columns: minmax(0, 1fr);
}
#inventory.inv-redesign .inv-slider {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 10px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    height: 100%;
}
#inventory.inv-redesign .inv-nav {
    appearance: none;
    align-self: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(17, 21, 42, 0.9);
    color: #e0f2fe;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}
#inventory.inv-redesign .inv-nav:hover:not(:disabled) {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.35);
    transform: translateY(-1px);
}
#inventory.inv-redesign .inv-nav:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
    transform: none;
}
#inventory.inv-redesign .inv-viewport {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.55) rgba(8, 10, 18, 0.35);
}
#inventory.inv-redesign .inv-track {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: stretch;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
#inventory.inv-redesign .inv-page {
    flex: 0 0 100%;
    min-width: 100%;
    height: auto;
    min-height: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(310px, 1fr));
    gap: 14px 16px;
    align-content: stretch;
    box-sizing: border-box;
    padding: 4px 12px;
}
#inventory.inv-redesign .inv-pager {
    width: 92px;
    box-sizing: border-box;
    margin: 0;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(72, 86, 232, 0.28);
    background: rgba(8, 10, 18, 0.45);
    align-self: end;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 100%;
    overflow: hidden;
}
#inventory.inv-redesign .inv-pager[hidden] { display: none !important; }
#inventory.inv-redesign .inv-thumbs {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
#inventory.inv-redesign .inv-thumbs::-webkit-scrollbar { display: none; }
#inventory.inv-redesign .inv-thumb {
    appearance: none;
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 5px 4px 6px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: rgba(8, 10, 18, 0.7);
    color: #94a3b8;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
#inventory.inv-redesign .inv-thumb:hover {
    border-color: rgba(34, 211, 238, 0.45);
    transform: translateY(-1px);
}
#inventory.inv-redesign .inv-thumb.is-active {
    border-color: transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.95), rgba(8, 10, 18, 0.95)) padding-box,
        var(--brand-grad) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.35);
    color: #e0f2fe;
}
#inventory.inv-redesign .inv-thumb-pic {
    width: 58px;
    height: 42px;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    background: rgba(17, 21, 42, 0.95);
    border: 1px solid rgba(72, 86, 232, 0.25);
}
#inventory.inv-redesign .inv-thumb-pic img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}
#inventory.inv-redesign .inv-thumb-title {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #f1f5f9;
}
#inventory.inv-redesign .inv-thumb-sub {
    font-size: 8px;
    font-weight: 700;
    color: #67e8f9;
}
#inventory.inv-redesign .inv-thumb:not(.is-active) .inv-thumb-sub { color: #94a3b8; }
#inventory.inv-redesign .inv-scroller {
    display: none;
}
#inventory.inv-redesign .inv-scroller-btn {
    appearance: none;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(148, 163, 184, 0.75);
    cursor: pointer;
    position: relative;
    font-size: 0;
}
#inventory.inv-redesign .inv-scroller-btn::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
}
#inventory.inv-redesign .inv-scroller-btn.prev::before {
    transform: translate(-40%, -50%);
    border-width: 5px 7px 5px 0;
    border-color: transparent currentColor transparent transparent;
}
#inventory.inv-redesign .inv-scroller-btn.next::before {
    transform: translate(-20%, -50%);
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent currentColor;
}
#inventory.inv-redesign .inv-scroller-btn:hover:not(:disabled) { color: #67e8f9; }
#inventory.inv-redesign .inv-scroller-btn:disabled { opacity: 0.3; cursor: default; }
#inventory.inv-redesign .inv-scroller-bar {
    position: relative;
    height: 5px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.85);
    cursor: pointer;
    overflow: hidden;
}
#inventory.inv-redesign .inv-scroller-thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    min-width: 24%;
    border-radius: 999px;
    background: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.55);
    transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.2s ease;
    pointer-events: none;
}

#inventory.inv-redesign .inv-card {
    --accent: rgba(72, 86, 232, 0.35);
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
    min-height: 0;
    height: auto;
    max-height: none;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(12, 16, 32, 0.08), rgba(8, 10, 18, 0.98)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
#inventory.inv-redesign .inv-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 22px var(--accent);
}
#inventory.inv-redesign .inv-card.is-pred { --accent: rgba(248, 113, 113, 0.28); }
#inventory.inv-redesign .inv-card.is-herb { --accent: rgba(52, 211, 153, 0.28); }
#inventory.inv-redesign .inv-card.is-omni { --accent: rgba(251, 191, 36, 0.28); }
#inventory.inv-redesign .inv-card.is-boost {
    --accent: rgba(34, 211, 238, 0.35);
    background:
        linear-gradient(180deg, rgba(12, 24, 28, 0.08), rgba(8, 10, 18, 0.98)) padding-box,
        linear-gradient(115deg, #34d399 0%, #22D3EE 42%, #4856E8 100%) border-box;
}
#inventory.inv-redesign .inv-card .art {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: 13px;
    background: transparent;
}
#inventory.inv-redesign .inv-card .art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Квадратный арт + почти квадратная карточка: contain заполняет без кропа и без полей */
    object-fit: contain;
    object-position: center center;
    display: block;
    transform: none;
    transform-origin: center center;
    transition: transform 0.35s ease;
    filter: saturate(1.05) contrast(1.04);
}
#inventory.inv-redesign .inv-card.is-boost .art img {
    object-position: center center;
    transform: none;
}
#inventory.inv-redesign .inv-card:hover .art img { transform: scale(1.03); }
#inventory.inv-redesign .inv-card.is-boost:hover .art img { transform: scale(1.03); }
#inventory.inv-redesign .inv-card .art::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(8, 10, 18, 0.55) 0%, rgba(8, 10, 18, 0.12) 14%, transparent 26%, transparent 58%, rgba(8, 10, 18, 0.35) 78%, rgba(8, 10, 18, 0.82) 100%);
    pointer-events: none;
}
#inventory.inv-redesign .inv-card .card-top {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    z-index: 4;
    pointer-events: none;
}
#inventory.inv-redesign .inv-card .badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
}
#inventory.inv-redesign .inv-card .badge {
    flex: 0 1 auto;
    min-width: 0;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
#inventory.inv-redesign .inv-card .badge.pred {
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.55);
    background: rgba(90, 18, 24, 0.55);
}
#inventory.inv-redesign .inv-card .badge.herb {
    color: #a7f3d0;
    border: 1px solid rgba(52, 211, 153, 0.55);
    background: rgba(6, 55, 42, 0.55);
}
#inventory.inv-redesign .inv-card .badge.omni {
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.55);
    background: rgba(69, 46, 10, 0.55);
}
#inventory.inv-redesign .inv-card .badge.boost {
    color: #67e8f9;
    border: 1px solid rgba(34, 211, 238, 0.55);
    background: rgba(8, 42, 62, 0.6);
}
#inventory.inv-redesign .inv-card .badge.stage {
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.72);
    letter-spacing: 0.14em;
}
#inventory.inv-redesign .inv-card .badge.stage.hatch { color: #fde68a; border-color: rgba(251, 191, 36, 0.5); background: rgba(69, 46, 10, 0.55); }
#inventory.inv-redesign .inv-card .badge.stage.juv { color: #bbf7d0; border-color: rgba(74, 222, 128, 0.5); background: rgba(20, 55, 30, 0.55); }
#inventory.inv-redesign .inv-card .badge.stage.sub { color: #a5f3fc; border-color: rgba(34, 211, 238, 0.5); background: rgba(8, 47, 73, 0.55); }
#inventory.inv-redesign .inv-card .badge.stage.adult { color: #c4b5fd; border-color: rgba(167, 139, 250, 0.5); background: rgba(46, 16, 80, 0.55); }
#inventory.inv-redesign .inv-card .badge.stage.elder { color: #fbcfe8; border-color: rgba(244, 114, 182, 0.5); background: rgba(76, 20, 50, 0.55); }
#inventory.inv-redesign .inv-card .badge.prime {
    color: #fff;
    border: 1px solid rgba(165, 180, 252, 0.5);
    background: var(--brand-grad);
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.5);
}
#inventory.inv-redesign .inv-card .badge.no-prime {
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.45);
    background: rgba(15, 23, 42, 0.65);
}
#inventory.inv-redesign .inv-card .panel {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: 4px 7px 7px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
}
#inventory.inv-redesign .inv-card .title-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 18px rgba(0, 0, 0, 0.55);
}
#inventory.inv-redesign .inv-card .title-block .name {
    margin: 0;
    text-align: center;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: clamp(10px, 0.85vw, 12px);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}
#inventory.inv-redesign .inv-card .title-block .latin {
    display: none;
}
#inventory.inv-redesign .inv-card .source {
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.28);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#inventory.inv-redesign .inv-card .source::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #22D3EE;
    box-shadow: 0 0 8px #22D3EE;
    flex-shrink: 0;
}
#inventory.inv-redesign .inv-card .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}
#inventory.inv-redesign .inv-card.is-boost .stats { grid-template-columns: 1fr; }
#inventory.inv-redesign .inv-card .stat {
    padding: 4px 3px 5px;
    border-radius: 9px;
    background: rgba(8, 10, 18, 0.78);
    border: 1px solid rgba(129, 140, 248, 0.22);
    text-align: center;
}
#inventory.inv-redesign .inv-card .stat span {
    display: block;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 1px;
}
#inventory.inv-redesign .inv-card .stat strong {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #f8fafc;
}
#inventory.inv-redesign .inv-card .stat.grow strong { color: #67e8f9; }
#inventory.inv-redesign .inv-card .stat.mut strong { color: #e9d5ff; }
#inventory.inv-redesign .inv-card .bar {
    margin-top: 3px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
#inventory.inv-redesign .inv-card .bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22D3EE, #4856E8);
}
#inventory.inv-redesign .inv-card .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px 30px;
    gap: 4px;
    align-items: stretch;
}
#inventory.inv-redesign .inv-card.is-boost .actions { grid-template-columns: minmax(0, 1fr) 30px; }
#inventory.inv-redesign .inv-card .actions button {
    appearance: none;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    width: auto;
    margin-top: 0;
    box-shadow: none;
    transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
#inventory.inv-redesign .inv-card .actions button:hover { filter: brightness(1.08); transform: translateY(-1px); }
#inventory.inv-redesign .inv-card .btn-main {
    min-height: 30px;
    padding: 0 8px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    background: var(--brand-grad);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
#inventory.inv-redesign .inv-card .btn-ico {
    position: relative;
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    background: rgba(17, 21, 42, 0.95);
    border-color: rgba(129, 140, 248, 0.4) !important;
    color: #a5b4fc;
}
#inventory.inv-redesign .inv-card .btn-ico:hover {
    color: #fff;
    border-color: rgba(34, 211, 238, 0.55) !important;
    background: rgba(72, 86, 232, 0.28);
}
#inventory.inv-redesign .inv-card .btn-ico.info {
    border-color: rgba(34, 211, 238, 0.5) !important;
    color: #67e8f9;
    background: linear-gradient(165deg, rgba(14, 55, 78, 0.75), rgba(8, 20, 40, 0.9));
}
#inventory.inv-redesign .inv-card .btn-ico svg {
    width: 14px;
    height: 14px;
    display: block;
}
#inventory.inv-redesign .inv-card .btn-ico[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    transform: translateY(4px);
    padding: 7px 11px;
    border-radius: 10px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.98), rgba(8, 10, 18, 0.96)) padding-box,
        var(--brand-grad) border-box;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
}
#inventory.inv-redesign .inv-card .btn-ico[data-tip]:hover::after {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 1180px) {
    #inventory.inv-redesign .inv-page { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    #inventory.inv-redesign .inv-page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .content-main-scroll:has(#inventory.inv-redesign.active) { overflow: auto; }
    .content-main-scroll:has(#inventory.inv-redesign.active) > .site-footer { display: block; }
    #inventory.inv-redesign.active { max-height: none; overflow: visible; }
    #inventory.inv-redesign .inv-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    #inventory.inv-redesign .inv-pager {
        width: 100%;
        align-self: stretch;
        flex-direction: row;
        align-items: center;
    }
    #inventory.inv-redesign .inv-thumbs { flex-direction: row; overflow-x: auto; }
    #inventory.inv-redesign .inv-thumb { width: 84px; }
    #inventory.inv-redesign .inv-scroller { display: grid; }
    #inventory.inv-redesign .inventory-filter { flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
    #inventory.inv-redesign .inventory-filter > .tab,
    #inventory.inv-redesign .inventory-filter > .stage-dd { flex: 0 1 auto; }
    #inventory.inv-redesign .inv-search {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin-left: 0;
    }
    #inventory.inv-redesign .inv-page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        height: auto;
        gap: 12px;
    }
    #inventory.inv-redesign .inv-card { height: auto; min-height: 280px; }
    #inventory.inv-redesign .inv-slider { grid-template-columns: 32px minmax(0, 1fr) 32px; height: auto; }
    #inventory.inv-redesign .inv-nav { width: 32px; height: 32px; font-size: 18px; }
}
@media (max-width: 540px) {
    #inventory.inv-redesign .inv-page { grid-template-columns: 1fr; }
    #inventory.inv-redesign .inv-card { min-height: 0; }
}

/* Inventory redesign modals */
.inv-rd-modal.purchase-modal {
    align-items: flex-start;
    padding: 20px 16px;
    overflow-y: auto;
    background: rgba(8, 10, 18, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.inv-rd-card {
    width: min(440px, 96vw);
    margin: auto;
    border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.97), rgba(8, 10, 18, 0.97)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(72, 86, 232, 0.22);
    padding: 18px;
}
.inv-rd-card--info {
    width: min(920px, 96vw);
    max-height: min(90vh, 900px);
    overflow: auto;
    padding: 14px;
}
.inv-rd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(72, 86, 232, 0.28);
}
.inv-rd-head h3 {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.inv-rd-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.38);
    background: rgba(17, 21, 42, 0.85);
    color: #e0f2fe;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}
.inv-rd-close:hover {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
.inv-rd-item-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.45;
}
.inv-rd-item-hint strong { color: #67e8f9; }
.inv-rd-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
}
.inv-rd-field label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}
.inv-rd-field select,
.inv-rd-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.75);
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
}
.inv-rd-field select:focus,
.inv-rd-field input:focus {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 3px rgba(72, 86, 232, 0.22);
}
.inv-rd-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.inv-rd-btn {
    flex: 1 1 140px;
    min-height: 46px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0 18px;
}
.inv-rd-btn-primary {
    color: #fff;
    background: var(--brand-grad);
    box-shadow: 0 0 20px rgba(72, 86, 232, 0.4);
}
.inv-rd-btn-ghost {
    color: #cbd5e1;
    background: rgba(17, 21, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
}
.inv-info-slot {
    border-radius: 16px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: linear-gradient(165deg, rgba(17, 21, 42, 0.88), rgba(8, 10, 18, 0.9));
    padding: 14px;
}
.inv-info-slot-inner {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
}
.inv-info-slot-thumb {
    width: 112px;
    height: 112px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 24px rgba(72, 86, 232, 0.25);
}
.inv-info-slot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    transform: scale(0.9);
    transform-origin: center center;
}
.inv-info-slot-name {
    margin: 0 0 12px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.2;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.inv-info-slot-name small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #94a3b8;
    -webkit-text-fill-color: #94a3b8;
    background: none;
}
.inv-info-slot-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.inv-info-slot-stat {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(8, 10, 18, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.inv-info-slot-stat .l {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #67e8f9;
    margin-bottom: 4px;
}
.inv-info-slot-stat .v {
    font-size: 15px;
    font-weight: 800;
    color: #f8fafc;
}
.inv-info-slot-stat .v.is-yes { color: #67e8f9; }
.inv-info-slot-stat .v.is-no { color: #94a3b8; }
.inv-info-slot-bar {
    margin-top: 7px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.inv-info-slot-bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand-grad);
}
.inv-info-slot-meta {
    margin: 0 0 12px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
}
.inv-info-slot-meta strong { color: #e2e8f0; }
.inv-info-mut-wrap {
    margin-top: 14px;
    padding-top: 4px;
}
.inv-info-mut-wrap .mut-title {
    margin: 0 0 10px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.inv-info-mut-wrap .mut-compact-wrap,
.inv-info-mut-wrap .mut-block {
    margin: 0;
    padding: 14px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.06), transparent 40%),
        linear-gradient(315deg, rgba(139, 92, 246, 0.08), transparent 45%),
        rgba(8, 10, 18, 0.42);
    border: 1px solid rgba(129, 140, 248, 0.3);
}
.inv-info-mut-wrap .mut-compact-grid,
.inv-info-mut-wrap .mut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
@media (max-width: 900px) {
    .inv-info-mut-wrap .mut-compact-grid,
    .inv-info-mut-wrap .mut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .inv-info-slot-inner { grid-template-columns: 1fr; }
    .inv-info-slot-thumb { width: 96px; height: 96px; }
    .inv-info-slot-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inv-info-mut-wrap .mut-compact-grid,
    .inv-info-mut-wrap .mut-grid { grid-template-columns: 1fr; }
}


@media (max-width: 1400px) {
    #shopCards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    #shopCards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    #shopCards {
        grid-template-columns: 1fr;
    }
}

.product-title {
    margin-top: 10px;
    font-weight: 700;
    min-height: 38px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    color: rgba(246, 246, 246, 0.85);
    font-size: 14px;
}

.product-tag {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.empty-state {
    margin-top: 14px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.14);
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0 0 14px;
    color: rgba(246, 246, 246, 0.75);
}

.card button {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #f6f6f6;
    color: #282828;
    border: none;
    border-radius: 100px;
    font-weight: 600;
    box-shadow: 0 0 20px 0 rgba(255, 255, 255, 0.25);
}

.product-unavailable-note {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.35);
    color: #fecdd3;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
}

.product-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-buy-btn--disabled {
    background: rgba(70, 74, 84, 0.75) !important;
    color: rgba(246, 246, 246, 0.45) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

.product-buy-btn-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

/* ===== DINO ===== */
.dino {
    background: #141a22;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
}

.dinos-board {
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.55));
    border-radius: 20px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    padding: 16px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: auto;
    max-height: none;
    box-shadow: 0 0 36px rgba(72, 86, 232, 0.12);
    /* Один скролл — у .content-main-scroll; иначе двойной при раскрытии популяции. */
    overflow: visible;
}

#dinos.section.active {
    height: auto;
    max-height: none;
    overflow: visible;
}

.dinos-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.dinos-page-head-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}
.dinos-page-dino {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.dinos-page-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.14);
    color: #fde68a;
    font-size: 12px;
    font-weight: 700;
}
.dinos-page-status.is-live {
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(52, 211, 153, 0.14);
    color: #a7f3d0;
}
.dinos-page-status-sep {
    width: 1px;
    height: 14px;
    background: currentColor;
    opacity: 0.35;
}
.dinos-btn-slots {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background:
        linear-gradient(rgba(17, 21, 42, 0.95), rgba(8, 10, 18, 0.95)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    color: #e0f2fe;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none; opacity: 0.45;
}
.dinos-btn-slots .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.16);
    border: 1px solid rgba(34, 211, 238, 0.35);
    font-size: 11px;
    font-weight: 800;
    color: #67e8f9;
}
.dinos-btn-voice {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.18);
    color: #e9d5ff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.28);
}
.dinos-btn-voice:hover {
    filter: brightness(1.08);
}

.dinos-active-fixed {
    position: sticky;
    top: 0;
    z-index: 8;
    background: transparent;
    border-radius: 14px;
    padding: 0;
}

.dinos-active-fixed > .active-slot {
    margin-top: 0;
}

.refresh-btn {
    border: none;
    border-radius: 100px;
    padding: 10px 20px;
    background: #4ade80;
    color: #183021;
    font-weight: 700;
}

.dinos-content {
    display: grid;
    gap: 18px;
}

.dinos-slots-scroll {
    display: none !important;
}

/* —— Slots storage modal (carousel) —— */
.slots-storage-modal {
    position: fixed;
    inset: 0;
    z-index: 12080;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 16px;
    overflow-y: auto;
    background: rgba(8, 10, 18, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.slots-storage-modal:not(.hidden) { display: flex; }
.slots-storage-card {
    width: min(720px, 94vw);
    margin: auto;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.96), rgba(8, 10, 18, 0.96)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(72, 86, 232, 0.22);
    padding: 12px 12px 10px;
}
.slots-storage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(72, 86, 232, 0.25);
}
.slots-storage-head h3 {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.slots-storage-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.38);
    background: rgba(17, 21, 42, 0.85);
    color: #e0f2fe;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}
.slots-slider {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 6px;
    align-items: start;
}
.slots-nav {
    appearance: none;
    align-self: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(17, 21, 42, 0.9);
    color: #e0f2fe;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.slots-nav:hover {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.35);
}
.slots-nav:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}
.slots-viewport {
    min-width: 0;
    overflow: hidden;
    border-radius: 16px;
}
.slots-track {
    display: flex;
    width: 100%;
    align-items: stretch;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.slot-slide {
    flex: 0 0 100%;
    min-width: 100%;
    display: flex;
    flex-direction: column;
}
.slot-slide .active-slot,
.slot-slide .slots-modal-card {
    margin: 0;
    flex: 1 1 auto;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.88), rgba(8, 10, 18, 0.86));
    padding: 10px;
    position: relative;
}
.slot-slide .slots-modal-card.has-source-badge {
    padding-top: 42px;
}
.slot-slide .slot-source-badge {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: calc(100% - 24px);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    background: rgba(8, 10, 18, 0.82);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.2);
    pointer-events: none;
}
.slot-slide .slot-source-badge img {
    width: 15px;
    height: 15px;
    object-fit: contain;
    flex-shrink: 0;
}
.slot-slide .slot-source-badge.is-clan {
    border: 1px solid rgba(192, 132, 252, 0.55);
    color: #e9d5ff;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.25);
}
.slot-slide .slot-source-badge.is-diamond {
    border: 1px solid rgba(34, 211, 238, 0.55);
    color: #67e8f9;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.28);
}
.slot-slide .slot-source-badge.is-gold {
    border: 1px solid rgba(251, 191, 36, 0.55);
    color: #fde68a;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.25);
}
.slot-slide .slot-source-badge.is-temp,
.slot-slide .slot-source-badge.is-temporary,
.slot-slide .slot-source-badge.is-rental {
    border: 1px solid rgba(251, 146, 60, 0.55);
    color: #fdba74;
    box-shadow: 0 0 14px rgba(251, 146, 60, 0.25);
}
.slot-slide .slots-modal-card.is-empty {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 55% 45% at 50% 42%, rgba(34, 211, 238, 0.1), transparent 70%),
        radial-gradient(ellipse 40% 35% at 50% 58%, rgba(139, 92, 246, 0.1), transparent 65%),
        linear-gradient(165deg, rgba(17, 21, 42, 0.7), rgba(8, 10, 18, 0.7));
}
.slot-slide .empty-body {
    width: 100%;
    text-align: center;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.slot-slide .empty-icon {
    width: 44px;
    height: 44px;
    margin: 0 0 10px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #67e8f9;
    border: 1px solid rgba(129, 140, 248, 0.4);
    background:
        radial-gradient(circle at 30% 25%, rgba(34, 211, 238, 0.22), transparent 55%),
        rgba(8, 10, 18, 0.55);
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.25);
}
.slot-slide .empty-body h4 {
    margin: 0 0 6px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    letter-spacing: 0.1em;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.slot-slide .empty-body p {
    margin: 0 0 12px;
    max-width: 280px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 12px;
    line-height: 1.4;
}
.slot-slide .slot-card-layout {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}
.slot-slide .slot-card-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(0, 0, 0, 0.35);
}
.slot-slide .slot-card-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
}
.slot-slide .dino-stats {
    gap: 6px;
    margin-bottom: 8px;
}
.slot-slide .dino-stat {
    padding: 7px 9px;
    border-radius: 10px;
}
.slot-slide .dino-stat-value { font-size: 13px; }
.slot-slide .mut-compact-wrap,
.slot-slide .mut-block {
    margin: 0 0 8px;
    padding: 8px;
}
.slot-slide .mut-compact-grid,
.slot-slide .mut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}
.slot-slide .mut-compact-item,
.slot-slide .mut-item {
    padding: 5px 7px;
    font-size: 10px;
}
.slot-slide .actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}
.slot-slide .actions button {
    margin: 0;
    min-width: 110px;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.slots-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 10px;
    padding: 10px 2px 4px;
    border-top: 1px solid rgba(72, 86, 232, 0.25);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    scrollbar-width: thin;
    scrollbar-color: #4856E8 rgba(8, 10, 18, 0.45);
}
.slots-thumbs.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}
.slots-thumbs.is-dragging .slot-thumb {
    pointer-events: none;
}
.slots-thumbs::-webkit-scrollbar { height: 5px; }
.slots-thumbs::-webkit-scrollbar-track {
    background: rgba(8, 10, 18, 0.45);
    border-radius: 8px;
}
.slots-thumbs::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: linear-gradient(90deg, #22D3EE, #4856E8, #8B5CF6);
}
.slot-thumb {
    appearance: none;
    flex: 0 0 72px;
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 4px 6px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: rgba(8, 10, 18, 0.55);
    color: rgba(226, 232, 240, 0.72);
    cursor: pointer;
}
.slot-thumb:hover {
    border-color: rgba(34, 211, 238, 0.45);
}
.slot-thumb.is-active {
    border-color: transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.95), rgba(8, 10, 18, 0.95)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
    color: #e0f2fe;
}
.slot-thumb-pic {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    overflow: hidden;
    background: rgba(17, 21, 42, 0.9);
    border: 1px solid rgba(72, 86, 232, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}
.slot-thumb-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.slot-thumb.is-empty .slot-thumb-pic {
    border-style: dashed;
    color: #67e8f9;
    font-size: 16px;
    font-weight: 700;
}
.slot-thumb-label {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.slot-thumb-name {
    font-size: 9px;
    font-weight: 700;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
@media (max-width: 720px) {
    .slots-slider { grid-template-columns: 28px minmax(0, 1fr) 28px; gap: 4px; }
    .slot-slide .slot-card-layout { grid-template-columns: 1fr; }
    .slot-slide .slot-card-thumb { width: 100%; height: 100px; }
}

#activeDinoInfo {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}
#activeDinoInfo h4 {
    margin: 0 0 6px;
    line-height: 1.18;
}
#activeDinoInfo p {
    margin: 2px 0;
    line-height: 1.22;
}

/* —— Dinos redesign: active card —— */
#dinos .dinos-active-fixed > .active-slot {
    border-radius: 20px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.92), rgba(8, 10, 18, 0.9)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35), 0 0 28px rgba(72, 86, 232, 0.16);
    padding: 0;
    overflow: hidden;
    position: relative;
}
#dinos .dinos-active-fixed > .active-slot::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 0% 0%, rgba(34, 211, 238, 0.08), transparent 55%),
        radial-gradient(ellipse 40% 50% at 100% 100%, rgba(139, 92, 246, 0.1), transparent 55%);
    pointer-events: none;
}
.dino-card-layout {
    position: relative;
    z-index: 1;
    padding: 18px;
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 18px;
}
.dino-card-layout .active-dino-thumb-wrap,
.dino-card-layout .dino-thumb {
    position: relative;
    width: 128px;
    height: 128px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 24px rgba(72, 86, 232, 0.25);
    flex-shrink: 0;
}
.dino-card-layout .active-dino-thumb-wrap > img:first-child,
.dino-card-layout .dino-thumb > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dino-card-layout .skin-editor-launch {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(8, 10, 18, 0.85);
    display: grid;
    place-items: center;
    padding: 0;
}
.dino-card-layout .skin-editor-launch img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
.dino-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.dino-stat {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(8, 10, 18, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.dino-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 4px;
}
.dino-stat-value { font-size: 15px; font-weight: 800; color: #f8fafc; }
.dino-stat-value.is-no { color: #94a3b8; }
.dino-stat-value.is-yes { color: #67e8f9; }
.dino-stat-bar {
    margin-top: 7px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.dino-stat-bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
}
.dino-stat.hp .dino-stat-bar > i { background: linear-gradient(90deg, #34d399, #22d3ee); }
.dino-stat.food .dino-stat-bar > i { background: linear-gradient(90deg, #fbbf24, #f97316); }
.dino-stat.water .dino-stat-bar > i { background: linear-gradient(90deg, #38bdf8, #4856E8); }
.dino-coords {
    margin: 0 0 14px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.72);
    font-variant-numeric: tabular-nums;
}
.dino-coords strong { color: #cbd5e1; font-weight: 700; }
.dino-src-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.78);
}

/* Mutations redesign */
.mut-compact-wrap,
.mut-block {
    margin: 0 0 12px;
    padding: 14px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.06), transparent 40%),
        linear-gradient(315deg, rgba(139, 92, 246, 0.08), transparent 45%),
        rgba(8, 10, 18, 0.42);
    border: 1px solid rgba(129, 140, 248, 0.3);
    box-shadow: 0 0 28px rgba(72, 86, 232, 0.1);
}
.mut-title {
    margin: 0 0 12px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.mut-compact-grid,
.mut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.mut-compact-col,
.mut-col {
    --mut-accent: #22D3EE;
    --mut-glow: rgba(34, 211, 238, 0.16);
    --mut-border: rgba(34, 211, 238, 0.35);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 10px 10px 13px;
    border-radius: 14px;
    border: 1px solid var(--mut-border);
    background:
        linear-gradient(165deg, var(--mut-glow), transparent 48%),
        rgba(17, 21, 42, 0.78);
    box-shadow:
        inset 0 0 0 1px rgba(8, 10, 18, 0.3),
        0 8px 20px rgba(0, 0, 0, 0.18);
    position: relative;
    overflow: hidden;
}
.mut-compact-col::before,
.mut-col::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--mut-accent), #8B5CF6);
    box-shadow: 0 0 12px var(--mut-glow);
}
.mut-compact-col:nth-child(1), .mut-col:nth-child(1) {
    --mut-accent: #22D3EE;
    --mut-glow: rgba(34, 211, 238, 0.16);
    --mut-border: rgba(34, 211, 238, 0.35);
}
.mut-compact-col:nth-child(2), .mut-col:nth-child(2) {
    --mut-accent: #818cf8;
    --mut-glow: rgba(72, 86, 232, 0.18);
    --mut-border: rgba(72, 86, 232, 0.4);
}
.mut-compact-col:nth-child(3), .mut-col:nth-child(3) {
    --mut-accent: #a78bfa;
    --mut-glow: rgba(139, 92, 246, 0.18);
    --mut-border: rgba(139, 92, 246, 0.4);
}
.mut-compact-col:nth-child(4), .mut-col:nth-child(4) {
    --mut-accent: #34d399;
    --mut-glow: rgba(52, 211, 153, 0.14);
    --mut-border: rgba(52, 211, 153, 0.35);
}
.mut-compact-col-title,
.mut-col-head {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 7px 8px 9px;
    border-radius: 10px;
    text-align: center;
    color: #e0f2fe;
    background: rgba(8, 10, 18, 0.58);
    border: 1px solid var(--mut-border);
    position: relative;
    opacity: 1;
}
.mut-compact-col-title::after,
.mut-col-head::after {
    content: "";
    display: block;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mut-accent), #8B5CF6);
    opacity: 0.95;
}
.mut-compact-item,
.mut-item {
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    color: rgba(226, 232, 240, 0.88);
    padding: 8px 9px;
    border-radius: 10px;
    background: rgba(8, 10, 18, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 1;
}
.mut-compact-item b,
.mut-item b {
    display: inline-block;
    margin-right: 3px;
    font-weight: 800;
    color: var(--mut-accent);
}
.mut-item .muted,
.mut-compact-item .muted {
    color: rgba(148, 163, 184, 0.55);
    font-style: italic;
}
.mut-item:has(.muted),
.mut-compact-item:has(.muted) {
    opacity: 0.7;
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(8, 10, 18, 0.28);
}
@media (max-width: 1100px) {
    .mut-compact-grid, .mut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dino-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dino-card-layout { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
    .dino-card-layout .active-dino-thumb-wrap { width: 96px; height: 96px; }
}
@media (max-width: 760px) {
    .mut-compact-grid, .mut-grid { grid-template-columns: minmax(0, 1fr); }
    .dino-card-layout { grid-template-columns: 1fr; }
    .dino-card-layout .active-dino-thumb-wrap { width: 100%; height: 160px; }
}

/* Active actions grid */
#dinos .dinos-active-fixed #activeDinoActions {
    display: grid;
    gap: 10px;
    align-items: stretch;
    justify-content: center;
    margin: 0;
    padding: 0 18px 18px;
    position: relative;
    z-index: 1;
}
#dinos .dinos-active-fixed #activeDinoActions.is-admin {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
#dinos .dinos-active-fixed #activeDinoActions.is-player {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
#dinos .dinos-active-fixed #activeDinoActions button {
    margin: 0;
    width: 100%;
    min-height: 42px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
#dinos .dinos-active-fixed #activeDinoActions button.heal,
#dinos .dinos-active-fixed #activeDinoActions button.heal.refill {
    background: linear-gradient(115deg, rgba(16, 185, 129, 0.85), rgba(34, 211, 238, 0.55));
    border-color: rgba(52, 211, 153, 0.35);
    color: #fff;
}
#dinos .dinos-active-fixed #activeDinoActions button.tp {
    background: linear-gradient(115deg, rgba(56, 189, 248, 0.75), rgba(72, 86, 232, 0.7));
    border-color: rgba(56, 189, 248, 0.4);
    color: #fff;
}
#dinos .dinos-active-fixed #activeDinoActions button.grow {
    background: linear-gradient(115deg, rgba(251, 191, 36, 0.55), rgba(245, 158, 11, 0.55));
    border-color: rgba(251, 191, 36, 0.4);
    color: #fff;
}
#dinos .dinos-active-fixed #activeDinoActions button.make-prime {
    background: rgba(100, 116, 139, 0.35);
    border-color: rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
}
.dino-stat-growth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
.dino-stat-growth-row .dino-stat-value {
    margin-right: auto;
}
.dino-growth-pause-inline {
    appearance: none;
    border: 1px solid rgba(34, 211, 238, 0.45);
    background: linear-gradient(115deg, rgba(34, 211, 238, 0.75), rgba(72, 86, 232, 0.7));
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
}
.dino-growth-pause-inline:hover {
    filter: brightness(1.08);
}
.dino-growth-pause-inline.is-paused {
    border-color: rgba(251, 113, 133, 0.5);
    background: linear-gradient(115deg, rgba(251, 113, 133, 0.8), rgba(244, 63, 94, 0.75));
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}
.dino-growth-pause-inline.hidden {
    display: none !important;
}
.dino-growth-paused-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: rgba(244, 63, 94, 0.85);
    vertical-align: middle;
}
#dinos .dinos-active-fixed #activeDinoActions button.skin {
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    border-color: rgba(165, 180, 252, 0.4);
    color: #fff;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.3);
}
#dinos .dinos-active-fixed #activeDinoActions button.save-slot {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}
#dinos .dinos-active-fixed #activeDinoActions button.kill-fab {
    position: static;
    right: auto;
    top: auto;
    background: linear-gradient(115deg, rgba(248, 113, 113, 0.9), rgba(220, 38, 38, 0.85));
    border-color: rgba(248, 113, 113, 0.45);
    color: #fff;
    z-index: auto;
}
@media (max-width: 900px) {
    #dinos .dinos-active-fixed #activeDinoActions.is-admin,
    #dinos .dinos-active-fixed #activeDinoActions.is-player {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    #dinos .dinos-active-fixed #activeDinoActions.is-admin,
    #dinos .dinos-active-fixed #activeDinoActions.is-player {
        grid-template-columns: 1fr;
    }
}

/* —— Brand restyle: dinos popups (map / grow / mutations / prime / picker) —— */
#viewMapModal.map-modal,
#growModal.grow-modal,
#purchaseModal.purchase-modal,
#primeConditionsModal.prime-conditions-modal {
    background: rgba(8, 10, 18, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#viewMapModal .map-modal-card,
#viewMapModal .map-modal-card--view {
    width: min(860px, 96vw);
    height: auto;
    max-height: min(92vh, 820px);
    border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.97), rgba(8, 10, 18, 0.97)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(72, 86, 232, 0.22);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 14px;
    box-sizing: border-box;
}
#viewMapModal .map-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(72, 86, 232, 0.28);
}
#viewMapModal .map-modal-head h3 {
    margin: 0;
    min-width: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#viewMapModal .map-close-fab {
    position: static;
    top: auto;
    right: auto;
    flex-shrink: 0;
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.7);
    color: #fecaca;
    font-weight: 800;
    padding: 8px 14px;
    z-index: 1;
}
#viewMapModal .map-image-wrap {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 220px;
    max-height: min(62vh, 560px);
    height: min(62vh, 560px);
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: #0a0c14;
}
#viewMapModal .map-stage {
    margin-left: auto;
    margin-right: auto;
    position: relative;
    width: 100%;
    /* Квадратная карта: без in-flow img stage схлопывается в полоску */
    aspect-ratio: 2780 / 2790;
    min-height: 220px;
    height: auto;
    flex: 0 0 auto;
}
#viewMapModal .map-image {
    display: block;
    width: 100%;
    max-height: none;
    object-fit: fill;
    pointer-events: none;
}
/* lowres в потоке → даёт высоту stage; high поверх */
#viewMapModal .map-image--low {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 2780 / 2790;
    object-fit: fill;
}
#viewMapModal .map-image--high {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: fill;
    opacity: 0;
    transition: opacity 280ms ease;
}
#viewMapModal .map-image--high.is-loaded {
    opacity: 1;
}
#viewMapModal .map-modal-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 12px;
}
#viewMapModal .map-teleport-btn,
#viewMapModal .map-zoom-btn {
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    font-weight: 800;
}
#viewMapModal .map-teleport-btn {
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    color: #fff;
    border-color: rgba(165, 180, 252, 0.45);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.3);
    min-width: 120px;
    min-height: 40px;
    padding: 10px 18px;
}
#viewMapModal .map-teleport-bar {
    position: static;
    left: auto;
    bottom: auto;
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
}
#viewMapModal .map-teleport-hint {
    font-size: 13px;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.72);
}
#viewMapModal .map-teleport-path-hint {
    font-size: 12px;
    font-weight: 600;
    color: rgba(186, 198, 220, 0.72);
    white-space: nowrap;
}
#viewMapModal .map-tools,
#viewMapModal .map-modal-card .map-tools {
    position: static;
    right: auto;
    bottom: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.7);
}
#viewMapModal .map-zoom-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    background: rgba(17, 21, 42, 0.9);
    color: #e0f2fe;
    font-size: 16px;
}
#viewMapModal .map-zoom-value {
    min-width: 52px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: #67e8f9;
}

#growModal .grow-card {
    width: min(480px, 94vw);
    border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.97), rgba(8, 10, 18, 0.97)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(72, 86, 232, 0.22);
    padding: 18px;
}
#growModal .grow-card h3 {
    margin: 0 0 14px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 15px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#growModal #growActiveRange {
    width: 100%;
    accent-color: #4856E8;
}
#growModal .purchase-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(72, 86, 232, 0.28);
}
#growModal .purchase-actions button {
    border-radius: 999px;
    min-height: 42px;
    min-width: 130px;
    padding: 10px 18px;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
}
#growModal #growActiveSubmitBtn {
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    color: #fff;
    border-color: rgba(165, 180, 252, 0.45);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.3);
}
#growModal #growActiveCancelBtn {
    background: rgba(17, 21, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}

#purchaseModal .purchase-card {
    width: min(860px, 96vw);
    max-height: 90vh;
    border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.97), rgba(8, 10, 18, 0.97)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(72, 86, 232, 0.22);
    padding: 14px 16px 12px;
}
#purchaseModal .purchase-card > h3 {
    margin: 0 0 10px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#purchaseModal .purchase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    align-items: start;
}
#purchaseModal .purchase-skin-field {
    grid-column: 1 / -1;
    margin-top: 0 !important;
}
#purchaseModal .purchase-skin-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: rgba(8, 10, 18, 0.4);
}
#purchaseModal .purchase-skin-meta {
    flex: 1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
#purchaseModal .purchase-skin-meta span {
    flex: 1 1 auto;
    min-width: 120px;
}
#purchaseModal .purchase-field + .purchase-field[style*="margin-top"],
#purchaseModal .purchase-mutations-field {
    margin-top: 10px !important;
}
#purchaseModal .mutation-box {
    border: 1px solid rgba(129, 140, 248, 0.28);
    border-radius: 14px;
    padding: 8px;
    max-height: min(42vh, 360px);
    background: rgba(8, 10, 18, 0.35);
}
#purchaseModal .mutation-grid {
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
#purchaseModal .mutation-board {
    border: 1px solid rgba(129, 140, 248, 0.28);
    border-radius: 12px;
    background: rgba(17, 21, 42, 0.65);
    overflow: hidden;
}
#purchaseModal .mutation-head {
    background: linear-gradient(115deg, rgba(34, 211, 238, 0.85), rgba(72, 86, 232, 0.9), rgba(139, 92, 246, 0.85));
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 6px 8px;
}
#purchaseModal .mutation-row {
    padding: 6px;
    border-top: 1px solid rgba(129, 140, 248, 0.15);
}
#purchaseModal .mutation-combo-btn {
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.7);
    padding: 5px 26px 5px 8px;
    font-size: 11px;
    line-height: 1.25;
}
#purchaseModal .mutation-desc {
    margin-top: 4px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 10px;
    line-height: 1.3;
    border-color: rgba(129, 140, 248, 0.35);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(72, 86, 232, 0.22), rgba(139, 92, 246, 0.18));
}
#purchaseModal .mutation-info,
#purchaseModal .mutation-help {
    font-size: 10px;
    line-height: 1.3;
    margin-top: 4px;
    opacity: 0.8;
}
#purchaseModal .purchase-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(72, 86, 232, 0.28);
}
#purchaseModal .purchase-actions button {
    border-radius: 999px;
    min-height: 42px;
    padding: 10px 18px;
    font-weight: 800;
    border: 1px solid transparent;
}
#purchaseModal #purchaseSubmitBtn {
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    color: #fff;
    border-color: rgba(165, 180, 252, 0.45);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.3);
}
#purchaseModal #purchaseCancelBtn {
    background: rgba(17, 21, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}
@media (max-width: 900px) {
    #purchaseModal .mutation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#primeConditionsModal.prime-conditions-modal {
    z-index: 12120;
    align-items: flex-start;
    padding: 20px 16px;
    overflow-y: auto;
}
#primeConditionsModal .admin-detail-card,
#primeConditionsModal .prime-conditions-card {
    width: min(820px, 96vw);
    max-width: 820px;
    margin: auto;
    border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.97), rgba(8, 10, 18, 0.97)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(72, 86, 232, 0.22);
    padding: 18px;
}
#primeConditionsModal .prime-conditions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(72, 86, 232, 0.28);
}
#primeConditionsModal .admin-detail-card h3,
#primeConditionsModal .prime-conditions-head h3 {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#primeConditionsModal .prime-conditions-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.7);
    color: #fecaca;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}
#primeConditionsModal .prime-conditions-close:hover { filter: brightness(1.08); }
#primeConditionsModal .prime-conditions-summary {
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 50%),
        linear-gradient(315deg, rgba(139, 92, 246, 0.1), transparent 45%),
        rgba(8, 10, 18, 0.55);
    font-size: 13px;
    line-height: 1.5;
    color: #e2e8f0;
}
#primeConditionsModal .prime-conditions-summary b {
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
    font-weight: 800;
}
#primeConditionsModal .prime-condition-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 88px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(248, 113, 113, 0.32);
    background:
        linear-gradient(160deg, rgba(248, 113, 113, 0.12), transparent 55%),
        rgba(17, 21, 42, 0.85);
    color: #fecaca;
    box-shadow: 0 0 16px rgba(127, 29, 29, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#primeConditionsModal .prime-condition-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.2);
}
#primeConditionsModal .prime-condition-item.done,
#primeConditionsModal .prime-condition-item.is-done {
    border-color: rgba(52, 211, 153, 0.45);
    background:
        linear-gradient(160deg, rgba(52, 211, 153, 0.16), transparent 55%),
        rgba(17, 21, 42, 0.85);
    color: #a7f3d0;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.22);
}
#primeConditionsModal .prime-condition-item.done:hover,
#primeConditionsModal .prime-condition-item.is-done:hover {
    box-shadow: 0 0 22px rgba(52, 211, 153, 0.3);
}
#primeConditionsModal .prime-condition-item.pending {
    border-color: rgba(248, 113, 113, 0.32);
}
#primeConditionsModal .prime-condition-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
#primeConditionsModal .prime-condition-num {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.55);
}
#primeConditionsModal .prime-condition-item.done .prime-condition-num,
#primeConditionsModal .prime-condition-item.is-done .prime-condition-num {
    color: rgba(167, 243, 208, 0.75);
}
#primeConditionsModal .prime-condition-mark {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    flex-shrink: 0;
    background: rgba(127, 29, 29, 0.45);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fecaca;
    line-height: 1;
    text-align: center;
}
#primeConditionsModal .prime-condition-item.done .prime-condition-mark,
#primeConditionsModal .prime-condition-item.is-done .prime-condition-mark {
    background: linear-gradient(135deg, #34d399, #22d3ee);
    border-color: transparent;
    color: #080A12;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.35);
}
#primeConditionsModal .prime-condition-label,
#primeConditionsModal .prime-condition-txt {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: inherit;
}
#primeConditionsModal .prime-conditions-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(72, 86, 232, 0.28);
}
#primeConditionsModal .prime-conditions-close-btn {
    border-radius: 999px;
    border: 1px solid rgba(165, 180, 252, 0.45);
    min-height: 44px;
    min-width: 160px;
    padding: 11px 24px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    color: #fff;
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.35);
}
#primeConditionsModal .prime-conditions-close-btn:hover { filter: brightness(1.06); }

#freeSlotPicker.slot-picker {
    margin-top: 12px;
    max-height: none;
    overflow: visible;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.92), rgba(8, 10, 18, 0.92)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
#freeSlotPicker .slot-picker-title {
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#freeSlotPicker .slot-pill {
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(8, 10, 18, 0.65);
    color: #e0f2fe;
    padding: 6px 12px;
    font-size: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#freeSlotPicker .slot-pill:hover {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 12px rgba(72, 86, 232, 0.3);
}

#dinos .dinos-active-fixed #activeDinoActions button {
    min-height: 38px;
    font-size: 11px;
    padding: 8px 10px;
}

.skin-editor-row select {
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(8, 10, 18, 0.75);
    color: #e2e8f0;
}
.skin-editor-rgb input[type="number"] {
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.75);
    color: #e2e8f0;
}
.skin-editor-presets-row select,
.skin-editor-preset-name {
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.75);
    color: #e2e8f0;
}
.skin-editor-footer-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(72, 86, 232, 0.28);
}
.skin-editor-btn-cancel {
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(17, 21, 42, 0.9);
    color: #cbd5e1;
    font-weight: 800;
    cursor: pointer;
}
.skin-editor-btn-apply {
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid rgba(165, 180, 252, 0.45);
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.3);
}
.skin-editor-save-btn {
    background: linear-gradient(115deg, rgba(139, 92, 246, 0.85), rgba(72, 86, 232, 0.85));
    color: #fff;
}
.skin-editor-share-btn {
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 55%);
    color: #fff;
}

/* Mutations editor — carousel like slots storage */
#purchaseModal.is-mut-carousel .purchase-field > label:first-child { display: none; }
#purchaseModal.is-mut-carousel .mutation-box {
    border: none;
    background: transparent;
    padding: 0;
    max-height: none;
    overflow: visible;
}
.rd-mut-shell { display: flex; flex-direction: column; gap: 10px; }
.rd-mut-slider {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 6px;
    align-items: stretch;
}
.rd-mut-nav {
    align-self: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(17, 21, 42, 0.9);
    color: #e0f2fe;
    font-size: 18px;
    cursor: pointer;
}
.rd-mut-nav:disabled { opacity: 0.35; cursor: default; }
.rd-mut-viewport { overflow: hidden; border-radius: 14px; min-width: 0; width: 100%; }
.rd-mut-track {
    display: flex;
    width: 100%;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.rd-mut-pane {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    max-height: min(48vh, 420px);
    overflow: auto;
    padding: 4px 2px 6px;
    scrollbar-width: thin;
    scrollbar-color: #4856E8 rgba(8, 10, 18, 0.45);
}
.rd-mut-pane-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.rd-mut-slots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.rd-mut-pane .mutation-row,
.rd-mut-slot {
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: rgba(8, 10, 18, 0.5);
    padding: 8px;
}
.rd-mut-slot-lab {
    display: block;
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a5b4fc;
}
.rd-mut-pane .mutation-head { display: none; }
.rd-mut-pane .mutation-desc {
    margin-top: 6px;
    padding: 6px 8px;
    font-size: 10px;
    border-radius: 8px;
    border-color: rgba(34, 211, 238, 0.25);
    background: rgba(34, 211, 238, 0.12);
}
.rd-mut-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(72, 86, 232, 0.28);
}
.rd-mut-thumb {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: rgba(8, 10, 18, 0.55);
    color: rgba(226, 232, 240, 0.72);
    cursor: pointer;
}
.rd-mut-thumb:hover { border-color: rgba(34, 211, 238, 0.45); }
.rd-mut-thumb.is-active {
    border-color: transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.95), rgba(8, 10, 18, 0.95)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
    color: #e0f2fe;
}
.rd-mut-thumb-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    color: #67e8f9;
    border: 1px solid rgba(72, 86, 232, 0.35);
    background: rgba(17, 21, 42, 0.9);
}
.rd-mut-thumb-lab {
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
}
.rd-mut-thumb-price {
    font-size: 9px;
    font-weight: 700;
    color: #67e8f9;
}
@media (max-width: 640px) {
    .rd-mut-slots { grid-template-columns: 1fr; }
    .rd-mut-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#skinEditorModal .skin-editor-card {
    /* already branded above */
}

.dinos-buy {
    width: 100%;
}

#slotCards .active-slot {
    border: 1px solid rgba(129, 140, 248, 0.25);
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.75), rgba(8, 10, 18, 0.7));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.buy-slot {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    min-height: 170px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price-pill {
    display: inline-block;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    margin: 0 auto 14px;
    font-size: 14px;
}

.buy-slot .plus {
    font-size: 64px;
    line-height: 1;
    color: rgba(246, 246, 246, 0.9);
}

.active-slot {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 18px;
    margin-top: 12px;
    position: relative;
}

.kill-fab {
    position: absolute;
    right: 12px;
    top: 12px;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(180deg, #fb7185, #dc2626);
    color: #2a080e;
    font-weight: 800;
    cursor: pointer;
    z-index: 20;
}

.active-slot h4 {
    margin: 0 0 10px;
    font-size: 24px;
}

#slotCards .active-slot h4 {
    margin: 0 0 6px;
    line-height: 1.16;
}

#slotCards .active-slot p {
    margin: 2px 0;
    line-height: 1.2;
}

.actions button {
    margin: 5px;
    padding: 10px 14px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 700;
}

.slot-picker {
    margin-top: 10px;
    max-height: 140px;
    overflow-y: auto;
    padding-right: 4px;
}

.slot-picker.hidden {
    display: none;
}

.slot-picker-title {
    color: rgba(246, 246, 246, 0.85);
    font-size: 13px;
    margin-bottom: 8px;
}

.slot-picker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.slot-pill {
    border: none;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #f6f6f6;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

#activeDinoActions .save-slot {
    background: #3f4b62;
    color: #f6f6f6;
    font-weight: 800;
}

.admin-server-online-wrap {
    margin-top: 8px;
}
.admin-server-online-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}
.admin-server-online-count {
    color: rgba(232, 240, 248, 0.75);
    font-size: 13px;
}
.admin-server-online-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.admin-server-online-card {
    background: rgba(18, 28, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
}
.admin-server-online-head {
    display: grid;
    grid-template-columns: minmax(140px, 1.4fr) minmax(120px, 1fr) minmax(90px, 0.7fr) auto;
    gap: 10px;
    align-items: center;
}
@media (max-width: 900px) {
    .admin-server-online-head {
        grid-template-columns: 1fr;
    }
}
.admin-server-online-name {
    font-weight: 700;
    color: #e8f0f8;
}
.admin-server-online-meta {
    font-size: 12px;
    color: rgba(232, 240, 248, 0.65);
    margin-top: 2px;
}
.admin-server-online-dino {
    color: #b8e6ff;
    font-weight: 600;
}
.admin-server-online-duration {
    color: #86efac;
    font-weight: 700;
    font-size: 14px;
}
.admin-server-online-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.admin-server-online-actions .aso-btn {
    margin: 0;
    padding: 8px 12px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
}
.admin-server-online-actions .aso-heal,
.admin-server-online-actions .aso-refill {
    background: linear-gradient(180deg, #86efac, #22c55e);
}
.admin-server-online-actions .aso-tp,
.admin-server-online-actions .aso-map {
    background: linear-gradient(180deg, #7dd3fc, #0ea5e9);
}
.admin-server-online-actions .aso-grow {
    background: linear-gradient(180deg, #fde047, #eab308);
}
.admin-server-online-actions .aso-growth-pause {
    background: linear-gradient(180deg, #67e8f9, #0891b2);
    color: #042f2e;
}
.admin-server-online-actions .aso-growth-pause.is-paused {
    background: linear-gradient(180deg, #fda4af, #e11d48);
    color: #fff;
}
.admin-server-online-actions .aso-prime {
    background: linear-gradient(180deg, #fdba74, #f97316);
}
.admin-server-online-actions .aso-mut {
    background: linear-gradient(180deg, #c4b5fd, #8b5cf6);
}
.admin-server-online-actions .aso-skin {
    background: linear-gradient(180deg, #ddd6fe, #a78bfa);
    color: #1e1535;
}
.admin-server-online-actions .aso-save {
    background: #3f4b62;
    color: #f6f6f6;
}
.admin-server-online-actions .aso-kick-player {
    background: linear-gradient(180deg, #fcd34d, #d97706);
    color: #1a1200;
}
.admin-server-online-actions .aso-ban-player {
    background: linear-gradient(180deg, #fca5a5, #b91c1c);
    color: #fff;
}
.admin-server-online-actions .aso-unban-player {
    background: linear-gradient(180deg, #bbf7d0, #16a34a);
    color: #052e16;
}
.admin-server-online-actions .aso-kill {
    background: linear-gradient(180deg, #fb7185, #dc2626);
    color: #2a080e;
}
.admin-server-online-actions .aso-btn.aso-announce {
    background: linear-gradient(180deg, #fecaca, #ef4444);
    color: #1a0508;
    border: 1px solid rgba(239, 68, 68, 0.55);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}
.admin-server-online-actions .aso-btn.aso-announce:hover {
    filter: brightness(1.06);
}
.admin-server-online-teleport-box {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}
.admin-server-online-teleport-box select,
.admin-server-online-teleport-box input {
    width: 100%;
    max-width: 520px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 12, 18, 0.85);
    color: #e8f0f8;
}
.admin-server-online-slot-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.admin-server-announce-box {
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(18, 28, 42, 0.92);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-server-announce-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #e8f0f8;
}
.admin-server-announce-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}
.admin-server-announce-row textarea {
    flex: 1 1 280px;
    min-height: 72px;
    resize: vertical;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 12, 18, 0.85);
    color: #e8f0f8;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
}
.admin-server-announce-row textarea::placeholder {
    color: rgba(232, 240, 248, 0.45);
}
.admin-server-announce-row select {
    min-width: 88px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 12, 18, 0.85);
    color: #e8f0f8;
    font-family: inherit;
    font-size: 14px;
}
.site-prompt-input {
    width: 100%;
    min-height: 88px;
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 12, 18, 0.9);
    color: #f0f6fc;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    resize: vertical;
}
.site-prompt-input::placeholder {
    color: rgba(232, 240, 248, 0.42);
}
.site-prompt-label {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #f0f6fc;
}
.admin-server-online-guest-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fde68a;
    background: rgba(234, 179, 8, 0.18);
    border: 1px solid rgba(234, 179, 8, 0.35);
    vertical-align: middle;
}
.admin-server-online-empty {
    padding: 18px;
    text-align: center;
    color: rgba(232, 240, 248, 0.65);
}


.map-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 12, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 18px;
}

.map-modal.hidden {
    display: none;
}

.map-modal-card {
    width: min(1180px, 96vw);
    height: min(760px, 92vh);
    background: #0f141c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.map-modal-frame {
    width: 100%;
    height: 100%;
    border: 0;
}

.map-close-fab {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(240, 84, 84, 0.92);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    z-index: 2;
}

.map-image-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: #0b1118;
    display: block;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.map-image-wrap.dragging {
    cursor: grabbing;
}

.map-stage {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    aspect-ratio: 2780 / 2790;
    min-height: 220px;
}

.map-image {
    display: block;
    width: 100%;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    object-fit: fill;
}

/* lowres держит высоту; high — оверлей (оба absolute = полоска) */
.map-image--low {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 2780 / 2790;
    object-fit: fill;
}

.map-image--high {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: fill;
    opacity: 0;
    transition: opacity 280ms ease;
}

.map-image--high.is-loaded {
    opacity: 1;
}

.map-zones-svg {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.map-zone {
    fill: rgba(16, 185, 129, 0.12);
    stroke: rgba(16, 185, 129, 1);
    stroke-width: 2;
}

.map-zone-mmz {
    fill: rgba(56, 206, 51, 0.22);
    stroke: rgba(56, 206, 51, 1);
    stroke-width: 4;
}

.map-zone-pz {
    fill: rgba(205, 91, 91, 0.22);
    stroke: rgba(205, 91, 91, 1);
    stroke-width: 4;
}

.map-zone-sanc {
    fill: rgba(184, 91, 205, 0.45);
    stroke: rgb(184, 91, 205);
    stroke-width: 4;
}

.map-layer-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
    flex-shrink: 0;
}

.map-layer-btn {
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(15, 18, 32, 0.85);
    color: #c7d2fe;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    opacity: 0.55;
}

.map-layer-btn.is-on {
    opacity: 1;
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
}

/* Водяной знак — базовые стили в map/css/view-map.css */

.map-marker {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 0;
    z-index: 5;
    background: transparent center / contain no-repeat url("/assets/custom/free-icon-dinosaur-2667133.png");
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: left 0.35s linear, top 0.35s linear;
    animation: markerBlink 0.85s steps(2, end) infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 16px rgba(85, 255, 248, 0.75));
}

.map-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 170px;
    height: 170px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 18px rgba(91, 255, 246, 0.65);
    animation: markerRingPulse 1.1s ease-in-out infinite;
    pointer-events: none;
}

/* Маркер игрока — базовые стили в map/css/view-map.css; здесь усиливаем специфичность */
#viewMapModal .map-player-pin {
    z-index: 9;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%) rotate(var(--map-player-yaw, 90deg));
    transform-origin: 50% 50%;
}
#viewMapModal .map-player-pin-svg {
    width: 34px;
    height: 34px;
}

#viewMapModal .map-trail-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
    overflow: visible;
}
#viewMapModal .map-trail-path {
    fill: none;
    stroke: url(#mapTrailGrad);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.88;
    filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.55));
}
#viewMapModal .map-trail-path-fade {
    fill: none;
    stroke: rgba(72, 86, 232, 0.35);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#viewMapModal .map-trail-dot-start,
#viewMapModal .map-trail-dot-end {
    stroke: #ffffff;
    stroke-width: 2;
}
#viewMapModal .map-trail-dot-start {
    fill: rgba(139, 92, 246, 0.95);
}
#viewMapModal .map-trail-dot-end {
    fill: rgba(34, 211, 238, 0.95);
}

.map-tools {
    position: fixed;
    right: 24px;
    bottom: 20px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(11, 17, 24, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px;
}

.map-modal-card .map-tools {
    position: absolute;
    right: 12px;
    bottom: 12px;
}

.map-teleport-pins-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 8;
}

.map-teleport-pin {
    position: absolute;
    width: 44px;
    height: 52px;
    margin: 0;
    /* Tip в точке (left/top): сдвигаем бокс вверх — hitbox = вся картинка, не только низ */
    margin-left: -22px;
    margin-top: -52px;
    border: none;
    outline: none !important;
    box-shadow: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    background: transparent center / contain no-repeat url("map/img/teleport-pin.png");
    --mtp-pin-shade: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
    --mtp-marker-hue: hue-rotate(0deg);
    filter: var(--mtp-marker-hue) var(--mtp-pin-shade);
    opacity: 0.92;
    transform: scale(var(--mtp-pin-scale, 1));
    transform-origin: 50% 100%;
    box-sizing: border-box;
}
.map-teleport-pin:focus,
.map-teleport-pin:focus-visible,
.map-teleport-pin:active {
    outline: none !important;
    box-shadow: none;
}
.map-teleport-pin::before {
    content: none;
}

.map-teleport-pin.selected {
    opacity: 1;
    filter: var(--mtp-marker-hue) drop-shadow(0 0 8px rgba(120, 220, 255, 0.95)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
    transform: scale(var(--mtp-pin-scale, 1));
}
.map-teleport-pin[data-marker="cyan"] {
    --mtp-marker-hue: hue-rotate(150deg) saturate(1.2);
}
.map-teleport-pin[data-marker="green"] {
    --mtp-marker-hue: hue-rotate(75deg) saturate(1.15);
}
.map-teleport-pin[data-marker="gold"] {
    --mtp-marker-hue: hue-rotate(-12deg) saturate(1.35) brightness(1.08);
}
.map-teleport-pin[data-marker="violet"] {
    --mtp-marker-hue: hue-rotate(255deg) saturate(1.25);
}
.map-teleport-pin[data-marker="red"] {
    --mtp-marker-hue: hue-rotate(-38deg) saturate(1.35);
}

.map-population-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 4;
}

.map-population-zone {
    position: absolute;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.map-population-fog {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.map-population-fog--predator {
    border: 2px solid rgba(255, 90, 90, 0.95);
    box-shadow:
        0 0 0 2px rgba(120, 10, 10, 0.65),
        0 0 18px rgba(255, 40, 40, 0.75),
        inset 0 0 20px rgba(255, 50, 50, 0.35);
}

.map-population-fog--herbivore {
    border: 2px solid rgba(120, 255, 160, 0.9);
    box-shadow: 0 0 0 2px rgba(20, 130, 50, 0.45), inset 0 0 16px rgba(70, 255, 120, 0.2);
}

.map-population-fog--mixed {
    border: 2px solid rgba(255, 90, 90, 0.95);
    box-shadow:
        0 0 0 2px rgba(120, 10, 10, 0.65),
        0 0 18px rgba(255, 40, 40, 0.75),
        inset 0 0 18px rgba(255, 50, 50, 0.22);
    animation: mapPopulationMixedBorder 2.2s steps(1, end) infinite;
}

@keyframes mapPopulationMixedBorder {
    0%, 49.99% {
        border-color: rgba(255, 90, 90, 0.98);
        box-shadow:
            0 0 0 2px rgba(120, 10, 10, 0.72),
            0 0 22px rgba(255, 40, 40, 0.88),
            inset 0 0 18px rgba(255, 50, 50, 0.28);
    }
    50%, 100% {
        border-color: rgba(120, 255, 160, 0.98);
        box-shadow:
            0 0 0 2px rgba(20, 130, 50, 0.72),
            0 0 22px rgba(50, 255, 100, 0.85),
            inset 0 0 18px rgba(70, 255, 120, 0.28);
    }
}

.map-population-icons--dual {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1;
}

.map-population-icons--dual .map-population-icon {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
}

.map-population-icons--dual .map-population-icon--predator {
    animation: mapPopulationMixedIconPredator 2.2s steps(1, end) infinite;
}

.map-population-icons--dual .map-population-icon--herbivore {
    border: 2px solid rgba(120, 255, 160, 0.35);
    border-radius: 50%;
    animation: mapPopulationMixedIconHerbivore 2.2s steps(1, end) infinite;
}

@keyframes mapPopulationMixedIconPredator {
    0%, 49.99% {
        border-color: rgba(255, 120, 120, 0.98);
        filter: drop-shadow(0 0 12px rgba(255, 50, 50, 0.95)) drop-shadow(0 0 22px rgba(255, 0, 0, 0.65));
    }
    50%, 100% {
        border-color: rgba(255, 120, 120, 0.35);
        filter: drop-shadow(0 0 4px rgba(255, 50, 50, 0.25));
    }
}

@keyframes mapPopulationMixedIconHerbivore {
    0%, 49.99% {
        border-color: rgba(120, 255, 160, 0.35);
        filter: drop-shadow(0 0 4px rgba(70, 255, 120, 0.25));
    }
    50%, 100% {
        border-color: rgba(120, 255, 160, 0.98);
        filter: drop-shadow(0 0 10px rgba(70, 255, 120, 0.85));
    }
}

.map-population-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%);
    background: transparent center / contain no-repeat;
    pointer-events: none;
    z-index: 1;
}

.map-population-icon--predator {
    background-image: url("map/img/zone-predator.png");
    background-color: rgba(150, 15, 15, 0.55);
    border-radius: 50%;
    border: 2px solid rgba(255, 120, 120, 0.95);
    filter: drop-shadow(0 0 12px rgba(255, 50, 50, 0.95)) drop-shadow(0 0 22px rgba(255, 0, 0, 0.65));
}

.map-population-icon--herbivore {
    background-image: url("map/img/zone-herbivore.png");
    filter: drop-shadow(0 0 10px rgba(70, 255, 120, 0.85));
}

.map-teleport-bar {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: min(420px, 88vw);
    padding: 10px 12px;
    background: rgba(11, 17, 24, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
}

.map-teleport-hint {
    font-size: 13px;
    color: rgba(230, 240, 255, 0.88);
    flex: 1 1 140px;
    min-width: 0;
}

.map-teleport-path-hint {
    font-size: 12px;
    font-weight: 600;
    color: rgba(186, 198, 220, 0.78);
    white-space: nowrap;
}

.map-teleport-btn {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, #38bdf8, #2563eb);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.45);
}

.map-teleport-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.admin-mtp-editor-card {
    width: min(1180px, 98vw);
    max-height: 96vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 14px 16px;
    box-sizing: border-box;
}
.admin-mtp-editor-title {
    margin: 0 52px 8px 0;
    font-size: 1.15rem;
}
.admin-mtp-editor-hint {
    margin: 0 0 10px;
}
.admin-mtp-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
@media (min-width: 700px) {
    .admin-mtp-meta-grid {
        grid-template-columns: 1fr 1fr;
    }
    .admin-mtp-meta-field--wide {
        grid-column: 1 / -1;
    }
}
.admin-mtp-meta-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.admin-mtp-meta-lbl {
    font-size: 11px;
    opacity: 0.78;
    letter-spacing: 0.03em;
}
.admin-mtp-meta-input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
    color: #eaf2ff;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
    width: 100%;
}
.admin-mtp-meta-input:focus {
    outline: none;
    border-color: rgba(100, 160, 220, 0.45);
}
.admin-mtp-scale-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-mtp-scale-row input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: rgba(120, 180, 240, 0.95);
}
.admin-mtp-scale-val {
    flex: 0 0 44px;
    text-align: right;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    opacity: 0.9;
}
.admin-mtp-new-block {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-mtp-new-block h4 {
    margin: 0 0 6px;
    font-size: 1rem;
}
.admin-mtp-new-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-top: 8px;
}
.admin-mtp-new-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    opacity: 0.82;
}
.admin-mtp-new-grid input {
    min-width: 160px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.22);
    color: inherit;
    font: inherit;
}
.admin-mtp-region-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}
.admin-mtp-editor-mapwrap {
    position: relative;
    width: 100%;
    height: min(72vh, 860px);
    min-height: 400px;
    max-height: min(78vh, 920px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
@media (max-height: 700px) {
    .admin-mtp-editor-mapwrap {
        height: min(58vh, 560px);
        min-height: 260px;
    }
}
.admin-mtp-editor-pin {
    pointer-events: none;
    z-index: 3;
}
.admin-mtp-zoom-tools {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 5;
}
.admin-mtp-spots-section {
    margin-top: 14px;
}
.admin-mtp-spots-heading {
    margin: 0 0 8px;
    font-size: 1rem;
}
.admin-mtp-spots-mount {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-mtp-spot-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}
.admin-mtp-deino-cb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.92;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
.admin-mtp-deino-cb input {
    width: auto;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}
.admin-mtp-spot-line-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.admin-mtp-spot-line-hint {
    font-size: 11px;
    opacity: 0.75;
    letter-spacing: 0.02em;
}
.admin-mtp-spot-row input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.admin-mtp-spot-row input.mtp-coord-line-inp {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
    color: #eaf2ff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.admin-mtp-spot-row input.mtp-coord-line-inp::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
.admin-mtp-spot-row input.mtp-coord-line-inp:focus {
    outline: none;
    border-color: rgba(100, 160, 220, 0.45);
    box-shadow: 0 0 0 1px rgba(100, 160, 220, 0.2);
}
.admin-mtp-spot-num {
    font-size: 12px;
    opacity: 0.82;
    font-weight: 600;
}
.admin-mtp-spots-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.admin-mtp-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 720px) {
    .admin-mtp-spot-row {
        grid-template-columns: 1fr;
    }
    .admin-mtp-spot-num {
        padding-bottom: 0;
    }
}

#adminMapTeleportEditModal.map-modal {
    z-index: 10060;
}

.map-zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #1c2634;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.map-zoom-value {
    min-width: 52px;
    text-align: center;
    font-weight: 700;
    color: #d8f2ff;
}

.purchase-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 12, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 18px;
}

.purchase-modal.hidden { display: none; }

/* Inventory info + transfer modals (override generic purchase-modal chrome) */
#invItemInfoModal.inv-rd-modal,
#transferItemModal.inv-rd-modal {
    align-items: flex-start;
    justify-content: center;
    padding: 20px 16px;
    overflow-y: auto;
    background: rgba(8, 10, 18, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#invItemInfoModal .inv-rd-card,
#transferItemModal .inv-rd-card {
    width: min(440px, 96vw);
    margin: auto;
    border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.97), rgba(8, 10, 18, 0.97)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(72, 86, 232, 0.22);
    padding: 18px;
}
#invItemInfoModal .inv-rd-card--info {
    width: min(920px, 96vw);
    max-height: min(90vh, 900px);
    overflow: auto;
    padding: 14px;
}
#transferItemModal .inv-rd-btn-primary,
#invItemInfoModal .inv-rd-btn-primary {
    color: #fff !important;
    background: var(--brand-grad) !important;
    border: 1px solid transparent !important;
    box-shadow: 0 0 20px rgba(72, 86, 232, 0.4);
}
#transferItemModal .inv-rd-btn-ghost,
#invItemInfoModal .inv-rd-btn-ghost {
    color: #cbd5e1 !important;
    background: rgba(17, 21, 42, 0.9) !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    box-shadow: none;
}
#transferItemModal .inv-rd-field select,
#transferItemModal .inv-rd-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.75);
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
#transferItemModal .inv-rd-field select {
    background-image:
        linear-gradient(45deg, transparent 50%, #67e8f9 50%),
        linear-gradient(135deg, #67e8f9 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

/* Поверх редактора скина (он выше обычных purchase-modal). */
#skinShareModal {
    z-index: 10020;
}

/* ===== Skin editor (brand redesign) ===== */
.skin-editor-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 18, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 10002;
    padding: 20px 16px;
    overflow-y: auto;
}
.skin-editor-modal.hidden { display: none; }
.skin-editor-card {
    width: min(980px, 96vw);
    margin: auto;
    max-height: none;
    overflow: visible;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.97), rgba(8, 10, 18, 0.97)) padding-box,
        linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%) border-box;
    border: 1px solid transparent;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(72, 86, 232, 0.22);
}
.skin-editor-lead {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.72);
}
.skin-editor-section {
    margin-bottom: 16px;
}
.skin-editor-section--presets {
    padding-top: 14px;
    border-top: 1px solid rgba(72, 86, 232, 0.28);
    margin-bottom: 8px;
}
.skin-editor-section-title {
    display: block;
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.skin-editor-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.skin-editor-back {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.38);
    background: rgba(17, 21, 42, 0.9);
    color: #e0f2fe;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.skin-editor-title-block { flex: 1; min-width: 0; }
.skin-editor-title-block h3 {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.skin-editor-online {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(52, 211, 153, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.4);
}
.skin-editor-preview-wrap {
    position: relative;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: visible;
    border: none;
    z-index: 5;
}
.skin-editor-main {
    display: grid;
    grid-template-columns: minmax(220px, 42%) 1fr;
    gap: 14px;
    align-items: stretch;
}
.skin-editor-3d-col {
    min-width: 0;
}
.skin-editor-controls-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.skin-editor-3d {
    position: relative;
    height: min(58vh, 440px);
    min-height: 260px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: #8fa8b8 url("/assets/skinViewer/env/paddock.jpg") center / cover no-repeat;
    box-shadow: 0 0 20px rgba(72, 86, 232, 0.15);
    overflow: hidden;
    touch-action: none;
}
.skin-editor-3d canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.skin-viewer-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    color: #f8fafc;
    font-size: 0.92em;
    pointer-events: none;
    background: rgba(6, 8, 16, 0.28);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    z-index: 2;
}
.skin-viewer-status.is-error {
    color: #fda4af;
}
@media (max-width: 820px) {
    .skin-editor-main {
        grid-template-columns: 1fr;
    }
    .skin-editor-3d {
        height: min(40vh, 280px);
        min-height: 200px;
    }
}
.skin-editor-preview-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}
.skin-editor-preview {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    margin-bottom: 0;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(72, 86, 232, 0.15);
}
.skin-editor-preview:hover {
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.28);
}
.skin-editor-palette-btn {
    flex: 0 0 auto;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.45);
    background: rgba(72, 86, 232, 0.22);
    color: #e8ecff;
    font-size: 0.9em;
    cursor: pointer;
}
.skin-editor-palette-btn:hover {
    background: rgba(72, 86, 232, 0.38);
}
.skin-editor-color-overlay {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    left: -9999px !important;
    clip: rect(0, 0, 0, 0);
}
.skin-editor-palette {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(129, 140, 248, 0.45);
    background: linear-gradient(165deg, rgba(17, 21, 42, 0.98), rgba(8, 10, 18, 0.98));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 28px rgba(72, 86, 232, 0.3);
}
.skin-editor-palette.open { display: block; }
.skin-editor-sv {
    position: relative;
    height: 140px;
    border-radius: 12px;
    cursor: crosshair;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background:
        linear-gradient(to top, #000, transparent),
        linear-gradient(to right, #fff, hsl(0, 100%, 50%));
}
.skin-editor-sv-knob {
    position: absolute;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.45), 0 0 10px rgba(34, 211, 238, 0.5);
    pointer-events: none;
    left: 100%;
    top: 0;
}
.skin-editor-hue {
    width: 100%;
    margin: 12px 0 10px;
    height: 14px;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
    outline: none;
}
.skin-editor-hue::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #4856E8;
    box-shadow: 0 0 10px rgba(72, 86, 232, 0.5);
    cursor: pointer;
}
.skin-editor-swatches {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}
.skin-editor-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0;
}
.skin-editor-swatch:hover {
    transform: scale(1.06);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}
.skin-editor-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip: rect(0, 0, 0, 0);
}
.skin-editor-dd {
    position: relative;
    width: 100%;
    z-index: 1;
}
.skin-editor-dd.open { z-index: 30; }
.skin-editor-dd-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.65);
    color: #f1f5f9;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.skin-editor-dd.open .skin-editor-dd-btn,
.skin-editor-dd-btn:hover {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 3px rgba(72, 86, 232, 0.18);
}
.skin-editor-dd-btn .txt { flex: 1; min-width: 0; }
.skin-editor-dd-btn .caret {
    color: #67e8f9;
    font-size: 12px;
    transition: transform 0.15s ease;
}
.skin-editor-dd.open .skin-editor-dd-btn .caret { transform: rotate(180deg); }
.skin-editor-dd-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: linear-gradient(165deg, rgba(17, 21, 42, 0.98), rgba(8, 10, 18, 0.98));
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 22px rgba(72, 86, 232, 0.28);
    max-height: 220px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #4856E8 rgba(8, 10, 18, 0.45);
    z-index: 40;
}
.skin-editor-dd.open .skin-editor-dd-list { display: block; }
.skin-editor-dd-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
}
.skin-editor-dd-list li:hover { background: rgba(72, 86, 232, 0.28); }
.skin-editor-dd-list li.is-active {
    background: linear-gradient(120deg, #22D3EE, #4856E8 48%, #8B5CF6);
    color: #fff;
}
.skin-editor-rgb-tool-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    justify-content: space-between;
}
.skin-editor-rgb {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 220px;
    margin-bottom: 0;
}
.skin-editor-inline-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-bottom: 2px;
}
.skin-editor-tool-icon {
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.skin-editor-tool-icon:hover {
    filter: brightness(1.06);
}
.skin-editor-tool-icon:active {
    transform: scale(0.96);
}
.skin-editor-tool-icon img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}
.skin-editor-tool-icon:focus-visible {
    outline: 2px solid #f69d1b;
    outline-offset: 3px;
}
.skin-editor-rgb label {
    flex: 1;
    min-width: 72px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: none;
    letter-spacing: 0.02em;
}
.skin-editor-rgb input[type="number"] {
    width: 100%;
    margin-top: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #343b4c;
    color: #fff;
    padding: 10px 10px;
    box-sizing: border-box;
}
.skin-editor-row {
    display: grid;
    grid-template-columns: 108px 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.skin-editor-row--twocol {
    grid-template-columns: 108px 1fr;
}
.skin-editor-row label {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-transform: none;
    letter-spacing: 0.02em;
}
.skin-editor-row select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #343b4c;
    color: #fff;
    padding: 11px 12px;
    font-size: 14px;
}
.skin-region-dd {
    position: relative;
    width: 100%;
    min-width: 0;
}
.skin-region-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #343b4c;
    color: #f4f7fb;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
}
.skin-region-trigger-swatch {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.skin-region-trigger-text {
    flex: 1;
    min-width: 0;
    text-shadow: none;
}
.skin-region-trigger-caret {
    opacity: 0.85;
    font-size: 12px;
}
.skin-region-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 5px);
    z-index: 30;
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #151922;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
    max-height: min(280px, 52vh);
    overflow-y: auto;
}
.skin-region-list.hidden {
    display: none;
}
.skin-region-option {
    padding: 9px 10px;
    border-radius: 8px;
    margin-bottom: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: filter 0.12s ease;
    text-shadow: none;
}
.skin-region-option:last-child {
    margin-bottom: 0;
}
.skin-region-option:hover {
    filter: brightness(1.08);
}
.skin-region-option.active {
    font-weight: 700;
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: -1px;
}
.skin-editor-actions-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.skin-editor-actions-inline button {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.skin-editor-actions-inline .skin-editor-reset {
    background: rgba(220, 120, 40, 0.35);
    border-color: rgba(255, 160, 80, 0.45);
}
.skin-editor-variation-row {
    display: grid;
    grid-template-columns: 108px 1fr 52px;
    gap: 10px;
    align-items: center;
    margin: 12px 0 14px;
}
.skin-editor-variation-row label {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.skin-editor-variation-row input[type="range"] {
    width: 100%;
    accent-color: #f69d1b;
}
.skin-editor-variation-row span {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}
.skin-editor-presets-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.skin-editor-presets-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.skin-editor-presets-row .skin-editor-dd {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    z-index: 5;
}
.skin-editor-presets-row .skin-editor-dd.open {
    z-index: 40;
}
.skin-editor-presets-row .skin-editor-dd-btn {
    width: 100%;
    height: auto;
    min-height: 42px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}
.skin-editor-presets-row select {
    flex: 1;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #343b4c;
    color: #fff;
    padding: 10px 11px;
}
/* Только ✓ / ✕ — не трогать кнопку выпадающего списка пресетов */
.skin-editor-presets-row > .skin-editor-preset-apply,
.skin-editor-presets-row > .skin-editor-preset-del {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 800;
}
.skin-editor-preset-apply { background: linear-gradient(180deg, #34d399, #16a34a); color: #05180d; }
.skin-editor-preset-del { background: linear-gradient(180deg, #fb7185, #dc2626); color: #2a080c; }
.skin-editor-section--presets {
    position: relative;
    z-index: 4;
    overflow: visible;
}
.skin-editor-controls-col {
    overflow: visible;
}
.skin-editor-preset-name {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #343b4c;
    color: #fff;
    padding: 11px 12px;
    margin-bottom: 10px;
    box-sizing: border-box;
}
.skin-editor-save-row {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}
.skin-editor-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    border: none;
    background: #b4a7d6;
    color: #1e2128;
    font-weight: 700;
    cursor: pointer;
}
.skin-editor-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    color: #eff6ff;
    font-weight: 700;
    cursor: pointer;
}
.skin-editor-share-btn:hover {
    filter: brightness(1.06);
}
.skin-editor-save-btn:hover {
    filter: brightness(1.05);
}
.skin-editor-footer-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(72, 86, 232, 0.28);
}
.skin-editor-btn-cancel {
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(17, 21, 42, 0.9);
    color: #cbd5e1;
    font-weight: 800;
    cursor: pointer;
}
.skin-editor-btn-cancel:hover {
    filter: brightness(1.08);
}
.skin-editor-btn-apply {
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid rgba(165, 180, 252, 0.45);
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.3);
}
.skin-editor-btn-apply:hover {
    filter: brightness(1.06);
}
.skin-editor-btn-apply:disabled,
.skin-editor-btn-cancel:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.active-dino-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    width: 92px;
    height: 92px;
}
.active-dino-thumb-wrap > img:first-child {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: block;
}
.skin-editor-launch {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    background: transparent;
    z-index: 2;
}
.skin-editor-launch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.grow-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(8, 10, 16, 0.78);
    z-index: 75;
}

.grow-modal.hidden { display: none; }

.grow-card {
    width: min(760px, 92vw);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0f141c;
    padding: 16px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}

.purchase-card {
    width: min(980px, 98vw);
    max-height: 92vh;
    overflow: auto;
    overflow-x: hidden;
    background: #101723;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 16px;
}

.purchase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.purchase-field {
    min-width: 0;
}

.purchase-gender {
    display: flex;
    gap: 10px;
}

.gender-option {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: #0d141f;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.gender-option img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.gender-option input { display: none; }
.gender-option.active {
    border-color: rgba(88, 198, 255, 0.85);
    background: rgba(88, 198, 255, 0.12);
    box-shadow: 0 0 0 1px rgba(88, 198, 255, 0.45) inset;
}

.purchase-field label {
    display: block;
    margin-bottom: 6px;
    color: #d7e4f4;
    font-weight: 700;
}

.purchase-field input:not([type="checkbox"]):not([type="radio"]),
.purchase-field select {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #0d141f;
    color: #fff;
    padding: 8px 10px;
    box-sizing: border-box;
}

#purchaseGrowth {
    display: block;
    margin: 2px 0 8px;
    padding: 0;
}

.purchase-field input[type="checkbox"],
.purchase-field input[type="radio"] {
    width: auto;
    padding: 0;
}

.mutation-box {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 8px;
    max-height: 440px;
    overflow: auto;
}

.mutation-box label { display: block; margin-bottom: 6px; font-weight: 500; }

.mutation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 12px;
}

.mutation-board {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    overflow: visible;
}

.mutation-head {
    background: #f2be00;
    color: #101010;
    font-weight: 800;
    padding: 6px 8px;
}

.mutation-row {
    padding: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mutation-row select.mutation-combo-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.mutation-combo {
    position: relative;
    width: 100%;
}

.mutation-combo-btn {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #0d141f;
    color: #fff;
    padding: 6px 28px 6px 8px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    line-height: 1.3;
    position: relative;
}

.mutation-combo-btn::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(255, 255, 255, 0.75);
    transform: translateY(-40%);
}

.mutation-combo.is-open .mutation-combo-btn {
    border-color: rgba(56, 189, 248, 0.55);
}

.mutation-combo-drop {
    display: none;
    position: fixed;
    z-index: 13050;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.4);
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.98), rgba(8, 10, 18, 0.98));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(72, 86, 232, 0.25);
    overflow: hidden;
}

.mutation-combo-q {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: #0b121b;
    color: #e8f6ff;
    padding: 8px 10px;
    font: inherit;
    outline: none;
}

.mutation-combo-q::placeholder {
    color: rgba(200, 220, 240, 0.55);
}

.mutation-combo-opts {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow: auto;
}

.mutation-combo-opts li {
    margin: 0;
    padding: 0;
}

.mutation-combo-opts button {
    width: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    padding: 8px 10px;
    font: inherit;
    cursor: pointer;
    line-height: 1.3;
}

.mutation-combo-opts button:hover,
.mutation-combo-opts button.is-active {
    background: #1d6fd8;
}

.mutation-combo-opts .mutation-combo-empty {
    padding: 10px;
    color: rgba(200, 220, 240, 0.65);
    font-size: 12px;
}

.mutation-desc {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: linear-gradient(135deg, rgba(14, 116, 180, 0.55) 0%, rgba(14, 165, 233, 0.38) 45%, rgba(56, 189, 248, 0.28) 100%);
    color: #e8f6ff;
    font-size: 12px;
    line-height: 1.35;
    text-shadow: 0 1px 1px rgba(0, 20, 40, 0.45);
}

.purchase-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.purchase-actions button {
    min-width: 170px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 800;
    cursor: pointer;
}

#purchaseSubmitBtn {
    background: linear-gradient(180deg, #f0bf6b, #c7944d);
    color: #1f1f1f;
}

#purchaseCancelBtn {
    background: #3b4658;
    color: #f1f1f1;
}

.topup-card {
    width: min(520px, 96vw);
}

#topUpModal .purchase-card.topup-card {
    width: min(520px, 96vw);
    max-height: 90vh;
    border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.97), rgba(8, 10, 18, 0.97)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(72, 86, 232, 0.22);
    padding: 18px;
}
#topUpModal .purchase-card > h3 {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(72, 86, 232, 0.28);
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#topUpModal .purchase-field label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
#topUpModal .purchase-field input:not([type="checkbox"]):not([type="radio"]),
#topUpModal .purchase-field select {
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.75);
    color: #f1f5f9;
    font-weight: 600;
}
#topUpModal .topup-provider-btn {
    border: 1px solid rgba(129, 140, 248, 0.35);
    border-radius: 12px;
    background: rgba(8, 10, 18, 0.75);
    color: #eaf4ff;
}
#topUpModal .topup-provider-btn:hover {
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.1);
}
#topUpModal .topup-provider-btn.active {
    border-color: transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.95), rgba(8, 10, 18, 0.95)) padding-box,
        var(--brand-grad) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.28);
}
#topUpModal .purchase-actions {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(72, 86, 232, 0.28);
    justify-content: flex-end;
}
#topUpModal .purchase-actions button {
    min-width: 120px;
    min-height: 42px;
    flex: 0 1 auto;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 999px;
    border: 1px solid transparent;
}
#topUpModal #topUpSubmitBtn {
    background: var(--brand-grad);
    color: #fff;
    border-color: rgba(165, 180, 252, 0.45);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.3);
}
#topUpModal #topUpCancelBtn,
#topUpModal .purchase-actions button.skin {
    background: rgba(17, 21, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}
#topUpModal .topup-history-link {
    color: #67e8f9;
}

.topup-history-link {
    display: inline-block;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: #8ecbff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.topup-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.topup-provider-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: #0d141f;
    color: #eaf4ff;
    font-weight: 700;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.1s ease;
}

.topup-provider-btn:hover {
    border-color: rgba(168, 123, 255, 0.65);
    background: rgba(168, 123, 255, 0.12);
}

.topup-provider-btn.active {
    border-color: rgba(168, 123, 255, 0.9);
    background: rgba(168, 123, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(168, 123, 255, 0.4) inset;
}

.topup-provider-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#topUpHint {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(234, 244, 255, 0.72);
}

.topup-premium-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(168, 123, 255, 0.08);
    border: 1px solid rgba(168, 123, 255, 0.22);
    font-size: 12px;
    line-height: 1.45;
    color: rgba(234, 244, 255, 0.88);
}

.topup-bonus-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: 12px;
    background: rgba(52, 211, 153, 0.09);
    color: #d1fae5;
    font-size: 13px;
    line-height: 1.45;
}

.topup-bonus-result {
    display: block;
    margin-top: 4px;
    color: #6ee7b7;
    font-weight: 700;
}

.topup-premium-hint.is-empty {
    display: none;
}

.topup-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.06);
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.1s ease;
}

.topup-premium-badge img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.topup-premium-badge.gold {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.55);
}

.topup-premium-badge.diamond {
    color: #22d3ee;
    border-color: rgba(34, 211, 238, 0.55);
}

.topup-premium-badge:hover {
    background: rgba(168, 123, 255, 0.16);
    transform: translateY(-1px);
}

.premium-info-card {
    width: min(480px, 96vw);
}

.premium-info-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.premium-info-head img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.premium-info-benefits {
    margin: 12px 0 0;
    padding-left: 18px;
    color: rgba(234, 244, 255, 0.9);
    font-size: 13px;
    line-height: 1.5;
}

.premium-info-benefits li + li {
    margin-top: 6px;
}

.roulette-prizes-board {
    margin-top: 18px;
}

.roulette-prizes-list {
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow: auto;
}

.roulette-prize-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.roulette-prize-item:hover {
    border-color: rgba(168, 123, 255, 0.45);
    background: rgba(168, 123, 255, 0.08);
}

.roulette-prize-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.roulette-prize-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.roulette-prize-label {
    font-weight: 600;
    color: #eaf4ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roulette-prize-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    text-align: right;
}

.roulette-prize-chance {
    font-size: 13px;
    font-weight: 800;
    color: #7dd3fc;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.roulette-prize-type {
    font-size: 12px;
    font-weight: 600;
    color: rgba(214, 232, 255, 0.9);
    white-space: nowrap;
    line-height: 1.25;
}

@keyframes markerBlink {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    50% { opacity: 0.15; transform: translate(-50%, -50%) scale(0.9); }
}

@keyframes markerRingPulse {
    0%, 100% { opacity: 0.95; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.2; transform: translate(-50%, -50%) scale(1.12); }
}

.heal { background: linear-gradient(180deg, #6ee7a8, #4ade80); color: #062212; }
.tp { background: linear-gradient(180deg, #a5e3ff, #7dd3fc); color: #052532; }
.grow { background: linear-gradient(180deg, #fef08a, #fde047); color: #3a3000; }
.skin { background: linear-gradient(180deg, #ddd6fe, #c4b5fd); color: #1e1535; }
.make-prime { background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #1f1400; }
#activeDinoActions .make-prime.is-prime-locked {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.2);
}
.prime-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prime-conditions-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.14);
    color: #fde68a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
}
.prime-conditions-btn:hover { background: rgba(251, 191, 36, 0.24); }
.prime-conditions-modal .admin-detail-card { max-width: 820px; width: min(820px, 96vw); }
.prime-conditions-summary {
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 50%),
        linear-gradient(315deg, rgba(139, 92, 246, 0.1), transparent 45%),
        rgba(8, 10, 18, 0.55);
    border: 1px solid rgba(129, 140, 248, 0.3);
    font-size: 13px;
    line-height: 1.5;
    color: #e2e8f0;
}
.prime-conditions-summary b {
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
    font-weight: 800;
}
.prime-condition-pachy-warn {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(251, 146, 60, 0.12);
    border: 1px solid rgba(251, 146, 60, 0.35);
    color: #fdba74;
    font-size: 13px;
    line-height: 1.45;
}
.prime-conditions-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: none;
    overflow: visible;
}
@media (max-width: 760px) {
    .prime-conditions-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .prime-conditions-list { grid-template-columns: 1fr; }
}
.prime-condition-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 88px;
    padding: 12px;
    border-radius: 16px;
    background:
        linear-gradient(160deg, rgba(248, 113, 113, 0.12), transparent 55%),
        rgba(17, 21, 42, 0.85);
    border: 1px solid rgba(248, 113, 113, 0.32);
    color: #fecaca;
    box-shadow: 0 0 16px rgba(127, 29, 29, 0.15);
}
.prime-condition-item.done,
.prime-condition-item.is-done {
    border-color: rgba(52, 211, 153, 0.45);
    background:
        linear-gradient(160deg, rgba(52, 211, 153, 0.16), transparent 55%),
        rgba(17, 21, 42, 0.85);
    color: #a7f3d0;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.22);
}
.prime-condition-item.pending {
    border-color: rgba(248, 113, 113, 0.32);
}
.prime-condition-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.prime-condition-num {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.55);
}
.prime-condition-item.done .prime-condition-num,
.prime-condition-item.is-done .prime-condition-num {
    color: rgba(167, 243, 208, 0.75);
}
.prime-condition-mark {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    flex-shrink: 0;
    background: rgba(127, 29, 29, 0.45);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fecaca;
    line-height: 1;
    text-align: center;
}
.prime-condition-item.done .prime-condition-mark,
.prime-condition-item.is-done .prime-condition-mark {
    background: linear-gradient(135deg, #34d399, #22d3ee);
    border-color: transparent;
    color: #080A12;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.35);
}
.prime-condition-label,
.prime-condition-txt {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: inherit;
}
.prime-condition-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.22);
    background: rgba(12, 18, 34, 0.55);
    font-size: 13px;
    color: rgba(226, 232, 240, 0.88);
    line-height: 1.45;
}
.prime-condition-note .prime-note-line + .prime-note-line {
    margin-top: 6px;
}
.prime-condition-note .prime-note-line.muted {
    color: rgba(186, 198, 220, 0.62);
    font-size: 12px;
}
.prime-condition-note b {
    color: rgba(251, 191, 36, 0.95);
    font-weight: 800;
}
.kill { background: linear-gradient(180deg, #fb7185, #dc2626); color: #2a080e; }

/* ===== SECTIONS ===== */
.section { display: none; }
.active { display: block; }

/* ===== VOICE PARTIES (групповые разговоры) ===== */
.content-main-scroll:has(#voiceParties.active) {
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    padding-bottom: 0 !important;
}
.content-main-scroll:has(#voiceParties.active) > .content-top-sticky {
    flex-shrink: 0;
}
.content-main-scroll:has(#voiceParties.active) > #voiceParties {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
}
.content-main-scroll:has(#voiceParties.active) > .site-footer {
    flex-shrink: 0;
    margin-top: 4px;
}
#voiceParties.section.active {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0 2px 4px;
    box-sizing: border-box;
}
#voiceParties .vp-layout {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(160px, 200px) minmax(0, 1fr) minmax(240px, 280px);
    gap: 8px;
    overflow: hidden;
}
#voiceParties .vp-side,
#voiceParties .vp-main,
#voiceParties .vp-voice-dock {
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.92), rgba(8, 10, 18, 0.94)) padding-box,
        linear-gradient(115deg, rgba(34, 211, 238, 0.55) 0%, rgba(72, 86, 232, 0.7) 48%, rgba(139, 92, 246, 0.55) 100%) border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 18px rgba(72, 86, 232, 0.1);
    padding: 8px;
    display: flex;
    flex-direction: column;
}
#voiceParties .vp-voice-dock {
    padding: 0;
    overflow: auto;
}
#voiceParties .vp-voice-dock .voice-modal-card {
    width: 100%;
    max-height: none;
    border: none;
    border-radius: 12px;
    box-shadow: none;
    padding: 12px 12px 10px;
    background:
        radial-gradient(120% 80% at 10% 0%, rgba(34, 211, 238, 0.12), transparent 50%),
        radial-gradient(100% 70% at 100% 100%, rgba(139, 92, 246, 0.16), transparent 55%),
        linear-gradient(165deg, #0d1220 0%, #0a0e18 100%);
}
#voiceParties .vp-voice-dock .voice-modal-card.is-docked .voice-modal-close {
    display: none !important;
}
#voiceParties .vp-voice-dock .voice-modal-headline { font-size: 18px; }
#voiceParties .vp-voice-dock .voice-toggle-btn { min-height: 40px; font-size: 13px; padding: 8px 12px; }
#voiceParties .vp-voice-dock .voice-modal-title { font-size: 16px; }
#voiceParties .vp-side-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    flex: 0 0 auto;
}
#voiceParties .vp-side-actions-row {
    display: flex;
    gap: 6px;
}
#voiceParties .vp-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    background: rgba(8, 14, 24, 0.85);
    border: 1px solid rgba(72, 86, 232, 0.35);
    color: #e8eef6;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
}
#voiceParties .vp-input:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.15);
}
#voiceParties .vp-input-sm { max-width: 96px; flex: 0 0 96px; width: 96px; }
#voiceParties .vp-btn {
    appearance: none;
    flex: 0 0 auto;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    box-shadow: 0 4px 12px rgba(72, 86, 232, 0.3);
}
#voiceParties .vp-btn:hover { filter: brightness(1.08); }
#voiceParties .vp-btn-muted {
    background: rgba(40, 50, 80, 0.85);
    border: 1px solid rgba(129, 140, 248, 0.35);
    box-shadow: none;
}
#voiceParties .vp-btn-warn {
    background: rgba(127, 29, 29, 0.55);
    border: 1px solid rgba(248, 113, 113, 0.45);
    box-shadow: none;
}
#voiceParties .vp-btn-ok {
    background: rgba(6, 78, 59, 0.65);
    border: 1px solid rgba(52, 211, 153, 0.45);
    box-shadow: none;
}
#voiceParties .vp-party-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#voiceParties .vp-list-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
    margin: 6px 2px 2px;
}
#voiceParties .vp-party-item {
    text-align: left;
    width: 100%;
    border: 1px solid rgba(72, 86, 232, 0.28);
    background: rgba(20, 28, 48, 0.75);
    color: #e8eef6;
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 12px;
}
#voiceParties .vp-party-item.vp-party-join {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(6, 60, 48, 0.35);
}
#voiceParties .vp-party-item strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#voiceParties .vp-party-item:hover {
    background: rgba(40, 55, 95, 0.65);
    border-color: rgba(34, 211, 238, 0.45);
}
#voiceParties .vp-party-item.is-active {
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(72, 86, 232, 0.28);
    box-shadow: 0 0 12px rgba(72, 86, 232, 0.22);
}
#voiceParties .vp-party-item .vp-meta {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: rgba(160, 180, 200, 0.85);
}
#voiceParties .vp-empty {
    margin: auto;
    opacity: 0.7;
    font-size: 13px;
    color: rgba(180, 192, 208, 0.9);
}
#voiceParties .vp-empty.hidden { display: none !important; }
#voiceParties .vp-active {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
}
#voiceParties .vp-active.hidden { display: none !important; }
#voiceParties .vp-active-head {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
#voiceParties .vp-active-head h3 {
    margin: 0;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(115deg, #22D3EE 0%, #4856E8 48%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
#voiceParties .vp-active-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}
#voiceParties .vp-members {
    flex: 0 0 auto;
    max-height: 56px;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
}
#voiceParties .vp-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(30, 40, 70, 0.75);
    border: 1px solid rgba(72, 86, 232, 0.35);
    font-size: 11px;
    white-space: nowrap;
}
#voiceParties .vp-member-chip img {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    object-fit: cover;
}
#voiceParties .vp-member-chip .vp-kick,
#voiceParties .vp-member-chip .vp-transfer {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0 1px;
}
#voiceParties .vp-member-chip .vp-kick { color: #f87171; }
#voiceParties .vp-member-chip .vp-transfer { color: #fbbf24; }
#voiceParties .vp-member-chip.is-live {
    border-color: rgba(52, 211, 153, 0.75);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}
#voiceParties .vp-member-chip .vp-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
    flex-shrink: 0;
}
#voiceParties .vp-main {
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}
#voiceParties .vp-chat {
    flex: 1 1 0;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(72, 86, 232, 0.28);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(6, 10, 20, 0.5);
}
#voiceParties .vp-chat-feed {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#voiceParties .vp-msg {
    max-width: 85%;
    padding: 5px 8px;
    border-radius: 10px;
    background: rgba(30, 40, 70, 0.8);
    border: 1px solid rgba(72, 86, 232, 0.2);
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}
#voiceParties .vp-msg.mine {
    align-self: flex-end;
    background: rgba(72, 86, 232, 0.35);
    border-color: rgba(139, 92, 246, 0.4);
}
#voiceParties .vp-msg .vp-msg-name {
    display: block;
    font-size: 10px;
    opacity: 0.75;
    margin-bottom: 1px;
}
#voiceParties .vp-chat-form {
    flex: 0 0 auto;
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid rgba(72, 86, 232, 0.35);
    background: rgba(10, 16, 28, 0.92);
}
#voiceParties .vp-chat-form .vp-input {
    flex: 1 1 auto;
    min-height: 34px;
}
#voiceParties .vp-chat-form .vp-btn {
    min-height: 34px;
    padding: 6px 12px;
}
@media (max-width: 1100px) {
    #voiceParties .vp-layout {
        grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) minmax(200px, 36%);
    }
    #voiceParties .vp-voice-dock {
        grid-column: 1 / -1;
    }
}
@media (max-width: 760px) {
    #voiceParties .vp-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(110px, 22%) minmax(0, 1fr) minmax(180px, 34%);
    }
}
/* ===== LEGAL (оферта, политика) ===== */
.legal-wrap {
    max-width: 920px;
    margin: 0 auto 20px;
    padding: 18px 20px 28px;
    box-sizing: border-box;
}

.legal-breadcrumb {
    font-size: 13px;
    color: rgba(180, 192, 208, 0.9);
    margin-bottom: 12px;
}

.legal-breadcrumb a {
    color: #8fd4ff;
    text-decoration: none;
}

.legal-breadcrumb a:hover {
    text-decoration: underline;
}

.legal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: 0.02em;
}

.legal-title-line {
    height: 1px;
    margin: 0 0 16px;
    border: 0;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.85), rgba(217, 70, 239, 0.55), transparent);
}

.legal-body a {
    color: #8fd4ff;
    text-decoration: none;
}

.legal-body a:hover {
    text-decoration: underline;
}

.legal-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 8px 0 12px;
}

.legal-ticket-btn {
    border: none;
    border-radius: 100px;
    padding: 9px 16px;
    background: linear-gradient(180deg, #34d399, #16a34a);
    color: #05180d;
    font-weight: 700;
    cursor: pointer;
}

.legal-ticket-btn:hover {
    filter: brightness(1.06);
}

.topups-wrap {
    max-width: 920px;
    margin: 0 auto 20px;
    padding: 18px 20px 24px;
    box-sizing: border-box;
}

.topups-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.topup-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.topup-history-meta {
    min-width: 0;
}

.topup-history-title {
    font-weight: 700;
}

.topup-history-sub {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(180, 192, 208, 0.9);
}

.topup-history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .topup-history-row {
        grid-template-columns: 1fr;
    }
    .topup-history-actions {
        justify-content: flex-start;
    }
}

.legal-sub {
    font-size: 13px;
    color: rgba(180, 192, 208, 0.88);
    margin: 0 0 18px;
    line-height: 1.45;
}

.legal-body {
    font-size: 14px;
    line-height: 1.55;
    color: rgba(235, 240, 248, 0.96);
}

.legal-body h2 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 20px 0 10px;
    color: #9fd6ff;
}

.legal-body p {
    margin: 0 0 10px;
}

.legal-body ul {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

.legal-body li {
    margin-bottom: 6px;
}

/* Один класс .hidden — скрывать узел (модалки с .profile-modal.hidden и т.п. переопределяют отдельными правилами) */
.hidden {
    display: none !important;
}

/* ===== PROFILE VIEW ===== */
.profile-layout {
    display: block;
}

.panel {
    background: rgba(34, 37, 44, 0.92);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-left {
    padding: 14px;
}

.profile-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.profile-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
}

.profile-sub {
    color: rgba(246, 246, 246, 0.7);
    font-size: 13px;
}

.profile-balance {
    text-align: right;
    font-size: 20px;
    font-weight: 700;
}

.profile-tabs div {
    padding: 11px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.profile-tabs .active-tab {
    background: #f6f6f6;
    color: #282828;
    font-weight: 700;
}

.profile-right {
    padding: 16px;
}

/* ===== PROFILE V2 (редизайн) ===== */
.profile-v2 {
    padding: 14px 16px 18px;
    position: relative;
    overflow: hidden;
}
.profile-v2-hero {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
    overflow: hidden;
    height: clamp(150px, 16vw, 240px);
    min-height: 150px;
    margin-bottom: 14px;
    border: 1px solid rgba(225, 29, 46, 0.28);
    background-color: #12080c;
    background-image:
        linear-gradient(105deg, rgba(10, 0, 6, 0.78), rgba(10, 10, 14, 0.42) 48%, rgba(20, 0, 8, 0.72)),
        var(--profile-hero-bg, url("/assets/custom/profile-banner-default.png"));
    background-size: cover, cover;
    background-position: center center, center center;
    background-repeat: no-repeat, no-repeat;
}
.profile-v2-hero-edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.profile-v2-hero-edit-btn:hover {
    background: rgba(225, 29, 46, 0.35);
    border-color: rgba(225, 29, 46, 0.55);
}
.profile-v2-hero-edit-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
.profile-v2-hero-inner {
    position: relative;
    z-index: 1;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
    height: 100%;
    min-height: 0;
}
.profile-v2-hero-title {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 0.95;
    text-transform: uppercase;
    text-shadow: 0 0 24px rgba(225, 29, 46, 0.45);
}
.profile-v2-hero-sub {
    margin-top: 6px;
    color: #ffb3ba;
    font-weight: 700;
    letter-spacing: 0.16em;
    font-size: 12px;
}
.profile-v2-hero-quote {
    max-width: 340px;
    text-align: right;
    color: #e8edf5;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.92;
}
.profile-v2-identity {
    display: grid;
    grid-template-columns: auto minmax(180px, 0.9fr) minmax(300px, 1.5fr);
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.profile-v2 .profile-avatar-wrap {
    width: 118px;
    height: 118px;
    align-self: center;
}
.profile-v2 .profile-avatar-img {
    width: 118px;
    height: 118px;
    border-radius: 22px;
}
.profile-v2 .profile-frame-img {
    width: 118px;
    height: 118px;
    border-radius: 22px;
}
.profile-v2-id-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 6px;
}
.profile-v2-id-main .nick {
    font-size: 26px;
    font-weight: 800;
}
.profile-v2-id-main > .nick,
.profile-v2-id-main > #profileNickname {
    display: none !important;
}
.profile-v2-id-main .steamid {
    font-size: 12px;
    opacity: 0.75;
}
.profile-v2-badge-row {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 6px;
    margin-left: 8px;
}
.profile-v2-badge-row .profile-diamond-badge,
.profile-v2-badge-row .profile-gold-badge,
.profile-v2-badge-row .profile-booster-badge,
.profile-v2-badge-row .profile-admin-badge,
.profile-v2-badge-row .profile-mod-badge,
.profile-v2-badge-row .profile-content-maker-badge,
.profile-v2-badge-row .profile-role-badge {
    margin: 0;
}
.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(225, 29, 46, 0.5);
    background: linear-gradient(90deg, rgba(225, 29, 46, 0.16), rgba(80, 10, 18, 0.22));
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(225, 29, 46, 0.18);
    line-height: 1.1;
}
.profile-role-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}
.profile-role-badge.role-creator,
.profile-role-badge.role-project_manager,
.profile-role-badge.role-server_manager {
    border-color: rgba(232, 197, 71, 0.55);
    background: linear-gradient(90deg, rgba(232, 197, 71, 0.14), rgba(120, 80, 10, 0.2));
    color: #f0d57a;
    box-shadow: 0 0 12px rgba(232, 197, 71, 0.16);
}
.profile-role-badge.role-admin,
.profile-role-badge.role-senior_admin,
.profile-role-badge.role-chief_admin {
    border-color: rgba(239, 68, 68, 0.55);
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.18), rgba(127, 29, 29, 0.22));
    color: #fca5a5;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.2);
}
.profile-role-badge.role-moderator {
    border-color: rgba(96, 165, 250, 0.55);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.16), rgba(30, 64, 175, 0.2));
    color: #bfdbfe;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.18);
}
.profile-role-badge.role-youtuber {
    border-color: rgba(225, 29, 46, 0.55);
    background: linear-gradient(90deg, rgba(225, 29, 46, 0.18), rgba(80, 10, 18, 0.24));
    color: #fff;
}
.profile-role-badge.role-clan_manager {
    border-color: rgba(217, 70, 239, 0.5);
    background: linear-gradient(90deg, rgba(217, 70, 239, 0.14), rgba(88, 28, 135, 0.2));
    color: #f5d0fe;
    box-shadow: 0 0 12px rgba(217, 70, 239, 0.16);
}
.profile-clan-manager-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 5px;
    padding: 4px 9px;
    border: 1px solid rgba(217, 70, 239, 0.55);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.12), rgba(168, 85, 247, 0.16) 50%, rgba(217, 70, 239, 0.18));
    color: #f5d0fe;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.28);
}
.profile-clan-manager-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
.profile-v2-badge-row .profile-clan-manager-badge {
    margin: 0;
}
.public-profile-v2 .profile-v2-badge-row .profile-clan-manager-badge {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    font-size: 11px;
    padding: 6px 12px;
    margin: 0;
}
.profile-role-badge.role-user {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    color: #e5e7eb;
    box-shadow: none;
}
button.profile-role-badge {
    cursor: pointer;
    font: inherit;
}
button.profile-role-badge:hover {
    filter: brightness(1.08);
}
.profile-v2-role-line,
.about-role-line.profile-v2-role-line {
    display: none !important;
}
.profile-v2-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.profile-v2-stats {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 8px;
    min-height: 100%;
}
.profile-v2-about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
    height: 100%;
}
.profile-v2-about-item {
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    min-width: 0;
    word-break: break-word;
}
.profile-v2-meta {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    height: 100%;
}
.profile-v2-meta-item {
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    display: flex;
    align-items: center;
    min-width: 0;
    word-break: break-word;
}
.profile-v2-topups {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.profile-v2-topups-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}
.profile-v2-topups-text span {
    font-size: 12px;
    opacity: 0.8;
}
.profile-v2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 14px;
    align-items: stretch;
}
.profile-v2-grid > .profile-v2-card {
    height: 100%;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-v2-promo {
    display: flex;
    gap: 8px;
}
.profile-v2-promo input {
    flex: 1;
    min-width: 0;
}
.profile-promo-history {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
}
.profile-promo-history-head {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) auto;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    opacity: 0.7;
    margin-bottom: 6px;
    padding: 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.profile-promo-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(3 * 34px + 2 * 4px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: #4a9fd0 rgba(255, 255, 255, 0.08);
}
.profile-promo-history-list::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.profile-promo-history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
.profile-promo-history-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6ec8ff, #3c89c5);
    border-radius: 10px;
}
.profile-promo-history-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7ed4ff, #559fd4);
}
.profile-promo-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) auto;
    gap: 8px;
    align-items: center;
    box-sizing: border-box;
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
}
.profile-promo-history-row .promo-when {
    opacity: 0.85;
    min-width: 0;
}
.profile-promo-history-row .promo-code {
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-promo-history-row .promo-reward {
    color: #86efac;
    font-weight: 800;
    white-space: nowrap;
}
.profile-promo-history-empty {
    font-size: 12px;
    opacity: 0.7;
    padding: 4px 0;
}
.profile-v2-socials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.profile-v2-social {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
button.profile-v2-social:hover:not(:disabled),
a.profile-v2-social:hover {
    border-color: rgba(145, 205, 255, 0.35);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
}
button.profile-v2-social:disabled,
a.profile-v2-social.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}
.profile-v2-social img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}
.profile-discord-verify {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(88, 101, 242, 0.28);
    background: rgba(88, 101, 242, 0.08);
}
.profile-discord-verify-status {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
    color: rgba(232, 236, 255, 0.92);
}
.profile-discord-verify-status.is-ok {
    color: #4ade80;
}
.profile-discord-verify-status.is-bad {
    color: #f87171;
}
.profile-discord-verify-status.is-warn {
    color: #f87171;
}
.profile-discord-verify.is-verified-only {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(34, 197, 94, 0.1);
}
.profile-discord-verify.is-verified-only .profile-discord-verify-actions {
    display: none;
}
.profile-discord-verify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.profile-discord-verify-actions .small-btn {
    margin: 0;
}
.profile-v2-social b {
    display: block;
    font-size: 12px;
}
.profile-v2-social span {
    font-size: 11px;
    opacity: 0.75;
}
.profile-v2-social span.discord-status-ok {
    color: #4ade80;
    opacity: 1;
    font-weight: 700;
}
.profile-v2-social span.discord-status-bad {
    color: #f87171;
    opacity: 1;
    font-weight: 700;
}
.profile-v2-about-item .discord-status-ok {
    color: #4ade80;
    font-weight: 700;
}
.profile-v2-about-item .discord-status-bad {
    color: #f87171;
    font-weight: 700;
}
.profile-v2-wars-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.profile-v2-wars-head h3 { margin: 0; font-size: 14px; }
.profile-v2-wars-season {
    font-size: 11px;
    opacity: 0.7;
}
.profile-v2-rating-dual {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
}
.profile-v2-rating-block {
    min-width: 0;
    padding: 2px 0;
}
.profile-v2-rating-block + .profile-v2-rating-block {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-v2-wars-strip {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: stretch;
}
.profile-v2-wars-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 8px 10px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(225, 29, 46, 0.2), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(225, 29, 46, 0.35);
    flex-shrink: 0;
}
.profile-v2-wars-rating strong {
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}
.profile-v2-wars-rating span {
    margin-top: 3px;
    font-size: 10px;
    color: #ffb3ba;
    font-weight: 700;
    text-transform: uppercase;
}
.profile-v2-wars-metrics {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
.profile-v2-wars-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    min-height: 58px;
}
.profile-v2-wars-metric img {
    width: 17px;
    height: 17px;
    object-fit: contain;
}
.profile-v2-wars-metric b {
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}
.profile-v2-wars-metric span {
    font-size: 10px;
    opacity: 0.7;
    line-height: 1.1;
}
.pe-banner-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.pe-banner-preset {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    aspect-ratio: 21 / 5;
    padding: 0;
}
.pe-banner-preset img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.pe-banner-preset.selected {
    border-color: rgba(225, 29, 46, 0.75);
    box-shadow: 0 0 0 1px rgba(225, 29, 46, 0.45);
}
.pe-banner-preset.is-default {
    display: grid;
    place-items: center;
    color: #cfd6e0;
    font-size: 11px;
    font-weight: 700;
}
@media (max-width: 1100px) {
    .profile-v2-identity {
        grid-template-columns: auto 1fr;
    }
    .profile-v2-stats {
        grid-column: 1 / -1;
    }
}
@media (max-width: 900px) {
    .profile-v2-grid { grid-template-columns: 1fr; }
    .profile-v2-stats { grid-template-columns: 1fr; }
    .profile-v2-wars-metrics { grid-template-columns: repeat(2, 1fr); }
    .profile-v2-wars-metric { border-radius: 12px; }
    .profile-v2-hero-quote { text-align: left; max-width: none; }
    .profile-v2-hero { height: clamp(130px, 28vw, 200px); }
}

.profile-top {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 0 0 14px 0;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
}
.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 78px;
    height: 78px;
    overflow: visible;
}
.profile-avatar-wrap .profile-avatar-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 11px;
    object-fit: cover;
    z-index: 1;
    background: #1a1f24;
}
.profile-avatar-wrap .profile-frame-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
}
.profile-avatar-wrap .profile-frame-img.hidden {
    display: none;
}
.profile-right.diamond-profile-theme,
.profile-modal-card.diamond-profile-theme:not(.public-profile-modal-card) {
    position: relative;
    isolation: isolate;
    border-color: rgba(34, 211, 238, 0.65) !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(217, 70, 239, 0.18), transparent 36%),
        radial-gradient(circle at 90% 14%, rgba(34, 211, 238, 0.17), transparent 34%),
        linear-gradient(145deg, rgba(11, 18, 32, 0.98), rgba(25, 20, 52, 0.98)) !important;
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.14), inset 0 0 34px rgba(168, 85, 247, 0.08);
    overflow: hidden;
}
.profile-modal-card.public-profile-modal-card.diamond-profile-theme {
    position: relative;
    isolation: isolate;
    border-color: rgba(34, 211, 238, 0.65) !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(217, 70, 239, 0.18), transparent 36%),
        radial-gradient(circle at 90% 14%, rgba(34, 211, 238, 0.17), transparent 34%),
        linear-gradient(145deg, rgba(11, 18, 32, 0.98), rgba(25, 20, 52, 0.98)) !important;
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.14), inset 0 0 34px rgba(168, 85, 247, 0.08);
    overflow: hidden;
}
.profile-right.diamond-profile-theme::before,
.profile-modal-card.diamond-profile-theme::before {
    content: "";
    position: absolute;
    inset: -55%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 38%, rgba(34, 211, 238, 0.15) 46%, transparent 54% 78%, rgba(217, 70, 239, 0.14) 86%, transparent 94%);
    animation: diamondProfileSweep 12s linear infinite;
}
.profile-right.diamond-profile-theme > *,
.profile-modal-card.diamond-profile-theme > * {
    position: relative;
    z-index: 1;
}
@keyframes diamondProfileSweep {
    to { transform: rotate(360deg); }
}
.profile-avatar-wrap.diamond-avatar-aura::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: 0;
    border-radius: 18px;
    padding: 3px;
    background: conic-gradient(#22d3ee, #6366f1, #d946ef, #22d3ee);
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.8));
    animation: diamondProfileSweep 4s linear infinite;
}
.profile-avatar-wrap.diamond-avatar-aura::after {
    content: "✦";
    position: absolute;
    right: -10px;
    top: -12px;
    z-index: 4;
    color: #a5f3fc;
    font-size: 20px;
    text-shadow: -58px 70px 0 #e879f9, 0 0 10px #22d3ee;
    animation: diamondSparkle 1.8s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes diamondSparkle {
    from { opacity: 0.35; transform: scale(0.8) rotate(-10deg); }
    to { opacity: 1; transform: scale(1.15) rotate(10deg); }
}
.profile-diamond-badge,
.profile-gold-badge,
.profile-booster-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin-top: 5px;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
}
.profile-diamond-badge {
    border: 1px solid rgba(34, 211, 238, 0.5);
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.13), rgba(217, 70, 239, 0.13));
    color: #a5f3fc;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.16);
}
.profile-diamond-badge img,
.profile-gold-badge img,
.profile-booster-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 1px;
}
.profile-booster-badge {
    border: 1px solid rgba(244, 127, 255, 0.6);
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(168, 85, 247, 0.14) 50%, rgba(244, 114, 182, 0.16));
    color: #fce7f3;
    box-shadow: 0 0 18px rgba(244, 127, 255, 0.28), 0 0 8px rgba(56, 189, 248, 0.18);
}
.profile-avatar-wrap.booster-avatar-aura::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: 0;
    border-radius: 18px;
    padding: 3px;
    background: conic-gradient(#38bdf8, #a855f7, #f472b6, #38bdf8);
    filter: drop-shadow(0 0 10px rgba(244, 127, 255, 0.85));
    animation: diamondProfileSweep 5s linear infinite;
}
.profile-avatar-wrap.booster-avatar-aura::after {
    content: "✦";
    position: absolute;
    right: -10px;
    top: -12px;
    z-index: 4;
    color: #f9a8d4;
    font-size: 19px;
    text-shadow: -58px 70px 0 #a855f7, 0 0 10px #38bdf8;
    animation: diamondSparkle 1.8s ease-in-out infinite alternate;
    pointer-events: none;
}
.profile-premium-badge-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    line-height: 1.25;
}
.profile-premium-badge-title {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
}
.profile-premium-badge-meta {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    opacity: 0.88;
    white-space: normal;
}
/* GOLD-кастомизация профиля: как DIAMOND, но мягче и в золотых тонах */
.profile-right.gold-profile-theme,
.profile-modal-card.gold-profile-theme:not(.public-profile-modal-card) {
    position: relative;
    isolation: isolate;
    border-color: rgba(250, 204, 21, 0.45) !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(217, 119, 6, 0.12), transparent 34%),
        radial-gradient(circle at 90% 14%, rgba(250, 204, 21, 0.10), transparent 32%),
        linear-gradient(145deg, rgba(16, 14, 8, 0.98), rgba(35, 27, 12, 0.98)) !important;
    box-shadow: 0 0 22px rgba(250, 204, 21, 0.10), inset 0 0 26px rgba(217, 119, 6, 0.06);
    overflow: hidden;
}
.profile-modal-card.public-profile-modal-card.gold-profile-theme {
    position: relative;
    isolation: isolate;
    border-color: rgba(250, 204, 21, 0.45) !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(217, 119, 6, 0.12), transparent 34%),
        radial-gradient(circle at 90% 14%, rgba(250, 204, 21, 0.10), transparent 32%),
        linear-gradient(145deg, rgba(16, 14, 8, 0.98), rgba(35, 27, 12, 0.98)) !important;
    box-shadow: 0 0 22px rgba(250, 204, 21, 0.10), inset 0 0 26px rgba(217, 119, 6, 0.06);
    overflow: hidden;
}
.profile-right.gold-profile-theme::before,
.profile-modal-card.gold-profile-theme::before {
    content: "";
    position: absolute;
    inset: -55%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 40%, rgba(250, 204, 21, 0.10) 47%, transparent 54% 80%, rgba(217, 119, 6, 0.09) 87%, transparent 94%);
    animation: diamondProfileSweep 16s linear infinite;
}
.profile-right.gold-profile-theme > *,
.profile-modal-card.gold-profile-theme > * {
    position: relative;
    z-index: 1;
}
.profile-avatar-wrap.gold-avatar-aura::before {
    content: "";
    position: absolute;
    inset: -6px;
    z-index: 0;
    border-radius: 17px;
    padding: 3px;
    background: conic-gradient(#facc15, #f59e0b, #b45309, #facc15);
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.6));
    animation: diamondProfileSweep 6s linear infinite;
}
.profile-avatar-wrap.gold-avatar-aura::after {
    content: "✦";
    position: absolute;
    right: -9px;
    top: -11px;
    z-index: 4;
    color: #fde68a;
    font-size: 17px;
    text-shadow: -56px 68px 0 #f59e0b, 0 0 8px #facc15;
    animation: goldSparkle 2.4s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes goldSparkle {
    from { opacity: 0.3; transform: scale(0.85) rotate(-8deg); }
    to { opacity: 0.9; transform: scale(1.08) rotate(8deg); }
}
.profile-gold-badge {
    border: 1px solid rgba(250, 204, 21, 0.45);
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.12), rgba(217, 119, 6, 0.12));
    color: #fde68a;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.14);
}
/* ===== АДМИНИСТРАЦИЯ: кроваво-красная тема профиля с потёками крови ===== */
.profile-right.admin-profile-theme,
.profile-modal-card.admin-profile-theme:not(.public-profile-modal-card) {
    position: relative;
    isolation: isolate;
    border-color: rgba(220, 38, 38, 0.6) !important;
    background:
        radial-gradient(circle at 10% 8%, rgba(220, 38, 38, 0.20), transparent 38%),
        radial-gradient(circle at 92% 16%, rgba(127, 29, 29, 0.28), transparent 36%),
        radial-gradient(circle at 50% 110%, rgba(153, 27, 27, 0.16), transparent 46%),
        linear-gradient(150deg, rgba(20, 6, 8, 0.99), rgba(46, 10, 14, 0.98)) !important;
    box-shadow: 0 0 32px rgba(220, 38, 38, 0.16), inset 0 0 40px rgba(127, 29, 29, 0.14);
    overflow: hidden;
}
.profile-modal-card.public-profile-modal-card.admin-profile-theme {
    position: relative;
    isolation: isolate;
    border-color: rgba(220, 38, 38, 0.6) !important;
    background:
        radial-gradient(circle at 10% 8%, rgba(220, 38, 38, 0.20), transparent 38%),
        radial-gradient(circle at 92% 16%, rgba(127, 29, 29, 0.28), transparent 36%),
        radial-gradient(circle at 50% 110%, rgba(153, 27, 27, 0.16), transparent 46%),
        linear-gradient(150deg, rgba(20, 6, 8, 0.99), rgba(46, 10, 14, 0.98)) !important;
    box-shadow: 0 0 32px rgba(220, 38, 38, 0.16), inset 0 0 40px rgba(127, 29, 29, 0.14);
    overflow: hidden;
}
.profile-right.admin-profile-theme::before,
.profile-modal-card.admin-profile-theme::before {
    content: "";
    position: absolute;
    inset: -55%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 36%, rgba(220, 38, 38, 0.16) 45%, transparent 54% 76%, rgba(153, 27, 27, 0.18) 86%, transparent 94%);
    animation: diamondProfileSweep 11s linear infinite;
}
.profile-right.admin-profile-theme > *,
.profile-modal-card.admin-profile-theme > * {
    position: relative;
    z-index: 1;
}
/* Потёки крови сверху панели */
.profile-right.admin-profile-theme::after,
.profile-modal-card.admin-profile-theme::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 92px;
    z-index: 2;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='90' viewBox='0 0 180 90' preserveAspectRatio='none'><path fill='%23991b1b' fill-opacity='0.50' d='M0,0 H180 V9 C174,9 176,24 172,28 C168,24 170,9 165,9 H150 C146,9 148,44 142,51 C136,44 140,9 134,9 H118 C114,9 116,19 112,22 C108,19 110,9 105,9 H92 C88,9 90,32 84,38 C78,32 82,9 76,9 H62 C58,9 60,17 56,20 C52,17 54,9 49,9 H38 C34,9 36,28 30,34 C24,28 28,9 22,9 H10 C7,9 8,15 5,17 C2,15 4,9 0,9 Z'/><path fill='%237f1d1d' fill-opacity='0.72' d='M0,0 H180 V6 C173,6 175,17 171,20 C167,17 169,6 163,6 H146 C142,6 144,33 139,38 C134,33 137,6 131,6 H114 C110,6 112,14 109,16 C106,14 108,6 102,6 H88 C84,6 86,24 81,29 C76,24 80,6 74,6 H58 C54,6 56,13 53,15 C50,13 52,6 46,6 H34 C30,6 32,21 27,25 C22,21 26,6 19,6 H8 C6,6 7,11 4,13 C1,11 3,6 0,6 Z'/></svg>");
    background-size: 180px 90px;
    background-repeat: repeat-x;
    filter: drop-shadow(0 2px 4px rgba(127, 29, 29, 0.55));
    transform-origin: top;
    animation: bloodDripFlow 7s ease-in-out infinite alternate;
}
@keyframes bloodDripFlow {
    from { transform: scaleY(1); filter: drop-shadow(0 2px 3px rgba(127, 29, 29, 0.45)) brightness(0.96); }
    to { transform: scaleY(1.14); filter: drop-shadow(0 3px 6px rgba(185, 28, 28, 0.65)) brightness(1.08); }
}
.profile-avatar-wrap.admin-avatar-aura::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: 0;
    border-radius: 18px;
    padding: 3px;
    background: conic-gradient(#ef4444, #7f1d1d, #b91c1c, #ef4444);
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.85));
    animation: diamondProfileSweep 5s linear infinite;
}
.profile-avatar-wrap.admin-avatar-aura::after {
    content: "✦";
    position: absolute;
    right: -10px;
    top: -12px;
    z-index: 4;
    color: #fca5a5;
    font-size: 19px;
    text-shadow: -58px 70px 0 #dc2626, 0 0 10px #ef4444;
    animation: diamondSparkle 1.9s ease-in-out infinite alternate;
    pointer-events: none;
}
.profile-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 5px;
    padding: 4px 9px;
    border: 1px solid rgba(239, 68, 68, 0.55);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.18), rgba(127, 29, 29, 0.22));
    color: #fca5a5;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: 0 0 14px rgba(220, 38, 38, 0.22);
}
.profile-admin-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
/* ===== МОДЕРАЦИЯ: синяя тема профиля с бликами, без потёков ===== */
.profile-right.mod-profile-theme,
.profile-modal-card.mod-profile-theme:not(.public-profile-modal-card) {
    position: relative;
    isolation: isolate;
    border-color: rgba(59, 130, 246, 0.55) !important;
    background:
        radial-gradient(circle at 10% 8%, rgba(59, 130, 246, 0.17), transparent 36%),
        radial-gradient(circle at 92% 16%, rgba(37, 99, 235, 0.15), transparent 34%),
        linear-gradient(150deg, rgba(7, 13, 26, 0.99), rgba(13, 26, 50, 0.98)) !important;
    box-shadow: 0 0 28px rgba(59, 130, 246, 0.14), inset 0 0 32px rgba(37, 99, 235, 0.10);
    overflow: hidden;
}
.profile-modal-card.public-profile-modal-card.mod-profile-theme {
    position: relative;
    isolation: isolate;
    border-color: rgba(59, 130, 246, 0.55) !important;
    background:
        radial-gradient(circle at 10% 8%, rgba(59, 130, 246, 0.17), transparent 36%),
        radial-gradient(circle at 92% 16%, rgba(37, 99, 235, 0.15), transparent 34%),
        linear-gradient(150deg, rgba(7, 13, 26, 0.99), rgba(13, 26, 50, 0.98)) !important;
    box-shadow: 0 0 28px rgba(59, 130, 246, 0.14), inset 0 0 32px rgba(37, 99, 235, 0.10);
    overflow: hidden;
}
.profile-right.mod-profile-theme::before,
.profile-modal-card.mod-profile-theme::before {
    content: "";
    position: absolute;
    inset: -55%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 38%, rgba(96, 165, 250, 0.15) 46%, transparent 54% 78%, rgba(59, 130, 246, 0.13) 86%, transparent 94%);
    animation: diamondProfileSweep 12s linear infinite;
}
.profile-right.mod-profile-theme > *,
.profile-modal-card.mod-profile-theme > * {
    position: relative;
    z-index: 1;
}
/* Мерцающие блики по панели модератора */
.profile-right.mod-profile-theme::after,
.profile-modal-card.mod-profile-theme::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle 3px at 14% 22%, rgba(191, 219, 254, 0.9), transparent 100%),
        radial-gradient(circle 2px at 78% 12%, rgba(147, 197, 253, 0.85), transparent 100%),
        radial-gradient(circle 2.5px at 88% 58%, rgba(191, 219, 254, 0.8), transparent 100%),
        radial-gradient(circle 2px at 34% 76%, rgba(147, 197, 253, 0.75), transparent 100%),
        radial-gradient(circle 3px at 58% 34%, rgba(219, 234, 254, 0.7), transparent 100%),
        radial-gradient(circle 2px at 8% 62%, rgba(147, 197, 253, 0.7), transparent 100%);
    animation: modGlintTwinkle 3.4s ease-in-out infinite alternate;
}
@keyframes modGlintTwinkle {
    from { opacity: 0.25; }
    50% { opacity: 0.85; }
    to { opacity: 0.4; }
}
.profile-avatar-wrap.mod-avatar-aura::before {
    content: "";
    position: absolute;
    inset: -6px;
    z-index: 0;
    border-radius: 17px;
    padding: 3px;
    background: conic-gradient(#60a5fa, #1d4ed8, #3b82f6, #60a5fa);
    filter: drop-shadow(0 0 7px rgba(59, 130, 246, 0.75));
    animation: diamondProfileSweep 5.5s linear infinite;
}
.profile-avatar-wrap.mod-avatar-aura::after {
    content: "✦";
    position: absolute;
    right: -10px;
    top: -12px;
    z-index: 4;
    color: #bfdbfe;
    font-size: 18px;
    text-shadow: -56px 68px 0 #3b82f6, 0 0 9px #60a5fa;
    animation: diamondSparkle 2s ease-in-out infinite alternate;
    pointer-events: none;
}
.profile-mod-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 5px;
    padding: 4px 9px;
    border: 1px solid rgba(96, 165, 250, 0.55);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.16), rgba(29, 78, 216, 0.18));
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.20);
}
.profile-mod-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* ===== ЮТУБЕР / СТРИМЕР: magenta–crimson тема с бликами «эфира» ===== */
.profile-right.youtuber-profile-theme,
.profile-modal-card.youtuber-profile-theme:not(.public-profile-modal-card) {
    position: relative;
    isolation: isolate;
    border-color: rgba(255, 45, 85, 0.55) !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 45, 85, 0.22), transparent 38%),
        radial-gradient(circle at 88% 18%, rgba(192, 38, 211, 0.18), transparent 36%),
        radial-gradient(circle at 50% 100%, rgba(127, 29, 29, 0.12), transparent 42%),
        linear-gradient(150deg, rgba(22, 6, 16, 0.99), rgba(48, 10, 28, 0.98)) !important;
    box-shadow: 0 0 30px rgba(255, 45, 85, 0.16), inset 0 0 36px rgba(192, 38, 211, 0.10);
    overflow: hidden;
}
.profile-modal-card.public-profile-modal-card.youtuber-profile-theme {
    position: relative;
    isolation: isolate;
    border-color: rgba(255, 45, 85, 0.55) !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 45, 85, 0.22), transparent 38%),
        radial-gradient(circle at 88% 18%, rgba(192, 38, 211, 0.18), transparent 36%),
        radial-gradient(circle at 50% 100%, rgba(127, 29, 29, 0.12), transparent 42%),
        linear-gradient(150deg, rgba(22, 6, 16, 0.99), rgba(48, 10, 28, 0.98)) !important;
    box-shadow: 0 0 30px rgba(255, 45, 85, 0.16), inset 0 0 36px rgba(192, 38, 211, 0.10);
    overflow: hidden;
}
.profile-right.youtuber-profile-theme::before,
.profile-modal-card.youtuber-profile-theme::before {
    content: "";
    position: absolute;
    inset: -55%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 36%, rgba(255, 45, 85, 0.16) 45%, transparent 54% 74%, rgba(192, 38, 211, 0.14) 84%, transparent 94%);
    animation: diamondProfileSweep 11s linear infinite;
}
.profile-right.youtuber-profile-theme > *,
.profile-modal-card.youtuber-profile-theme > * {
    position: relative;
    z-index: 1;
}
.profile-right.youtuber-profile-theme::after,
.profile-modal-card.youtuber-profile-theme::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle 3px at 16% 20%, rgba(255, 180, 200, 0.9), transparent 100%),
        radial-gradient(circle 2px at 72% 14%, rgba(244, 114, 182, 0.85), transparent 100%),
        radial-gradient(circle 2.5px at 90% 52%, rgba(251, 113, 133, 0.8), transparent 100%),
        radial-gradient(circle 2px at 38% 78%, rgba(232, 121, 249, 0.75), transparent 100%),
        radial-gradient(circle 3px at 58% 36%, rgba(255, 255, 255, 0.55), transparent 100%);
    animation: modGlintTwinkle 3.2s ease-in-out infinite alternate;
}
.profile-avatar-wrap.youtuber-avatar-aura::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: 0;
    border-radius: 18px;
    padding: 3px;
    background: conic-gradient(#ff2d55, #c026d3, #fb7185, #ff2d55);
    filter: drop-shadow(0 0 8px rgba(255, 45, 85, 0.8));
    animation: diamondProfileSweep 4.8s linear infinite;
}
.profile-avatar-wrap.youtuber-avatar-aura::after {
    content: "▶";
    position: absolute;
    right: -9px;
    top: -10px;
    z-index: 4;
    color: #fda4af;
    font-size: 15px;
    text-shadow: -52px 66px 0 #c026d3, 0 0 10px #ff2d55;
    animation: diamondSparkle 1.7s ease-in-out infinite alternate;
    pointer-events: none;
}
.profile-content-maker-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 5px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 45, 85, 0.55);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 45, 85, 0.18), rgba(192, 38, 211, 0.16));
    color: #fecdd3;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: 0 0 14px rgba(255, 45, 85, 0.22);
}
.profile-content-maker-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
button.profile-content-maker-badge {
    cursor: pointer;
    font: inherit;
}
button.profile-content-maker-badge:hover {
    filter: brightness(1.08);
}

/* Активности: вкладки / карточка / кнопки под тему профиля */
.profile-right.admin-profile-theme .profile-quest-widget {
    border-color: rgba(220, 38, 38, 0.35);
    background: rgba(60, 12, 16, 0.35);
}
.profile-right.admin-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn {
    border-color: rgba(220, 38, 38, 0.32);
    background: rgba(80, 14, 18, 0.45);
    color: #fecaca;
}
.profile-right.admin-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn.active {
    border-color: rgba(248, 113, 113, 0.7);
    background: linear-gradient(180deg, #ef4444, #991b1b);
    color: #fff;
    box-shadow: 0 0 14px rgba(220, 38, 38, 0.28);
}
.profile-right.admin-profile-theme .profile-quest-widget .quest-card {
    background: rgba(36, 8, 12, 0.72);
    border-color: rgba(220, 38, 38, 0.28);
}
.profile-right.admin-profile-theme .profile-quest-widget .quest-progress-bar span {
    background: linear-gradient(90deg, #ef4444, #fb7185);
}
.profile-right.admin-profile-theme .profile-quest-widget .quest-actions .user-friend-btn.pe-save-btn {
    background: linear-gradient(180deg, #ef4444, #b91c1c);
    border-color: rgba(248, 113, 113, 0.55);
    color: #fff;
}

.profile-right.mod-profile-theme .profile-quest-widget {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(12, 24, 48, 0.35);
}
.profile-right.mod-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn {
    border-color: rgba(59, 130, 246, 0.32);
    background: rgba(20, 40, 80, 0.45);
    color: #bfdbfe;
}
.profile-right.mod-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn.active {
    border-color: rgba(147, 197, 253, 0.7);
    background: linear-gradient(180deg, #60a5fa, #1d4ed8);
    color: #fff;
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.28);
}
.profile-right.mod-profile-theme .profile-quest-widget .quest-card {
    background: rgba(10, 18, 36, 0.72);
    border-color: rgba(59, 130, 246, 0.28);
}
.profile-right.mod-profile-theme .profile-quest-widget .quest-progress-bar span {
    background: linear-gradient(90deg, #3b82f6, #93c5fd);
}
.profile-right.mod-profile-theme .profile-quest-widget .quest-actions .user-friend-btn.pe-save-btn {
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    border-color: rgba(147, 197, 253, 0.55);
    color: #041018;
}

.profile-right.diamond-profile-theme .profile-quest-widget {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(18, 16, 42, 0.4);
}
.profile-right.diamond-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn {
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(30, 24, 60, 0.5);
    color: #a5f3fc;
}
.profile-right.diamond-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn.active {
    border-color: rgba(217, 70, 239, 0.65);
    background: linear-gradient(180deg, #22d3ee, #a855f7);
    color: #041018;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.28);
}
.profile-right.diamond-profile-theme .profile-quest-widget .quest-card {
    background: rgba(14, 16, 36, 0.72);
    border-color: rgba(34, 211, 238, 0.28);
}
.profile-right.diamond-profile-theme .profile-quest-widget .quest-progress-bar span {
    background: linear-gradient(90deg, #22d3ee, #d946ef);
}
.profile-right.diamond-profile-theme .profile-quest-widget .quest-actions .user-friend-btn.pe-save-btn {
    background: linear-gradient(180deg, #22d3ee, #a855f7);
    border-color: rgba(34, 211, 238, 0.55);
    color: #041018;
}

.profile-right.gold-profile-theme .profile-quest-widget {
    border-color: rgba(250, 204, 21, 0.35);
    background: rgba(40, 28, 10, 0.4);
}
.profile-right.gold-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn {
    border-color: rgba(250, 204, 21, 0.28);
    background: rgba(50, 36, 12, 0.5);
    color: #fde68a;
}
.profile-right.gold-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn.active {
    border-color: rgba(252, 211, 77, 0.7);
    background: linear-gradient(180deg, #facc15, #b45309);
    color: #1c1406;
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.24);
}
.profile-right.gold-profile-theme .profile-quest-widget .quest-card {
    background: rgba(28, 20, 8, 0.72);
    border-color: rgba(250, 204, 21, 0.28);
}
.profile-right.gold-profile-theme .profile-quest-widget .quest-progress-bar span {
    background: linear-gradient(90deg, #facc15, #f59e0b);
}
.profile-right.gold-profile-theme .profile-quest-widget .quest-actions .user-friend-btn.pe-save-btn {
    background: linear-gradient(180deg, #facc15, #d97706);
    border-color: rgba(252, 211, 77, 0.55);
    color: #1c1406;
}

.profile-right.youtuber-profile-theme .profile-quest-widget {
    border-color: rgba(255, 45, 85, 0.35);
    background: rgba(48, 10, 28, 0.4);
}
.profile-right.youtuber-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn {
    border-color: rgba(255, 45, 85, 0.32);
    background: rgba(60, 12, 32, 0.5);
    color: #fecdd3;
}
.profile-right.youtuber-profile-theme .widget.profile-quest-widget .profile-task-switch .small-btn.active {
    border-color: rgba(251, 113, 133, 0.7);
    background: linear-gradient(180deg, #ff2d55, #9d174d);
    color: #fff;
    box-shadow: 0 0 14px rgba(255, 45, 85, 0.28);
}
.profile-right.youtuber-profile-theme .profile-quest-widget .quest-card {
    background: rgba(32, 8, 20, 0.72);
    border-color: rgba(255, 45, 85, 0.28);
}
.profile-right.youtuber-profile-theme .profile-quest-widget .quest-progress-bar span {
    background: linear-gradient(90deg, #ff2d55, #e879f9);
}
.profile-right.youtuber-profile-theme .profile-quest-widget .quest-actions .user-friend-btn.pe-save-btn {
    background: linear-gradient(180deg, #ff2d55, #be185d);
    border-color: rgba(251, 113, 133, 0.55);
    color: #fff;
}

.diamond-customization-card {
    margin: 0 0 10px;
    padding: 10px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(217, 70, 239, 0.1));
}
.diamond-customization-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 13px;
    color: #a5f3fc;
}
.diamond-customization-title img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.diamond-customization-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-top: 8px;
}
.diamond-customization-feature {
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(234, 244, 255, 0.88);
    font-size: 10px;
}
.diamond-customization-card.locked {
    filter: saturate(0.55);
    opacity: 0.66;
}
.diamond-customization-card.gold-tier {
    border-color: rgba(250, 204, 21, 0.35);
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.07), rgba(217, 119, 6, 0.09));
}
.diamond-customization-card.gold-tier .diamond-customization-title {
    color: #fde68a;
}
.profile-avatar-wrap .profile-edit-btn {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 10px;
    background: rgba(0,0,0,0.55);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
    cursor: pointer;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.profile-avatar-wrap .profile-edit-btn:hover { background: rgba(30, 60, 80, 0.9); }
.profile-avatar-wrap .profile-edit-btn svg { display: block; }
.profile-top-center {
    flex: 1;
    min-width: 0;
}
.profile-privacy-wrap {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}
.profile-privacy-hint {
    font-size: 12px;
    opacity: 0.8;
    max-width: min(200px, 32vw);
    text-align: right;
    line-height: 1.25;
    word-wrap: break-word;
}
.profile-privacy-btn {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}
.profile-privacy-btn:hover { background: rgba(255,255,255,0.1); }
.profile-privacy-btn > span.profile-privacy-icon { display: flex; align-items: center; justify-content: center; }
.profile-privacy-btn .profile-privacy-icon img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: middle;
    pointer-events: none;
}
.profile-field {
    margin-bottom: 12px;
}
.profile-field label { display: block; font-size: 13px; margin-bottom: 4px; opacity: 0.9; }
.profile-field input, .profile-field select {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    color-scheme: dark;
}
.profile-field select option {
    background-color: #1a2230;
    color: #f4f7ff;
}
.profile-modal .profile-field input[type="file"] {
    padding: 6px 0;
}
.profile-edit-file-caption {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.9;
}
.pe-discord-bind {
    padding: 0;
    border: none;
    background: transparent;
}
.pe-discord-bind-status {
    width: 100%;
    box-sizing: border-box;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 8px;
    color: #fff;
}
.pe-discord-bind-status.is-ok { color: #4ade80; }
.pe-discord-bind-status.is-bad { color: #f87171; }
.pe-discord-bind-status.is-warn { color: #f87171; }
.pe-discord-bind-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-height: 0;
}
.pe-discord-bind-actions.hidden {
    display: none;
}
.profile-edit-file-row {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 40px;
}
.profile-edit-file-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.profile-edit-file-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    flex-shrink: 0;
}
.profile-edit-file-pill:hover {
    background: rgba(255, 255, 255, 0.16);
}
.profile-edit-file-hint {
    font-size: 13px;
    opacity: 0.82;
    min-width: 0;
    flex: 1;
}
.pe-frame-picker-host {
    max-height: 220px;
    overflow-y: auto;
    border-radius: 12px;
    padding: 6px;
    background: rgba(8, 12, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pe-frame-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #f4f7ff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.pe-frame-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}
.pe-frame-item.selected {
    border-color: rgba(74, 222, 128, 0.65);
    background: rgba(34, 197, 94, 0.12);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
}
.pe-frame-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
}
.pe-frame-item-ph {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    font-weight: 800;
}
.pe-frame-item-label {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}
.pe-frame-item-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}
.pe-frame-item-requirement {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    color: rgba(234, 244, 255, 0.65);
}
.pe-frame-item.locked {
    cursor: not-allowed;
    opacity: 0.62;
}
.pe-frame-item.locked:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}
.pe-frame-item-status {
    flex-shrink: 0;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
}
#profileEditModal .pe-save-btn {
    background: linear-gradient(180deg, #34d399, #16a34a);
    border-color: rgba(52, 211, 153, 0.55);
    color: #05180d;
}
#profileEditModal .pe-save-btn:hover {
    filter: brightness(1.06);
}
#profileEditModal .pe-cancel-btn {
    background: linear-gradient(180deg, #fb7185, #dc2626);
    border-color: rgba(251, 113, 133, 0.55);
    color: #2a080c;
}
#profileEditModal .pe-cancel-btn:hover {
    filter: brightness(1.06);
}

.profile-top .nick {
    font-size: 30px;
    font-weight: 700;
}

.profile-top .steamid {
    color: rgba(246, 246, 246, 0.75);
}

.about-card {
    padding: 18px;
    margin-bottom: 14px;
    margin-left: 18px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 20px;
    color: rgba(246, 246, 246, 0.82);
    font-size: 14px;
}
.about-role-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.about-role-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.about-role-stack .about-role-name,
.about-role-stack .about-role-level {
    line-height: 1.35;
}
.about-role-line .about-role-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}
.about-role-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 80, 80, 0.35);
    border-radius: 8px;
    background: rgba(255, 40, 40, 0.12);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.about-role-icon-btn:hover {
    background: rgba(255, 60, 60, 0.22);
    border-color: rgba(255, 100, 100, 0.55);
    transform: scale(1.04);
}
.about-role-icon-btn:focus-visible {
    outline: 2px solid rgba(255, 120, 120, 0.6);
    outline-offset: 2px;
}
.about-role-icon-btn .about-role-icon {
    width: 22px;
    height: 22px;
    pointer-events: none;
}
.youtuber-perks-list {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.92;
}
.youtuber-perks-list li + li {
    margin-top: 8px;
}
.about-card h2 {
    margin: 0 0 12px;
}
.profile-top-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.profile-referrals-btn {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 12px;
    background: rgba(88, 28, 135, 0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    transition: background 0.15s, border-color 0.15s;
}
.profile-referrals-btn:hover {
    background: rgba(109, 40, 217, 0.28);
    border-color: rgba(167, 139, 250, 0.55);
}
.profile-referrals-btn img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    pointer-events: none;
}
.referrals-modal-card {
    max-width: 520px;
    width: calc(100vw - 32px);
}
.referrals-modal-card .referrals-copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 0;
}
.referrals-modal-card .referrals-copy-row input {
    flex: 1;
    min-width: 0;
    width: auto;
    margin: 0;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    color-scheme: dark;
}
.referrals-modal-card .referrals-copy-row .user-friend-btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.referrals-modal-card .referrals-copy-row .user-friend-btn.pe-save-btn {
    min-width: 108px;
    justify-content: center;
}
.referrals-list {
    margin-top: 12px;
    max-height: min(42vh, 320px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
}
.referrals-list-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
}
.referrals-list-row:last-child { border-bottom: none; }
.referrals-list-meta {
    font-size: 12px;
    opacity: 0.78;
    margin-top: 2px;
}
.referrals-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    background: rgba(52, 211, 153, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.25);
}
.referrals-badge.pending {
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.25);
}
.referrals-hint {
    font-size: 12px;
    opacity: 0.82;
    margin: 8px 0 0;
    line-height: 1.45;
}
.referrals-inviter-block {
    margin-bottom: 14px;
}
.referrals-inviter-block h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
}
.referrals-inviter-empty {
    font-size: 13px;
    opacity: 0.78;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.admin-referrals-user-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
/* Цвета ролей: явно и для .nick в профиле, и для .logo-text в сайдбаре (иначе перебивает общий color) */
#app .sidebar .logo .logo-text.nick-role-creator,
#app #sidebarNickname.nick-role-creator,
#app #sidebarNickname .nick-line-name.nick-role-creator,
#app .profile-top .nick.nick-role-creator,
#app #profileNickname.nick-role-creator,
#app #profileNickname .nick-line-name.nick-role-creator,
#app #profileHeroTitle.nick-role-creator,
#app .profile-v2-hero-title.nick-role-creator { color: #e8c547 !important; text-shadow: 0 0 18px rgba(232, 197, 71, 0.45) !important; }
#app .sidebar .logo .logo-text.nick-role-pm,
#app #sidebarNickname.nick-role-pm,
#app #sidebarNickname .nick-line-name.nick-role-pm,
#app .profile-top .nick.nick-role-pm,
#app #profileNickname.nick-role-pm,
#app #profileNickname .nick-line-name.nick-role-pm,
#app #profileHeroTitle.nick-role-pm,
#app .profile-v2-hero-title.nick-role-pm { color: #b47cff !important; text-shadow: 0 0 14px rgba(180, 124, 255, 0.4) !important; }
#app .sidebar .logo .logo-text.nick-role-sm,
#app #sidebarNickname.nick-role-sm,
#app #sidebarNickname .nick-line-name.nick-role-sm,
#app .profile-top .nick.nick-role-sm,
#app #profileNickname.nick-role-sm,
#app #profileNickname .nick-line-name.nick-role-sm,
#app #profileHeroTitle.nick-role-sm,
#app .profile-v2-hero-title.nick-role-sm { color: #3ddc84 !important; text-shadow: 0 0 14px rgba(61, 220, 132, 0.35) !important; }
#app .sidebar .logo .logo-text.nick-role-chief,
#app #sidebarNickname.nick-role-chief,
#app #sidebarNickname .nick-line-name.nick-role-chief,
#app .profile-top .nick.nick-role-chief,
#app #profileNickname.nick-role-chief,
#app #profileNickname .nick-line-name.nick-role-chief,
#app #profileHeroTitle.nick-role-chief,
#app .profile-v2-hero-title.nick-role-chief { color: #9b30ff !important; text-shadow: 0 0 16px rgba(155, 48, 255, 0.45) !important; }
#app .sidebar .logo .logo-text.nick-role-senior,
#app #sidebarNickname.nick-role-senior,
#app #sidebarNickname .nick-line-name.nick-role-senior,
#app .profile-top .nick.nick-role-senior,
#app #profileNickname.nick-role-senior,
#app #profileNickname .nick-line-name.nick-role-senior,
#app #profileHeroTitle.nick-role-senior,
#app .profile-v2-hero-title.nick-role-senior { color: #c9a008 !important; text-shadow: 0 0 14px rgba(201, 160, 8, 0.4) !important; }
#app .sidebar .logo .logo-text.nick-role-mod,
#app #sidebarNickname.nick-role-mod,
#app #sidebarNickname .nick-line-name.nick-role-mod,
#app .profile-top .nick.nick-role-mod,
#app #profileNickname.nick-role-mod,
#app #profileNickname .nick-line-name.nick-role-mod,
#app #profileHeroTitle.nick-role-mod,
#app .profile-v2-hero-title.nick-role-mod { color: #5ec8ff !important; text-shadow: 0 0 14px rgba(94, 200, 255, 0.4) !important; }
#app .sidebar .logo .logo-text.nick-role-clanmgr,
#app #sidebarNickname.nick-role-clanmgr,
#app #sidebarNickname .nick-line-name.nick-role-clanmgr,
#app .profile-top .nick.nick-role-clanmgr,
#app #profileNickname.nick-role-clanmgr,
#app #profileNickname .nick-line-name.nick-role-clanmgr,
#app #profileHeroTitle.nick-role-clanmgr,
#app .profile-v2-hero-title.nick-role-clanmgr { color: #c084fc !important; text-shadow: 0 0 14px rgba(192, 132, 252, 0.4) !important; }
#app .sidebar .logo .logo-text.nick-role-tube,
#app #sidebarNickname.nick-role-tube,
#app #sidebarNickname .nick-line-name.nick-role-tube,
#app .profile-top .nick.nick-role-tube,
#app #profileNickname.nick-role-tube,
#app #profileNickname .nick-line-name.nick-role-tube,
#app #profileHeroTitle.nick-role-tube,
#app .profile-v2-hero-title.nick-role-tube { color: #ff4d4d !important; text-shadow: 0 0 14px rgba(255, 77, 77, 0.4) !important; }
#app .sidebar .logo .logo-text.nick-role-plain,
#app #sidebarNickname.nick-role-plain,
#app #sidebarNickname .nick-line-name.nick-role-plain,
#app .profile-top .nick.nick-role-plain,
#app #profileNickname.nick-role-plain,
#app #profileNickname .nick-line-name.nick-role-plain,
#app #profileHeroTitle.nick-role-plain,
#app .profile-v2-hero-title.nick-role-plain { color: #f4f4f4 !important; text-shadow: 0 0 18px rgba(225, 29, 46, 0.35) !important; }
.nick-role-creator { color: #e8c547; }
.nick-role-pm { color: #b47cff; }
.nick-role-sm { color: #3ddc84; }
.nick-role-chief { color: #9b30ff; }
.nick-role-senior { color: #c9a008; }
.nick-role-mod { color: #5ec8ff; }
.nick-role-clanmgr { color: #c084fc; }
.nick-role-tube { color: #ff4d4d; }
.profile-v2-hero-title.nick-role-creator { color: #e8c547 !important; text-shadow: 0 0 18px rgba(232, 197, 71, 0.45) !important; }
.profile-v2-hero-title.nick-role-pm { color: #b47cff !important; text-shadow: 0 0 14px rgba(180, 124, 255, 0.4) !important; }
.profile-v2-hero-title.nick-role-sm { color: #3ddc84 !important; text-shadow: 0 0 14px rgba(61, 220, 132, 0.35) !important; }
.profile-v2-hero-title.nick-role-chief { color: #9b30ff !important; text-shadow: 0 0 16px rgba(155, 48, 255, 0.45) !important; }
.profile-v2-hero-title.nick-role-senior { color: #c9a008 !important; text-shadow: 0 0 14px rgba(201, 160, 8, 0.4) !important; }
.profile-v2-hero-title.nick-role-mod { color: #5ec8ff !important; text-shadow: 0 0 14px rgba(94, 200, 255, 0.4) !important; }
.profile-v2-hero-title.nick-role-clanmgr { color: #c084fc !important; text-shadow: 0 0 14px rgba(192, 132, 252, 0.4) !important; }
.profile-v2-hero-title.nick-role-tube { color: #ff4d4d !important; text-shadow: 0 0 14px rgba(255, 77, 77, 0.4) !important; }
.profile-v2-hero-title.nick-role-plain { color: #f4f4f4 !important; text-shadow: 0 0 18px rgba(225, 29, 46, 0.35) !important; }
.admin-page { padding: 0 8px 40px; max-width: 1080px; margin: 0 auto; }
.admin-page.panel {
    padding: 18px 20px 32px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-info-editor { margin-top: 4px; }
.admin-info-layout {
    display: grid;
    gap: 16px;
    margin-top: 8px;
}
@media (min-width: 960px) {
    .admin-info-layout {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}
.admin-info-preview-box {
    min-height: 200px;
    max-height: min(62vh, 720px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.18);
}
.admin-info-live-editable {
    min-height: 360px;
    border-radius: 12px;
    border: 1px solid rgba(120, 200, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(120, 200, 255, 0.06);
}
.admin-info-live-editable:focus {
    outline: 2px solid rgba(120, 200, 255, 0.35);
    outline-offset: 2px;
}
.admin-info-source-col label {
    display: block;
    margin-bottom: 6px;
}
.admin-pe-frame-item.admin-pe-frame-lockedhint,
.pe-frame-item.admin-pe-frame-lockedhint {
    opacity: 0.55;
}
.pe-frame-item .admin-pe-frame-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.pe-frame-item .admin-pe-frame-actions button {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(40, 70, 100, 0.55);
    color: #eaf2ff;
}
.pe-frame-item .admin-pe-frame-actions button:hover {
    background: rgba(55, 100, 140, 0.65);
}
.pe-frame-item .admin-pe-frame-status {
    display: block;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 2px;
}
.pe-frame-item .admin-pe-frame-status.is-on { color: #8dffa8; }
.pe-frame-item .admin-pe-frame-status.is-off { color: #ffb4a8; }
.admin-user-table td .user-friend-btn.small {
    padding: 4px 10px;
    font-size: 12px;
}
.admin-user-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 18px; }
.admin-user-bar input {
    min-width: 120px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.2); color: inherit;
}
.btn-admin, .admin-user-bar button, .admin-panel-actions button {
    padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12);
    background: rgba(40, 70, 100, 0.4); color: #eaf2ff; cursor: pointer; font: inherit; font-size: 14px;
}
.btn-admin:hover, .admin-user-bar button:hover, .admin-panel-actions button:hover { background: rgba(55, 100, 140, 0.5); }
.admin-cols2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 880px) { .admin-cols2 { grid-template-columns: 1fr 1fr; } }
.admin-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px; padding: 12px 14px;
}
.admin-block h3 { margin: 0 0 8px; font-size: 15px; }
.admin-hint { opacity: 0.85; font-size: 13px; margin-bottom: 8px; }
.admin-inline-link {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.admin-inline-link:hover { opacity: 0.9; }
.admin-copyable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    color: #9fd0ff;
}
.admin-copyable:hover {
    color: #cfe8ff;
}
.admin-copyable-steam {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    word-break: break-all;
}
#topbarAdminWrap { display: flex; }
#topbarAdminWrap.hidden { display: none !important; }
.admin-tab-bar {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; padding: 0; list-style: none; align-items: center;
}
.admin-tab-btn {
    padding: 10px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12);
    background: rgba(25, 40, 58, 0.6); color: #dbe8f5; cursor: pointer; font: inherit; font-size: 14px;
}
.admin-tab-btn:hover { background: rgba(40, 70, 100, 0.5); }
.admin-tab-btn[aria-selected="true"] {
    border-color: rgba(100, 180, 255, 0.4); background: rgba(45, 90, 130, 0.55); color: #fff; font-weight: 600;
}
.admin-tabpanel { display: none; margin-top: 4px; }
.admin-tabpanel.is-active { display: block; }
.admin-tab-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: #e8f0f8; }
.admin-subhead { font-size: 12px; opacity: 0.8; margin: 0 0 12px; }
.admin-player-grid { display: grid; grid-template-columns: 1fr; gap: 14px; width: 100%; max-width: none; }
#adminUserDetail { width: 100%; max-width: none; min-width: 0; }
.admin-subtab-bar {
    display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}
.admin-subtab-btn {
    padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 35, 50, 0.55); color: #c9d8ea; cursor: pointer; font: inherit; font-size: 13px;
}
.admin-subtab-btn:hover { background: rgba(40, 65, 90, 0.45); }
.admin-subtab-btn[aria-selected="true"] {
    border-color: rgba(120, 200, 255, 0.4); background: rgba(40, 85, 120, 0.5); color: #fff; font-weight: 600;
}
.admin-subtabpanel { display: none; }
.admin-subtabpanel.is-active { display: block; }
.admin-subtab-heading { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: #e8f0f8; }
.admin-page-headline {
    grid-area: title;
    margin: 0 0 6px;
}
#adminLead {
    grid-area: lead;
    margin: 0 0 8px;
}
#adminTabBar {
    grid-area: tabs;
}
#adminTabMount {
    grid-area: content;
    min-width: 0;
}
@media (min-width: 960px) {
    #admin .admin-page.panel {
        display: grid;
        grid-template-columns: 170px minmax(0, 1fr);
        grid-template-areas:
            "title title"
            "tabs content";
        gap: 8px 14px;
        align-items: start;
    }
    .admin-tab-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin: 0;
        position: sticky;
        top: 6px;
        max-height: calc(var(--app-vh) - 160px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(34, 211, 238, 0.55) rgba(8, 10, 18, 0.35);
    }
    .admin-tab-bar::-webkit-scrollbar {
        width: 6px;
    }
    .admin-tab-bar::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #22D3EE, #8B5CF6);
        border-radius: 999px;
    }
    .admin-tab-bar::-webkit-scrollbar-track {
        background: rgba(8, 10, 18, 0.35);
        border-radius: 999px;
    }
    .admin-tab-btn {
        width: 100%;
        text-align: left;
        white-space: normal;
        flex-shrink: 0;
    }
    #adminTabMount {
        min-height: 420px;
        min-width: 0;
    }
}
.admin-kpi-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 10px 0; }
.admin-player-overview-left .admin-kpi-grid { grid-template-columns: minmax(0, 1fr); }
.admin-kpi { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 10px; }
.admin-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-kpi-plus {
    width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.16);
    background: rgba(45, 90, 130, 0.5); color: #eaf2ff; cursor: pointer; font-weight: 700; line-height: 1;
    font-size: 14px;
    padding: 0;
    flex: 0 0 auto;
}
.admin-kpi-plus:hover { background: rgba(65, 120, 170, 0.65); }
.admin-kpi .k-label { font-size: 12px; opacity: 0.75; }
.admin-kpi .k-value { margin-top: 4px; font-size: 18px; font-weight: 700; color: #f2f7ff; }
.admin-kpi .k-sub { margin-top: 4px; font-size: 12px; opacity: 0.85; line-height: 1.35; }
.admin-presence-pill {
    display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 0 0;
    padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04);
}
.admin-presence-pill.on { color: #86efac; border-color: rgba(52, 211, 153, 0.35); background: rgba(16, 185, 129, 0.12); }
.admin-presence-pill.off { color: #94a3b8; }
.admin-alert { font-size: 12px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(250, 204, 21, 0.35); background: rgba(250, 204, 21, 0.1); color: #fff1be; margin-top: 8px; }
.admin-block-danger { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.admin-quickops {
    margin-top: 10px; padding: 10px; border-radius: 10px; border: 1px solid rgba(120,200,255,0.25);
    background: rgba(28, 48, 68, 0.5);
}
.admin-quickops.hidden { display: none; }
.admin-quickops-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.admin-quickops-row select, .admin-quickops-row input {
    padding: 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.2); color: inherit;
}
.admin-summary-actions {
    margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap;
}
.admin-summary-layout { display: grid; gap: 10px; grid-template-columns: 1fr; width: 100%; }
.admin-summary-linkbtn {
    border: 1px solid rgba(120, 200, 255, 0.28);
    background: rgba(30, 55, 80, 0.45);
    color: #dff1ff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
}
.admin-summary-linkbtn:hover { background: rgba(52, 90, 124, 0.6); }
.admin-summary-popup {
    margin-top: 0;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 10px;
    background: rgba(20,35,50,0.55);
    min-height: 140px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    width: 100%;
    justify-self: stretch;
}
.admin-summary-popup.hidden { display: none; }
.admin-summary-popup .admin-quickops-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    align-items: stretch;
}
.admin-summary-popup .admin-quickops-row .btn-admin,
.admin-summary-popup .admin-quickops-row select,
.admin-summary-popup .admin-quickops-row input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.admin-player-overview-split { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: stretch; width: 100%; max-width: none; }
@media (min-width: 980px) { .admin-player-overview-split { grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.5fr); } }
.admin-player-overview-left,
.admin-player-overview-right { min-width: 0; }
.admin-player-overview-right,
.admin-player-overview-right .admin-player-sub-mount,
.admin-player-overview-right .admin-subtabpanel,
.admin-player-overview-right .admin-block { width: 100%; }
.admin-player-overview-left .admin-block { padding: 10px 12px; }
.admin-player-overview-right .admin-block { min-height: 0; }
.admin-panel-scroll {
    min-height: 0;
    max-height: 420px;
    overflow: auto;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
}
.admin-panel-footer {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.admin-ach-row td { vertical-align: middle; }
.admin-ach-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}
.admin-ach-badge.is-on { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; }
.admin-ach-badge.is-off { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }
.admin-ach-thumb {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    vertical-align: middle;
}
.admin-panel-inline.hidden { display: none; }
.admin-user-search {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 8px;
    margin: 8px 0 10px;
    padding: 8px;
    border: 1px solid rgba(123, 185, 255, 0.2);
    border-radius: 12px;
    background: rgba(14, 27, 44, 0.72);
    backdrop-filter: blur(2px);
}
.admin-user-search input {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(123, 185, 255, 0.28);
    background: rgba(7, 18, 32, 0.9);
    color: #eaf2ff;
    font: inherit;
}
.admin-user-search input::placeholder {
    color: rgba(214, 232, 255, 0.62);
}
.admin-user-search input:focus {
    outline: none;
    border-color: rgba(132, 205, 255, 0.7);
    box-shadow: 0 0 0 2px rgba(80, 150, 220, 0.22);
}
.admin-user-search .btn-admin {
    height: 40px;
    min-width: 92px;
    border-radius: 10px;
    border: 1px solid rgba(132, 205, 255, 0.35);
    background: linear-gradient(180deg, rgba(52, 97, 139, 0.88) 0%, rgba(34, 70, 105, 0.92) 100%);
}
.admin-user-search .btn-admin:hover {
    background: linear-gradient(180deg, rgba(63, 113, 159, 0.95) 0%, rgba(40, 81, 120, 0.98) 100%);
}
#admin-panel-users {
    min-height: 0;
    height: calc(var(--app-vh) - 170px);
    max-height: calc(var(--app-vh) - 170px);
    overflow: hidden;
}
#admin-panel-users.is-active {
    display: flex;
    flex-direction: column;
}
.admin-users-static {
    flex: 0 0 auto;
}
.admin-users-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}
.clan-role-select {
    max-width: 160px;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: #e8f0f8;
}

/* Клановые войны — модалки и формы в стиле сайта */
.clan-wars-hub-card {
    width: min(920px, calc(100vw - 24px));
    max-width: none;
    max-height: min(92vh, 880px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.clan-wars-hub-card .admin-clan-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
.clan-wars-hub-toolbar .user-friend-btn.pe-save-btn,
.clan-wars-hub-toolbar .user-friend-btn.small.pe-save-btn {
    background: var(--brand-grad) !important;
    border: none !important;
    color: #fff !important;
}
.clan-wars-hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 10px;
}
.clan-wars-hub-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 14px;
    align-items: start;
}
@media (max-width: 820px) {
    .clan-wars-hub-grid { grid-template-columns: 1fr; }
}
.clan-wars-hub-section {
    background: rgba(8, 10, 18, 0.4);
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 12px;
    padding: 12px 14px;
    max-height: min(52vh, 480px);
    overflow: auto;
}
.clan-wars-hub-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
}
.clan-wars-match-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.22);
}
.clan-wars-match-card:last-child { margin-bottom: 0; }
.clan-wars-match-card .cwm-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.clan-wars-match-card .cwm-id {
    font-weight: 800;
    color: #d946ef;
}
.clan-wars-match-card .cwm-meta {
    font-size: 13px;
    opacity: 0.88;
    line-height: 1.4;
}
.clan-wars-match-card .cwm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.clan-war-roster-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.clan-war-roster-row .cw-slot-num {
    opacity: 0.7;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}
.clan-war-roster-row select,
#clanWarsChallengeModal .profile-field select,
#clanWarsChallengeModal .profile-field input,
#clanWarsRosterModal .profile-field select,
#admin-panel-clan-wars .profile-field select,
#admin-panel-clan-wars .cw-admin-create select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    color-scheme: dark;
    font: inherit;
}
.clan-war-roster-row select option,
#clanWarsChallengeModal .profile-field select option,
#admin-panel-clan-wars .profile-field select option,
#admin-panel-clan-wars .cw-admin-create select option {
    background-color: #1a2230;
    color: #f4f7ff;
}
.cw-admin-create {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(120px, 0.7fr) auto;
    gap: 10px 12px;
    align-items: end;
}
.cw-admin-create .profile-field { margin-bottom: 0; }
.cw-admin-create .cw-admin-create-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
@media (max-width: 900px) {
    .cw-admin-create { grid-template-columns: 1fr; }
}
#admin-panel-clan-wars .admin-clan-wars-detail {
    font-size: 14px;
    line-height: 1.45;
}
#admin-panel-clan-wars .admin-clan-wars-detail h4 {
    margin: 12px 0 6px;
    font-size: 13px;
}
#admin-panel-clan-wars .admin-clan-wars-detail ul {
    margin: 0;
    padding-left: 18px;
}
#admin-panel-clan-wars .cw-detail-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 720px) {
    #admin-panel-clan-wars .cw-detail-pair { grid-template-columns: 1fr; }
}
.clan-wars-detail-body .cw-detail-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cw-roster-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.cw-roster-nick {
    font-weight: 700;
    min-width: 0;
    word-break: break-word;
}
.cw-roster-dino {
    white-space: nowrap;
    color: #a5f3fc;
    font-weight: 600;
    font-size: 13px;
}
.cw-roster-dino.is-hidden {
    color: rgba(232, 240, 248, 0.55);
    font-style: italic;
    font-weight: 500;
}
.admin-role-perm-item.is-clan-focus {
    border-color: rgba(217, 70, 239, 0.45);
    background: rgba(217, 70, 239, 0.08);
}
@media (max-width: 640px) {
    .clan-wars-detail-body .cw-detail-pair { grid-template-columns: 1fr; }
    .clan-war-roster-row { grid-template-columns: 28px 1fr; }
    .clan-war-roster-row .cw-roster-dino { grid-column: 2; }
}

.clan-members-board {
    margin-top: 8px;
}

/* Полная ширина блока участников: роли и кнопки видны без бокового скролла */
.clan-members-board.ratings-board {
    overflow-x: visible;
    overflow-y: visible;
    max-width: 100%;
}

/* Как #usersRows: 7 колонок; колонка «Роль и действия» с гарантированной шириной */
.clan-members-board.ratings-board .ratings-head.users-head,
.clan-members-board.ratings-board .rating-row {
    grid-template-columns: 56px minmax(140px, 1.2fr) 72px 120px 110px 52px minmax(280px, 1.1fr);
}

.clan-members-board.ratings-board .rating-row {
    align-items: start;
}

.clan-members-board.ratings-board .rating-player {
    min-width: 0;
}

.clan-members-board .rating-prize {
    min-width: 0;
    justify-self: stretch;
    text-align: right;
}

.clan-member-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.clan-members-board .clan-role-select {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.clan-members-board .rating-rank {
    flex-wrap: wrap;
    align-self: start;
    padding-top: 2px;
}

.admin-clan-layout {
    display: grid;
    grid-template-columns: minmax(200px, 280px) 1fr;
    gap: 14px;
    align-items: start;
}

@media (max-width: 900px) {
    .admin-clan-layout {
        grid-template-columns: 1fr;
    }
}

.admin-clan-list-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 60vh;
    overflow: auto;
}

.admin-clan-list-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #e8f0f8;
    cursor: pointer;
    font: inherit;
    width: 100%;
    box-sizing: border-box;
}

.admin-clan-list-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-clan-list-item--active {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.08);
}

.admin-clan-list-item .acli-tag {
    font-weight: 800;
    font-size: 14px;
    color: #d946ef;
}

.admin-clan-list-item .acli-name {
    font-weight: 600;
    font-size: 14px;
}

.admin-clan-list-item .acli-meta {
    font-size: 12px;
    opacity: 0.75;
}

.admin-clan-manage-card {
    max-width: min(1200px, calc(100vw - 24px));
    width: calc(100vw - 28px);
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.admin-clan-modal-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 2px 8px 0;
    scrollbar-gutter: stable;
}

.admin-clan-members-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 6px;
}

.admin-clan-members-table th,
.admin-clan-members-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.admin-clan-members-table th {
    color: rgba(232, 240, 248, 0.82);
    font-weight: 700;
    font-size: 13px;
}

.admin-clan-members-table .acm-actions {
    text-align: right;
    white-space: nowrap;
    min-width: 220px;
}

.admin-clan-members-table .acm-actions-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-clan-members-table select {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 20, 28, 0.95);
    color: #e8f0f8;
    font-size: 13px;
    min-width: 120px;
}

.clan-admin-modal-section {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.clan-admin-modal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

#admin-panel-users .ratings-board {
    min-height: 100%;
}
#admin-panel-audit .admin-info-layout {
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) {
    #admin-panel-audit .admin-info-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}
#admin-panel-audit .admin-block { min-width: 0; overflow: hidden; }
.admin-audit-list { max-height: min(62vh, 680px); overflow: auto; }
.admin-activity-list { max-height: min(70vh, 760px); overflow: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.admin-game-log-list { max-height: min(70vh, 760px); overflow: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.agl-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(15, 22, 36, 0.55);
}
.agl-row:hover { background: rgba(60, 95, 130, 0.08); }
.agl-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.agl-row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 13px; }
.agl-row-meta { font-size: 12px; opacity: 0.82; display: flex; gap: 8px; flex-wrap: wrap; }
.agl-msg { font-size: 13px; line-height: 1.45; color: #e8f0f8; word-break: break-word; }
.agl-raw { font-size: 11px; opacity: 0.65; font-family: ui-monospace, Consolas, monospace; word-break: break-all; margin-top: 4px; }
.agl-kind {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(120, 180, 255, 0.35);
    color: #b8d4f0;
    background: rgba(40, 70, 110, 0.35);
}
.agl-kind.kill { border-color: rgba(255, 120, 120, 0.45); color: #ffc8c8; background: rgba(90, 30, 30, 0.35); }
.agl-kind.join { border-color: rgba(120, 220, 160, 0.4); color: #c8f0d8; background: rgba(30, 70, 45, 0.35); }
.agl-kind.leave { border-color: rgba(200, 180, 100, 0.4); color: #f0e8c0; background: rgba(70, 60, 25, 0.35); }
.agl-channel {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.9;
    border: 1px solid rgba(255,255,255,0.12);
}
.aa-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(15, 22, 36, 0.55);
}
.aa-row:hover { background: rgba(60, 95, 130, 0.08); }
.aa-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.aa-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.aa-cat {
    display: inline-flex;
    align-items: center;
    border: 1px solid;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.aa-row-meta { font-size: 12px; opacity: 0.85; display: flex; gap: 8px; flex-wrap: wrap; }
.aa-row-detail { display: flex; flex-wrap: wrap; gap: 6px; }
.aa-user { font-size: 12px; margin-bottom: 6px; opacity: 0.92; }
.aa-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    font-size: 12px;
}
.aa-tag .aa-k { opacity: 0.6; }
.aa-tag .aa-v { font-weight: 600; }
.aa-actor { font-size: 12px; opacity: 0.75; }
.aa-balance { opacity: 0.85; }
.admin-audit-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-audit-row:last-child { border-bottom: none; }
.admin-audit-row.clickable { cursor: pointer; }
.admin-audit-row.clickable:hover { background: rgba(60, 95, 130, 0.12); }
.admin-funds-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 11px;
    border: 1px solid rgba(255,255,255,0.2);
}
.admin-funds-status.success { border-color: rgba(16,185,129,0.45); color: #9ff3d6; }
.admin-funds-status.pending { border-color: rgba(250,204,21,0.45); color: #fde68a; }
.admin-funds-status.cancelled { border-color: rgba(248,113,113,0.45); color: #fecaca; }
.admin-finance-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}
@media (max-width: 1020px) {
    .admin-finance-layout { grid-template-columns: 1fr; }
    .admin-detail-kv { grid-template-columns: 1fr; }
}
.admin-finance-list {
    max-height: min(62vh, 680px);
    overflow: auto;
}
.admin-finance-empty {
    opacity: 0.78;
    padding: 12px;
}
.admin-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 10130;
    background: rgba(5, 8, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.admin-detail-modal.hidden { display: none; }
.admin-detail-card {
    width: min(520px, 96vw);
    max-height: min(88vh, 720px);
    overflow: auto;
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.92), rgba(8, 10, 18, 0.88)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 28px rgba(72, 86, 232, 0.14);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    color: #e8eef8;
}
.admin-detail-card h3 {
    margin: 0 0 10px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.admin-detail-kv {
    display: grid;
    grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
    gap: 8px 12px;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.22);
    background: rgba(8, 10, 18, 0.4);
}
.admin-detail-kv > div:nth-child(odd) { opacity: 0.78; color: #a5b4fc; }
.admin-detail-json {
    margin-top: 10px;
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 12px;
    padding: 10px;
    max-height: 36vh;
    overflow: auto;
    white-space: pre-wrap;
    font-size: 12px;
    background: rgba(8, 10, 18, 0.5);
}
.admin-detail-card .support-action-row,
.admin-detail-card .user-friend-btn.pe-save-btn {
    margin-top: 4px;
}
.admin-detail-card .user-friend-btn.pe-save-btn {
    background: var(--brand-grad) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
.admin-detail-card .user-friend-btn.small {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
    border-radius: 10px;
}
.admin-detail-card input,
.admin-detail-card select,
.admin-detail-card textarea {
    border: 1px solid rgba(129, 140, 248, 0.3) !important;
    background: rgba(8, 10, 18, 0.55) !important;
    color: #e8eef8 !important;
    border-radius: 10px;
}
.admin-quickops-row select,
.admin-quickops-row input {
    min-width: 120px;
    max-width: 100%;
    box-sizing: border-box;
}
.admin-shop-add-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
}
.admin-shop-add-grid .admin-shop-add-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
}
.admin-shop-add-grid input,
.admin-shop-add-grid select {
    width: 100%;
    box-sizing: border-box;
    min-height: 36px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    background: rgba(13, 20, 31, 0.96);
    color: #e9eff9;
    padding: 8px 10px;
}
#admin-panel-shop .admin-shop-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
}
#admin-panel-shop .ratings-board {
    overflow: visible;
    min-width: 0;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(10, 17, 27, 0.55);
}
#admin-panel-shop .admin-shop-head,
#admin-panel-shop #adminShopListBody .admin-shop-row {
    display: grid;
    grid-template-columns: minmax(100px, 0.9fr) minmax(0, 1.4fr) 64px 72px minmax(140px, auto);
    gap: 8px;
    padding: 8px 10px;
    align-items: center;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
#admin-panel-shop .admin-shop-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(16, 28, 44, 0.98);
    color: #c5d6ef;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
#admin-panel-shop .admin-shop-head > *,
#admin-panel-shop #adminShopListBody .admin-shop-row > * {
    min-width: 0;
}
#admin-panel-shop #adminShopListBody .admin-shop-row {
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
#admin-panel-shop #adminShopListBody .admin-shop-row:last-child { border-bottom: none; }
#admin-panel-shop #adminShopListBody .admin-shop-row:hover { background: rgba(60, 95, 130, 0.12); }
#admin-panel-shop #adminShopListBody .admin-shop-row .rating-rank {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
#admin-panel-shop #adminShopListBody .admin-shop-row .admin-shop-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}
#admin-panel-shop #adminShopListBody .admin-shop-row .admin-shop-row-actions .btn-admin {
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
}
#admin-panel-shop #adminShopListBody .admin-shop-row .admin-shop-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
#admin-panel-shop #adminShopListBody .admin-shop-row .admin-shop-meta {
    font-size: 11px;
    color: #9fb4d0;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* wide width set with glass modal styles */
.admin-roulette-spins-modal-list {
    display: grid;
    gap: 0;
    max-height: min(60vh, 520px);
    overflow: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(10, 17, 27, 0.55);
}
.admin-roulette-spins-modal-list .admin-roulette-spin-row,
.admin-roulette-spins-modal-list .admin-roulette-spins-modal-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(100px, 0.9fr);
    gap: 6px;
    padding: 8px 10px;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    min-width: 0;
}
.admin-roulette-spins-modal-list .admin-roulette-spins-modal-head {
    position: sticky;
    top: 0;
    background: rgba(16, 28, 44, 0.98);
    color: #c5d6ef;
    font-weight: 600;
    font-size: 12px;
    z-index: 1;
}
.admin-roulette-spins-modal-list .admin-roulette-spin-row:last-child { border-bottom: none; }
@media (max-width: 720px) {
    #admin-panel-shop .admin-shop-head { display: none; }
    #admin-panel-shop #adminShopListBody .admin-shop-row {
        grid-template-columns: 1fr !important;
        gap: 6px;
    }
    #admin-panel-shop #adminShopListBody .admin-shop-row .admin-shop-row-actions {
        justify-content: flex-start;
    }
    .admin-roulette-spins-modal-list .admin-roulette-spins-modal-head { display: none; }
    .admin-roulette-spins-modal-list .admin-roulette-spin-row {
        grid-template-columns: 1fr !important;
    }
}

/* Рулетка в админке: компактная сетка без горизонтального скролла */
#admin-panel-roulette .admin-shop-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
}
#admin-panel-roulette .ratings-board {
    overflow: visible;
    min-width: 0;
    width: 100%;
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 14px;
    background: rgba(8, 10, 18, 0.4);
}
#admin-panel-roulette .admin-roulette-head,
#admin-panel-roulette #adminRouletteListBody .admin-roulette-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 64px 44px auto;
    gap: 8px;
    padding: 8px 10px;
    align-items: center;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
#admin-panel-roulette #adminRouletteSpinsBody .admin-roulette-spin-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(90px, 0.9fr);
    gap: 8px;
    padding: 8px 10px;
    align-items: center;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
#admin-panel-roulette .admin-roulette-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(8, 10, 18, 0.85);
    color: #a5b4fc;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 1px solid rgba(129, 140, 248, 0.25);
}
#admin-panel-roulette #adminRouletteListBody .admin-roulette-row,
#admin-panel-roulette #adminRouletteSpinsBody .admin-roulette-spin-row {
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
#admin-panel-roulette #adminRouletteListBody .admin-roulette-row:last-child,
#admin-panel-roulette #adminRouletteSpinsBody .admin-roulette-spin-row:last-child {
    border-bottom: none;
}
#admin-panel-roulette #adminRouletteListBody .admin-roulette-row:hover,
#admin-panel-roulette #adminRouletteSpinsBody .admin-roulette-spin-row:hover {
    background: rgba(60, 95, 130, 0.12);
}
#admin-panel-roulette .admin-roulette-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}
#admin-panel-roulette .admin-roulette-actions .btn-admin {
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
}
#admin-panel-roulette .admin-roulette-weight {
    color: #e9eff9;
    font-weight: 600;
    text-align: center;
}
#admin-panel-roulette .admin-roulette-seg-meta {
    font-size: 11px;
    line-height: 1.3;
    color: #9fb4d0;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#admin-panel-roulette .admin-block input,
#admin-panel-roulette .admin-block select,
#admin-panel-roulette .admin-block textarea {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(13, 20, 31, 0.96);
    color: #e9eff9;
}
@media (max-width: 720px) {
    #admin-panel-roulette .admin-roulette-head { display: none; }
    #admin-panel-roulette #adminRouletteListBody .admin-roulette-row,
    #admin-panel-roulette #adminRouletteSpinsBody .admin-roulette-spin-row {
        grid-template-columns: 1fr !important;
        gap: 6px;
    }
    #admin-panel-roulette .admin-roulette-actions { justify-content: flex-start; }
}

/* Промокоды в админке: своя 5-колоночная сетка (не ratings 6 колонок / не shop 10) */
#admin-panel-promo .admin-shop-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
#admin-panel-promo .ratings-board {
    overflow: visible;
    min-width: 760px;
}
#admin-panel-promo .admin-promo-head,
#admin-panel-promo #adminPromoListBody .admin-promo-row {
    grid-template-columns:
        minmax(120px, 1.1fr)
        minmax(150px, 1.25fr)
        minmax(88px, 0.7fr)
        minmax(120px, 1fr)
        minmax(170px, 1.15fr) !important;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
}
#admin-panel-promo .admin-promo-head > *,
#admin-panel-promo #adminPromoListBody .admin-promo-row > * {
    min-width: 0;
}
#admin-panel-promo #adminPromoListBody .admin-promo-row .rating-rank {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    letter-spacing: 0.02em;
}
#admin-panel-promo #adminPromoListBody .admin-promo-row .rating-user {
    min-width: 0;
}
#admin-panel-promo #adminPromoListBody .admin-promo-row .rating-user strong {
    display: block;
    line-height: 1.3;
}
#admin-panel-promo #adminPromoListBody .admin-promo-row .admin-promo-created {
    opacity: 0.76;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.35;
    word-break: break-word;
}
#admin-panel-promo #adminPromoListBody .admin-promo-row .rating-prize {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    color: inherit;
    font-weight: 600;
    font-size: 0.92rem;
}
#admin-panel-promo #adminPromoListBody .admin-promo-row .admin-promo-uses {
    line-height: 1.35;
    white-space: nowrap;
}
#admin-panel-promo #adminPromoListBody .admin-promo-row .admin-promo-uses strong {
    color: rgba(200, 170, 255, 0.95);
    font-weight: 800;
}
@media (max-width: 980px) {
    #admin-panel-promo .admin-promo-head { display: none; }
    #admin-panel-promo .ratings-board { min-width: 0; }
    #admin-panel-promo #adminPromoListBody .admin-promo-row {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
    #admin-panel-promo #adminPromoListBody .admin-promo-row .admin-promo-uses {
        white-space: normal;
    }
}
#admin-panel-test-login .admin-shop-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
#admin-panel-test-login .ratings-board {
    overflow: visible;
    min-width: 760px;
}
#admin-panel-test-login .admin-test-login-head,
#admin-panel-test-login #adminTestLoginListBody .admin-test-login-row {
    grid-template-columns:
        minmax(120px, 1.1fr)
        minmax(150px, 1.25fr)
        minmax(88px, 0.7fr)
        minmax(140px, 1fr)
        minmax(190px, 1.2fr) !important;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
}
#admin-panel-test-login .admin-test-login-head > *,
#admin-panel-test-login #adminTestLoginListBody .admin-test-login-row > * {
    min-width: 0;
}
#admin-panel-test-login #adminTestLoginListBody .admin-test-login-row .rating-prize {
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}
@media (max-width: 980px) {
    #admin-panel-test-login .admin-test-login-head { display: none; }
    #admin-panel-test-login .ratings-board { min-width: 0; }
    #admin-panel-test-login #adminTestLoginListBody .admin-test-login-row {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
}
.admin-text-block { min-height: 220px; width: 100%; box-sizing: border-box; padding: 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.28); color: #eef4ff; font-family: inherit; font-size: 14px; line-height: 1.45; resize: vertical; }
.admin-role-perm-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.admin-role-perm-toolbar select {
    min-width: 240px;
    max-width: 100%;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(13, 20, 31, 0.96);
    color: #e9eff9;
    padding: 6px 10px;
}
.admin-role-perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(10, 17, 27, 0.6);
    max-height: min(62vh, 620px);
    overflow: auto;
}
.admin-role-perm-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 2px;
    align-items: start;
    padding: 12px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: rgba(13, 20, 31, 0.72);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.admin-role-perm-item:hover {
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(30, 48, 72, 0.55);
}
.admin-role-perm-item input { margin-top: 3px; }
.admin-role-perm-title { font-weight: 600; line-height: 1.25; color: #eef4ff; }
.admin-role-perm-key {
    grid-column: 2;
    opacity: 0.7;
    font-size: 12px;
    line-height: 1.25;
    color: #9fb4d0;
    word-break: break-all;
}
.admin-role-perm-empty {
    grid-column: 1 / -1;
    padding: 14px;
    opacity: 0.75;
}

/* Таблицы таймеров / смен / рейтинга в админке */
.admin-data-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(10, 17, 27, 0.55);
    margin-bottom: 14px;
}
.admin-data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-data-table th,
.admin-data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-align: left;
    vertical-align: middle;
}
.admin-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(16, 28, 44, 0.98);
    color: #c5d6ef;
    font-weight: 600;
    white-space: nowrap;
}
.admin-data-table tbody tr:hover {
    background: rgba(60, 95, 130, 0.12);
}
.admin-data-table tbody tr:last-child td { border-bottom: none; }
.admin-data-table input[type="text"],
.admin-data-table input[type="number"] {
    width: 100%;
    max-width: 110px;
    min-height: 32px;
    box-sizing: border-box;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(13, 20, 31, 0.96);
    color: #e9eff9;
}
.admin-data-table code {
    font-size: 12px;
    color: #9fb4d0;
}
.admin-shifts-table-wrap,
.admin-ratings-manage-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(10, 17, 27, 0.55);
}
.admin-shifts-head,
.admin-shifts-row,
.admin-ratings-manage-head,
.admin-ratings-manage-row {
    display: grid;
    gap: 8px;
    padding: 8px 10px;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
.admin-shifts-head,
.admin-ratings-manage-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(16, 28, 44, 0.98);
    color: #c5d6ef;
    font-weight: 600;
    font-size: 12px;
    border-bottom-color: rgba(255,255,255,0.12);
}
/* Смены: ID | Имя | Смена | Онл. | Действия — без нижнего скролла */
.admin-shifts-head,
.admin-shifts-row {
    grid-template-columns: 52px minmax(0, 1.3fr) minmax(88px, 0.7fr) 52px minmax(150px, auto);
}
/* Рейтинг: ID | Игрок | Статус | Действия */
.admin-ratings-manage-head,
.admin-ratings-manage-row {
    grid-template-columns: 56px minmax(0, 1.4fr) 110px minmax(150px, auto);
}
.admin-shifts-row:last-child,
.admin-ratings-manage-row:last-child { border-bottom: none; }
.admin-shifts-row:hover,
.admin-ratings-manage-row:hover { background: rgba(60, 95, 130, 0.12); }
.admin-shifts-actions,
.admin-ratings-manage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}
.admin-shifts-actions .btn-admin,
.admin-ratings-manage-actions .btn-admin {
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
}
.admin-shifts-status-on { color: #6fcf97; font-weight: 600; }
.admin-shifts-status-off { opacity: 0.75; }
.admin-shifts-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-shifts-meta,
.admin-ratings-manage-meta {
    font-size: 12px;
    line-height: 1.35;
    color: #9fb4d0;
}
.admin-compact-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(5, 8, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
}
.admin-compact-modal.hidden { display: none !important; }
.admin-compact-modal-card {
    width: min(440px, 100%);
    max-height: min(84vh, 680px);
    overflow: auto;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.94), rgba(8, 10, 18, 0.9)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 28px rgba(72, 86, 232, 0.14);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    padding: 14px 16px 16px;
    color: #e9eff9;
}
.admin-compact-modal-card--wide {
    width: min(520px, 100%);
}
.admin-compact-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.admin-compact-modal-head strong {
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
    line-height: 1.3;
}
.admin-compact-modal-close {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.5);
    color: #e9eff9;
    border-radius: 10px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
.admin-compact-modal-body {
    display: grid;
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
}
.admin-compact-modal-body .admin-compact-kv {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(8, 10, 18, 0.4);
    border: 1px solid rgba(129, 140, 248, 0.22);
}
.admin-compact-modal-body .admin-compact-kv span:first-child {
    color: #a5b4fc;
    font-size: 12px;
}
.admin-compact-modal-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}
.admin-compact-modal-form label {
    display: grid;
    gap: 4px;
    font-size: 12px;
    color: #a5b4fc;
}
.admin-compact-modal-form label:nth-child(n+5) {
    grid-column: 1 / -1;
}
.admin-compact-modal-form input[type="text"],
.admin-compact-modal-form input[type="number"],
.admin-compact-modal-form select {
    width: 100%;
    box-sizing: border-box;
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.55);
    color: #e9eff9;
    font-size: 13px;
}
.admin-compact-modal-form .admin-compact-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e9eff9;
    font-size: 13px;
    grid-column: 1 / -1;
}
.admin-compact-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.admin-compact-modal-actions .btn-admin {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(8, 10, 18, 0.45);
}
.admin-compact-modal-actions .btn-admin:first-child {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
.btn-admin.danger {
    background: linear-gradient(180deg, #fb7185, #dc2626);
    color: #fff;
    border-color: rgba(248, 113, 113, 0.45);
}
@media (max-width: 720px) {
    .admin-shifts-head,
    .admin-ratings-manage-head { display: none; }
    .admin-shifts-row,
    .admin-ratings-manage-row {
        grid-template-columns: 1fr !important;
        gap: 6px;
    }
    .admin-shifts-actions,
    .admin-ratings-manage-actions { justify-content: flex-start; }
    .admin-compact-modal-body .admin-compact-kv {
        grid-template-columns: 1fr;
    }
    .admin-compact-modal-form {
        grid-template-columns: 1fr;
    }
}
.admin-user-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-user-table th, .admin-user-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: left; }
.admin-user-table tr:hover { background: rgba(255,255,255,0.04); }

.profile-widgets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.widget {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
}

.widget h3 {
    margin: 0 0 10px;
}

.level-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.level-badge-profile {
    flex-shrink: 0;
    line-height: 0;
}

.level-ring {
    --level-pct: 0%;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(12, 14, 18, 0.98) 58%, transparent 59%),
        conic-gradient(#e11d2e 0 var(--level-pct, 0%), rgba(255, 255, 255, 0.08) 0);
    box-shadow: 0 0 20px rgba(225, 29, 46, 0.25);
}

.level-ring .level-badge,
.level-ring .level-badge-lg,
.level-ring img {
    width: 62%;
    height: 62%;
    max-width: 48px;
    max-height: 48px;
}

.progress {
    width: 100%;
    height: 8px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.progress span {
    display: block;
    width: 35%;
    height: 100%;
    background: #4ade80;
}

.profile-level-progress {
    position: relative;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.profile-level-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    background: linear-gradient(90deg, #ff2a3d, #ff6b78);
    box-shadow: 0 0 16px rgba(225, 29, 46, 0.45);
}

.profile-level-progress-text {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
    pointer-events: none;
}

.widget input {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    margin-bottom: 12px;
}

.widget .small-btn {
    border: none;
    border-radius: 100px;
    background: #4ade80;
    color: #183021;
    padding: 8px 18px;
    font-weight: 700;
}

.top-notice-stack {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 10020;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    pointer-events: none;
}
.toast,
.warn-toast {
    min-width: 260px;
    max-width: min(720px, calc(100vw - 32px));
    background: linear-gradient(160deg, rgba(17, 27, 42, 0.98) 0%, rgba(11, 18, 29, 0.98) 100%);
    color: #eaf4ff;
    border: 1px solid rgba(121, 182, 255, 0.26);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    line-height: 1.32;
    white-space: normal;
    word-break: break-word;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.warn-toast {
    color: #ffe4e7;
    border-color: rgba(239, 68, 68, 0.74);
}
.toast.show,
.warn-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.stillness-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 14000;
    background: linear-gradient(180deg, rgba(4, 8, 14, 0.45) 0%, rgba(4, 8, 14, 0.22) 100%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 16px;
}
.stillness-confirm-modal.hidden { display: none; }
.stillness-confirm-card {
    width: min(520px, calc(100vw - 24px));
    background: linear-gradient(160deg, rgba(17, 27, 42, 0.98) 0%, rgba(11, 18, 29, 0.98) 100%);
    border: 1px solid rgba(121, 182, 255, 0.28);
    border-radius: 16px;
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(3px);
    padding: 16px 16px 14px;
    animation: stillnessConfirmIn 0.2s ease-out;
}
.stillness-confirm-title {
    margin: 0 0 9px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #eaf4ff;
}
.stillness-confirm-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(224, 236, 250, 0.97);
}
.stillness-confirm-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.admin-notify-modal {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(180deg, rgba(4, 8, 14, 0.56) 0%, rgba(4, 8, 14, 0.28) 100%);
}
.admin-notify-modal.hidden { display: none; }
.admin-notify-card {
    width: min(760px, calc(100vw - 24px));
    background: linear-gradient(160deg, rgba(17, 27, 42, 0.98) 0%, rgba(11, 18, 29, 0.98) 100%);
    border: 1px solid rgba(121, 182, 255, 0.28);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 20px 20px 16px;
    backdrop-filter: blur(4px);
    animation: stillnessConfirmIn 0.2s ease-out;
}
.admin-notify-title {
    margin: 0 0 10px;
    font-size: 37px;
    font-weight: 900;
    letter-spacing: 0.01em;
    color: #f3f7ff;
}
.admin-notify-text {
    margin: 0;
    color: rgba(228, 237, 248, 0.97);
    font-size: 31px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: min(52vh, 420px);
    overflow: auto;
    padding-right: 2px;
}
.admin-notify-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
@media (max-width: 900px) {
    .admin-notify-title { font-size: 29px; }
    .admin-notify-text { font-size: 24px; }
}
@media (max-width: 620px) {
    .admin-notify-title { font-size: 24px; }
    .admin-notify-text { font-size: 20px; }
}
@keyframes stillnessConfirmIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-role-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.about-premium-line {
    display: none !important;
}
.about-premium-line strong {
    color: #22d3ee;
}
.profile-premium-detail {
    display: none !important;
}

/* ===== ROULETTE: рулетка призов ===== */
.roulette-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 4px 0 12px;
    box-sizing: border-box;
}
.roulette-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 28px;
    align-items: center;
    margin-bottom: 24px;
}
@media (max-width: 900px) {
    .roulette-hero { grid-template-columns: 1fr; }
}
.roulette-hero-copy h2 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #22d3ee 0%, #d946ef 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.35));
}
.roulette-hero-sub {
    margin: 0 0 12px;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(180, 198, 220, 0.88);
}
.roulette-hero-desc {
    margin: 0 0 18px;
    line-height: 1.55;
    color: rgba(200, 214, 230, 0.9);
    max-width: 36em;
}
.roulette-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.roulette-meta-pill {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(15, 23, 42, 0.65);
    font-size: 0.88rem;
    color: #e2e8f0;
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.12);
}
.roulette-meta-pill strong { color: #22d3ee; }
.roulette-spin-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #0b0f14;
    background: linear-gradient(135deg, #22d3ee, #d946ef);
    box-shadow: 0 0 28px rgba(217, 70, 239, 0.35), 0 0 18px rgba(34, 211, 238, 0.25);
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.roulette-spin-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0 36px rgba(217, 70, 239, 0.45), 0 0 24px rgba(34, 211, 238, 0.35);
}
.roulette-spin-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}
.roulette-wheel-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
}
.roulette-wheel-pointer {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 22px solid #22d3ee;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.9));
    z-index: 3;
}
.roulette-wheel-outer {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.25), rgba(217, 70, 239, 0.2));
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.2), inset 0 0 30px rgba(0, 0, 0, 0.45);
}
.roulette-wheel-svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    transition: transform 4.8s cubic-bezier(0.12, 0.85, 0.18, 1);
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.35));
}
.roulette-wheel-hub {
    position: absolute;
    inset: 50%;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1e293b, #0b0f14 70%);
    border: 2px solid rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.35);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.roulette-wheel-hub img {
    width: 28px;
    height: 28px;
    opacity: 0.95;
}
.roulette-boards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.roulette-board {
    background: rgba(34, 37, 44, 0.92);
    border: 1px solid rgba(34, 211, 238, 0.15);
    border-radius: 14px;
    padding: 14px 16px;
}
.roulette-board h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #22d3ee;
}
.roulette-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}
.roulette-feed-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.86rem;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
}
.roulette-feed-item strong { color: #f472b6; }
.roulette-feed-item span { opacity: 0.75; font-size: 0.78rem; white-space: nowrap; }
.roulette-status-msg {
    margin-top: 10px;
    min-height: 1.2em;
    font-size: 0.9rem;
    color: rgba(180, 198, 220, 0.9);
}
.roulette-status-msg.is-win { color: #34d399; }
.roulette-status-msg.is-error { color: #f87171; }
.roulette-deco-dots {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    background: repeating-linear-gradient(to bottom, rgba(148,163,184,0.35) 0 4px, transparent 4px 10px);
    opacity: 0.35;
    pointer-events: none;
}
.roulette-deco-dots.left { left: -18px; }
.roulette-deco-dots.right { right: -18px; }

/* —— Roulette redesign: glass + компакт —— */
#roulette.roulette-redesign {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
#roulette.roulette-redesign.active {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.content:has(#roulette.roulette-redesign.active) {
    padding-left: 10px;
    padding-right: 10px;
}
.content-main-scroll:has(#roulette.roulette-redesign.active) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.content-main-scroll:has(#roulette.roulette-redesign.active) > .content-top-sticky {
    flex-shrink: 0;
    margin-bottom: 4px;
}
.content-main-scroll:has(#roulette.roulette-redesign.active) > .site-footer {
    flex-shrink: 0;
    margin-top: 6px;
}
#roulette.roulette-redesign .roulette-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}
#roulette.roulette-redesign .roulette-hero {
    flex-shrink: 0;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(280px, 340px);
    gap: 14px 18px;
    align-items: stretch;
    margin-bottom: 0;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.62), rgba(8, 10, 18, 0.48)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 24px rgba(72, 86, 232, 0.1);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
#roulette.roulette-redesign .roulette-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
#roulette.roulette-redesign .roulette-hero-mid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding: 4px 2px;
}
#roulette.roulette-redesign .roulette-spotlight {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(8, 10, 18, 0.4);
    border: 1px solid rgba(129, 140, 248, 0.22);
    box-shadow: inset 0 0 20px rgba(72, 86, 232, 0.06);
}
#roulette.roulette-redesign .roulette-spotlight-label {
    margin: 0 0 6px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a5b4fc;
}
#roulette.roulette-redesign .roulette-spotlight-prizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#roulette.roulette-redesign .roulette-spot-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(17, 21, 42, 0.55);
    border: 1px solid rgba(34, 211, 238, 0.22);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
#roulette.roulette-redesign .roulette-spot-chip:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(72, 86, 232, 0.18);
}
#roulette.roulette-redesign .roulette-spot-chip .swatch {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}
#roulette.roulette-redesign .roulette-spot-chip .chance {
    color: #67e8f9;
    font-weight: 800;
}
#roulette.roulette-redesign .roulette-spotlight-feed {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
#roulette.roulette-redesign .roulette-spot-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.92);
    min-width: 0;
}
#roulette.roulette-redesign .roulette-spot-row strong {
    color: #c4b5fd;
    font-weight: 800;
}
#roulette.roulette-redesign .roulette-spot-row .prize {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.92;
}
#roulette.roulette-redesign .roulette-spot-row .when {
    flex-shrink: 0;
    font-size: 10px;
    color: rgba(148, 163, 184, 0.9);
}
#roulette.roulette-redesign .roulette-spot-empty {
    font-size: 12px;
    color: rgba(148, 163, 184, 0.85);
}
@media (max-width: 1100px) {
    #roulette.roulette-redesign .roulette-hero {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    }
    #roulette.roulette-redesign .roulette-hero-mid {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}
@media (max-width: 700px) {
    #roulette.roulette-redesign .roulette-hero-mid {
        grid-template-columns: 1fr;
    }
}
#roulette.roulette-redesign .roulette-hero-copy h2 {
    margin: 0 0 4px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}
#roulette.roulette-redesign .roulette-hero-sub {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #a5b4fc;
}
#roulette.roulette-redesign .roulette-hero-desc {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(203, 213, 225, 0.88);
    max-width: 40em;
}
#roulette.roulette-redesign .roulette-meta-row {
    gap: 6px;
    margin-bottom: 10px;
}
#roulette.roulette-redesign .roulette-meta-pill {
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(8, 10, 18, 0.45);
    border: 1px solid rgba(129, 140, 248, 0.28);
    box-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#roulette.roulette-redesign .roulette-meta-pill strong {
    color: #67e8f9;
}
#roulette.roulette-redesign .roulette-spin-btn {
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    background: var(--brand-grad);
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.4);
}
#roulette.roulette-redesign .roulette-spin-btn:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 0 24px rgba(72, 86, 232, 0.5);
}
#roulette.roulette-redesign .roulette-status-msg {
    margin-top: 8px;
    min-height: 1em;
    font-size: 12px;
}
#roulette.roulette-redesign .roulette-wheel-wrap {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
#roulette.roulette-redesign .roulette-wheel-outer {
    width: min(100%, 300px);
    padding: 8px;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.55), rgba(8, 10, 18, 0.4)) padding-box,
        var(--brand-grad) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 28px rgba(72, 86, 232, 0.25), inset 0 0 24px rgba(0, 0, 0, 0.35);
}
#roulette.roulette-redesign .roulette-wheel-hub {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.95), rgba(8, 10, 18, 0.9)) padding-box,
        var(--brand-grad) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}
#roulette.roulette-redesign .roulette-wheel-hub img {
    width: 22px;
    height: 22px;
}
#roulette.roulette-redesign .roulette-wheel-pointer {
    top: 2px;
    border-left-width: 11px;
    border-right-width: 11px;
    border-top-width: 16px;
}
#roulette.roulette-redesign .roulette-boards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
}
@media (max-width: 1000px) {
    #roulette.roulette-redesign .roulette-boards {
        grid-template-columns: 1fr 1fr;
        overflow-y: auto;
    }
    #roulette.roulette-redesign .roulette-prizes-board {
        grid-column: 1 / -1;
        min-height: 220px;
    }
}
@media (max-width: 640px) {
    #roulette.roulette-redesign .roulette-boards {
        grid-template-columns: 1fr;
    }
    #roulette.roulette-redesign .roulette-board {
        min-height: 200px;
    }
}
#roulette.roulette-redesign .roulette-board {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.55), rgba(8, 10, 18, 0.42)) padding-box,
        linear-gradient(115deg, rgba(34, 211, 238, 0.35), rgba(72, 86, 232, 0.4), rgba(139, 92, 246, 0.35)) border-box;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
#roulette.roulette-redesign .roulette-board h3 {
    flex-shrink: 0;
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#roulette.roulette-redesign .roulette-prizes-hint {
    flex-shrink: 0;
    margin: 0 0 8px;
    font-size: 11px;
    color: rgba(148, 163, 184, 0.85);
}
#roulette.roulette-redesign .roulette-feed {
    flex: 1 1 auto;
    min-height: 0;
    gap: 5px;
    max-height: none;
    overflow-y: auto;
}
#roulette.roulette-redesign .roulette-feed-item {
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(8, 10, 18, 0.4);
    border: 1px solid rgba(129, 140, 248, 0.18);
    font-size: 12px;
}
#roulette.roulette-redesign .roulette-feed-item strong {
    color: #c4b5fd;
}
#roulette.roulette-redesign .roulette-prizes-board {
    margin-top: 0;
}
#roulette.roulette-redesign .roulette-prizes-list {
    flex: 1 1 auto;
    min-height: 0;
    gap: 5px;
    max-height: none;
    overflow-y: auto;
}
#roulette.roulette-redesign .roulette-prize-item {
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(8, 10, 18, 0.4);
    border: 1px solid rgba(129, 140, 248, 0.18);
}
#roulette.roulette-redesign .roulette-prize-item:hover {
    border-color: rgba(34, 211, 238, 0.4);
    background: rgba(72, 86, 232, 0.12);
}
#roulette.roulette-redesign .roulette-prize-chance {
    color: #67e8f9;
}
#roulette.roulette-redesign .roulette-deco-dots {
    display: none;
}

/* ===== Glass redesign: Задания / Инфо / Кланы / Ивенты / Сообщения ===== */
.mission-modal.mission-glass {
    background: rgba(5, 8, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.mission-modal.mission-glass .mission-modal-card {
    width: min(780px, 96vw);
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.78), rgba(8, 10, 18, 0.72)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 28px rgba(72, 86, 232, 0.14);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
}
.mission-modal.mission-glass .profile-modal-head {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(129, 140, 248, 0.22);
}
.mission-modal.mission-glass .profile-modal-head h3 {
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.mission-modal.mission-glass .user-friend-btn.small {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
}
.mission-modal.mission-glass .mission-modal-tabs {
    gap: 6px;
    margin-top: 12px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(8, 10, 18, 0.4);
    border: 1px solid rgba(129, 140, 248, 0.22);
}
.mission-modal.mission-glass .mission-tab-btn {
    border: 1px solid transparent;
    background: transparent;
    color: #cbd5e1;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 12px;
}
.mission-modal.mission-glass .mission-tab-btn:hover {
    background: rgba(72, 86, 232, 0.15);
    color: #fff;
}
.mission-modal.mission-glass .mission-tab-btn.active {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
.mission-modal.mission-glass .mission-card {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.22);
    background: rgba(8, 10, 18, 0.4);
    box-shadow: none;
}
.mission-modal.mission-glass .mission-form-row select,
.mission-modal.mission-glass .mission-form-row input,
.mission-modal.mission-glass .mission-picker-trigger {
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: rgba(8, 10, 18, 0.5);
    border-radius: 12px;
}
.mission-modal.mission-glass .mission-picker.open .mission-picker-trigger,
.mission-modal.mission-glass .mission-form-row input:focus {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 2px rgba(72, 86, 232, 0.25);
}
.mission-modal.mission-glass .mission-picker-menu {
    background: rgba(12, 16, 32, 0.96);
    border: 1px solid rgba(129, 140, 248, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.mission-modal.mission-glass .mission-picker-option:hover {
    background: rgba(72, 86, 232, 0.22);
}
.mission-modal.mission-glass .user-friend-btn.pe-save-btn {
    background: var(--brand-grad) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.4);
}
.mission-modal.mission-glass .user-friend-btn.pe-save-btn:hover:not(:disabled) {
    filter: brightness(1.08);
}
.mission-modal.mission-glass .mission-hint,
.mission-modal.mission-glass .mission-card ul {
    color: rgba(203, 213, 225, 0.92);
}

#info.info-redesign .info-page.panel {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 14px 16px 20px;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.62), rgba(8, 10, 18, 0.48)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 24px rgba(72, 86, 232, 0.1);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
#info.info-redesign .info-page-head { margin-bottom: 12px; }
#info.info-redesign .info-title {
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-weight: 900;
    letter-spacing: 0.06em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#info.info-redesign .info-lead {
    max-width: none;
    color: rgba(203, 213, 225, 0.88);
}
#info.info-redesign .info-tabs {
    gap: 6px;
    margin: 0 0 14px;
    padding: 4px 6px;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.62)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
#info.info-redesign .info-tab {
    flex: 1 1 0;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
}
#info.info-redesign .info-tab:hover {
    background: rgba(72, 86, 232, 0.15);
    border-color: transparent;
}
#info.info-redesign .info-tab.active {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
#info.info-redesign .info-prose h2 {
    color: #67e8f9;
    border-bottom-color: rgba(129, 140, 248, 0.28);
}
#info.info-redesign .info-prose h3 { color: #a5b4fc; }
#info.info-redesign .info-subpanel {
    padding: 4px 2px;
}

#clans.clans-redesign {
    width: 100%;
    max-width: none;
}
#clans.clans-redesign .section-sticky-head {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 10px !important;
    padding: 8px 10px !important;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.62)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
}
#clans.clans-redesign .section-sticky-head h2 {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#clans.clans-redesign .clan-section-create-btn {
    border: none;
    background: var(--brand-grad);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.35);
}
#clans.clans-redesign .clans-page-root {
    max-width: none;
    width: 100%;
    gap: 12px;
}
#clans.clans-redesign .clan-card,
#clans.clans-redesign .clan-panel.clan-card {
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.58), rgba(8, 10, 18, 0.48)) padding-box,
        linear-gradient(115deg, rgba(34, 211, 238, 0.35), rgba(72, 86, 232, 0.4), rgba(139, 92, 246, 0.35)) border-box;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
}
#clans.clans-redesign .clan-panel {
    background: rgba(8, 10, 18, 0.28);
    border: 1px solid rgba(129, 140, 248, 0.18);
}
#clans.clans-redesign .clan-panel-title {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a5b4fc;
}
#clans.clans-redesign .clan-panel-title-ico {
    background: rgba(72, 86, 232, 0.2);
    border-color: rgba(34, 211, 238, 0.3);
}
#clans.clans-redesign .clan-hero-profile-btns .btn-clan-hero-white {
    background: var(--brand-grad);
    color: #fff;
    border: none;
    box-shadow: 0 0 18px rgba(72, 86, 232, 0.35);
}
#clans.clans-redesign .clan-hero-profile-btns .btn-clan-hero-white:hover {
    filter: brightness(1.08);
    background: var(--brand-grad);
    box-shadow: 0 0 24px rgba(72, 86, 232, 0.45);
}
#clans.clans-redesign .clan-kazna-plus,
#clans.clans-redesign .clan-kazna-minus {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(72, 86, 232, 0.35);
}
#clans.clans-redesign .clan-members-board.ratings-board,
#clans.clans-redesign .ratings-board {
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.5), rgba(8, 10, 18, 0.4)) padding-box,
        linear-gradient(115deg, rgba(34, 211, 238, 0.3), rgba(72, 86, 232, 0.35), rgba(139, 92, 246, 0.3)) border-box;
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
#clans.clans-redesign .rating-row {
    background: rgba(8, 10, 18, 0.35);
    border-color: rgba(129, 140, 248, 0.16);
}
#clans.clans-redesign .small-btn,
#clans.clans-redesign .btn-admin {
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(8, 10, 18, 0.4);
    color: #e2e8f0;
    border-radius: 10px;
}
#clans.clans-redesign .clan-members-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
#clans.clans-redesign .clan-members-panel-head .user-friend-btn.small {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
    border-radius: 10px;
    font-weight: 700;
}
#clans.clans-redesign .clan-members-panel-head .user-friend-btn.small:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(72, 86, 232, 0.2);
}
#clans.clans-redesign .clan-browse-table {
    border-collapse: separate;
    border-spacing: 0 6px;
}
#clans.clans-redesign .clan-browse-table thead th {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
    border-bottom: 1px solid rgba(129, 140, 248, 0.22);
    padding: 6px 10px;
}
#clans.clans-redesign .clan-browse-table tbody tr td {
    padding: 10px;
    background: rgba(8, 10, 18, 0.4);
    border-top: 1px solid rgba(129, 140, 248, 0.16);
    border-bottom: 1px solid rgba(129, 140, 248, 0.16);
}
#clans.clans-redesign .clan-browse-table tbody tr td:first-child {
    border-left: 1px solid rgba(129, 140, 248, 0.16);
    border-radius: 12px 0 0 12px;
}
#clans.clans-redesign .clan-browse-table tbody tr td:last-child {
    border-right: 1px solid rgba(129, 140, 248, 0.16);
    border-radius: 0 12px 12px 0;
}
#clans.clans-redesign .clan-browse-table tbody tr:hover td {
    background: rgba(72, 86, 232, 0.14);
    border-color: rgba(34, 211, 238, 0.28);
}
#clans.clans-redesign .clan-browse-ico,
#clans.clans-redesign .clan-browse-ico-ph {
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    box-shadow: 0 0 10px rgba(72, 86, 232, 0.15);
}
#clans.clans-redesign .clan-level-hint {
    color: rgba(203, 213, 225, 0.88);
}

/* Модалка «Все кланы» */
#clanBrowseModal.clan-browse-glass {
    background: rgba(5, 8, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#clanBrowseModal.clan-browse-glass .clan-browse-modal-card {
    width: min(920px, 96vw);
    max-width: min(920px, 96vw);
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.82), rgba(8, 10, 18, 0.76)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 28px rgba(72, 86, 232, 0.14);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
}
#clanBrowseModal.clan-browse-glass .profile-modal-head {
    flex-shrink: 0;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(129, 140, 248, 0.22);
}
#clanBrowseModal.clan-browse-glass .profile-modal-head h3 {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#clanBrowseModal.clan-browse-glass .user-friend-btn.small {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
    border-radius: 10px;
}
#clanBrowseModal.clan-browse-glass .user-friend-btn.small:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(72, 86, 232, 0.2);
}
#clanBrowseModal.clan-browse-glass .clan-level-hint {
    flex-shrink: 0;
    color: rgba(203, 213, 225, 0.88);
    font-size: 13px;
}
#clanBrowseModal.clan-browse-glass .clan-browse-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    padding-right: 4px;
}
#clanBrowseModal.clan-browse-glass .clan-browse-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}
#clanBrowseModal.clan-browse-glass .clan-browse-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
    background: rgba(12, 16, 32, 0.92);
    border-bottom: 1px solid rgba(129, 140, 248, 0.28);
    padding: 8px 10px;
    text-align: left;
}
#clanBrowseModal.clan-browse-glass .clan-browse-table tbody tr td {
    padding: 10px;
    background: rgba(8, 10, 18, 0.45);
    border-top: 1px solid rgba(129, 140, 248, 0.18);
    border-bottom: 1px solid rgba(129, 140, 248, 0.18);
    vertical-align: middle;
}
#clanBrowseModal.clan-browse-glass .clan-browse-table tbody tr td:first-child {
    border-left: 1px solid rgba(129, 140, 248, 0.18);
    border-radius: 12px 0 0 12px;
}
#clanBrowseModal.clan-browse-glass .clan-browse-table tbody tr td:last-child {
    border-right: 1px solid rgba(129, 140, 248, 0.18);
    border-radius: 0 12px 12px 0;
    color: rgba(148, 163, 184, 0.95);
    font-size: 12px;
}
#clanBrowseModal.clan-browse-glass .clan-browse-table tbody tr:hover td {
    background: rgba(72, 86, 232, 0.16);
    border-color: rgba(34, 211, 238, 0.3);
}
#clanBrowseModal.clan-browse-glass .clan-browse-ico,
#clanBrowseModal.clan-browse-glass .clan-browse-ico-ph {
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    box-shadow: 0 0 12px rgba(72, 86, 232, 0.18);
}
#clanBrowseModal.clan-browse-glass .user-friend-btn:not(.small) {
    background: var(--brand-grad);
    border: none;
    color: #fff;
    font-weight: 800;
    border-radius: 10px;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}

/* ===== Admin redesign: glass + brand ===== */
#admin.admin-redesign {
    width: 100%;
    max-width: none;
}
#admin.admin-redesign.active {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
}
.content-main-scroll:has(#admin.admin-redesign.active) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 4px;
}
.content-main-scroll:has(#admin.admin-redesign.active) > .content-top-sticky {
    flex-shrink: 0;
    margin-bottom: 4px;
}
.content:has(#admin.admin-redesign.active) > .site-footer {
    display: none !important;
}
#admin.admin-redesign .admin-page.panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px 12px 10px;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.62), rgba(8, 10, 18, 0.48)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 24px rgba(72, 86, 232, 0.1);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    overflow: hidden;
}
#admin.admin-redesign .admin-page-headline {
    flex-shrink: 0;
    margin: 0 0 6px;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#admin.admin-redesign #adminLead {
    display: none !important;
}
#admin.admin-redesign .admin-tab-bar {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 5px;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: rgba(8, 10, 18, 0.4);
    /* Узкий экран: короткий список вкладок, контент снизу/рядом не схлопывается */
    max-height: min(28vh, 220px) !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.85) rgba(8, 10, 18, 0.5);
    /* сбить sticky из базового @media — иначе overflow:hidden у панели режет меню */
    position: relative !important;
    top: auto !important;
}
#admin.admin-redesign .admin-tab-bar::-webkit-scrollbar {
    width: 8px;
}
#admin.admin-redesign .admin-tab-bar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22D3EE, #8B5CF6);
    border-radius: 999px;
}
#admin.admin-redesign .admin-tab-bar::-webkit-scrollbar-track {
    background: rgba(8, 10, 18, 0.5);
    border-radius: 999px;
}
#admin.admin-redesign .admin-tab-btn {
    flex: 0 0 auto !important;
    width: 100%;
    text-align: left;
    white-space: normal;
    padding: 5px 8px;
    font-size: 11.5px;
    line-height: 1.2;
    border: 1px solid transparent;
    background: transparent;
    color: #cbd5e1;
    border-radius: 8px;
    font-weight: 700;
}
#admin.admin-redesign .admin-tab-btn:hover {
    background: rgba(72, 86, 232, 0.15);
    color: #fff;
}
#admin.admin-redesign .admin-tab-btn[aria-selected="true"] {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
#admin.admin-redesign #adminTabMount {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#admin.admin-redesign #adminTabMount > .admin-tabpanel.is-active {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    margin-top: 0;
}
#admin.admin-redesign #adminTabMount > .admin-tabpanel.is-active:has(.admin-info-editor) {
    overflow: hidden;
}
#admin.admin-redesign .admin-info-editor {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 8px 10px 10px;
    overflow: hidden;
}
#admin.admin-redesign .admin-info-editor .info-page-head {
    flex-shrink: 0;
    margin: 0 0 6px;
    text-align: left;
}
#admin.admin-redesign .admin-info-editor .info-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#admin.admin-redesign .admin-info-editor .info-lead,
#admin.admin-redesign .admin-info-editor > .admin-hint {
    display: none !important;
}
#admin.admin-redesign .admin-info-media-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    flex-shrink: 0;
    margin: 0 0 8px;
    padding: 6px 8px;
}
#admin.admin-redesign .admin-info-media-bar .pe-save-btn {
    margin-left: auto;
}
#admin.admin-redesign .admin-info-editor .admin-info-live-editable,
#admin.admin-redesign .admin-info-editor .admin-info-preview-box {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}
#admin.admin-redesign .admin-info-editor > p:has(.pe-save-btn) {
    flex-shrink: 0;
    margin: 8px 0 0 !important;
}
#admin.admin-redesign .admin-tab-btn {
    border: 1px solid transparent;
    background: transparent;
    color: #cbd5e1;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
}
#admin.admin-redesign .admin-tab-btn:hover {
    background: rgba(72, 86, 232, 0.15);
    color: #fff;
}
#admin.admin-redesign .admin-tab-btn[aria-selected="true"] {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
#admin.admin-redesign .admin-subtab-bar {
    gap: 6px;
    margin: 0 0 12px;
    padding: 4px 6px 8px;
    border-bottom: 1px solid rgba(129, 140, 248, 0.22);
}
#admin.admin-redesign .admin-subtab-btn {
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: rgba(8, 10, 18, 0.4);
    color: #cbd5e1;
    border-radius: 10px;
}
#admin.admin-redesign .admin-subtab-btn:hover {
    background: rgba(72, 86, 232, 0.15);
}
#admin.admin-redesign .admin-subtab-btn[aria-selected="true"] {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 12px rgba(72, 86, 232, 0.3);
}
#admin.admin-redesign .admin-tab-title,
#admin.admin-redesign .admin-subtab-heading {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
}
#admin.admin-redesign .btn-admin,
#admin.admin-redesign .admin-user-bar button,
#admin.admin-redesign .admin-panel-actions button {
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
    border-radius: 10px;
    font-weight: 700;
}
#admin.admin-redesign .btn-admin:hover,
#admin.admin-redesign .admin-user-bar button:hover,
#admin.admin-redesign .admin-panel-actions button:hover {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(72, 86, 232, 0.22);
}
#admin.admin-redesign .admin-user-search .btn-admin,
#admin.admin-redesign .btn-admin.is-primary,
#admin.admin-redesign .btn-admin.primary {
    border: none;
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
#admin.admin-redesign .admin-user-search .btn-admin:hover {
    filter: brightness(1.08);
    background: var(--brand-grad);
}
#admin.admin-redesign .admin-user-search {
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.55), rgba(8, 10, 18, 0.45)) padding-box,
        linear-gradient(115deg, rgba(34, 211, 238, 0.35), rgba(72, 86, 232, 0.4), rgba(139, 92, 246, 0.35)) border-box;
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#admin.admin-redesign .admin-user-search input,
#admin.admin-redesign .admin-user-bar input,
#admin.admin-redesign .admin-quickops-row select,
#admin.admin-redesign .admin-quickops-row input,
#admin.admin-redesign .admin-block input,
#admin.admin-redesign .admin-block select,
#admin.admin-redesign .admin-block textarea {
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.5);
    color: #e2e8f0;
    border-radius: 10px;
}
#admin.admin-redesign .admin-user-search input:focus {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 2px rgba(72, 86, 232, 0.25);
}
#admin.admin-redesign .admin-scope-toggle {
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.55);
}
#admin.admin-redesign .admin-scope-btn {
    color: rgba(203, 213, 225, 0.8);
}
#admin.admin-redesign .admin-scope-btn:hover {
    background: rgba(72, 86, 232, 0.18);
    color: #fff;
}
#admin.admin-redesign .admin-scope-btn.is-active {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 0 10px rgba(72, 86, 232, 0.3);
}
#admin.admin-redesign .admin-block,
#admin.admin-redesign .admin-kpi,
#admin.admin-redesign .admin-quickops,
#admin.admin-redesign .admin-summary-popup,
#admin.admin-redesign .admin-info-preview-box {
    border: 1px solid rgba(129, 140, 248, 0.22);
    background: rgba(8, 10, 18, 0.4);
    border-radius: 14px;
    box-shadow: inset 0 0 20px rgba(72, 86, 232, 0.05);
}
#admin.admin-redesign .admin-block h3 {
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
#admin.admin-redesign .admin-kpi-plus {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(72, 86, 232, 0.35);
}
#admin.admin-redesign .admin-summary-linkbtn {
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
}
#admin.admin-redesign .admin-summary-linkbtn:hover {
    background: rgba(72, 86, 232, 0.22);
    border-color: rgba(34, 211, 238, 0.45);
}
#admin.admin-redesign .admin-users-board,
#admin.admin-redesign .ratings-board {
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.5), rgba(8, 10, 18, 0.4)) padding-box,
        linear-gradient(115deg, rgba(34, 211, 238, 0.3), rgba(72, 86, 232, 0.35), rgba(139, 92, 246, 0.3)) border-box;
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
#admin.admin-redesign .rating-row,
#admin.admin-redesign .admin-users-board .rating-row {
    background: rgba(8, 10, 18, 0.35);
    border-color: rgba(129, 140, 248, 0.16);
}
#admin.admin-redesign .user-friend-btn.small {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
    border-radius: 10px;
}
#admin.admin-redesign .user-friend-btn.small:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(72, 86, 232, 0.2);
}
#admin.admin-redesign .admin-hint {
    color: rgba(203, 213, 225, 0.85);
}
#admin.admin-redesign .admin-copyable {
    color: #67e8f9;
}
#admin.admin-redesign .info-page.panel,
#admin.admin-redesign .admin-info-editor {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid transparent;
    border-radius: 16px;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.58)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 24px rgba(72, 86, 232, 0.12);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
#admin.admin-redesign #adminTabMount > .admin-tabpanel.is-active:has(.admin-info-editor) {
    width: 100%;
    max-width: none;
    min-width: 0;
}
#admin.admin-redesign .admin-info-media-bar {
    border: 1px solid rgba(129, 140, 248, 0.28);
    border-radius: 12px;
    background: rgba(8, 10, 18, 0.45);
}
#admin.admin-redesign .admin-info-editor .admin-info-live-editable,
#admin.admin-redesign .admin-info-editor .admin-info-preview-box {
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 12px;
    background: rgba(8, 10, 18, 0.4);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.06);
}
#admin.admin-redesign .admin-info-editor .pe-save-btn {
    background: var(--brand-grad) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 0 16px rgba(72, 86, 232, 0.35);
}
#admin.admin-redesign #admin-panel-roulette.is-active,
#admin.admin-redesign #admin-panel-shop.is-active,
#admin.admin-redesign #admin-panel-promo.is-active,
#admin.admin-redesign #admin-panel-finance.is-active {
    width: 100%;
    max-width: none;
    gap: 10px;
}
#admin.admin-redesign #admin-panel-roulette .admin-block,
#admin.admin-redesign #admin-panel-shop .admin-block,
#admin.admin-redesign #admin-panel-promo .admin-block {
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: rgba(8, 10, 18, 0.4);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
#admin.admin-redesign #admin-panel-roulette .admin-tab-title,
#admin.admin-redesign #admin-panel-shop .admin-tab-title,
#admin.admin-redesign #admin-panel-promo .admin-tab-title {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-weight: 900;
    letter-spacing: 0.04em;
}
#admin.admin-redesign #admin-panel-roulette .admin-block input,
#admin.admin-redesign #admin-panel-roulette .admin-block select,
#admin.admin-redesign #admin-panel-roulette .admin-block textarea,
#admin.admin-redesign #admin-panel-shop .admin-block input,
#admin.admin-redesign #admin-panel-shop .admin-block select,
#admin.admin-redesign #admin-panel-promo .admin-block input,
#admin.admin-redesign #admin-panel-promo .admin-block select {
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.55);
    border-radius: 10px;
    color: #e8eef8;
}
#admin.admin-redesign #adminRouletteListBody .admin-roulette-row {
    border-bottom: 1px solid rgba(129, 140, 248, 0.12);
}
#admin.admin-redesign #admin-panel-roulette .admin-roulette-head {
    background: rgba(8, 10, 18, 0.75);
    border-bottom: 1px solid rgba(129, 140, 248, 0.25);
    color: #a5b4fc;
}
@media (min-width: 960px) {
    #admin.admin-redesign .admin-page.panel {
        display: grid;
        grid-template-columns: 188px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas:
            "title title"
            "tabs content";
        gap: 6px 10px;
        align-items: stretch;
        height: 100%;
        max-height: 100%;
        min-height: 0;
        overflow: hidden;
    }
    #admin.admin-redesign .admin-page-headline {
        grid-area: title;
    }
    #admin.admin-redesign .admin-tab-bar {
        grid-area: tabs;
        align-self: stretch;
        justify-self: stretch;
        width: 100%;
        box-sizing: border-box;
        /* высота = ячейка грида (не viewport) — иначе панель режет низ без скролла */
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        position: relative !important;
        top: auto !important;
    }
    #admin.admin-redesign #adminTabMount {
        grid-area: content;
        height: 100%;
        max-height: 100%;
        min-height: 0;
        overflow: hidden;
    }
}

/* ===== Admin compact: модалки + панели без лишних скроллов ===== */
.clan-admin-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr);
    gap: 10px 12px;
    align-items: start;
}
.clan-admin-modal-section--wide { grid-column: 1 / -1; }
.clan-admin-fields-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}
.clan-admin-modal-section {
    margin-bottom: 0;
    padding: 10px 12px;
    border-bottom: none;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.2);
    background: rgba(8, 10, 18, 0.35);
}
.clan-admin-modal-section h4 {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
}
.clan-admin-modal-section .profile-field {
    margin: 0 0 6px;
}
.clan-admin-modal-section .profile-field label {
    font-size: 11px;
    margin-bottom: 3px;
    opacity: 0.85;
}
.clan-admin-modal-section .profile-field input,
.clan-admin-modal-section .profile-field select {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 13px;
}
.clan-admin-meta-line {
    margin: 6px 0 0 !important;
    font-size: 12px;
}
.admin-clan-members-table th,
.admin-clan-members-table td {
    padding: 6px 8px;
    font-size: 13px;
}
.admin-clan-manage-card,
.admin-event-edit-card {
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.9), rgba(8, 10, 18, 0.88)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 28px rgba(72, 86, 232, 0.14);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
}
.admin-clan-manage-card .profile-modal-head h3,
.admin-event-edit-card .profile-modal-head h3 {
    font-size: 1rem;
}
.admin-event-block {
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    border-color: rgba(129, 140, 248, 0.22);
    background: rgba(8, 10, 18, 0.35);
}
.admin-event-block h4 {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
}
.admin-event-edit-card .profile-field {
    margin-bottom: 6px;
}
.admin-event-edit-card .profile-field label {
    font-size: 11px;
    margin-bottom: 3px;
}
.admin-event-edit-card textarea {
    min-height: 72px;
    max-height: 120px;
}
@media (max-width: 900px) {
    .clan-admin-modal-grid { grid-template-columns: 1fr; }
    .clan-admin-fields-2 { grid-template-columns: 1fr; }
}

#admin.admin-redesign .admin-tab-title {
    margin: 0 0 4px;
    font-size: 11px;
}
#admin.admin-redesign .admin-subhead {
    display: none;
}
#admin.admin-redesign #admin-panel-player.is-active {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 100%;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
#admin.admin-redesign #admin-panel-player .admin-tab-title,
#admin.admin-redesign #admin-panel-player .admin-user-bar {
    flex-shrink: 0;
    margin-bottom: 8px;
}
#admin.admin-redesign #adminUserDetail.admin-player-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0 !important;
    overflow: hidden;
}
#admin.admin-redesign .admin-player-overview-split {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    align-items: stretch;
    overflow: hidden;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.55fr);
}
#admin.admin-redesign .admin-player-overview-left,
#admin.admin-redesign .admin-player-overview-right {
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* Левый обзор — свой внутренний скролл при необходимости */
#admin.admin-redesign .admin-player-overview-left {
    overflow-x: hidden;
    overflow-y: auto;
}
/* Правая вкладка — единственный основной скролл контента */
#admin.admin-redesign .admin-player-overview-right {
    overflow: hidden;
}
#admin.admin-redesign .admin-player-overview-left .admin-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
#admin.admin-redesign .admin-kpi {
    padding: 8px 10px;
}
#admin.admin-redesign .admin-kpi .k-value {
    font-size: 15px;
}
#admin.admin-redesign .admin-player-sub-mount,
#admin.admin-redesign .admin-player-overview-right .admin-subtabpanel.is-active {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#admin.admin-redesign .admin-player-overview-right .admin-block {
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#admin.admin-redesign #admin-panel-shop.is-active,
#admin.admin-redesign #admin-panel-roulette.is-active,
#admin.admin-redesign #admin-panel-promo.is-active {
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
}
#admin.admin-redesign #admin-panel-shop .admin-shop-table-wrap,
#admin.admin-redesign #admin-panel-roulette .admin-shop-table-wrap,
#admin.admin-redesign #admin-panel-promo .admin-shop-table-wrap {
    flex: 1 1 auto;
    min-height: 160px;
    max-height: none;
    overflow: auto !important;
}
#admin.admin-redesign .admin-player-overview-right .admin-block .admin-hint {
    display: none;
}
#admin.admin-redesign .admin-player-overview-right .admin-panel-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto !important;
    max-height: none !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.85) rgba(8, 10, 18, 0.45);
}
#admin.admin-redesign .admin-player-overview-right .admin-panel-scroll::-webkit-scrollbar {
    width: 8px;
}
#admin.admin-redesign .admin-player-overview-right .admin-panel-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22D3EE, #8B5CF6);
    border-radius: 999px;
}
#admin.admin-redesign .admin-player-overview-right .admin-panel-scroll::-webkit-scrollbar-track {
    background: rgba(8, 10, 18, 0.45);
    border-radius: 999px;
}
#admin.admin-redesign .admin-player-overview-right .admin-panel-footer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
/* Скролл правой вкладки: таблицы / списки / весь блок без admin-panel-scroll */
#admin.admin-redesign .admin-player-overview-right .admin-block > .admin-clan-members-table,
#admin.admin-redesign .admin-player-overview-right .admin-block > table,
#admin.admin-redesign .admin-player-overview-right .admin-block > .ratings-list,
#admin.admin-redesign .admin-player-overview-right .admin-block > .admin-achievements-list,
#admin.admin-redesign .admin-player-overview-right .admin-block > .admin-activity-list {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.85) rgba(8, 10, 18, 0.45);
}
#admin.admin-redesign .admin-player-overview-right .admin-block:not(:has(.admin-panel-scroll)):not(:has(> table)):not(:has(> .admin-clan-members-table)) {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.85) rgba(8, 10, 18, 0.45);
}
#admin.admin-redesign .admin-player-overview-right .admin-block > .admin-subtab-heading,
#admin.admin-redesign .admin-player-overview-right .admin-block > h3,
#admin.admin-redesign .admin-player-overview-right .admin-block > h4,
#admin.admin-redesign .admin-player-overview-right .admin-block > .admin-quickops-row,
#admin.admin-redesign .admin-player-overview-right .admin-block > .admin-panel-actions {
    flex-shrink: 0;
}
#admin.admin-redesign #admin-panel-shop .ratings-board,
#admin.admin-redesign #admin-panel-roulette .ratings-board,
#admin.admin-redesign #admin-panel-promo .ratings-board {
    min-width: 0 !important;
    overflow: visible;
}
#admin.admin-redesign #admin-panel-shop,
#admin.admin-redesign #admin-panel-roulette,
#admin.admin-redesign #admin-panel-promo {
    gap: 8px;
}
#admin.admin-redesign .admin-shop-add-grid {
    gap: 6px;
}
#admin.admin-redesign .admin-shop-add-grid input,
#admin.admin-redesign .admin-shop-add-grid select {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
}
#admin.admin-redesign .admin-block {
    padding: 10px 12px;
}
#admin.admin-redesign textarea.admin-text-block,
#admin.admin-redesign .admin-block textarea {
    min-height: 56px;
    max-height: 100px;
}
#admin.admin-redesign #admin-panel-roulette .admin-block textarea,
#admin.admin-redesign #admin-panel-roulette textarea {
    max-height: 72px;
    min-height: 48px;
}
@media (max-width: 1100px) {
    #admin.admin-redesign .admin-player-overview-split {
        grid-template-columns: 1fr;
    }
}

#events.events-redesign {
    width: 100%;
    max-width: none;
}
#events.events-redesign .section-sticky-head {
    width: 100%;
    max-width: none;
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.62)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
}
#events.events-redesign .section-sticky-head h2 {
    margin: 0;
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#events.events-redesign .events-page-root {
    max-width: none;
    width: 100%;
    gap: 12px;
}
#events.events-redesign .events-filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 0 10px;
    padding: 4px 6px;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.62)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
#events.events-redesign .events-filter-row .btn-admin {
    flex: 1 1 0;
    border: 1px solid transparent;
    background: transparent;
    color: #cbd5e1;
    border-radius: 10px;
    font-weight: 800;
    font-size: 12px;
    box-shadow: none;
}
#events.events-redesign .events-filter-row .btn-admin:hover {
    background: rgba(72, 86, 232, 0.15);
}
#events.events-redesign .events-filter-row .btn-admin.is-active {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
}
#events.events-redesign .events-card {
    border: 1px solid transparent;
    background:
        linear-gradient(135deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.6)) padding-box,
        linear-gradient(115deg, rgba(34, 211, 238, 0.4), rgba(72, 86, 232, 0.45), rgba(139, 92, 246, 0.4)) border-box;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
#events.events-redesign .events-card:hover {
    border-color: transparent;
    box-shadow: 0 14px 36px rgba(72, 86, 232, 0.22);
}
#events.events-redesign .events-public-list .admin-hint,
#events.events-redesign .events-public-list .events-empty,
#events.events-redesign .events-page-root > p {
    display: block;
    margin: 0;
    padding: 28px 18px;
    text-align: center;
    border-radius: 16px;
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: rgba(8, 10, 18, 0.4);
    color: rgba(203, 213, 225, 0.9);
    box-shadow: inset 0 0 24px rgba(72, 86, 232, 0.06);
}

#messages.messages-redesign {
    width: 100%;
    max-width: none;
}
#messages.messages-redesign > h2 {
    display: none;
}
#messages.messages-redesign.active {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}
.content-main-scroll:has(#messages.messages-redesign.active) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.content-main-scroll:has(#messages.messages-redesign.active) > .content-top-sticky {
    flex-shrink: 0;
}
.content-main-scroll:has(#messages.messages-redesign.active) > .site-footer {
    flex-shrink: 0;
    margin-top: 6px;
}
#messages.messages-redesign .messages-layout {
    flex: 1 1 auto;
    min-height: 0;
    gap: 10px;
    grid-template-columns: minmax(260px, 320px) 1fr;
}
#messages.messages-redesign .messages-list,
#messages.messages-redesign .messages-chat {
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.58), rgba(8, 10, 18, 0.48)) padding-box,
        linear-gradient(115deg, rgba(34, 211, 238, 0.35), rgba(72, 86, 232, 0.4), rgba(139, 92, 246, 0.35)) border-box;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
}
#messages.messages-redesign .messages-list h3 {
    margin: 0 0 10px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
#messages.messages-redesign .chat-row {
    background: rgba(8, 10, 18, 0.4);
    border: 1px solid rgba(129, 140, 248, 0.16);
    margin-bottom: 6px;
}
#messages.messages-redesign .chat-row:hover {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(72, 86, 232, 0.12);
}
#messages.messages-redesign .chat-row.active {
    background: rgba(72, 86, 232, 0.22);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 12px rgba(72, 86, 232, 0.2);
}
#messages.messages-redesign .chat-row.admin-row,
#messages.messages-redesign .chat-row.admin-row.active {
    border-color: rgba(244, 114, 182, 0.45);
    background: linear-gradient(90deg, rgba(244, 114, 182, 0.12), rgba(72, 86, 232, 0.12));
}
#messages.messages-redesign .chat-feed {
    background: rgba(8, 10, 18, 0.35);
    border: 1px solid rgba(129, 140, 248, 0.14);
    border-radius: 12px;
}
#messages.messages-redesign .chat-msg {
    max-width: min(72%, 520px);
    background: rgba(17, 21, 42, 0.72);
    border: 1px solid rgba(129, 140, 248, 0.22);
}
#messages.messages-redesign .chat-msg.mine {
    background: linear-gradient(135deg, rgba(72, 86, 232, 0.45), rgba(139, 92, 246, 0.4));
    border-color: rgba(34, 211, 238, 0.3);
}
#messages.messages-redesign .chat-compose input {
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(8, 10, 18, 0.5);
    border-radius: 12px;
}
#messages.messages-redesign .chat-compose input:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 2px rgba(72, 86, 232, 0.25);
}
#messages.messages-redesign .chat-compose button {
    border: none;
    border-radius: 12px;
    padding: 0 14px;
    background: var(--brand-grad);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.35);
    cursor: pointer;
}
#messages.messages-redesign .chat-delete-btn {
    background: rgba(8, 10, 18, 0.45);
    border: 1px solid rgba(129, 140, 248, 0.3);
}
#messages.messages-redesign #messagesChatHeader {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(129, 140, 248, 0.2);
}
#messages.messages-redesign .user-friend-btn.small {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(8, 10, 18, 0.45);
    color: #e2e8f0;
}
@media (max-width: 900px) {
    #messages.messages-redesign .messages-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== INFO: правила, лимиты, справка по кабинету ===== */
.info-page.panel {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 20px 28px;
}
.info-page-head { text-align: center; margin-bottom: 16px; }
.info-title { margin: 0 0 6px; font-size: 1.45rem; letter-spacing: 0.02em; }
.info-lead {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(180, 198, 220, 0.9);
    max-width: 52em;
    margin-left: auto;
    margin-right: auto;
}
.info-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 0 20px;
}
.info-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(18, 24, 34, 0.75);
    color: #dbe7f4;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.info-tab img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}
.info-tab:hover {
    background: rgba(32, 44, 60, 0.95);
    border-color: rgba(120, 190, 255, 0.35);
}
.info-tab.active {
    background: linear-gradient(135deg, rgba(110, 60, 160, 0.5) 0%, rgba(25, 100, 160, 0.55) 100%);
    border-color: rgba(150, 210, 255, 0.4);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.info-subpanel { }
.info-prose { font-size: 13.5px; line-height: 1.62; color: rgba(220, 232, 246, 0.95); }
.info-prose p { margin: 0 0 10px; }
.info-prose h2 {
    font-size: 1.1rem;
    color: #b0dcff;
    margin: 22px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.03em;
    text-transform: none;
}
.info-prose h3 { font-size: 0.98rem; color: #8ec8ff; margin: 16px 0 8px; }
.info-prose h4 { font-size: 0.9rem; color: rgba(230, 160, 160, 0.95); margin: 18px 0 8px; }
.info-prose h4.h-herb { color: rgba(150, 230, 160, 0.95); }
.info-prose h4.h-mix { color: rgba(200, 210, 150, 0.95); }
.info-prose .sub { color: rgba(200, 215, 235, 0.8); font-size: 0.9em; }
.info-prose ul { margin: 0 0 10px; padding-left: 20px; }
.info-prose li { margin-bottom: 6px; }
.info-prose .hl { color: #b8e86e; font-weight: 800; }
.info-prose kbd, .info-prose .key { color: #a8d4ff; font-weight: 700; }
.info-prose .twod-vplayer {
    margin: 14px 0 18px;
    width: 100%;
    max-width: 100%;
    clear: both;
    display: block;
}
.admin-info-media-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(40, 70, 110, 0.25);
    border: 1px solid rgba(120, 200, 255, 0.2);
}
.admin-info-media-bar .admin-info-media-hint {
    font-size: 12px;
    color: rgba(200, 220, 245, 0.75);
    margin-right: 4px;
}
.btn-info-media {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(120, 200, 255, 0.35);
    background: rgba(30, 55, 90, 0.55);
    color: #eaf4ff;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.btn-info-media:hover { background: rgba(45, 85, 130, 0.65); }
.admin-info-fmt-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(200, 220, 245, 0.8);
}
.admin-info-fmt-color {
    width: 32px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(120, 200, 255, 0.35);
    border-radius: 8px;
    background: rgba(20, 35, 55, 0.6);
    cursor: pointer;
}
.admin-info-fmt-font {
    min-width: 128px;
    max-width: 180px;
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid rgba(120, 200, 255, 0.35);
    background: rgba(30, 55, 90, 0.55);
    color: #eaf4ff;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.admin-info-fmt-font option { background: #1a2a3e; color: #eaf4ff; }
.twod-vplayer-admin-tools {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 12;
    display: flex;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}
.admin-info-live-editable .twod-vplayer-admin-tools {
    opacity: 1;
    pointer-events: auto;
}
.twod-vp-admin-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #fff;
    background: rgba(12, 22, 36, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.twod-vp-admin-btn:hover { background: rgba(40, 90, 150, 0.95); }
.twod-vp-admin-btn.twod-vp-del:hover { background: rgba(160, 40, 40, 0.95); }
.twod-vplayer-range-hint {
    font-size: 11px;
    color: rgba(180, 210, 240, 0.75);
    margin-left: 6px;
    white-space: nowrap;
}
.twod-vplayer-shell {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #0a121c;
    border: 1px solid rgba(120, 200, 255, 0.22);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.twod-vplayer-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: min(56vh, 520px);
    background: #000;
    overflow: hidden;
}
.twod-vplayer-poster,
.twod-vplayer-mount {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    max-height: none;
}
.twod-vplayer-poster {
    z-index: 1;
    background: #0d1520 center / cover no-repeat;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.twod-vplayer-poster.hidden { display: none; }
.twod-vplayer-play-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(20, 120, 200, 0.85);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
    position: relative;
}
.twod-vplayer-play-icon::after {
    content: "";
    position: absolute;
    left: 26px;
    top: 20px;
    border: 12px solid transparent;
    border-left: 18px solid #fff;
}
.twod-vplayer-mount {
    display: none;
    z-index: 2;
    background: #000;
}
.twod-vplayer-active .twod-vplayer-mount { display: block; }
.twod-vplayer-mount > div {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
.twod-vplayer-mount iframe,
.twod-vplayer-mount .twod-vp-video {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 108% !important;
    height: 118% !important;
    transform: translate(-50%, -50%);
    display: block;
    border: 0;
    object-fit: cover;
    background: #000;
}
.twod-vplayer-mount .twod-vp-video {
    width: 100% !important;
    height: 100% !important;
    transform: none;
    left: 0;
    top: 0;
}
.twod-vplayer-yt-chrome {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 6;
    pointer-events: none;
}
.twod-vplayer-active .twod-vplayer-yt-chrome { display: block; }
.twod-vplayer-yt-chrome-top {
    top: 0;
    height: 58px;
    background: linear-gradient(180deg, rgba(10, 18, 28, 0.97) 55%, rgba(10, 18, 28, 0));
}
.twod-vplayer-yt-chrome-bottom {
    bottom: 0;
    height: 62px;
    background: linear-gradient(0deg, rgba(10, 18, 28, 0.98) 50%, rgba(10, 18, 28, 0));
}
.twod-vplayer-yt-mask {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 3;
    background: transparent;
    pointer-events: auto;
}
.twod-vplayer-active .twod-vplayer-yt-mask { display: block; }
.twod-vplayer-bar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: linear-gradient(180deg, rgba(12, 22, 36, 0.95), rgba(8, 14, 24, 0.98));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.twod-vp-btn {
    width: 36px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(60, 120, 200, 0.35);
    color: #eaf4ff;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}
.twod-vp-btn:hover { background: rgba(70, 140, 220, 0.5); }
.twod-vp-seek {
    flex: 1;
    min-width: 60px;
    accent-color: #5eb8ff;
}
.twod-vp-time {
    font-size: 12px;
    color: rgba(210, 225, 245, 0.85);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.twod-media-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.twod-media-modal.hidden { display: none; }
.twod-media-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}
.twod-media-modal-card {
    position: relative;
    width: min(480px, 100%);
    padding: 18px 20px;
    border-radius: 14px;
    background: #121a28;
    border: 1px solid rgba(120, 200, 255, 0.25);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.twod-media-modal-card h3 { margin: 0 0 8px; color: #eaf4ff; font-size: 18px; }
.twod-media-modal-hint { margin: 0 0 14px; font-size: 13px; color: rgba(200, 215, 235, 0.8); }
.twod-media-field { display: block; margin-bottom: 10px; }
.twod-media-field span { display: block; font-size: 12px; color: rgba(180, 200, 230, 0.85); margin-bottom: 4px; }
.twod-media-field input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
    font: inherit;
    box-sizing: border-box;
}
.twod-media-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.twod-media-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.info-callout {
    background: rgba(90, 60, 120, 0.22);
    border: 1px solid rgba(180, 150, 240, 0.28);
    border-radius: 10px;
    padding: 12px 16px;
    margin: 14px 0;
    font-size: 0.95em;
}
.info-callout--omni {
    background: rgba(60, 100, 90, 0.2);
    border-color: rgba(130, 220, 180, 0.3);
}
.info-sat {
    background: linear-gradient(135deg, rgba(100, 40, 100, 0.35) 0%, rgba(50, 70, 120, 0.3) 100%);
    border: 1px solid rgba(200, 160, 255, 0.35);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: 0.95em;
    line-height: 1.55;
}
.info-sat .sat-title { font-size: 1.05em; font-weight: 800; color: #f0c8ff; margin: 0 0 8px; }
.info-limits-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) {
    .info-limits-grid--split { grid-template-columns: 1fr 1fr; }
}
.info-limit-block {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 0 0 4px;
}
.info-limit-block h4 { margin-top: 0; }
/* block (не flex): иначе Enter в contenteditable не создаёт новую строку */
.info-dino-line { display: block; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); padding: 4px 0; line-height: 1.45; }
.info-dino-line:last-child { border-bottom: 0; }
.dn { color: #f0b8b0; }
.dh { color: #a0e8b0; }
.do { color: #d8c090; }
.dim { color: #b0c0d0; }
.meta-note { font-size: 0.85em; color: rgba(200, 210, 220, 0.75); margin: 4px 0 0; }

/* ===== SITE FOOTER — одна узкая полоса ===== */
.site-footer {
    flex-shrink: 0;
    margin-top: 8px;
    margin-bottom: 2px;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    overflow: visible;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.72), rgba(8, 10, 18, 0.55)) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), 0 0 18px rgba(72, 86, 232, 0.1);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.site-footer-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    overflow: visible;
}
.site-footer-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: visible;
    opacity: 1;
    max-width: 100%;
    transition: opacity 0.18s ease, max-width 0.22s ease, flex 0.22s ease;
}
.site-footer.is-collapsed .site-footer-body {
    opacity: 0;
    max-width: 0;
    flex: 0 0 0;
    pointer-events: none;
    gap: 0;
    overflow: hidden;
}
.site-footer.is-collapsed .site-footer-toggle {
    margin-left: auto;
}
.site-footer-brand {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 220px;
    font-size: 11px;
    line-height: 1.2;
    color: rgba(203, 213, 225, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-footer-brand strong {
    font-weight: 800;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #22D3EE;
}
.site-footer-sep {
    width: 1px;
    height: 16px;
    flex-shrink: 0;
    background: rgba(129, 140, 248, 0.35);
}
.site-footer-heading { display: none; }
.site-footer-text { display: none; }
.site-footer-col { display: contents; }
.site-footer-grid {
    display: contents;
}
.site-footer-nav {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px 8px;
    min-width: 0;
}
.site-footer-nav--twocol,
.site-footer-nav--docs {
    display: inline-flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    max-width: none;
}
.site-footer-nav a {
    font-size: 11px;
    line-height: 1;
    color: rgba(165, 180, 252, 0.92);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 0;
    transition: color 0.15s ease;
}
.site-footer-nav a:hover {
    color: #67e8f9;
}
.site-footer-nav a + a::before {
    content: "·";
    margin-right: 8px;
    color: rgba(100, 116, 139, 0.9);
    pointer-events: none;
}
.site-footer-social {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
    overflow: visible;
    padding: 2px 1px;
}
.site-footer-col--social,
.site-footer-col--support {
    display: contents;
}
.site-footer-col--support .site-footer-social-btn.support-btn {
    margin: 0;
}

.site-footer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    box-sizing: border-box;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.75), rgba(8, 10, 18, 0.55)) padding-box,
        linear-gradient(135deg, rgba(34, 211, 238, 0.55), rgba(72, 86, 232, 0.55), rgba(139, 92, 246, 0.55)) border-box;
    border: 1px solid transparent;
    color: #e2e8f0;
    backdrop-filter: blur(10px) saturate(1.15);
    -webkit-backdrop-filter: blur(10px) saturate(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, filter 0.15s ease;
    position: relative;
}
.site-footer-social-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}
.site-footer-social-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 0 12px rgba(72, 86, 232, 0.45);
}
.site-footer-social-btn.news-btn {
    background:
        linear-gradient(165deg, rgba(8, 47, 73, 0.65), rgba(8, 10, 18, 0.55)) padding-box,
        linear-gradient(135deg, #22D3EE, #4856E8) border-box;
}
.site-footer-social-btn.discord-btn {
    color: #fff;
    background:
        linear-gradient(165deg, rgba(88, 101, 242, 0.45), rgba(8, 10, 18, 0.55)) padding-box,
        linear-gradient(135deg, #7289da, #5865F2) border-box;
}
.site-footer-social-btn.support-btn {
    background:
        linear-gradient(165deg, rgba(76, 29, 149, 0.5), rgba(8, 10, 18, 0.55)) padding-box,
        linear-gradient(135deg, #f97316, #d946ef, #8B5CF6) border-box;
}
.site-footer-social-btn.news-btn svg,
.site-footer-social-btn.discord-btn svg,
.site-footer-social-btn.support-btn svg {
    width: 14px;
    height: 14px;
}
.site-footer-social-btn.news-btn.has-unread::after,
.site-footer-social-btn.support-btn.has-unread::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(8, 14, 24, 0.95);
}

.site-footer-hint { display: none; }

.site-footer-toggle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0;
    color: #67e8f9;
    background:
        linear-gradient(165deg, rgba(17, 21, 42, 0.75), rgba(8, 10, 18, 0.55)) padding-box,
        linear-gradient(135deg, rgba(34, 211, 238, 0.55), rgba(72, 86, 232, 0.55), rgba(139, 92, 246, 0.55)) border-box;
    border: 1px solid transparent;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.site-footer-toggle:hover {
    color: #fff;
    filter: none;
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(72, 86, 232, 0.4);
}
.site-footer-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.site-footer-toggle-chevron {
    display: inline-flex;
    font-size: 12px;
    line-height: 1;
    transition: transform 0.2s ease;
}
.site-footer.is-collapsed .site-footer-toggle-chevron {
    transform: rotate(180deg);
}
.site-footer.is-collapsed {
    padding: 5px 8px;
}

@media (max-width: 1100px) {
    .site-footer-brand { display: none; }
}
@media (max-width: 900px) {
    .site-footer {
        border-radius: 16px;
        padding: 6px 8px;
    }
    .site-footer-bar {
        flex-wrap: wrap;
    }
    .site-footer-body {
        flex-wrap: wrap;
        row-gap: 6px;
    }
    .site-footer-nav {
        flex-wrap: wrap;
    }
    .site-footer-social {
        margin-left: 0;
    }
}

.site-footer-pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 17px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: rgba(8, 10, 18, 0.45);
    border: 1px solid rgba(129, 140, 248, 0.22);
    color: rgba(230, 236, 244, 0.88);
}

.site-footer-pay-visa {
    font-family: Arial, sans-serif;
    color: #b8d4ff;
}

.site-footer-pay-mc {
    display: inline-flex;
    gap: 4px;
    padding: 0 10px;
}

.site-footer-pay-mc .mc {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #eb001b;
}

.site-footer-pay-mc .mc:last-child {
    background: #f79e1b;
    margin-left: -8px;
}

.site-footer-pay-mir {
    font-weight: 700;
    color: #9ee5c6;
}

.site-footer-pay-pp {
    font-family: Arial, sans-serif;
    color: #9ec9ff;
}

/* ===== MOBILE / TABLET ADAPTIVE LAYER ===== */
@media (max-width: 1024px) {
    body {
        overflow: auto;
        background-attachment: scroll;
    }
    body.auth-login {
        overflow: hidden;
        height: var(--app-vh);
        max-height: var(--app-vh);
    }
    .login-box {
        margin-top: 0;
        width: 100%;
    }
    .btn {
        font-size: 22px;
        padding: 12px 14px;
    }
    .login-box .btn {
        font-size: 15px;
        padding: 12px 14px;
    }
    .container {
        flex-direction: column;
        min-height: var(--app-vh);
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .sidebar,
    .sidebar:hover {
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 10px 12px;
        overflow: visible;
    }
    .sidebar-main {
        overflow: visible;
    }
    .logo {
        margin-bottom: 10px;
    }
    .logo .logo-text,
    .menu .label {
        opacity: 1;
        width: auto;
    }
    .menu {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .menu button {
        flex: 0 0 auto;
        min-width: max-content;
        margin-bottom: 0;
    }
    .sidebar-deco-dino,
    .sidebar-footer-copy,
    .sidebar-footer-pay {
        display: none !important;
    }
    .sidebar-footer-card {
        padding: 6px;
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .sidebar-footer {
        display: block;
        margin-top: 8px;
        padding: 6px 0 0;
        border-top: 1px solid rgba(129, 140, 248, 0.22);
    }
    .sidebar .lang-current-badge {
        display: none;
    }
    .sidebar .lang-switch {
        display: inline-flex;
    }
    .sidebar-footer .lang-switch {
        margin: 0 auto 2px;
    }
    .content {
        min-height: 0;
        height: auto;
        max-height: none;
        padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)) 12px;
    }
    .content-main-scroll {
        overflow: visible;
        padding-bottom: 0;
    }
    .content-top-sticky {
        position: static;
        box-shadow: none;
    }
    .topbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }
    .topbar-ticker {
        flex: 1 1 100%;
        order: -1;
        margin: 0;
        min-width: 0;
    }
    .topbar-right {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px;
    }
    /* Quest popup: stable mobile overlay above content */
    #questPanel.notify-panel.quest-panel-host {
        position: fixed;
        left: 12px;
        right: 12px;
        top: calc(env(safe-area-inset-top, 0px) + 108px);
        width: auto;
        max-width: none;
        max-height: min(62vh, calc(var(--app-vh) - 150px));
        z-index: 12060;
    }
    /* Notifications popup: keep above all mobile UI layers */
    #notificationsPanel.notify-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        top: calc(env(safe-area-inset-top, 0px) + 108px);
        width: auto;
        max-width: none;
        max-height: min(62vh, calc(var(--app-vh) - 150px));
        z-index: 12070;
    }
    .shop-filter,
    .inventory-filter,
    .ratings-filter {
        width: 100%;
        justify-content: flex-start;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
        padding: 10px;
        border-radius: 14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ratings-filter button {
        flex: 0 0 auto;
    }
    #dinos.section.active,
    #ratings.active,
    #users.active {
        min-height: 0;
        max-height: none;
        overflow: visible;
    }
    .dinos-board {
        min-height: 0;
        height: auto;
        overflow: visible;
    }
    .dinos-active-fixed {
        position: static;
        top: auto;
        padding: 0;
        background: transparent;
    }
    .dinos-slots-scroll,
    #activeDinoInfo {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
    .kill-fab {
        position: static;
        display: inline-flex;
        margin: 0 0 10px auto;
    }
    .actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .actions button {
        width: 100%;
        margin: 0;
    }
    #messages.active {
        min-height: 0;
        max-height: none;
        overflow: visible;
    }
    .messages-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .messages-list {
        max-height: min(46vh, 420px);
    }
    .messages-chat {
        min-height: 42vh;
    }
    .purchase-modal {
        align-items: flex-start;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 10px calc(10px + env(safe-area-inset-bottom, 0px));
    }
    .purchase-card {
        width: 100%;
        max-width: 100%;
        max-height: calc(var(--app-vh) - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        padding: 12px;
        border-radius: 12px;
    }
    .mutation-box {
        max-height: min(44vh, 380px);
        padding: 6px;
    }
    .mutation-board {
        border-radius: 9px;
    }
    .mutation-head {
        font-size: 15px;
        padding: 6px 8px;
    }
    .mutation-row {
        padding: 7px;
    }
    .mutation-combo-btn {
        min-height: 36px;
        font-size: 15px;
    }
    .mutation-combo-q {
        font-size: 15px;
        min-height: 36px;
    }
    .mutation-combo-opts {
        max-height: 180px;
    }
    .purchase-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
        gap: 10px;
        margin-top: 12px;
    }
    #purchasePricingPreview {
        grid-column: 1 / -1;
        width: 100% !important;
        margin-bottom: 0 !important;
        font-size: 0.92em;
        line-height: 1.25;
    }
    .purchase-actions button {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 10px 12px;
    }
    /* Profile: force phone-friendly single column layout */
    .profile-right {
        padding: 10px;
    }
    .profile-top {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }
    .profile-top-center {
        width: 100%;
        order: 2;
    }
    .profile-privacy-wrap {
        margin-left: 0;
        width: 100%;
        order: 3;
        align-items: flex-start;
    }
    .profile-privacy-hint {
        max-width: 100%;
        text-align: left;
    }
    .about-card {
        margin-left: 0;
        padding: 14px;
    }
    .profile-widgets {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .widget {
        min-width: 0;
        padding: 14px;
    }
    .level-box {
        align-items: flex-start;
    }
    .profile-quest-widget-inner .quest-card {
        padding: 12px;
    }
    .ratings-board {
        overflow: hidden;
    }
    .ratings-head,
    .rating-row,
    .users-head,
    #usersRows .rating-row {
        grid-template-columns: 56px minmax(0, 1fr) 76px 1fr !important;
        gap: 8px;
        padding: 10px 12px;
    }
    /* Пользователи / Рейтинг: не схлопывать в 4 колонки — горизонтальный скролл */
    #users .ratings-board,
    #ratings .ratings-board {
        overflow-x: auto;
    }
    #users .ratings-board .users-head,
    #users #usersRows .rating-row {
        grid-template-columns: 56px minmax(140px, 1.3fr) 64px 110px 110px 48px minmax(160px, 200px) !important;
        min-width: 760px;
    }
    #ratings .ratings-board > .ratings-head,
    #ratings #ratingsRows .rating-row {
        grid-template-columns: 56px minmax(140px, 1.3fr) 64px minmax(100px, 1fr) 96px 48px !important;
        min-width: 700px;
    }
    #ratings .ratings-board.alltime-no-prize > .ratings-head,
    #ratings .ratings-board.alltime-no-prize #ratingsRows .rating-row {
        grid-template-columns: 56px minmax(140px, 1.3fr) 64px minmax(320px, 2fr) 48px !important;
        min-width: 720px;
    }
    #ratings .ratings-board.clan-wars-rating > .ratings-head,
    #ratings .ratings-board.clan-wars-rating #ratingsRows .rating-row {
        grid-template-columns: 56px minmax(140px, 1.3fr) 72px minmax(320px, 2.2fr) minmax(110px, 1fr) !important;
        min-width: 820px;
    }
    .rating-clanwars-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }
    /* Админ: магазин / рулетка / промо — не схлопывать в 4 колонки */
    #admin-panel-shop .ratings-board,
    #admin-panel-roulette .ratings-board,
    #admin-panel-promo .ratings-board,
    #admin-panel-test-login .ratings-board,
    #admin-panel-referrals .ratings-board {
        overflow-x: auto;
    }
    #admin-panel-shop .admin-shop-head,
    #admin-panel-shop #adminShopListBody .admin-shop-row {
        grid-template-columns: minmax(100px, 0.9fr) minmax(0, 1.4fr) 64px 72px minmax(140px, auto) !important;
        min-width: 0;
    }
    #admin-panel-roulette .admin-roulette-head,
    #admin-panel-roulette #adminRouletteListBody .admin-roulette-row {
        grid-template-columns: 48px minmax(0, 1.4fr) 56px 40px minmax(132px, auto) !important;
        min-width: 0;
    }
    #admin-panel-users .admin-users-board .admin-users-head,
    #admin-panel-users .admin-users-board #adminUsersListBody .rating-row {
        grid-template-columns: 56px minmax(120px, 1.4fr) 56px minmax(88px, 1fr) minmax(88px, 1fr) 96px !important;
    }
    /* Участники клана: на мобиле тоже без жёсткого min-width 900px — кнопки переносятся */
    .clan-members-board.ratings-board {
        overflow-x: auto;
    }
    .clan-members-board.ratings-board .ratings-head.users-head,
    .clan-members-board.ratings-board .rating-row {
        min-width: 0;
        grid-template-columns: 40px minmax(100px, 1.2fr) 0 100px 90px 44px minmax(160px, 1fr) !important;
        gap: 8px;
        padding: 10px 12px;
    }
    .clan-members-board.ratings-board .ratings-head.users-head > :nth-child(3),
    .clan-members-board.ratings-board .rating-row > :nth-child(3) {
        display: none;
    }
    .clan-members-board .clan-member-actions {
        gap: 6px;
    }
    .clan-members-board .rating-prize {
        min-width: 0;
    }
    .rating-score,
    .rating-prize {
        text-align: left;
    }
    .rating-alltime-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        justify-content: stretch;
        width: 100%;
    }
    .rating-alltime-strip .rating-alltime-metric:first-child {
        grid-column: 1 / -1;
    }
    .rating-alltime-metric {
        min-width: 0;
        justify-content: flex-start;
        font-size: 0.88rem;
        padding: 7px 10px;
    }
    .rating-alltime-metric img {
        width: 17px;
        height: 17px;
    }
    .purchase-grid,
    .mutation-grid,
    .about-grid,
    .support-layout,
    .admin-finance-layout,
    .admin-detail-kv,
    .admin-player-overview-split,
    .admin-shop-add-grid {
        grid-template-columns: 1fr !important;
    }
    .cards,
    .admin-cols2,
    .admin-player-grid {
        grid-template-columns: 1fr !important;
    }
    .mission-modal-card,
    .profile-modal-card,
    .support-modal-card,
    .support-chat-modal-card,
    .support-action-modal-card,
    .map-modal-card,
    .admin-detail-modal-card,
    .admin-notify-modal-card,
    .stillness-confirm-modal-card {
        width: min(96vw, 760px);
        max-width: 96vw;
        max-height: 86vh;
        overflow: auto;
    }
    .profile-modal-card.clan-members-list-modal-card,
    .profile-modal-card.admin-clan-manage-card {
        width: min(1240px, calc(100vw - 16px)) !important;
        max-width: calc(100vw - 16px) !important;
        max-height: min(92vh, 900px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    table,
    .admin-user-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .purchase-card {
        padding: 10px;
        border-radius: 11px;
    }
    .purchase-grid {
        gap: 8px;
    }
    .purchase-field label {
        margin-bottom: 4px;
        font-size: 13px;
    }
    .mutation-box {
        max-height: min(41vh, 320px);
    }
    .mutation-head {
        font-size: 14px;
    }
    .mutation-desc {
        font-size: 11px;
        line-height: 1.2;
    }
    .purchase-actions {
        grid-template-columns: minmax(0, 1fr);
    }
    .purchase-actions button {
        min-height: 42px;
        font-size: 16px;
    }
    .messages-list,
    .messages-chat {
        padding: 10px;
    }
    .chat-msg {
        max-width: 88%;
    }
    .chat-compose {
        flex-wrap: wrap;
    }
    .chat-compose button {
        width: 100%;
    }
    .profile-top .nick {
        font-size: 24px;
        line-height: 1.15;
    }
    .widget h3 {
        margin-bottom: 8px;
    }
    .widget .small-btn {
        width: 100%;
    }
    #profileAchievementsSummary {
        line-height: 1.3;
        word-break: break-word;
    }
    .ratings-head,
    .users-head {
        display: none;
    }
    .rating-row,
    #usersRows .rating-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px;
    }
    .rating-ach-col {
        align-self: flex-end;
    }
    .active-slot h4 {
        font-size: 19px;
        line-height: 1.2;
    }
    .buy-slot .plus {
        font-size: 44px;
    }
    .btn {
        font-size: 18px;
    }
    .menu button {
        padding: 9px 10px;
    }
    .balance-btn {
        padding: 7px 10px;
        font-size: 13px;
    }
    .shop-filter button,
    .inventory-filter button,
    .ratings-filter button {
        padding: 10px 14px;
        font-size: 14px;
    }
}

.clan-tag-prefix {
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-right: 2px;
}
.shop-clan-hint {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(217, 70, 239, 0.12);
    border: 1px solid rgba(217, 70, 239, 0.35);
    font-size: 14px;
}
.clan-purchase-hint {
    color: #e9d5ff;
}
.clans-page-root {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: min(1380px, calc(100vw - 24px));
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
.events-page-root {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: min(1100px, calc(100vw - 24px));
}
.events-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.events-filter-row .btn-admin.is-active,
#adminEventsFilterBar .btn-admin.is-active {
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.55);
}
.events-public-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.events-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(135deg, rgba(24, 28, 38, 0.98), rgba(18, 22, 32, 0.99));
    border-radius: 18px;
    border: 1px solid rgba(129, 140, 248, 0.22);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    width: 100%;
    color: inherit;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
}
.events-card:hover {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 16px 48px rgba(56, 189, 248, 0.12);
    transform: translateY(-2px);
}
.events-card-visual {
    flex: 0 0 clamp(108px, 28vw, 168px);
    min-height: 132px;
    background: radial-gradient(ellipse at 30% 20%, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(ellipse at 80% 90%, rgba(217, 70, 239, 0.1), transparent 50%),
        linear-gradient(160deg, #0f1419, #1a1f2e);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.events-card-visual img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    display: block;
}
.events-card-ph {
    width: 100%;
    height: 100%;
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0.35;
}
.events-card-body {
    flex: 1;
    min-width: 0;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.events-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 12px;
}
.events-card-title { font-weight: 800; font-size: 1.12rem; margin: 0; line-height: 1.25; letter-spacing: 0.01em; }
.events-card-meta { font-size: 0.84rem; opacity: 0.82; line-height: 1.4; margin: 0; }
.events-card-desc {
    font-size: 0.88rem;
    line-height: 1.45;
    opacity: 0.9;
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.events-card-desc--muted {
    opacity: 0.55;
    font-style: italic;
}
.events-card-status {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.65);
}
.events-card-status--recruiting { color: #7dd3fc; border-color: rgba(56, 189, 248, 0.45); }
.events-card-status--active { color: #86efac; border-color: rgba(34, 197, 94, 0.45); }
.events-card-status--planned,
.events-card-status--draft { color: #fde68a; border-color: rgba(234, 179, 8, 0.35); }
.events-card-status--finished { color: #cbd5e1; border-color: rgba(148, 163, 184, 0.35); }
@media (max-width: 520px) {
    .events-card { flex-direction: column; }
    .events-card-visual {
        flex: 0 0 auto;
        width: 100%;
        min-height: 140px;
        max-height: 180px;
    }
}
.events-team-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 4px 6px 0 0;
}
.events-team-green { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.events-team-blue { background: rgba(59, 130, 246, 0.22); color: #93c5fd; }
.events-team-yellow { background: rgba(234, 179, 8, 0.22); color: #fde047; }
.events-team-red { background: rgba(239, 68, 68, 0.22); color: #fecaca; }
.events-detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 12px;
    overflow: auto;
}
.events-detail-modal {
    width: min(880px, 100%);
    background: linear-gradient(165deg, rgba(18, 22, 30, 0.98), rgba(12, 14, 20, 0.99));
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 20px;
    padding: 22px 24px 28px;
    margin-top: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.events-detail-hero {
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 4px;
}
.events-detail-hero h2 {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 2.8vw, 1.55rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #f8fafc, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.events-detail-hero-meta {
    margin: 0;
    opacity: 0.88;
    font-size: 0.92rem;
    line-height: 1.45;
}
.events-detail-section {
    margin-top: 18px;
}
.events-detail-section h3 {
    margin: 0 0 10px;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.78rem;
    opacity: 0.88;
}
.events-detail-prose {
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.55;
    opacity: 0.92;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.events-detail-gallery-wrap {
    margin: 18px 0 8px;
    width: 100%;
}
.events-detail-gallery-title {
    margin: 0 0 12px;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.78rem;
    opacity: 0.88;
}
.events-detail-gallery {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 4px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}
.events-detail-gallery-figure {
    flex: 0 0 auto;
    width: min(280px, 78vw);
    max-width: 300px;
    min-width: 0;
    scroll-snap-align: start;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: linear-gradient(180deg, rgba(30, 27, 75, 0.35), rgba(15, 23, 42, 0.9));
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
}
.events-detail-gallery-frame {
    position: relative;
    line-height: 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 38%, rgba(99, 102, 241, 0.22), rgba(15, 23, 42, 0.96));
    overflow: hidden;
}
.events-detail-gallery-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #bae6fd;
}
.events-detail-gallery-figure img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(240px, 52vw);
    object-fit: contain;
    object-position: center;
    display: block;
}
.events-detail-gallery-figcap {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
    box-sizing: border-box;
}
.events-detail-gallery-cap-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.55;
    color: #c4b5fd;
}
.events-detail-gallery-cap-text {
    font-size: 0.86rem;
    line-height: 1.45;
    opacity: 0.92;
    min-height: 2.4em;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}
.events-detail-prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 4px;
}
.events-detail-prize-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(30, 27, 75, 0.42), rgba(15, 23, 42, 0.94));
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.events-detail-prize-card--main {
    border-color: rgba(234, 179, 8, 0.38);
    background: linear-gradient(145deg, rgba(120, 53, 15, 0.28), rgba(15, 23, 42, 0.95));
}
.events-detail-prize-card--consolation {
    border-color: rgba(148, 163, 184, 0.35);
}
.events-detail-prize-face {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    line-height: 1;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.28), rgba(217, 70, 239, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.events-detail-prize-card--consolation .events-detail-prize-face {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.26));
}
.events-detail-prize-body {
    flex: 1;
    min-width: 0;
}
.events-detail-prize-kind {
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.92;
    margin: 0 0 6px;
    color: #e2e8f0;
}
.events-detail-prize-text {
    font-size: 0.9rem;
    line-height: 1.45;
    opacity: 0.9;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.events-detail-prize-chip {
    display: inline-block;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.42);
}
.events-detail-prize-card--consolation .events-detail-prize-chip {
    background: rgba(56, 189, 248, 0.16);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.38);
}
.events-detail-winners-callout {
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.events-detail-winners-block {
    padding: 12px 14px 14px;
    border-radius: 12px;
    border: 1px solid rgba(234, 179, 8, 0.42);
    background: linear-gradient(145deg, rgba(120, 53, 15, 0.22), rgba(15, 23, 42, 0.9));
}
.events-detail-winners-block--con {
    border-color: rgba(56, 189, 248, 0.38);
    background: linear-gradient(145deg, rgba(30, 58, 138, 0.24), rgba(15, 23, 42, 0.9));
}
.events-detail-winners-head {
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #fde68a;
}
.events-detail-winners-block--con .events-detail-winners-head {
    color: #7dd3fc;
}
.events-detail-winners-ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.55;
}
.events-detail-apply {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(88, 28, 135, 0.18));
}
.events-detail-apply-label {
    display: block;
    font-size: 0.82rem;
    opacity: 0.88;
    margin-bottom: 6px;
}
.events-detail-apply-select {
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    border-radius: 10px;
}
.events-admin-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 14px;
}
@media (max-width: 980px) {
    .events-admin-split { grid-template-columns: 1fr; }
}
.admin-event-edit-card {
    width: min(920px, calc(100vw - 20px));
    max-width: none;
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: linear-gradient(165deg, rgba(22, 28, 38, 0.98), rgba(14, 18, 26, 0.99));
    border: 1px solid rgba(129, 140, 248, 0.28);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.admin-event-block {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.025);
}
.admin-event-block h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: rgba(199, 210, 254, 0.98);
}
.admin-event-photo-list {
    margin-top: 8px;
}
.admin-event-photo-strip {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 2px 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}
.admin-event-photo-card {
    flex: 0 0 auto;
    width: min(300px, 82vw);
    max-width: 320px;
    scroll-snap-align: start;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.28);
    background: linear-gradient(180deg, rgba(30, 27, 75, 0.2), rgba(15, 23, 42, 0.55));
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
}
.admin-event-photo-frame {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-event-photo-frame img {
    width: 100%;
    height: min(220px, 42vw);
    max-height: 280px;
    object-fit: cover;
    display: block;
}
.admin-event-photo-id {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #bae6fd;
}
.admin-event-photo-caption {
    font-size: 0.86rem;
    line-height: 1.45;
    opacity: 0.92;
    word-break: break-word;
    white-space: pre-wrap;
    max-height: 7.5em;
    overflow-y: auto;
    padding: 0 2px;
}
.admin-event-tp-one-line {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 0.92rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.55);
    color: #f1f5f9;
}
select.admin-event-dino-select {
    width: 100%;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #9ca3af;
    color: #fff;
    cursor: pointer;
}
select.admin-event-dino-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.65);
}
select.admin-event-dino-select option {
    background: #9ca3af;
    color: #fff;
    padding: 8px;
}
select.admin-event-dino-select option:checked,
select.admin-event-dino-select option:hover {
    background: #2563eb;
    color: #fff;
}
.adEv-srv-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    min-width: 56px;
    text-align: center;
    letter-spacing: 0.02em;
}
.adEv-srv-pill--yes {
    background: rgba(34, 197, 94, 0.28);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.45);
}
.adEv-srv-pill--no {
    background: rgba(239, 68, 68, 0.22);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.4);
}
.adEv-srv-pill--unk {
    opacity: 0.55;
    border: 1px dashed rgba(255, 255, 255, 0.15);
}
.admin-event-summary {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}
.clan-members-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}
.clan-members-panel-head h3 {
    margin: 0;
}
.profile-modal-card.clan-members-list-modal-card {
    width: min(1280px, calc(100vw - 20px));
    max-width: none;
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}
#clanMembersListModalBody {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}
#clanMembersListModalBody .clan-members-board.ratings-board {
    overflow-x: auto;
    overflow-y: visible;
}
#clanMembersListModalBody .rating-row {
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: 0;
}
#clanMembersListModalBody .rating-player {
    min-width: 0;
}
#clanJoinRequestsModal .profile-modal-card {
    max-height: min(70vh, 560px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#clanJoinRequestsModalBody {
    display: grid;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}
#clanWarehouseModal .profile-modal-card {
    max-width: min(640px, 96vw) !important;
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#clanWarehouseModalBody {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}
#clanWarehouseDepositSection {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    margin-top: 8px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.22);
    background: rgba(8, 10, 18, 0.4);
}
#clanWarehouseDepositBody {
    max-height: min(50vh, 420px);
    overflow: auto;
}
.clan-inv-chip {
    border: 1px solid rgba(129, 140, 248, 0.22) !important;
    background: rgba(8, 10, 18, 0.45) !important;
}
.clan-inv-chip .user-friend-btn.small {
    flex-shrink: 0;
}
#userTopupsModal .profile-modal-card {
    max-height: min(88vh, 760px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#userTopupsModalList {
    flex: 1 1 auto;
    min-height: 0;
}
.topup-history-row {
    border: 1px solid rgba(129, 140, 248, 0.22);
    background: rgba(8, 10, 18, 0.4);
    border-radius: 12px;
}
.clan-card {
    background: rgba(34, 37, 44, 0.92);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.clan-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.clan-panels > .clan-panel.clan-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
}
.clan-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 16px 18px;
}
.clan-panel-title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.02em;
}
.clan-panel-title-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.clan-panel-title-ico svg {
    display: block;
}
.clan-hero {
    padding: 18px 20px;
    margin-bottom: 4px;
}
.clan-hero-inner {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}
.clan-hero-aside {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    text-align: right;
    color: #f2f7ff;
    font-size: 15px;
    flex-shrink: 0;
}
.clan-hero-stat-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}
.clan-hero-stat-line strong {
    font-weight: 700;
}
.clan-kazna-plus,
.clan-kazna-minus {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(45, 90, 130, 0.5);
    color: #eaf2ff;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
    font-size: 16px;
    padding: 0;
    flex: 0 0 auto;
}
.clan-kazna-plus:hover,
.clan-kazna-minus:hover {
    background: rgba(65, 120, 170, 0.65);
}
.clan-hero-profile-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 220px;
    margin-top: 4px;
}
.clan-hero-profile-btns .btn-clan-hero-white {
    display: block;
    width: 100%;
    background: #fff;
    color: #111;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.clan-hero-profile-btns .btn-clan-hero-white:hover {
    background: #f0f0f0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
.clan-treasury-w-field {
    margin-bottom: 12px;
}
.clan-treasury-w-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    opacity: 0.9;
}
.clan-treasury-w-field input,
.clan-treasury-w-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
}
.clan-dash-two-col {
    display: grid;
    /* Участники на всю ширину сверху — без бокового скролла; открытые кланы ниже. */
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
    margin-top: 12px;
}
.clan-dash-two-col > * {
    min-width: 0;
    width: 100%;
}
.clan-dash-two-col .clan-panel.clan-card {
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
}
.clan-browse-table {
    width: 100%;
    table-layout: auto;
}
.clan-browse-table th:nth-child(3),
.clan-browse-table td:nth-child(3),
.clan-browse-table th:nth-child(4),
.clan-browse-table td:nth-child(4),
.clan-browse-table th:nth-child(5),
.clan-browse-table td:nth-child(5),
.clan-browse-table th:nth-child(6),
.clan-browse-table td:nth-child(6) {
    white-space: nowrap;
}
.clan-dash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.clan-join-req-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}
.clan-join-req-row:last-child {
    border-bottom: none;
}
.clan-hero-visual {
    flex-shrink: 0;
}
.clan-hero-avatar-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.clan-hero-avatar-wrap .profile-edit-btn {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
    cursor: pointer;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.clan-hero-avatar-wrap .profile-edit-btn:hover {
    background: rgba(30, 60, 80, 0.92);
}
.clan-hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    background: rgba(0, 0, 0, 0.35);
}
.clan-hero-icon--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.12), rgba(217, 70, 239, 0.12));
}
.clan-hero-icon--fallback img {
    opacity: 0.9;
}
.clan-hero-main {
    flex: 1;
    min-width: 200px;
}
.clan-hero-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
}
.clan-hero-meta {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.82;
    line-height: 1.45;
}
.clan-hero-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.clan-level-hint {
    margin: 0 0 10px;
    font-size: 13px;
    opacity: 0.85;
}
.clan-browse-table, .clan-members-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    box-sizing: border-box;
}
.clan-browse-ico-th {
    width: 52px;
}
.clan-browse-ico-cell {
    width: 52px;
    vertical-align: middle;
}
.clan-browse-ico {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
    display: block;
}
.clan-browse-ico-ph {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.1), rgba(217, 70, 239, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.clan-browse-ico-ph img {
    opacity: 0.75;
}
.clan-browse-table th, .clan-browse-table td,
.clan-members-table th, .clan-members-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: middle;
}
.clan-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}
.clan-form-row label {
    min-width: 140px;
    opacity: 0.88;
    font-size: 13px;
    font-weight: 600;
}
.clan-form-row input[type="text"],
.clan-form-row input[type="number"],
.clan-form-row select {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    font: inherit;
}
.clan-form-row input[type="color"] {
    width: 52px;
    height: 36px;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
}
.clan-form-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #22d3ee;
    cursor: pointer;
}
.clan-storage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 560px) {
    .clan-storage-grid {
        grid-template-columns: 1fr;
    }
}
.clan-inv-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    min-width: 0;
}
.clan-inv-chip > span:first-child,
.clan-inv-chip .clan-inv-chip-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.clan-inv-chip .user-friend-btn {
    margin-left: 0;
    flex-shrink: 0;
}
.clan-warehouse-modal-head .clan-warehouse-modal-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.clan-warehouse-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(45, 90, 130, 0.65);
    color: #eaf2ff;
    font-weight: 800;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.clan-warehouse-add-btn:hover {
    background: rgba(65, 120, 170, 0.88);
}
.clan-warehouse-deposit-section {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.clan-save-bar {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}


/* ===== TWITCH / TIKTOK content-creator roles ===== */
.rating-row.twitcher-row,
#users #usersRows .rating-row.twitcher-row,
#ratings #ratingsRows .rating-row.twitcher-row,
.clan-members-board.ratings-board .rating-row.twitcher-row {
    background: linear-gradient(100deg, rgba(0, 255, 136, 0.18), rgba(16, 185, 129, 0.10) 45%, rgba(5, 150, 105, 0.16)) !important;
    box-shadow: inset 3px 0 0 rgba(0, 255, 136, 0.85) !important;
}
.chat-row.twitcher-row {
    background: linear-gradient(100deg, rgba(0, 255, 136, 0.18), rgba(16, 185, 129, 0.10) 45%, rgba(5, 150, 105, 0.18));
    box-shadow: inset 3px 0 0 rgba(0, 255, 136, 0.8);
}
.chat-row.twitcher-row.active {
    background: linear-gradient(100deg, rgba(0, 255, 136, 0.28), rgba(52, 211, 153, 0.18) 45%, rgba(5, 150, 105, 0.28));
}
.rating-row.tiktoker-row,
#users #usersRows .rating-row.tiktoker-row,
#ratings #ratingsRows .rating-row.tiktoker-row,
.clan-members-board.ratings-board .rating-row.tiktoker-row {
    background: linear-gradient(100deg, rgba(37, 244, 238, 0.16), rgba(43, 156, 255, 0.12) 45%, rgba(14, 165, 233, 0.16)) !important;
    box-shadow: inset 3px 0 0 rgba(37, 244, 238, 0.85) !important;
}
.chat-row.tiktoker-row {
    background: linear-gradient(100deg, rgba(37, 244, 238, 0.16), rgba(43, 156, 255, 0.12) 45%, rgba(14, 165, 233, 0.18));
    box-shadow: inset 3px 0 0 rgba(37, 244, 238, 0.8);
}
.chat-row.tiktoker-row.active {
    background: linear-gradient(100deg, rgba(37, 244, 238, 0.26), rgba(59, 130, 246, 0.18) 45%, rgba(14, 165, 233, 0.26));
}
.twitcher-role-chip,
.twitcher-name-chip,
.tiktoker-role-chip,
.tiktoker-name-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    padding: 1px 7px 1px 4px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #fff;
    vertical-align: middle;
    background-size: 200% 100%;
    animation: diamondChipShimmer 2.8s ease-in-out infinite alternate;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.6;
}
.twitcher-role-chip {
    background: linear-gradient(100deg, #064e3b, #00ff88 50%, #059669 95%);
    border: 1px solid rgba(167, 243, 208, 0.6);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.45);
}
.twitcher-name-chip {
    background: linear-gradient(100deg, #065f46, #34d399 48%, #00ff88 95%);
    border: 1px solid rgba(110, 231, 183, 0.55);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
}
.tiktoker-role-chip {
    background: linear-gradient(100deg, #0c4a6e, #25f4ee 48%, #2b9cff 95%);
    border: 1px solid rgba(125, 211, 252, 0.6);
    box-shadow: 0 0 10px rgba(37, 244, 238, 0.45);
}
.tiktoker-name-chip {
    background: linear-gradient(100deg, #075985, #38bdf8 45%, #25f4ee 95%);
    border: 1px solid rgba(186, 230, 253, 0.55);
    box-shadow: 0 0 10px rgba(43, 156, 255, 0.4);
}
.twitcher-role-chip img,
.twitcher-name-chip img,
.tiktoker-role-chip img,
.tiktoker-name-chip img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}
.list-avatar-stack .list-avatar-twitcher-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(0, 255, 136, 0.95);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.75), inset 0 0 6px rgba(52, 211, 153, 0.45);
    animation: twitcherListRingPulse 2.6s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}
@keyframes twitcherListRingPulse {
    0%, 100% { border-color: rgba(0, 255, 136, 0.9); box-shadow: 0 0 6px rgba(0, 255, 136, 0.55), inset 0 0 5px rgba(16, 185, 129, 0.4); }
    50% { border-color: rgba(110, 231, 183, 0.98); box-shadow: 0 0 12px rgba(0, 255, 136, 0.9), inset 0 0 7px rgba(52, 211, 153, 0.55); }
}
.list-avatar-stack .list-avatar-tiktoker-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(37, 244, 238, 0.95);
    box-shadow: 0 0 8px rgba(37, 244, 238, 0.7), 0 0 12px rgba(43, 156, 255, 0.45), inset 0 0 6px rgba(14, 165, 233, 0.4);
    animation: tiktokerListRingPulse 2.6s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}
@keyframes tiktokerListRingPulse {
    0%, 100% { border-color: rgba(37, 244, 238, 0.95); box-shadow: 0 0 6px rgba(37, 244, 238, 0.55), 0 0 10px rgba(43, 156, 255, 0.35); }
    50% { border-color: rgba(43, 156, 255, 0.98); box-shadow: 0 0 12px rgba(43, 156, 255, 0.85), 0 0 16px rgba(37, 244, 238, 0.55); }
}
.profile-role-badge.role-twitcher {
    border-color: rgba(0, 255, 136, 0.55);
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.16), rgba(6, 78, 59, 0.28));
    color: #d1fae5;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}
.profile-role-badge.role-tiktoker {
    border-color: rgba(37, 244, 238, 0.55);
    background: linear-gradient(90deg, rgba(37, 244, 238, 0.14), rgba(43, 156, 255, 0.18));
    color: #e0f2fe;
    box-shadow: 0 0 12px rgba(37, 244, 238, 0.2);
}
.profile-content-maker-badge.is-twitch {
    border-color: rgba(0, 255, 136, 0.55);
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.16), rgba(16, 185, 129, 0.16));
    color: #a7f3d0;
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.25);
}
.profile-content-maker-badge.is-tiktok {
    border-color: rgba(37, 244, 238, 0.55);
    background: linear-gradient(90deg, rgba(37, 244, 238, 0.14), rgba(43, 156, 255, 0.16));
    color: #bae6fd;
    box-shadow: 0 0 14px rgba(37, 244, 238, 0.22);
}
.profile-right.twitcher-profile-theme,
.profile-modal-card.twitcher-profile-theme:not(.public-profile-modal-card),
.profile-modal-card.public-profile-modal-card.twitcher-profile-theme {
    position: relative;
    isolation: isolate;
    border-color: rgba(0, 255, 136, 0.55) !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(0, 255, 136, 0.20), transparent 38%),
        radial-gradient(circle at 88% 18%, rgba(52, 211, 153, 0.16), transparent 36%),
        radial-gradient(circle at 50% 100%, rgba(6, 78, 59, 0.14), transparent 42%),
        linear-gradient(150deg, rgba(4, 18, 14, 0.99), rgba(8, 40, 28, 0.98)) !important;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.16), inset 0 0 36px rgba(16, 185, 129, 0.10);
    overflow: hidden;
}
.profile-right.twitcher-profile-theme::before,
.profile-modal-card.twitcher-profile-theme::before {
    content: "";
    position: absolute;
    inset: -55%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 36%, rgba(0, 255, 136, 0.16) 45%, transparent 54% 74%, rgba(52, 211, 153, 0.14) 84%, transparent 94%);
    animation: diamondProfileSweep 11s linear infinite;
}
.profile-right.twitcher-profile-theme > *,
.profile-modal-card.twitcher-profile-theme > * { position: relative; z-index: 1; }
.profile-right.twitcher-profile-theme::after,
.profile-modal-card.twitcher-profile-theme::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle 3px at 16% 20%, rgba(167, 243, 208, 0.9), transparent 100%),
        radial-gradient(circle 2px at 72% 14%, rgba(0, 255, 136, 0.85), transparent 100%),
        radial-gradient(circle 2.5px at 90% 52%, rgba(52, 211, 153, 0.8), transparent 100%),
        radial-gradient(circle 2px at 38% 78%, rgba(110, 231, 183, 0.75), transparent 100%);
    animation: modGlintTwinkle 3.2s ease-in-out infinite alternate;
}
.profile-avatar-wrap.twitcher-avatar-aura::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: 0;
    border-radius: 18px;
    padding: 3px;
    background: conic-gradient(#00ff88, #34d399, #a7f3d0, #00ff88);
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.85));
    animation: diamondProfileSweep 4.8s linear infinite;
}
.profile-avatar-wrap.twitcher-avatar-aura::after {
    content: "●";
    position: absolute;
    right: -8px;
    top: -8px;
    z-index: 4;
    color: #00ff88;
    font-size: 14px;
    text-shadow: -52px 66px 0 #34d399, 0 0 10px #00ff88;
    animation: diamondSparkle 1.7s ease-in-out infinite alternate;
    pointer-events: none;
}
.profile-right.tiktoker-profile-theme,
.profile-modal-card.tiktoker-profile-theme:not(.public-profile-modal-card),
.profile-modal-card.public-profile-modal-card.tiktoker-profile-theme {
    position: relative;
    isolation: isolate;
    border-color: rgba(37, 244, 238, 0.55) !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(37, 244, 238, 0.18), transparent 38%),
        radial-gradient(circle at 88% 18%, rgba(43, 156, 255, 0.16), transparent 36%),
        radial-gradient(circle at 50% 100%, rgba(7, 89, 133, 0.14), transparent 42%),
        linear-gradient(150deg, rgba(4, 14, 28, 0.99), rgba(8, 28, 48, 0.98)) !important;
    box-shadow: 0 0 30px rgba(37, 244, 238, 0.14), inset 0 0 36px rgba(43, 156, 255, 0.10);
    overflow: hidden;
}
.profile-right.tiktoker-profile-theme::before,
.profile-modal-card.tiktoker-profile-theme::before {
    content: "";
    position: absolute;
    inset: -55%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 36%, rgba(37, 244, 238, 0.14) 45%, transparent 54% 74%, rgba(43, 156, 255, 0.14) 84%, transparent 94%);
    animation: diamondProfileSweep 11s linear infinite;
}
.profile-right.tiktoker-profile-theme > *,
.profile-modal-card.tiktoker-profile-theme > * { position: relative; z-index: 1; }
.profile-right.tiktoker-profile-theme::after,
.profile-modal-card.tiktoker-profile-theme::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle 3px at 16% 20%, rgba(186, 230, 253, 0.9), transparent 100%),
        radial-gradient(circle 2px at 72% 14%, rgba(37, 244, 238, 0.85), transparent 100%),
        radial-gradient(circle 2.5px at 90% 52%, rgba(43, 156, 255, 0.8), transparent 100%),
        radial-gradient(circle 2px at 38% 78%, rgba(56, 189, 248, 0.75), transparent 100%);
    animation: modGlintTwinkle 3.2s ease-in-out infinite alternate;
}
.profile-avatar-wrap.tiktoker-avatar-aura::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: 0;
    border-radius: 18px;
    padding: 3px;
    background: conic-gradient(#25f4ee, #2b9cff, #38bdf8, #25f4ee);
    filter: drop-shadow(0 0 8px rgba(37, 244, 238, 0.8));
    animation: diamondProfileSweep 4.8s linear infinite;
}
.profile-avatar-wrap.tiktoker-avatar-aura::after {
    content: "♪";
    position: absolute;
    right: -8px;
    top: -10px;
    z-index: 4;
    color: #25f4ee;
    font-size: 15px;
    text-shadow: -52px 66px 0 #2b9cff, 0 0 10px #25f4ee;
    animation: diamondSparkle 1.7s ease-in-out infinite alternate;
    pointer-events: none;
}
#app .sidebar .logo .logo-text.nick-role-twitch,
#app #sidebarNickname.nick-role-twitch,
#app #sidebarNickname .nick-line-name.nick-role-twitch,
#app .profile-top .nick.nick-role-twitch,
#app #profileNickname.nick-role-twitch,
#app #profileNickname .nick-line-name.nick-role-twitch,
#app #profileHeroTitle.nick-role-twitch,
#app .profile-v2-hero-title.nick-role-twitch { color: #00ff88 !important; text-shadow: 0 0 14px rgba(0, 255, 136, 0.45) !important; }
#app .sidebar .logo .logo-text.nick-role-tiktok,
#app #sidebarNickname.nick-role-tiktok,
#app #sidebarNickname .nick-line-name.nick-role-tiktok,
#app .profile-top .nick.nick-role-tiktok,
#app #profileNickname.nick-role-tiktok,
#app #profileNickname .nick-line-name.nick-role-tiktok,
#app #profileHeroTitle.nick-role-tiktok,
#app .profile-v2-hero-title.nick-role-tiktok { color: #25f4ee !important; text-shadow: 0 0 14px rgba(37, 244, 238, 0.45) !important; }
.nick-role-twitch { color: #00ff88; }
.nick-role-tiktok { color: #25f4ee; }
.profile-v2-hero-title.nick-role-twitch { color: #00ff88 !important; text-shadow: 0 0 14px rgba(0, 255, 136, 0.45) !important; }
.profile-v2-hero-title.nick-role-tiktok { color: #25f4ee !important; text-shadow: 0 0 14px rgba(37, 244, 238, 0.45) !important; }
#ratings.list-redesign .rating-row.twitcher-row,
#users.list-redesign .rating-row.twitcher-row {
    background: linear-gradient(100deg, rgba(0, 255, 136, 0.12), rgba(16, 185, 129, 0.06) 45%, rgba(5, 150, 105, 0.1));
    box-shadow: inset 3px 0 0 rgba(0, 255, 136, 0.55);
}
#ratings.list-redesign .rating-row.tiktoker-row,
#users.list-redesign .rating-row.tiktoker-row {
    background: linear-gradient(100deg, rgba(37, 244, 238, 0.11), rgba(43, 156, 255, 0.07) 45%, rgba(14, 165, 233, 0.1));
    box-shadow: inset 3px 0 0 rgba(37, 244, 238, 0.55);
}
