.mn-page {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #0B0E17;
  z-index: 100;
}

.mn-root {
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 0;
  background:
    radial-gradient(120% 50% at 50% 0%, rgba(46,204,113,.07), transparent 60%),
    #0B0E17;
}

.mn-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: rgba(11,14,23,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  flex-shrink: 0;
}
.mn-hdr-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: rgba(255,255,255,.08);
  border-radius: 10px; color: #fff; cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.mn-hdr-btn:active { background: rgba(255,255,255,.16); }
.mn-hdr-btn svg { width: 18px; height: 18px; }
.mn-mute-btn svg { width: 16px; height: 16px; }
.mn-hdr-title {
  flex: 1; min-width: 0;
  text-align: center;
  font-size: 12px; font-weight: 800; letter-spacing: 3px;
  color: rgba(255,255,255,.7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mn-screen {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 14px 24px;
  touch-action: pan-y;
}

.mt-14 { margin-top: 14px; }

.mn-balance-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 4px;
}
.mn-balance-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: rgba(255,255,255,.4);
}
.mn-balance {
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 800; color: #F1C40F;
}
.mn-coin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFE066, #D4A017);
  box-shadow: 0 0 8px rgba(241,196,15,.5);
  display: inline-block; flex-shrink: 0;
}
.mn-coin-dot-lg { width: 22px; height: 22px; }

