@font-face {
    font-family: 'Minecraft';
    src: url('../fonts/minecraft.ttf') format('truetype');
    font-display: swap;
}

:root {
    --bg: #140605;
    --bg-2: #1e0907;
    --surface: #26100c;
    --surface-2: #331610;
    --line: rgba(255, 176, 102, .13);
    --text: #fbeee0;
    --muted: #c4a493;
    --dim: #8a6a5c;
    --gold: #ffc53d;
    --orange: #ff7a1a;
    --red: #e3361b;
    --soul: #5ce1d6;
    --molten: linear-gradient(180deg, #fff6c2 0%, #ffd047 28%, #ff8a1f 58%, #e3361b 88%);
    --pixel: 'Minecraft', 'Onest', system-ui, sans-serif;
    --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --header-h: 68px;
    --notch: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px));
    --notch-sm: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 72px);
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(255, 106, 26, .16), transparent 60%),
        radial-gradient(900px 700px at -10% 40%, rgba(227, 54, 27, .10), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* зерно поверх всего, чтобы градиенты не выглядели пластиком */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: .06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

:focus-visible {
    outline: 2px solid var(--soul);
    outline-offset: 3px;
}

.wrap {
    width: min(1200px, 100% - 32px);
    margin-inline: auto;
}

.embers {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

main, .site-footer { position: relative; z-index: 1; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Кнопки ---------- */

.btn {
    --btn-bg: var(--surface-2);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 26px;
    font-weight: 700;
    font-size: 16px;
    background: var(--btn-bg);
    clip-path: var(--notch);
    transition: transform .15s ease, filter .2s ease, background-color .2s;
    white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); }

.btn--fire {
    --btn-bg: linear-gradient(180deg, #ffb53a 0%, #ff7a1a 55%, #e14a14 100%);
    color: #2a0b04;
    text-shadow: 0 1px 0 rgba(255, 230, 160, .5);
    box-shadow: inset 0 -4px 0 rgba(120, 20, 0, .45), inset 0 3px 0 rgba(255, 240, 190, .55);
}
.btn--fire:hover { filter: brightness(1.08) saturate(1.1); }

.btn--ghost {
    --btn-bg: rgba(255, 176, 102, .08);
    box-shadow: inset 0 0 0 2px rgba(255, 176, 102, .22);
}

.btn[disabled] {
    filter: grayscale(.85) brightness(.7);
    cursor: not-allowed;
    transform: none;
}

.copy-ip .copy-ip__icon { width: 16px; height: 16px; opacity: .8; }

/* ---------- Шапка ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.site-header.is-scrolled {
    background: rgba(20, 6, 5, .78);
    backdrop-filter: blur(14px) saturate(1.3);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: 0 1px 0 var(--line);
}

.site-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--pixel);
    font-size: 18px;
}
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(255, 122, 26, .45)); }

.nav {
    display: flex;
    gap: 4px;
    margin-right: auto;
}
.nav a {
    padding: 8px 12px;
    color: var(--muted);
    font-weight: 500;
    font-size: 15px;
    border-radius: 6px;
    transition: color .2s, background-color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(255, 176, 102, .08); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .btn { min-height: 42px; padding: 0 16px; font-size: 13px; }

.online {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
}
.online.is-visible { display: inline-flex; }
.online b { color: var(--text); font-weight: 600; }
.online__dot {
    width: 8px; height: 8px;
    background: var(--soul);
    box-shadow: 0 0 10px var(--soul);
    animation: pulse 2s ease-in-out infinite;
}
.online.is-offline .online__dot { background: var(--dim); box-shadow: none; animation: none; }

@keyframes pulse { 50% { opacity: .35; } }

.menu-toggle { display: none; }

/* ---------- Первый экран ---------- */

.hero {
    position: relative;
    min-height: calc(100svh - var(--header-h));
    display: grid;
    align-items: center;
    padding: 40px 0 120px;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 40px;
}

.hero__copy { will-change: transform, opacity; }

.hero__title {
    position: relative;
    font-family: var(--pixel);
    font-weight: 400;
    font-size: clamp(54px, 9.4vw, 136px);
    line-height: .95;
    letter-spacing: -.01em;
    margin-bottom: 28px;
}
.hero__title span {
    position: relative;
    display: block;
    background: var(--molten);
    background-size: 100% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: molten 7s ease-in-out infinite alternate;
}
/* «выдавленные» блоки как у логотипа Minecraft */
.hero__title span::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    z-index: -1;
    color: #5a1206;
    text-shadow:
        2px 2px 0 #5a1206, 4px 4px 0 #4a0e05, 6px 6px 0 #3a0a04, 8px 8px 0 #2b0703,
        0 0 60px rgba(255, 106, 26, .55);
    -webkit-text-fill-color: #5a1206;
}
@keyframes molten {
    from { background-position: 50% 0%; }
    to   { background-position: 50% 100%; }
}

.hero__lead {
    max-width: 30em;
    font-size: clamp(17px, 1.5vw, 20px);
    color: var(--muted);
    margin-bottom: 36px;
}
.hero__lead strong { color: var(--text); font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__art {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    will-change: transform;
}
.hero__art::before {
    content: '';
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 140, 30, .55) 0%, rgba(227, 54, 27, .25) 40%, transparent 70%);
    filter: blur(30px);
    animation: breathe 4.5s ease-in-out infinite;
}
.hero__logo {
    position: relative;
    width: 118%;
    max-width: none;
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55));
    animation: float 6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.08); opacity: .8; } }
