/*
 * Публичная витрина: профиль, коллекции и просмотрщик карточек.
 * Стили самой карточки живут в card.css, интерфейс редактора — в app.css.
 */

:root {
    --site-bg: #0b0d14;
    --site-ink: #f2f4f9;
    --site-muted: #8b93a7;
    --site-line: rgba(255, 255, 255, 0.09);
    --site-plate: rgba(255, 255, 255, 0.045);
    --site-plate-hover: rgba(255, 255, 255, 0.08);
    --site-accent: #b79bff;
    --site-accent-2: #ff9ecb;
    --site-danger: #ff8b8b;
    --site-radius: 20px;
}

* {
    box-sizing: border-box;
}

body.site {
    margin: 0;
    min-height: 100vh;
    background: var(--site-bg);
    color: var(--site-ink);
    font-family: 'SF Pro Display', -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.site.is-locked {
    overflow: hidden;
}

/* мягкое свечение за контентом — вместо плоской заливки */
.site__glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 20% 0%, rgba(183, 155, 255, 0.22) 0%, transparent 70%),
        radial-gradient(50% 40% at 90% 10%, rgba(255, 158, 203, 0.16) 0%, transparent 70%),
        radial-gradient(70% 60% at 50% 100%, rgba(110, 190, 255, 0.10) 0%, transparent 70%);
}

.site__wrap {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 20px 56px;
}

/* ── переключатель языка ────────────────────────────────── */

/*
 * Стоит над содержимым страницы и на витрине, и в коллекции, поэтому живёт
 * в header-site.php, а не в конкретном шаблоне. Текущий язык — не ссылка:
 * жать по нему некуда, и подсвечен он тем же, чем и активные элементы витрины.
 */
.lang {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 14px;
}

.lang__item {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--site-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.lang__item:hover {
    background: var(--site-plate);
    color: var(--site-ink);
}

.lang__item--active {
    background: var(--site-plate);
    color: var(--site-accent);
}

/* ── профиль ────────────────────────────────────────────── */

.profile__head {
    text-align: center;
    padding: 8px 0 28px;
}

.profile__avatar {
    width: 132px;
    height: 132px;
    margin: 0 auto 18px;
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.45));
}

.profile__avatar svg {
    width: 100%;
    height: 100%;
    display: block;
}

.profile__name {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.profile__tagline {
    margin: 6px 0 0;
    color: var(--site-accent);
    font-weight: 600;
}

.profile__about {
    margin: 14px auto 0;
    max-width: 480px;
    color: var(--site-muted);
    font-size: 15px;
}

/* ── ссылки в стиле link.me ─────────────────────────────── */

.links {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
}

.link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: var(--site-plate);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius);
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.18s, transform 0.18s;
}

.link:hover {
    background: var(--site-plate-hover);
    transform: translateY(-1px);
}

.link__icon {
    font-size: 20px;
}

/* ── список коллекций ───────────────────────────────────── */

.sets__title,
.collection__title {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--site-muted);
}

.sets__empty {
    padding: 22px;
    background: var(--site-plate);
    border: 1px dashed var(--site-line);
    border-radius: var(--site-radius);
    color: var(--site-muted);
    text-align: center;
}

.set {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 14px;
    background: var(--site-plate);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius);
    color: inherit;
    text-decoration: none;
    transition: background 0.18s, transform 0.18s, border-color 0.18s;
}

.set:hover {
    background: var(--site-plate-hover);
    border-color: rgba(183, 155, 255, 0.4);
    transform: translateY(-1px);
}

.set__thumb {
    position: relative;
    flex: 0 0 auto;
    width: calc(var(--tile-w) * 1px);
    height: calc(var(--tile-w) * 1038 / 744 * 1px);
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.set__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.set__body {
    flex: 1 1 auto;
    min-width: 0;
}

.set__code {
    display: inline-block;
    padding: 2px 8px;
    margin-bottom: 6px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--site-accent);
}

.set__name {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.set__desc {
    display: block;
    margin-top: 2px;
    color: var(--site-muted);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.set__bar {
    display: block;
    height: 6px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.set__bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--site-accent), var(--site-accent-2));
    border-radius: inherit;
    transition: width 0.4s ease;
}

.set__meta {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--site-muted);
}

.set__go {
    flex: 0 0 auto;
    color: var(--site-muted);
    font-size: 20px;
}

/* ── страница коллекции ─────────────────────────────────── */

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--site-muted);
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: var(--site-ink);
}

.collection__head {
    margin-bottom: 26px;
}

.collection__code {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: var(--site-accent);
}