.mn-card {
  background: linear-gradient(160deg, rgba(28,36,52,.9), rgba(16,20,30,.95));
  border: 1px solid rgba(46,204,113,.18);
  border-radius: 20px;
  padding: 16px 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.mn-card-title {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: rgba(255,255,255,.42);
}

.mn-bet-row {
  display: flex;
}
.mn-bet-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 20px; font-weight: 800;
  font-family: Manrope, sans-serif;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.mn-bet-input::-webkit-outer-spin-button,
.mn-bet-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.mn-bet-input:focus {
  border-color: rgba(46,204,113,.5);
  box-shadow: 0 0 0 3px rgba(46,204,113,.12);
}

.mn-chips {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
.mn-chip {
  padding: 8px 2px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.75);
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  font-family: Manrope, sans-serif;
  cursor: pointer;
  transition: transform .1s ease, background .15s;
}
.mn-chip:active {
  transform: scale(.93);
  background: rgba(46,204,113,.18);
  border-color: rgba(46,204,113,.4);
  color: #9CFFD8;
}

.mn-grids {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.mn-grid-btn {
  padding: 11px 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.7);
  font-size: 15px; font-weight: 800;
  font-family: Manrope, sans-serif;
  cursor: pointer;
  transition: all .15s;
}
.mn-grid-btn.active {
  background: rgba(46,204,113,.15);
  border-color: rgba(46,204,113,.5);
  color: #9CFFD8;
  box-shadow: 0 0 14px rgba(46,204,113,.15);
}

.mn-mines-head {
  display: flex; align-items: center; justify-content: space-between;
}
.mn-num {
  font-size: 18px; font-weight: 800; color: #FF6B81;
}
.mn-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px;
  background: transparent;
  cursor: pointer;
}
.mn-range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #2ECC71, #F1C40F, #E74C3C);
}
.mn-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #2ECC71;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.mn-range::-moz-range-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #2ECC71, #F1C40F, #E74C3C);
}
.mn-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  border: 3px solid #2ECC71;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.mn-ladder {
  display: flex; flex-direction: column; gap: 4px;
}
.mn-ladder-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,.75);
}
.mn-ladder-row b {
  color: #F1C40F;
  font-weight: 800;
}
.mn-ladder-more {
  background: rgba(241,196,15,.08);
}
.mn-ladder-more b { color: #FFD700; }

.mn-play-btn {
  margin-top: 6px;
  padding: 14px;
  font-size: 15px; font-weight: 800; letter-spacing: 2px;
  border-radius: 14px;
  background: linear-gradient(135deg, #27AE60, #1E8449);
  box-shadow: 0 8px 22px rgba(46,204,113,.25);
}
.mn-play-btn:active { transform: scale(.98); }
.mn-play-btn svg { width: 18px; height: 18px; }

.mn-status-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px 12px;
}
.mn-status-left {
  display: flex; gap: 8px;
}
.mn-bet-tag {
  padding: 5px 10px; border-radius: 20px;
  background: rgba(241,196,15,.12);
  border: 1px solid rgba(241,196,15,.25);
  font-size: 11px; font-weight: 800; color: #F1C40F;
}
.mn-mine-tag {
  padding: 5px 10px; border-radius: 20px;
  background: rgba(231,76,60,.12);
  border: 1px solid rgba(231,76,60,.25);
  font-size: 11px; font-weight: 800; color: #FF8A80;
}
.mn-mult {
  font-size: 24px; font-weight: 800; color: #2ECC71;
  text-shadow: 0 0 16px rgba(46,204,113,.45);
  line-height: 1;
}

.mn-grid {
  display: grid; gap: 8px;
  width: 100%; max-width: 380px;
  margin: 0 auto;
}
.mn-g3 { grid-template-columns: repeat(3, 1fr); }
.mn-g4 { grid-template-columns: repeat(4, 1fr); }
.mn-g5 { grid-template-columns: repeat(5, 1fr); }

.mn-tile {
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.02) 40%),
    linear-gradient(160deg, #1E2A42, #131B2E);
  box-shadow: 0 3px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 22px;
  transition: transform .1s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.mn-tile:active { transform: scale(.94); }
.mn-tile.pending {
  animation: mn-tile-pulse .6s ease-in-out infinite;
  pointer-events: none;
}
.mn-tile.revealed {
  pointer-events: none;
  animation: mn-flip .35s ease-out;
}
.mn-tile.revealed.safe {
  background:
    linear-gradient(180deg, rgba(46,204,113,.25), rgba(46,204,113,.08)),
    linear-gradient(160deg, #14301F, #0E2417);
  border-color: rgba(46,204,113,.45);
  box-shadow: 0 0 12px rgba(46,204,113,.2), inset 0 1px 0 rgba(255,255,255,.1);
}
.mn-tile.revealed.mine {
  background:
    linear-gradient(180deg, rgba(231,76,60,.3), rgba(231,76,60,.1)),
    linear-gradient(160deg, #331414, #220C0C);
  border-color: rgba(231,76,60,.5);
  box-shadow: 0 0 12px rgba(231,76,60,.25);
}
.mn-tile.busted-tile {
  animation: mn-bust-flash .5s ease-out;
  box-shadow: 0 0 26px rgba(231,76,60,.65);
}
.mn-gem, .mn-mine-emoji {
  display: inline-block;
  animation: mn-gem-pop .4s cubic-bezier(.2,1.6,.4,1);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}
.mn-mine-emoji { filter: drop-shadow(0 2px 8px rgba(231,76,60,.6)); }

.mn-grid-shake {
  animation: mn-shake .5s ease-out;
}

@keyframes mn-tile-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@keyframes mn-flip {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(.1); }
  100% { transform: scaleX(1); }
}
@keyframes mn-gem-pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes mn-bust-flash {
  0%, 100% { filter: brightness(1); }
  25% { filter: brightness(2.2); }
  50% { filter: brightness(.8); }
  75% { filter: brightness(1.6); }
}
@keyframes mn-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-8px); }
  30% { transform: translateX(7px); }
  45% { transform: translateX(-6px); }
  60% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
  90% { transform: translateX(2px); }
}

.mn-bottom {
  max-width: 380px;
  margin: 14px auto 0;
  display: flex; flex-direction: column; gap: 10px;
}
.mn-payout-row {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
}
.mn-payout-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: rgba(255,255,255,.4);
}
.mn-payout-val {
  font-size: 17px; font-weight: 800; color: #F1C40F;
}
.mn-next {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,.45);
}

