/* =====================================================================
   Раздел «games»: краш (cr-), мины (mn-), плинко (pl-).
   Общие элементы этих трёх игр — префикс g1-.
   ===================================================================== */

/* ---------- Шапка игры ---------- */
.g1-head .shead-ic img { animation: floatyRot 4.4s ease-in-out infinite; }
.g1-hr { display: flex; align-items: center; gap: 8px; flex: none; }
.g1-rtp { height: 28px; padding: 0 10px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.g1-info { width: 38px; height: 38px; }
.g1-info svg { width: 19px; height: 19px; }

/* ---------- Сцена игры ---------- */
.g1-stage {
  --g1-rgb: 139, 92, 246;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid rgba(var(--g1-rgb), 0.26);
  background:
    radial-gradient(120% 70% at 50% 118%, rgba(var(--g1-rgb), 0.32) 0%, rgba(var(--g1-rgb), 0) 62%),
    radial-gradient(85% 65% at 0% 0%, rgba(124, 58, 237, 0.42) 0%, rgba(124, 58, 237, 0) 62%),
    radial-gradient(70% 55% at 100% 6%, rgba(225, 78, 202, 0.2) 0%, rgba(225, 78, 202, 0) 60%),
    linear-gradient(165deg, #261552 0%, #160c35 52%, #0c0722 100%);
  box-shadow: 0 22px 50px -16px rgba(var(--g1-rgb), 0.4), var(--sh-1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
/* стеклянный блик сверху (под содержимым сцены) */
.g1-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 30%);
  pointer-events: none;
}

.g1-controls { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.g1-field { display: flex; flex-direction: column; gap: 7px; }
.g1-field > span { padding-left: 2px; font: 800 11px/1.2 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.g1-off {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: rgba(255, 77, 109, 0.1);
  border: 1px solid rgba(255, 77, 109, 0.32);
  color: #ffb3c1;
  font-weight: 700;
  font-size: 14px;
}
.g1-off .ico svg { width: 18px; height: 18px; }

/* ---------- Лента результатов ---------- */
.g1-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: -4px 0 12px;
  padding: 1px 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 84%, transparent);
  mask-image: linear-gradient(90deg, #000 84%, transparent);
}
.g1-strip::-webkit-scrollbar { display: none; }
.g1-strip-empty { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding-left: 2px; font-size: 12.5px; font-weight: 700; color: var(--text-3); white-space: nowrap; }
.g1-strip-empty .ico svg { width: 15px; height: 15px; }
.g1-x {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 800 12px/1 var(--font);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.g1-x.lose { color: #ff9db0; background: rgba(255, 77, 109, 0.12); border-color: rgba(255, 77, 109, 0.3); }
.g1-x.low { color: var(--text-2); background: rgba(255, 255, 255, 0.06); border-color: var(--stroke-2); }
.g1-x.mid { color: #ddd1ff; background: rgba(139, 92, 246, 0.24); border-color: rgba(167, 139, 250, 0.45); }
.g1-x.hi { color: var(--mint); background: rgba(61, 245, 194, 0.12); border-color: rgba(61, 245, 194, 0.38); }
.g1-x.top { color: #3b2200; background: var(--grad-gold); box-shadow: 0 4px 12px rgba(255, 159, 28, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.g1-x.is-new { animation: g1ChipIn 0.6s var(--spring) both; }
.g1-x-skel { flex: none; width: 54px; height: 28px; border-radius: 10px; }

/* ---------- Шторка правил ---------- */
.g1-rules { display: flex; flex-direction: column; gap: 12px; }
.g1-rules-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-l);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke-2);
}
.g1-rules-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 140% at 8% 50%, var(--gc), transparent 70%); opacity: 0.35; }
.g1-rules-art { width: 62px; height: 62px; flex: none; }
.g1-rules-art img { width: 100%; height: 100%; object-fit: contain; animation: floatyRot 4s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45)); }
.g1-rules-hero b { display: block; font: 800 17px/1.2 var(--font-d); text-transform: uppercase; }
.g1-rules-hero small { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.g1-rules .label { margin: 4px 2px -2px; }
.g1-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.g1-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.42;
}
.g1-steps li i {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font: 800 12px/1 var(--font-d);
  font-style: normal;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.g1-rules-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 16px; background: var(--well); border: 1px solid var(--stroke); }