@keyframes float { 50% { transform: translateY(-14px); } }

.hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 64px;
    translate: -50% 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--dim);
    transition: opacity .3s;
}
.hero__scroll i {
    width: 4px; height: 10px;
    background: var(--orange);
    animation: drip 1.6s ease-in infinite;
}
@keyframes drip {
    0% { transform: translateY(-6px); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}

/* лавовая кромка внизу первого экрана */
.lava-edge {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='40' shape-rendering='crispEdges'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffd047'/%3E%3Cstop offset='.45' stop-color='%23ff7a1a'/%3E%3Cstop offset='1' stop-color='%23e3361b' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 24h8v-8h8v-8h16v8h8v8h16v-8h8v-8h8v-8h16v8h8v16h16v-8h16v8h8v-8h16v16H0z'/%3E%3C/svg%3E");
    background-size: 160px 40px;
    background-repeat: repeat-x;
    opacity: .5;
    animation: lava 18s linear infinite;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
@keyframes lava { to { background-position: 160px 0; } }

/* ---------- Как купить ---------- */

.steps {
    position: relative;
    padding: 72px 0 24px;
}
.steps__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 22px 22px 22px 76px;
    background: linear-gradient(180deg, rgba(51, 22, 16, .7), rgba(38, 16, 12, .55));
    clip-path: var(--notch);
}
.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 22px; top: 20px;
    width: 38px; height: 38px;
    display: grid;
    place-items: center;
    font-family: var(--pixel);
    font-size: 18px;
    color: #2a0b04;
    background: var(--molten);
    clip-path: var(--notch-sm);
}
.step h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.step p { font-size: 14.5px; color: var(--muted); }

/* ---------- Вечер на сервере: линейка расписания ---------- */

.evening { position: relative; padding: 80px 0 16px; }
.evening__head {
    display: grid;
    grid-template-columns: auto minmax(0, 30em);
    gap: 16px 48px;
    align-items: end;
}
.evening__lead { color: var(--muted); }

/* 17:00 → 23:00, --t — часы от 17:00 */
.ruler {
    position: relative;
    height: 132px;
    margin: 48px 28px 8px;
}
.ruler__track {
    position: absolute;
    left: 0; right: 0; top: 72px;
    height: 8px;
    background: repeating-linear-gradient(90deg, var(--gold) 0 8px, var(--orange) 8px 16px, var(--red) 16px 24px, var(--orange) 24px 32px);
    box-shadow: 0 0 18px rgba(255, 122, 26, .45);
}
.ruler__hour,
.ruler__event,
.ruler__now {
    position: absolute;
    left: calc(var(--t) / 6 * 100%);
    transform: translateX(-50%);
}
/* метеорит на каждом часе — золотой пиксель над линией */
.ruler__hour { top: 62px; display: grid; justify-items: center; }
.ruler__hour::before {
    content: '';
    width: 8px; height: 8px;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}