.mn-cash-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px;
  border: none; border-radius: 14px;
  background: linear-gradient(135deg, #2ECC71, #1E8449);
  color: #fff;
  font-family: Manrope, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(46,204,113,.3);
  transition: transform .12s ease, box-shadow .2s;
}
.mn-cash-btn:active { transform: scale(.98); }
.mn-cash-btn[disabled] {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.35);
  box-shadow: none;
  cursor: default;
}
.mn-cash-main {
  font-size: 16px; font-weight: 800; letter-spacing: 2px;
}
.mn-cash-val {
  font-size: 16px; font-weight: 800;
  color: #FFE066;
}
.mn-cash-btn[disabled] .mn-cash-val { color: rgba(255,255,255,.3); }
.mn-cash-btn.mn-cash-glow:not([disabled]) {
  animation: mn-cash-glow 1.6s ease-in-out infinite;
}

@keyframes mn-cash-glow {
  0%, 100% {
    box-shadow: 0 8px 22px rgba(46,204,113,.3);
  }
  50% {
    box-shadow: 0 8px 30px rgba(46,204,113,.6), 0 0 18px rgba(46,204,113,.3);
  }
}

.mn-end {
  position: fixed; inset: 0;
  z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11,14,23,.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: mn-fade-in .25s ease-out;
  padding: 20px;
}
.mn-end-card {
  position: relative; overflow: hidden;
  width: 100%; max-width: 320px;
  background: linear-gradient(160deg, rgba(40,44,60,.97), rgba(20,22,30,.98));
  border: 1px solid rgba(231,76,60,.3);
  border-radius: 24px;
  padding: 28px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
  animation: mn-card-in .35s ease-out;
}
.mn-end-card.mn-end-win {
  border-color: rgba(46,204,113,.5);
  box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 40px rgba(46,204,113,.18);
}
.mn-end-title {
  font-size: 19px; font-weight: 800; letter-spacing: 2px;
  color: #FF8A80;
}
.mn-end-win .mn-end-title { color: #2ECC71; }
.mn-end-amount {
  display: flex; align-items: center; gap: 8px;
  font-size: 34px; font-weight: 800; color: #F1C40F;
  line-height: 1;
}
.mn-end-amount.mn-end-loss {
  color: #E74C3C;
}
.mn-end-mult {
  font-size: 13px; font-weight: 800; color: #2ECC71;
  letter-spacing: 1px;
}
.mn-end-sub {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.5);
}
.mn-end-buttons {
  display: flex; flex-direction: column; gap: 8px;
  width: 100%; margin-top: 6px;
}
.mn-end-buttons .btn { font-size: 14px; font-weight: 700; letter-spacing: 2px; }
.mn-end-buttons .btn svg { width: 16px; height: 16px; }