.collection__title {
    margin: 10px 0 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.3px;
    text-transform: none;
    color: var(--site-ink);
}

.collection__desc {
    margin: 6px 0 0;
    color: var(--site-muted);
}

.collection__progress {
    margin-top: 16px;
}

.collection__counter {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--site-muted);
}

/* ── сетка карточек ─────────────────────────────────────── */

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    justify-items: center;
}

/* ширина плитки задаётся здесь, а не инлайном: иначе её не переопределить на узком экране */
.grid-cards .tile {
    --tile-w: 180;

    cursor: pointer;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
    transition: transform 0.18s;
}

.grid-cards .tile:hover {
    transform: translateY(-3px);
}

/* закрытая карточка приглушена — видно только рубашку и номер */
.tile--closed::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(6, 8, 14, 0.55);
}

.tile--closed:hover::after {
    background: rgba(6, 8, 14, 0.35);
}

.tile__number {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 2;
    padding: 3px 10px;
    background: rgba(8, 10, 16, 0.8);
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--site-ink);
    white-space: nowrap;
}

.tile--open .tile__number {
    display: none;
}

/* ── открытие карточки на месте ─────────────────────────── */

/*
 * Приход по ссылке-ключу: карточку уже открыл сервер, но показать её
 * молча — значит не показать вовсе. Плитка переворачивается в сетке,
 * поэтому обе стороны лежат друг на друге, как в просмотрщике.
 *
 * Состояние по умолчанию — лицо: скрипт сам разворачивает плитку рубашкой
 * (.tile--facedown) до первой отрисовки, и при выключенном JS человек
 * видит открытую карточку, а не запертую рубашку.
 */
.tile--reveal .tile__scale {
    perspective: 1600px;
}

.tile__flip {
    position: relative;
    width: 744px;
    height: 1038px;
    transform-style: preserve-3d;
}

.tile__face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
}

.tile__face--back {
    transform: rotateY(180deg);
}

.tile--facedown .tile__flip {
    transform: rotateY(180deg);
}

/* переход навешивается отдельным классом: иначе анимировался бы и разворот рубашкой */
.tile--flipping .tile__flip {
    transition: transform 0.9s cubic-bezier(0.35, 0.9, 0.25, 1);
}

/*
 * Пока карточка переворачивается, плитка приподнята и обведена свечением —
 * взгляд должен попасть на неё, а не на соседние. Hover на это время не
 * нужен: transform у него свой и перебил бы подъём.
 */
.grid-cards .tile--flipping {
    transform: translateY(-6px) scale(1.06);
    transition: transform 0.9s cubic-bezier(0.35, 0.9, 0.25, 1), box-shadow 0.9s ease;
    box-shadow: 0 0 0 2px var(--site-accent), 0 18px 44px rgba(183, 155, 255, 0.55);
    z-index: 3;
}

.grid-cards .tile--flipping:hover {
    transform: translateY(-6px) scale(1.06);
}

/* салют рисуется поверх сетки, но под просмотрщиком, и кликам не мешает */
.fireworks {
    position: fixed;
    inset: 0;
    z-index: 30;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .tile--flipping .tile__flip,
    .grid-cards .tile--flipping {
        transition: none;
    }
}

/* ── просмотрщик ────────────────────────────────────────── */

/*
 * Карточка внутри занимает свои 744×1038 и ужимается трансформом, а он
 * не меняет раскладку — без overflow на самом слое её «настоящий» размер
 * вылезал бы за край экрана и давал горизонтальную прокрутку.
 */
.viewer {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.viewer[hidden] {
    display: none;
}

.viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 11, 0.86);
    backdrop-filter: blur(6px);
}

/*
 * Колонка, а не обычный блок: так отступы сцены не схлопываются наружу
 * и попадают в offsetHeight, по которому fit() считает свободное место.
 */
.viewer__box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 640px;
    text-align: center;
}

