﻿/* МИНЫ — экран 1:1 с их мини-аппом, наш цвет и наш арт (31.10.2026, третий заход).
   Владелец: «картинки бомбочки и клеток наши, остальное фул у них — кнопки, расположение, логика;
   наше — цветовой стиль».

   Откуда метрики: их живой сайт `rubupgift.com/rub/games/mines` (их game.css от 30.10, файл скачан заново:
   зеркало в `материал/games/mines` было старее на 3,8 КБ). Их телефон в кадре сайта (390×844):
     поле-сцена · доска квадратная = min(ширина−20, высота−58 сверху−46 снизу) · зазор 2,4 % доски
     лестница иксов 38 px (пилюли) в строке значков ЛИБО, на узком высоком экране, лентой под доской
     (их правка 30.10: «иксы, которые наверху, перенести и занять пробел, большие иксы») — 44…150 px
     панель: сумма 50 · ряд «− мины + | Ручная Авто» 44 · главная кнопка 54, отступы 10/12/12, зазор 8
     порядок панели: сумма → «мины | режим» → главная кнопка (кнопка ВНИЗУ, у них так с 01.10)
     в раунде панель сворачивается до одной кнопки, поле растёт (их класс mn-focus)
   Наш цвет: розовый/фиолетовый на чёрном, стекло. Наш арт: клетка `assets/newic/game/cletka.png`,
   бомба `assets/newic/game/bombo4ka.png`. */

#screen-mines.page {
    padding-bottom: 0;
    overflow: hidden;
}

