/* ============================================================
   DonutDeal — game surfaces (loaded after premium.css)

   Each game gets its own material identity:
     Mines      pressed-steel minefield
     Towers     glass tower with a climb rail
     Coinflip   struck metal coin over a spotlight
     Dice       precision probability rail
     Blackjack  stitched felt table with a real shoe
   Only transforms/opacity animate. No filters on repeated tiles.
   ============================================================ */

/* --------------------------------------------------------- game heads --- */

.game-head { align-items: center; }
.game-head h1 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.head-pill {
  border: 1px solid rgba(94, 138, 232, 0.2);
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.12), rgba(12, 18, 30, 0.6));
  color: #a9bbd8;
  letter-spacing: 0.02em;
  font-weight: 600;
  font-size: 0.68rem;
  padding: 5px 10px;
  border-radius: 999px;
}
.round-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: #6e7d96;
  border: 1px solid rgba(94, 138, 232, 0.14);
  background: rgba(6, 9, 15, 0.6);
  padding: 5px 9px;
  border-radius: 8px;
}

.table-mines,
.table-towers,
.table-coin,
.table-dice,
.table-blackjack {
  padding: 0;
  overflow: hidden;
  min-height: 520px;
  justify-content: stretch;
  position: relative;
}

/* Shared board chrome ------------------------------------------------ */

