/* ==========================================================================
   FASOOLLKA — Адские игры / Райские игры (этап 7)
   Поиск, панель и форма режима редактирования, пароль, подсказка про Telegram —
   общие с кинотеатром (cinema.css подключается на этой странице тоже).
   1. Страница и шапка-слайдшоу (картинки игр, огонь / золотой свет)
   2. Карточки игр
   3. Профиль игры: картинка, описание, боссы и попытки (с 15.10.2026), записи стримов
   4. Форма игры (режим редактирования; и боссы)
   ========================================================================== */

.games {
    position: relative;
    z-index: 10;
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: clamp(10px, 2vh, 20px) clamp(16px, 3vw, 40px) 60px;
}

/* ---------- 1. Шапка: картинки игр сменяют друг друга ---------- */
.arcade {
    position: relative;
    height: clamp(300px, 46vh, 480px);
    margin: 0 auto 6px;
    border-radius: 24px 24px 14px 14px;
    overflow: hidden;
    isolation: isolate;
    background: var(--surface-2);
}
:root[data-theme="hell"] .arcade { box-shadow: inset 0 0 0 1px rgba(255, 110, 60, .35), 0 0 60px -10px rgba(255, 40, 0, .5), 0 30px 60px -30px #000; }
:root[data-theme="heaven"] .arcade { box-shadow: inset 0 0 0 1px rgba(214, 170, 74, .6), 0 0 60px rgba(255, 236, 170, .7), 0 30px 60px -30px rgba(70, 90, 160, .45); }
.arcade__slides { position: absolute; inset: 0; }
.arcade__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 35%;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1.6s ease, transform 9s linear;
}
.arcade__slide.is-on { opacity: 1; transform: scale(1); }
/* картинка уходит в фон страницы: слева — под надписи, снизу — к поиску */
.arcade::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
:root[data-theme="hell"] .arcade::after {
    background:
        linear-gradient(90deg, rgba(14, 2, 6, .94) 0%, rgba(14, 2, 6, .72) 30%, rgba(40, 0, 8, .2) 62%, transparent 80%),
        linear-gradient(0deg, rgba(14, 2, 6, .85), transparent 40%),
        radial-gradient(120% 90% at 100% 100%, rgba(255, 30, 0, .22), transparent 60%);
}
:root[data-theme="heaven"] .arcade::after {
    background:
        linear-gradient(90deg, rgba(248, 250, 255, .94) 0%, rgba(248, 250, 255, .74) 30%, rgba(255, 246, 214, .18) 62%, transparent 80%),
        linear-gradient(0deg, rgba(248, 250, 255, .85), transparent 40%),
        radial-gradient(90% 80% at 85% 0%, rgba(255, 236, 170, .35), transparent 60%);
}