.mn-screen {
    --mn-pad: 12px;
    --mn-gap: 8px;
    --mn-hud: 40px;                 /* строка значков / пилюль-лестницы */
    --mn-s: 320px;                  /* сторона доски — ставит mines-ui.js */
    --mn-rh: 44px;                  /* высота ленты иксов под доской */
    --mn-t: calc(var(--mn-s) / 5);   /* сторона клетки */
    --mn-g: calc(var(--mn-s) * .024);/* зазор доски — их 2,4 % */
    --mn-tr: calc(var(--mn-s) * .034);
    --mn-pink: var(--accent-pink, #ef02cb);
    --mn-purple: var(--accent-purple, #b602ce);
    --mn-font: 'Montserrat', system-ui, sans-serif;
    position: relative;
    height: 100%;
    box-sizing: border-box;
    padding: 34px var(--mn-pad) calc(10px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    gap: var(--mn-gap);
    overflow: hidden;
}

/* ── поле: строка значков + доска (+ лента иксов) ───────────────────────── */
.mn-field {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mn-hud {
    flex: none;
    width: 100%;
    min-width: 0;
    height: var(--mn-hud);
    display: flex;
    align-items: center;
    gap: 6px;
    /* слева место под плавающую кнопку «‹» приложения (x 10…52) */
    padding-left: 48px;
}

.mn-tool {
    flex: none;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
    color: rgba(244, 238, 252, .92);
    font: 800 15px/1 var(--mn-font);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mn-tool:active { transform: scale(.94); }
.mn-tool.is-off { color: rgba(244, 238, 252, .38); }
.mn-tool svg { width: 20px; height: 20px; }
/* их раскладка строки: слева звук и турбо, справа щит «Честная игра» и «?» */
.mn-tool--fair,
#mines-rules-btn { margin-left: 0; }
#mines-fair { margin-left: auto; }
.mn-tool.is-off .mn-sound-wave { opacity: 0; }
.mn-tool.is-on { background: linear-gradient(135deg, rgba(239, 2, 203, .34), rgba(182, 2, 206, .4)); color: #fff; box-shadow: inset 0 0 0 1px rgba(239, 2, 203, .5); }

/* доска — их .mn-board: квадрат, 5×5, зазор 2,4 % */
.mn-boardwrap {
    flex: none;
    width: var(--mn-s);
    height: var(--mn-s);
    position: relative;
    /* их центрирование: доска стоит серединой свободного места между строкой значков и лентой */
    margin: auto 0;
}
#screen-mines .mines-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: var(--mn-g);
    width: var(--mn-s);
    height: var(--mn-s);
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

/* клетка — их .mn-tile (плитка с бортиком), лицо — наш арт клетки */
#screen-mines .mine-cell {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 0;
    aspect-ratio: auto;
    padding: 0;
    border: 0;
    border-radius: var(--mn-tr);
    background: #0d0a14;
    box-shadow: inset 0 calc(var(--mn-t) * .05) calc(var(--mn-t) * .12) rgba(0, 0, 0, .6);
    cursor: pointer;
    overflow: visible;
    -webkit-tap-highlight-color: transparent;
    transition: transform .12s ease;
}
#screen-mines .mine-cell:active { transform: scale(.965); }
#screen-mines .mine-cell-closed-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    /* арт клетки нарисован с полями: пластина занимает ~53 % холста — растягиваем до плитки */
    transform: scale(1.88);
    transform-origin: center center;
    pointer-events: none;
}
/* наш арт открытой клетки — кристалл (их .mn-gem: 72 % плитки).
   Их живая сборка (game.css, блок R9): кристалл и мина проявляются за .18s из scale(.9) и 40 %
   прозрачности — без пружины, без вращения и без постоянного покачивания; крышка клетки при этом
   гаснет за .12s и чуть сжимается (scale .96); под предметом — тень-пятно; фон клетки получает
   мягкое свечение. Всё это ниже — теми же числами. */
#screen-mines .mine-open-img {
    position: relative;
    z-index: 1;
    /* наш арт клетки — фигурка (Альтушка), а не квадратный кристалл: даём ей почти всю плитку */
    width: 94%;
    height: 94%;
    object-fit: contain;
    animation: mnReveal .18s cubic-bezier(.2, .7, .3, 1) var(--d, 0ms) both;
}
#screen-mines .mine-bomb-img {
    position: relative;
    z-index: 1;
    width: 86%;
    height: 86%;
    object-fit: contain;
    animation: mnReveal .18s cubic-bezier(.2, .7, .3, 1) var(--d, 0ms) both;
}
/* их `.mn-tile__item::before` — тень-пятно под кристаллом/миной (у приглушённых её нет) */
#screen-mines .mine-cell.revealed:not(.dim):not(.boom:not(.hit))::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 78%;
    width: 56%;
    height: 12%;
    translate: -50% -50%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 0;
    animation: mnFadeIn .18s ease-out var(--d, 0ms) both;
}
/* их крышка клетки: наш арт гаснет за .12s и сжимается до .96 (крышка «уходит») */
#screen-mines .mine-cell.opening::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: url("newic/game/cletka.png") center center / contain no-repeat;
    transform: scale(1.88);
    transform-origin: center center;
    pointer-events: none;
    z-index: 3;
    animation: mnLidOut .12s ease-out var(--d, 0ms) both;
}
#screen-mines .mine-cell.revealed { background: radial-gradient(circle at 50% 48%, rgba(239, 2, 203, .24), rgba(239, 2, 203, .04) 68%), #171122; }
#screen-mines .mine-cell.hit { background: radial-gradient(circle at 50% 52%, rgba(239, 2, 203, .40) 0%, rgba(182, 2, 206, .28) 36%, rgba(182, 2, 206, 0) 72%), #1c0f22; }
/* их gem-dim / bomb-dim: после конца раунда неоткрытые клетки и остальные мины приглушены.
   Анимация проявления у них своя (fade без transform) — иначе `both` перебивал бы приглушение. */
#screen-mines .mine-cell.dim { background: #12151d; }
#screen-mines .mine-cell.dim .mine-open-img { animation-name: mnFadeIn; opacity: .34; transform: scale(.8); filter: saturate(.6); }
#screen-mines .mine-cell.boom:not(.hit) { background: radial-gradient(circle at 50% 52%, rgba(239, 2, 203, .15), rgba(239, 2, 203, 0) 64%), #141021; }
#screen-mines .mine-cell.boom:not(.hit) .mine-bomb-img { animation-name: mnFadeIn; opacity: .7; transform: scale(.8); }
/* отметка «выбрано» в автоигре — их .mn-tile.is-pick */
#screen-mines .mine-cell.is-pick {
    box-shadow: inset 0 0 0 2px var(--mn-pink), 0 0 14px rgba(239, 2, 203, .45);
}
/* выигрыш/проигрыш ячейки — суммы живут в лестнице, в клетке только арт */
#screen-mines .mine-cashout,
#screen-mines .mine-x { display: none; }

