/* Casino game screens (games.js). Every selector is scoped with g-/cg- prefixes. */

/* ---------------------------------- shell --------------------------------- */

.g-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.g-head {
  align-items: center;
  margin: 2px 0 2px;
  gap: 12px;
}
.g-headtext {
  min-width: 0;
}
.g-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 4vw, 26px);
  line-height: 1.15;
  flex-wrap: wrap;
}
.g-ico {
  font-size: 1.1em;
  line-height: 1;
}
.g-headbadge {
  margin-left: 2px;
}
.g-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
}
.g-headspacer {
  flex: 1 1 20px;
}
.g-fairbtn {
  min-height: 42px;
}
.g-back {
  min-height: 40px;
}

.g-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.g-main {
  min-width: 0;
}
.g-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 980px) {
  .g-layout {
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 18px;
  }
  .g-side {
    position: sticky;
    top: 122px;
  }
}

.g-panelfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 4px;
}
.g-linkbtn {
  background: none;
  border: 0;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
}
.g-linkbtn:hover {
  text-decoration: underline;
}

/* ---------------------------------- stage --------------------------------- */

.g-stage {
  position: relative;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  overflow: hidden;
}
.g-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.g-stage-head h3 {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  font-size: 13.5px;
  transition: border-color 0.2s, background 0.2s;
}
.g-banner b {
  font-size: 14px;
}
.g-banner.win {
  border-color: rgba(32, 193, 90, 0.45);
  background: linear-gradient(160deg, rgba(32, 193, 90, 0.16), rgba(32, 193, 90, 0.04));
}
.g-banner.lose {
  border-color: rgba(225, 29, 46, 0.45);
  background: linear-gradient(160deg, rgba(225, 29, 46, 0.15), rgba(225, 29, 46, 0.03));
}
.g-banner.push {
  border-color: rgba(245, 185, 66, 0.42);
  background: linear-gradient(160deg, rgba(245, 185, 66, 0.14), rgba(245, 185, 66, 0.03));
}

.g-strip-wrap {
  margin-top: 14px;
}
.g-strip-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 6px;
}
.g-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  min-height: 30px;
  align-items: center;
}
.g-pill {
  flex: none;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 700;
}
.g-pill.win {
  color: var(--green);
  border-color: rgba(32, 193, 90, 0.4);
  background: rgba(32, 193, 90, 0.09);
}
.g-pill.lose {
  color: var(--red-2);
  border-color: rgba(225, 29, 46, 0.4);
  background: rgba(225, 29, 46, 0.08);
}