.g1-rules-row b { display: block; font-size: 14px; font-weight: 800; }
.g1-rules-row small { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.g1-rules .btn { margin-top: 4px; }

/* =====================================================================
   Краш
   ===================================================================== */
.cr-stage { --g1-rgb: 255, 106, 61; --cr-rgb: 139, 92, 246; height: clamp(236px, 66vw, 300px); }
.cr-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

.cr-top { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.cr-top .badge { height: 26px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-variant-numeric: tabular-nums; }
.cr-round .live-dot { width: 6px; height: 6px; }
.cr-pc .ico svg { width: 13px; height: 13px; }
.cr-pc b { font-weight: 800; }

.cr-center { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding-top: 14px; pointer-events: none; }

/* большой множитель */
.cr-mult {
  display: none;
  align-items: baseline;
  gap: 2px;
  color: #fff;
  font-family: var(--font-d);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 26px rgba(var(--cr-rgb), 0.9), 0 4px 18px rgba(0, 0, 0, 0.55);
  transition: color var(--t) var(--ease);
}
.cr-mult b { display: inline-block; font-size: clamp(44px, 14vw, 60px); font-weight: 800; letter-spacing: -0.01em; }
.cr-mult i { font-style: normal; font-size: clamp(24px, 7vw, 32px); opacity: 0.85; }
.cr-mult b.is-win { animation: winPulse 0.5s var(--spring) 2; }
.cr-stage.is-running .cr-mult, .cr-stage.is-crashed .cr-mult { display: flex; }
.cr-stage.is-running .cr-mult { animation: popIn 0.5s var(--spring) both; }
.cr-stage.is-crashed .cr-mult { color: #ffc2cd; animation: crCrashText 0.6s var(--ease) both; }

/* подпись под множителем */
.cr-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 32px);
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(8, 5, 20, 0.55);
  border: 1px solid var(--stroke-2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.cr-sub > span { overflow: hidden; text-overflow: ellipsis; }
.cr-sub .amt { font-size: 13px; color: var(--text); }
.cr-sub .st { width: 14px; height: 14px; }
.cr-sub.win { color: var(--green); border-color: rgba(70, 240, 143, 0.42); background: rgba(8, 40, 26, 0.62); }
.cr-sub.win .amt b { color: var(--green); }
.cr-sub.lose { color: #ff9db0; border-color: rgba(255, 77, 109, 0.42); background: rgba(48, 8, 20, 0.62); }
.cr-stage.is-wait .cr-sub { visibility: hidden; }

/* отсчёт до старта: кольцо */
.cr-ring { position: relative; display: none; width: 112px; height: 112px; }
.cr-stage.is-betting .cr-ring { display: block; animation: popIn 0.5s var(--spring) both; }
.cr-ring-svg, .cr-ring-svg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cr-ring-svg svg { overflow: visible; transform: rotate(-90deg); filter: drop-shadow(0 0 10px rgba(225, 78, 202, 0.55)); }
.cr-ring-bg { fill: rgba(8, 5, 20, 0.62); stroke: rgba(255, 255, 255, 0.08); stroke-width: 8; }
.cr-ring-arc { fill: none; stroke-width: 8; stroke-linecap: round; }
.cr-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cr-ring-c b { font: 800 30px/1 var(--font-d); color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(225, 78, 202, 0.6); }
.cr-ring-c small { margin-top: 5px; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }

/* подключение / нет связи */
.cr-conn {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(10, 6, 26, 0.38);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility var(--t);
}
.cr-conn .spinner { width: 30px; height: 30px; margin: 0; }
.cr-stage.is-wait .cr-conn, .cr-stage.is-off .cr-conn { opacity: 1; visibility: visible; }

/* взрыв: тряска и красная вспышка */
.cr-stage.is-shake { animation: crShake 0.6s var(--ease); }
.cr-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  background: radial-gradient(70% 70% at 70% 35%, rgba(255, 77, 109, 0.5), rgba(255, 77, 109, 0) 70%);
  opacity: 0;
  pointer-events: none;
}
.cr-stage.is-flash::after { animation: g1Flash 0.9s var(--ease); }

/* автовывод */
.cr-auto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 9px 9px 12px;
  border-radius: 16px;
  background: var(--well);
  border: 1px solid var(--stroke-2);
  transition: border-color var(--t), box-shadow var(--t);
}
.cr-auto.on { border-color: rgba(167, 139, 250, 0.55); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12); }
.cr-auto-l { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.cr-auto-l > span { min-width: 0; }
.cr-auto-l b { display: block; font-size: 14px; font-weight: 800; }
.cr-auto-l small { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-auto-box {
  display: flex;
  align-items: center;
  flex: none;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  opacity: 0.55;
  transition: opacity var(--t), border-color var(--t);
}
.cr-auto.on .cr-auto-box { opacity: 1; border-color: rgba(167, 139, 250, 0.35); }
.cr-auto-step { width: 32px; height: 100%; padding: 0; border: 0; background: none; color: var(--text-2); display: grid; place-items: center; transition: transform var(--t-fast) var(--spring), color var(--t); }
.cr-auto-step svg { width: 16px; height: 16px; }
.cr-auto-step:active:not(:disabled) { transform: scale(0.82); color: #fff; }
.cr-auto-step:disabled, .cr-auto-in:disabled { opacity: 0.45; }
.cr-auto-x { font-weight: 800; color: var(--text-3); }
.cr-auto-in { width: 50px; height: 100%; padding: 0 0 0 2px; border: 0; outline: none; background: none; color: #fff; font: 800 15px var(--font); font-variant-numeric: tabular-nums; }

/* главная кнопка */
.cr-main .amt { padding: 4px 9px; border-radius: 10px; background: rgba(0, 0, 0, 0.16); font-size: 15px; }
.cr-main.btn-glass .amt { background: rgba(255, 255, 255, 0.07); }
.cr-main.is-ok:disabled { opacity: 1; filter: none; }
.cr-main.btn-glass.is-ok .ico { color: var(--green); }
.cr-main.btn-gold:not(:disabled) { animation: crCashGlow 1.3s ease-in-out infinite; }
.cr-main.is-queued { border: 1px dashed rgba(255, 197, 61, 0.6); color: var(--gold); }
.cr-wait { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--gold); animation: crPing 1.5s infinite; }

/* ставки раунда */
.cr-players { padding: 4px 12px; }
.cr-plist { display: flex; flex-direction: column; }
.cr-plist > .skel { margin: 8px 0; }
.cr-prow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--stroke); transition: opacity var(--t) var(--ease), background-color var(--t); }
.cr-prow:last-child { border-bottom: 0; }
.cr-prow.is-in { animation: fadeUp 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.cr-prow.is-me { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 12px; background: rgba(139, 92, 246, 0.16); border-bottom-color: transparent; }
.cr-prow.is-flash { animation: crRowWin 0.9s var(--ease); }
.cr-prow[data-s='lost'] { opacity: 0.62; }
.cr-ava {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 13px/1 var(--font);
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 85% 66%), hsl(calc(var(--h) + 50) 70% 42%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 10px rgba(0, 0, 0, 0.3);
}
.cr-pname { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.cr-pname span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-pname em { flex: none; padding: 2px 6px; border-radius: 6px; background: var(--grad-primary); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.cr-prow > .amt { font-size: 13px; color: var(--text-2); }
.cr-pres { min-width: 62px; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.cr-pres b { font-size: 13.5px; font-weight: 800; }
.cr-pres small { font-size: 11px; font-weight: 700; }
.cr-prow[data-s='won'] .cr-pres { color: var(--green); }
.cr-prow[data-s='lost'] .cr-pres { color: var(--red); }
.cr-live { width: 8px; height: 8px; border-radius: 50%; background: var(--violet-2); box-shadow: 0 0 8px rgba(167, 139, 250, 0.8); animation: pulse 1.1s ease-in-out infinite; }
.cr-empty { display: grid; justify-items: center; gap: 8px; padding: 18px 8px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-3); }
.cr-empty img { width: 46px; height: 46px; animation: floatyRot 4s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4)); }

/* честность раунда */
.cr-fair { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; text-align: left; color: var(--text); font: inherit; cursor: pointer; transition: transform var(--t-fast) var(--ease); }
.cr-fair:active { transform: scale(0.98); }
.cr-fair .grow > b { display: block; font-size: 13px; font-weight: 800; }
.cr-fair > .ico { color: var(--text-3); }
.cr-fair > .ico svg { width: 18px; height: 18px; }
.cr-hash { margin-top: 3px; color: var(--text-3); word-break: normal; }
.cr-hash div { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cr-seed { color: var(--mint); }

/* =====================================================================
   Мины
   ===================================================================== */
.mn-stage { --g1-rgb: 61, 245, 194; padding: 12px; }
.mn-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  background: radial-gradient(60% 60% at 50% 55%, rgba(255, 77, 109, 0.42), rgba(255, 77, 109, 0) 70%);
  opacity: 0;
  pointer-events: none;
}
.mn-stage.is-flash::after { animation: g1Flash 0.8s var(--ease); }

/* счётчики и текущий множитель */
.mn-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mn-cnt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px 0 6px;
  border-radius: 12px;
  background: rgba(8, 5, 20, 0.5);
  border: 1px solid var(--stroke);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mn-cnt img { width: 24px; height: 24px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4)); }
.mn-cnt b { min-width: 14px; }
.mn-mult { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.mn-mult small { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.mn-mult b { display: block; font: 800 21px/1.15 var(--font-d); color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(61, 245, 194, 0.45); transition: color var(--t); }
.mn-mult.is-bump b { animation: bump 0.4s var(--spring); }
.mn-mult.is-won b { color: var(--mint); }
.mn-mult.is-lost b { color: var(--red); text-shadow: 0 0 16px rgba(255, 77, 109, 0.5); }

/* лестница множителей */
.mn-ladder {
  position: relative;
  display: flex;
  gap: 6px;
  margin: 0 -12px 12px;
  padding: 2px 12px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 26px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 26px), transparent);
}
.mn-ladder::-webkit-scrollbar { display: none; }
.mn-step {
  flex: none;
  min-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  transition: background-color var(--t), border-color var(--t), box-shadow var(--t);
}
.mn-step small { font-size: 9.5px; font-weight: 800; color: var(--text-3); }
.mn-step b { font-size: 12.5px; font-weight: 800; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mn-step.is-done { background: rgba(61, 245, 194, 0.1); border-color: rgba(61, 245, 194, 0.3); }
.mn-step.is-done b { color: var(--mint); }
.mn-step.is-cur { background: linear-gradient(135deg, rgba(61, 245, 194, 0.36), rgba(47, 217, 245, 0.24)); border-color: rgba(61, 245, 194, 0.75); box-shadow: 0 4px 14px rgba(61, 245, 194, 0.3); }
.mn-step.is-cur b, .mn-step.is-cur small { color: #fff; }
.mn-step.is-next { border-color: rgba(255, 197, 61, 0.6); animation: mnNext 1.6s ease-in-out infinite; }
.mn-step.is-next b { color: var(--gold); }
.mn-step.is-lost { background: rgba(255, 77, 109, 0.14); border-color: rgba(255, 77, 109, 0.5); }
.mn-step.is-lost b { color: var(--red); text-decoration: line-through; }

/* поле 5×5 */
.mn-board { position: relative; }
.mn-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mn-grid.is-shake { animation: shake 0.5s var(--ease); }
.mn-tile {
  --d: 0ms;
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: inherit;
  cursor: pointer;
  background: linear-gradient(165deg, rgba(167, 139, 250, 0.44) 0%, rgba(98, 64, 196, 0.42) 45%, rgba(52, 30, 120, 0.58) 100%);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.28), inset 0 -3px 0 rgba(16, 6, 44, 0.42), 0 4px 0 rgba(18, 8, 48, 0.85), 0 9px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.14s var(--ease), box-shadow 0.3s var(--ease) var(--d);
}
/* блик стекла */
.mn-tile::before {
  content: '';
  position: absolute;
  inset: 3px 3px 50% 3px;
  border-radius: 13px 13px 40% 40% / 13px 13px 24% 24%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  pointer-events: none;
  transition: opacity 0.3s var(--ease) var(--d);
}
/* подложка открытой клетки (проявляется с задержкой --d для «волны») */
.mn-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.35s var(--ease) var(--d);
}
.mn-face { width: 24%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(226, 214, 255, 0.6) 0%, rgba(226, 214, 255, 0) 70%); transition: opacity 0.2s; }
.mn-tile:active:not(:disabled) {
  transform: translateY(3px) scale(0.94);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.22), inset 0 -2px 0 rgba(16, 6, 44, 0.4), 0 1px 0 rgba(18, 8, 48, 0.85), 0 3px 8px rgba(0, 0, 0, 0.3);
  transition-delay: 0s;
}
.mn-tile:disabled { cursor: default; }
/* во время игры блики закрытых клеток «дышат» волной от центра */
.mn-stage.is-active .mn-tile.s-hidden:not(:disabled)::before { animation: mnGlint 2.6s ease-in-out infinite; animation-delay: calc(var(--d) + 0.6s); }
.mn-stage.is-idle .mn-tile { filter: saturate(0.85); }
.mn-tile:not(.s-hidden) {
  cursor: default;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(18, 8, 48, 0.85), 0 3px 8px rgba(0, 0, 0, 0.25);
}
.mn-tile:not(.s-hidden)::before { opacity: 0.25; }
.mn-tile:not(.s-hidden)::after { opacity: 1; }
.mn-tile:not(.s-hidden) .mn-face { opacity: 0; }
.mn-tile.s-gem::after { background: radial-gradient(circle at 50% 42%, rgba(90, 255, 214, 0.55), rgba(12, 66, 72, 0.96) 72%); box-shadow: inset 0 0 0 1.5px rgba(61, 245, 194, 0.6), 0 0 18px rgba(61, 245, 194, 0.35); }
.mn-tile.s-hit { z-index: 3; }
.mn-tile.s-hit::after { background: radial-gradient(circle at 50% 45%, rgba(255, 120, 140, 0.8), rgba(128, 14, 46, 0.96) 72%); box-shadow: inset 0 0 0 1.5px rgba(255, 140, 160, 0.75), 0 0 24px rgba(255, 77, 109, 0.55); }
.mn-tile.s-mine::after { background: radial-gradient(circle, rgba(255, 77, 109, 0.26), rgba(54, 14, 34, 0.92) 75%); box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.3); }
.mn-tile.s-dim::after { background: radial-gradient(circle, rgba(61, 245, 194, 0.12), rgba(20, 28, 54, 0.9) 75%); box-shadow: inset 0 0 0 1px rgba(61, 245, 194, 0.14); }
.mn-tile.is-busy { animation: mnBusy 0.7s ease-in-out infinite; }
.mn-tile.is-back { animation: mnBack 0.5s var(--spring) both; animation-delay: var(--d); }