/* стоит в отступе над сценой: он absolute и в замер fit() не попадает */
.viewer__x {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: var(--site-plate);
    border: 1px solid var(--site-line);
    border-radius: 50%;
    color: var(--site-ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

/* высоту сцене задаёт fit() — ровно под уменьшённую карточку */
.viewer__stage {
    display: flex;
    justify-content: center;
    flex: 0 0 auto;
    margin: 34px 0 18px;
    perspective: 1600px;
}

/*
 * Переворот: обе стороны лежат в одном месте, видна та, что повёрнута к нам.
 * Лицевая сторона появляется в разметке только после ответа сервера.
 */
/*
 * flex: 0 0 auto обязателен: сцена — флекс-контейнер, и без него карточку
 * сжимало бы до ширины экрана, а .card внутри остаётся ровно 744px и
 * уезжал бы за край. Уменьшает её только scale() из fit().
 */
.flip {
    position: relative;
    flex: 0 0 auto;
    width: 744px;
    height: 1038px;
    transform-origin: top center;
    transform-style: preserve-3d;
    transition: none;
}

.flip__side {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    transition: transform 0.7s cubic-bezier(0.4, 0.1, 0.2, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-radius: 30px;
}

/* внутрь кладётся клон плитки или ответ сервера — и то и другое ровно 744×1038 */
.flip__side > * {
    display: block;
}

.flip__side--front {
    transform: rotateY(180deg);
}

.flip--open .flip__side--back {
    transform: rotateY(-180deg);
}

.flip--open .flip__side--front {
    transform: rotateY(0deg);
}

.viewer__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    position: relative;
}

.viewer__number {
    font-size: 13px;
    color: var(--site-muted);
    letter-spacing: 0.6px;
}

.btn-open {
    padding: 13px 30px;
    background: linear-gradient(135deg, var(--site-accent), var(--site-accent-2));
    border: 0;
    border-radius: 999px;
    color: #14101f;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(183, 155, 255, 0.3);
}

.btn-open[disabled] {
    opacity: 0.65;
    cursor: default;
}

.btn-open[hidden] {
    display: none;
}

/* ── ввод кода с карточки ───────────────────────────────── */

.code-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.code-form[hidden] {
    display: none;
}

.code-input {
    width: 150px;
    padding: 12px 14px;
    background: var(--site-plate);
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
    text-align: center;
    text-transform: uppercase;
    color: var(--site-ink);
}

.code-input::placeholder {
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--site-muted);
}

.code-input:focus {
    outline: none;
    border-color: var(--site-accent);
}

.viewer__hint {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--site-muted);
}

.viewer__hint[hidden] {
    display: none;
}

.viewer__error {
    margin: 14px 0 0;
    color: var(--site-danger);
    font-size: 14px;
}

/* ── подвал ─────────────────────────────────────────────── */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid var(--site-line);
    font-size: 13px;
    color: var(--site-muted);
}

.site-footer__mark {
    font-weight: 700;
    letter-spacing: 1px;
}

.site-footer__link {
    color: var(--site-muted);
    text-decoration: none;
}

.site-footer__link:hover {
    color: var(--site-ink);
}

/* ── адаптив ────────────────────────────────────────────── */

/*
 * Плитки в сетке всегда влезают ровным числом колонок: ширина плитки
 * задаётся здесь, а не инлайном, поэтому её можно менять по брейкпоинтам.
 * Просмотрщик карточку масштабирует сам (fit() в site.js) — CSS только
 * освобождает ему место, убирая лишние отступы.
 */