.g-statlist {
  display: grid;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.g-statrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.g-statrow:last-child {
  border-bottom: 0;
}
.g-statrow span {
  color: var(--muted);
}
.g-statrow b {
  font-size: 14.5px;
}

/* -------------------------------- bet panel ------------------------------- */

.g-panel {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.g-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.g-balbox {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.g-ballabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.g-bal {
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.g-bonus {
  font-size: 11px;
  color: var(--gold);
  background: rgba(245, 185, 66, 0.12);
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 700;
}
.g-iconbtn {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: 0.15s;
}
.g-iconbtn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.g-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.g-stake {
  font-size: 16px;
  font-weight: 700;
  min-height: 46px;
  font-variant-numeric: tabular-nums;
}
.g-quickrow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.g-quick {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.13s;
  padding: 0 4px;
}
.g-quick:hover:not(:disabled) {
  color: #fff;
  border-color: var(--gold);
}
.g-quick:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.g-limits {
  letter-spacing: 0.01em;
}
.g-err {
  font-size: 12.5px;
  color: var(--red-2);
}
.g-err:empty {
  display: none;
}
.g-primary {
  min-height: 48px;
  font-size: 15px;
}
.g-note {
  line-height: 1.4;
  margin-top: 2px;
}
.g-auto {
  font-size: 15px;
  min-height: 44px;
  max-width: 160px;
}

/* --------------------------------- helpers -------------------------------- */

.g-skel {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: g-shimmer 1.4s infinite;
}
.g-skel.bright {
  opacity: 0.8;
}

.g-linkbtn,
.g-iconbtn,
.g-quick {
  -webkit-tap-highlight-color: transparent;
}

.g-gate {
  max-width: 520px;
  margin: 6vh auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 30px 22px;
}
.g-gate-icon {
  font-size: 40px;
  line-height: 1;
}
.g-gate-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}
.g-gate-note {
  margin-top: 4px;
}
.g-notfound {
  padding: 56px 16px;
}

/* ---------------------------------- dice ---------------------------------- */

.g-dice-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 6px 0 4px;
}
.g-dice-value {
  font-size: clamp(46px, 11vw, 68px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  text-shadow: 0 6px 30px rgba(245, 185, 66, 0.25);
}
.g-dice-label {
  font-size: 12.5px;
  color: var(--muted);
}
.g-dice-banner {
  margin-top: 10px;
}
.g-dice-track {
  position: relative;
  height: 42px;
  margin: 26px 4px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45);
}
.g-dice-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(32, 193, 90, 0.42), rgba(32, 193, 90, 0.18));
  transition: left 0.14s ease, width 0.14s ease;
}
.g-dice-zone.over {
  background: linear-gradient(90deg, rgba(32, 193, 90, 0.18), rgba(32, 193, 90, 0.42));
}
.g-dice-targetline {
  position: absolute;
  top: -7px;
  bottom: -7px;
  width: 2px;
  margin-left: -1px;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(245, 185, 66, 0.6);
  transition: left 0.12s ease;
}
.g-dice-targetlabel {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 0 5px;
  line-height: 1.6;
  white-space: nowrap;
}
.g-dice-marker {
  position: absolute;
  top: -9px;
  bottom: -9px;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--red-2);
  box-shadow: 0 0 14px rgba(255, 51, 71, 0.85);
  transition: left 0.1s linear;
}
.g-dice-marker.idle {
  opacity: 0;
}
.g-dice-marker.rolling {
  background: var(--gold-2);
  box-shadow: 0 0 16px rgba(245, 185, 66, 0.9);
}
.g-dice-axis {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 11px;
}
.g-dice-controls {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.g-dice-targetval {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 700;
}
.g-segrow {
  display: flex;
}
.g-segrow .seg {
  flex: 1;
  display: flex;
}
.g-segrow .seg button {
  flex: 1;
  min-height: 40px;
  font-size: 13px;
}
.g-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.g-prev {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.g-prev span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}
.g-prev b {
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------- crash --------------------------------- */

.g-crash-readout {
  text-align: center;
  margin: 4px 0 8px;
}
.g-crash-mult {
  font-size: clamp(40px, 10vw, 68px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  transition: color 0.2s;
}
.g-crash-mult.live {
  color: var(--gold);
  text-shadow: 0 6px 26px rgba(245, 185, 66, 0.3);
}
.g-crash-mult.win {
  color: var(--green);
  text-shadow: 0 6px 26px rgba(32, 193, 90, 0.28);
}
.g-crash-mult.busted {
  color: var(--red-2);
  text-shadow: 0 6px 26px rgba(225, 29, 46, 0.32);
}
.g-crash-sub {
  font-size: 12.5px;
  margin-top: 4px;
}
.g-crash-canvaswrap {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: radial-gradient(500px 220px at 20% 0%, rgba(32, 193, 90, 0.08), transparent 65%), #0b0f16;
  overflow: hidden;
}
.g-crash-canvas {
  display: block;
  width: 100%;
  height: 210px;
}
.g-crash-banner {
  margin-top: 12px;
}
@media (min-width: 980px) {
  .g-crash-canvas {
    height: 250px;
  }
}

/* ---------------------------------- mines --------------------------------- */

.g-mines-banner {
  margin-bottom: 12px;
}
.g-mines-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.g-mines-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.g-tile {
  position: relative;
  aspect-ratio: 1;
  min-height: 44px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s, border-color 0.12s, background 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.g-tile:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--gold);
}
.g-tile:disabled {
  cursor: default;
}
.g-tile-face {
  line-height: 1;
  font-size: clamp(18px, 4.4vw, 26px);
}
.g-tile.idle {
  opacity: 0.92;
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
}
.g-tile.safe {
  border-color: rgba(32, 193, 90, 0.55);
  background: linear-gradient(160deg, rgba(32, 193, 90, 0.2), rgba(32, 193, 90, 0.04));
  animation: g-pop 0.22s ease;
}
.g-tile.mine {
  border-color: rgba(225, 29, 46, 0.5);
  background: linear-gradient(160deg, rgba(225, 29, 46, 0.16), rgba(225, 29, 46, 0.03));
}
.g-tile.boom {
  border-color: var(--red-2);
  background: linear-gradient(160deg, rgba(225, 29, 46, 0.42), rgba(225, 29, 46, 0.1));
  animation: g-shake 0.4s ease;
}
.g-tile.dim {
  opacity: 0.42;
}
.g-mines-side {
  display: grid;
  gap: 12px;
  align-content: start;
}
.g-mines-control {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  display: grid;
  gap: 4px;
}
.g-chiprow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.g-chipbtn {
  min-height: 40px;
  min-width: 46px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: 0.13s;
}
.g-chipbtn:hover:not(:disabled) {
  border-color: var(--gold);
  color: #fff;
}
.g-chipbtn.active {
  background: linear-gradient(160deg, var(--gold-2), #d99a1e);
  border-color: var(--gold);
  color: #201603;
}
.g-chipbtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.g-mines-mult {
  color: var(--gold);
}
.g-mines-hint {
  line-height: 1.45;
}
@media (min-width: 760px) {
  .g-mines-body {
    grid-template-columns: minmax(0, 1.25fr) minmax(230px, 0.85fr);
    gap: 18px;
  }
}

/* --------------------------------- slider --------------------------------- */

.g-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 40px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
.g-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line-2);
}
.g-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-2), #d99a1e);
  border: 2px solid #201603;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.g-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
}
.g-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-2), #d99a1e);
  border: 2px solid #201603;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.g-slider:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------------------------------- slots --------------------------------- */