/* искры (ад) / золотые блёстки (рай) поднимаются снизу */
.arcade__fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.arcade__fx i {
    position: absolute;
    bottom: -10px;
    left: calc(8% + var(--i, 0) * 9%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    opacity: 0;
    animation: arcadeRise var(--t, 7s) linear infinite;
    animation-delay: var(--dl, 0s);
}
.arcade__fx i:nth-child(1)  { --i: 0;  --t: 7s;   --dl: -1s;   --sw: 18px; }
.arcade__fx i:nth-child(2)  { --i: 1;  --t: 9s;   --dl: -4s;   --sw: -14px; }
.arcade__fx i:nth-child(3)  { --i: 2;  --t: 6.5s; --dl: -2.5s; --sw: 22px; }
.arcade__fx i:nth-child(4)  { --i: 3;  --t: 8s;   --dl: -6s;   --sw: -20px; }
.arcade__fx i:nth-child(5)  { --i: 4;  --t: 7.5s; --dl: -.5s;  --sw: 12px; }
.arcade__fx i:nth-child(6)  { --i: 5;  --t: 10s;  --dl: -7s;   --sw: -10px; }
.arcade__fx i:nth-child(7)  { --i: 6;  --t: 6s;   --dl: -3s;   --sw: 16px; }
.arcade__fx i:nth-child(8)  { --i: 7;  --t: 8.5s; --dl: -5s;   --sw: -24px; }
.arcade__fx i:nth-child(9)  { --i: 8;  --t: 7s;   --dl: -2s;   --sw: 20px; }
.arcade__fx i:nth-child(10) { --i: 9;  --t: 9.5s; --dl: -8s;   --sw: -16px; }
:root[data-theme="hell"] .arcade__fx i { background: #ffb36a; box-shadow: 0 0 6px 2px #ff4a1a, 0 0 14px 4px rgba(255, 30, 0, .55); }
:root[data-theme="heaven"] .arcade__fx i { width: 6px; height: 6px; background: #fff; box-shadow: 0 0 6px 2px #ffe08a, 0 0 16px 4px rgba(255, 236, 170, .8); }
@keyframes arcadeRise {
    0% { opacity: 0; transform: translate(0, 0) scale(1); }
    10% { opacity: 1; }
    50% { transform: translate(var(--sw), -55%) scale(.8); }
    100% { opacity: 0; transform: translate(calc(var(--sw) * -.5), calc(-1 * clamp(300px, 46vh, 480px))) scale(.3); }
}

.arcade__body {
    position: absolute;
    left: clamp(20px, 4vw, 56px);
    bottom: clamp(20px, 4.4vh, 44px);
    z-index: 3;
    max-width: min(560px, 82%);
}
.arcade__kicker { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-hot); }
:root[data-theme="heaven"] .arcade__kicker { color: #a87a14; }
.arcade__title {
    margin: 4px 0 10px;
    font-family: var(--serif);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(40px, 6.4vw, 84px);
    line-height: .95;
    letter-spacing: .01em;
}
:root[data-theme="hell"] .arcade__title { color: #ffe6da; text-shadow: 0 0 6px #ff3a1a, 0 0 22px rgba(255, 30, 0, .9), 0 3px 0 #3a0006; animation: neon 5s steps(1) infinite; }
:root[data-theme="heaven"] .arcade__title { color: #6a4a0a; text-shadow: 0 0 10px #fff, 0 0 24px #fff6d0, 0 1px 0 #fff; }
@keyframes neon { 0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: .55; } }
.arcade__lead { font-size: clamp(15px, 1.4vw, 17px); color: var(--text-soft); }
.arcade__lead b { color: var(--text); font-variant-numeric: tabular-nums; }

/* «Сейчас на экране: …» — открыть профиль игры с картинки */
.arcade__now {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    margin-top: 16px;
    padding: 8px 10px 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--ghost-border);
    background: var(--ghost-bg);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    transition: border-color .2s ease, box-shadow .25s ease, transform .3s var(--ease-out);
}
.arcade__now[hidden] { display: none; }
.arcade__now-label { color: var(--text-faint); white-space: nowrap; }
.arcade__now b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arcade__now .ico {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 8px;
    border-radius: 50%;
    color: var(--btn-text);
    background: var(--btn-bg);
    box-shadow: var(--btn-glow);
}
.arcade__now:hover { border-color: var(--accent-hot); box-shadow: 0 0 24px -6px var(--accent); transform: translateY(-2px); }
.arcade__now.is-swap b { animation: nowSwap .6s var(--ease-out); }
@keyframes nowSwap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* листать картинки: стрелки и «3 / 24» */
.arcade__nav {
    position: absolute;
    right: clamp(14px, 2.6vw, 32px);
    bottom: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
}
.arcade__nav[hidden] { display: none; }
.arcade__count { min-width: 52px; text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.arcade__arrow {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s ease, transform .25s var(--ease-out);
}
.arcade__arrow--next .ico { transform: scaleX(-1); }
.arcade__arrow:hover { background: var(--accent); transform: scale(1.08); }
.is-lite .arcade__fx { display: none; }
.is-lite .arcade__slide { transition: opacity 1s ease; transform: none; }
@media (prefers-reduced-motion: reduce) { .arcade__fx { display: none; } .arcade__slide { transform: none; transition: opacity .6s ease; } }

/* ---------- 2. Карточки игр ---------- */
.gamegrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: clamp(14px, 1.6vw, 22px);
    padding: clamp(12px, 1.6vw, 20px);
    border-radius: calc(var(--panel-radius) * 1.4);
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: var(--panel-shadow);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
}
.gamegrid:empty { display: none; }
.is-lite .gamegrid { -webkit-backdrop-filter: none; backdrop-filter: none; }

.gcard {
    position: relative;
    min-width: 0;
    animation: posterIn .5s var(--ease-out) both;
    animation-delay: calc(var(--n, 0) * 30ms);
}
@keyframes posterIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.gcard__open {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface-2);
    color: #fff;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: transform .45s var(--ease-out), box-shadow .45s ease;
}
:root[data-theme="hell"] .gcard__open { box-shadow: 0 0 0 1px rgba(255, 90, 40, .3), 0 18px 34px -20px #000; }
:root[data-theme="heaven"] .gcard__open { box-shadow: 0 0 0 1px rgba(214, 170, 74, .55), 0 18px 34px -20px rgba(70, 90, 160, .55); }
.gcard__open img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 35%;
    transition: transform .8s var(--ease-out), filter .4s ease;
}
/* затемнение снизу — под название */
.gcard__open::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .45) 34%, transparent 62%);
    pointer-events: none;
}
.gcard:hover .gcard__open, .gcard__open:focus-visible { transform: translateY(-6px); }
:root[data-theme="hell"] .gcard:hover .gcard__open, :root[data-theme="hell"] .gcard__open:focus-visible {
    box-shadow: 0 0 0 1.5px #ff3b52, 0 0 38px -4px rgba(255, 0, 40, .8), 0 26px 44px -20px #000;
}
:root[data-theme="heaven"] .gcard:hover .gcard__open, :root[data-theme="heaven"] .gcard__open:focus-visible {
    box-shadow: 0 0 0 1.5px #e2b54c, 0 0 38px rgba(255, 236, 170, .95), 0 26px 44px -20px rgba(70, 90, 160, .55);
}
.gcard__open:focus-visible { outline: none; }
.gcard:hover .gcard__open img { transform: scale(1.06); }
:root[data-theme="hell"] .gcard:hover .gcard__open img { filter: saturate(1.2) contrast(1.05); }
/* блик, пробегающий по картинке при наведении */
.gcard__open::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
    transform: translateX(-100%);
    pointer-events: none;
}
.gcard:hover .gcard__open::before { transform: translateX(100%); transition: transform .9s ease; }