.ruler__hour::after {
    content: '';
    width: 4px; height: 12px;
    margin-top: 8px;
    background: var(--dim);
}
.ruler__hour b {
    order: 1;
    margin-top: 6px;
    font: 400 12px/1 var(--pixel);
    color: var(--dim);
}
.ruler__event {
    bottom: 68px;
    display: grid;
    justify-items: center;
    gap: 4px;
    font: 400 15px/1 var(--pixel);
    color: var(--gold);
    white-space: nowrap;
}
.ruler__event em {
    order: -1;
    font: 500 13px/1.2 var(--sans);
    font-style: normal;
    color: var(--text);
}
.ruler__event::after {
    content: '';
    width: 4px; height: 22px;
    background: currentColor;
}
.ruler__now {
    top: 58px;
    height: 74px;
    width: 2px;
    background: var(--soul);
    box-shadow: 0 0 12px var(--soul);
    font: 400 11px/1 var(--pixel);
    color: var(--soul);
}
.ruler__now::after {
    content: attr(data-label);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 6px;
}
.ruler__now[hidden] { display: none; }

.evening__list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 28px;
    margin-top: 40px;
}
.evening__list li {
    padding-top: 14px;
    border-top: 4px solid var(--orange);
}
.evening__time {
    font: 400 13px/1.2 var(--pixel);
    color: var(--gold);
    margin-bottom: 8px;
}
.evening__list h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.evening__list p:not(.evening__time) { font-size: 14.5px; color: var(--muted); }

/* Сезон и лидеры: компактные плашки, по клику раскрывается таблица */
.boards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    margin-top: 56px;
}
.board {
    background: linear-gradient(180deg, rgba(51, 22, 16, .7), rgba(38, 16, 12, .55));
    clip-path: var(--notch);
    box-shadow: inset 0 3px 0 var(--accent, var(--orange));
}
.board[hidden] { display: none; }
.board--leaders { --accent: var(--gold); }
.board__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px 22px;
    text-align: left;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}
.board__head:focus-visible { outline: 2px solid var(--gold); outline-offset: -6px; }
.board__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    font-size: 22px;
    background: rgba(255, 176, 102, .08);
    clip-path: var(--notch-sm);
}
.board__text { display: grid; gap: 4px; min-width: 0; }
.board__eyebrow {
    font: 600 11px/1 var(--sans);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
}
.board__title { font: 400 19px/1.2 var(--pixel); color: var(--accent, var(--orange)); }
.board--season .board__title { color: var(--gold); }
.board__lead { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.board__lead b { color: var(--text); font-weight: 600; }
.board__chev {
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-3px) rotate(45deg);
    transition: transform .3s ease, border-color .2s;
}
.board__head:hover .board__chev { border-color: var(--text); }
.board__head[aria-expanded="true"] .board__chev { transform: translateY(2px) rotate(-135deg); }
.board__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s ease;
}
.board.is-open .board__panel { grid-template-rows: 1fr; }
.board__inner { min-height: 0; overflow: hidden; }
.board__inner > :first-child { margin-top: 0; }
.board__note { margin: 0 22px; padding-top: 4px; color: var(--muted); font-size: 14px; }
.board__note b { color: var(--text); font-weight: 600; }
.board .season__top { margin: 16px 22px 22px; }
@media (prefers-reduced-motion: reduce) {
    .board__panel, .board__chev { transition: none; }
}
.season__top {
    list-style: none;
    counter-reset: place;
    display: grid;
    gap: 6px;
}
.season__top li {
    counter-increment: place;
    display: grid;
    grid-template-columns: 2em 1fr auto;
    gap: 12px;
    align-items: baseline;
}
.season__top li::before { content: counter(place); font: 400 14px/1 var(--pixel); color: var(--dim); }
.season__top li:nth-child(1)::before { color: var(--gold); }
.season__top b { font-weight: 600; }
.season__top span { font: 400 14px/1 var(--pixel); color: var(--orange); }
.season__empty { color: var(--muted); }
.board .season__empty { margin: 16px 22px 22px; }
.leaders__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 22px 0; }
.leaders__tabs button {
    padding: 7px 12px;
    font: 400 13px/1 var(--pixel);
    color: var(--muted);
    background: rgba(255, 176, 102, .06);
    border: 0;
    clip-path: var(--notch-sm);
    cursor: pointer;
}
.leaders__tabs button:hover { color: var(--text); }
.leaders__tabs button[aria-selected="true"] { color: var(--bg); background: var(--gold); }
.leaders__tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.season__top .leaders__empty { display: block; color: var(--muted); }
.season__top .leaders__empty::before { content: none; }