@media (max-width: 640px) {
    .site__wrap {
        padding: 22px 14px 40px;
    }

    .profile__avatar {
        width: 108px;
        height: 108px;
        margin-bottom: 14px;
    }

    .profile__name {
        font-size: 26px;
    }

    .profile__about {
        font-size: 14px;
    }

    .grid-cards {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .grid-cards .tile {
        --tile-w: 150;
    }

    .set {
        gap: 12px;
        padding: 12px;
    }

    .set__thumb {
        --tile-w: 78;
    }

    .set__name {
        font-size: 16px;
    }

    .collection__title {
        font-size: 23px;
    }

    .viewer {
        padding: 12px;
    }

    .viewer__stage {
        margin: 30px 0 14px;
    }

    /* поле и кнопка в столбик во всю ширину: на телефоне в них целятся пальцем */
    .code-form {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .code-input,
    .code-form .btn-open {
        width: 100%;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* две колонки плиток держатся до последнего: одна на весь экран выглядит потерянной */
@media (max-width: 380px) {
    .grid-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-cards .tile {
        --tile-w: 136;
    }

    .set__desc {
        display: none;
    }
}

/* ── 404 ────────────────────────────────────────────────── */

.page404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 70vh;
    text-align: center;
}

.page404__code {
    font-size: 84px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--site-accent), var(--site-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page404__text {
    margin: 0 0 6px;
    color: var(--site-muted);
}

.page404 .btn-open {
    text-decoration: none;
    display: inline-block;
}

/* ── вопрос с витрины ────────────────────────────────────── */

/*
 * Блок с кнопкой стоит под коллекциями, а не в подвале: вопрос задают, когда
 * карточка не открылась, — то есть прямо здесь и в эту минуту. Из подвала
 * такую дверь не находят, и молчание читается как «всё хорошо».
 */
.ask {
    margin: 28px 0 8px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
}

.ask__text {
    margin: 0 0 12px;
    opacity: 0.85;
}

.feedback {
    max-width: 560px;
    margin: 0 auto;
}

.feedback__form {
    display: grid;
    gap: 14px;
}

/*
 * Поля описаны здесь, а не взяты из app.css: витрина его не грузит вовсе —
 * там интерфейс редактора, и тащить его на публичную страницу ради трёх
 * полей значит удвоить вес страницы.
 */
.feedback__field {
    display: grid;
    gap: 6px;
}

.feedback__label {
    color: var(--site-muted);
    font-size: 14px;
}

.feedback__input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--site-line);
    border-radius: 14px;
    background: var(--site-plate);
    color: var(--site-ink);
    font: inherit;
}

.feedback__input:focus {
    outline: none;
    border-color: var(--site-accent);
    background: var(--site-plate-hover);
}

.feedback__input::placeholder {
    color: var(--site-muted);
}

textarea.feedback__input {
    resize: vertical;
    min-height: 120px;
}

.feedback__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.feedback__cancel,
.ask__btn {
    display: inline-block;
    padding: 12px 22px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    color: var(--site-ink);
    text-decoration: none;
    font-weight: 600;
}

.feedback__cancel:hover,
.ask__btn:hover {
    background: var(--site-plate-hover);
}

.feedback__error {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(220, 80, 80, 0.16);
}

.feedback__done {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(90, 190, 120, 0.16);
}

.feedback__back {
    text-align: center;
}

/* оговорка Google обязательна, когда значок капчи скрыт */
.feedback__note {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.6;
}

/* ── правила: живой пример ───────────────────────────────── */

/*
 * Карточка слева, управление справа; на телефоне — друг под другом.
 * Пример стоит выше текста намеренно: правила читают, уже держа карты в
 * руках, и «покажите» опережает «объясните».
 */
.rules-demo {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    margin: 24px 0;
    padding: 20px;
    border-radius: var(--site-radius);
    background: var(--site-plate);
}

.rules-demo__stage {
    position: relative;
}

/* спрятанные ступени не занимают места, но остаются в разметке — без JS видны все */
.rules-demo__card[hidden] {
    display: none;
}

.rules-demo__panel {
    display: grid;
    gap: 12px;
}

.rules-demo__step {
    margin: 0;
    color: var(--site-muted);
    font-size: 14px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.rules-demo__energy {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rules-demo__energy-label {
    color: var(--site-muted);
    font-size: 14px;
}

.rules-demo__slots {
    display: inline-flex;
    gap: 6px;
}

/*
 * Значок стоимости: пустой кружок — сколько энергии не хватает, залитый —
 * сколько прикреплено. Ровно так же они выглядят на самой карточке, поэтому
 * объяснять их отдельно не нужно.
 */
.rules-demo__slot {
    width: 18px;
    height: 18px;
    border: 2px solid var(--site-line);
    border-radius: 50%;
}

.rules-demo__slot--on {
    border-color: transparent;
    background: linear-gradient(135deg, var(--site-accent), var(--site-accent-2));
}

.rules-demo__note {
    margin: 0;
    min-height: 44px;
    line-height: 1.5;
}

.rules-demo__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/*
 * Второстепенные кнопки примера. Свой класс, а не .feedback__cancel: тот
 * описан для ссылки, а у <button> браузер рисует свой фон и свой шрифт —
 * без сброса они выходят белыми плашками без текста.
 */
.rules-demo__btn {
    padding: 12px 22px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    background: transparent;
    color: var(--site-ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.rules-demo__btn:hover:not([disabled]) {
    background: var(--site-plate-hover);
}

.rules-demo__btn[disabled] {
    opacity: 0.4;
    cursor: default;
}

/* ── правила: шаги ───────────────────────────────────────── */

.rules {
    display: grid;
    gap: 10px;
    margin: 24px 0;
}

.rules__item {
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--site-plate);
}

.rules__title {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 700;
}

.rules__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--site-plate-hover);
    color: var(--site-accent);
    font-size: 14px;
}

.rules__text {
    padding-top: 10px;
    line-height: 1.6;
}

.rules__text p {
    margin: 0 0 10px;
}

.rules__text p:last-child {
    margin-bottom: 0;
}

.rules-energy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin: 24px 0;
    padding: 20px;
    border-radius: var(--site-radius);
    background: var(--site-plate);
}

.rules-energy__text {
    flex: 1 1 260px;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 720px) {
    .rules-demo {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .rules-demo__buttons,
    .rules-demo__energy {
        justify-content: center;
    }
}