.gcard__ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 26px;
    text-align: center;
}
:root[data-theme="hell"] .gcard__ph { background: radial-gradient(circle at 50% 30%, #4a0a0c, #12030a); color: #ffcf9c; }
:root[data-theme="heaven"] .gcard__ph { background: radial-gradient(circle at 50% 30%, #ffffff, #e6d6ad); color: #6a4a0a; }
.gcard__ph-ico { width: 30%; max-width: 110px; margin-bottom: 8%; opacity: .5; }
.game__hero .gcard__ph-ico { width: 18%; margin-bottom: 4%; }

.gcard__body {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gcard__title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(21px, 1.7vw, 25px);
    line-height: 1.05;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gcard__meta { font-size: 12.5px; color: rgba(255, 255, 255, .78); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }

.gcard__count, .gcard__badge, .gcard__boss {
    position: absolute;
    top: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}
.gcard__count { right: 10px; color: #fff; background: rgba(0, 0, 0, .66); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.gcard__count .ico { font-size: 9px; }
/* боссы (с 15.10.2026): «☠ 16 из 19» — под числом стримов; в режиме редактирования там карандаш и крестик */
.gcard__boss { right: 10px; color: #fff; background: rgba(0, 0, 0, .66); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.gcard__count ~ .gcard__boss { top: 38px; }
.gcard__boss .ico { font-size: 13px; }
.is-editing .gcard__boss { display: none; }
.gcard__badge { left: 10px; }
.gcard__badge--done { color: #fff; background: rgba(30, 120, 70, .88); }
.gcard__badge--live { color: var(--btn-text); background: var(--btn-bg); box-shadow: var(--btn-glow); }
.gcard__badge--live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* режим редактирования: инструменты и пометки на карточке */
.gcard .poster__tools { top: 40px; right: 8px; z-index: 4; }
.gcard .poster__flag { bottom: auto; top: 40px; left: 10px; z-index: 4; }
.is-editing .gcard.is-hidden .gcard__open { filter: grayscale(.9) brightness(.6); }
.gcard.is-flash .gcard__open { animation: posterFlash 1.4s ease-out; }

/* ---------- 3. Профиль игры ---------- */
.modal--game .modal__dialog {
    width: min(1060px, 100%);
    padding: 0;
}
.modal--game .modal__close { z-index: 6; background: rgba(0, 0, 0, .55); color: #fff; border-color: rgba(255, 255, 255, .3); }
.game__hero {
    position: relative;
    aspect-ratio: 16 / 7.2;
    overflow: hidden;
    border-radius: calc(var(--panel-radius) * 1.2) calc(var(--panel-radius) * 1.2) 0 0;
    background: var(--surface-2);
}
.game__hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 35%;
    animation: heroZoom 14s ease-out both;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.game__hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 55%, transparent) 18%, transparent 46%);
    pointer-events: none;
}
.game__hero .gcard__ph { font-size: 40px; }
.game__hero .gcard__badge { top: 16px; left: 16px; font-size: 13px; padding: 4px 12px; }

.game__body { position: relative; z-index: 2; margin-top: -40px; padding: 0 clamp(18px, 3vw, 38px) clamp(20px, 3vh, 34px); }
.game__kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-hot); }
:root[data-theme="heaven"] .game__kicker { color: var(--accent); }
.game__title {
    margin: 4px 0 2px;
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.02;
}
.game__alt { font-size: 14px; color: var(--text-faint); }
.game__alt:empty { display: none; }
.game__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.game__tags:empty { display: none; }
.game__tag { padding: 3px 11px; border-radius: 999px; background: var(--chip-bg); color: var(--text); font-size: 12.5px; font-weight: 600; }
.game__tag--genre { background: none; border: 1px solid var(--line); color: var(--text-soft); }

.game__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 16px 0;
}
.game__stats div {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--ghost-bg);
}
.game__stats dt { font-size: 12px; color: var(--text-faint); }
.game__stats dd { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.15; }

.game__desc { font-size: 15.5px; line-height: 1.62; max-width: 75ch; }
.game__desc p + p { margin-top: 10px; }
.game__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.game__actions:empty { display: none; }
.game__actions .ico { font-size: 14px; }
.game__recs { margin-top: 24px; }
.game__note { margin-top: 12px; font-size: 13px; color: var(--text-faint); }
.game__note a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* боссы (с 15.10.2026): сколько попыток на каждого — строка с полоской (одного цвета, как графики «Рекордов»),
   справа число, у побеждённого — кнопка записи с момента победы */
.bosses { margin: 2px 0 22px; }
.bosses[hidden] { display: none; }
.bosses__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 4px; }
.bosses__head .modal__h { flex: 1 1 160px; margin: 0; }
.bosses__ico { flex-shrink: 0; font-size: 20px; color: var(--accent-hot); }
:root[data-theme="heaven"] .bosses__ico { color: var(--ch-mark); }
.bosses__sort { display: flex; gap: 6px; }
.bosses__sort .chip { height: 32px; padding: 0 13px; font-size: 13px; }
.bosses__lead { margin-bottom: 10px; font-size: 14px; color: var(--text-soft); }
.bosses__lead b { color: var(--text); font-weight: 700; }
/* части игры (основная и дополнения): счёт по каждой, заголовки в «По порядку», подпись DLC в строке */
.bosses__parts { margin: -4px 0 10px; font-size: 13px; color: var(--text-faint); }
.bosses__parts b { color: var(--text-soft); }
.bosses__sec {
    margin: 8px 0 0;
    padding: 0 2px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent-hot);
}
:root[data-theme="heaven"] .bosses__sec { color: var(--ch-mark); }
.bosses__sec:first-child { margin-top: 0; }
.boss__part { font-weight: 600; color: var(--text-soft); }
.bosses__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.boss {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 64px 36px;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 7px 8px 7px 6px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--ghost-bg);
}
.boss__n { font-size: 12px; font-weight: 700; color: var(--text-faint); text-align: right; font-variant-numeric: tabular-nums; }
.boss.is-top .boss__n { color: var(--gold); }
.boss__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; line-height: 1.3; }
.boss__name { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.boss__bar { display: block; height: 6px; border-radius: 3px; background: var(--ch-wash); overflow: hidden; }
.boss__bar i { display: block; height: 100%; border-radius: 3px; background: var(--ch-mark); transform: scaleX(var(--w, 0)); transform-origin: 0 50%; }
.boss__meta { font-size: 12.5px; color: var(--text-faint); }
/* число попыток — колонка одной ширины: полоски сравнимы */
.boss__a { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.boss__a b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.boss__a small { font-size: 11.5px; color: var(--text-faint); }
.boss__go {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--btn-text);
    background: var(--btn-bg);
    box-shadow: var(--btn-glow);
    transition: transform .25s var(--ease-out);
}
.boss__go .ico { font-size: 13px; }
.boss__go:hover, .boss__go:focus-visible { transform: scale(1.1); }
.boss__go.is-empty { visibility: hidden; }
/* стримы победы ещё не указаны ни у кого — колонки кнопок нет, именам больше места */
.bosses__list.is-nogo .boss { grid-template-columns: 22px minmax(0, 1fr) 64px; }
.bosses__list.is-nogo .boss__go { display: none; }
/* с кем бьются сейчас — рамка акцентом; кто впереди — бледнее, без полоски */
.boss.is-now { border-color: var(--accent-hot); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-hot) 40%, transparent); }
.boss.is-now .boss__meta { color: var(--accent-hot); font-weight: 600; }
:root[data-theme="heaven"] .boss.is-now .boss__meta { color: var(--ch-mark); }
.boss.is-next { border-style: dashed; background: none; }
.boss.is-next .boss__name { color: var(--text-soft); font-weight: 600; }
.bosses__more {
    margin-top: 8px;
    padding: 6px 2px;
    border: 0;
    background: none;
    color: var(--link);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* кнопки записей стримов (.recs__*, .rec) — общие с сериалами, лежат в cinema.css (раздел 5) */

/* ---------- 4. Форма игры ---------- */
.modal--gedit .modal__dialog { width: min(1000px, 100%); grid-template-columns: minmax(180px, 260px) 1fr; }
.edit__side { display: flex; flex-direction: column; gap: 10px; }
.gedit__pic {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-2);
    box-shadow: 0 0 0 1px var(--panel-border), 0 20px 40px -20px rgba(0, 0, 0, .6);
}
.gedit__pic img { width: 100%; height: 100%; object-fit: cover; }
.gedit__pic .poster__ph { font-size: 14px; }
.gedit__upload { justify-content: center; cursor: pointer; }
.gedit__clear { align-self: center; padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.gedit__clear[hidden] { display: none; }
.edit__row--2 { grid-template-columns: 1fr 1fr; }
.edit__field textarea {
    width: 100%;
    min-height: 96px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--input-bg, var(--ghost-bg));
    color: var(--text);
    font: inherit;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
}
.edit__field textarea:focus { outline: none; border-color: var(--accent-hot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

.gedit__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.gedit__tags legend { width: 100%; margin-bottom: 6px; padding: 0; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.gedit__tag { position: relative; cursor: pointer; }
.gedit__tag input { position: absolute; opacity: 0; pointer-events: none; }
.gedit__tag span {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--ghost-bg);
    color: var(--text-soft);
    font-size: 13.5px;
    font-weight: 600;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.gedit__tag input:checked + span { color: var(--btn-text); background: var(--btn-bg); border-color: transparent; }
.gedit__tag input:focus-visible + span { outline: 2px solid var(--accent-hot); outline-offset: 2px; }

.gedit__recs { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line); }
.gedit__recs-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gedit__recs-head b { font-size: 14px; }
.gedit__recs-head span { font-size: 12.5px; color: var(--text-faint); }
.gedit__list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.gedit__row { display: grid; grid-template-columns: 1fr 1.4fr 140px .9fr 34px; gap: 6px; align-items: center; }
.gedit__row input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--input-bg, var(--ghost-bg));
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
}
.gedit__row input:focus { outline: none; border-color: var(--accent-hot); }
.gedit__row-del {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-faint);
    font-size: 15px;
    cursor: pointer;
}
.gedit__row-del:hover { color: #fff; background: #c01530; }
.gedit__empty { font-size: 13px; color: var(--text-faint); }

/* боссы в форме (с 15.10.2026): первая строка — имя, попытки, статус, ↑, ✕; вторая — стрим победы и момент */
.gedit__bosses .gedit__list { max-height: 420px; }
.gedit__boss {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px 136px 30px 34px;
    gap: 6px;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
/* вторая строка: часть игры (DLC), стрим победы, момент */
.gb__more { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) 124px; gap: 6px; }
.gedit__boss input, .gedit__boss select {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--input-bg, var(--ghost-bg));
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
}
.gedit__boss select { padding-right: 4px; }
.gedit__boss input:focus, .gedit__boss select:focus { outline: none; border-color: var(--accent-hot); }
.gedit__boss :disabled { opacity: .45; }
.gedit__boss .gb__n { font-weight: 600; }
.gedit__row-up {
    display: grid;
    place-items: center;
    width: 30px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-faint);
    font-size: 16px;
    cursor: pointer;
}
.gedit__row-up:hover { color: var(--text); background: var(--chip-bg); }
.gedit__boss:first-child .gedit__row-up { visibility: hidden; }