.evening__always {
    max-width: 52em;
    margin-top: 40px;
    color: var(--muted);
}
.evening__always b { color: var(--text); font-weight: 600; }

/* ---------- Магазин ---------- */

.shop { padding: 64px 0 40px; }

.shop__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--pixel);
    font-weight: 400;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1;
    background: var(--molten);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 4px 0 #4a0e05);
}

.tabs {
    position: sticky;
    top: calc(var(--header-h) + 8px);
    z-index: 40;
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 28px 0 8px;
    padding: 5px;
    gap: 2px;
    background: rgba(30, 9, 7, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    clip-path: var(--notch);
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    position: relative;
    z-index: 1;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 15px;
    color: var(--muted);
    white-space: nowrap;
    transition: color .25s;
}
.tabs a.is-active { color: #2a0b04; }
.tabs__pill {
    position: absolute;
    top: 5px; bottom: 5px;
    left: 0;
    width: 0;
    background: var(--molten);
    clip-path: var(--notch-sm);
    transition: transform .35s cubic-bezier(.3, .7, .2, 1), width .35s cubic-bezier(.3, .7, .2, 1);
}

.group { padding-top: 48px; }
.group__head { margin-bottom: 22px; }
.group__title {
    font-family: var(--pixel);
    font-weight: 400;
    font-size: clamp(22px, 2.4vw, 30px);
    margin-bottom: 6px;
}
.group__desc { color: var(--muted); max-width: 46em; }

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Карточка товара ---------- */

.card {
    --heat: 4;
    --mx: 50%;
    --my: 30%;
    --rx: 0deg;
    --ry: 0deg;
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    background:
        radial-gradient(120% 70% at 50% 0%, rgba(255, 122, 26, calc(var(--heat) * .028)), transparent 70%),
        linear-gradient(180deg, var(--surface-2), var(--surface) 70%);
    clip-path: var(--notch);
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .25s ease, filter .6s ease, opacity .6s ease;
    cursor: pointer;
    isolation: isolate;
}
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 190, 90, .16), transparent 60%);
    transition: opacity .3s;
}
.card:hover::after, .card:focus-visible::after { opacity: 1; }
.card:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--soul); }

.card__media {
    position: relative;
    aspect-ratio: 1 / .9;
}
.card__media::before {
    content: '';
    position: absolute;
    inset: 18% 14% 4%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 150, 40, 1), rgba(227, 54, 27, .6) 45%, transparent 70%);
    opacity: calc(.12 + var(--heat) * .07);
    filter: blur(24px);
    transition: opacity .6s;
}
.card__img {
    position: absolute;
    inset: 22px 22px 6px;
    width: calc(100% - 44px);
    height: calc(100% - 28px);
    object-fit: contain;
    filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .5));
    transition: transform .35s cubic-bezier(.3, .7, .2, 1.3);
}
.card:hover .card__img { transform: translateY(-8px) scale(1.04); }

.card__body { padding: 6px 20px 20px; display: grid; gap: 12px; }

.card__name {
    font-family: var(--pixel);
    font-size: 22px;
    line-height: 1.15;
}

.card__note { font-size: 13.5px; color: var(--muted); margin-top: -6px; }
.card__note b { color: var(--soul); font-weight: 600; }

