/* ===== Мины (страница #mines) ===== */
.mines { display: none; --ease-out: cubic-bezier(0.230, 1, 0.320, 1); }
body.is-mines .mines { display: block; max-width: 1100px; margin: 0 auto; animation: cview-in 0.400s var(--ease-out); }
body.is-mines .promo, body.is-mines .cases, body.is-mines .cview, body.is-mines .inv, body.is-mines .dep,
body.is-mines .prof, body.is-mines .upg, body.is-mines .crash { display: none; }
.mines .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mines__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.mines__grid > * { min-width: 0; }
@media (min-width: 960px) { .mines__grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }

/* панель с полем: тёмно-синий «лёд» вместо неба */
.msky { background: radial-gradient(90% 50% at 15% 0%, rgb(155 109 255 / 0.220), transparent 70%),
    radial-gradient(80% 50% at 90% 100%, rgb(47 140 255 / 0.220), transparent 70%), linear-gradient(180deg, #121836, #0b0f22); padding-bottom: 14px; }
.msky::before { display: none; }
.mbar__ico { width: 34px; height: 34px; transform: none; filter: drop-shadow(0 0 8px rgb(255 120 60 / 0.500)); }

/* лесенка множителей */
.mladder { display: flex; align-items: center; gap: 6px; padding: 6px 12px 10px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.mladder::-webkit-scrollbar { display: none; }
.mstep { flex: 0 0 auto; display: grid; justify-items: center; gap: 3px; min-width: 70px; padding: 8px 10px; border-radius: 13px;
  font: 900 15px/1 var(--font-title); color: #e6ecfa; background: rgb(255 255 255 / 0.050); box-shadow: inset 0 0 0 1.500px rgb(255 255 255 / 0.100); }
.mstep small { font: 700 10px/1 var(--font-title); color: #7d88a6; }
.mstep.is-done { color: #6dffb0; background: rgb(19 179 111 / 0.120); box-shadow: inset 0 0 0 1.500px rgb(61 220 138 / 0.450); }
.mstep.is-next { color: #fff; background: rgb(47 140 255 / 0.220); box-shadow: inset 0 0 0 1.500px #5cc8ff, 0 0 14px -4px #5cc8ff; }
.mladder i { flex: 0 0 auto; width: 0; height: 0; border-left: 5px solid #3d4766; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }

/* поле 5×5 */
.mfield { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0 12px; }
.mcell { position: relative; aspect-ratio: 1; border: 0; border-radius: 16px; cursor: pointer; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #3a4670, #283255); box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.180), inset 0 -5px 0 rgb(0 0 0 / 0.300), 0 4px 10px -4px #000a;
  transition: transform 0.150s, filter 0.200s, box-shadow 0.200s; }
.mcell::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 clamp(22px, 6vw, 34px)/1 var(--font-title); color: rgb(220 228 255 / 0.850); text-shadow: 0 2px 0 #0005; }
.mines[data-state="live"] .mcell:not(.is-open):hover { filter: brightness(1.180); transform: translateY(-2px); box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.220), inset 0 -5px 0 rgb(0 0 0 / 0.300), 0 0 0 2px #5cc8ff, 0 8px 16px -6px #2f8cff; }
.mines:not([data-state="live"]) .mcell:not(.is-open) { cursor: default; }
.mcell:active { transform: scale(0.950); }
.mcell img { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 4px 6px #0008); }
.mcell.is-open::after { content: none; }
.mcell.is-gem { background: radial-gradient(circle at 50% 45%, rgb(92 200 255 / 0.450), transparent 70%), linear-gradient(180deg, #1d3d73, #142a52);
  box-shadow: inset 0 0 0 2px rgb(92 200 255 / 0.700), 0 0 16px -4px #5cc8ff; }
.mcell.is-gem.is-new img { animation: mgem 0.450s var(--ease-out); }
@keyframes mgem { from { transform: scale(0.300) rotate(-20deg); opacity: 0; } }
.mcell.is-bomb { background: radial-gradient(circle at 50% 45%, rgb(255 60 80 / 0.500), transparent 70%), linear-gradient(180deg, #5a1d33, #3a1224);
  box-shadow: inset 0 0 0 2px rgb(255 80 105 / 0.800), 0 0 18px -4px #ff2d55; }
.mcell.is-hit { animation: mhit 0.500s; }
@keyframes mhit { 20%, 60% { transform: translateX(-4px) rotate(-3deg); } 40%, 80% { transform: translateX(4px) rotate(3deg); } }
.mcell.is-ghost { opacity: 0.450; filter: saturate(0.700); }
.mfield.is-shake { animation: mshake 0.450s; }
@keyframes mshake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }

/* итог игры поверх поля */
.msky { position: relative; }
.mresult { position: absolute; left: 50%; bottom: 40%; z-index: 5; transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; padding: 14px 24px; border-radius: 18px;
  text-align: center; pointer-events: none; animation: mres 0.400s var(--ease-out); background: rgb(8 12 28 / 0.880); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mresult[hidden] { display: none; }
.mresult b { font: 900 34px/1 var(--font-title); }
.mresult span { font: 800 14px/1.200 var(--font-title); color: #c9d4ee; }
.mresult.is-win { box-shadow: inset 0 0 0 2px #3ddc8a, 0 0 30px -6px #13b36f; }
.mresult.is-win b { color: #6dffb0; }
.mresult.is-lose { box-shadow: inset 0 0 0 2px #ff5068, 0 0 30px -6px #ff2d55; }
.mresult.is-lose b { color: #ff5a6e; }
@keyframes mres { from { transform: translateX(-50%) scale(0.700); opacity: 0; } }

/* панель ставки */
.mpanel { display: grid; gap: 10px; padding: 14px; border-radius: 22px; background: linear-gradient(180deg, #151b35, #0d1124); box-shadow: inset 0 0 0 1px #ffffff17; }
.mamt { height: 54px; gap: 8px; }
.mamt .cbal__coin { flex: 0 0 auto; width: 26px; height: 30px; font-size: 13px; }
.mamt input { text-align: center; font-size: 20px; }
.mqk { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mpanel__cap { margin: 4px 0 0; font: 800 13px/1 var(--font-title); color: #8e9bbb; }
.mcount { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mcount button { height: 42px; border: 0; border-radius: 12px; cursor: pointer; font: 900 16px/1 var(--font-title); color: #dfe6f7;
  background: linear-gradient(180deg, #3a4670, #283255); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.150), inset 0 -3px 0 rgb(0 0 0 / 0.250); }
.mcount button svg { width: 18px; height: 18px; vertical-align: -3px; }
.mcount button.is-on { color: #0b1a44; background: linear-gradient(180deg, #8fe0ff, #4aa3ff); box-shadow: inset 0 1px 0 #ffffff99, 0 0 14px -4px #5cc8ff; }
.mcount button:disabled { cursor: default; opacity: 0.550; }
.mcustom { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 700 13px/1.200 var(--font-title); color: #aab6d6; }
.mcustom[hidden] { display: none; }
.mcustom input { width: 80px; height: 40px; padding: 0 10px; border: 0; border-radius: 11px; outline: none; text-align: center; color: #fff; background: #080b16;
  box-shadow: inset 0 0 0 1px #ffffff1c; font: 900 18px/1 var(--font-title); }
.mgo { min-height: 64px; }
.mgo.is-play { color: #04210f; background: linear-gradient(180deg, #5cf09a, #18a95f); box-shadow: inset 0 1px 0 #ffffff80, inset 0 -5px 0 #0002, 0 10px 22px -10px #18a95f; }
.mrand { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 0; border-radius: 13px; cursor: pointer;
  font: 800 14px/1 var(--font-title); color: #dfe6f7; background: #ffffff0f; box-shadow: inset 0 0 0 1.500px rgb(92 200 255 / 0.400); }
.mrand[hidden] { display: none; }
.mrand svg { width: 18px; height: 18px; fill: currentColor; }
.mpanel__msg { margin: 0; font: 700 13px/1.300 var(--font-title); color: #ff8a8a; text-align: center; }
.mpanel__msg:empty { display: none; }
.mpanel__msg a { color: #8cc8ff; }
.mpanel__hint { margin: 0; font: 600 12px/1.450 var(--font-body, inherit); color: #7d88a6; }
.mines:fullscreen { overflow-y: auto; padding: 12px; background: #090c1a; }
.mines:-webkit-full-screen { overflow-y: auto; padding: 12px; background: #090c1a; }
/* окно «Честная игра», открытое из Мин: блок раунда Краша не нужен */
.fsheet.is-mines .fcard--crash { display: none; }
@media (prefers-reduced-motion: reduce) {
  body.is-mines .mines, .mcell.is-hit, .mfield.is-shake, .mcell.is-gem.is-new img, .mresult { animation: none; }
}

/* звук: одна иконка за раз; логотип Мин шире, чем у Краша — уменьшаем, чтобы баланс и меню влезали */
#mines-sound .is-off { display: none; }
#mines-sound[aria-pressed="false"] .is-on { display: none; }
#mines-sound[aria-pressed="false"] .is-off { display: block; }
#mines-sound[aria-pressed="false"] { color: #8a93ad; }
.msky .crash__head { gap: 8px; }
.msky .crash__logo { height: 50px; min-width: 0; flex: 0 1 auto; object-fit: contain; object-position: left center; max-width: 42%; }
@media (min-width: 960px) { .msky .crash__logo { height: 64px; max-width: none; } }
.msky .cbal { min-width: 0; }
/* на компьютере: поле слева, ставка справа (правило раскладки Краша сюда не относится) */
@media (min-width: 960px) {
  .mines__grid .msky { grid-area: auto; grid-column: 1; grid-row: 1; }
  .mines__grid .mpanel { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h, 70px) + 12px); }
  .mfield { max-width: 560px; margin: 0 auto; }
}
.mamt .cbal__coin { width: 22px; height: 24px; font-size: 11px; }