@media (max-width: 760px) {
    .arcade { height: clamp(320px, 62vh, 460px); }
    :root[data-theme="hell"] .arcade::after { background: linear-gradient(0deg, rgba(14, 2, 6, .95) 0%, rgba(14, 2, 6, .7) 42%, transparent 75%); }
    :root[data-theme="heaven"] .arcade::after { background: linear-gradient(0deg, rgba(248, 250, 255, .96) 0%, rgba(248, 250, 255, .72) 42%, transparent 75%); }
    .arcade__body { right: 16px; max-width: none; }
    .arcade__nav { top: 12px; bottom: auto; right: 12px; }
    .arcade__now-label { display: none; }
    .game__hero { aspect-ratio: 16 / 9; }
    .modal--gedit .modal__dialog { grid-template-columns: 1fr; }
    .modal--gedit .edit__side { width: 100%; }
    .gedit__pic { width: min(320px, 100%); margin: 0 auto; }
    .gedit__row { grid-template-columns: 1fr 1fr 34px; }
    .gedit__row input:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
    .gedit__row input:nth-child(1) { grid-column: 1; grid-row: 1; }
    .gedit__row input:nth-child(3) { grid-column: 1; grid-row: 2; }
    .gedit__row input:nth-child(4) { grid-column: 2; grid-row: 2; }
    .gedit__row-del { grid-column: 3; grid-row: 2; }
    .gedit__row { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
    /* боссы в форме — имя (↑, ✕); статус и попытки; часть игры; стрим победы и момент */
    .gedit__boss { grid-template-columns: minmax(0, 1fr) 76px 30px 34px; }
    .gedit__boss .gb__n { grid-column: 1 / 3; grid-row: 1; }
    .gedit__boss .gedit__row-up { grid-column: 3; grid-row: 1; }
    .gedit__boss .gedit__row-del { grid-column: 4; grid-row: 1; }
    .gedit__boss .gb__st { grid-column: 1; grid-row: 2; }
    .gedit__boss .gb__a { grid-column: 2 / 5; grid-row: 2; }
    .gedit__boss .gb__more { grid-row: 3; grid-template-columns: minmax(0, 1fr) 140px; }
    .gb__more .gb__s { grid-column: 1 / -1; }
    /* боссы в профиле — строки поуже */
    .boss { grid-template-columns: 18px minmax(0, 1fr) 54px 34px; gap: 8px; padding-right: 6px; }
    .bosses__list.is-nogo .boss { grid-template-columns: 18px minmax(0, 1fr) 54px; padding-right: 10px; }
    .boss__a b { font-size: 20px; }
    .boss__go { width: 34px; height: 34px; }
}
@media (max-width: 600px) {
    .arcade { border-radius: 14px; }
    /* телефон (с 15.10.2026): по две игры в ряд, карточки повыше (картинка — её середина) — список вдвое короче
       (было 25 карточек по одной, ~6 000 px). Значок статуса и число стримов — друг под другом слева */
    .gamegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
    .gcard__open { aspect-ratio: 4 / 5; border-radius: 12px; }
    .gcard__open img { object-position: 58% 30%; }
    .gcard__open::after { background: linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .5) 30%, transparent 56%); }
    .gcard__body { left: 10px; right: 10px; bottom: 9px; }
    .gcard__title { font-size: 18px; }
    .gcard__meta { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .gcard__count, .gcard__badge, .gcard__boss { left: 8px; right: auto; padding: 3px 8px; }
    .gcard__count { top: 8px; }
    .gcard__badge { top: 8px; }
    .gcard__badge ~ .gcard__count { top: 36px; }
    .gcard__boss { top: 8px; }
    .gcard__count ~ .gcard__boss, .gcard__badge ~ .gcard__boss { top: 36px; }
    .gcard__badge ~ .gcard__count ~ .gcard__boss { top: 64px; }
    .gcard .poster__tools { top: 8px; right: 6px; }
    .gcard .poster__flag { top: 64px; left: 8px; }
}