.heat {
    display: flex;
    align-items: center;
    gap: 3px;
}
.heat i {
    flex: 1;
    height: 6px;
    background: rgba(255, 176, 102, .1);
}
.heat i.on { background: linear-gradient(180deg, #ffd047, #ff7a1a); box-shadow: 0 0 8px rgba(255, 122, 26, .5); }

.card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}
.card__price {
    font-family: var(--pixel);
    font-size: 20px;
    color: var(--gold);
}
.card__price small { font-size: .7em; color: var(--muted); }
.card__buy {
    padding: 8px 14px;
    font-weight: 600;
    font-size: 14px;
    color: #2a0b04;
    background: linear-gradient(180deg, #ffb53a, #ff7a1a);
    clip-path: var(--notch-sm);
    transition: filter .2s;
}
.card:hover .card__buy { filter: brightness(1.12); }

.badge {
    position: absolute;
    top: 14px; right: 14px;
    z-index: 2;
    padding: 5px 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: #2a0b04;
    background: var(--gold);
    clip-path: var(--notch-sm);
}
.badge--soul { background: var(--soul); color: #062a27; }

.card--flame {
    background:
        radial-gradient(120% 70% at 50% 0%, rgba(255, 150, 30, .4), transparent 70%),
        linear-gradient(180deg, #4a1a0e, #2c0f0a 75%);
}
.card--flame .card__name {
    background: var(--molten);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.card--flame .card__media::before { animation: flicker 2.4s steps(6) infinite; }
@keyframes flicker {
    0%, 100% { opacity: .9; transform: scale(1); }
    40% { opacity: .7; transform: scale(.96); }
    60% { opacity: 1; transform: scale(1.04); }
}

/* «Розжиг» лестницы привилегий при прокрутке */
.js .ignite .card {
    filter: grayscale(.9) brightness(.45);
    opacity: .6;
}
.js .ignite .card .card__media::before { opacity: 0; }
.js .ignite.is-lit .card {
    filter: none;
    opacity: 1;
    transition-delay: calc(var(--i) * 90ms);
}
.js .ignite.is-lit .card .card__media::before {
    opacity: calc(.12 + var(--heat) * .07);
    transition-delay: calc(var(--i) * 90ms + 150ms);
}

/* ---------- Окно покупки ---------- */

.buy {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(520px, 100%);
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    color: var(--text);
    background: linear-gradient(180deg, #2a0f0a, #170706 60%);
    box-shadow: -1px 0 0 var(--line), -30px 0 80px rgba(0, 0, 0, .6);
    overflow: hidden;
}
.buy::backdrop {
    background: rgba(10, 2, 1, .62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.buy[open] { animation: slide-in .38s cubic-bezier(.2, .8, .2, 1); }
.buy[open]::backdrop { animation: fade .3s ease; }
.buy.is-closing { animation: slide-out .25s ease-in forwards; }
.buy.is-closing::backdrop { animation: fade .25s ease reverse forwards; }

@keyframes slide-in { from { transform: translateX(100%); } }
@keyframes slide-out { to { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } }

.buy__scroll {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 28px 32px;
}

.buy__close {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 2;
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    background: rgba(255, 176, 102, .1);
    clip-path: var(--notch-sm);
    transition: background-color .2s;
}
.buy__close:hover { background: rgba(255, 176, 102, .2); }
.buy__close svg { width: 18px; height: 18px; }

.buy__top {
    display: grid;
    grid-template-columns: 132px 1fr;
    align-items: center;
    gap: 20px;
    padding: 12px 40px 24px 0;
    border-bottom: 1px dashed var(--line);
}
.buy__img-wrap { position: relative; }
.buy__img-wrap::before {
    content: '';
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 140, 30, .8), transparent 70%);
    filter: blur(18px);
}
.buy__img { position: relative; width: 100%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.buy__kind { font-size: 14px; color: var(--muted); margin-bottom: 2px; }
.buy__name { font-family: var(--pixel); font-weight: 400; font-size: 30px; line-height: 1.1; margin-bottom: 8px; }
.buy__price { font-family: var(--pixel); font-size: 22px; color: var(--gold); }

.buy__info { padding: 22px 0 8px; }
.buy__inherit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    font-size: 14px;
    background: rgba(92, 225, 214, .08);
    box-shadow: inset 0 0 0 1px rgba(92, 225, 214, .25);
    clip-path: var(--notch-sm);
}
.buy__inherit b { color: var(--soul); font-weight: 600; }
.buy__text { color: var(--muted); }

.buy__section + .buy__section { margin-top: 20px; }
.buy__section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}
.perks { display: grid; gap: 6px; }
.perks li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 15px;
    color: #e9d6c8;
}
.perks li::before {
    content: '';
    flex: none;
    width: 6px; height: 6px;
    translate: 0 -2px;
    background: var(--orange);
}
.perks code {
    flex: none;
    font-family: var(--pixel);
    font-size: 12.5px;
    padding: 3px 7px 2px;
    color: var(--gold);
    background: rgba(255, 197, 61, .09);
    clip-path: var(--notch-sm);
}
.perks .grief {
    flex: none;
    font-size: 11.5px;
    color: var(--dim);
    border: 1px solid rgba(255, 176, 102, .18);
    padding: 0 6px;
    border-radius: 3px;
}
.perks .perk-text { flex: 1; min-width: 0; }
.buy__legend { margin-top: 14px; font-size: 13px; color: var(--dim); }
.buy__legend .grief { font-size: 11.5px; border: 1px solid rgba(255, 176, 102, .18); padding: 0 6px; border-radius: 3px; }

.buy__form {
    display: grid;
    gap: 14px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px dashed var(--line);
}
.field { display: grid; gap: 6px; }
.field__label { font-size: 14px; font-weight: 600; }
.field__hint { font-size: 13px; color: var(--dim); }
.field input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-size: 16px;
    background: rgba(0, 0, 0, .3);
    border: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 176, 102, .2);
    clip-path: var(--notch-sm);
    transition: box-shadow .2s, background-color .2s;
}
.field input::placeholder { color: var(--dim); }
.field input:focus { outline: none; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 2px var(--soul); }
.field input:user-invalid { box-shadow: inset 0 0 0 2px var(--red); }
.field__error { display: none; font-size: 13px; color: #ff8f73; }
.field input:user-invalid ~ .field__error { display: block; }

.check {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
}
.check input {
    appearance: none;
    -webkit-appearance: none;
    width: 22px; height: 22px;
    margin-top: 1px;
    background: rgba(0, 0, 0, .3);
    box-shadow: inset 0 0 0 2px rgba(255, 176, 102, .3);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.check input::after {
    content: '';
    width: 10px; height: 10px;
    background: var(--gold);
    transform: scale(0);
    transition: transform .15s;
}
.check input:checked { box-shadow: inset 0 0 0 2px var(--gold); }
.check input:checked::after { transform: scale(1); }
.check input:focus-visible { outline: 2px solid var(--soul); outline-offset: 2px; }
.check a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 176, 102, .4); text-underline-offset: 3px; }
.check a:hover { text-decoration-color: var(--gold); }

.buy__submit { width: 100%; min-height: 58px; font-size: 17px; margin-top: 4px; }
.buy__note { text-align: center; font-size: 13px; color: var(--dim); }

/* ---------- Уведомление ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 14px 20px;
    font-weight: 500;
    background: #10302d;
    color: #dffcf8;
    box-shadow: inset 0 0 0 1px rgba(92, 225, 214, .45), 0 20px 50px rgba(0, 0, 0, .5);
    clip-path: var(--notch);
    transform: translate(-50%, calc(100% + 60px));
    visibility: hidden;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1.2), visibility .4s;
}
.toast.is-shown { transform: translate(-50%, 0); visibility: visible; }
.toast::before {
    content: '';
    flex: none;
    width: 10px; height: 10px;
    background: var(--soul);
    box-shadow: 0 0 12px var(--soul);
}

/* ---------- Подвал ---------- */

.site-footer {
    margin-top: 80px;
    padding: 48px 0 36px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .35));
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr auto;
    gap: 32px;
}
.footer__brand p { margin-top: 12px; max-width: 26em; }
.footer__col h4 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.footer__col li + li { margin-top: 8px; }
.footer__col a:hover { color: var(--text); }
.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px dashed var(--line);
    color: var(--dim);
    font-size: 13px;
}
.vote { min-width: 88px; max-width: 15em; }
.vote__rewards li { position: relative; padding-left: 14px; }
.vote__rewards li + li { margin-top: 6px; }
.vote__rewards li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--orange); }
.vote__note { margin: 12px 0; font-size: 13px; color: var(--dim); }
.vote__note b { color: var(--text); font-weight: 600; }

