/* Sword & Magic - site v3. Dark arcane theme: ink background, gold metal, teal magic. */

:root {
    --bg: #0b0d14;
    --bg-2: #10131d;
    --surface: #161a26;
    --surface-2: #1c2130;
    --line: #2a3042;
    --line-2: #3a4258;
    --text: #e8e4d8;
    --muted: #9aa0b4;
    --faint: #6b7189;
    --gold: #e2b55a;
    --gold-2: #f3d27a;
    --gold-3: #a8782a;
    --magic: #6fdccf;
    --magic-2: #3aa99b;
    --danger: #ef6b6b;
    --warn: #f0b04a;
    --ok: #5fd08d;
    --violet: #a78bfa;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Cinzel", Georgia, serif;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #0b0d14; }
/* Page to page navigation as one smooth cross-fade (Chrome/Edge/Safari): the background does not blink. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(111, 220, 207, .07), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(226, 181, 90, .07), transparent 60%),
        var(--bg);
    color: var(--text);
    font: 400 15px/1.6 var(--font);
}
img, svg { max-width: 100%; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
code { font: 13px/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--magic); }
:focus-visible { outline: 2px solid var(--magic); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.main { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
.inline-form { display: inline; margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Logo ---------- */
.logo { width: 34px; height: 34px; flex: none; }
.logo__frame { fill: none; stroke: var(--gold); stroke-width: 2.4; }
.logo__blade { fill: none; stroke: var(--gold-2); stroke-width: 2.6; stroke-linecap: round; }
.logo__gem { fill: var(--magic); filter: drop-shadow(0 0 4px var(--magic)); }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 13, 20, .82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand__text { font: 700 18px/1 var(--font-display); letter-spacing: .06em; white-space: nowrap; }
.brand__text em { font-style: normal; color: var(--gold); }

.nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav__spacer { flex: 1; }
.nav__link { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.is-active { color: var(--gold-2); background: rgba(226, 181, 90, .08); }
.nav__user { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 0 6px; }
.nav__username { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-right: 6px; }
.lang-switch__item { padding: 5px 9px; font-size: 12px; font-weight: 600; color: var(--faint); }
.lang-switch__item:hover { color: var(--text); background: var(--surface); }
.lang-switch__item.is-active { color: #0b0d14; background: var(--gold); }

.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.nav-toggle span:not(.sr-only) { display: block; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
    --b: var(--line-2);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 10px; border: 1px solid var(--b);
    font: 600 14px/1 var(--font); color: var(--text); background: var(--surface-2);
    cursor: pointer; transition: transform .12s, background .2s, border-color .2s, box-shadow .2s;
    white-space: nowrap;
}
.btn:hover { color: #fff; border-color: var(--gold-3); }
.btn:active { transform: translateY(1px); }
.btn--primary {
    color: #1a1206; border-color: transparent;
    background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-3));
    box-shadow: 0 6px 18px rgba(226, 181, 90, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn--primary:hover { color: #000; box-shadow: 0 8px 24px rgba(226, 181, 90, .4), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- Cards / forms ---------- */
.card {
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card__title { font: 700 26px/1.2 var(--font-display); color: var(--gold-2); text-align: center; }
.card__subtitle { color: var(--muted); text-align: center; margin: 8px 0 24px; }

.auth { display: grid; place-items: center; padding: 56px 20px 72px; }
.auth__card { width: 100%; max-width: 430px; padding: 36px 32px; position: relative; }
.auth__card::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    background: linear-gradient(140deg, rgba(226, 181, 90, .5), transparent 30%, transparent 70%, rgba(111, 220, 207, .4));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.auth__switch { text-align: center; color: var(--muted); margin: 22px 0 0; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field__hint { font-size: 12px; color: var(--faint); }
.input {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--line-2); background: #0e111a; color: var(--text);
    font: 400 15px/1.3 var(--font); transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226, 181, 90, .15); }
.input:user-invalid { border-color: var(--danger); }
.input--code { text-align: center; font-size: 26px; letter-spacing: .5em; padding-left: .5em; }
.input-wrap { position: relative; display: block; }
.input-wrap .input { padding-right: 46px; }
.input-wrap__btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 16px; padding: 6px 8px; border-radius: 6px; }
.input-wrap__btn:hover, .input-wrap__btn.is-on { color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--gold); width: 16px; height: 16px; }
.strength { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s, background .25s; }

/* ---------- Alerts ---------- */
.flashes { display: grid; gap: 10px; padding-top: 20px; }
.alert {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 13px 16px; border-radius: 10px; border: 1px solid; font-size: 14px;
}
.alert--success { background: rgba(95, 208, 141, .08); border-color: rgba(95, 208, 141, .35); color: #bff0d2; }
.alert--error { background: rgba(239, 107, 107, .08); border-color: rgba(239, 107, 107, .4); color: #ffd0d0; }
.alert--warn { background: rgba(240, 176, 74, .08); border-color: rgba(240, 176, 74, .4); color: #ffe2b0; }
.alert--info { background: rgba(111, 220, 207, .07); border-color: rgba(111, 220, 207, .35); color: #c7f5ef; }
.alert--wide { margin-top: 18px; flex-wrap: wrap; }
.alert__close { border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: .7; }
.alert__close:hover { opacity: 1; }

/* ---------- Hero ---------- */

.section { padding-top: 40px; }
.section:last-child { padding-bottom: 72px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section__head .section__title { margin: 0; }
.section__title { font: 700 22px/1.2 var(--font-display); color: var(--text); margin: 0 0 16px; letter-spacing: .03em; }
.section__hint { color: var(--faint); font-size: 13px; margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), transparent); }
.feature__icon { width: 46px; height: 46px; display: grid; place-items: center; font-size: 22px; color: var(--gold-2); border-radius: 12px; border: 1px solid rgba(226, 181, 90, .35); background: rgba(226, 181, 90, .06); margin-bottom: 16px; }
.feature h2 { font-size: 17px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); }

.steps { padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); }
.steps__list { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps__list li { counter-increment: s; display: grid; gap: 6px; padding-left: 52px; position: relative; color: var(--muted); }
.steps__list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font: 700 16px/1 var(--font-display); color: #1a1206; background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); }
.steps__list strong { color: var(--text); }

/* ---------- Cabinet ---------- */
.cabinet { padding-top: 28px; }
.avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; font: 700 16px/1 var(--font-display); color: #1a1206; background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); }
.avatar--sm { width: 28px; height: 28px; font-size: 13px; }
.avatar--lg { width: 84px; height: 84px; font-size: 34px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(226, 181, 90, .5), 0 0 30px rgba(226, 181, 90, .25); }

.profile { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 26px; }
.profile__name { font: 700 28px/1.15 var(--font-display); color: var(--gold-2); word-break: break-word; }
.profile__meta { color: var(--faint); margin: 6px 0 12px; font-size: 14px; }
.profile__vip { min-width: 220px; display: grid; gap: 6px; padding: 16px 18px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); }
.profile__vip-label { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); }
.profile__vip-total { font: 700 24px/1 var(--font); color: var(--text); }
.profile__vip-next { font-size: 12px; color: var(--muted); }
.progress { appearance: none; width: 100%; height: 6px; border: 0; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress::-webkit-progress-bar { background: var(--line); border-radius: 6px; }
.progress::-webkit-progress-value { background: linear-gradient(90deg, var(--magic-2), var(--magic)); border-radius: 6px; }
.progress::-moz-progress-bar { background: linear-gradient(90deg, var(--magic-2), var(--magic)); border-radius: 6px; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid; }
.badge--vip { color: var(--gold-2); border-color: rgba(226, 181, 90, .45); background: rgba(226, 181, 90, .08); }
.badge--premium { color: #d9ccff; border-color: rgba(167, 139, 250, .45); background: rgba(167, 139, 250, .1); }
.badge--ok { color: #bff0d2; border-color: rgba(95, 208, 141, .4); background: rgba(95, 208, 141, .08); }
.badge--warn { color: #ffe2b0; border-color: rgba(240, 176, 74, .45); background: rgba(240, 176, 74, .08); }

.balance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.balance { position: relative; display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.balance__label { font-size: 13px; color: var(--muted); font-weight: 500; }
.balance__value { font: 700 30px/1.1 var(--font); color: var(--text); font-variant-numeric: tabular-nums; }
.balance__note { font-size: 12px; color: var(--faint); }
.balance__warn { font-size: 12px; color: var(--warn); }
.balance--gold { border-color: rgba(226, 181, 90, .45); background: linear-gradient(135deg, rgba(226, 181, 90, .14), var(--surface) 60%); }
.balance--gold .balance__value { color: var(--gold-2); }
.balance--active { border-color: rgba(111, 220, 207, .4); }
.balance--active::after { content: ""; position: absolute; right: 14px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--magic); box-shadow: 0 0 10px var(--magic); }

.case-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.case { --c: var(--line-2); display: grid; justify-items: center; text-align: center; gap: 4px; padding: 20px 14px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); opacity: .72; transition: transform .2s, opacity .2s, border-color .2s; }
.case.is-ready { opacity: 1; border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 15%, transparent), 0 10px 30px color-mix(in srgb, var(--c) 12%, transparent); }
.case.is-ready:hover { transform: translateY(-3px); }
.case--daily { --c: #8fb3ff; }
.case--weekly { --c: var(--magic); }
.case--premium { --c: var(--violet); }
.case--vip { --c: var(--gold); }
.case--mystery { --c: #ff8fb1; }
.case__chest { width: 96px; height: 88px; object-fit: contain; margin: -6px 0 6px; filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--c) 45%, transparent)); transition: transform .25s; }
.case.is-ready .case__chest { cursor: pointer; }
.case.is-ready:hover .case__chest { transform: scale(1.06) rotate(-2deg); }
.case:not(.is-ready) .case__chest { filter: grayscale(.7) brightness(.8); }
.case--vip .case__chest { filter: hue-rotate(45deg) saturate(1.3) drop-shadow(0 0 12px rgba(255, 215, 0, .55)); }
.case__name { font-size: 15px; font-weight: 700; }
.case__count { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.case__count strong { font-size: 20px; color: var(--text); }
.case__refill { margin: 0; font-size: 12px; color: var(--faint); }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.char { padding: 18px; box-shadow: none; }
.char__head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.char__name { font-size: 16px; word-break: break-word; }
.char__server { margin: 2px 0 0; font-size: 12px; color: var(--magic); }
.char__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.char__stats div { padding: 8px; border-radius: 8px; background: rgba(0, 0, 0, .2); }
.char__stats dt { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.char__stats dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.char__where { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.empty { padding: 26px; text-align: center; color: var(--muted); box-shadow: none; }
.empty p { margin: 0; }

.table-card { overflow-x: auto; box-shadow: none; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table th { color: var(--faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.table tr:last-child td { border-bottom: 0; }
.table__ua { color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 100px 20px; }
.error-page__code { font: 700 96px/1 var(--font-display); color: var(--gold); margin: 0; opacity: .9; }
.error-page__title { font-size: 20px; color: var(--muted); font-weight: 500; margin: 16px 0 28px; }
.error-page__debug { text-align: left; margin-top: 32px; padding: 16px; background: #000; border-radius: 8px; overflow: auto; font-size: 12px; color: #ffb4b4; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 14px 0; margin-top: 32px; line-height: 1.35; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: center; }
.footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; }
.footer__links a { color: var(--muted); font-size: 13px; }
.footer__links a:hover { color: var(--gold-2); }
.footer__copy { grid-column: 1 / -1; margin: 0; color: var(--faint); font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .case-grid { grid-template-columns: repeat(3, 1fr); }
    .profile { grid-template-columns: auto 1fr; }
    .profile__vip { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
    .nav-toggle { display: flex; }
    .nav {
        position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 4px;
        padding: 12px 20px 18px; background: var(--bg-2); border-bottom: 1px solid var(--line);
        display: none;
    }
    .nav.is-open { display: flex; }
    .nav__spacer { display: none; }
    .lang-switch { align-self: flex-start; margin: 6px 0; }
    .nav .btn, .nav .inline-form, .nav .inline-form .btn { width: 100%; }
}
@media (max-width: 820px) {
    .feature-grid, .steps__list { grid-template-columns: 1fr; }
    .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    /* Side gutters only: a shorthand here used to wipe the pages' own top padding (e.g. the cabinet). */
    .container { padding-left: 14px; padding-right: 14px; }
    .hero { padding: 72px 0 60px; }
    .case-grid { grid-template-columns: repeat(2, 1fr); }
    .auth__card { padding: 28px 20px; }
    .balance__value { font-size: 26px; }
    .table__ua { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ---------- Case opening ---------- */
.server-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.server-pick__label { font-size: 13px; color: var(--muted); }
.input--select { width: auto; min-width: 180px; padding: 8px 34px 8px 12px; font-size: 14px; appearance: none; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
    background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.js .server-pick [data-autosubmit-fallback] { display: none; }
#cases > .alert { margin-bottom: 14px; }
.case form { margin-top: 10px; width: 100%; }
.case__btn { width: 100%; }
.case__btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); box-shadow: none; }
.case.is-opening .case__chest { animation: shake .5s ease-in-out infinite; }
@keyframes shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-6deg) translateY(-2px); }
    75% { transform: rotate(6deg) translateY(-2px); }
}

.prize {
    --c: var(--gold);
    width: min(92vw, 380px); padding: 34px 26px 26px; border-radius: 18px; text-align: center; overflow: hidden;
    color: var(--text); background: linear-gradient(180deg, var(--surface-2), var(--bg-2));
    border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
    box-shadow: 0 0 60px color-mix(in srgb, var(--c) 35%, transparent), var(--shadow);
}
.prize::backdrop { background: rgba(5, 6, 10, .75); backdrop-filter: blur(4px); }
.prize[open] { animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(1turn); } }
.prize > * { position: relative; z-index: 1; }
.prize__eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .25em; font-size: 12px; color: var(--muted); }
.prize__icon { width: 96px; height: 96px; margin: 18px auto; border-radius: 20px; display: grid; place-items: center;
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); font-size: 46px; color: var(--c); }
.prize__icon img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--c) 60%, transparent)); }
.prize__title { font: 700 24px/1.2 var(--font-display); color: var(--c); margin: 0; word-break: break-word; }
.prize__subtitle { color: var(--muted); margin: 8px 0 22px; font-size: 14px; }
.prize--common { --c: #c7ccd9; }
.prize--uncommon { --c: var(--ok); }
.prize--rare { --c: #8fb3ff; }
.prize--epic { --c: var(--violet); }
.prize--legendary { --c: var(--gold); }
.prize--mythic, .prize--overlord { --c: #ff6f91; }

/* ---------- Shop & inventory ---------- */
.store { padding-top: 28px; padding-bottom: 72px; }
.store__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { font: 700 30px/1.15 var(--font-display); color: var(--gold-2); letter-spacing: .03em; }
.page-sub { color: var(--muted); margin: 6px 0 0; font-size: 14px; }
.muted { color: var(--muted); font-size: 14px; }
.narrow { max-width: 560px; padding-top: 32px; padding-bottom: 72px; }
.sheet-page { padding: 26px; }
.sheet-page__back { margin: 18px 0 0; font-size: 14px; }

.wallet { display: flex; flex-wrap: wrap; gap: 8px; }
.wallet__item { display: grid; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); min-width: 110px; }
.wallet__item small { font-size: 11px; color: var(--faint); }
.wallet__item strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.wallet__item--gold { border-color: rgba(226, 181, 90, .45); }
.wallet__item--gold strong { color: var(--gold-2); }

.toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { display: flex; gap: 8px; flex: 1 1 280px; max-width: 420px; }
.search .input { padding: 9px 12px; font-size: 14px; }
.sorts { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-active { color: #1a1206; background: var(--gold); border-color: var(--gold); font-weight: 600; }

.tabs { position: relative; display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { flex: none; padding: 9px 14px; color: var(--muted); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--gold-2); border-bottom-color: var(--gold); }

.rarity--common { --r: #aab1c3; }
.rarity--uncommon { --r: var(--ok); }
.rarity--rare { --r: #6f9dff; }
.rarity--epic { --r: var(--violet); }
.rarity--legendary { --r: var(--gold); }
.rarity--mythic { --r: #ff3b3b; }
.rarity--overlord { --r: #ff5dc8; }

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
.item {
    --r: var(--line-2);
    position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center;
    padding: 10px 8px 9px; border-radius: 12px; color: var(--text);
    border: 1px solid color-mix(in srgb, var(--r) 35%, var(--line));
    background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--r) 14%, transparent), transparent 70%), var(--surface);
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.item:hover { color: var(--text); transform: translateY(-3px); border-color: color-mix(in srgb, var(--r) 70%, transparent); box-shadow: 0 8px 24px color-mix(in srgb, var(--r) 18%, transparent); }
.item.is-sold-out { opacity: .5; filter: grayscale(.7); }
.item__icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 12px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--r) 40%, transparent); }
.item__icon img { width: 56px; height: 56px; object-fit: contain; }
.item__icon--lg { width: 88px; height: 88px; flex: none; }
.item__icon--lg img { width: 76px; height: 76px; }
.item__pack, .item__qty { position: absolute; top: 6px; right: 6px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: var(--gold-2); }
.item__name { font-size: 13px; font-weight: 600; line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.item__price { font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.item__price s, .product s { color: var(--faint); font-weight: 400; font-size: .85em; margin-right: 4px; }
.item__limit { font-size: 11px; color: var(--warn); }
.item__tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.tag { font-size: 10px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.tag--magic { color: var(--magic); border-color: rgba(111, 220, 207, .4); }

.pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }
.pager__page { min-width: 38px; padding: 8px 10px; text-align: center; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.pager__page.is-active { color: #1a1206; background: var(--gold); border-color: var(--gold); font-weight: 700; }

.sheet { width: min(94vw, 480px); max-height: 90vh; padding: 26px 22px 22px; border-radius: 18px; border: 1px solid var(--line-2); color: var(--text); background: linear-gradient(180deg, var(--surface-2), var(--bg-2)); box-shadow: var(--shadow); overflow-y: auto; }
.sheet::backdrop { background: rgba(5, 6, 10, .7); backdrop-filter: blur(3px); }
.sheet[open] { animation: pop .25s ease-out; }
.sheet__close { position: absolute; top: 10px; right: 12px; border: 0; background: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; z-index: 2; }
.sheet__close:hover { color: var(--text); }
.sheet__loading { text-align: center; color: var(--muted); padding: 40px 0; }

.product { display: grid; gap: 16px; }
.product__head { display: flex; gap: 16px; align-items: center; padding-right: 24px; }
.product__name { font: 700 21px/1.2 var(--font-display); color: var(--r, var(--text)); word-break: break-word; }
.product__meta { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.rarity-tag { color: var(--r); font-weight: 600; }
.product__desc { margin: 0; color: var(--muted); font-size: 14px; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.facts li { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.facts span { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .03em; }
.facts strong { font-size: 13px; white-space: nowrap; }
.facts .coin { vertical-align: -3px; }
.currency-select { width: 100%; }

.stepper { display: flex; gap: 6px; }
.stepper .input { text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper .input::-webkit-outer-spin-button, .stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__btn { width: 44px; flex: none; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 20px; cursor: pointer; }
.stepper__btn:hover { border-color: var(--gold-3); }
.currency-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.currency-pick legend { margin-bottom: 6px; }
.currency-pick__opt { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); cursor: pointer; }
.currency-pick__opt:has(input:checked) { border-color: var(--gold); background: rgba(226, 181, 90, .08); }
.currency-pick__opt input { grid-row: span 2; accent-color: var(--gold); }
.currency-pick__opt span { font-size: 13px; font-weight: 600; }
.currency-pick__opt small { font-size: 12px; color: var(--muted); }
.buy-form__total { margin: 0; color: var(--muted); font-size: 14px; }
.buy-form__total strong { color: var(--text); font-size: 16px; }
.buy-form__warn { margin: 0; color: var(--danger); font-size: 13px; }
.input--full { width: 100%; }
.action-box { display: grid; gap: 10px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .15); }
.action-box__title { font-size: 15px; }
.btn--danger { color: #ffb4b4; border-color: rgba(239, 107, 107, .45); }
.btn--danger:hover { color: #fff; border-color: var(--danger); background: rgba(239, 107, 107, .12); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

@media (max-width: 560px) {
    .item-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
    .page-title { font-size: 25px; }
}

/* ---------- Top-up, settings ---------- */
.avatar--img { object-fit: cover; padding: 0; background: var(--surface); }
.nav__user { border-radius: 8px; padding: 4px 8px; }
.nav__user:hover, .nav__user.is-active { color: var(--text); background: var(--surface); }
.form__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.form__link { font-size: 13px; }
.form--inline { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.form--inline .input { flex: 1 1 180px; width: auto; }
.input--mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.input--file { padding: 9px; font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 18px; }
.pay-card { padding: 24px; display: grid; gap: 14px; align-content: start; box-shadow: none; }
.pay-card__title { font: 700 22px/1.2 var(--font-display); color: var(--gold-2); }
.pay-card .muted { margin: 0; }
.pay-steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 10px; }
.pay-steps li { counter-increment: st; position: relative; padding-left: 34px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.pay-steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #1a1206; background: var(--gold); }
.agree-box { padding: 14px; border-radius: 10px; border: 1px dashed var(--line-2); }
.agree-box__text { margin: 0; font-size: 13px; color: var(--muted); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.presets .chip { background: none; cursor: pointer; font: inherit; font-size: 13px; }
.mock-pay { text-align: center; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-card { padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; box-shadow: none; }
.settings-card--wide { grid-column: 1 / -1; }
.settings-card__title { font-size: 18px; }
.avatar-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.avatar-form { flex: 1 1 220px; gap: 8px; }
/* Your own avatar opens the avatar dialog: a pencil badge shows it is clickable */
.avatar-edit { position: relative; cursor: pointer; border-radius: 50%; }
.avatar-edit__hint {
    position: absolute; right: 2px; top: 2px; z-index: 3; width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; font-size: 14px; line-height: 1; color: #1a1206;
    background: linear-gradient(180deg, var(--gold-2), var(--gold)); border: 2px solid var(--bg-2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .6); transition: transform .15s;
}
.avatar-edit:hover .avatar-edit__hint, .avatar-edit:focus-visible .avatar-edit__hint { transform: scale(1.12); }
.avatar-edit:hover .vip-photo { filter: brightness(1.08); }
.avatar-row__hint { margin: 0; flex: 1 1 160px; }
.avatar-dialog { width: min(94vw, 640px); }
.avatar-dialog .settings-card__title { margin: 0 34px 10px 0; }
.avatar-dialog .tabs { margin-bottom: 14px; }
.avatar-dialog a.sheet__close { text-decoration: none; }
.avatar-dialog__body[aria-busy="true"] { opacity: .55; pointer-events: none; }
.avatar-dialog__status { margin: 0 0 12px; color: var(--danger); font-size: 14px; }
@media (max-width: 560px) {
    .avatar-dialog { padding: 22px 14px 16px; }
    .avatar-dialog .avatar-pick { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
    .avatar-dialog .tab { padding: 8px 9px; font-size: 13px; }
}
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; }
.avatar-pick__item { display: grid; justify-items: center; gap: 6px; margin: 0; }
.avatar-pick__btn { padding: 0; border: 2px solid var(--line); border-radius: 50%; overflow: hidden; background: rgba(0, 0, 0, .25); cursor: pointer; aspect-ratio: 1; width: 100%; max-width: 96px; transition: border-color .15s, transform .15s; }
.avatar-pick__btn:hover, .avatar-pick__btn:focus-visible { border-color: var(--gold); transform: translateY(-2px); }
.avatar-pick__btn img, .avatar-pick--admin img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-pick__item.is-current .avatar-pick__btn { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 185, 79, .35); cursor: default; transform: none; }
.avatar-pick--admin { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.avatar-pick--admin img { width: 96px; height: 96px; border-radius: 50%; }
.avatar-pick__item.is-hidden img { opacity: .35; filter: grayscale(1); }
.avatar-pick__meta { font-size: 12px; color: var(--muted); }
.twofa-state { margin: 0; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.twofa-actions { display: grid; gap: 10px; max-width: 560px; }
.totp-setup { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.totp-setup__qr { padding: 10px; background: #fff; border-radius: 12px; line-height: 0; }
.totp-setup__qr svg { width: 196px; height: 196px; }
.totp-setup__body { flex: 1 1 260px; display: grid; gap: 14px; }
.secret { display: inline-block; padding: 4px 8px; border-radius: 6px; background: rgba(0, 0, 0, .3); font-size: 14px; letter-spacing: .06em; word-break: break-all; }

@media (max-width: 820px) {
    .settings-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- News, rating, giveaway, social ---------- */
.narrow--wide { max-width: 820px; }
.news-list { display: grid; gap: 14px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.news-card { padding: 20px 22px; box-shadow: none; display: grid; gap: 8px; align-content: start; }
.news-card__date { font-size: 12px; color: var(--magic); letter-spacing: .05em; }
.news-card__title { font-size: 18px; line-height: 1.3; }
.news-card__title a { color: var(--text); }
.news-card__title a:hover { color: var(--gold-2); }
.news-card__excerpt { margin: 0; color: var(--muted); font-size: 14px; }
.news-card__more { font-size: 13px; font-weight: 600; }
.article { padding: 30px 32px; box-shadow: none; }
.article__meta { margin: 0 0 8px; font-size: 13px; color: var(--faint); }
.article__title { font: 700 30px/1.2 var(--font-display); color: var(--gold-2); margin-bottom: 18px; }
.prose { color: #d6d2c6; font-size: 16px; line-height: 1.75; word-break: break-word; }
.prose > * + * { margin-top: 1em; }
.prose p { margin: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 1.4em; }
.prose a { text-decoration: underline; }
.prose img { border-radius: 10px; height: auto; }
.prose blockquote { margin: 0; padding: 10px 16px; border-left: 3px solid var(--gold); background: rgba(226, 181, 90, .06); border-radius: 0 8px 8px 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }

.rating__server { margin: 0; }
.rating td { vertical-align: middle; }
.place { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; font-weight: 700; color: var(--muted); }
.rating__top--1 .place { color: #1a1206; background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); }
.rating__top--2 .place { color: #111; background: linear-gradient(180deg, #e9edf5, #9aa3b5); }
.rating__top--3 .place { color: #1a0f06; background: linear-gradient(180deg, #e7a46a, #9b5a2a); }
.rating__top td { background: rgba(226, 181, 90, .04); }
.gender { color: var(--faint); margin-right: 4px; }
.camp { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.camp--bloodoath { color: #ff9a9a; border-color: rgba(239, 107, 107, .45); }
.camp--holyguard { color: #9cc4ff; border-color: rgba(111, 157, 255, .45); }

.gw { padding: 22px; box-shadow: none; display: grid; gap: 18px; }
.gw__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gw__stat { display: grid; gap: 2px; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, .22); }
.gw__stat small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.gw__stat strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.gw__stat span { font-size: 12px; color: var(--muted); }
.gw__stat--pool strong { color: var(--gold-2); font-size: 28px; }
.gw__line { margin: 0; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, .03); color: var(--muted); }
.gw__line--ok { color: #bff0d2; background: rgba(95, 208, 141, .08); }
.gw__line--warn { color: #ffe2b0; background: rgba(240, 176, 74, .08); }
.gw__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gw__h { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.gw__list { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.gw__list li { color: var(--muted); }
.gw__list li span { color: var(--text); }
.gw__list li strong { float: right; color: var(--gold-2); font-variant-numeric: tabular-nums; }

.social { margin-top: 18px; display: grid; gap: 12px; }
.social__or { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.social__or::before, .social__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social__icon { font-weight: 800; }
.social__btn--google .social__icon { color: #8ab4f8; }
.social__btn--telegram .social__icon { color: #5fb7ea; }
.linked { display: grid; gap: 10px; max-width: 520px; }
.linked__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(0, 0, 0, .18); }
.linked__name { font-weight: 600; flex: 1; min-width: 0; }
.badge:not([class*="badge--"]) { color: var(--muted); border-color: var(--line-2); }

@media (max-width: 720px) {
    .gw__stats { grid-template-columns: repeat(2, 1fr); }
    .gw__cols { grid-template-columns: 1fr; }
    .hide-sm { display: none; }
    .article { padding: 22px 18px; }
}

/* ---------- Admin panel ---------- */
.nav__link--admin { color: var(--warn); }
.admin-tabs { margin-bottom: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px 18px; box-shadow: none; display: grid; gap: 4px; }
.stat small { font-size: 12px; color: var(--faint); }
.stat strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.stat--warn { border-color: rgba(240, 176, 74, .55); }
.stat--warn strong { color: var(--warn); }
.search--wide { max-width: 640px; margin-bottom: 8px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); gap: 16px; }
.admin-box { padding: 18px; box-shadow: none; display: grid; gap: 10px; align-content: start; }
.admin-box__title { font-size: 16px; }
.admin-box .table td { padding: 6px 8px; }
.admin-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.admin-act .input { flex: 1 1 110px; width: auto; padding: 8px 10px; font-size: 13px; }
.admin-act .input[type="number"] { flex: 0 1 90px; }
.admin-act .input--select { min-width: 0; flex: 1 1 130px; padding-right: 30px; }
.admin-row { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-form { padding: 20px; box-shadow: none; }
.admin-form.form--inline .input { flex: 1 1 140px; }
.admin-form__hint { flex-basis: 100%; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.admin-checks { display: flex; gap: 10px 22px; flex-wrap: wrap; }
.table--compact { font-size: 13px; }
.table--compact th, .table--compact td { padding: 8px 10px; }
.table__details { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.table__details:hover { white-space: normal; word-break: break-all; }
.nowrap { white-space: nowrap; }
.row--muted td { opacity: .5; }
.input--area { min-height: 260px; resize: vertical; font: 13px/1.5 ui-monospace, Consolas, monospace; }
.editor-bar { display: flex; gap: 4px; flex-wrap: wrap; }
.editor-bar button { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; font: 600 12px/1.4 var(--font); }
.editor-bar button:hover { border-color: var(--gold-3); }
.preview { margin-top: 10px; }
.progress--inline { width: 80px; vertical-align: middle; margin-right: 6px; }
.cases-head__right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ==========================================================================
   Theme art: old-site images (hero background, logo, class art, chests)
   ========================================================================== */
body {
    background:
        linear-gradient(180deg, rgba(11, 13, 20, .55) 0, rgba(11, 13, 20, .86) 420px, var(--bg) 900px),
        url("/assets/img/hero.webp?v=2") center top / 1920px auto no-repeat,
        var(--bg);
}
.brand__logo { height: 50px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); transition: filter .2s; }
.brand:hover .brand__logo { filter: drop-shadow(0 0 10px rgba(143, 196, 255, .45)); }

.topbar { background: linear-gradient(180deg, rgba(8, 10, 16, .92), rgba(11, 13, 20, .78)); border-bottom: 1px solid rgba(226, 181, 90, .22); box-shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .25); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent); opacity: .55; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 80px; text-align: center; isolation: isolate; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background: url("/assets/img/hero.webp?v=2") center 20% / cover no-repeat;
    -webkit-mask: linear-gradient(180deg, #000 55%, transparent); mask: linear-gradient(180deg, #000 55%, transparent);
}
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(70% 60% at 50% 45%, rgba(11, 13, 20, .2), rgba(11, 13, 20, .78)), linear-gradient(180deg, rgba(11, 13, 20, .2), var(--bg));
}
.hero__inner { position: relative; z-index: 1; }
.hero__logo { margin: 0 auto; max-width: 520px; line-height: 0; }
.hero__logo img { width: 100%; height: auto; filter: drop-shadow(0 10px 40px rgba(0, 0, 0, .7)) drop-shadow(0 0 30px rgba(143, 196, 255, .25)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: 12px; font-weight: 600; color: var(--magic); margin: 4px 0 0; text-shadow: 0 2px 8px #000; }
.hero__lead { max-width: 620px; margin: 16px auto 0; color: #d9d6cc; font-size: 18px; text-shadow: 0 2px 10px #000; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.hero__actions .btn--ghost { background: rgba(11, 13, 20, .55); backdrop-filter: blur(4px); }
.hero__download { display: inline-block; margin-top: 22px; color: #cfd3e0; font-size: 14px; text-shadow: 0 1px 6px #000; }
.hero__download:hover { color: var(--gold-2); }
/* Players online (cron/online.php): one wrapping row of small pills under the hero buttons */
.online { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 8px; max-width: 640px; margin: 22px auto 0; font-size: 13px; color: #cfd3e0; text-shadow: 0 1px 6px #000; }
.online__now { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.online__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: online-pulse 2s ease-in-out infinite; }
@keyframes online-pulse { 50% { opacity: .45; } }
.online__srv, .online__today { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(226, 181, 90, .25); background: rgba(11, 13, 20, .6); white-space: nowrap; }
.online__srv b { color: var(--gold-2); }
.online__today { color: var(--muted); white-space: normal; }
@media (prefers-reduced-motion: reduce) { .online__dot { animation: none; } }
.hero__art { position: absolute; bottom: 0; z-index: 0; pointer-events: none; width: min(34vw, 470px); opacity: .95; }
.hero__art img { width: 100%; height: auto; display: block; -webkit-mask: linear-gradient(180deg, #000 70%, transparent); mask: linear-gradient(180deg, #000 70%, transparent); }
.hero__art--left { left: max(-60px, calc(50% - 900px)); }
.hero__art--right { right: max(-40px, calc(50% - 880px)); width: min(36vw, 520px); }

/* Ornate section titles */
.section__title--ornate { display: flex; align-items: center; justify-content: center; gap: 18px; text-align: center; font-size: 26px; color: var(--gold-2); margin-bottom: 22px; }
.section__title--ornate::before, .section__title--ornate::after {
    content: ""; flex: 1; max-width: 220px; height: 10px;
    background: linear-gradient(90deg, transparent, var(--gold-3)) center / 100% 1px no-repeat,
                radial-gradient(circle, var(--gold-2) 0 2.5px, transparent 3px) right center / 10px 10px no-repeat;
}
.section__title--ornate::after { transform: scaleX(-1); }

/* Framed cards: thin gold corner accents */
.card, .feature, .steps { position: relative; }
.card::after, .feature::after, .steps::after {
    content: ""; position: absolute; inset: 6px; pointer-events: none; border-radius: calc(var(--radius) - 4px);
    background:
        linear-gradient(var(--gold-3), var(--gold-3)) left top / 14px 1px no-repeat,
        linear-gradient(var(--gold-3), var(--gold-3)) left top / 1px 14px no-repeat,
        linear-gradient(var(--gold-3), var(--gold-3)) right top / 14px 1px no-repeat,
        linear-gradient(var(--gold-3), var(--gold-3)) right top / 1px 14px no-repeat,
        linear-gradient(var(--gold-3), var(--gold-3)) left bottom / 14px 1px no-repeat,
        linear-gradient(var(--gold-3), var(--gold-3)) left bottom / 1px 14px no-repeat,
        linear-gradient(var(--gold-3), var(--gold-3)) right bottom / 14px 1px no-repeat,
        linear-gradient(var(--gold-3), var(--gold-3)) right bottom / 1px 14px no-repeat;
    opacity: .55;
}
.card { background: linear-gradient(180deg, rgba(28, 33, 48, .92), rgba(16, 19, 29, .94)); }

/* Features */
.feature { text-align: center; padding: 22px 22px 26px; background: linear-gradient(180deg, rgba(28, 33, 48, .85), rgba(16, 19, 29, .7)); }
.feature__img { width: 110px; height: 96px; object-fit: contain; margin: 0 auto 10px; display: block; filter: drop-shadow(0 8px 18px rgba(226, 181, 90, .25)); transition: transform .3s; }
.feature:hover .feature__img { transform: translateY(-4px) scale(1.04); }

/* Classes (CSS-only tabs: the radio inputs come before the tabs and panels) */
.classes__radio { position: absolute; opacity: 0; pointer-events: none; }
.classes__tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.classes__tab { display: grid; justify-items: center; gap: 6px; width: 104px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(16, 19, 29, .7); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; transition: border-color .2s, color .2s, transform .2s; }
.classes__tab img { width: 46px; height: 46px; filter: grayscale(.6) brightness(.8); transition: filter .2s; }
.classes__tab:hover { color: var(--text); transform: translateY(-2px); }
.classes__tab:hover img { filter: none; }
.classes__panels { position: relative; }
.class-panel { display: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 26px; align-items: center; padding: 10px 26px 0; border-radius: var(--radius); border: 1px solid var(--line);
    background: radial-gradient(60% 90% at 25% 60%, rgba(111, 157, 255, .16), transparent 70%), linear-gradient(180deg, rgba(28, 33, 48, .9), rgba(16, 19, 29, .9)); overflow: hidden; min-height: 380px; }
.class-panel__art { align-self: end; text-align: center; line-height: 0; }
.class-panel__art img { max-height: 420px; width: auto; max-width: 100%; -webkit-mask: linear-gradient(180deg, #000 80%, transparent); mask: linear-gradient(180deg, #000 80%, transparent); }
.class-panel__body { padding: 24px 0 30px; }
.class-panel__name { font: 700 36px/1.1 var(--font-display); color: var(--gold-2); letter-spacing: .05em; text-transform: uppercase; }
.class-panel__tagline { color: var(--magic); margin: 10px 0 12px; font-weight: 600; }
.class-panel__text { color: #cfccc2; margin: 0 0 16px; font-size: 16px; line-height: 1.7; }
.class-panel__diff { margin: 0; color: var(--muted); font-size: 14px; }
.stars { color: var(--gold-2); letter-spacing: .15em; font-size: 16px; }
.stars__off { color: var(--line-2); }
#cls-1:checked ~ .classes__panels .class-panel--1, #cls-2:checked ~ .classes__panels .class-panel--2, #cls-3:checked ~ .classes__panels .class-panel--3,
#cls-4:checked ~ .classes__panels .class-panel--4, #cls-5:checked ~ .classes__panels .class-panel--5, #cls-6:checked ~ .classes__panels .class-panel--6 { display: grid; animation: fadeIn .35s ease-out; }
#cls-1:checked ~ .classes__tabs .classes__tab--1, #cls-2:checked ~ .classes__tabs .classes__tab--2, #cls-3:checked ~ .classes__tabs .classes__tab--3,
#cls-4:checked ~ .classes__tabs .classes__tab--4, #cls-5:checked ~ .classes__tabs .classes__tab--5, #cls-6:checked ~ .classes__tabs .classes__tab--6 { color: var(--gold-2); border-color: var(--gold); background: rgba(226, 181, 90, .1); box-shadow: 0 0 18px rgba(226, 181, 90, .2); }
#cls-1:checked ~ .classes__tabs .classes__tab--1 img, #cls-2:checked ~ .classes__tabs .classes__tab--2 img, #cls-3:checked ~ .classes__tabs .classes__tab--3 img,
#cls-4:checked ~ .classes__tabs .classes__tab--4 img, #cls-5:checked ~ .classes__tabs .classes__tab--5 img, #cls-6:checked ~ .classes__tabs .classes__tab--6 img { filter: none; }
.classes__radio:focus-visible ~ .classes__tabs { outline: 2px solid var(--magic); outline-offset: 4px; border-radius: 12px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Showcase banners */
.showcase { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; margin-bottom: 26px; }
.showcase--reverse .showcase__img { order: 2; }
.showcase__img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(226, 181, 90, .25); }
.showcase__body .section__title { font-size: 24px; color: var(--gold-2); }
.showcase__body .muted { font-size: 16px; line-height: 1.7; margin: 0; }

/* Screenshot gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery__item { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); line-height: 0; aspect-ratio: 16 / 9; background: var(--surface); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, filter .35s; filter: saturate(.9); }
.gallery__item:hover { border-color: var(--gold-3); }
.gallery__item:hover img { transform: scale(1.06); filter: saturate(1.1); }

.page-title { text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.case { background: linear-gradient(180deg, rgba(28, 33, 48, .9), rgba(16, 19, 29, .9)); }

@media (max-width: 1000px) {

    .class-panel { grid-template-columns: 1fr; padding-top: 0; }
    .class-panel__art img { max-height: 300px; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
    .showcase { grid-template-columns: 1fr; gap: 14px; }
    .showcase--reverse .showcase__img { order: 0; }
}
@media (max-width: 560px) {
    .hero { padding: 36px 0 56px; }
    .hero__logo { max-width: 320px; }
    .classes__tab { width: calc(33.33% - 7px); }
    .class-panel { padding: 0 16px; }
    .class-panel__name { font-size: 28px; }
    .brand__logo { height: 42px; }
}
@media (max-width: 1240px) {
    .hero__art { display: none; }
}

/* ==========================================================================
   Rarity frames (shop, inventory, item sheets, case prizes)
   ========================================================================== */
.rarity--common { --r: #b4bccb; --r2: #6d7588; }
.rarity--uncommon { --r: #5fe08d; --r2: #1f8a4a; }
.rarity--rare { --r: #5aa2ff; --r2: #1f4fa8; }
.rarity--epic { --r: #b77bff; --r2: #6327b8; }
.rarity--legendary { --r: #ffb03a; --r2: #b86a00; }
.rarity--mythic { --r: #ff3b3b; --r2: #8a0000; }
.rarity--overlord { --r: #ff5dc8; --r2: #9b0f78; }

.item {
    border: 1px solid color-mix(in srgb, var(--r) 55%, transparent);
    background:
        radial-gradient(110% 60% at 50% 0%, color-mix(in srgb, var(--r) 22%, transparent), transparent 70%),
        linear-gradient(180deg, rgba(28, 33, 48, .95), rgba(14, 17, 26, .95));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4), 0 0 14px color-mix(in srgb, var(--r) 14%, transparent);
    overflow: hidden;
}
.item::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--r), transparent); }
.item:hover { border-color: var(--r); box-shadow: 0 0 0 1px color-mix(in srgb, var(--r) 40%, transparent), 0 10px 28px color-mix(in srgb, var(--r) 30%, transparent); }
.item__icon {
    width: 70px; height: 70px; border-radius: 12px;
    border: 2px solid var(--r);
    background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--r) 45%, #000), color-mix(in srgb, var(--r2) 55%, #05060a) 75%);
    box-shadow: 0 0 12px color-mix(in srgb, var(--r) 45%, transparent), inset 0 0 14px rgba(0, 0, 0, .55);
}
.item__icon img { width: 58px; height: 58px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.item__icon--lg { width: 92px; height: 92px; }
.item__icon--lg img { width: 78px; height: 78px; }
.item__name { color: color-mix(in srgb, var(--r) 70%, #fff); }
.item__rarity { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--r); }
.item__new {
    position: absolute; top: 6px; left: 6px; z-index: 1; padding: 2px 8px; border-radius: 999px;
    font: 800 10px/1.4 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #06231f;
    background: linear-gradient(135deg, #8ff5e6, var(--magic)); box-shadow: 0 0 10px rgba(111, 220, 207, .55);
}

/* Top rarities: animated light sweep and pulsing glow */
/* Cheap to draw: the pulse only fades a pre-drawn glow layer (opacity) and the sweep only moves (transform),
   so the browser composites them instead of repainting every card each frame. */
.rarity--legendary .item__icon, .rarity--mythic .item__icon, .rarity--overlord .item__icon { position: relative; overflow: hidden; box-shadow: 0 0 22px color-mix(in srgb, var(--r) 75%, transparent), inset 0 0 14px rgba(0, 0, 0, .55); }
.rarity--legendary .item__icon::before, .rarity--mythic .item__icon::before, .rarity--overlord .item__icon::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, transparent 45%, color-mix(in srgb, var(--r) 35%, transparent));
    animation: rarityGlow 2.6s ease-in-out infinite; will-change: opacity;
}
@keyframes rarityGlow { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.rarity--legendary .item__icon::after, .rarity--mythic .item__icon::after, .rarity--overlord .item__icon::after {
    content: ""; position: absolute; inset: -40%; pointer-events: none;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .35) 50%, transparent 60%);
    animation: raritySweep 3.2s ease-in-out infinite; will-change: transform;
}
.rarity--overlord .item__icon { border-image: linear-gradient(135deg, #ff5dc8, #ffd23b, #ff5dc8) 1; border-radius: 0; }
@keyframes rarityPulse { 0%, 100% { box-shadow: 0 0 10px color-mix(in srgb, var(--r) 40%, transparent), inset 0 0 14px rgba(0, 0, 0, .55); } 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--r) 75%, transparent), inset 0 0 14px rgba(0, 0, 0, .55); } }
@keyframes raritySweep { 0% { transform: translateX(-60%); } 60%, 100% { transform: translateX(60%); } }

.product__name { color: var(--r, var(--text)); text-shadow: 0 0 18px color-mix(in srgb, var(--r, transparent) 45%, transparent); }
.rarity-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--r) 60%, transparent); background: color-mix(in srgb, var(--r) 12%, transparent); font-size: 12px; }

/* Case prize uses the same palette */
.prize--common { --c: #b4bccb; }
.prize--uncommon { --c: #5fe08d; }
.prize--rare { --c: #5aa2ff; }
.prize--epic { --c: #b77bff; }
.prize--legendary { --c: #ffb03a; }
.prize--mythic { --c: #ff3b3b; }
.prize--overlord { --c: #ff5dc8; }
.prize__icon { border: 2px solid var(--c); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 45%, #000), #05060a 80%); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 55%, transparent); }
.vip-frame { position: relative; display: inline-block; flex: none; line-height: 0; }
.vip-photo { display: block; width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--line-2); background: var(--surface); box-sizing: border-box; }
.vip-badge { position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 3px 12px; border-radius: 12px; border: 1px solid transparent; color: #fff; font: 700 13px/1.4 var(--font); letter-spacing: .04em; white-space: nowrap; box-shadow: 0 3px 8px rgba(0, 0, 0, .8); cursor: help; }
.vip-frame--sm .vip-photo { width: 30px; height: 30px; border-width: 2px; animation: none; }
.vip-frame--md .vip-photo { width: 84px; height: 84px; }
.vip-title { display: inline-flex; align-items: center; gap: 6px; font: 700 13px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); }
.profile__vip-title { margin: 0 0 10px; }

/* ==========================================================================
   VIP levels 1-20: the same frames as the old site (avatar glow + badge)
   ========================================================================== */
/* Рівень 1: Basic (Світло-сірий) */
.vip-level-1 .vip-photo { border-color: #b0c4de; animation: pulseLvl1 3s infinite ease-in-out; }
.vip-level-1 .vip-badge { background: linear-gradient(135deg, #4b5d67, #b0c4de); border-color: #b0c4de; }
@keyframes pulseLvl1 { 0%, 100% { box-shadow: 0 0 3px rgba(176, 196, 222, 0.2); } 50% { box-shadow: 0 0 10px rgba(176, 196, 222, 0.6); } }

/* Рівень 2: Novice (Бронзовий) */
.vip-level-2 .vip-photo { border-color: #cd7f32; animation: pulseLvl2 2.8s infinite ease-in-out; }
.vip-level-2 .vip-badge { background: linear-gradient(135deg, #5c3a21, #cd7f32); border-color: #cd7f32; }
@keyframes pulseLvl2 { 0%, 100% { box-shadow: 0 0 4px rgba(205, 127, 50, 0.2); } 50% { box-shadow: 0 0 12px rgba(205, 127, 50, 0.7); } }

/* Рівень 3: Apprentice (Срібний) */
.vip-level-3 .vip-photo { border-color: #c0c0c0; animation: pulseLvl3 2.7s infinite ease-in-out; }
.vip-level-3 .vip-badge { background: linear-gradient(135deg, #696969, #c0c0c0); border-color: #c0c0c0; }
@keyframes pulseLvl3 { 0%, 100% { box-shadow: 0 0 4px rgba(192, 192, 192, 0.3); } 50% { box-shadow: 0 0 14px rgba(192, 192, 192, 0.8); } }

/* Рівень 4: Scout (Темно-зелений) */
.vip-level-4 .vip-photo { border-color: #228b22; animation: pulseLvl4 2.6s infinite ease-in-out; }
.vip-level-4 .vip-badge { background: linear-gradient(135deg, #004d00, #228b22); border-color: #228b22; }
@keyframes pulseLvl4 { 0%, 100% { box-shadow: 0 0 5px rgba(34, 139, 34, 0.3); } 50% { box-shadow: 0 0 15px rgba(34, 139, 34, 0.8); } }

/* Рівень 5: Ranger (Салатовий) */
.vip-level-5 .vip-photo { border-color: #1eff00; animation: pulseLvl5 2.5s infinite ease-in-out; }
.vip-level-5 .vip-badge { background: linear-gradient(135deg, #0a4d00, #179e00); border-color: #1eff00; }
@keyframes pulseLvl5 { 0%, 100% { box-shadow: 0 0 5px rgba(30, 255, 0, 0.3); } 50% { box-shadow: 0 0 16px rgba(30, 255, 0, 0.9); } }

/* Рівень 6: Adept (Бірюзовий) */
.vip-level-6 .vip-photo { border-color: #00fa9a; animation: pulseLvl6 2.4s infinite ease-in-out; }
.vip-level-6 .vip-badge { background: linear-gradient(135deg, #006633, #00fa9a); border-color: #00fa9a; }
@keyframes pulseLvl6 { 0%, 100% { box-shadow: 0 0 5px rgba(0, 250, 154, 0.3); } 50% { box-shadow: 0 0 18px rgba(0, 250, 154, 0.9); } }

/* Рівень 7: Mystic (Блакитний) */
.vip-level-7 .vip-photo { border-color: #00ffff; animation: pulseLvl7 2.3s infinite ease-in-out; }
.vip-level-7 .vip-badge { background: linear-gradient(135deg, #005555, #00b3b3); border-color: #00ffff; }
@keyframes pulseLvl7 { 0%, 100% { box-shadow: 0 0 6px rgba(0, 255, 255, 0.4); } 50% { box-shadow: 0 0 20px rgba(0, 255, 255, 1); } }

/* Рівень 8: Mage (Синій) */
.vip-level-8 .vip-photo { border-color: #0070dd; animation: pulseLvl8 2.2s infinite ease-in-out; }
.vip-level-8 .vip-badge { background: linear-gradient(135deg, #002244, #0050a0); border-color: #0070dd; }
@keyframes pulseLvl8 { 0%, 100% { box-shadow: 0 0 6px rgba(0, 112, 221, 0.4); } 50% { box-shadow: 0 0 22px rgba(0, 112, 221, 1); } }

/* Рівень 9: Wizard (Індиго) */
.vip-level-9 .vip-photo { border-color: #4b0082; animation: pulseLvl9 2.1s infinite ease-in-out; }
.vip-level-9 .vip-badge { background: linear-gradient(135deg, #1a0033, #4b0082); border-color: #4b0082; }
@keyframes pulseLvl9 { 0%, 100% { box-shadow: 0 0 6px rgba(75, 0, 130, 0.5); } 50% { box-shadow: 0 0 24px rgba(75, 0, 130, 1); } }

/* Рівень 10: Sorcerer (Фіолетовий) */
.vip-level-10 .vip-photo { border-color: #a335ee; animation: pulseLvl10 2s infinite ease-in-out; }
.vip-level-10 .vip-badge { background: linear-gradient(135deg, #38006b, #7d12ff); border-color: #a335ee; }
@keyframes pulseLvl10 { 0%, 100% { box-shadow: 0 0 7px rgba(163, 53, 238, 0.5); } 50% { box-shadow: 0 0 25px rgba(163, 53, 238, 1); } }

/* Рівень 11: Warlock (Маджента) */
.vip-level-11 .vip-photo { border-color: #ff00ff; animation: pulseLvl11 1.9s infinite ease-in-out; }
.vip-level-11 .vip-badge { background: linear-gradient(135deg, #660066, #cc00cc); border-color: #ff00ff; }
@keyframes pulseLvl11 { 0%, 100% { box-shadow: 0 0 7px rgba(255, 0, 255, 0.5); } 50% { box-shadow: 0 0 26px rgba(255, 0, 255, 1); } }

/* Рівень 12: Hero (Рожевий) */
.vip-level-12 .vip-photo { border-color: #ff1493; animation: pulseLvl12 1.8s infinite ease-in-out; }
.vip-level-12 .vip-badge { background: linear-gradient(135deg, #800040, #c71585); border-color: #ff1493; }
@keyframes pulseLvl12 { 0%, 100% { box-shadow: 0 0 8px rgba(255, 20, 147, 0.5); } 50% { box-shadow: 0 0 28px rgba(255, 20, 147, 1); } }

/* Рівень 13: Champion (Кораловий) */
.vip-level-13 .vip-photo { border-color: #ff7f50; animation: pulseLvl13 1.7s infinite ease-in-out; }
.vip-level-13 .vip-badge { background: linear-gradient(135deg, #8b3e2f, #ff7f50); border-color: #ff7f50; }
@keyframes pulseLvl13 { 0%, 100% { box-shadow: 0 0 8px rgba(255, 127, 80, 0.5); } 50% { box-shadow: 0 0 28px rgba(255, 127, 80, 1); } }

/* Рівень 14: Warlord (Помаранчевий) */
.vip-level-14 .vip-photo { border-color: #ff8000; animation: pulseLvl14 1.6s infinite ease-in-out; }
.vip-level-14 .vip-badge { background: linear-gradient(135deg, #663300, #cc6600); border-color: #ff8000; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
@keyframes pulseLvl14 { 0%, 100% { box-shadow: 0 0 8px rgba(255, 128, 0, 0.6); } 50% { box-shadow: 0 0 30px rgba(255, 128, 0, 1); } }

/* Рівень 15: Legend (Червоно-помаранчевий) */
.vip-level-15 .vip-photo { border-color: #ff4500; animation: pulseLvl15 1.5s infinite ease-in-out; }
.vip-level-15 .vip-badge { background: linear-gradient(135deg, #802200, #cc3700); border-color: #ff4500; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
@keyframes pulseLvl15 { 0%, 100% { box-shadow: 0 0 9px rgba(255, 69, 0, 0.6); } 50% { box-shadow: 0 0 32px rgba(255, 69, 0, 1); } }

/* Рівень 16: Mythic (Криваво-червоний) */
.vip-level-16 .vip-photo { border-color: #ff0000; animation: pulseLvl16 1.4s infinite ease-in-out; }
.vip-level-16 .vip-badge { background: linear-gradient(135deg, #660000, #cc0000); border-color: #ff0000; text-shadow: 0 0 3px #000; box-shadow: 0 0 8px rgba(255,0,0,0.8); }
@keyframes pulseLvl16 { 0%, 100% { box-shadow: 0 0 10px rgba(255, 0, 0, 0.6), inset 0 0 5px rgba(255, 0, 0, 0.3); } 50% { box-shadow: 0 0 35px rgba(255, 0, 0, 1), inset 0 0 15px rgba(255, 0, 0, 0.6); } }

/* Рівень 17: Demigod (Малиновий/Crimson) */
.vip-level-17 .vip-photo { border-color: #dc143c; animation: pulseLvl17 1.3s infinite ease-in-out; }
.vip-level-17 .vip-badge { background: linear-gradient(135deg, #7a0016, #b00020); border-color: #dc143c; text-shadow: 0 0 4px #000; }
@keyframes pulseLvl17 { 0%, 100% { box-shadow: 0 0 12px rgba(220, 20, 60, 0.7); } 50% { box-shadow: 0 0 40px rgba(220, 20, 60, 1), inset 0 0 20px rgba(220, 20, 60, 0.8); } }

/* Рівень 18: Immortal (Сяюче Золото) */
.vip-level-18 .vip-photo { border-color: #ffd700; animation: pulseLvl18 1.2s infinite ease-in-out; }
.vip-level-18 .vip-badge { background: linear-gradient(135deg, #b8860b, #ffd700); border-color: #ffd700; color: #000; text-shadow: 0 0 5px #fff; box-shadow: 0 0 15px rgba(255,215,0,0.9); }
@keyframes pulseLvl18 { 0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.8), inset 0 0 10px rgba(255, 215, 0, 0.5); } 50% { box-shadow: 0 0 45px rgba(255, 215, 0, 1), inset 0 0 25px rgba(255, 215, 0, 0.9); } }

/* Рівень 19: Divine (Платиновий/Електрик) */
.vip-level-19 .vip-photo { border-color: #e5e4e2; animation: pulseLvl19 1s infinite alternate; }
.vip-level-19 .vip-badge { background: linear-gradient(135deg, #ffffff, #87cefa); border-color: #e5e4e2; color: #000; text-shadow: 0 0 8px #00bfff; }
@keyframes pulseLvl19 {
    0% { box-shadow: 0 0 15px #ffffff, 0 0 20px #00bfff; border-color: #ffffff; }
    100% { box-shadow: 0 0 50px #ffffff, 0 0 30px #00bfff, inset 0 0 20px #00bfff; border-color: #00bfff; }
}

/* Рівень 20: Creator (Призматичний / Максимальний) */
.vip-level-20 .vip-photo { border-color: #fff; animation: pulseLvl20 1.5s infinite linear; }
.vip-level-20 .vip-badge { background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000); background-size: 400%; border-color: #fff; text-shadow: 0 0 5px #000; animation: gradientShift 3s infinite linear; }
@keyframes pulseLvl20 {
    0%   { box-shadow: 0 0 20px #ff0000, inset 0 0 15px #ff0000; }
    25%  { box-shadow: 0 0 30px #fffb00, inset 0 0 15px #fffb00; }
    50%  { box-shadow: 0 0 40px #00ffd5, inset 0 0 20px #00ffd5; }
    75%  { box-shadow: 0 0 30px #7a00ff, inset 0 0 15px #7a00ff; }
    100% { box-shadow: 0 0 20px #ff0000, inset 0 0 15px #ff0000; }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.profile__links { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.nav__gear { color: var(--faint); font-size: 14px; }
.nav__user:hover .nav__gear { color: var(--gold-2); }
.profile .vip-frame { margin: 4px 6px 12px 4px; }
@media (min-width: 1181px) { .nav__link--settings { display: none; } }

/* ---------- Admin item editor: texts per language, icon picker ---------- */
.texts { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; background: rgba(0, 0, 0, .15); }
.texts__radio { position: absolute; opacity: 0; pointer-events: none; }
.texts__tabs { display: flex; gap: 6px; }
.texts__tab { cursor: pointer; }
.texts__panel { display: none; gap: 12px; }
.texts__desc { min-height: 96px; resize: vertical; }
#texts-uk:checked ~ .texts__panel--uk, #texts-en:checked ~ .texts__panel--en, #texts-ru:checked ~ .texts__panel--ru { display: grid; }
#texts-uk:checked ~ .texts__tabs .texts__tab--uk, #texts-en:checked ~ .texts__tabs .texts__tab--en, #texts-ru:checked ~ .texts__tabs .texts__tab--ru { color: #1a1206; background: var(--gold); border-color: var(--gold); font-weight: 600; }
.icon-field { display: flex; gap: 8px; }
.icon-field .input { flex: 1; min-width: 0; }
.icon-picker { width: min(96vw, 900px); display: none; }
.icon-picker[open] { display: grid; gap: 12px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; max-height: 60vh; overflow-y: auto; padding: 2px; }
.icon-grid__btn { aspect-ratio: 1; display: grid; place-items: center; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); cursor: pointer; }
.icon-grid__btn img { width: 44px; height: 44px; object-fit: contain; }
.icon-grid__btn:hover { border-color: var(--gold-3); background: rgba(226, 181, 90, .08); }
.icon-grid__btn.is-active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(226, 181, 90, .35); }
.icon-grid__btn[hidden] { display: none; }
.product__desc { white-space: pre-line; }

/* ---------- Admin: send to a character ---------- */
.send-form { gap: 18px; }
.send-block { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; background: rgba(0, 0, 0, .15); }
.send-pick { position: relative; display: grid; gap: 8px; }
.send-pick .form--inline .input--select { flex: 0 0 auto; }
.pick-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin: 4px 0 0; padding: 4px; list-style: none; max-height: 340px; overflow-y: auto; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); box-shadow: var(--shadow); }
.pick-list__btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pick-list__btn:hover, .pick-list__btn:focus-visible { background: rgba(226, 181, 90, .1); }
.pick-list__item .item__name { flex: 1; min-height: 0; -webkit-line-clamp: 1; }
.pick-list__empty { padding: 8px 10px; }
.item__icon--sm { width: 44px; height: 44px; flex: none; border-width: 1px; border-radius: 9px; }
.item__icon--sm img { width: 36px; height: 36px; }
.send-target { margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(95, 208, 141, .08); border: 1px solid rgba(95, 208, 141, .35); color: #bff0d2; }
.send-items { display: grid; gap: 8px; }
.send-item { display: grid; grid-template-columns: auto 1fr 130px 110px auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.send-item__name { font-weight: 600; color: color-mix(in srgb, var(--r, var(--text)) 70%, #fff); word-break: break-word; }
.send-item__field { display: grid; gap: 2px; }
.send-item__field .input { padding: 8px 10px; }
@media (max-width: 720px) {
    .send-item { grid-template-columns: auto 1fr auto; }
    .send-item__field { grid-column: span 1; }
}

/* Item id fields with search (data-item-pick) */
.item-pick { position: relative; display: grid; gap: 6px; flex: 1 1 200px; min-width: 0; }
.item-pick > .input { width: 100%; }
.item-pick__preview { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.item-pick__name { font-weight: 600; color: color-mix(in srgb, var(--r, var(--text)) 75%, #fff); }
.item-pick .pick-list { top: 46px; }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.chat__side { padding: 12px; display: grid; gap: 10px; align-content: start; box-shadow: none; height: calc(100vh - 210px); min-height: 460px; overflow-y: auto; overscroll-behavior: contain; }
.chat-nav { display: grid; gap: 2px; }
.chat-nav__title { margin: 10px 8px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.chat-nav__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-size: 14px; }
.chat-nav__item:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.chat-nav__item.is-active { background: rgba(226, 181, 90, .12); color: var(--gold-2); }
.chat-nav__icon { width: 24px; text-align: center; }
.chat-nav__avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; }
.chat-nav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-nav__badge, .nav__badge { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.nav__badge { margin-left: 4px; }
.chat-tools summary { cursor: pointer; padding: 6px 10px; font-size: 13px; color: var(--gold-2); }
.chat-tools__form { padding: 6px 4px 4px; gap: 8px; }
.chat__main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: calc(100vh - 210px); min-height: 460px; padding: 0; box-shadow: none; overflow: hidden; }
.chat__head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.chat__title { font: 700 19px/1.2 var(--font-display); color: var(--gold-2); }
.chat__hint { margin: 0; font-size: 13px; }
.chat__log { overflow-y: auto; padding: 14px 18px; display: grid; align-content: start; gap: 6px; }
.chat__older { justify-self: center; margin-bottom: 8px; }
.chat__empty { text-align: center; padding: 30px 0; }
.chat__composer { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: end; padding: 12px 14px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .15); }
.chat__input { resize: none; min-height: 46px; max-height: 160px; }
.chat__attach { cursor: pointer; height: 46px; }
.chat__status { grid-column: 1 / -1; margin: 0; min-height: 0; color: var(--warn); }
.chat__status:empty { display: none; }
.chat__locked { margin: 12px 14px; }
.chat-members summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.chat-members__list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.chat-members .form--inline { margin: 6px 0; }

.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 6px 8px; border-radius: 10px; }
.msg:hover { background: rgba(255, 255, 255, .025); }
.msg__avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.msg__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg__name { font-weight: 700; font-size: 14px; color: var(--text); }
a.msg__name:hover { color: var(--gold-2); }
.msg--mine .msg__name { color: var(--magic); }
.msg--admin .msg__name { color: var(--danger); }
.msg--mod .msg__name { color: var(--warn); }
.msg__role { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 1px 6px; border-radius: 6px; border: 1px solid currentColor; color: var(--warn); }
.msg__time { font-size: 11px; color: var(--faint); }
.msg__del { margin-left: auto; opacity: 0; transition: opacity .15s; }
.msg:hover .msg__del, .msg__del:focus-within { opacity: 1; }
.msg__del-btn { border: 0; background: none; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; }
.msg__del-btn:hover { color: var(--danger); }
.msg__text { margin: 2px 0 0; color: #d8d4c8; font-size: 14px; line-height: 1.55; word-break: break-word; }
.msg__text a { text-decoration: underline; }
.msg__image { display: inline-block; margin-top: 6px; line-height: 0; }
.msg__image img { max-width: min(100%, 360px); max-height: 280px; border-radius: 10px; border: 1px solid var(--line); }
.msg__file { display: inline-block; margin-top: 6px; font-size: 13px; }

@media (max-width: 820px) {
    .chat { grid-template-columns: 1fr; }
    .chat__side { height: auto; min-height: 0; max-height: 45vh; }
    .chat__main { height: 70vh; }
    .msg__del { opacity: 1; }
}

/* Nav dropdown (community) */
.nav__drop { position: relative; }
.nav__drop > summary { list-style: none; cursor: pointer; }
.nav__drop > summary::-webkit-details-marker { display: none; }
.nav__drop.is-active > summary { color: var(--gold-2); }
.nav__menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 180px; display: grid; gap: 2px; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); box-shadow: var(--shadow); }
@media (max-width: 1180px) {
    .nav__menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; background: none; }
}

/* ---------- Guides ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.guide-card { display: grid; grid-template-rows: 160px auto; overflow: hidden; color: var(--text); box-shadow: none; transition: transform .2s, border-color .2s; }
.guide-card:hover { color: var(--text); transform: translateY(-3px); border-color: var(--gold-3); }
.guide-card__cover { display: grid; place-items: center; background: linear-gradient(135deg, rgba(226, 181, 90, .12), rgba(111, 157, 255, .1)); font-size: 46px; overflow: hidden; }
.guide-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.guide-card__body { display: grid; gap: 6px; padding: 14px 16px 16px; align-content: start; }
.guide-card__title { font: 700 18px/1.25 var(--font-display); color: var(--gold-2); }
.guide-card__text { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.guide-card__meta { font-size: 12px; color: var(--faint); }
.prose img { max-width: 100%; }

/* ---------- Likes & comments ---------- */
.like { margin-top: 18px; }
.like__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--muted); font: 600 14px/1 var(--font); cursor: pointer; }
.like__btn:hover { border-color: #ff6f91; color: #ffb3c4; }
.like__btn.is-on { border-color: #ff6f91; background: rgba(255, 111, 145, .12); color: #ff9fb5; }
.comments { margin-top: 16px; padding: 20px 22px; box-shadow: none; display: grid; gap: 10px; }
.comments__title { font-size: 18px; }
.comment { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.comment--d1 { margin-left: 28px; }
.comment--d2, .comment--d3 { margin-left: 56px; }
.comment__actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.comment__react { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 999px; padding: 2px 9px; font: 12px/1.5 var(--font); cursor: pointer; }
.comment__react:hover { color: var(--text); border-color: var(--line-2); }
.comment__react.is-on { color: var(--gold-2); border-color: var(--gold-3); }
.comment__del:hover { color: var(--danger); border-color: var(--danger); }
.comment__reply summary { cursor: pointer; font-size: 12px; color: var(--gold-2); list-style: none; padding: 2px 6px; }
.comment__reply[open] { flex-basis: 100%; }
.comment-form { gap: 8px; margin-top: 6px; }
.comment-form--main { padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- Gallery ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.media-card { display: grid; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: transform .2s, border-color .2s; }
.media-card:hover { color: var(--text); transform: translateY(-3px); border-color: var(--gold-3); }
.media-card__thumb { position: relative; aspect-ratio: 16 / 10; background: #05060a; display: grid; place-items: center; overflow: hidden; }
.media-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.media-card:hover .media-card__thumb img { transform: scale(1.05); }
.media-card__icon { font-size: 40px; color: var(--muted); }
.media-card__play { position: absolute; inset: auto auto 10px 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .65); color: #fff; font-size: 14px; }
.media-card__body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.media-card__title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card__meta { font-size: 12px; color: var(--faint); }
.media-view__frame { line-height: 0; border-radius: 12px; overflow: hidden; background: #000; }
.media-view__frame img, .media-view__frame video { width: 100%; height: auto; max-height: 75vh; object-fit: contain; }
.media-view__frame iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.media-view__desc { margin: 14px 0 0; color: #d6d2c6; }
.media-view__manage { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.media-view__manage summary { cursor: pointer; color: var(--gold-2); font-size: 14px; margin-bottom: 10px; }
.media-view__manage .form { margin-bottom: 10px; }
.admin-thumb { object-fit: cover; border-radius: 6px; }

/* ---------- Prize reveal (case opening) ---------- */
.prize { position: relative; overflow: hidden; padding-top: 30px; }
.prize .sheet__close { position: absolute; z-index: 3; }
.prize__stage { position: relative; width: 220px; height: 170px; margin: 6px auto 4px; display: grid; place-items: center; }
.prize__stage .prize__icon { position: relative; z-index: 2; margin: 0; }
/* soft glow and light rays centred on the item, faded at the edges so they never look cut off */
.prize__burst { position: absolute; inset: 0; border-radius: 50%; z-index: 0;
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent) 0, color-mix(in srgb, var(--c) 18%, transparent) 40%, transparent 70%); }
.prize__rays { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; z-index: 1; border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 45%, transparent) 0 6deg, transparent 6deg 22deg);
    -webkit-mask: radial-gradient(circle, transparent 0 22%, #000 32%, transparent 68%); mask: radial-gradient(circle, transparent 0 22%, #000 32%, transparent 68%);
    animation: spin 12s linear infinite; }
.prize__sparks { position: absolute; inset: 0; z-index: 1; }
.prize__sparks i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); opacity: 0; }
.prize.is-revealed .prize__burst { animation: burstIn .7s ease-out both, glowPulse 2.4s ease-in-out .7s infinite; }
.prize.is-revealed .prize__rays { animation: raysIn .8s ease-out both, spin 12s linear infinite; }
.prize.is-revealed .prize__icon { animation: iconPop .6s cubic-bezier(.2, 1.6, .4, 1) .1s both; }
.prize.is-revealed .prize__title { animation: riseIn .4s ease-out .35s both; }
.prize.is-revealed .prize__subtitle { animation: riseIn .4s ease-out .45s both; }
.prize__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.prize__actions [hidden] { display: none; }
.prize.is-revealed .prize__sparks i { animation: spark .9s ease-out .15s both; }
.prize__sparks i:nth-child(1) { --dx: 0px; --dy: -95px; }
.prize__sparks i:nth-child(2) { --dx: 70px; --dy: -65px; }
.prize__sparks i:nth-child(3) { --dx: 98px; --dy: 0px; }
.prize__sparks i:nth-child(4) { --dx: 70px; --dy: 65px; }
.prize__sparks i:nth-child(5) { --dx: 0px; --dy: 92px; }
.prize__sparks i:nth-child(6) { --dx: -70px; --dy: 65px; }
.prize__sparks i:nth-child(7) { --dx: -98px; --dy: 0px; }
.prize__sparks i:nth-child(8) { --dx: -70px; --dy: -65px; }
@keyframes burstIn { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes glowPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: .8; } }
@keyframes raysIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes iconPop { from { transform: scale(0) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes riseIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spark { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .prize__rays, .prize__burst { animation: none !important; } }

.stepper__btn--edge { width: auto; padding: 0 10px; font-size: 12px; font-weight: 700; }
.coin { width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; margin-left: 3px; }
.currency-pick__opt .coin { margin: 0 4px 0 0; }

/* Language dropdown */
.lang-drop { position: relative; margin-right: 6px; }
.lang-drop > summary { list-style: none; cursor: pointer; }
.lang-drop > summary::-webkit-details-marker { display: none; }
.lang-drop__current { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lang-drop__current:hover, .lang-drop[open] .lang-drop__current { color: var(--text); border-color: var(--line-2); }
.lang-drop__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 160px; display: grid; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); box-shadow: var(--shadow); }
.lang-drop__item { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.lang-drop__item b { display: inline-block; width: 26px; color: var(--faint); }
.lang-drop__item:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.lang-drop__item.is-active { color: var(--gold-2); }
@media (max-width: 1180px) {
    .lang-drop { align-self: flex-start; margin: 6px 0; }
    .lang-drop__menu { left: 0; right: auto; }
}

/* Cookie notice */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 760px; margin: 0 auto; display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(16, 19, 29, .97); box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.cookie-bar__text { margin: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .cookie-bar { flex-direction: column; align-items: stretch; } }

/* Top-up rules */
.rules-card { padding: 20px 22px; box-shadow: none; margin-bottom: 18px; border-color: rgba(240, 176, 74, .45); }
.rules-card.is-agreed { border-color: var(--line); }
.rules-card__list { margin: 10px 0 14px; padding-left: 20px; display: grid; gap: 6px; color: #d6d2c6; font-size: 14px; }
.rules-card__ok { margin: 0; color: var(--ok); font-weight: 600; }
.rules-card__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; cursor: pointer; list-style: none; }
.rules-card__summary::-webkit-details-marker { display: none; }
.rules-card__summary::after { content: "\25BE"; margin-left: auto; color: var(--faint); transition: transform .2s; }
details[open] > .rules-card__summary::after { transform: rotate(180deg); }
.rules-card__summary .rules-card__ok { font-size: 13px; }
details.rules-card[open] .rules-card__list { margin-bottom: 0; }
.rules-card__form { align-items: center; gap: 14px; }
.pay-grid.is-locked .pay-card { opacity: .75; }

/* ---------- Home: trailer + downloads, screenshot viewer ---------- */
.downloads { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.trailer { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #000; border: 1px solid rgba(226, 181, 90, .3); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.trailer__poster { display: block; width: 100%; height: 100%; position: relative; color: #fff; }
.trailer__poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.8); transition: filter .25s, transform .4s; }
.trailer__poster:hover img { filter: brightness(1); transform: scale(1.03); }
.trailer__play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; padding-left: 6px; background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); color: #1a1206; box-shadow: 0 0 0 8px rgba(226, 181, 90, .25), 0 10px 30px rgba(0, 0, 0, .6); transition: transform .2s; }
.trailer__poster:hover .trailer__play { transform: scale(1.08); }
.trailer__label { position: absolute; left: 16px; bottom: 14px; font: 700 18px/1 var(--font-display); text-shadow: 0 2px 8px #000; }
.trailer__frame { width: 100%; height: 100%; border: 0; display: block; }
.dl-cards { display: grid; gap: 14px; align-content: center; }
.dl-card { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(28, 33, 48, .92), rgba(16, 19, 29, .94)); }
.dl-card__icon { width: 56px; height: 56px; flex: none; display: grid; place-items: center; font-size: 30px; border-radius: 14px; background: rgba(226, 181, 90, .08); border: 1px solid rgba(226, 181, 90, .3); }
.dl-card__title { font: 700 20px/1.1 var(--font-display); color: var(--gold-2); }
.dl-card__ver { margin: 4px 0 10px; font-size: 13px; color: var(--muted); }
.dl-card__btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 820px) { .downloads { grid-template-columns: 1fr; } }

.lightbox { width: min(96vw, 1400px); max-width: none; max-height: 94vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(3, 4, 8, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__img { max-width: 100%; max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .7); user-select: none; }
.lightbox__nav, .lightbox__close { position: fixed; z-index: 2; border: 1px solid rgba(255, 255, 255, .2); background: rgba(10, 12, 18, .7); color: #fff; cursor: pointer; border-radius: 50%; display: grid; place-items: center; }
.lightbox__nav { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 22px; }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__close { top: 16px; right: 18px; width: 44px; height: 44px; font-size: 26px; }
.lightbox__nav:hover, .lightbox__close:hover { border-color: var(--gold); color: var(--gold-2); }
.lightbox__count { position: fixed; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .lightbox__nav { width: 42px; height: 42px; } .lightbox__nav--prev { left: 6px; } .lightbox__nav--next { right: 6px; } }

.msg__tr { border: 0; background: none; padding: 0; margin-top: 2px; color: var(--faint); font: 12px/1.4 var(--font); cursor: pointer; }
.msg__tr:hover { color: var(--gold-2); }
.msg__translated { margin: 4px 0 0; padding: 4px 10px; border-left: 2px solid var(--magic); color: #cdeee9; font-size: 13px; }

/* Cabinet: available promo codes */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.promo-card { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border-radius: var(--radius); border: 1px dashed rgba(226, 181, 90, .45); background: linear-gradient(180deg, rgba(226, 181, 90, .06), rgba(16, 19, 29, .9)); }
.promo-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.promo-card__code { font-size: 16px; font-weight: 700; color: var(--gold-2); letter-spacing: .06em; }
.promo-card__title { margin: 0; font-weight: 600; }
.promo-card__item { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: color-mix(in srgb, var(--r) 70%, #fff); }
.promo-card__rewards, .promo-card__meta { margin: 0; font-size: 12px; color: var(--muted); }
.promo-card .btn { justify-self: start; margin-top: 4px; }

/* Cabinet characters */
.char__head { position: relative; }
.char__remove { margin-left: auto; align-self: flex-start; }
.chars__status { margin: 0 0 10px; }
.chars__add { margin-top: 12px; }
.chars__add summary { cursor: pointer; color: var(--gold-2); font-size: 14px; margin-bottom: 8px; }
.btn.is-busy { opacity: .6; }
.char__class { width: 38px; height: 38px; flex: none; }

/* ==========================================================================
   Shop: "New" dot on category tabs
   ========================================================================== */
.tab__new { display: inline-block; width: 8px; height: 8px; margin-left: 6px; vertical-align: 2px; border-radius: 50%; background: var(--magic); box-shadow: 0 0 8px rgba(111, 220, 207, .8); }

/* ==========================================================================
   Rules / Privacy / About: modal + own page; footer links
   ========================================================================== */
.footer__info a { color: var(--faint); font-size: 13px; }
.info-dialog { width: min(94vw, 760px); }
.info-page { max-width: 860px; }
.info-page__card { padding: 28px; }
.info-page__title { font: 700 22px/1.25 var(--font-display); color: var(--gold-2); margin: 0 30px 16px 0; }
.info-page__text { font-size: 15px; }
.info-page__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 4px 0; font-size: 14px; }
.info-edit { display: grid; gap: 12px; }
.info-edit summary { cursor: pointer; }
.info-edit__lang { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; display: grid; gap: 10px; }
.info-edit__html { font: 13px/1.5 ui-monospace, Consolas, monospace; min-height: 160px; }
@media (max-width: 560px) { .info-page__card { padding: 20px 16px; } }

/* ==========================================================================
   Project finances
   ========================================================================== */
.finance__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.finance__card { padding: 22px; display: grid; gap: 12px; align-content: start; box-shadow: none; }
.finance__chart-card { grid-column: 1 / -1; }
.finance__h { font: 700 18px/1.25 var(--font-display); color: var(--gold-2); margin: 0; }
.finance__big { font: 700 26px/1.2 var(--font); margin: 0; }
.finance__big .coin, .finance__reserve-value .coin, .finance__plus .coin { width: 18px; height: 18px; vertical-align: -3px; }
.finance__progress { height: 10px; }
.finance__note { margin: 0; font-size: 13px; }
.finance__label { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.finance__reserve { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; border: 1px solid rgba(111, 220, 207, .3); background: rgba(111, 220, 207, .06); }
.finance__reserve.is-low { border-color: rgba(240, 120, 90, .45); background: rgba(240, 120, 90, .06); }
.finance__reserve-icon { font-size: 30px; line-height: 1; }
.finance__reserve-value { margin: 2px 0; font-weight: 700; font-size: 20px; color: var(--magic); }
.finance__card .btn { justify-self: start; }
.finance__list { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: #d6d2c6; }
.finance__chart { width: 100%; height: auto; max-height: 280px; display: block; }
.finance__bar rect { fill: rgba(111, 220, 207, .45); transition: fill .15s; }
.finance__bar:hover rect, .finance__bar.is-now rect { fill: var(--magic); }
.finance__bar-value { fill: var(--muted); font: 600 11px var(--font); }
.finance__bar-label { fill: var(--faint); font: 500 12px var(--font); }
.finance__tops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.finance__rank { list-style: none; counter-reset: rank; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.finance__rank li { counter-increment: rank; display: flex; gap: 8px; justify-content: space-between; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, .2); font-size: 14px; }
.finance__rank li::before { content: counter(rank); min-width: 18px; color: var(--faint); font-weight: 700; }
.finance__rank li.is-top1 { border-left: 3px solid #ffd257; }
.finance__rank li.is-top2 { border-left: 3px solid #c9d1dc; }
.finance__rank li.is-top3 { border-left: 3px solid #d08a4a; }
.finance__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance__sum { font-weight: 700; color: var(--gold-2); }
.finance__recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.finance__recent li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 8px; background: rgba(0, 0, 0, .2); }
.finance__recent li > span { display: grid; min-width: 0; }
.finance__plus { color: var(--ok); white-space: nowrap; }
.finance__updated { font-size: 12px; text-align: center; margin: 16px 0 0; }
.finance-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px 22px; align-items: center; padding: 16px 20px; margin: 24px 0; color: var(--text); box-shadow: none; }
.finance-mini:hover { color: var(--text); border-color: var(--gold); }
.finance-mini__main, .finance-mini__side { display: grid; gap: 4px; }
.finance-mini__more { color: var(--gold-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
@media (max-width: 820px) {
    .finance__grid { grid-template-columns: minmax(0, 1fr); }
    .finance-mini { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) { .finance__tops { grid-template-columns: minmax(0, 1fr); } }
/* Already activated codes in the cabinet: greyed, no actions */
.promo-card.is-used { border-style: solid; border-color: var(--line); background: rgba(16, 19, 29, .6); filter: grayscale(1); opacity: .55; }
.promo-card.is-used .promo-card__code { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.promo-card__used { border-color: var(--line-2); color: var(--muted); white-space: nowrap; }

/* ==========================================================================
   Phone: cabinet header (kept last so it wins over the general rules above)
   Avatar + name/login/role on top; badges and buttons in a full-width row below; support meter last.
   ========================================================================== */
@media (max-width: 560px) {
    .cabinet { padding-top: 16px; }
    .profile { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px; padding: 16px 14px; }
    .profile__main { display: contents; }
    .profile__id { min-width: 0; }
    .profile .vip-photo { width: 76px; height: 76px; }
    .profile .vip-frame { margin: 2px 2px 10px; }
    .profile .vip-badge { font-size: 11px; padding: 2px 8px; bottom: -9px; }
    .profile .avatar-edit__hint { width: 24px; height: 24px; font-size: 12px; right: -2px; top: -2px; }
    .profile__name { font-size: 20px; }
    .profile__meta { margin: 3px 0 4px; font-size: 12.5px; }
    .profile__vip-title { margin: 0; }
    .profile .badges, .profile__links { grid-column: 1 / -1; margin: 0; gap: 6px; }
    .profile .badge { font-size: 12px; padding: 3px 9px; }
    .profile .badge--vip-dup { display: none; }
    .profile__links { display: flex; flex-wrap: wrap; }
    .profile__links .btn { padding: 7px 11px; font-size: 13px; }
    .profile__vip { grid-column: 1 / -1; width: 100%; min-width: 0; padding: 12px 14px; }
}
@media (max-width: 380px) {
    .container { padding-left: 12px; padding-right: 12px; }
    .profile { padding: 14px 12px; }
}

/* ==========================================================================
   Chat: one pane at a time on phones/tablets (desktop keeps both columns)
   ========================================================================== */
.chat__head-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat__back { display: none; flex: none; width: 36px; height: 36px; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); color: var(--text); font-size: 20px; line-height: 1; }
.chat__back:hover { color: var(--gold-2); border-color: var(--gold); }
@media (max-width: 820px) {
    .chat-page.store { padding-top: 12px; padding-bottom: 12px; }
    .chat-page .store__head { display: none; }
    .chat { gap: 0; }
    /* List view */
    .chat--list .chat__main { display: none; }
    .chat--list .chat__side { height: auto; min-height: 0; max-height: none; overflow: visible; }
    .chat--list .chat-nav__item { padding: 12px; font-size: 15px; }
    /* Conversation view: fills the screen under the top bar (67px), the log scrolls, the input stays at the bottom */
    .chat--open .chat__side { display: none; }
    .chat--open .chat__main { height: calc(100dvh - 67px - 24px); min-height: 300px; }
    .chat__back { display: inline-grid; }
    .chat__head { padding: 10px 12px; }
    .chat__title { font-size: 17px; }
    .chat--open .chat__hint { display: none; }
    .chat__log { padding: 10px 10px; overscroll-behavior: contain; }
    .chat__composer { padding: 8px 10px; gap: 6px; }
    body:has(.chat--open) .footer { display: none; }
}

/* ==========================================================================
   Bottom tab bar for signed-in players on phones/tablets
   ========================================================================== */
.tabbar { display: none; }
#cases { scroll-margin-top: 80px; }
@media (max-width: 820px) {
    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: repeat(5, 1fr);
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: rgba(10, 12, 19, .96);
        border-top: 1px solid rgba(226, 181, 90, .25); box-shadow: 0 -8px 24px rgba(0, 0, 0, .45); backdrop-filter: blur(8px);
    }
    .tabbar__item { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px 4px; border-radius: 10px; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; }
    .tabbar__item:hover { color: var(--text); }
    .tabbar__item.is-active { color: var(--gold-2); background: rgba(226, 181, 90, .08); }
    .tabbar__icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .tabbar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tabbar__badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; }
    .tabbar__badge--ok { background: var(--magic); color: #06231f; }
    /* Room for the bar under the page, the cookie notice and the open chat */
    body:has(.tabbar) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    body:has(.tabbar) .cookie-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
    body:has(.tabbar) .chat--open .chat__main { height: calc(100dvh - 67px - 24px - 64px - env(safe-area-inset-bottom)); }
    /* Typing in the chat: the keyboard needs the space */
    body:has(.chat__input:focus) .tabbar { display: none; }
    body:has(.tabbar):has(.chat__input:focus) .chat--open .chat__main { height: calc(100dvh - 67px - 24px); }
}

/* Rating: account VIP level next to the character name (same colours as the avatar ribbon) */
.vip-badge--inline { position: static; transform: none; display: inline-block; margin-left: 6px; padding: 0 7px; font-size: 10px; line-height: 16px; vertical-align: 1px; box-shadow: none; animation: none; }
@media (max-width: 560px) {
    /* Rating on phones: tighter cells, numbers on one line */
    .rating th, .rating td { padding: 10px 6px; }
    .rating th:first-child, .rating td:first-child { padding-left: 10px; }
    .rating td.num { white-space: nowrap; font-size: 13px; }
    .rating .place { width: 26px; height: 26px; font-size: 12px; }
    /* Tab bar labels must fit 5 across at 320px */
    .tabbar__item { padding-left: 0; padding-right: 0; }
    .tabbar__label { font-size: 10.5px; letter-spacing: -.01em; }
}
@media (max-width: 560px) { .gallery__item--wide { display: none; } }
.comment__text > * { margin: 0; }
.comment__text > * + * { margin-top: .5em; }
.comment__text img { max-width: min(100%, 360px); height: auto; border-radius: 8px; }
.tabbar__dot { display: none; }
@media (max-width: 820px) {
    .tabbar__dot { display: block; position: absolute; top: 5px; left: calc(50% + 9px); width: 9px; height: 9px; border-radius: 50%; background: var(--magic); box-shadow: 0 0 8px rgba(111, 220, 207, .9); }
}
/* Chat send: icon + text on wide screens, a round icon button on phones; shop wallet smaller on phones */
.chat__send { gap: 8px; height: 46px; }
.chat__send-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 820px) {
    .chat__composer { grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; }
    .chat__input { min-height: 42px; }
    .chat__attach, .chat__send { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; }
    .chat__send-label { display: none; }
    .chat__send-icon { width: 20px; height: 20px; }
}
@media (max-width: 560px) {
    .wallet { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 6px; width: 100%; }
    .wallet__item { min-width: 0; padding: 6px 10px; }
    .wallet__item small { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .wallet__item strong { font-size: 14px; }
}
.gallery__item[hidden] { display: none; }

/* ==========================================================================
   Players' mini profile (modal or /u/{id}) and clickable names
   ========================================================================== */
.profile-link { color: inherit; cursor: pointer; }
.profile-link:hover { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.info-dialog--profile { width: min(94vw, 440px); }
.pcard { display: grid; gap: 14px; }
.pcard__head { display: flex; gap: 16px; align-items: center; }
.pcard__head .vip-frame { margin-bottom: 10px; }
.pcard__id { min-width: 0; display: grid; gap: 4px; }
.pcard__name { font: 700 22px/1.2 var(--font-display); color: var(--gold-2); margin: 0 26px 0 0; word-break: break-word; }
.pcard__meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pcard__since { margin: 0; font-size: 13px; }
.pcard__sub { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.pcard__chars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pcard__chars li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .2); font-size: 14px; }
.pcard__char { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard__chars .muted { white-space: nowrap; font-size: 13px; }
.pcard__actions { display: flex; gap: 8px; }
.pager__gap { min-width: 22px; padding: 8px 0; text-align: center; color: var(--faint); }
.pager__arrow { font-size: 18px; line-height: 1; padding: 6px 10px; }
@media (max-width: 420px) { .pager { gap: 4px; } .pager__page { min-width: 32px; padding: 6px 8px; } }

/* Long item lists: cards outside the screen are not laid out or painted (and their animations idle) */
.item-grid > .item { content-visibility: auto; contain-intrinsic-size: auto 190px; }
@media (prefers-reduced-motion: reduce) { .item__icon::before, .item__icon::after { animation: none !important; } }.mono-code { display: inline-flex; align-items: center; gap: 8px; }
.mono-code code { font-size: 17px; font-weight: 700; letter-spacing: .08em; color: var(--gold-2); padding: 4px 10px; border-radius: 8px; border: 1px dashed rgba(226, 181, 90, .5); }
.pay-card__note { white-space: normal; }

/* ==========================================================================
   Battle pass (cabinet → Bonuses)
   ========================================================================== */
.pass__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px; align-items: center; padding: 16px 18px; margin-bottom: 14px; box-shadow: none; }
.pass__xp { display: grid; gap: 4px; }
.pass__xp strong { font-size: 22px; color: var(--magic); }
.pass__how, .pass__paid { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.pass__paid { color: var(--warn); }
.pass__paid.is-open { color: var(--ok); }
.pass__track { display: flex; gap: 8px; align-items: flex-start; }
.pass__levels { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scroll-padding-left: 2px; }
.pass__legend, .pass__col { flex: none; display: grid; grid-template-rows: 44px 118px 118px; gap: 8px; }
.pass__legend { width: 34px; padding-top: 2px; }
.pass__lvl--blank { visibility: hidden; }
.pass__row-label { display: grid; place-items: center; text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.pass__row-label--paid { color: var(--gold-2); border-color: rgba(226, 181, 90, .45); }
.pass__col { width: 112px; scroll-snap-align: start; }
.pass__lvl { display: grid; place-items: center; align-content: center; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); line-height: 1.1; }
.pass__lvl b { font-size: 16px; }
.pass__lvl small { font-size: 10px; color: var(--faint); }
.pass__col.is-reached .pass__lvl { border-color: var(--magic); color: var(--magic); }
.pass__reward { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 8px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.pass__reward--empty { color: var(--faint); }
.pass__icon { display: grid; place-items: center; width: 40px; height: 40px; font-size: 22px; color: var(--gold-2); }
.pass__label { font-size: 11px; line-height: 1.25; color: var(--muted); }
.pass__reward.is-ready { border-color: var(--gold); box-shadow: 0 0 12px rgba(226, 181, 90, .35); }
.pass__reward.is-claimed { opacity: .55; }
.pass__reward.is-locked { filter: grayscale(.7); opacity: .7; }
.pass__state { position: absolute; top: 4px; right: 6px; font-size: 13px; }
.pass__claim { margin: 0; }
.pass__claim .btn { padding: 4px 10px; font-size: 12px; }
@media (max-width: 560px) {
    .pass__top { grid-template-columns: minmax(0, 1fr); }
    .pass__col { width: 96px; }
    .pass__legend, .pass__col { grid-template-rows: 40px 110px 110px; }
}
.bp-edit { display: grid; gap: 6px; overflow-x: auto; }
.bp-edit__row { display: grid; grid-template-columns: 28px 90px repeat(2, minmax(260px, 1fr)); gap: 8px; align-items: center; min-width: 680px; }
.bp-edit__row--head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.bp-edit__n { color: var(--faint); text-align: right; }
.bp-edit__reward { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 4px; }
.bp-edit .input { padding: 7px 8px; font-size: 13px; }
/* Track labels as narrow vertical tabs, so they never cover the first level */
.pass__row-label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; letter-spacing: .08em; padding: 6px 0; }
@media (max-width: 560px) { .pass__legend { width: 28px; } .pass__row-label { font-size: 10px; } }
.bp-edit__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Back to top (app.js shows it after about a screen of scrolling on long pages) */
.to-top { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 79; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(226, 181, 90, .45); background: rgba(11, 13, 20, .9); color: var(--gold-2); cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s, border-color .2s; }
.to-top.is-shown { opacity: 1; transform: none; }
.to-top:hover { border-color: var(--gold); }
.to-top:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 820px) {
    body:has(.tabbar) .to-top { bottom: calc(76px + env(safe-area-inset-bottom)); }
    body:has(.chat__input:focus) .to-top { display: none; }
}
body:has(.cookie-bar) .to-top { display: none; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* Server status page (/status, data from cron/online.php) */
.status-page__today { margin: 0 0 14px; color: var(--muted); }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 12px; }
.status-card { padding: 16px; display: grid; gap: 10px; }
.status-card__head { display: flex; align-items: center; gap: 10px; }
.status-card__name { margin: 0; font-size: 18px; flex: 1; }
.status-card__state { font-size: 12px; color: var(--muted); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; }
.status-card.is-up .status-dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status-card__now { margin: 0; color: var(--muted); }
.status-card__now strong { color: var(--gold-2); font-size: 18px; }
.status-lines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; }
.status-lines li { display: flex; justify-content: space-between; gap: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); font-size: 13px; }
.status-lines li.is-closed { opacity: .6; }
.status-lines li.is-closed strong { color: var(--danger); font-weight: 600; }
.online__link { color: var(--gold-2); white-space: nowrap; }
/* Admin → Game: announcement form (interval/count only for repeating ones) */
.announce-mode { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.announce-loop { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.form:has(input[name="mode"][value="once"]:checked) .announce-loop { display: none; }
.admin-box__sub { margin: 14px 0 4px; font-size: 14px; color: var(--muted); }
.search--wrap { flex-wrap: wrap; }
.search--wrap .input--select { min-width: 0; flex: 1 1 140px; }
.admin .admin-box { min-width: 0; }
/* Character page (/character/{server}/{id}) */
.char-page { padding: 18px; display: grid; gap: 14px; }
.char-page__name { margin: 0; font: 700 22px/1.2 var(--font-display); word-break: break-word; }
.char-wallet { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.char-wallet__title { margin: 0; font-size: 15px; color: var(--muted); }
.char-link { margin-left: 4px; color: var(--faint); text-decoration: none; }
.char-link:hover { color: var(--gold-2); }
.char__name a { color: inherit; } .char__name a:hover { color: var(--gold-2); }
.game-export { border-top: 1px solid var(--line); padding: 8px 0; }
.game-export summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.game-export__head { margin: 8px 0 0; padding: 10px; max-height: 260px; overflow: auto; border-radius: 8px; background: #000; font: 12px/1.4 ui-monospace, Consolas, monospace; color: #cfd3e0; white-space: pre; }
/* Rating: equipped items as small icons (mount / equipment boards from GameRankings) */
.equip-row { display: flex; flex-wrap: wrap; gap: 3px; }
.equip-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--r, var(--line-2)); background: rgba(0, 0, 0, .3); }
.equip-icon img { width: 26px; height: 26px; object-fit: contain; }
.char-equip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.char-equip li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--r, var(--text)); }
.char-equip .equip-icon { flex: none; }
/* Cabinet character cards: equipped items as quality dots, mounts, link to the character page */
.char__gear { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; font-size: 12px; color: var(--muted); }
.char__gear-label { margin-right: 4px; }
.gear-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--r, var(--line-2)); box-shadow: 0 0 6px color-mix(in srgb, var(--r, transparent) 60%, transparent); }
.char__more { font-size: 13px; justify-self: start; }
.char-equip__text { display: grid; gap: 1px; min-width: 0; }
.char-equip__text small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.char-equip { grid-template-columns: 1fr; }