/* тема «Сакура» (с 30.10.2026, по макету): игра, которую проходим сейчас, — большой карточкой в начале сетки */
@media (min-width: 761px) {
    #grid { grid-auto-flow: dense; }
    .gcard:has(.gcard__badge--live) { grid-column: span 2; grid-row: span 2; }
    .gcard:has(.gcard__badge--live) .gcard__title { font-size: clamp(22px, 2vw, 30px); }
}
/* ==========================================================================
   Тема «Сакура» — 1 в 1 по макету 3_игры_день.png (с 30.10.2026): сетка из 5 колонок без подложки, карточка —
   картинка сверху и светлая (ночью — тёмная) полоса с названием, «год · студия» и числом стримов справа;
   «Пройдена» — белая плашка, «Проходим сейчас» — розовая. Игра, которую проходим сейчас, — большой карточкой
   2 × 2 в начале (games.js: .is-feature)
   ========================================================================== */
.games { width: 100%; padding: 0 clamp(16px, 3vw, 48px) 60px; }
.games > .pagehero { padding: clamp(26px, 5.4vh, 46px) 0 clamp(16px, 2.2vh, 18px); }
.games .chip:not([data-tag="all"]) .chip__n { display: none; }
#grid.gamegrid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.gcard:has(.gcard__badge--live) { grid-column: auto; grid-row: auto; }
.gcard.is-feature { grid-column: span 2; grid-row: span 2; }
.gcard__open {
    display: flex;
    flex-direction: column;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 18px;
    color: var(--text);
}
:root[data-theme="heaven"] .gcard__open { background: #fff; box-shadow: 0 1rem 2.4rem -1.6rem rgba(130, 45, 80, .55); }
:root[data-theme="hell"] .gcard__open { background: rgba(26, 20, 52, .9); box-shadow: 0 0 0 1px rgba(255, 160, 195, .1), 0 1rem 2.4rem -1.4rem #000; }
.gcard__open img, .gcard__open > .gcard__ph {
    position: relative;
    inset: auto;
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}
.gcard__open::after { display: none; }
.gcard:hover .gcard__open, .gcard__open:focus-visible { transform: translateY(-5px); }
:root[data-theme="heaven"] .gcard:hover .gcard__open, :root[data-theme="heaven"] .gcard__open:focus-visible { box-shadow: 0 0 0 1.5px rgba(236, 63, 104, .55), 0 1.4rem 2.6rem -1.4rem rgba(236, 63, 104, .5); }
:root[data-theme="hell"] .gcard:hover .gcard__open, :root[data-theme="hell"] .gcard__open:focus-visible { box-shadow: 0 0 0 1.5px rgba(255, 111, 145, .75), 0 1.4rem 2.6rem -1.2rem rgba(255, 90, 140, .45); }
:root[data-theme="hell"] .gcard:hover .gcard__open img { filter: none; }
.gcard:hover .gcard__open img { transform: none; }
.gcard__open::before { height: 0; padding-bottom: 56.25%; inset: 0 0 auto; }
.gcard__ph { font-family: var(--display); }
:root[data-theme="hell"] .gcard__ph { background: radial-gradient(circle at 50% 30%, #3a2d72, #17122d); color: #ff8fab; }
:root[data-theme="heaven"] .gcard__ph { background: radial-gradient(circle at 50% 30%, #fff, #ffe3ea); color: #ec3f68; }

.gcard__body {
    position: static;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 14px;
}
.gcard__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gcard__title { font: 700 15px/1.25 var(--ui); text-shadow: none; color: var(--text); }
.gcard__meta { font-size: 12px; color: var(--text-faint); text-shadow: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard__count, .gcard__badge, .gcard__boss { position: absolute; }
.gcard__body .gcard__count {
    position: static;
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: var(--accent);
    background: rgba(255, 120, 150, .14);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.gcard__badge { top: 10px; left: 10px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.gcard__badge--done { color: #2b1d2a; background: rgba(255, 255, 255, .95); }
.gcard__badge--live { color: #fff; background: #f4476f; box-shadow: 0 .5rem 1rem -.5rem rgba(240, 60, 105, .8); }
/* у большой карточки: картинка во всю высоту, полоса с названием внизу, боссы — на картинке справа внизу */
.gcard.is-feature .gcard__open img, .gcard.is-feature .gcard__open > .gcard__ph { flex: 1; aspect-ratio: auto; min-height: 0; height: 100%; object-position: 50% 30%; }
.gcard.is-feature .gcard__open::before { height: 100%; padding: 0; }
.gcard.is-feature .gcard__body { flex: none; padding: 16px 18px 18px; }
.gcard.is-feature .gcard__title { font: 800 clamp(20px, 1.7vw, 26px)/1.15 var(--display); letter-spacing: -.01em; }
.gcard.is-feature .gcard__meta { font-size: 13px; }
.gcard__boss { right: 10px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; background: rgba(20, 14, 34, .78); color: #fff; }
.gcard:not(.is-feature) .gcard__boss { top: 10px; }
.gcard.is-feature .gcard__boss { top: auto; bottom: 88px; }
.gcard .poster__tools { top: 46px; }
@media (max-width: 1360px) { #grid.gamegrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { #grid.gamegrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    #grid.gamegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .gcard.is-feature { grid-column: 1 / -1; grid-row: auto; }
    .gcard.is-feature .gcard__open img { aspect-ratio: 16 / 10; height: auto; flex: none; }
    .gcard.is-feature .gcard__boss { bottom: 86px; }
}
@media (max-width: 600px) {
    .gcard__open { aspect-ratio: auto; border-radius: 16px; }
    .gcard__open img { object-position: 58% 30%; }
    .gcard__body { position: static; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 11px 12px; }
    .gcard__txt { width: 100%; }
    .gcard__title { font-size: 14px; }
    .gcard__meta { font-size: 11.5px; display: block; }
    .gcard__body .gcard__count { padding: 3px 8px; font-size: 11px; }
    .gcard__badge { left: 8px; top: 8px; }
    .gcard:not(.is-feature) .gcard__boss { top: 8px; left: auto; right: 8px; }
}