/* 3D-иконки в клетках */
.mn-ic { position: relative; z-index: 1; width: 64%; height: 64%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
.mn-tile.s-hidden .mn-ic { display: none; }
.mn-tile.s-gem .mn-ic { animation: mnPop 0.55s var(--spring) both; }
.mn-tile.s-hit .mn-ic { width: 70%; height: 70%; animation: mnPop 0.45s var(--spring) both; }
.mn-tile.s-mine .mn-ic { width: 54%; height: 54%; opacity: 0.8; animation: mnIn 0.45s var(--ease) both; animation-delay: var(--d); }
.mn-tile.s-dim .mn-ic { width: 50%; height: 50%; opacity: 0.38; filter: grayscale(0.35) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); animation: mnIn 0.45s var(--ease) both; animation-delay: var(--d); }

/* искры при открытии алмаза */
.mn-sparks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.mn-sparks::before { content: ''; position: absolute; inset: 12%; border-radius: 50%; border: 2px solid rgba(139, 255, 224, 0.85); animation: mnRing 0.6s var(--ease) both; }
.mn-sparks i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 30%, #8bffe0 60%, rgba(61, 245, 194, 0) 72%);
  box-shadow: 0 0 8px rgba(61, 245, 194, 0.9);
  animation: mnSpark 0.7s var(--ease) both;
}