@keyframes mnReveal {
    from { opacity: .4; transform: scale(.9); }
    to { opacity: 1; transform: none; }
}
@keyframes mnLidOut {
    from { opacity: 1; transform: scale(1.88); }
    to { opacity: 0; transform: scale(1.8); }
}
@keyframes mnFadeIn {
    /* без конечного кадра: элементу возвращается его собственное значение (их `mn-r7-fade`),
       иначе приглушение после раунда перебивалось бы анимацией */
    from { opacity: 0; }
}

/* ── их эффекты и показ итога ──────────────────────────────────────────── */
/* канвас поверх поля (их .mn-fx): маска гасит частицы у кромок */
.mn-fx {
    position: absolute;
    inset: 0;
    z-index: 6;
    width: 100%;
    height: 100%;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%), linear-gradient(90deg, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(180deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%), linear-gradient(90deg, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%);
    mask-composite: intersect;
}
.mn-flash {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(60% 60% at 45% 50%, rgba(239, 2, 203, .22), rgba(239, 2, 203, 0) 70%);
}
.mn-flash.is-on { animation: mnFlash .9s ease-out both; }
@keyframes mnFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }

/* карточка выигрыша в поле (наш цвет: розовое свечение вместо сиреневого) */
.mn-win {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    translate: -50% -50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--mn-s) * .008);
    min-width: calc(var(--mn-s) * .42);
    padding: calc(var(--mn-s) * .034) calc(var(--mn-s) * .06) calc(var(--mn-s) * .038);
    border-radius: calc(var(--mn-s) * .036);
    background: linear-gradient(180deg, rgba(38, 16, 42, .95), rgba(18, 10, 26, .96));
    border: 1px solid rgba(239, 2, 203, .22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 30px 80px rgba(0, 0, 0, .6), 0 0 calc(var(--mn-s) * .12) rgba(239, 2, 203, .18);
    pointer-events: none;
}
.mn-win[hidden] { display: none; }
.mn-win.is-on { animation: mnWinIn .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.mn-win__cap { font: 600 clamp(12px, calc(var(--mn-s) * .022), 16px)/1.2 var(--mn-font); color: rgba(244, 238, 252, .55); }
.mn-win__mult {
    font: 800 clamp(30px, calc(var(--mn-s) * .098), 84px)/1.02 var(--mn-font);
    color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
    text-shadow: 0 0 calc(var(--mn-s) * .05) rgba(239, 2, 203, .38);
}
.mn-win__sum { font: 700 clamp(15px, calc(var(--mn-s) * .036), 30px)/1.15 var(--mn-font); color: #fff; font-variant-numeric: tabular-nums; }
@keyframes mnWinIn { 0% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: none; } }

/* их подсказка шанса над ступенью лестницы */
.mn-tip {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 7;
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(28, 18, 36, .96);
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
    font: 600 12px/1.2 var(--mn-font);
    color: rgba(244, 238, 252, .7);
    pointer-events: none;
    white-space: nowrap;
}
.mn-tip[hidden] { display: none !important; }
.mn-tip b { font-weight: 800; color: #fff; }

/* их тост внизу поля */
.mn-toast {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 8;
    translate: -50% 0;
    max-width: calc(100% - 32px);
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(28, 18, 36, .96);
    border: 1px solid rgba(255, 255, 255, .1);
    font: 600 12.5px/1.3 var(--mn-font);
    color: #fff;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
.mn-toast.is-on { opacity: 1; }

/* турбо (их mn--turbo): их `spd()` = 0.45 — проявление клеток и карточка выигрыша короче */
.mn--turbo #screen-mines .mine-open-img,
.mn--turbo #screen-mines .mine-bomb-img,
.mn--turbo #screen-mines .mine-cell.opening::after,
.mn--turbo #screen-mines .mine-cell.revealed::before { animation-duration: .12s; }
.mn--turbo .mn-win.is-on { animation-duration: .24s; }
.mn--turbo .mn-rail__list { transition-duration: .12s; }

/* ── вкладки «Звёздами | Подарком» и лента подарков (их подарочный слой) ── */
.mn-pay {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.mn-pay button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(244, 238, 252, .62);
    font: 600 14px/1 var(--mn-font);
    cursor: pointer;
}
.mn-pay button.is-on { background: rgba(255, 255, 255, .13); color: #fff; box-shadow: inset 0 0 0 1px rgba(239, 2, 203, .35); }

.mn-gifts {
    max-height: 168px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
    padding: 8px;
}
.mn-gifts[hidden] { display: none !important; }
.mn-gifts__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.mn-gift {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px 7px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    color: #fff;
    font: 700 11.5px/1.2 var(--mn-font);
    cursor: pointer;
    min-width: 0;
}
.mn-gift img { width: 52px; height: 52px; object-fit: contain; }
.mn-gift b { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-gift small { font-weight: 700; font-size: 10.5px; color: rgba(244, 238, 252, .6); }
.mn-gift.is-on {
    border-color: rgba(239, 2, 203, .55);
    background: linear-gradient(150deg, rgba(239, 2, 203, .16), rgba(182, 2, 206, .1));
}
.mn-gift.is-locked { opacity: .45; cursor: default; }
.mn-gift.is-locked small { color: rgba(244, 238, 252, .8); }
.mn-gifts__note { margin: 4px 2px 0; font: 600 12px/1.35 var(--mn-font); color: rgba(244, 238, 252, .55); }
.mn-gifts__note:empty { display: none; }

/* ── лестница множителей ─────────────────────────────────────────────────
   В строке значков — их пилюли 38 px; под доской — их лента 30.10: крупные
   карточки, две в ширину доски, листаются за «следующей» ступенью. */
.mn-rail {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    overflow: hidden;
    -webkit-mask-image: none;
    mask-image: none;
}
.mn-rail[data-more] {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 46px), rgba(0, 0, 0, .25) calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 46px), rgba(0, 0, 0, .25) calc(100% - 18px), transparent 100%);
}
/* их приём: список ступеней — абсолютный внутри ленты, поэтому его ширина не растягивает строку */
.mn-rail__list {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: stretch;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: max-content;
    transition: transform .28s cubic-bezier(.3, .8, .3, 1);
    will-change: transform;
}
.mn-rung {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    color: rgba(244, 238, 252, .82);
    font: 800 13.5px/1 var(--mn-font);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mn-rung__n { display: none; font-size: 11px; font-weight: 700; opacity: .5; }
.mn-rung--base .mn-rung__n { display: inline; }
.mn-rung__m { font-size: 13.5px; font-weight: 800; color: #fff; }
.mn-rung__sum { font-size: 12px; font-weight: 700; opacity: .78; }
.mn-rung.is-past { opacity: .45; }
.mn-rung:is(.is-next, .is-cur, .is-aim, .is-won, .is-lost) {
    gap: 8px;
    padding: 0 12px;
    background: rgba(182, 2, 206, .18);
    box-shadow: inset 0 0 0 1px rgba(239, 2, 203, .5);
    color: #fff;
}
.mn-rung.is-next .mn-rung__m,
.mn-rung.is-cur .mn-rung__m,
.mn-rung.is-aim .mn-rung__m { font-size: 15px; }
.mn-rung.is-cur { background: linear-gradient(135deg, rgba(239, 2, 203, .3), rgba(182, 2, 206, .36)); }
.mn-rung.is-won { background: linear-gradient(135deg, rgba(239, 2, 203, .34), rgba(182, 2, 206, .4)); }
.mn-rung.is-lost { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.mn-rung.is-lost :is(.mn-rung__m, .mn-rung__sum) { color: rgba(244, 238, 252, .45); }

/* ALT-MINESLADDER: тесная строка значков (короткие экраны) — только множители: сумма и ступень «Ставка»
   скрыты, отступы уже. Иначе на ~120 px видно полторы обрезанные пилюли и «плашка не работает». */
.mn-rail[data-tight] .mn-rung { padding: 0 8px; gap: 4px; }
.mn-rail[data-tight] .mn-rung__sum,
.mn-rail[data-tight] .mn-rung--base { display: none; }

/* лента под доской — их правка 30.10 для узкого высокого экрана */
.mn-rail[data-where="below"] {
    flex: none;
    width: var(--mn-s);
    height: var(--mn-rh);
    /* доска держится у строки значков, лента центруется в остатке (их --mn-m) */
    margin-top: auto;
    margin-bottom: auto;
}
/* пока лента внизу, доску не центруем — она сразу под значками */
.mn-field[data-rail="below"] .mn-boardwrap { margin: 0; }
.mn-rail[data-where="below"] .mn-rail__list { gap: 6px; }
.mn-rail[data-where="below"] .mn-rung {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(2px, calc(var(--mn-rh) * .05), 6px);
    width: calc((var(--mn-s) - 6px) / 2);
    padding: 0 clamp(10px, calc(var(--mn-rh) * .17), 20px);
    border-radius: clamp(10px, calc(var(--mn-rh) * .16), 18px);
}
.mn-rail[data-where="below"] .mn-rung__m { font-size: clamp(15px, calc(var(--mn-rh) * .26), 30px); }
.mn-rail[data-where="below"] .mn-rung__sum { display: block; font-size: clamp(11.5px, calc(var(--mn-rh) * .13), 17px); }
.mn-rail[data-where="below"] .mn-rung__n { display: none; }
.mn-rail[data-where="below"] .mn-rung--base .mn-rung__n { display: none; }

/* ── панель ставки: сумма → «мины | режим» → кнопка ────────────────────── */
.mn-panel {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: var(--mn-gap);
}

.mn-amount {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    padding: 0 8px 0 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}
.mn-amount__cur { flex: none; font-size: 15px; line-height: 1; }
.mn-amount input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    font: 800 18px/1 var(--mn-font);
    font-variant-numeric: tabular-nums;
    outline: none;
    -moz-appearance: textfield;
}
.mn-amount input::-webkit-outer-spin-button,
.mn-amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mn-amount__chips { display: flex; gap: 6px; flex: none; }
.mn-chip {
    min-width: 44px;
    height: 38px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font: 800 13.5px/1 var(--mn-font);
    cursor: pointer;
}
.mn-chip:active { transform: scale(.96); }

.mn-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    height: 44px;
}
.mn-mines {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 5px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}
.mn-step {
    width: 40px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font: 800 17px/1 var(--mn-font);
    cursor: pointer;
}
.mn-step:active { transform: scale(.94); }
.mn-mines__val { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.mn-mines__val img { width: 20px; height: 20px; object-fit: contain; }
.mn-mines__val b { font: 800 17px/1 var(--mn-font); color: #fff; }

.mn-mode {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 4px;
    box-sizing: border-box;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}
.mn-mode button {
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(244, 238, 252, .68);
    font: 800 14.5px/1 var(--mn-font);
    cursor: pointer;
}
.mn-mode button.is-on {
    background: linear-gradient(135deg, rgba(239, 2, 203, .32), rgba(182, 2, 206, .38));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(239, 2, 203, .45);
}

/* автоигра — их ряд «число раундов» + подсказка о клетках */
.mn-auto {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.mn-auto__row { display: flex; align-items: center; gap: 8px; }
.mn-auto__row > span { font: 700 12.5px/1 var(--mn-font); color: rgba(244, 238, 252, .6); white-space: nowrap; }
.mn-auto__seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; flex: 1 1 auto; }
.mn-auto__seg button {
    height: 32px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font: 800 13px/1 var(--mn-font);
    cursor: pointer;
}
.mn-auto__seg button.is-on { background: linear-gradient(135deg, var(--mn-pink), var(--mn-purple)); }
.mn-auto__hint { font: 600 11.5px/1.3 var(--mn-font); color: rgba(244, 238, 252, .45); }

/* главная кнопка — их 54 px, 17 px; у нас розово-фиолетовая */
.mn-cta-row { display: flex; gap: 8px; }
.mn-cta {
    flex: 1 1 auto;
    height: 54px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--mn-pink), var(--mn-purple));
    color: #fff;
    font: 800 17px/1 var(--mn-font);
    box-shadow: 0 10px 26px rgba(239, 2, 203, .3), inset 0 1px 0 rgba(255, 255, 255, .28);
    cursor: pointer;
}
.mn-cta:active { transform: scale(.99); }
.mn-cta:disabled { opacity: .45; box-shadow: none; }
.mn-random {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
    color: #fff;
    cursor: pointer;
}
.mn-random:active { transform: scale(.96); }

/* ├ игорный стол: в раунде прячем то, что у них прячется ────────────────── */
.mn-screen.mn-focus .mn-panel > :is(.mn-pay, .mn-gifts, .mn-amount, .mn-row, .mn-auto) { display: none; }
/* ├ «Подарком»: их подарочный режим — режим игры и сумма уходят, мины остаются */
.mn-screen.mn-pay-gift .mn-mode { display: none; }

/* ── окно «Как играть» (их «?») и «Честная игра» (их щит) ──────────────── */
.mn-rules, .mn-fair {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(8, 4, 14, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.mn-rules[hidden], .mn-fair[hidden] { display: none !important; }
.mn-fair__card {
    width: min(440px, 100%);
    max-height: min(80vh, 600px);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: linear-gradient(180deg, #1a1024, #120b1b);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(239, 2, 203, .14);
    overflow: hidden;
    color: #fff;
}
.mn-fair__body { padding: 12px 18px 18px; overflow-y: auto; }
.mn-fair__block { margin: 0 0 14px; }
.mn-fair__block h3 { margin: 0 0 8px; font: 800 13px/1.2 var(--mn-font); color: rgba(244, 238, 252, .6); text-transform: uppercase; letter-spacing: .02em; }
.mn-fair__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .04);
    font: 600 12.5px/1.3 var(--mn-font);
    color: rgba(244, 238, 252, .6);
}
.mn-fair__row + .mn-fair__row { margin-top: 4px; }
.mn-fair__row b { font-weight: 700; color: #fff; text-align: right; }
.mn-fair__row code { font: 600 11.5px/1.3 ui-monospace, monospace; color: #ffd7f6; overflow-wrap: anywhere; }
.mn-fair__note { margin: 0 0 12px; font: 600 11.5px/1.4 var(--mn-font); color: rgba(244, 238, 252, .5); }
.mn-fair__wait { margin: 4px 0; font: 600 13px/1.4 var(--mn-font); color: rgba(244, 238, 252, .6); }
.mn-fair__check {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mn-pink), var(--mn-purple));
    color: #fff;
    font: 800 14px/1 var(--mn-font);
    cursor: pointer;
}
.mn-fair__verdict { margin: 10px 0 0; font: 700 12.5px/1.4 var(--mn-font); color: rgba(244, 238, 252, .75); }
.mn-fair__verdict[data-ok="1"] { color: #7bffb2; }
.mn-fair__verdict[data-ok="0"] { color: #ff8ab6; }

/* ├ общие карточки окон ─────────────────────────────────────────────────── */
.mn-rules__card {
    width: min(420px, 100%);
    max-height: min(76vh, 560px);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: linear-gradient(180deg, #1a1024, #120b1b);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(239, 2, 203, .14);
    overflow: hidden;
    color: #fff;
}
.mn-rules__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 12px 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.mn-rules__head h2 { margin: 0; font: 800 17px/1.1 var(--mn-font); }
.mn-rules__x {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font: 800 16px/1 var(--mn-font);
    cursor: pointer;
}
.mn-rules__body { padding: 12px 18px 18px; overflow-y: auto; }
.mn-rules__list { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font: 600 13px/1.4 var(--mn-font); color: rgba(244, 238, 252, .84); }
.mn-rules__list b { color: #fff; }
.mn-rules__cap { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font: 800 13px/1 var(--mn-font); }
.mn-rules__m { display: inline-flex; align-items: center; gap: 8px; }
.mn-rules__m b { min-width: 22px; text-align: center; font: 800 15px/1 var(--mn-font); color: var(--mn-pink); }
.mn-rules__step {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font: 800 14px/1 var(--mn-font);
    cursor: pointer;
}
.mn-rules__table { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mn-rules__table li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .04);
    font: 700 13px/1 var(--mn-font);
    font-variant-numeric: tabular-nums;
}
.mn-rules__table li span:first-child { color: rgba(244, 238, 252, .6); font-weight: 600; }
.mn-rules__table li b { color: #fff; }
.mn-rules__table li i { font-style: normal; color: rgba(244, 238, 252, .5); font-size: 12px; }
.mn-rules__note { margin: 12px 0 0; font: 600 12px/1.4 var(--mn-font); color: rgba(244, 238, 252, .5); }

/* мелочь: скрытые значения логики не показываем */
.mn-screen [hidden] { display: none !important; }