.board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.board-kicker {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #77869f;
}
.board-pot {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 13px;
  border-radius: 11px;
  border: 1px solid rgba(255, 207, 92, 0.18);
  background: linear-gradient(180deg, rgba(255, 207, 92, 0.1), rgba(255, 207, 92, 0.02));
  font-variant-numeric: tabular-nums;
}
.board-pot span { font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: #9d8a5f; }
.board-pot b { font-size: 0.95rem; font-weight: 800; color: #ffd980; letter-spacing: -0.01em; }
.board-chip {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  color: #9fb2d2;
  border: 1px solid rgba(94, 138, 232, 0.2);
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.board-chip.is-live { color: #9ee8ca; border-color: rgba(53, 211, 154, 0.4); background: rgba(53, 211, 154, 0.1); }
.board-chip.is-dead { color: #ff9aa6; border-color: rgba(255, 90, 110, 0.35); background: rgba(255, 90, 110, 0.08); }

/* ================================================== MINES ============= */

.table-mines {
  background:
    radial-gradient(70% 46% at 50% 0%, rgba(47, 107, 255, 0.14), transparent 72%),
    linear-gradient(180deg, #0a0f18, #05080e);
}
.mines-board {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 4px auto 0;
  perspective: 800px;
}

.mine-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(126, 162, 232, 0.22);
  background:
    linear-gradient(180deg, rgba(52, 66, 92, 0.96) 0%, rgba(24, 32, 46, 0.98) 52%, rgba(13, 19, 29, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(0, 0, 0, 0.7),
    inset 0 -9px 16px rgba(0, 0, 0, 0.5),
    0 10px 20px -16px #000;
  transform: translateZ(0);
  transition: transform 0.13s ease, border-color 0.16s ease, box-shadow 0.18s ease;
  overflow: hidden;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.mine-tile::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 10px;
  background:
    linear-gradient(168deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 34%, transparent 62%),
    linear-gradient(200deg, transparent 62%, rgba(9, 14, 22, 0.55) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -1px 0 rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.mine-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 116%, rgba(58, 210, 255, 0.28), transparent 64%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.mine-tile:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: rgba(120, 168, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 26px -18px rgba(47, 107, 255, 0.9);
}
.mine-tile:hover:not(:disabled)::after { opacity: 1; }
.mine-tile:active:not(:disabled) { transform: translateY(0) scale(0.965); }
.mine-tile:focus-visible { outline: 2px solid rgba(120, 168, 255, 0.8); outline-offset: 2px; }
.mine-tile:disabled { cursor: default; }

.mine-tile .tile-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

/* polished gemstone */
.mine-tile .gem,
.tower-tile .gem {
  position: absolute;
  width: 54%;
  height: 54%;
  opacity: 0;
  transform: scale(0.55);
  clip-path: polygon(50% 2%, 88% 26%, 96% 62%, 62% 98%, 38% 98%, 4% 62%, 12% 26%);
  background:
    linear-gradient(152deg, #ecfff8 0%, #8bf7cd 18%, #2fd79c 48%, #119c72 76%, #066b4d 100%);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.5);
}
.mine-tile .gem::before,
.tower-tile .gem::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 36%, rgba(255, 255, 255, 0.72) 45%, transparent 55%),
    linear-gradient(200deg, transparent 58%, rgba(255, 255, 255, 0.28) 66%, transparent 74%);
  mix-blend-mode: screen;
}
.mine-tile .gem::after,
.tower-tile .gem::after {
  content: '';
  position: absolute;
  inset: 26% 22% 44% 22%;
  background: rgba(255, 255, 255, 0.32);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  opacity: 0.6;
}

/* mine */
.mine-tile .mine,
.tower-tile .bomb {
  position: absolute;
  width: 52%;
  height: 52%;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.6);
  background: radial-gradient(circle at 33% 27%, #939dad 0%, #444f61 34%, #1b222d 68%, #0a0e14 100%);
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.3), inset 0 -6px 10px rgba(0, 0, 0, 0.75);
}
.mine-tile .mine::before,
.tower-tile .bomb::before {
  content: '';
  position: absolute;
  left: 62%;
  top: -18%;
  width: 16%;
  height: 34%;
  border-radius: 2px;
  background: linear-gradient(180deg, #8d7a5e, #453a2b);
  transform: rotate(22deg);
  transform-origin: bottom center;
}
.mine-tile .mine::after,
.tower-tile .bomb::after {
  content: '';
  position: absolute;
  left: 74%;
  top: -26%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffd27a;
  box-shadow: 0 0 8px 2px rgba(255, 150, 60, 0.75);
  opacity: 0.85;
}

.mine-tile .burst {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 2px solid rgba(255, 150, 160, 0.9);
  opacity: 0;
  transform: scale(0.2);
  pointer-events: none;
}

/* minefield states */
.mine-tile.is-gem {
  border-color: rgba(108, 240, 190, 0.42);
  background: linear-gradient(180deg, rgba(16, 56, 45, 0.95), rgba(6, 26, 21, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 18px rgba(0, 0, 0, 0.5),
    0 10px 26px -20px rgba(53, 211, 154, 0.9);
}
.mine-tile.is-gem .gem {
  opacity: 1;
  animation: dd-gem-pop 0.44s cubic-bezier(0.18, 1.35, 0.4, 1) both;
  animation-delay: var(--d, 0ms);
}
.mine-tile.is-gem::after { opacity: 0.55; }

.mine-tile.is-mine {
  border-color: rgba(255, 90, 110, 0.28);
  background: linear-gradient(180deg, rgba(46, 22, 28, 0.96), rgba(22, 10, 13, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -10px 18px rgba(0, 0, 0, 0.6);
}
.mine-tile.is-mine .mine {
  opacity: 0.62;
  transform: scale(0.86);
  animation: dd-mine-muted 0.4s ease both;
  animation-delay: var(--d, 0ms);
}
.mine-tile.is-hit {
  border-color: rgba(255, 130, 145, 0.7);
  background: linear-gradient(180deg, rgba(94, 20, 32, 0.98), rgba(44, 8, 14, 0.99));
  box-shadow: inset 0 0 24px rgba(255, 60, 80, 0.35), 0 12px 30px -18px rgba(255, 60, 80, 0.9);
}
.mine-tile.is-hit .mine {
  opacity: 1;
  transform: scale(1);
  animation: dd-detonate 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.mine-tile.is-hit .burst {
  animation: dd-burst 0.7s cubic-bezier(0.1, 0.7, 0.2, 1) both;
}
.mine-tile.is-hit::after {
  opacity: 1;
  background: radial-gradient(circle at 50% 50%, rgba(255, 90, 110, 0.55), transparent 66%);
}

.mine-tile.is-armed {
  border-color: rgba(120, 168, 255, 0.75);
  transform: scale(0.955);
}
.mine-tile.is-armed::after { opacity: 1; }
.mine-tile.is-armed .tile-inner::after {
  content: '';
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  border: 2px solid rgba(140, 190, 255, 0.8);
  animation: dd-arm 0.75s ease-out infinite;
}

@keyframes dd-gem-pop {
  0% { opacity: 0; transform: scale(0.35) rotate(-16deg); }
  55% { opacity: 1; transform: scale(1.12) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes dd-mine-muted {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 0.62; transform: scale(0.86); }
}
@keyframes dd-detonate {
  0% { opacity: 0; transform: scale(0.3); }
  40% { opacity: 1; transform: scale(1.22); }
  62% { transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes dd-burst {
  0% { opacity: 0.95; transform: scale(0.25); }
  100% { opacity: 0; transform: scale(2.1); }
}
@keyframes dd-arm {
  0% { opacity: 0.85; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* board note strip */
.board-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(94, 138, 232, 0.1);
  padding-top: 12px;
}
.board-foot .table-note { text-align: left; margin: 0; }
.board-twin { display: flex; gap: 14px; font-variant-numeric: tabular-nums; }
.board-twin span { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: #6f7d95; }
.board-twin b { color: #dce6f8; font-size: 0.82rem; font-weight: 800; margin-left: 6px; }

/* ================================================= TOWERS ============= */

.table-towers {
  background:
    radial-gradient(70% 50% at 50% 100%, rgba(53, 211, 154, 0.08), transparent 70%),
    linear-gradient(180deg, #0a0f18, #05080e);
}
.tower-frame {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  align-items: stretch;
}
.tower-rail {
  position: relative;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 0 0 1px rgba(94, 138, 232, 0.12);
  overflow: hidden;
}
.tower-rail i {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 100%;
  transform: scaleY(0);
  transform-origin: bottom center;
  background: linear-gradient(0deg, rgba(47, 107, 255, 0.55), rgba(53, 211, 154, 0.85));
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tower-climber {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f2f8ff;
  box-shadow: 0 0 14px rgba(140, 190, 255, 0.9);
  transform: translate(-50%, 50%);
  transition: bottom 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tower {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
}
.tower-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  padding: 5px 6px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.012);
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.tower-row.is-cleared {
  background: linear-gradient(90deg, rgba(53, 211, 154, 0.06), transparent 70%);
  border-color: rgba(53, 211, 154, 0.14);
}
.tower-row.is-current {
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.16), rgba(47, 107, 255, 0.02) 72%);
  border-color: rgba(120, 168, 255, 0.34);
  box-shadow: 0 10px 26px -22px rgba(47, 107, 255, 0.9);
}
.tower-row.is-failed {
  background: linear-gradient(90deg, rgba(255, 90, 110, 0.14), transparent 74%);
  border-color: rgba(255, 90, 110, 0.3);
}
.floor-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 9px;
  background: rgba(4, 7, 13, 0.45);
  border: 1px solid rgba(94, 138, 232, 0.12);
  color: #7c8aa4;
}
.floor-tag b { font-size: 0.78rem; font-weight: 800; color: #b7c6de; font-variant-numeric: tabular-nums; }
.floor-tag small { font-size: 0.48rem; letter-spacing: 0.1em; text-transform: uppercase; color: #62708a; }
.tower-row.is-current .floor-tag { border-color: rgba(120, 168, 255, 0.45); color: #a8c6ff; }
.tower-row.is-current .floor-tag b { color: #e2ecff; }
.tower-row.is-cleared .floor-tag { border-color: rgba(108, 240, 190, 0.35); }
.tower-row.is-cleared .floor-tag b { color: #8cf0c8; }

.floor-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 76px));
  justify-content: center;
  gap: 9px;
}
.tower-tile {
  position: relative;
  height: 58px;
  max-width: 76px;
  border-radius: 10px;
  border: 1px solid rgba(112, 150, 224, 0.18);
  background: linear-gradient(180deg, rgba(44, 57, 80, 0.94) 0%, rgba(19, 26, 38, 0.97) 58%, rgba(11, 16, 25, 1) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 -1px 0 rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.tower-tile:disabled { opacity: 0.42; }
.tower-row.is-current .tower-tile { opacity: 1; border-color: rgba(120, 168, 255, 0.24); }
.tower-row.is-current .tower-tile:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.28), rgba(16, 26, 46, 0.95));
  border-color: rgba(140, 190, 255, 0.6);
}
.tower-tile:active:not(:disabled) { transform: scale(0.97); }
.tower-tile .tile-inner { position: absolute; inset: 0; display: grid; place-items: center; }
.tower-tile .gem { width: 40%; height: 46%; }
.tower-tile .bomb { width: 40%; height: 40%; }

.tower-tile.is-gem {
  border-color: rgba(108, 240, 190, 0.5);
  background: linear-gradient(180deg, rgba(18, 62, 49, 0.95), rgba(7, 30, 24, 0.98));
  box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.18) inset, 0 12px 24px -20px rgba(53, 211, 154, 0.9);
  opacity: 1;
}
.tower-tile.is-gem .gem { animation: dd-gem-pop 0.4s cubic-bezier(0.18, 1.35, 0.4, 1) both; }
.tower-tile.is-bomb {
  border-color: rgba(255, 130, 145, 0.65);
  background: linear-gradient(180deg, rgba(96, 20, 32, 0.98), rgba(46, 8, 15, 0.99));
  animation: dd-bomb-hit 0.42s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  opacity: 1;
}
.tower-tile.is-bomb .bomb { opacity: 1; transform: scale(1); animation: dd-detonate 0.45s ease both; }
@keyframes dd-bomb-hit {
  0% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  45% { transform: translateX(3px); }
  70% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* ================================================ COINFLIP ============ */

.table-coin {
  background:
    radial-gradient(80% 58% at 50% 34%, rgba(58, 120, 255, 0.16), transparent 70%),
    radial-gradient(60% 40% at 50% 108%, rgba(255, 207, 92, 0.07), transparent 70%),
    linear-gradient(180deg, #080d16, #04060b);
}
.coin-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 440px;
  padding: 56px 24px 46px;
  perspective: 1100px;
  --shadow-scale: 1;
}
.coin-stage::before {
  content: '';
  position: absolute;
  top: 6%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 168, 255, 0.14), transparent 62%);
  pointer-events: none;
}
.coin-floor {
  position: absolute;
  bottom: 74px;
  width: 220px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.85), transparent 72%);
  transform: scaleX(var(--shadow-scale));
  opacity: 0.9;
  pointer-events: none;
}
.coin-toss {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  z-index: 2;
}
.coin3d {
  position: relative;
  width: 188px;
  height: 188px;
  transform-style: preserve-3d;
  will-change: transform;
}
.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  overflow: hidden;
  background:
    radial-gradient(circle at 33% 26%, #fff8d9 0%, #ffe58a 22%, #f5c552 44%, #d99f27 66%, #8f6410 100%);
  box-shadow:
    inset 0 0 0 3px rgba(255, 244, 200, 0.5),
    inset 0 0 0 11px rgba(150, 102, 12, 0.35),
    inset 0 -14px 26px rgba(96, 60, 4, 0.55),
    inset 0 12px 20px rgba(255, 252, 220, 0.35);
}
.coin-face::after {
  content: '';
  position: absolute;
  left: -22%;
  top: -32%;
  width: 70%;
  height: 130%;
  background: linear-gradient(102deg, transparent 26%, rgba(255, 255, 255, 0.55) 46%, transparent 62%);
  transform: rotate(8deg);
  opacity: 0.75;
  pointer-events: none;
}
.coin-face.tails { transform: rotateY(180deg); }
.coin-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: transparent;
  border: 10px solid #a87b1d;
  transform: translateZ(-7px);
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 242, 198, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.coin-engrave {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #6a4a06;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  font-size: 0.6rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45), 0 -1px 0 rgba(90, 60, 4, 0.4);
}
.coin-emblem {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #8a6308, #c8961f, #8a6308, #d9a92c, #8a6308);
  box-shadow: inset 0 2px 6px rgba(255, 246, 200, 0.5), inset 0 -3px 8px rgba(70, 46, 2, 0.6), 0 2px 4px rgba(90, 60, 4, 0.35);
}
.coin-emblem::before {
  content: '';
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, #f3cf6d, #a5740f 70%, #7d5403 100%);
  box-shadow: inset 0 2px 5px rgba(60, 40, 2, 0.7), 0 1px 0 rgba(255, 248, 210, 0.55);
}
.coin-emblem::after {
  content: '';
  position: absolute;
  inset: 37%;
  border-radius: 50%;
  background: radial-gradient(circle, #4f3502, #7a5304);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}
.coin-word { letter-spacing: 0.22em; font-size: 0.66rem; }
.coin-dots {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.coin-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7d5403;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 248, 210, 0.4);
}

.coin-verdict {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 10px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(94, 138, 232, 0.22);
  background: rgba(9, 13, 21, 0.86);
  color: #cdd9ee;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.26s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  white-space: nowrap;
}
.coin-verdict.is-on { opacity: 1; transform: translate(-50%, 0); }
.coin-verdict.is-win { border-color: rgba(53, 211, 154, 0.45); color: #a6f2d4; background: rgba(10, 38, 30, 0.9); }
.coin-verdict.is-loss { border-color: rgba(255, 90, 110, 0.4); color: #ffadb8; background: rgba(38, 10, 16, 0.9); }
.coin-verdict b { font-size: 0.9rem; letter-spacing: 0.06em; }

.coin-stage.is-landed .coin-toss { animation: dd-coin-impact 0.34s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes dd-coin-impact {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(4px) scaleY(0.965) scaleX(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* ==================================================== DICE ============ */

.table-dice {
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(70% 46% at 50% 0%, rgba(47, 107, 255, 0.12), transparent 72%),
    linear-gradient(180deg, #0a0f18, #05080e);
}
.dice-stage {
  width: 100%;
  border: 1px solid rgba(96, 132, 214, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(560px 240px at 50% -10%, rgba(47, 107, 255, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(11, 16, 26, 0.85), rgba(5, 8, 14, 0.95));
  padding: 24px 24px 20px;
  gap: 20px;
  overflow: hidden;
}
.dice-stage.flash-win { border-color: rgba(53, 211, 154, 0.4); box-shadow: inset 0 0 90px rgba(53, 211, 154, 0.09); }
.dice-stage.flash-loss { border-color: rgba(255, 90, 110, 0.34); box-shadow: inset 0 0 90px rgba(255, 90, 110, 0.09); }
.dice-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dice-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #77869f;
}
.dice-verdict {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93a4bf;
  border: 1px solid rgba(94, 138, 232, 0.18);
  background: rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}
.dice-verdict.is-on { opacity: 1; transform: none; }
.dice-verdict.is-win { color: #a6f2d4; border-color: rgba(53, 211, 154, 0.42); background: rgba(53, 211, 154, 0.12); }
.dice-verdict.is-loss { color: #ffadb8; border-color: rgba(255, 90, 110, 0.38); background: rgba(255, 90, 110, 0.1); }

.dice-readout { margin-bottom: 0; align-items: baseline; justify-content: flex-start; gap: 16px; }
.dice-value {
  font-size: clamp(3rem, 6.5vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: #f4f8ff;
  text-shadow: 0 18px 44px rgba(47, 107, 255, 0.35);
  transition: color 0.2s ease;
}
.dice-value.win { color: #78f3c7; }
.dice-value.loss { color: #ff93a0; }
.dice-multiplier {
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 6px 11px;
  border-radius: 10px;
  color: #a9ccff;
  background: rgba(47, 107, 255, 0.12);
  border: 1px solid rgba(96, 132, 214, 0.28);
}

.dice-track-wrap { margin-top: 4px; width: 100%; max-width: 660px; margin-left: auto; margin-right: auto; }
.dice-scale { font-size: 0.6rem; letter-spacing: 0.12em; color: #66748d; margin-bottom: 9px; }
.dice-track {
  position: relative;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 90, 110, 0.24), rgba(255, 90, 110, 0.12));
  border: 1px solid rgba(120, 150, 215, 0.16);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  touch-action: none;
}
.dice-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 5%);
  pointer-events: none;
  z-index: 2;
}
.dice-zone-win {
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, rgba(53, 211, 154, 0.62), rgba(17, 132, 95, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: left 0.16s ease, width 0.16s ease, border-radius 0.16s ease;
  z-index: 1;
}
.dice-thumb {
  position: absolute;
  top: -6px;
  width: 18px;
  height: 46px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #dbe7fb 60%, #b8c9e6);
  box-shadow: 0 0 0 1px rgba(8, 11, 18, 0.6), 0 8px 20px -6px rgba(47, 107, 255, 0.85);
  transform: translateX(-50%);
  transition: left 0.14s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 4;
  cursor: grab;
}
.dice-thumb::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 18px;
  margin: -9px 0 0 -1.5px;
  border-radius: 2px;
  background: rgba(70, 90, 130, 0.5);
}
.dice-marker {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 46px;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
  z-index: 3;
  transition: none;
}
.dice-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -7px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #fff;
  transform: translateX(-50%);
}
.dice-track.is-rolling .dice-thumb { opacity: 0.45; }

.dice-result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
  font-size: 0.76rem;
  color: #8c9bb3;
}
.dice-result-line b { color: #dbe6f8; font-variant-numeric: tabular-nums; }
.dice-need { font-variant-numeric: tabular-nums; }

/* =============================================== BLACKJACK ============ */

.table-blackjack {
  background: #04070c;
  padding: 14px;
  justify-content: flex-start;
  gap: 0;
}
.bj-felt {
  position: relative;
  width: 100%;
  flex: 1;
  justify-content: space-between;
  border-radius: 20px 20px 16px 16px;
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background:
    radial-gradient(120% 78% at 50% 0%, rgba(34, 96, 74, 0.95), rgba(13, 46, 35, 0.96) 52%, rgba(7, 26, 20, 0.98) 100%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.014) 0 2px, transparent 2px 4px);
  border: 7px solid #1a1207;
  box-shadow:
    inset 0 0 0 2px rgba(214, 173, 92, 0.18),
    inset 0 0 70px rgba(0, 0, 0, 0.55),
    0 26px 60px -34px #000;
  overflow: hidden;
}
.bj-felt::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 46%;
  height: 46%;
  border-radius: 50%;
  border-top: 1px solid rgba(220, 235, 255, 0.12);
  border-left: 1px solid rgba(220, 235, 255, 0.05);
  border-right: 1px solid rgba(220, 235, 255, 0.05);
  pointer-events: none;
}
.bj-felt::after {
  content: 'BLACKJACK PAYS 3 TO 2';
  position: absolute;
  right: 24px;
  top: 44%;
  font-size: 0.5rem;
  letter-spacing: 0.28em;
  color: rgba(214, 232, 255, 0.15);
  white-space: nowrap;
  pointer-events: none;
}

.bj-seat { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.bj-seat.dealer-seat { align-items: center; }
.bj-seat.player-seat { align-items: center; }
.bj-seat-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: rgba(4, 12, 9, 0.55);
  border: 1px solid rgba(214, 232, 255, 0.1);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #93b3a6;
}
.bj-seat-label b {
  font-size: 0.74rem;
  letter-spacing: 0;
  color: #eaf6f0;
  font-variant-numeric: tabular-nums;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, background 0.2s ease;
}
.bj-seat-label b.is-bust { color: #ffb0ba; background: rgba(255, 90, 110, 0.22); }
.bj-seat-label b.is-soft { color: #ffe4a3; }

.bj-cards {
  display: flex;
  gap: 9px;
  min-height: 138px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.bj-card {
  position: relative;
  width: 94px;
  height: 134px;
  border-radius: 9px;
  background: linear-gradient(158deg, #ffffff 0%, #f2f5fa 68%, #e2e8f2 100%);
  color: #14181f;
  box-shadow:
    0 16px 26px -18px rgba(0, 0, 0, 0.9),
    0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  padding: 7px 8px;
  font-weight: 800;
  overflow: hidden;
  animation: dd-deal 0.42s cubic-bezier(0.18, 0.9, 0.28, 1) both;
  animation-delay: calc(var(--i, 0) * 80ms);
  transform-origin: 90% -30%;
  will-change: transform;
}
.bj-card.red { color: #c0203a; }
.bj-card .corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
  font-size: 0.95rem;
}
.bj-card .corner i { font-style: normal; font-size: 0.78rem; }
.bj-card .corner.tl { left: 8px; top: 7px; }
.bj-card .corner.br { right: 8px; bottom: 7px; transform: rotate(180deg); }
.bj-card .pip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  opacity: 0.92;
}
.bj-card .pip span { filter: none; }
.bj-card.back {
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(58, 120, 255, 0.4), transparent 70%),
    repeating-linear-gradient(45deg, #16233c 0 5px, #0f1930 5px 10px);
  box-shadow: 0 16px 26px -18px rgba(0, 0, 0, 0.9), inset 0 0 0 2px rgba(190, 214, 255, 0.28);
  display: grid;
  place-items: center;
}
.bj-card.back::before {
  content: '';
  width: 56%;
  height: 62%;
  border-radius: 5px;
  border: 1px solid rgba(190, 214, 255, 0.34);
  background:
    repeating-linear-gradient(135deg, rgba(190, 214, 255, 0.16) 0 2px, transparent 2px 7px);
}
.bj-card.is-flip { animation: dd-flip-in 0.5s cubic-bezier(0.2, 0.8, 0.25, 1) both; }
@keyframes dd-deal {
  from { opacity: 0; transform: translate3d(140px, -150px, 0) rotate(14deg) scale(0.92); }
  to { opacity: 1; transform: none; }
}
@keyframes dd-flip-in {
  0% { transform: rotateY(-96deg) scale(0.96); opacity: 0.4; }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}

.bj-middle {
  position: relative;
  z-index: 3;
  flex: 1;
  min-height: 56px;
  display: grid;
  place-items: center;
}
.bj-banner {
  position: relative;
  transform: scale(0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 22px;
  border-radius: 14px;
  border: 1px solid rgba(214, 232, 255, 0.14);
  background: rgba(4, 10, 8, 0.82);
  box-shadow: 0 24px 50px -30px #000;
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 3;
}
.bj-banner.is-on { opacity: 1; transform: scale(1); }
.bj-banner b {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #eaf6f0;
}
.bj-banner small { font-size: 0.7rem; color: #9fb8ad; letter-spacing: 0.02em; }
.bj-banner.is-win { border-color: rgba(53, 211, 154, 0.5); background: rgba(8, 34, 27, 0.9); }
.bj-banner.is-win b { color: #8cf0c8; }
.bj-banner.is-loss { border-color: rgba(255, 90, 110, 0.42); background: rgba(34, 8, 13, 0.9); }
.bj-banner.is-loss b { color: #ffa4b0; }
.bj-banner.is-push { border-color: rgba(255, 207, 92, 0.42); background: rgba(34, 26, 6, 0.9); }
.bj-banner.is-push b { color: #ffdc8f; }

.bj-shoe {
  position: absolute;
  right: 16px;
  top: 18px;
  width: 54px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid rgba(214, 232, 255, 0.16);
  background: linear-gradient(180deg, rgba(20, 30, 46, 0.95), rgba(6, 12, 20, 0.95));
  box-shadow: 0 10px 22px -16px #000;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.bj-shoe::before {
  content: '';
  width: 70%;
  height: 42%;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #e8eef8 0 2px, #c7d2e4 2px 3px);
  opacity: 0.7;
  transform: translateY(-2px);
}
.bj-shoe::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: rgba(214, 232, 255, 0.2);
}

.bj-stake {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 207, 92, 0.18);
  background: rgba(4, 10, 8, 0.6);
  font-variant-numeric: tabular-nums;
  color: #ffdf9c;
  font-size: 0.74rem;
  font-weight: 700;
}
.bj-stake .chip-stack {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: repeating-linear-gradient(180deg, #f0c24a 0 3px, #c8922b 3px 5px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 2px 5px rgba(0, 0, 0, 0.5);
}
.table-blackjack .table-note {
  margin: 10px 4px 0;
  text-align: center;
  font-size: 0.76rem;
  color: #93a3b8;
}

.tower-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.table-coin .table-note { padding: 0 20px 18px; margin: 0; }

/* ------------------------------------------------------- responsive ---- */

@media (max-width: 1100px) {
  .table-mines, .table-towers, .table-coin, .table-dice, .table-blackjack { min-height: 0; }
  .mines-grid { max-width: 520px; }
  .tower-frame { max-width: 640px; margin: 0 auto; }
}

@media (max-width: 900px) {
  .mines-board { padding: 16px 14px 14px; gap: 14px; }
  .mines-grid { gap: 8px; }
  .mine-tile { border-radius: 12px; }
  .tower-frame { padding: 16px 12px; gap: 10px; }
  .tower-row { grid-template-columns: 32px minmax(0, 1fr); padding: 4px; }
  .floor-tiles { grid-template-columns: repeat(5, minmax(0, 64px)); gap: 8px; }
  .tower-tile { height: 50px; max-width: 64px; }
  .coin-stage { min-height: 340px; padding: 40px 16px 40px; }
  .coin3d { width: 150px; height: 150px; }
  .coin-emblem { width: 60px; height: 60px; }
  .coin-floor { bottom: 56px; width: 170px; }
  .bj-cards { min-height: 110px; gap: 6px; }
  .bj-card { width: 74px; height: 106px; }
  .bj-card .pip { font-size: 1.9rem; }
  .bj-card .corner { font-size: 0.78rem; }
  .bj-card .corner i { font-size: 0.64rem; }
  .bj-felt { padding: 18px 16px 16px; }
  .dice-values { }
  .dice-stage { padding: 18px 14px 16px; }
  .board-top { gap: 8px; }
}

@media (max-width: 640px) {
  .mines-grid { gap: 6px; }
  .mine-tile { border-radius: 10px; }
  .tower-tile { height: 46px; max-width: 58px; border-radius: 8px; }
  .floor-tiles { grid-template-columns: repeat(5, minmax(0, 58px)); gap: 6px; }
  .floor-tag { display: none; }
  .tower-row { grid-template-columns: minmax(0, 1fr); }
  .tower { max-width: 100%; }
  .coin-stage { min-height: 300px; padding: 32px 12px 36px; }
  .coin3d { width: 126px; height: 126px; }
  .coin-emblem { width: 50px; height: 50px; }
  .coin-word { font-size: 0.58rem; }
  .bj-card { width: 64px; height: 92px; border-radius: 7px; padding: 5px 6px; }
  .bj-cards { min-height: 96px; padding-left: 0; }
  .bj-card .corner { left: 5px; top: 4px; }
  .bj-card .corner.br { right: 5px; bottom: 4px; left: auto; top: auto; }
  .bj-card .pip { font-size: 1.5rem; }
  .bj-felt::after { letter-spacing: 0.2em; font-size: 0.5rem; }
  .bj-shoe { display: none; }
  .bj-stake { right: 10px; bottom: 8px; font-size: 0.68rem; }
  .board-foot .table-note { font-size: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mine-tile .gem,
  .mine-tile .mine,
  .mine-tile .burst,
  .tower-tile.is-bomb,
  .bj-card,
  .bj-card.is-flip,
  .coin-stage.is-landed .coin-toss {
    animation: none !important;
  }
  .mine-tile.is-gem .gem { opacity: 1; }
  .mine-tile.is-mine .mine { opacity: 0.62; }
  .mine-tile.is-hit .mine { opacity: 1; }
  .tower-tile.is-gem .gem { opacity: 1; }
  .tower-tile.is-bomb .bomb { opacity: 1; }
  .mine-tile,
  .tower-tile,
  .dice-thumb,
  .tower-rail i,
  .tower-climber { transition: none !important; }
}

/* A reel cell must never read as an empty slot, even before its icon paints. */
.lane-reel-cell { background-color: rgba(120, 168, 255, 0.06); }