/* ---------- Текстовые страницы: как зайти, гриф, донат ---------- */

.hero__title small {
    display: block;
    margin-top: 16px;
    font-family: var(--sans);
    font-size: clamp(19px, 2.2vw, 28px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    color: var(--text);
}
.group__desc a, .evening__always a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.nav a { white-space: nowrap; }
@media (max-width: 1180px) {
    .nav { gap: 0; }
    .nav a { padding: 8px; font-size: 14px; }
    .header-actions .online { display: none; }
}
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

.article { max-width: 760px; padding-bottom: 80px; }
.article h2 {
    margin: 48px 0 16px;
    font-family: var(--pixel);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 400;
    line-height: 1.2;
    color: var(--gold);
}
.article h3 { margin: 28px 0 8px; font-size: 18px; font-weight: 600; color: var(--text); }
.article p, .article li { color: var(--muted); }
.article p + p { margin-top: 12px; }
.article ul, .article ol { margin: 12px 0 0 22px; }
.article ul { list-style: square; }
.article li + li { margin-top: 8px; }
.article b { color: var(--text); font-weight: 600; }
.article a:not(.btn) { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.article code { font-family: inherit; font-weight: 600; color: var(--soul); }
.article__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.tier { padding: 24px 0; border-top: 1px dashed var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.tier h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 12px; font-size: 22px; }
.tier__price { font-size: 18px; color: var(--gold); white-space: nowrap; }
.article .tier__label { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--text); }
.tier ul { margin-top: 6px; }
.tier li + li { margin-top: 4px; }

.price-table { width: 100%; margin-top: 16px; border-collapse: collapse; }
.price-table th, .price-table td { padding: 10px 0; text-align: left; border-bottom: 1px solid var(--line); }
.price-table th { font-size: 14px; font-weight: 600; color: var(--text); }
.price-table td { color: var(--muted); }
.price-table th:last-child, .price-table td:last-child { text-align: right; white-space: nowrap; }

/* ---------- Правила ---------- */

.page-head { padding: 64px 0 24px; }
.page-head p { margin-top: 14px; color: var(--muted); max-width: 40em; }

.rules {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
    padding-bottom: 40px;
}
.rules__toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    display: grid;
    gap: 2px;
    padding: 14px;
    background: rgba(38, 16, 12, .6);
    clip-path: var(--notch);
}
.rules__toc a {
    display: block;
    padding: 8px 10px;
    font-size: 14.5px;
    color: var(--muted);
    border-left: 2px solid transparent;
    transition: color .2s, border-color .2s, background-color .2s;
}
.rules__toc a:hover { color: var(--text); }
.rules__toc a.is-active { color: var(--text); border-color: var(--orange); background: rgba(255, 122, 26, .08); }