.mn-confetti {
  position: absolute; top: -12px;
  width: 7px; height: 12px; border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  animation: mn-confetti-fall linear forwards;
}
@keyframes mn-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(380px) rotate(340deg); opacity: 0; }
}
@keyframes mn-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes mn-card-in {
  0% { transform: translateY(30px) scale(.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.mn-entry {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  margin-top: 12px; padding: 15px;
  border-radius: 22px; color: var(--stage-text);
  border: none; cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 46%),
    linear-gradient(160deg, #12301F 0%, #0E2417 55%, #142836 100%);
  box-shadow:
    inset 0 0 0 1px rgba(46,204,113,.3),
    0 14px 30px rgba(0,0,0,.42),
    0 0 26px rgba(46,204,113,.1);
  transition: transform .14s ease, box-shadow .2s ease;
  overflow: hidden;
  animation: mn-entry-glow 3.2s ease-in-out infinite;
}
.mn-entry::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46,204,113,.5), rgba(241,196,15,.5), transparent);
}
.mn-entry::after {
  content: ""; position: absolute; top: -60%; bottom: -60%;
  width: 46px; left: 0;
  background: linear-gradient(100deg,
    transparent,
    rgba(255,255,255,.09) 40%,
    rgba(46,204,113,.14) 50%,
    rgba(255,255,255,.09) 60%,
    transparent);
  transform: translateX(-140%) skewX(-18deg);
  pointer-events: none;
  animation: mn-entry-shine 4.2s ease-in-out infinite;
}
.mn-entry:active {
  transform: scale(.977);
  box-shadow:
    inset 0 0 0 1px rgba(46,204,113,.5),
    0 8px 20px rgba(0,0,0,.5),
    0 0 34px rgba(46,204,113,.2);
}
@keyframes mn-entry-shine {
  0%, 64% { transform: translateX(-140%) skewX(-18deg); }
  86%, 100% { transform: translateX(340%) skewX(-18deg); }
}
@keyframes mn-entry-glow {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(46,204,113,.3),
      0 14px 30px rgba(0,0,0,.42),
      0 0 26px rgba(46,204,113,.1);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(46,204,113,.45),
      0 14px 30px rgba(0,0,0,.42),
      0 0 34px rgba(46,204,113,.16);
  }
}
.mn-entry-art {
  position: relative;
  flex-shrink: 0;
  width: 86px; height: 86px;
  display: flex; align-items: center; justify-content: center;
}
.mn-entry-fx {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
}
.mn-entry-spark {
  position: absolute; top: 18%;
  width: 5px; height: 5px; border-radius: 50%;
  background: #9CFFD8;
  box-shadow: 0 0 8px 2px rgba(46,204,113,.55);
  opacity: 0;
  animation: mn-spark-twinkle 2.6s ease-in-out infinite;
}
@keyframes mn-spark-twinkle {
  0%, 100% { opacity: 0; transform: scale(.4); }
  12% { opacity: 1; transform: scale(1.25); }
  24% { opacity: 0; transform: scale(.4); }
}
.mn-entry-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  transform: rotate(-4deg);
}
.mn-entry-cell {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: linear-gradient(160deg, #1E2A42, #131B2E);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 11px;
  box-shadow: 0 2px 4px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
  animation: mn-cell-twinkle 2.8s ease-in-out infinite;
}
.mn-entry-cell:nth-child(1) { animation-delay: 0s; }
.mn-entry-cell:nth-child(2) { animation-delay: .2s; }
.mn-entry-cell:nth-child(3) { animation-delay: .4s; }
.mn-entry-cell:nth-child(4) { animation-delay: .6s; }
.mn-entry-cell:nth-child(5) { animation-delay: .8s; }
.mn-entry-cell:nth-child(6) { animation-delay: 1s; }
.mn-entry-cell:nth-child(7) { animation-delay: 1.2s; }
.mn-entry-cell:nth-child(8) { animation-delay: 1.4s; }
.mn-entry-cell:nth-child(9) { animation-delay: 1.6s; }
@keyframes mn-cell-twinkle {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  10% { transform: scale(1.12); filter: brightness(1.5); }
  20% { transform: scale(1); filter: brightness(1); }
}
.mn-entry-cell.is-mine {
  background: linear-gradient(160deg, #331414, #220C0C);
  border-color: rgba(231,76,60,.45);
  box-shadow: 0 0 10px rgba(231,76,60,.3);
  animation: mn-mine-pulse 1.6s ease-in-out infinite;
}
@keyframes mn-mine-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(231,76,60,.25); }
  50% { box-shadow: 0 0 16px rgba(231,76,60,.6); }
}
.mn-entry-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.mn-entry-kicker {
  font-size: 9px; font-weight: 800; letter-spacing: 2.6px;
  color: #2ECC71;
  text-shadow: 0 0 10px rgba(46,204,113,.5);
}
.mn-entry-title {
  font-size: 24px; line-height: 1.05; font-weight: 800; letter-spacing: 3px;
  background: linear-gradient(92deg, #2ECC71 8%, #58D68D 52%, #F1C40F 94%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(46,204,113,.3));
}
.mn-entry-sub {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: rgba(235,228,248,.55);
}
.mn-entry-meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: rgba(241,196,15,.85);
}
.mn-entry-coin {
  width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFE066, #D4A017);
  box-shadow: 0 0 6px rgba(241,196,15,.5);
  display: inline-block; flex-shrink: 0;
}
.mn-entry-chev {
  flex-shrink: 0; align-self: center;
  font-size: 26px; font-weight: 700; color: var(--gold);
}