/* взрыв на клетке с миной */
.mn-boom { position: absolute; left: 50%; top: 50%; z-index: 3; width: 190%; height: 190%; max-width: none; margin: -95% 0 0 -95%; pointer-events: none; animation: mnBoom 0.95s var(--ease) 0.12s both; }

/* баннер результата поверх поля */
.mn-banner {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  z-index: 5;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(-50%) scale(0.86);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.5s var(--spring);
}
.mn-banner.show { opacity: 1; transform: translateY(-50%); }
.mn-banner-in {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 18px;
  text-align: center;
  font-weight: 800;
  background: rgba(14, 8, 34, 0.88);
  border: 1px solid var(--stroke-2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.mn-banner-in img { width: 26px; height: 26px; }
.mn-banner-in .ico svg { width: 17px; height: 17px; }
.mn-banner.is-win .mn-banner-in { flex-direction: column; gap: 3px; padding: 14px 28px; border-color: rgba(61, 245, 194, 0.55); box-shadow: 0 0 0 1px rgba(61, 245, 194, 0.15), 0 18px 46px rgba(61, 245, 194, 0.28); }
.mn-banner.is-win small { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint); }
.mn-banner.is-win b { font: 800 32px/1.1 var(--font-d); background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mn-banner.is-win .amt { font-size: 16px; }
.mn-banner.is-lose .mn-banner-in { border-color: rgba(255, 77, 109, 0.55); color: #ffb3c1; box-shadow: 0 14px 34px rgba(255, 77, 109, 0.22); }
.mn-banner.is-info .mn-banner-in { border-color: rgba(167, 139, 250, 0.5); font-size: 13px; color: #ddd1ff; }
.mn-banner.is-hint .mn-banner-in { font-size: 13px; font-weight: 700; color: var(--text-2); }

/* загрузка: клетки мерцают */
.mn-stage.is-loading .mn-tile::after { opacity: 1; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0) 100%); background-size: 200% 100%; animation: skel 1.4s ease infinite; }

/* выбор числа мин */
.mn-pick { display: flex; flex-direction: column; gap: 10px; }
.mn-pick-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mn-pick-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mn-pick-l img { width: 34px; height: 34px; flex: none; animation: floaty 3.6s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4)); }
.mn-pick-l > div { min-width: 0; }
.mn-pick-l b { display: block; font-size: 14px; font-weight: 800; }
.mn-pick-l small { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-stepper { display: flex; align-items: center; flex: none; height: 42px; border-radius: 14px; background: var(--well); border: 1px solid var(--stroke-2); }
.mn-sb { width: 40px; height: 100%; padding: 0; border: 0; background: none; color: var(--text-2); display: grid; place-items: center; transition: transform var(--t-fast) var(--spring), color var(--t), opacity var(--t); }
.mn-sb svg { width: 18px; height: 18px; }
.mn-sb:active:not(:disabled) { transform: scale(0.82); color: #fff; }
.mn-sb:disabled { opacity: 0.35; }
.mn-cv { display: inline-block; min-width: 34px; text-align: center; font: 800 18px/1 var(--font-d); color: #fff; font-variant-numeric: tabular-nums; }
.mn-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mn-chips .chip { height: 34px; padding: 0 4px; }
.mn-actions { display: flex; gap: 10px; }
.mn-main { flex: 1; min-width: 0; }
.mn-main .amt { padding: 4px 9px; border-radius: 10px; background: rgba(0, 0, 0, 0.16); font-size: 15px; }
.mn-main.btn-gold:not(:disabled) { animation: crCashGlow 1.3s ease-in-out infinite; }
.mn-rand { width: 58px; flex: none; padding: 0; }
.mn-rand svg { width: 22px; height: 22px; }
.mn-rand:not(:disabled):active svg { animation: wiggle 0.3s var(--ease); }

/* =====================================================================
   Плинко
   ===================================================================== */
.pl-stage { --g1-rgb: 255, 106, 213; padding: 8px 6px 4px; }
.pl-canvas { display: block; width: 100%; height: 320px; }
.pl-fly {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  height: 26px;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s var(--ease), transform 0.4s var(--spring);
}
.pl-fly.show { opacity: 1; transform: none; }
.pl-fly-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad-gold); box-shadow: 0 0 8px rgba(255, 197, 61, 0.85); animation: pulse 1s ease-in-out infinite; }
.pl-drop .amt { padding: 4px 9px; border-radius: 10px; background: rgba(0, 0, 0, 0.16); font-size: 15px; }
.pl-drop .ico svg { width: 18px; height: 18px; stroke-width: 2.6; }
.pl-drop:active:not(:disabled) .ico { animation: plDrop 0.35s var(--ease); }

/* ---------- Узкие экраны ---------- */
@media (max-width: 370px) {
  .mn-stage { padding: 10px; }
  .mn-ladder { margin: 0 -10px 10px; padding: 2px 10px 4px; }
  .mn-grid { gap: 6px; }
  .mn-tile { border-radius: 13px; }
  .cr-auto-l small, .mn-pick-l small { display: none; }
  .g1-rtp { padding: 0 8px; }
}

/* ---------- Анимации раздела ---------- */
@keyframes g1ChipIn { 0% { opacity: 0; transform: translateX(-14px) scale(0.6); } 100% { opacity: 1; transform: none; } }
@keyframes g1Flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes crShake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-7px, 3px) rotate(-0.6deg); }
  30% { transform: translate(6px, -3px) rotate(0.6deg); }
  45% { transform: translate(-4px, 2px); }
  60% { transform: translate(4px, -1px); }
  80% { transform: translate(-2px, 1px); }
}
@keyframes crCrashText { 0% { transform: scale(1.18); } 35% { transform: scale(0.94) rotate(-2deg); } 65% { transform: scale(1.03) rotate(1deg); } 100% { transform: none; } }
@keyframes crCashGlow { 0%, 100% { box-shadow: 0 10px 26px rgba(255, 159, 28, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.6); } 50% { box-shadow: 0 10px 34px rgba(255, 159, 28, 0.7), 0 0 0 4px rgba(255, 197, 61, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6); } }
@keyframes crPing { 0% { box-shadow: 0 0 0 0 rgba(255, 197, 61, 0.6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(255, 197, 61, 0); } }
@keyframes crRowWin { 0% { background-color: rgba(70, 240, 143, 0.28); } 100% { background-color: rgba(70, 240, 143, 0); } }
@keyframes mnPop { 0% { opacity: 0; transform: scale(0.2) rotate(-25deg); } 60% { opacity: 1; transform: scale(1.18) rotate(6deg); } 100% { opacity: 1; transform: none; } }
@keyframes mnIn { from { opacity: 0; transform: scale(0.3); } }
@keyframes mnBack { 0% { transform: scale(0.82); filter: brightness(1.6); } 100% { transform: none; filter: none; } }
@keyframes mnBusy { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.92); } }
@keyframes mnGlint { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes mnNext { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 197, 61, 0); } 50% { box-shadow: 0 0 0 3px rgba(255, 197, 61, 0.2); } }
@keyframes mnRing { from { opacity: 1; transform: scale(0.3); } to { opacity: 0; transform: scale(1.4); } }
@keyframes mnSpark { 0% { opacity: 1; transform: rotate(var(--a)) translateX(0) scale(0.5); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--r)) scale(0.15); } }
@keyframes mnBoom { 0% { opacity: 0; transform: scale(0.2); } 18% { opacity: 1; } 42% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes plDrop { 0% { transform: none; } 50% { transform: translateY(4px); } 100% { transform: none; } }