.rules__body { max-width: 760px; }
.rule-block { padding-bottom: 40px; }
.rule-block + .rule-block { padding-top: 40px; border-top: 1px dashed var(--line); }
.rule-block h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 700;
    margin-bottom: 18px;
}
.rule-block h2 span {
    flex: none;
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    font-family: var(--pixel);
    font-size: 18px;
    font-weight: 400;
    color: #2a0b04;
    background: var(--molten);
    clip-path: var(--notch-sm);
}
.rule { padding: 14px 0; }
.rule + .rule { border-top: 1px solid rgba(255, 176, 102, .07); }
.rule__title { font-weight: 600; font-size: 16.5px; }
.rule__title b { font-family: var(--pixel); font-weight: 400; font-size: 14px; color: var(--gold); margin-right: 8px; }
.rule__sub { margin-top: 8px; padding-left: 16px; border-left: 2px solid var(--line); color: var(--muted); font-size: 15px; }
.rule__sub + .rule__sub { margin-top: 6px; }
.penalty {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}
.penalty li {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 15px;
    padding: 9px 14px;
    background: rgba(227, 54, 27, .07);
    box-shadow: inset 2px 0 0 var(--red);
}
.penalty li span { color: var(--muted); }
.penalty li b { font-weight: 600; color: #ffb39a; }
.terms { display: grid; gap: 10px; }
.terms div { padding: 12px 16px; background: rgba(38, 16, 12, .6); clip-path: var(--notch-sm); }
.terms dt { font-weight: 600; color: var(--gold); }
.terms dd { color: var(--muted); font-size: 15px; }
.plain-list { display: grid; gap: 4px; margin-top: 8px; padding-left: 16px; color: var(--muted); }
.plain-list li { list-style: '— '; }

/* ---------- 404 ---------- */

.error-page {
    min-height: calc(100svh - var(--header-h));
    display: grid;
    place-items: center;
    text-align: center;
    padding: 40px 16px 80px;
}
.error-page .hero__title { font-size: clamp(110px, 26vw, 260px); margin-bottom: 12px; }
.error-page h1 + p { font-size: 20px; color: var(--muted); margin-bottom: 32px; }

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
    .grid { gap: 12px; }
    .card__body { padding: 6px 16px 16px; }
    .card__name { font-size: 19px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    :root { --header-h: 60px; }
    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        padding: 8px 16px 16px;
        background: #1a0806;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 1px 0 var(--line);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .nav.is-open { opacity: 1; transform: none; visibility: visible; }
    .nav a { padding: 14px 8px; font-size: 17px; }
    .site-header__inner { gap: 12px; }
    .header-actions { margin-left: auto; }
    .menu-toggle {
        display: grid;
        place-items: center;
        width: 42px; height: 42px;
        background: rgba(255, 176, 102, .08);
        clip-path: var(--notch-sm);
    }
    .menu-toggle svg { width: 20px; height: 20px; }
    .header-actions .online { display: none !important; }

    .hero { padding: 16px 0 110px; }
    .hero__grid { grid-template-columns: 1fr; gap: 8px; text-align: center; }
    .hero__art { order: -1; width: min(300px, 64vw); margin-inline: auto; }
    .hero__logo { width: 100%; }
    .hero__lead { margin-inline: auto; }
    .hero__actions { justify-content: center; }
    .hero__title span::before { text-shadow: 2px 2px 0 #5a1206, 4px 4px 0 #3a0a04, 0 0 40px rgba(255, 106, 26, .55); }

    .steps__list { grid-template-columns: 1fr; }
    .evening__head { grid-template-columns: 1fr; }
    .evening__list { grid-template-columns: repeat(2, 1fr); }
    .boards { grid-template-columns: 1fr; }
    .board__head { gap: 12px; padding: 16px; }
    .board__icon { width: 38px; height: 38px; font-size: 19px; }
    .board__title { font-size: 17px; }
    .board__note, .leaders__tabs { margin-left: 16px; margin-right: 16px; }
    .board .season__top, .board .season__empty { margin: 14px 16px 18px; }
    .grid, .grid--3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .rules { grid-template-columns: 1fr; gap: 24px; }
    .rules__toc { position: static; }
}

@media (max-width: 560px) {
    .ruler { margin-inline: 20px; }
    .ruler__event em { display: none; }
    .ruler__event { font-size: 12px; }
    .ruler__hour b { font-size: 10px; }
    .evening__list { grid-template-columns: 1fr; gap: 24px; }
    .brand span { display: none; }
    .header-actions .copy-ip { padding: 0 12px; }
    .shop__head { flex-direction: column; align-items: start; }
    .card__img { inset: 14px 14px 2px; width: calc(100% - 28px); height: calc(100% - 16px); }
    .card__body { padding: 4px 12px 14px; gap: 10px; }
    .card__name { font-size: 17px; }
    .card__price { font-size: 16px; }
    .card__foot { flex-direction: column; align-items: stretch; text-align: center; }
    .card__buy { text-align: center; }
    .badge { top: 8px; right: 8px; font-size: 11px; padding: 4px 8px; }
    .footer__grid { grid-template-columns: 1fr; }

    .buy {
        inset: auto 0 0 0;
        width: 100%;
        height: auto;
        max-height: 92svh;
        margin: auto 0 0;
        box-shadow: 0 -30px 80px rgba(0, 0, 0, .6);
    }
    .buy__scroll { max-height: 92svh; padding: 20px 18px 28px; }
    .buy[open] { animation-name: slide-up; }
    .buy.is-closing { animation-name: slide-down; }
    .buy__top { grid-template-columns: 96px 1fr; gap: 14px; }
    .buy__name { font-size: 24px; }
    .perks li { flex-wrap: wrap; }
}
@keyframes slide-up { from { transform: translateY(100%); } }
@keyframes slide-down { to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }
    html { scroll-behavior: auto; }
}