.g-reels-wrap {
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: radial-gradient(420px 200px at 50% 0%, rgba(245, 185, 66, 0.09), transparent 70%), #0b0f16;
}
.g-reels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.g-reel {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}
.g-slot-cell {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--bg-2));
  font-size: clamp(18px, 4.6vw, 30px);
  overflow: hidden;
  transition: border-color 0.18s, background 0.18s;
}
.g-sym {
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}
.g-reel.spinning .g-slot-cell {
  filter: blur(1.4px);
  animation: g-blur 0.32s linear infinite;
}
.g-reel.stopped .g-slot-cell {
  animation: g-pop 0.28s ease;
}
.g-slot-cell.hit {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(245, 185, 66, 0.2), var(--bg-2));
  box-shadow: inset 0 0 0 1px rgba(245, 185, 66, 0.6), 0 0 16px rgba(245, 185, 66, 0.22);
}
.g-hitline {
  position: absolute;
  top: 2px;
  right: 3px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--gold);
  color: #201603;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.5;
}
.g-slot-lines {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.g-slot-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  font-size: 13px;
}
.g-line-no {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.g-line-sym {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-paytable table {
  font-size: 13px;
}
.g-pay-sym {
  font-size: 17px;
  vertical-align: middle;
  margin-right: 4px;
}
.g-paytable p {
  margin: 12px 0 0;
}

/* -------------------------------- roulette -------------------------------- */

.g-rl-top {
  min-height: 88px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}
.g-rl-result {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}
.g-rl-wnum {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  animation: g-pop 0.3s ease;
}
.g-rl-wnum.red {
  background: linear-gradient(160deg, #e11d2e, #8e0f1c);
}
.g-rl-wnum.black {
  background: linear-gradient(160deg, #262f3f, #10151d);
}
.g-rl-wnum.green {
  background: linear-gradient(160deg, #1aa757, #0d6b34);
}
.g-rl-wlabel {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.g-rl-wbets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.g-rl-wbet {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  font-size: 12px;
}
.g-rl-wbet.win {
  color: var(--green);
  border-color: rgba(32, 193, 90, 0.4);
}
.g-rl-wbet.lose {
  color: var(--muted);
}
.g-rl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.g-rl-boardwrap {
  overflow-x: auto;
  padding-bottom: 4px;
}
.g-rl-board {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px;
  min-width: 270px;
}
.g-rl-zero {
  display: flex;
  flex-direction: column;
}
.g-rl-zero .g-rl-num {
  flex: 1;
  width: 100%;
  min-height: 100%;
  border-radius: 10px;
  font-size: 17px;
}
.g-rl-nums {
  display: grid;
  gap: 6px;
}
.g-rl-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.g-rl-num {
  position: relative;
  min-height: 40px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.g-rl-num.red {
  background: linear-gradient(160deg, #d21f31, #8e0f1c);
}
.g-rl-num.black {
  background: linear-gradient(160deg, #232b3a, #121821);
}
.g-rl-num.green {
  background: linear-gradient(160deg, #1aa757, #0d6b34);
}
.g-rl-num:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.5);
}
.g-rl-num.hot {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  box-shadow: 0 0 18px rgba(245, 185, 66, 0.55);
  z-index: 2;
}
.g-rl-num.win {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 7px rgba(245, 185, 66, 0.25), 0 0 24px rgba(255, 255, 255, 0.4);
  z-index: 3;
  animation: g-pulse-ring 0.9s ease;
}
.g-rl-num.hasbet {
  box-shadow: inset 0 0 0 2px rgba(245, 185, 66, 0.65);
}
.g-rl-n {
  line-height: 1;
}
.g-rl-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid #201603;
  background: var(--gold);
  color: #201603;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.6;
  white-space: nowrap;
  z-index: 4;
}
.g-rl-side {
  display: grid;
  gap: 10px;
  align-content: start;
}
.g-rl-sectitle {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 10.5px;
  margin-top: 2px;
}
.g-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.g-chip {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.28);
  background: radial-gradient(circle at 35% 30%, var(--gold-2), #b7791f);
  color: #201603;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.13s, box-shadow 0.13s;
}
.g-chip:hover {
  transform: scale(1.05);
}
.g-chip.active {
  border-style: solid;
  border-color: #fff;
  transform: scale(1.06);
  box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.35), 0 6px 18px rgba(0, 0, 0, 0.5);
}
.g-rl-outside {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.g-rl-out {
  position: relative;
  min-height: 44px;
  padding: 5px 8px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 1px;
  transition: 0.13s;
}
.g-rl-out:hover {
  border-color: var(--gold);
}
.g-rl-out.red {
  border-color: rgba(225, 29, 46, 0.5);
}
.g-rl-out.black {
  border-color: rgba(255, 255, 255, 0.16);
}
.g-rl-out.hasbet {
  box-shadow: inset 0 0 0 1px var(--gold);
}
.g-rl-odds {
  font-size: 10px;
  font-weight: 600;
}
.g-rl-bets {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
}
.g-rl-betrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 12.5px;
}
.g-rl-betlabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-x {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
  font-size: 13px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.g-x:hover {
  background: var(--red-dim);
  color: var(--red-2);
}
.g-rl-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 2px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.g-rl-total b {
  color: var(--gold);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 760px) {
  .g-rl-layout {
    grid-template-columns: minmax(0, 1.18fr) minmax(250px, 0.82fr);
    gap: 16px;
  }
}

/* ---------------------------------- cards --------------------------------- */

.g-hand {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  min-height: 108px;
}
.g-hand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.g-hand-total {
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.g-hand-cards {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 82px;
}
.g-card {
  position: relative;
  flex: none;
  width: 58px;
  height: 82px;
  border-radius: 8px;
  background: linear-gradient(160deg, #fbfcff, #e6e9f2);
  color: #10151d;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  animation: g-deal 0.32s ease both;
}
.g-card.red {
  color: #d21f31;
}
.g-card.black {
  color: #10151d;
}
.g-card-rank {
  position: absolute;
  top: 5px;
  left: 6px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.g-card-suit {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 18px;
  line-height: 1;
}
.g-card-rank-b {
  top: auto;
  bottom: 5px;
  left: auto;
  right: 6px;
  transform: rotate(180deg);
  font-size: 13px;
  opacity: 0.85;
}
.g-card.back {
  background: linear-gradient(145deg, #1e2a44, #0e1522);
  border-color: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
}
.g-card-back {
  color: rgba(255, 255, 255, 0.3);
  font-size: 24px;
  line-height: 1;
}

.g-bj-table,
.g-bac-table {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}
.g-bj-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.g-action {
  min-height: 48px;
  font-size: 15px;
}
.g-bj-banner,
.g-bac-banner {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.g-bac-vs {
  text-align: center;
  letter-spacing: 0.32em;
  font-weight: 800;
  font-size: 11px;
  color: var(--muted-2);
}
.g-bac-bets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.g-betopt {
  display: grid;
  gap: 2px;
  place-items: center;
  min-height: 66px;
  padding: 9px 8px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.13s;
}
.g-betopt:hover:not(:disabled) {
  border-color: var(--gold);
}
.g-betopt.active {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(245, 185, 66, 0.18), var(--panel-2));
  box-shadow: inset 0 0 0 1px rgba(245, 185, 66, 0.45);
}
.g-betopt:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.g-betopt-odds {
  font-size: 13px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.g-betopt-note {
  font-size: 10.5px;
}
.g-bac-outcome {
  font-size: 12.5px;
  color: var(--muted);
}
@media (min-width: 720px) {
  .g-bac-table {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }
}

/* --------------------------------- history -------------------------------- */

.g-history {
  margin-top: 16px;
  padding: 16px;
}
.g-history-host {
  min-width: 0;
}
.g-history-empty {
  padding: 26px 12px;
}
.g-hsum {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.g-htable td.nowrap {
  white-space: nowrap;
}
table.g-htable th,
table.g-htable td {
  padding: 9px 8px;
}
table.g-htable td .tiny {
  margin-top: 2px;
}
@media (max-width: 680px) {
  .g-hsum {
    display: none;
  }
  table.g-htable th,
  table.g-htable td {
    padding: 8px 6px;
    font-size: 12px;
  }
  .g-history {
    padding: 12px;
  }
}

/* -------------------------------- fairness -------------------------------- */

.g-fairbox {
  min-height: 120px;
}
.g-fair {
  gap: 12px;
}
.g-fair-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.g-fair-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.g-fair-hash {
  font-size: 12px;
  word-break: break-all;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--gold);
  line-height: 1.5;
}
.g-fair-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.g-fair-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.g-fair-row .g-fair-input {
  flex: 1 1 220px;
  min-width: 0;
}
.g-fair-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
}
.g-fair-item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
}
.g-fair-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.g-fair-verify {
  display: grid;
  gap: 8px;
}
.g-fair-vrow {
  display: flex;
  gap: 8px;
}
.g-fair-vfield {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.g-fair-out {
  font-size: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  word-break: break-word;
  line-height: 1.5;
}
.g-fair-rounds {
  display: grid;
  gap: 6px;
}
.g-fair-round {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  font-size: 12px;
}
@media (max-width: 520px) {
  .g-fair-round {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .g-fair-round .tiny.muted:last-of-type {
    display: none;
  }
}

/* ------------------------------- animations ------------------------------- */

@keyframes g-shimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes g-pop {
  0% {
    transform: scale(0.94);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes g-deal {
  from {
    opacity: 0;
    transform: translateY(-16px) rotate(-7deg) scale(0.88);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes g-blur {
  0%,
  100% {
    transform: translateY(-7%);
    opacity: 0.55;
  }
  50% {
    transform: translateY(7%);
    opacity: 1;
  }
}
@keyframes g-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  45% {
    transform: translateX(4px);
  }
  70% {
    transform: translateX(-2px);
  }
}
@keyframes g-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55), 0 0 0 7px rgba(245, 185, 66, 0.25);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0), 0 0 0 7px rgba(245, 185, 66, 0.25);
  }
}

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

@media (max-width: 480px) {
  .g-stage {
    padding: 13px;
  }
  .g-panel {
    padding: 13px;
  }
  .g-head {
    gap: 8px;
  }
  .g-back {
    order: -1;
  }
  .g-fairbtn {
    width: 100%;
    justify-content: center;
  }
  .g-headspacer {
    display: none;
  }
  .g-card {
    width: 50px;
    height: 71px;
  }
  .g-hand-cards {
    gap: 6px;
    min-height: 72px;
  }
  .g-card-rank {
    font-size: 13px;
  }
  .g-card-suit {
    font-size: 15px;
  }
  .g-card-rank-b {
    font-size: 11px;
  }
  .g-reels {
    gap: 4px;
  }
  .g-reel {
    gap: 4px;
    padding: 4px;
  }
  .g-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .g-prev {
    padding: 7px 8px;
  }
  .g-prev b {
    font-size: 13px;
  }
  .g-dice-track {
    margin-left: 0;
    margin-right: 0;
  }
  .g-chip {
    width: 46px;
    height: 46px;
    font-size: 11px;
  }
  .g-bac-vs {
    display: none;
  }
  .g-fair-vrow {
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .g-quickrow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .g-rl-num {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .g-stage *,
  .g-panel *,
  .g-history * {
    animation: none !important;
    transition: none !important;
  }
}

/* ===================== live tables & Indian classics ===================== */

.g-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.g-opt-grid .g-betopt {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #1a2130, #141a24);
  border: 1px solid var(--line-2);
  color: var(--text);
  cursor: pointer;
  transition: 0.14s;
  text-align: left;
}
.g-opt-grid .g-betopt:hover:not(:disabled) {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.g-opt-grid .g-betopt.active {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold), 0 6px 18px rgba(245, 185, 66, 0.18);
  background: linear-gradient(180deg, rgba(245, 185, 66, 0.16), rgba(245, 185, 66, 0.04));
}
.g-opt-grid .g-betopt:disabled { opacity: 0.5; cursor: not-allowed; }
.g-betopt-label { font-weight: 700; font-size: 13px; }
.g-betopt-odds { color: var(--gold); font-size: 12px; font-weight: 700; }

.g-dice-wrap {
  display: grid;
  place-items: center;
  padding: 18px 10px;
  margin: 10px 0;
  border-radius: 14px;
  background: radial-gradient(420px 160px at 50% 40%, rgba(32, 193, 90, 0.1), transparent 70%), #0d1310;
  border: 1px solid #1e3a2c;
}
.g-dice-row { display: flex; gap: 14px; justify-content: center; }
.g-die {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  color: #10151d;
  background: linear-gradient(160deg, #ffffff, #cfd8e6);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  font-variant-numeric: tabular-nums;
  animation: g-die-in 0.22s ease-out;
}
.g-die.back {
  color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(160deg, #232c3d, #161c27);
  border: 1px dashed #38455c;
}
@keyframes g-die-in {
  from { transform: rotate(-8deg) scale(0.82); opacity: 0.2; }
  to { transform: none; opacity: 1; }
}
.g-sum {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.g-subhead { margin: 14px 0 2px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ken show */
.g-keno-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
}
.g-keno-cell {
  aspect-ratio: 1;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.12s;
}
.g-keno-cell:hover { border-color: var(--gold); color: #fff; }
.g-keno-cell.picked { background: rgba(245, 185, 66, 0.16); border-color: var(--gold); color: var(--gold); }
.g-keno-cell.drawn { border-color: #3b82f6; color: #cfe0ff; }
.g-keno-cell.hit {
  background: linear-gradient(160deg, #f5b942, #d99a1e);
  color: #1a1203;
  border-color: #ffd479;
  box-shadow: 0 0 0 2px rgba(245, 185, 66, 0.25);
}

/* fish hunter */
.g-fish-pond {
  border-radius: 16px;
  padding: 14px;
  background:
    radial-gradient(500px 220px at 20% 0%, rgba(59, 130, 246, 0.16), transparent 70%),
    radial-gradient(520px 260px at 90% 100%, rgba(16, 185, 129, 0.12), transparent 70%),
    #0a1622;
  border: 1px solid #1b3a52;
}
.g-fish-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 9px; margin: 12px 0; }
.g-fish-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid #23476a;
  background: linear-gradient(180deg, rgba(20, 45, 70, 0.9), rgba(10, 22, 34, 0.9));
  color: var(--text);
  cursor: pointer;
  transition: 0.14s;
}
.g-fish-tile:hover { border-color: #67a8ff; transform: translateY(-2px); }
.g-fish-tile.active { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.g-fish-tile.shooting { animation: g-shake 0.16s linear 2; }
.g-fish-tile.caught { animation: g-catch 0.5s ease-out; border-color: var(--green); }
.g-fish-icon { font-size: 34px; line-height: 1; }
@keyframes g-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes g-catch { 0% { box-shadow: 0 0 0 0 rgba(32, 193, 90, 0.6); } 100% { box-shadow: 0 0 0 18px rgba(32, 193, 90, 0); } }

/* teen patti */
.g-tp-table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.g-tp-hand {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #12251c, #0b1310);
  padding: 10px;
  min-height: 150px;
}
.g-tp-hand.mine { border-color: rgba(245, 185, 66, 0.55); }
.g-tp-hand.winner { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 10px 26px rgba(32, 193, 90, 0.15); }
.g-tp-hand .g-hand-cards { flex-wrap: wrap; gap: 4px; }
.g-tp-rank { margin-top: 6px; }

/* andar bahar */
.g-ab-joker { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: #101720; border: 1px solid var(--line); margin: 10px 0; }
.g-ab-rows { display: grid; gap: 10px; }
.g-ab-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: #0d1310; border: 1px solid #1e3a2c; }
.g-ab-row .g-hand-cards { flex-wrap: wrap; gap: 4px; }

@media (max-width: 640px) {
  .g-keno-grid { gap: 3px; }
  .g-keno-cell { font-size: 10px; border-radius: 5px; }
  .g-tp-table { grid-template-columns: 1fr; }
  .g-die { width: 52px; height: 52px; font-size: 22px; }
}
