/* ═══════════════════════════════════════════
   Digital Moroccan casino — Game Components
   ═══════════════════════════════════════════ */
/* ── Stage ── */
.stage {
  background: linear-gradient(145deg, #0a0e1a, #151b2e);
  border: 2px solid var(--bd);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
/* خلفية اللعبة (أصول) — شفافة وخفيفة، تحافظ على وضوح الواجهة والرقائق */
.gstage-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  pointer-events: none;
}
html[data-theme="radiant"] .gstage-bg { opacity: 0.16; }
/* [Logo] علامة مائية باللوغو الرسمي بمنتصف طاولة كل لعبة (فوق خلفية الفن، خلف الواجهة) */
.glogo-wm {
  position: absolute;
  inset: 0;
  background: url('../assets/logo/logo-transparent.png') center / min(46%, 300px) auto no-repeat;
  opacity: 0.13;
  pointer-events: none;
}
html[data-theme="radiant"] .glogo-wm { opacity: 0.1; }
.gtop { display: none !important; }
.pf {
  display: inline-flex;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 0.64rem;
  color: var(--green2);
  font-weight: 600;
}
/* ── Rules Box ── */
.rulesBox {
  display: none;
  background: rgba(26, 108, 246, 0.08);
  border: 1px solid rgba(26, 108, 246, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 0.76rem;
  color: var(--t2);
}
.rulesBox.open {
  display: block;
  animation: pgIn 0.3s var(--ease);
}
.rline {
  padding: 3px 0;
}
.rline b {
  color: var(--blue2);
}
/* ── Betting Controls ── */
.bets {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.bbtn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: none;
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}
.bbtn:hover:not(:disabled) {
  background: rgba(245, 197, 24, 0.12);
  box-shadow: 0 0 12px rgba(245, 197, 24, 0.55);
}
.bbtn:active:not(:disabled) {
  transform: scale(0.86);
}
.bamt {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--bd);
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 800;
  color: var(--gold);
}
/* نبض عدّاد الرهان عند التغيير (يُضاف من JS أو عبر ضغط زر مجاور) */
.bamt.pulse,
.bets .bbtn:active + .bamt,
.bamt:has(~ .bbtn:active) {
  animation: bamtPulse 0.35s var(--ease);
}
@keyframes bamtPulse {
  50% { transform: scale(1.14); }
}
.big {
  padding: 11px 26px;
  background: var(--gg);
  color: #0A0E1A;
  border: none;
  border-radius: 11px;
  font-weight: 900;
  font-size: 0.92rem;
  transition: all 0.15s var(--ease);
  min-height: 44px;
}
.big:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 22px rgba(245, 197, 24, 0.45);
}
.big:active {
  transform: scale(0.96);
}
.big:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* ── Results ── */
.res {
  min-height: 30px;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  margin-top: 11px;
}
.res.win {
  color: var(--green2);
  animation: winPulse 0.5s var(--ease);
  text-shadow: 0 0 16px rgba(16, 185, 129, 0.65);
}
.res.lose {
  color: var(--red2);
}
@keyframes winPulse {
  50% { transform: scale(1.08); }
}
/* ── Crash ── */
.cmult {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--gold);
  text-align: center;
  margin: 8px 0;
  text-shadow: 0 0 20px rgba(245, 197, 24, 0.5);
}
.chist {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}
.chist span {
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 800;
}
/* ── Crash 3D Stage + Live Chart ── */
.crash-3d-container {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(245, 197, 24, 0.10), transparent 60%),
    linear-gradient(180deg, #0a0e1a, #0f1524);
  border: 1px solid rgba(245, 197, 24, 0.22);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(245, 197, 24, 0.08);
}
#cChart {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 46%;
  pointer-events: none;
  z-index: 5;
}
.cmult-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px 0;
}
.cmult {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--gold);
  text-align: center;
  text-shadow: 0 0 20px rgba(245, 197, 24, 0.5);
  transition: color 0.25s ease;
}
.cwin {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--green2);
  text-shadow: 0 0 14px rgba(16, 185, 129, 0.5);
  white-space: nowrap;
}
canvas.game {
  width: 100%;
  border-radius: 12px;
  display: block;
}
/* ── Slots Reels ── */
.sl-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 12px 6px;
}
.sl-pay {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 420px;
}
.sl-pay-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 7px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(245, 197, 24, 0.1), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(245, 197, 24, 0.25);
  transition: border-color 0.2s;
}
.sl-pay-item:hover {
  border-color: rgba(245, 197, 24, 0.6);
}
.sl-pay-item b {
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}
.sl-pay-item i {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.02em;
}
.reels {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 8px 0 4px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(10, 14, 26, 0.5));
  border: 1px solid rgba(245, 197, 24, 0.3);
  border-radius: 18px;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.45), 0 8px 22px rgba(0, 0, 0, 0.3);
  position: relative;
}
.reels::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(245, 197, 24, 0.75), transparent);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(245, 197, 24, 0.5);
  pointer-events: none;
}
.reel {
  width: 88px;
  height: 108px;
  background: linear-gradient(180deg, #141a30, #1e2547);
  border: 3px solid rgba(245, 197, 24, 0.85);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.reel.spin {
  animation: reelSpin 0.09s linear infinite;
  filter: blur(1.5px);
}
@keyframes reelSpin {
  50% { transform: translateY(4px); }
}
.reel.win {
  border-color: #34d399;
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.65), inset 0 4px 16px rgba(0, 0, 0, 0.55);
  animation: winPulse 0.5s var(--ease);
}
.sl-status {
  min-height: 36px;
  margin: 2px auto;
  text-align: center;
  white-space: pre-line;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--txt1);
}
.sl-status.win {
  color: #ffd700;
  text-shadow: 0 0 12px rgba(245, 197, 24, 0.45);
}
.sl-status.pair {
  color: #60a5fa;
}
.sl-status.lose {
  color: #f87171;
}
/* ── Andar Bahar ── */
.ab-hint {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.82rem;
  text-align: center;
}
.ab-joker-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 14px 12px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(245, 197, 24, 0.1), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(245, 197, 24, 0.4);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.3);
}
.ab-joker-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--txt2);
  letter-spacing: 0.04em;
}
.ab-joker {
  width: 72px;
  height: 100px;
  display: block;
  padding: 0;
  background: transparent;
  border: 2px solid rgba(245, 197, 24, 0.9);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 24px rgba(245, 197, 24, 0.25);
  overflow: hidden;
  transition: transform 0.3s var(--ease);
}
.ab-joker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 9px;
}
.ab-joker.deal {
  animation: abJokerPop 0.4s var(--ease);
}
@keyframes abJokerPop {
  0%   { transform: scale(0.6) rotate(-6deg); opacity: 0; }
  60%  { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.ab-sides {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.ab-side {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.3s;
}
.ab-side-andar {
  background: linear-gradient(180deg, rgba(26, 108, 246, 0.14), rgba(10, 20, 50, 0.35));
  border: 1.5px solid rgba(26, 108, 246, 0.45);
}
.ab-side-bahar {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.14), rgba(50, 10, 20, 0.35));
  border: 1.5px solid rgba(239, 68, 68, 0.45);
}
.ab-side-name {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.ab-side-andar .ab-side-name { color: #60a5fa; }
.ab-side-bahar .ab-side-name { color: #f87171; }
.ab-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  min-height: 50px;
  align-content: flex-start;
}
.ab-card {
  display: inline-block;
  width: 30px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: abCardIn 0.25s var(--ease);
}
.ab-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ab-card.match {
  background: transparent;
  border: 2px solid #ffd700;
  transform: scale(1.18);
  box-shadow: 0 0 18px rgba(245, 197, 24, 0.8);
  animation: abMatchPulse 0.5s var(--ease);
}
@keyframes abCardIn {
  0%   { transform: translateY(-10px) scale(0.8); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes abMatchPulse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.3); }
  100% { transform: scale(1.18); }
}
.ab-cnt {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--txt2);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 2px 10px;
  display: inline-block;
  margin: 0 auto;
  min-width: 34px;
}
.ab-status {
  min-height: 36px;
  margin: 10px auto 2px;
  text-align: center;
  white-space: pre-line;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--txt1);
}
.ab-status.win {
  color: #ffd700;
  text-shadow: 0 0 12px rgba(245, 197, 24, 0.45);
}
.ab-status.lose {
  color: #f87171;
}
.abBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 2px solid rgba(245, 197, 24, 0.55);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), opacity 0.2s;
}
.abBtn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 197, 24, 0.3);
}
.abBtn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}
.abBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.abBtn.ab-andar {
  border-color: rgba(96, 165, 250, 0.7);
}
.abBtn.ab-andar:hover:not(:disabled) {
  border-color: #60a5fa;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(96, 165, 250, 0.4);
}
.abBtn.ab-bahar {
  border-color: rgba(244, 63, 94, 0.7);
}
.abBtn.ab-bahar:hover:not(:disabled) {
  border-color: #f43f5e;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(244, 63, 94, 0.4);
}
.ab-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--txt1);
}
.ab-mult {
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffd700;
}
/* ── Crabbin (سلطعون) ── */
.cr-hint,
.fh-hint,
.gt-hint,
.lg-hint,
.lt-hint,
.mj-hint,
.mo-hint,
.ol-hint,
.pk-hint,
.ro-hint,
.sw-hint {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.82rem;
  text-align: center;
}
.cr-status {
  min-height: 36px;
  margin: 10px auto 2px;
  text-align: center;
  white-space: pre-line;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--txt1);
}
.cr-status.win {
  color: #ffd700;
  text-shadow: 0 0 12px rgba(245, 197, 24, 0.45);
}
.cr-status.lose {
  color: #f87171;
}
.crBtn {
  padding: 11px 28px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
  font-size: 0.95rem;
  color: #0A0E1A;
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border: none;
  box-shadow: 0 5px 16px rgba(245, 197, 24, 0.35);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
}
.crBtn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.55);
}
.crBtn:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
}
.crBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
/* شبكة السلطعون 3×3 */
.cr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 340px;
  margin: 12px auto 2px;
}
.cr-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 2px solid rgba(245, 197, 24, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 0 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.cr-cell:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 197, 24, 0.7);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(245, 197, 24, 0.3);
}
.cr-cell .cr-emoji {
  font-size: 2.3rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.cr-cell .cr-val {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--txt2);
  min-height: 1.1em;
}
.cr-cell.gold.revealed {
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border-color: #ffd700;
}
.cr-cell.gold.revealed .cr-val { color: #3a2a05; }
.cr-cell.gold.revealed .cr-emoji { filter: none; }
.cr-cell.red.revealed {
  background: linear-gradient(145deg, #fca5a5, #dc2626);
  border-color: #ef4444;
}
.cr-cell.red.revealed .cr-val { color: #fff; }
.cr-cell.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.cr-cell.match {
  transform: scale(1.1);
  box-shadow: 0 0 26px rgba(245, 197, 24, 0.9);
  animation: crMatchPulse 0.55s var(--ease);
}
.cr-cell.gold.match { border-color: #fff; }
.cr-cell.red.match { box-shadow: 0 0 26px rgba(239, 68, 68, 0.8); }
@keyframes crFlip {
  0%   { transform: rotateY(70deg) scale(0.85); opacity: 0.4; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}
@keyframes crMatchPulse {
  0%   { transform: scale(1.1); }
  45%  { transform: scale(1.28); }
  100% { transform: scale(1.1); }
}
/* ── Fishing (صيد السمك) ── */
.fh-sea {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 16px;
  max-width: 520px;
  margin: 12px auto 2px;
  border-radius: 20px;
  background: linear-gradient(180deg, #0e3f63, #08304f 60%, #06233c);
  border: 1.5px solid rgba(96, 165, 250, 0.4);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.fh-sea::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 20% 30%, rgba(147, 197, 253, 0.08) 0 2px, transparent 2px 14px);
  pointer-events: none;
}
.fh-fish {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 4px;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(7, 26, 46, 0.55);
  border: 1.5px solid rgba(96, 165, 250, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, opacity 0.2s;
}
.fh-fish:hover:not(.disabled) {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.85);
  background: rgba(30, 64, 105, 0.7);
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.35);
}
.fh-fish .fh-fish-em {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.55));
  transition: transform 0.2s var(--ease);
}
.fh-fish:hover:not(.disabled) .fh-fish-em { transform: scale(1.15); }
.fh-fish .fh-fish-mult {
  font-size: 0.78rem;
  font-weight: 900;
  color: #ffd700;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(245, 197, 24, 0.4);
  border-radius: 999px;
  padding: 1px 8px;
}
.fh-fish.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.fh-fish.fh-hit {
  animation: fhHit 0.55s var(--ease);
}
.fh-fish.fh-hit .fh-fish-em {
  animation: fhPop 0.55s var(--ease);
}
@keyframes fhHit {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-5px); }
  50%  { transform: translateX(5px); }
  75%  { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}
@keyframes fhPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.45); }
  100% { transform: scale(1.15); }
}
.fh-cannon {
  text-align: center;
  font-size: 2.4rem;
  margin: 8px 0 2px;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.15s var(--ease);
}
.fh-cannon.fh-shoot {
  animation: fhShoot 0.4s var(--ease);
}
@keyframes fhShoot {
  0%   { transform: translateX(0) scale(1); }
  40%  { transform: translateX(6px) scale(1.3); }
  100% { transform: translateX(0) scale(1); }
}
/* ── Gates (بوابات أوليمبوس) ── */
.gt-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 460px;
  margin: 12px auto 2px;
}
.gt-gate {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(145deg, #3b2a63, #241744);
  border: 2px solid rgba(196, 181, 253, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.gt-gate:hover {
  transform: translateY(-3px);
  border-color: rgba(196, 181, 253, 0.75);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(167, 139, 250, 0.35);
}
.gt-gate .gt-gate-em {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.gt-gate .gt-gate-val {
  font-size: 0.85rem;
  font-weight: 900;
  color: #c4b5fd;
  min-height: 1.1em;
}
.gt-gate.gold.revealed {
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border-color: #ffd700;
}
.gt-gate.gold.revealed .gt-gate-val { color: #3a2a05; }
.gt-gate.gold.revealed .gt-gate-em { filter: none; }
.gt-gate.red.revealed {
  background: linear-gradient(145deg, #7f1d1d, #450a0a);
  border-color: #ef4444;
}
.gt-gate.red.revealed .gt-gate-val { color: #fca5a5; }
.gt-gate.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.gt-gate.match {
  transform: scale(1.1);
  box-shadow: 0 0 26px rgba(245, 197, 24, 0.9);
  animation: crMatchPulse 0.55s var(--ease);
}
.gt-gate.gold.match { border-color: #fff; }
.gt-zeus {
  text-align: center;
  font-size: 2.2rem;
  margin: 10px 0 0;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(245, 197, 24, 0.5));
  animation: gtZeusFloat 3s ease-in-out infinite;
}
@keyframes gtZeusFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
/* ── Lightning (برق) ── */
.lg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  max-width: 420px;
  margin: 12px auto 2px;
}
.lg-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, #1e2a4a, #101a33);
  border: 2px solid rgba(250, 204, 21, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 16px rgba(250, 204, 21, 0.08);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.lg-cell:hover {
  transform: translateY(-3px);
  border-color: rgba(250, 204, 21, 0.75);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(250, 204, 21, 0.4);
}
.lg-cell .lg-emoji {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.5));
}
.lg-cell .lg-val {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--txt2);
  min-height: 1.1em;
}
.lg-cell.gold.revealed {
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border-color: #ffd700;
}
.lg-cell.gold.revealed .lg-val { color: #3a2a05; }
.lg-cell.gold.revealed .lg-emoji { filter: none; }
.lg-cell.red.revealed {
  background: linear-gradient(145deg, #3730a3, #1e1b4b);
  border-color: #818cf8;
}
.lg-cell.red.revealed .lg-val { color: #c7d2fe; }
.lg-cell.red.revealed .lg-emoji { filter: none; }
.lg-cell.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.lg-cell.match {
  transform: scale(1.12);
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.95);
  animation: crMatchPulse 0.55s var(--ease);
}
.lg-cell.gold.match { border-color: #fff; }
.lg-cell.red.match { box-shadow: 0 0 28px rgba(129, 140, 248, 0.9); }
/* ── Lottery (اليانصيب) ── */
.lt-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
  max-width: 480px;
  margin: 12px auto 2px;
}
.lt-tick {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, #6d1a3f, #3f0f24);
  border: 2px solid rgba(251, 113, 133, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.lt-tick:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 113, 133, 0.75);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(251, 113, 133, 0.4);
}
.lt-tick .lt-tick-em {
  font-size: 2.1rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.lt-tick .lt-tick-val {
  font-size: 0.8rem;
  font-weight: 900;
  color: #fda4af;
  min-height: 1.1em;
}
.lt-tick.gold.revealed {
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border-color: #ffd700;
}
.lt-tick.gold.revealed .lt-tick-val { color: #3a2a05; }
.lt-tick.gold.revealed .lt-tick-em { filter: none; }
.lt-tick.red.revealed {
  background: linear-gradient(145deg, #374151, #1f2937);
  border-color: #9ca3af;
}
.lt-tick.red.revealed .lt-tick-val { color: #d1d5db; }
.lt-tick.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.lt-tick.match {
  transform: scale(1.14);
  box-shadow: 0 0 28px rgba(245, 197, 24, 0.95);
  animation: crMatchPulse 0.55s var(--ease);
}
.lt-tick.gold.match { border-color: #fff; }
/* ── Mahjong (ماهجونغ) ── */
.mj-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 400px;
  margin: 12px auto 2px;
}
.mj-cell {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, #1f7a5c, #0f4633);
  border: 2px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.mj-cell:hover {
  transform: translateY(-3px);
  border-color: rgba(52, 211, 153, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(52, 211, 153, 0.4);
}
.mj-cell .mj-emoji {
  font-size: 2.3rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.mj-cell .mj-val {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--txt2);
  min-height: 1.1em;
}
.mj-cell.gold.revealed {
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border-color: #ffd700;
}
.mj-cell.gold.revealed .mj-val { color: #3a2a05; }
.mj-cell.gold.revealed .mj-emoji { filter: none; }
.mj-cell.red.revealed {
  background: linear-gradient(145deg, #fca5a5, #dc2626);
  border-color: #ef4444;
}
.mj-cell.red.revealed .mj-val { color: #fff; }
.mj-cell.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.mj-cell.match {
  transform: scale(1.12);
  box-shadow: 0 0 26px rgba(245, 197, 24, 0.9);
  animation: crMatchPulse 0.55s var(--ease);
}
.mj-cell.gold.match { border-color: #fff; }
.mj-cell.red.match { box-shadow: 0 0 26px rgba(239, 68, 68, 0.8); }
/* ── Money (خزائن المال) ── */
.mo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 340px;
  margin: 12px auto 2px;
}
.mo-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(145deg, #4a3a0f, #2a1f08);
  border: 2px solid rgba(245, 197, 24, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.mo-cell:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 197, 24, 0.7);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(245, 197, 24, 0.3);
}
.mo-cell .mo-emoji {
  font-size: 2.3rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.mo-cell .mo-val {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--txt2);
  min-height: 1.1em;
}
.mo-cell.gold.revealed {
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border-color: #ffd700;
}
.mo-cell.gold.revealed .mo-val { color: #3a2a05; }
.mo-cell.gold.revealed .mo-emoji { filter: none; }
.mo-cell.red.revealed {
  background: linear-gradient(145deg, #374151, #1f2937);
  border-color: #9ca3af;
}
.mo-cell.red.revealed .mo-val { color: #d1d5db; }
.mo-cell.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.mo-cell.match {
  transform: scale(1.12);
  box-shadow: 0 0 26px rgba(245, 197, 24, 0.9);
  animation: crMatchPulse 0.55s var(--ease);
}
.mo-cell.gold.match { border-color: #fff; }
.mo-cell.red.match { box-shadow: 0 0 26px rgba(239, 68, 68, 0.8); }
/* ── Olympus (أوليمبوس) ── */
.ol-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 440px;
  margin: 12px auto 2px;
}
.ol-god {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(145deg, #2b3a67, #151f3d);
  border: 2px solid rgba(129, 140, 248, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.ol-god:hover {
  transform: translateY(-3px);
  border-color: rgba(129, 140, 248, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(129, 140, 248, 0.4);
}
.ol-god .ol-god-em {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.ol-god .ol-god-val {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--txt2);
  min-height: 1.1em;
}
.ol-god.gold.revealed {
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border-color: #ffd700;
}
.ol-god.gold.revealed .ol-god-val { color: #3a2a05; }
.ol-god.gold.revealed .ol-god-em { filter: none; }
.ol-god.red.revealed {
  background: linear-gradient(145deg, #fca5a5, #dc2626);
  border-color: #ef4444;
}
.ol-god.red.revealed .ol-god-val { color: #fff; }
.ol-god.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.ol-god.match {
  transform: scale(1.12);
  box-shadow: 0 0 26px rgba(245, 197, 24, 0.9);
  animation: crMatchPulse 0.55s var(--ease);
}
.ol-god.gold.match { border-color: #fff; }
.ol-god.red.match { box-shadow: 0 0 26px rgba(239, 68, 68, 0.8); }
/* ── Poker (بوكر) ── */
.pk-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 460px;
  margin: 12px auto 2px;
}
.pk-card {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  border: 2px solid rgba(245, 197, 24, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
  padding: 4px;
}
.pk-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 197, 24, 0.85);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 14px rgba(245, 197, 24, 0.35);
}
.pk-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}
.pk-card .pk-val {
  font-size: 0.78rem;
  font-weight: 900;
  color: #4b5563;
  min-height: 1.1em;
}
.pk-card.gold.revealed {
  border-color: #ffd700;
}
.pk-card.gold.revealed .pk-val { color: #3a2a05; }
.pk-card.red.revealed {
  border-color: #ef4444;
}
.pk-card.red.revealed .pk-val { color: #dc2626; }
.pk-card.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.pk-card.match {
  transform: scale(1.1);
  box-shadow: 0 0 26px rgba(245, 197, 24, 0.9);
  animation: crMatchPulse 0.55s var(--ease);
}
.pk-card.gold.match { border-color: #fff; }
.pk-card.red.match { box-shadow: 0 0 26px rgba(239, 68, 68, 0.8); }
/* ── Rose (وردة الحظ) ── */
.ro-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
  max-width: 480px;
  margin: 12px auto 2px;
}
.ro-rose {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, #4c1d3f, #2a0f22);
  border: 2px solid rgba(244, 114, 182, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.ro-rose:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 114, 182, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(244, 114, 182, 0.4);
}
.ro-rose .ro-rose-em {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.ro-rose .ro-rose-val {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--txt2);
  min-height: 1.1em;
}
.ro-rose.gold.revealed {
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border-color: #ffd700;
}
.ro-rose.gold.revealed .ro-rose-val { color: #3a2a05; }
.ro-rose.gold.revealed .ro-rose-em { filter: none; }
.ro-rose.red.revealed {
  background: linear-gradient(145deg, #365314, #1a2e0a);
  border-color: #84cc16;
}
.ro-rose.red.revealed .ro-rose-val { color: #d9f99d; }
.ro-rose.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.ro-rose.match {
  transform: scale(1.12);
  box-shadow: 0 0 26px rgba(245, 197, 24, 0.9);
  animation: crMatchPulse 0.55s var(--ease);
}
.ro-rose.gold.match { border-color: #fff; }
.ro-rose.red.match { box-shadow: 0 0 26px rgba(132, 204, 22, 0.8); }
/* ── Sweet Bonanza (سويت بونانزا) ── */
.sw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 400px;
  margin: 12px auto 2px;
}
.sw-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(145deg, #7c2d5e, #471a36);
  border: 2px solid rgba(251, 113, 133, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.sw-cell:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 113, 133, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(251, 113, 133, 0.4);
}
.sw-cell .sw-emoji {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.sw-cell .sw-val {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--txt2);
  min-height: 1.1em;
}
.sw-cell.gold.revealed {
  background: linear-gradient(145deg, #ffe066, #f5a524);
  border-color: #ffd700;
}
.sw-cell.gold.revealed .sw-val { color: #3a2a05; }
.sw-cell.gold.revealed .sw-emoji { filter: none; }
.sw-cell.red.revealed {
  background: linear-gradient(145deg, #374151, #1f2937);
  border-color: #9ca3af;
}
.sw-cell.red.revealed .sw-val { color: #d1d5db; }
.sw-cell.revealed { cursor: default; animation: crFlip 0.35s var(--ease); }
.sw-cell.match {
  transform: scale(1.12);
  box-shadow: 0 0 26px rgba(245, 197, 24, 0.9);
  animation: crMatchPulse 0.55s var(--ease);
}
.sw-cell.gold.match { border-color: #fff; }
.sw-cell.red.match { box-shadow: 0 0 26px rgba(239, 68, 68, 0.8); }
/* ── Keno ── */
.ke-wrap {
  max-width: 560px;
  margin: 0 auto;
}
.ke-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.ke-counter {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.12), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: 12px;
  padding: 8px 16px;
}
.ke-counter b {
  color: #fff;
  font-size: 1.2rem;
}
.ke-clear {
  background: linear-gradient(135deg, rgba(255, 72, 96, 0.15), rgba(255, 72, 96, 0.05));
  color: #ff8997;
  border: 1px solid rgba(255, 72, 96, 0.4);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.ke-clear:hover {
  background: rgba(255, 72, 96, 0.28);
  color: #fff;
  transform: translateY(-1px);
}
.ke-hint {
  text-align: center;
  color: var(--t2);
  font-size: 0.82rem;
  margin: 10px 0 4px;
}
.kgrid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  max-width: 470px;
  margin: 12px auto;
  padding: 14px;
  background: linear-gradient(160deg, rgba(245, 197, 24, 0.06), rgba(15, 20, 40, 0.5));
  border: 1px solid rgba(245, 197, 24, 0.15);
  border-radius: 16px;
}
.kc {
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--bg3), #131a33);
  border: 2px solid var(--bd);
  color: #e8ecf5;
  font-weight: 800;
  /* [KenoFix] رقم واضح كامل: حجم متكيف + بلا حشو يقص الخانات ذات الرقمين */
  font-size: clamp(0.72rem, 2.6vw, 1rem);
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
/* [MultiBet] رقم مرهون عليه في تذكرة مؤكدة: أخضر ثابت حتى نهاية الجولة */
.kc.placed {
  background: linear-gradient(145deg, #10b981, #047857);
  color: #fff;
  border-color: #6ee7b7;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}
.kc:hover:not(.sel):not(.drawn) {
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 197, 24, 0.25);
}
.kc.sel {
  background: linear-gradient(145deg, var(--gold), #b8860b);
  color: #0A0E1A;
  border-color: #fff3c4;
  box-shadow: 0 0 14px rgba(245, 197, 24, 0.55);
  transform: scale(1.06);
}
.kc.drawn {
  background: linear-gradient(145deg, rgba(26, 108, 246, 0.45), rgba(26, 108, 246, 0.2));
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 0 10px rgba(26, 108, 246, 0.35);
}
.kc.match {
  background: linear-gradient(145deg, var(--gold), #b8860b);
  color: #0A0E1A;
  border-color: #fff3c4;
  animation: matchPulse 0.4s var(--ease);
  box-shadow: 0 0 16px rgba(245, 197, 24, 0.6);
}
.kc:disabled {
  cursor: default;
  opacity: 1;
}
@keyframes matchPulse {
  50% { transform: scale(1.3); }
}
.ke-draw {
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}
/* ── Blackjack ── */
.bjt {
  background: radial-gradient(ellipse at 50% 0%, #147a4c, #0a4a2c 60%, #062f1b);
  border: 4px solid #8B6914;
  border-radius: 160px / 80px;
  padding: 28px 14px 24px;
  max-width: 580px;
  margin: 12px auto;
  position: relative;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6), 0 0 26px rgba(245, 197, 24, 0.16), 0 12px 32px rgba(0, 0, 0, 0.55);
}
.bjt::before {
  content: '♠ ♥ ♦ ♣';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(245, 197, 24, 0.5);
  font-size: 0.68rem;
  letter-spacing: 7px;
  white-space: nowrap;
}
.bja {
  text-align: center;
  margin-bottom: 16px;
}
.bja + .bja {
  border-top: 1px dashed rgba(245, 197, 24, 0.28);
  padding-top: 16px;
}
.bja.bj-live .bjcs {
  animation: bjLivePulse 1.6s ease-in-out infinite;
}
@keyframes bjLivePulse {
  50% { filter: drop-shadow(0 0 14px rgba(245, 197, 24, 0.5)); }
}
.bjal {
  color: rgba(245, 197, 24, 0.85);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.bjcs {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 80px;
}
.bjc {
  width: 54px;
  height: 78px;
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 0;
  display: block;
  color: #1a1a1a;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  animation: cardDeal 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.bjc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.bjc.red {
  color: #c41e3a;
}
.bjc.back {
  background: transparent;
  border: none;
}
.bjc.back::after {
  display: none;
}
.bjc .rt {
  font-size: 0.78rem;
  align-self: flex-start;
}
.bjc .sm {
  font-size: 1.4rem;
  margin: auto;
}
.bjc .rb {
  font-size: 0.78rem;
  align-self: flex-end;
  transform: rotate(180deg);
}
.bjc .hold {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #0A0E1A;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 5px;
}
@keyframes cardDeal {
  from {
    opacity: 0;
    transform: translateY(-20px) rotate(-6deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}
.bjs {
  display: inline-block;
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.18), rgba(0, 0, 0, 0.65));
  color: var(--gold);
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 14px;
  font-size: 0.76rem;
  margin-top: 5px;
  border: 1px solid rgba(245, 197, 24, 0.4);
  box-shadow: 0 0 12px rgba(245, 197, 24, 0.22);
}
/* مؤشر انتظار أثناء سحب الموزع */
.bjs.thinking {
  animation: bjThink 0.7s ease-in-out infinite;
}
@keyframes bjThink {
  50% { opacity: 0.4; }
}
/* ── Roulette ── */
.rwrap {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 10px auto;
}
.rwheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 7px solid #8B6914;
  box-shadow: 0 0 28px rgba(245, 197, 24, 0.3);
  background: conic-gradient(
    #006b3c 0 9.7deg, #c41e3a 0 19.4deg, #000 0 29.1deg,
    #c41e3a 0 38.8deg, #000 0 48.5deg, #c41e3a 0 58.2deg,
    #000 0 67.9deg, #c41e3a 0 77.6deg, #000 0 87.3deg,
    #c41e3a 0 97deg, #000 0 106.7deg, #c41e3a 0 116.4deg,
    #000 0 126.1deg, #c41e3a 0 135.8deg, #000 0 145.5deg,
    #c41e3a 0 155.2deg, #000 0 164.9deg, #c41e3a 0 174.6deg,
    #000 0 184.3deg, #c41e3a 0 194deg, #000 0 203.7deg,
    #c41e3a 0 213.4deg, #000 0 223.1deg, #c41e3a 0 232.8deg,
    #000 0 242.5deg, #c41e3a 0 252.2deg, #000 0 261.9deg,
    #c41e3a 0 271.6deg, #000 0 281.3deg, #c41e3a 0 291deg,
    #000 0 300.7deg, #c41e3a 0 310.4deg, #000 0 320.1deg,
    #c41e3a 0 329.8deg, #000 0 339.5deg, #c41e3a 0 349.2deg,
    #000 0 360deg
  );
}
.w12 {
  background: conic-gradient(
    #F5C518 0 30deg, #1A6CF6 0 60deg, #7C3AED 0 90deg,
    #10B981 0 120deg, #EF4444 0 150deg, #1A6CF6 0 180deg,
    #F5C518 0 210deg, #7C3AED 0 240deg, #FF8C00 0 270deg,
    #10B981 0 300deg, #1A6CF6 0 330deg, #EF4444 0 360deg
  ) !important;
}
.rwrap.spin .rwheel {
  animation: wheelSpin 3s cubic-bezier(0.15, 0.7, 0.2, 1);
}
@keyframes wheelSpin {
  to { transform: rotate(1800deg); }
}
.rcenter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, #8B6914, #5c4608);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold);
}
.rptr {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 15px solid var(--gold);
  z-index: 3;
}
.rball {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  margin: -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 9px #fff;
  display: none;
}
.rwrap.spin .rball {
  display: block;
  animation: orbit 0.4s linear infinite;
}
@keyframes orbit {
  from { transform: rotate(0) translateX(96px); }
  to { transform: rotate(360deg) translateX(96px); }
}
.rbets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
  max-width: 430px;
  margin: 8px auto;
}
.rb {
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  font-size: 0.72rem;
  border: 2px solid transparent;
  color: #fff;
}
.rb.red { background: #c41e3a; }
.rb.black { background: #000; }
.rb.green { background: #006b3c; }
.rb.gold { background: var(--gg); color: #0A0E1A; }
.rb.blue { background: var(--gb); }
.rb.sel {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(245, 197, 24, 0.6);
}
.rb.hit {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.8);
  animation: winPulse 0.45s var(--ease);
}
.rb.miss {
  border-color: var(--red2);
  opacity: 0.55;
  animation: missFade 0.4s var(--ease);
}
@keyframes missFade {
  50% { transform: scale(0.88); }
}
/* ── Coin Flip 3D ── */
.coin3d {
  width: 132px;
  height: 132px;
  margin: 12px auto 8px;
  position: relative;
  perspective: 1200px;
  transform-style: preserve-3d;
}
.coinFace {
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.5), 0 8px 26px rgba(0, 0, 0, 0.45), 0 0 22px rgba(245, 197, 24, 0.4);
  border: 3px solid rgba(255, 215, 0, 0.65);
}
.coinFace.heads {
  background: url('../assets/coins/chip-gold.webp') center / cover no-repeat;
}
.coinFace.tails {
  background: url('../assets/coins/chip-red.webp') center / cover no-repeat;
}
.cf-hint {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.82rem;
  text-align: center;
}
#cFlipBtn:disabled,
#cBtnHeads:disabled,
#cBtnTails:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
/* ── Rock Paper Scissors ── */
.rps-hint {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.82rem;
  text-align: center;
}
.rps-arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px auto 6px;
}
.rps-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rps-side-tag {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.rps-side-tag.you {
  color: #7dd3fc;
  background: rgba(56, 130, 246, 0.16);
  border: 1px solid rgba(56, 130, 246, 0.45);
}
.rps-side-tag.opp {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.45);
}
.rps-card {
  width: 96px;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 2px solid rgba(245, 197, 24, 0.5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(245, 197, 24, 0.07);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.rps-card-face {
  font-size: 3.1rem;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}
.rps-card.win {
  border-color: rgba(52, 211, 153, 0.9);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.55), inset 0 0 18px rgba(52, 211, 153, 0.12);
  animation: rpsPop 0.45s var(--ease);
}
.rps-card.lose {
  border-color: rgba(244, 63, 94, 0.9);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.5), inset 0 0 18px rgba(244, 63, 94, 0.1);
}
.rps-card.tie {
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 0 16px rgba(148, 163, 184, 0.4);
}
.rps-card.shaking {
  animation: rpsShake 0.55s var(--ease) infinite;
}
@keyframes rpsShake {
  0%, 100% { transform: rotate(0) translateX(0); }
  25% { transform: rotate(-7deg) translateX(-4px); }
  75% { transform: rotate(7deg) translateX(4px); }
}
@keyframes rpsPop {
  40% { transform: scale(1.1); }
}
.rps-vs {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 900;
  color: #1a1205;
  background: linear-gradient(135deg, #ffd700, #f5c518);
  box-shadow: 0 0 18px rgba(245, 197, 24, 0.55);
  animation: vsGlow 2.4s ease-in-out infinite;
}
@keyframes vsGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(245, 197, 24, 0.4); }
  50% { box-shadow: 0 0 24px rgba(245, 197, 24, 0.75); }
}
.rps-picks {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 14px auto 6px;
  flex-wrap: wrap;
}
.rpsBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 86px;
  padding: 12px 10px 9px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 2px solid rgba(245, 197, 24, 0.45);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.rpsBtn:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 197, 24, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(245, 197, 24, 0.3);
}
.rpsBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.6);
}
.rps-emoji {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
.rps-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--txt2);
}
.rps-status {
  min-height: 52px;
  margin: 10px auto 2px;
  text-align: center;
  font-size: 1rem;
  color: var(--txt2);
  white-space: pre-line;
  line-height: 1.6;
}
/* ── Penalty ── */
.pn-hint {
  margin: 6px 0 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.88rem;
  text-align: center;
}
.pn-arena {
  position: relative;
  margin: 10px auto 4px;
  perspective: 600px;
}
.pn-arena .goal {
  position: relative;
  width: 260px;
  height: 140px;
  margin: 0 auto;
  border: 5px solid rgba(255, 255, 255, 0.92);
  border-bottom: none;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.13) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.13) 0 2px, transparent 2px 14px);
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 8px 22px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.35s var(--ease);
}
.goal .gpost {
  position: absolute;
  top: 0;
  width: 9px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.55));
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
.goal .gpost.gl { left: -6px; }
.goal .gpost.gr { right: -6px; }
.goal .gnet {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px) 0 0 / 100% 14px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px) 0 0 / 16px 100%;
  border-radius: 8px 8px 0 0;
}
.goal .keeper {
  position: absolute;
  bottom: 0;
  left: 50%;
  margin-left: -0.6em;
  transform: translateX(0) rotate(0deg);
  font-size: 2.6rem;
  z-index: 2;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.goal .pball2 {
  position: absolute;
  bottom: 6px;
  left: 50%;
  margin-left: -0.5em;
  transform: translateX(0) translateY(0);
  font-size: 1.6rem;
  z-index: 3;
  transition: transform 0.4s var(--ease);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}
.pn-role {
  margin: 8px auto 4px;
  padding: 7px 16px;
  width: fit-content;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffd700;
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.16), rgba(245, 197, 24, 0.05));
  border: 1px solid rgba(245, 197, 24, 0.45);
  box-shadow: 0 0 14px rgba(245, 197, 24, 0.12);
  text-align: center;
}
.pn-picks {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 4px;
}
.pnBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 26px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 2px solid rgba(245, 197, 24, 0.55);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), opacity 0.2s;
}
.pnBtn:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: rgba(245, 197, 24, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 197, 24, 0.3);
}
.pnBtn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}
.pnBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.pn-arrow {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.pn-dir {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffd700;
}
.pn-status {
  min-height: 40px;
  margin: 8px auto 2px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--txt2);
  white-space: pre-line;
  line-height: 1.6;
}
.pn-arena.pn-goal .goal {
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 0 34px rgba(52, 211, 153, 0.65);
  animation: pnFlash 0.5s var(--ease);
}
.pn-arena.pn-saved .goal {
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(244, 63, 94, 0.6);
  animation: pnFlashR 0.5s var(--ease);
}
@keyframes pnFlash {
  0% { box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 0 0 rgba(52, 211, 153, 0); }
  50% { box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 0 44px rgba(52, 211, 153, 0.85); }
  100% { box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(52, 211, 153, 0.5); }
}
@keyframes pnFlashR {
  0% { box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 0 0 rgba(244, 63, 94, 0); }
  50% { box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 0 38px rgba(244, 63, 94, 0.8); }
  100% { box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 0 26px rgba(244, 63, 94, 0.45); }
}
/* ── Lucky 7 ── */
.l7-hint {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.82rem;
  text-align: center;
}
.l7-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
}
.l7-slot {
  width: 100%;
  max-width: 340px;
  padding: 18px 12px 14px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(145deg, rgba(245, 197, 24, 0.1), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(245, 197, 24, 0.35);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.3);
}
.l7-ball {
  display: inline-block;
  font-size: 4.5rem;
  line-height: 1;
  color: #ffd700;
  text-shadow: 0 0 18px rgba(245, 197, 24, 0.55), 0 3px 6px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s var(--ease);
}
.l7-ball.l7-roll {
  animation: l7Bounce 0.35s var(--ease);
}
@keyframes l7Bounce {
  0% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-16px) scale(1.15); }
  50% { transform: translateY(0) scale(0.98); }
  75% { transform: translateY(-8px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}
.l7-lane {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.l7-lane span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 1px solid rgba(245, 197, 24, 0.3);
  color: var(--txt1);
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s, color 0.25s;
}
#l7Lane span.hit {
  background: linear-gradient(145deg, #ffd700, #f59e0b);
  color: #1a1205;
  border-color: #ffd700;
  transform: scale(1.15);
  box-shadow: 0 0 18px rgba(245, 197, 24, 0.7);
}
.l7-picks {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.l7Btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 18px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 2px solid rgba(245, 197, 24, 0.55);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), opacity 0.2s;
}
.l7Btn:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: rgba(245, 197, 24, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 197, 24, 0.3);
}
.l7Btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}
.l7Btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.l7Btn.l7-low {
  border-color: rgba(96, 165, 250, 0.65);
}
.l7Btn.l7-low:hover:not(:disabled) {
  border-color: #60a5fa;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(96, 165, 250, 0.35);
}
.l7Btn.l7-seven {
  border-color: rgba(245, 197, 24, 0.95);
  border-width: 2.5px;
}
.l7Btn.l7-high {
  border-color: rgba(244, 63, 94, 0.65);
}
.l7Btn.l7-high:hover:not(:disabled) {
  border-color: #f43f5e;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(244, 63, 94, 0.35);
}
.l7-nums {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--txt1);
}
.l7-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--txt2);
}
.l7-mult {
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffd700;
}
.l7-status {
  min-height: 40px;
  margin: 8px auto 2px;
  text-align: center;
  white-space: pre-line;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--txt1);
}
.l7-status.win {
  color: #4ade80;
}
.l7-status.lose {
  color: #f87171;
}
/* ── Dice ── */
.dice3 {
  font-size: 2.6rem;
  letter-spacing: 8px;
  text-align: center;
  margin: 8px 0;
}
.dice3.rolling {
  animation: diceRoll 0.7s var(--ease);
}
@keyframes diceRoll {
  25% { transform: rotate(90deg) scale(1.2); }
  50% { transform: rotate(180deg); }
  75% { transform: rotate(270deg) scale(1.1); }
}
/* ── Parchisi: قفزة قيمة النرد عند الرمي ── */
.parchisi-dice-pop {
  display: inline-block;
  animation: parchisiDicePop 0.5s var(--ease);
}
@keyframes parchisiDicePop {
  30% { transform: scale(1.5) rotate(20deg); }
  65% { transform: scale(0.88) rotate(-10deg); }
  100% { transform: scale(1) rotate(0); }
}
/* ������������������������� صفحة اللعبة الحقيقية ������������������������� */
.gp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
#pg-game .ptitle {
  font-size: 1.25rem;
  order: 2;
  flex: 1;
  justify-content: center;
}
#pg-game .ptitle #gamePageName {
  display: none;
}
#pg-game .gp-head > .btn.icon-btn:first-child {
  order: 1;
}
#pg-game .gp-head > .btn.icon-btn:nth-child(3) {
  order: 3;
}
#pg-game .gp-head > .btn.icon-btn:nth-child(4) {
  order: 3;
}
#pg-game .gp-head > .btn.icon-btn:last-child {
  order: 3;
}
/* ── توحيد ألوان أيقونات هيدر اللعبة ── */
#pg-game .gp-head .btn.icon-btn {
  background: var(--card);
  border: 1px solid var(--bd);
  color: var(--t2);
}
#pg-game .gp-head .btn.icon-btn:hover {
  background: rgba(245, 197, 24, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}
#pg-game .gp-head .btn.icon-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
/* ── وضع ملء الشاشة للعبة ── */
#pg-game:fullscreen,
#pg-game:-webkit-full-screen {
  background: var(--bg);
  overflow-y: auto;
  width: 100%;
  height: 100%;
  padding: 14px 14px 24px;
  box-sizing: border-box;
}
#gamePageBody .stage {
  margin-bottom: 18px;
}
/* سجل الجولات لا يظهر في ملء الشاشة — يبقى في صفحة اللعبة فقط */
#pg-game:fullscreen .ghist,
#pg-game:-webkit-full-screen .ghist,
#pg-game:fullscreen .game-foot,
#pg-game:-webkit-full-screen .game-foot {
  display: none !important;
}
/* [FLATDOG] إخفاء شريط أزرار صفحة اللعبة في ملء الشاشة — يظهر فقط حاوية اللعبة بأزرارها وعناصرها */
#pg-game.app-fs .gp-head,
#pg-game:fullscreen .gp-head,
#pg-game:-webkit-full-screen .gp-head {
  display: none !important;
}
/* في ملء الشاشة: حاوية اللعبة تملأ الصفحة بلا ترك فراغ للشريط المخفي */
#pg-game.app-fs #gamePageBody,
#pg-game:fullscreen #gamePageBody {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}
/* app-fs: السماح بالتمرير داخل حاوية اللعبة كي تبقى لوحة الإعداد/الرهان وأزرار
   البدء ظاهرة وممكن الوصول إليها على الشاشات القصيرة (لاندسكيب الهواتف) بلا قصّ.
   يطغى على overflow:hidden الأساسي عبر !important ويعمل فقط عند الفيضان الفعلي. */
#pg-game.app-fs #gamePageBody {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
/* منع فيضان مرحلة اللعبة خارج عرض الشاشة */
#gamePageBody {
  min-width: 0;
  max-width: 100%;
}

/* ═══════════ تخطيط صفحة اللعبة (الوضع المفتوح): حاوية لعبة ثابتة + سجل مستقل ═══════════ */
body.rami-game-open { overflow: hidden; }
#pg-game.active {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--pg-top, 0px));
  min-height: 0;
  overflow-y: auto;              /* تمرير لكشف سجل الجولات أسفل حاوية اللعبة */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
/* الشريط العلوي ثابت أعلى الصفحة أثناء التمرير */
#pg-game.active .gp-head {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 60;
}
/* حاوية اللعبة بارتفاع ثابت يملأ الشاشة تحت الشريط — لا تتقلّص مهما طال السجل */
#pg-game.active #gamePageBody {
  /* --vvh = الارتفاع المرئي الفعلي (visualViewport) — أدقّ من dvh على الجوال
     حيث يتغيّر بشريط العنوان، فلا يُقصّ أسفل الحاوية أبداً */
  flex: 0 0 calc(var(--vvh, 100dvh) - var(--pg-top, 0px) - var(--gp-head-h, 64px));
  min-height: 300px;
  overflow: hidden;
}
/* سجل الجولات مستقل: ارتفاع محتواه الخاص، أسفل حاوية اللعبة (لا يلتهمها) */
#pg-game.active .ghist {
  flex: 0 0 auto;
}
#gamePageBody .stage,
#gamePageBody .bjt,
#gamePageBody canvas {
  max-width: 100%;
}
/* ── تلميح تدوير الهاتف (للألعاب العرضية على الموبايل) ── */
.rotate-hint {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(10, 14, 26, 0.97);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--t1);
  text-align: center;
  padding: 24px;
}
.rotate-hint[hidden] {
  display: none !important;
}
.rotate-hint b {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--gold);
}
.rotate-hint span {
  font-size: 0.85rem;
  color: var(--t2);
  max-width: 280px;
}
.rotate-phone {
  width: 74px;
  height: 118px;
  border: 3px solid var(--gold);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gold);
  box-shadow: 0 0 24px rgba(245, 197, 24, 0.35);
  animation: rotHint 1.5s var(--ease) infinite;
}
@keyframes rotHint {
  0%   { transform: rotate(0deg); }
  55%  { transform: rotate(90deg); }
  100% { transform: rotate(90deg); }
}
/* ── سجل الجولات الحي ── */
.ghist {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-xl, 16px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.ghist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bd);
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.08), transparent);
}
.ghist-title {
  font-weight: 800;
  color: var(--t1);
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green2);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.ghist-wrap {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ghist-t {
  width: 100%;
  font-size: 0.82rem;
}
.ghist-t th {
  text-align: right;
  color: var(--t3);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--bd);
}
.ghist-t td {
  padding: 8px 10px;
  border-bottom: 1px dashed var(--bd);
}
.ghist-t tr:last-child td {
  border-bottom: none;
}
.ghist-t tr:hover td {
  background: rgba(245, 197, 24, 0.05);
}
/* ── تذاكر سجل الجولات (بطاقات صغيرة مكدّسة) ── */
.ght-empty {
  text-align: center;
  color: var(--t3);
  font-size: 0.85rem;
  padding: 16px 8px;
}
.ght-ticket {
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--bd);
  border-left: 3px solid var(--bd);
  border-radius: 12px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .15s var(--ease, ease), transform .15s var(--ease, ease);
}
.ght-ticket:hover { transform: translateY(-1px); }
.ght-ticket.is-win { border-left-color: var(--green2, #10b981); }
.ght-ticket.is-lose { border-left-color: #ef4444; }
.ght-top, .ght-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ght-who { font-size: 0.8rem; color: var(--t1); }
.ght-name { color: var(--t2); }
.ght-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: .3px;
  white-space: nowrap;
}
.ght-badge.win { color: var(--green2, #10b981); background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.35); }
.ght-badge.lose { color: #ef4444; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.32); }
.ght-mid { font-size: 0.78rem; color: var(--t2); }
.ght-bet i { color: var(--gold, #f5c518); margin-inline-end: 3px; }
.ght-payout { font-weight: 700; color: var(--green2, #10b981); }
.ght-payout i { margin-inline-end: 3px; }
.ght-payout.muted { color: var(--t3); font-weight: 500; }
/* [Tickets v2] تفاصيل إضافية: اسم اللعبة، الصافي، سطر النتيجة */
.ght-game { color: var(--t3); font-size: 0.72rem; font-weight: 600; }
.ght-net { font-weight: 800; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.ght-net.pos { color: var(--green2, #10b981); }
.ght-net.neg { color: #ef4444; }
.ght-res {
  font-size: 0.7rem;
  color: var(--t3);
  border-top: 1px dashed var(--bd);
  padding-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ght-time { color: var(--t3); font-size: 0.72rem; margin-inline-start: auto; }
/* ── ترقية البطاقات (هوية بصرية) ── */
.tile {
  position: relative;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.tile:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 197, 24, 0.6);
  box-shadow: var(--shadow-lg), 0 0 18px rgba(245, 197, 24, 0.18);
}
.tile .art.hasimg img {
  position: relative;
  z-index: 1;
  transition: transform 0.35s var(--ease);
}
.tile .art-emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}
.tile:hover .art.hasimg img {
  transform: scale(1.06);
}
.tile .playbtn {
  background: var(--gg);
  color: #fff;
  border: none;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}
.tile:hover .playbtn {
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.55);
}
/* ═══════════════════════════════════════
   Sic Bo — نرد فاخر
   ═══════════════════════════════════════ */
.sb-wrap {
  margin: 8px 0 4px;
  padding: 18px 10px 12px;
}
.sb-dice {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 10px 0 16px;
  perspective: 900px;
}
.sb-die {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  background: linear-gradient(145deg, #33245f, #171242 58%, #0e0a28);
  border: 2px solid rgba(245, 197, 24, 0.55);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -16px 26px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.18s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.sb-die::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.13), transparent 55%);
  pointer-events: none;
}
.sb-die span {
  font-size: 2.7rem;
  font-weight: 900;
  font-family: 'Cairo', sans-serif;
  color: #ffe9a8;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 20px rgba(245, 197, 24, 0.35);
  transform: translateZ(30px);
}
.sb-dice.rolling .sb-die {
  animation: sbShake 0.12s linear infinite;
}
@keyframes sbShake {
  0%   { transform: translateX(-4px) rotate(-5deg); }
  50%  { transform: translateX(4px) rotate(5deg); }
  100% { transform: translateX(-4px) rotate(-5deg); }
}
.sb-die.won {
  border-color: #ffd700;
  box-shadow: 0 0 34px rgba(255, 215, 0, 0.7), 0 12px 28px rgba(0, 0, 0, 0.5);
  animation: sbWinPulse 0.5s var(--ease);
}
.sb-die.won span {
  color: #fff;
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.95), 0 2px 0 rgba(0, 0, 0, 0.4);
}
@keyframes sbWinPulse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.sb-sum {
  text-align: center;
  font-size: 1rem;
  color: var(--txt2);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.sb-sum b {
  color: #ffd700;
  font-size: 1.3rem;
  margin-inline-start: 8px;
  font-weight: 900;
}
.sb-bets {
  gap: 10px;
}
.sb-rb {
  min-width: 158px;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  font-size: 0.8rem !important;
  border: 2px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.sb-rb:hover:not(.active) {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  border-color: rgba(245, 197, 24, 0.6) !important;
}
.sb-rb b {
  color: #ffd700;
  margin-inline-start: 5px;
  font-size: 0.85rem;
}
.sb-rb.sb-small { background: linear-gradient(135deg, #1a6cf6, #0f3d9e); }
.sb-rb.sb-big   { background: linear-gradient(135deg, #c41e3a, #7a0f22); }
.sb-rb.sb-triple { background: linear-gradient(135deg, #b8860b, #6d4d00); }
.sb-rb.active {
  border-color: #ffd700 !important;
  box-shadow: 0 0 0 2px #ffd700, 0 0 20px rgba(255, 215, 0, 0.45);
  transform: translateY(-2px);
}
.sb-roll {
  min-width: 230px;
  font-size: 1rem !important;
  background: linear-gradient(135deg, #ffd700, #b8860b) !important;
  color: #1a1200 !important;
  box-shadow: 0 6px 22px rgba(245, 197, 24, 0.4);
}
.sb-roll:hover:not(:disabled) {
  box-shadow: 0 10px 30px rgba(245, 197, 24, 0.6);
}

/* ═══════════ Roulette ═══════════ */
.rl-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 10px 0 6px;
}
.rl-wheel {
  position: relative;
  /* عجلة متجاوبة: مربع بحد أقصى 340px يتناسب مع عرض الحاوية (78vw موبايل) */
  width: min(78vw, 340px);
  height: auto;
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 12px 30px rgba(245, 197, 24, 0.25));
  animation: rlFloat 4s var(--ease) infinite;
}
/* [Real] عجلة المنصة الحقيقية (أصل مرقّم 0-36) تدور حول مركزها */
.rl-real-wheel {
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 50%;
  will-change: transform;
}
/* [Real] الكرة: عنصر دائري صغير يتحرك فيزيائياً بمدار (الوضع يُحدده JS) */
.rl-ball {
  position: absolute;
  width: 7%;
  height: 7%;
  margin: -3.5% 0 0 -3.5%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff, #ffe9a3 45%, #c99050 90%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.55), inset 0 -1px 2px rgba(120,80,0,0.4);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.rl-wheel.spinning .rl-ball { opacity: 1; }
.rl-wheel canvas {
  display: block;
  width: 100%;
  height: 100%;
}
@keyframes rlFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.rl-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 26px solid #ffd700;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
  z-index: 3;
}
.rl-last {
  font-size: 1.05rem;
  color: #c9c4e8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 197, 24, 0.25);
  border-radius: 14px;
  padding: 8px 26px;
  min-width: 150px;
  text-align: center;
  font-weight: 600;
}
.rl-last b {
  font-size: 1.35rem;
  margin-inline-start: 6px;
}
.rl-last b.red { color: #ff4d6d; text-shadow: 0 0 12px rgba(255, 77, 109, 0.6); }
.rl-last b.black { color: #e8e6f5; text-shadow: 0 0 12px rgba(232, 230, 245, 0.5); }
.rl-last b.green { color: #34d399; text-shadow: 0 0 12px rgba(52, 211, 153, 0.6); }
.rl-bets {
  /* شبكة مضغوطة خاصة بالروليت — تلغي minmax(230px,1fr) العامة لـ .grid.g3
     كي لا تمتد أزرار الرهان العشرة إلى صف واحد ضخم (352×55px) على الموبايل:
     على 390px تظهر 3 أعمدة ≈113px للزر */
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px 8px;
  margin: 8px auto 4px;
}
.rl-b {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  padding: 9px 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #241d4d, #151033);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
}
.rl-b:hover:not(.active) {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  border-color: rgba(245, 197, 24, 0.6);
}
.rl-b b {
  color: #ffd700;
  font-size: 0.72rem;
}
.rl-b.red { background: linear-gradient(135deg, #c41e3a, #7a0f22); }
.rl-b.black { background: linear-gradient(135deg, #2c2c38, #131318); }
.rl-b.green { background: linear-gradient(135deg, #0d8a5f, #06503a); }
.rl-b.active {
  border-color: #ffd700 !important;
  box-shadow: 0 0 0 2px #ffd700, 0 0 20px rgba(255, 215, 0, 0.45);
  transform: translateY(-2px);
}
.rl-spin {
  min-width: 180px;
  font-size: 1rem !important;
  background: linear-gradient(135deg, #ffd700, #b8860b) !important;
  color: #1a1200 !important;
  box-shadow: 0 6px 22px rgba(245, 197, 24, 0.4);
}
.rl-spin:hover:not(:disabled) {
  box-shadow: 0 10px 30px rgba(245, 197, 24, 0.6);
}
.rl-spin:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ═══════════ Baccarat ═══════════ */
.bc-table {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin: 14px auto 8px;
  max-width: 560px;
  border-radius: 22px;
  padding: 22px 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 197, 24, 0.12), transparent 60%),
    linear-gradient(160deg, #0c5c3a, #07432a 55%, #052f1e);
  border: 1px solid rgba(245, 197, 24, 0.35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), inset 0 0 40px rgba(0, 0, 0, 0.35);
  position: relative;
}
.bc-table::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(245, 197, 24, 0.22);
  border-radius: 16px;
  pointer-events: none;
}
.bc-side {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}
.bc-vs {
  align-self: center;
  font-size: 2rem;
  color: rgba(255, 215, 0, 0.9);
  padding: 0 8px;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.5);
}
.bc-cards {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  align-items: center;
}
.bc-card {
  position: relative;
  width: 58px;
  height: 84px;
  border-radius: 9px;
  background: transparent;
  border: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  padding: 0;
  display: block;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: bcAppear 0.45s var(--ease) forwards;
}
.bc-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
@keyframes bcAppear {
  to { opacity: 1; transform: translateY(0); }
}
.bc-total {
  min-width: 64px;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #1a1200;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(245, 197, 24, 0.4);
}
.bc-b {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #241d4d, #151033);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.bc-b:hover:not(.active) {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  border-color: rgba(245, 197, 24, 0.6);
}
.bc-b b { color: #ffd700; font-size: 0.85rem; }
.bc-b.bc-player { background: linear-gradient(135deg, #1e5fb4, #123a75); }
.bc-b.bc-banker { background: linear-gradient(135deg, #c41e3a, #7a0f22); }
.bc-b.bc-tie { background: linear-gradient(135deg, #0d8a5f, #06503a); }
.bc-b.active {
  border-color: #ffd700 !important;
  box-shadow: 0 0 0 2px #ffd700, 0 0 20px rgba(255, 215, 0, 0.45);
  transform: translateY(-2px);
}
.bc-deal {
  min-width: 230px;
  font-size: 1rem !important;
  background: linear-gradient(135deg, #ffd700, #b8860b) !important;
  color: #1a1200 !important;
  box-shadow: 0 6px 22px rgba(245, 197, 24, 0.4);
}
.bc-deal:hover:not(:disabled) {
  box-shadow: 0 10px 30px rgba(245, 197, 24, 0.6);
}
.bc-deal:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ═══════════ Dragon Tiger ═══════════ */
.dt-table {
  border-color: rgba(255, 77, 109, 0.4) rgba(77, 130, 255, 0.4) rgba(245, 197, 24, 0.35) rgba(245, 197, 24, 0.35);
}
.dt-label { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.5px; }
.dt-label-dragon { color: #ff8096; text-shadow: 0 0 12px rgba(255, 77, 109, 0.5); }
.dt-label-tiger { color: #8fb4ff; text-shadow: 0 0 12px rgba(77, 130, 255, 0.5); }
.dt-vs {
  align-self: center;
  font-size: 1.6rem;
  padding: 0 10px;
  opacity: 0.9;
  filter: drop-shadow(0 0 8px rgba(245, 197, 24, 0.5));
}
.dt-b {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #241d4d, #151033);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dt-b:hover:not(.active) {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  border-color: rgba(245, 197, 24, 0.6);
}
.dt-b b { color: #ffd700; font-size: 0.85rem; }
.dt-b.dt-dragon { background: linear-gradient(135deg, #c41e3a, #7a0f22); }
.dt-b.dt-tiger { background: linear-gradient(135deg, #1e5fb4, #123a75); }
.dt-b.dt-tie { background: linear-gradient(135deg, #0d8a5f, #06503a); }
.dt-b.active {
  border-color: #ffd700 !important;
  box-shadow: 0 0 0 2px #ffd700, 0 0 20px rgba(255, 215, 0, 0.45);
  transform: translateY(-2px);
}
.dt-deal {
  min-width: 230px;
  font-size: 1rem !important;
  background: linear-gradient(135deg, #ffd700, #b8860b) !important;
  color: #1a1200 !important;
  box-shadow: 0 6px 22px rgba(245, 197, 24, 0.4);
}
.dt-deal:hover:not(:disabled) {
  box-shadow: 0 10px 30px rgba(245, 197, 24, 0.6);
}
.dt-deal:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ═══════════ Video Poker ═══════════ */
.vp-wrap {
  max-width: 620px;
  margin: 14px auto 6px;
}
.vp-pt {
  border-radius: 16px;
  padding: 10px 12px 12px;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 197, 24, 0.14), transparent 65%),
    linear-gradient(165deg, #171d36, #0f1428);
  border: 1px solid rgba(245, 197, 24, 0.28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
.vp-pt-title {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(245, 197, 24, 0.5);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.vp-pt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.vp-pt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.72rem;
  color: #c9d4e8;
}
.vp-pt-row b {
  color: #ffd700;
  font-size: 0.78rem;
  white-space: nowrap;
}
.vp-pt-row:first-child {
  background: rgba(245, 197, 24, 0.12);
  border-color: rgba(245, 197, 24, 0.45);
}
.vp-pt-row:first-child span { color: #ffe9a0; font-weight: 800; }
.vp-hand {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-height: 128px;
  align-items: center;
  margin: 8px 0 6px;
}
.vp-card {
  position: relative;
  width: 74px;
  height: 106px;
  border-radius: 11px;
  background: transparent;
  border: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
  color: #1a1a24;
  cursor: pointer;
  display: block;
  padding: 0;
  line-height: 1;
  user-select: none;
  overflow: hidden;
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease);
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  animation: vpAppear 0.4s var(--ease) forwards;
}
.vp-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  pointer-events: none;
}
.vp-card:hover:not(.held) {
  transform: translateY(-5px);
}
.vp-card.held {
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(245, 197, 24, 0.5);
  transform: translateY(-8px);
}
.vp-hold {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #1a1200;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  box-shadow: 0 3px 10px rgba(245, 197, 24, 0.55);
  pointer-events: none;
}
.vp-card.held .vp-hold {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
@keyframes vpAppear {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.vp-hint {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(201, 212, 232, 0.65);
  margin: 4px 0 8px;
}
.vp-deal {
  background: linear-gradient(135deg, #ffd700, #b8860b) !important;
  color: #1a1200 !important;
  box-shadow: 0 6px 22px rgba(245, 197, 24, 0.4);
}
.vp-draw {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #fff !important;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.35);
}
.vp-draw:disabled, .vp-deal:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
/* ═══ Scratch Card — Diamond Mine ═══ */
.sc-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px;
}
.sc-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: #c9d4e8;
  letter-spacing: 0.3px;
}
.sc-counter b { color: var(--gold); font-size: 0.95rem; }
.sc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 330px;
}
.sCell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 2px solid rgba(245, 197, 24, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), inset 0 0 18px rgba(245, 197, 24, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.sCell:hover:not(.revealed) {
  transform: translateY(-4px);
  border-color: rgba(245, 197, 24, 0.8);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55), 0 0 18px rgba(245, 197, 24, 0.25);
}
.sCell .s-tile {
  opacity: 0.9;
  transition: transform 0.2s var(--ease);
}
.sCell.revealed { cursor: default; }
.sCell.revealed .s-tile { animation: sFlip 0.35s var(--ease); }
.sCell.s-safe {
  border-color: rgba(16, 185, 129, 0.65);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.05));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 14px rgba(16, 185, 129, 0.18);
}
.sCell.s-boom {
  border-color: rgba(239, 68, 68, 0.9);
  background: radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.45), rgba(239, 68, 68, 0.08) 70%);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
  animation: sShake 0.45s var(--ease);
}
.sCell.s-won {
  border-color: rgba(245, 197, 24, 0.9);
  background: linear-gradient(160deg, rgba(245, 197, 24, 0.22), rgba(245, 197, 24, 0.06));
  box-shadow: 0 0 24px rgba(245, 197, 24, 0.45);
}
@keyframes sFlip {
  0% { transform: rotateY(90deg) scale(0.7); opacity: 0; }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}
@keyframes sShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.sc-hint {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(201, 212, 232, 0.65);
}
.sc-start {
  background: linear-gradient(135deg, #ffd700, #b8860b) !important;
  color: #1a1200 !important;
  box-shadow: 0 6px 22px rgba(245, 197, 24, 0.4);
}
.sc-start:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Mines ── */
.mn-wrap {
  max-width: 520px;
  margin: 0 auto;
}
.mn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.mn-counter {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.12), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: 12px;
  padding: 8px 16px;
}
.mn-counter b {
  color: #fff;
  font-size: 1.2rem;
}
.mn-mult {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  padding: 8px 18px;
  text-shadow: 0 0 14px rgba(16, 185, 129, 0.5);
  min-width: 96px;
  text-align: center;
}
.mn-hint {
  text-align: center;
  color: var(--t2);
  font-size: 0.82rem;
  margin: 10px 0 4px;
}
.mGrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-width: 470px;
  margin: 12px auto;
  padding: 14px;
  background: linear-gradient(160deg, rgba(245, 197, 24, 0.06), rgba(15, 20, 40, 0.55));
  border: 1px solid rgba(245, 197, 24, 0.15);
  border-radius: 16px;
}
.mCell {
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(145deg, #1a2340, #0f162e);
  border: 2px solid rgba(245, 197, 24, 0.28);
  cursor: pointer;
  position: relative;
  transition: all 0.18s var(--ease);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.mCell:hover:not(.safe):not(.boom) {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 6px 16px rgba(245, 197, 24, 0.28);
}
.mCover {
  color: var(--t3);
  font-size: 1.1rem;
}
.mCell.safe {
  background: linear-gradient(145deg, #0e3d2c, #092b1e);
  border-color: var(--green);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
  animation: mnPop 0.3s var(--ease);
  cursor: default;
}
.mSafe {
  font-size: 1.35rem;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.7));
}
.mCell.boom {
  background: linear-gradient(145deg, #5a1220, #3a0b14);
  border-color: #ff4860;
  box-shadow: 0 0 18px rgba(255, 72, 96, 0.55);
  animation: mnShake 0.45s var(--ease);
  cursor: default;
}
.mMine {
  font-size: 1.35rem;
  filter: drop-shadow(0 0 6px rgba(255, 72, 96, 0.8));
}
@keyframes mnPop {
  50% { transform: scale(1.22); }
}
@keyframes mnShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.mn-cash {
  background: linear-gradient(135deg, #10B981, #34D399);
  color: #06281c;
  font-weight: 800;
}
.mn-cash:hover:not(:disabled) {
  filter: brightness(1.15);
  transform: translateY(-2px);
}
.mn-cash:disabled {
  opacity: 0.5;
}
/* ── Plinko ── */
.pl-wrap {
  position: relative;
  background: linear-gradient(180deg, #0a0e1a, #121830);
  border: 2px solid rgba(245, 197, 24, 0.28);
  border-radius: 14px;
  padding: 8px;
  margin: 10px 0 6px;
  box-shadow: 0 0 24px rgba(245, 197, 24, 0.08), inset 0 0 30px rgba(0, 0, 0, 0.45);
}
/* ═══════════════════════════════════════
   Dice — نرد فاخر
   ═══════════════════════════════════════ */
.dc-hint {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.82rem;
  text-align: center;
}
.dc-wrap {
  background: linear-gradient(180deg, #0d1026, #141a38);
  border: 2px solid rgba(245, 197, 24, 0.28);
  border-radius: 14px;
  padding: 14px 10px 16px;
  margin: 8px 0 6px;
  box-shadow: 0 0 24px rgba(245, 197, 24, 0.08), inset 0 0 30px rgba(0, 0, 0, 0.45);
}
.dc-num {
  text-align: center;
  margin-top: 4px;
}
.dc-num span {
  font-size: 2.6rem;
  font-weight: 900;
  font-family: 'Cairo', sans-serif;
  color: #ffe9a8;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 22px rgba(245, 197, 24, 0.4);
}
.dc-num b {
  margin-inline-start: 10px;
  font-size: 1.4rem;
}
.dc-target {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 10px 0 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}
.dc-target .ctext {
  white-space: nowrap;
  color: var(--txt2);
}
.dc-target input[type=range] {
  flex: 1;
  accent-color: #ffd700;
}
.dc-target b {
  color: #ffd700;
  font-size: 1.15rem;
  min-width: 32px;
  text-align: center;
}
.dc-mult {
  text-align: center;
  font-size: 0.95rem;
  color: var(--txt2);
  margin: 2px 0 8px;
}
.dc-mult b {
  color: #ffd700;
  font-weight: 900;
  font-size: 1.2rem;
}
.dc-bets {
  gap: 10px;
}
.dc-bets .rb {
  flex: 1;
  min-width: 0;
  padding: 12px 10px !important;
  border-radius: 12px !important;
  font-size: 0.85rem !important;
  border: 2px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.dc-bets .rb:hover:not(.active) {
  transform: translateY(-2px);
  border-color: rgba(245, 197, 24, 0.6) !important;
}
.dc-bets .dc-under { background: linear-gradient(135deg, #1a6cf6, #0f3d9e); }
.dc-bets .dc-above { background: linear-gradient(135deg, #c41e3a, #7a0f22); }
.dc-bets .rb.active {
  border-color: #ffd700 !important;
  box-shadow: 0 0 0 2px #ffd700, 0 0 20px rgba(255, 215, 0, 0.45);
  transform: translateY(-2px);
}
.dc-roll {
  min-width: 230px;
  font-size: 1rem !important;
  background: linear-gradient(135deg, #ffd700, #b8860b) !important;
  color: #1a1200 !important;
  box-shadow: 0 6px 22px rgba(245, 197, 24, 0.4);
}
.dc-roll:hover:not(:disabled) {
  box-shadow: 0 10px 30px rgba(245, 197, 24, 0.6);
}
.dc-roll:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* ═══════════════════════════════════════
   Wheel of Fortune — عجلة الحظ الفاخرة
   ═══════════════════════════════════════ */
.wf-wrap {
  max-width: 360px;
  margin: 6px auto 0;
}
.wf-hint {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.82rem;
  text-align: center;
}
.wf-holder {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.wf-holder canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
}
.wf-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 26px solid #F5C518;
  z-index: 10;
  filter: drop-shadow(0 0 8px rgba(245, 197, 24, 0.9));
  animation: wfPointerGlow 1.6s ease-in-out infinite;
}
@keyframes wfPointerGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(245, 197, 24, 0.7)); }
  50% { filter: drop-shadow(0 0 14px rgba(245, 197, 24, 1)); }
}
#wSpin.big:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* ═══════════ Hi-Lo Cards ═══════════ */
.hl-hint {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.82rem;
  text-align: center;
}
.hl-table {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 14px 0 10px;
}
.hl-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hl-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt2);
}
.hl-card {
  position: relative;
  width: 96px;
  height: 136px;
  border-radius: 12px;
  background: transparent;
  border: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  display: block;
  overflow: hidden;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.hl-card .hl-img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.hl-cur::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  border: 1px solid rgba(245, 197, 24, 0.35);
  pointer-events: none;
  animation: hlPulseRing 1.8s ease-in-out infinite;
}
@keyframes hlPulseRing {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
.hl-vs {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #F5C518;
  text-shadow: 0 0 10px rgba(245, 197, 24, 0.8);
}
.hl-flip {
  animation: hlFlip 0.45s var(--ease);
}
@keyframes hlFlip {
  0% { transform: rotateY(90deg) scale(0.85); opacity: 0.4; }
  60% { transform: rotateY(-8deg) scale(1.03); opacity: 1; }
  100% { transform: rotateY(0deg) scale(1); }
}
#hHigh:disabled, #hLow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* ═══════════ Wingo Colors ═══════════ */
.wg-hint {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--txt2);
  font-size: 0.82rem;
  text-align: center;
}
.wg-ball {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  margin: 16px auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 30%, #3a3f5c, #1b1e33 75%);
  border: 3px solid rgba(245, 197, 24, 0.55);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), inset 0 -10px 24px rgba(0, 0, 0, 0.55);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.wg-ball-face {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--txt2);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.6);
}
.wg-ball[data-c="red"] {
  background: radial-gradient(circle at 32% 30%, #ff8a80, #e53935 65%, #b71c1c);
  border-color: #ff6b6b;
}
.wg-ball[data-c="green"] {
  background: radial-gradient(circle at 32% 30%, #81c784, #43a047 65%, #1b5e20);
  border-color: #66bb6a;
}
.wg-ball[data-c="blue"] {
  background: radial-gradient(circle at 32% 30%, #90caf9, #1e88e5 65%, #0d47a1);
  border-color: #64b5f6;
}
.wg-ball.win {
  box-shadow: 0 0 0 5px rgba(245, 197, 24, 0.25), 0 0 34px rgba(245, 197, 24, 0.75);
}
.wg-ball.lose {
  box-shadow: 0 0 0 5px rgba(244, 67, 54, 0.18), 0 0 26px rgba(244, 67, 54, 0.45);
}
.wg-ball.shuffle {
  animation: wgPulse 0.28s ease-in-out infinite alternate;
}
@keyframes wgPulse {
  from { transform: scale(1); }
  to { transform: scale(0.94); }
}
.wg-picks {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 10px;
  flex-wrap: wrap;
}
.wg-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg3);
  border: 2px solid var(--bd);
  cursor: pointer;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.wg-pick:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 197, 24, 0.6);
}
.wg-pick.sel {
  border-color: #F5C518;
  box-shadow: 0 0 16px rgba(245, 197, 24, 0.45);
  transform: translateY(-2px);
}
.wg-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
}
.wg-dot.red { background: radial-gradient(circle at 32% 30%, #ff8a80, #e53935 65%, #b71c1c); }
.wg-dot.green { background: radial-gradient(circle at 32% 30%, #81c784, #43a047 65%, #1b5e20); }
.wg-dot.blue { background: radial-gradient(circle at 32% 30%, #90caf9, #1e88e5 65%, #0d47a1); }
.wg-lab {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--txt2);
}
#wDraw:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* ═══════════ اللعب الجماعي (كينو/كراش) — لوحة الجولة ═══════════ */
#gpanel { margin-bottom: 14px; }
.gpanel {
  background: linear-gradient(145deg, rgba(21, 27, 46, 0.92), rgba(15, 21, 36, 0.92));
  border: 1px solid var(--bd2);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.ghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.gchip.betting { background: rgba(16, 185, 129, 0.16); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.4); }
.gchip.drawing { background: rgba(124, 58, 237, 0.16); color: #A78BFA; border: 1px solid rgba(124, 58, 237, 0.4); }
.gchip.flying  { background: rgba(245, 197, 24, 0.16); color: #F5C518; border: 1px solid rgba(245, 197, 24, 0.4); }
.gchip.finished{ background: rgba(100, 116, 139, 0.18); color: #94A3B8; border: 1px solid rgba(100, 116, 139, 0.4); }
.gcount {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--t1);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 3px 12px;
  min-width: 64px;
  text-align: center;
}
.gmeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.gseed {
  font-size: 0.78rem;
  color: var(--t2);
  font-family: 'Consolas', 'Courier New', monospace;
}
.gseed b { color: var(--t1); font-weight: 600; }
.gverify {
  background: linear-gradient(135deg, #7C3AED, #A78BFA);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.gverify:hover { transform: translateY(-1px); box-shadow: 0 0 14px rgba(124, 58, 237, 0.4); }
.gmy {
  font-size: 0.8rem;
  color: var(--t2);
  background: rgba(245, 197, 24, 0.08);
  border: 1px solid rgba(245, 197, 24, 0.25);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  display: inline-block;
  align-self: flex-start;
}
.gfeed {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}
.gfeed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--t2);
  padding: 2px 4px;
  border-radius: 6px;
}
.gfeed-item.me { background: rgba(245, 197, 24, 0.1); color: #FDE68A; }
.gwho { font-weight: 700; color: var(--t1); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gact { font-family: 'Consolas', 'Courier New', monospace; font-size: 0.78rem; }
.gwin { color: #34D399; font-weight: 700; }
.gfeed-empty { font-size: 0.8rem; color: var(--t3); text-align: center; padding: 6px 0; }
.gresult {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FDE68A;
  background: rgba(245, 197, 24, 0.07);
  border: 1px solid rgba(245, 197, 24, 0.2);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
}

/* ── مودال التحقق من العدالة ── */
.gv-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(5, 8, 18, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gv-box {
  width: min(560px, 94vw);
  max-height: 82vh;
  overflow-y: auto;
  background: linear-gradient(145deg, #151B2E, #0F1524);
  border: 1px solid var(--bd2);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
}
.gv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--t1);
  margin-bottom: 4px;
}
.gv-game {
  font-family: 'Consolas', monospace;
  font-size: 0.75rem;
  background: rgba(124, 58, 237, 0.2);
  color: #A78BFA;
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 8px;
}
.gv-close {
  background: none;
  border: 1px solid var(--bd2);
  color: var(--t2);
  border-radius: var(--radius-sm);
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
  cursor: pointer;
}
.gv-close:hover { color: #fff; border-color: var(--bd2); background: rgba(255, 255, 255, 0.06); }
.gv-sub { font-size: 0.82rem; color: var(--t3); margin-bottom: 10px; }
.gv-list { display: flex; flex-direction: column; gap: 8px; }
.gv-row {
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.18);
}
.gv-top { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--t1); flex-wrap: wrap; }
.gv-out { font-size: 0.8rem; color: var(--t2); margin-top: 3px; font-family: 'Consolas', monospace; word-break: break-all; }
.gv-pass { color: #34D399; font-weight: 800; }
.gv-fail { color: #F87171; font-weight: 800; }

/* إبقاء الأزرار الرئيسية متسقة عند التعطيل */
.ke-draw:disabled, #cStart:disabled, #cCash:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

/* ═══════════ تحسينات: رموز بكرات FA، كرة روليت، أيقونات أزرار ═══════════ */
/* رموز البكرات — كل رمز بلون متباين على الخلفية الداكنة */
.sl-sym {
  font-style: normal;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}
.sl-seven {
  color: var(--gold);
  font-family: 'Orbitron', 'Cairo', sans-serif;
  font-weight: 800;
  text-shadow: 0 0 14px rgba(245, 197, 24, 0.7);
}
.sl-cherry { color: #ff4d6d; }
.sl-lemon { color: #facc15; }
.sl-bell { color: #e2e8f0; }
.sl-gem { color: #38bdf8; }
.sl-star { color: #ffd23f; }
.sl-crown { color: #f5c518; }
.sl-rocket { color: #fb923c; }
/* هبوط البكرة — ارتداد خفيف عند التوقف */
.reel.land {
  animation: reelLand 0.5s var(--ease);
}
@keyframes reelLand {
  30% { transform: scale(1.12); }
  65% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
/* رمز النتيجة في البكرات بحجم أكبر */
.sl-status .sl-sym {
  font-size: 1.35rem;
}
/* أيقونة العملات في سطر النتيجة */
#gamePageBody .res i.fa-coins {
  color: var(--gold);
  font-size: 0.85em;
  vertical-align: -0.06em;
}
/* أيقونات Font Awesome داخل أزرار الألعاب — محاذاة عمودية */
#gamePageBody button i.fa-solid {
  margin-inline-end: 6px;
  font-size: 0.9em;
  vertical-align: -0.08em;
}
/* دوائر رهانات الروليت */
.rl-dot {
  font-size: 0.72em;
  vertical-align: -0.05em;
}
.rl-dot.red { color: #e5484d; }
.rl-dot.green { color: #10b981; }
.rl-dot.black {
  color: #151515;
  text-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.7);
}

/* ═══════════ Perfect Fullscreen Scaling for Mobile & Desktop ═══════════ */
#pg-game:fullscreen,
#pg-game:-webkit-full-screen {
  background: var(--bg, #070B12);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  padding: calc(10px + env(safe-area-inset-top, 0px)) calc(12px + env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

#pg-game:fullscreen #gamePageBody,
#pg-game:-webkit-full-screen #gamePageBody {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
}

/* Responsively constrain all game stages so they never overflow vertically or horizontally */
#gamePageBody .stage,
#gamePageBody .bjt,
#gamePageBody .ronda-stage,
#gamePageBody .rl-stage,
#gamePageBody .mn-wrap,
#gamePageBody .pl-wrap,
#gamePageBody .rami-game,
#gamePageBody .crash-3d-container,
#gamePageBody canvas {
  max-width: 100% !important;
  box-sizing: border-box;
}

@media (max-height: 600px) {
  #pg-game:fullscreen .gp-head,
  #pg-game:-webkit-full-screen .gp-head {
    padding: 4px 8px;
    margin-bottom: 8px;
  }
  #gamePageBody canvas {
    max-height: 55vh !important;
  }
  /* [L2-fix] استثناء كانفس البلياردو: كانفسه absolute inset:0 داخل .bl-stage
     (ملء الشاشة v12c) — قاعدة 55vh كانت تقصّه إلى 198px وسط علبة 318px
     (قياس لاندسكيب 800×360) فيبقى 120px أسفل الطاولة ميتاً.
     كانفس البلياردو يُدار حصراً من blFitCanvas — لا يحتاج هذا القيد. */
  #gamePageBody #billiardsStage canvas,
  #gamePageBody .bl-stage canvas {
    max-height: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   LANDSCAPE FIX — Chess / Mines / Plinko / Dice  (CSS-only)
   Each game's .stage becomes a full-height 2-column grid:
     • left  = the playfield wrapper (board / grid / canvas / dice),
       spanning the full stage height;
     • right = the controls + stats that were stacked vertically in
       portrait, now auto-flowing into a side panel.
   This makes the stage's NATURAL aspect ratio wide (~viewport), so
   fitGameStage() scales it UP to fill the landscape screen instead of
   shrinking the portrait .stage into a tiny centred column.
   Portrait/base rules above are NOT modified.
   ════════════════════════════════════════════════════════════════ */
@media (orientation: landscape) {
  /* The .stage is pinned to the full-screen game page (RTL document, so the
     first grid column renders on the RIGHT). We therefore put the controls in
     column 1 (right) and the playfield in column 2 (left). The stage uses
     position:absolute;inset:0 so its natural box is exactly the viewport —
     fitGameStage() then scales it 1:1 to fill. */
  #pg-game.app-fs .stage:has(.ch-wrap),
  #pg-game.app-fs .stage:has(.mn-wrap),
  #pg-game.app-fs .stage:has(.pl-wrap),
  #pg-game.app-fs .stage:has(.sb-wrap),
  #pg-game.app-fs .stage:has(.dc-wrap) {
    position: absolute;
    inset: 0;
    margin: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
    gap: 12px;
    padding: 8px;
    overflow: hidden;
  }
  /* Explicit row tracks (NOT grid-auto-rows) so the playfield's
     grid-row:1/-1 spans every control row. In CSS Grid, -1 is the last
     EXPLICIT line, so implicit auto-rows would leave the playfield stuck in
     row 1. The control counts below are measured per game. */
  #pg-game.app-fs .stage:has(.ch-wrap) { grid-template-rows: minmax(0, 1fr); }
  #pg-game.app-fs .stage:has(.mn-wrap) { grid-template-rows: repeat(3, minmax(0, 1fr)); }
  #pg-game.app-fs .stage:has(.pl-wrap) { grid-template-rows: repeat(5, minmax(0, 1fr)); }
  #pg-game.app-fs .stage:has(.sb-wrap) { grid-template-rows: repeat(7, minmax(0, 1fr)); }
  #pg-game.app-fs .stage:has(.dc-wrap) { grid-template-rows: repeat(7, minmax(0, 1fr)); gap: 6px; }
  /* playfield wrapper: left column, full height */
  #pg-game.app-fs .stage:has(.ch-wrap) > .ch-wrap,
  #pg-game.app-fs .stage:has(.mn-wrap) > .mn-wrap,
  #pg-game.app-fs .stage:has(.pl-wrap) > .pl-wrap,
  #pg-game.app-fs .stage:has(.sb-wrap) > .sb-wrap,
  #pg-game.app-fs .stage:has(.dc-wrap) > .dc-wrap {
    grid-column: 2;
    grid-row: 1 / -1;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
  }
  /* Chess: .dama-play lays out its own board+controls 2-column grid, so let
     .ch-wrap span the full stage width instead of the reserved side column. */
  #pg-game.app-fs .stage:has(.ch-wrap) > .ch-wrap { grid-column: 1 / -1; }
  /* controls / stats: right column, each in its own row, compact at the top */
  #pg-game.app-fs .stage:has(.mn-wrap) > .bets,
  #pg-game.app-fs .stage:has(.mn-wrap) > .res,
  #pg-game.app-fs .stage:has(.pl-wrap) > .bets,
  #pg-game.app-fs .stage:has(.pl-wrap) > .mn-hint,
  #pg-game.app-fs .stage:has(.pl-wrap) > .res,
  #pg-game.app-fs .stage:has(.sb-wrap) > .bets,
  #pg-game.app-fs .stage:has(.sb-wrap) > .res,
  #pg-game.app-fs .stage:has(.dc-wrap) > .dc-hint,
  #pg-game.app-fs .stage:has(.dc-wrap) > .dc-target,
  #pg-game.app-fs .stage:has(.dc-wrap) > .dc-mult,
  #pg-game.app-fs .stage:has(.dc-wrap) > .bets,
  #pg-game.app-fs .stage:has(.dc-wrap) > .res,
  #pg-game.app-fs .stage:has(.ch-wrap) > .res {
    grid-column: 1;
    align-self: start;
    width: 100%;
  }

  /* ── Mines: the 5×5 grid fills the left column height ── */
  .mn-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100%;
    min-height: 0;
    max-width: none;
    margin: 0;
  }
  .mn-wrap .mGrid {
    flex: 1 1 auto;
    min-height: 0;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    margin: 0;
  }

  /* ── Plinko: the peg triangle (canvas) fills the left column height, centred ── */
  .pl-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 0;
    margin: 0;
  }
  /* Override the base "#gamePageBody canvas { max-height: 55vh !important }"
     (inside @media (max-height:600px)) that would otherwise cap the Plinko
     canvas at 55vh in short landscape viewports. */
  #gamePageBody .pl-wrap canvas.game {
    display: block !important;
    width: auto !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    aspect-ratio: 4 / 5 !important;
  }

  /* ── Dice: Sic Bo (.sb-wrap) and Dice (.dc-wrap) dice centred, fill height ── */
  .sb-wrap,
  .dc-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 100%;
    min-height: 0;
    margin: 0;
  }
  .sb-wrap .sb-dice,
  .dc-wrap .sb-dice { margin: 0; }
  .sb-die { width: clamp(64px, 16vh, 96px); height: clamp(64px, 16vh, 96px); }

  /* Dice has 7 controls in a short landscape viewport: compress them so each
     fits its 1fr row instead of overlapping the next control. */
  #pg-game.app-fs .stage:has(.dc-wrap) > .dc-hint,
  #pg-game.app-fs .stage:has(.dc-wrap) > .dc-target,
  #pg-game.app-fs .stage:has(.dc-wrap) > .dc-mult,
  #pg-game.app-fs .stage:has(.dc-wrap) > .bets,
  #pg-game.app-fs .stage:has(.dc-wrap) > .res {
    margin: 0 !important;
    min-height: 0;
  }
  #pg-game.app-fs .stage:has(.dc-wrap) > .bets .rb {
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
  }
  #pg-game.app-fs .stage:has(.dc-wrap) > .bets .dc-roll {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    min-width: 0 !important;
  }
  #pg-game.app-fs .stage:has(.dc-wrap) > .bets .bbtn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.82rem !important;
  }
  #pg-game.app-fs .stage:has(.dc-wrap) > .dc-target,
  #pg-game.app-fs .stage:has(.dc-wrap) > .dc-hint {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   [Fill] ملء الحاويات في ملء الشاشة — بورتريه ولاندسكيب
   تحسين بصري/تخطيطي فقط: يجعل حاوية اللعبة الرئيسية لكل لعبة
   كلاسيكية تتمدد لتملأ ارتفاع .stage المتاح (flex-grow) ويكبّر
   عناصرها الداخلية (بطاقات/خطوط) بنسب clamp — صفر تغيير في منطق
   اللعب أو الرهان أو النتائج. القواعد مقيدة بـ app-fs كي لا تمس
   التخطيط الأساسي خارج ملء الشاشة، ولا تلمس ألعاب المكتسبات.
   ═══════════════════════════════════════════════════════════════ */
@media (orientation: portrait) {
  /* الحاوية الرئيسية لكل لعبة كلاسيكية تتمدد لتملأ الفراغ المتبقي.
     shrink:0 ضروري — بدونه تنضغط الحاوية لصفر عندما يفيض الأشقاء */
  #pg-game.app-fs #gamePageBody .stage:has(.hl-table) > .hl-table,
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) > div:first-of-type,
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) > .rps-arena,
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) > .pn-arena,
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) > .wg-ball {
    flex: 1 1 auto;
    flex-shrink: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.hl-table),
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d),
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena),
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena),
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) {
    flex: 1 1 auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
  }
  #pg-game.app-fs .stage .hl-table {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 6vw, 40px);
    margin: 14px 0 10px;
  }
  #pg-game.app-fs .stage .hl-side {
    gap: 10px;
  }
  #pg-game.app-fs .stage .hl-tag {
    font-size: clamp(0.72rem, 1.6vh, 0.95rem);
  }
  #pg-game.app-fs .stage .hl-card {
    width: clamp(96px, 30vw, 150px);
    height: clamp(136px, 42vw, 212px);
  }
  #pg-game.app-fs .stage .hl-vs {
    font-size: clamp(1.05rem, 2.2vh, 1.5rem);
  }
  /* ── Coin Flip: العملة تتمدد (مربع clamp) داخل حاجتها ── */
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) > div:first-of-type {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  #pg-game.app-fs .stage .coin3d {
    width: clamp(132px, 38vw, 220px);
    height: clamp(132px, 38vw, 220px);
  }
  /* ── RPS: بطاقات أكبر مع الحفاظ على بنية الصف ── */
  #pg-game.app-fs .stage .rps-arena {
    gap: clamp(14px, 5vw, 30px);
  }
  #pg-game.app-fs .stage .rps-side {
    gap: clamp(6px, 1.2vh, 12px);
  }
  #pg-game.app-fs .stage .rps-card {
    width: clamp(96px, 30vw, 150px);
    height: clamp(118px, 37vw, 185px);
    border-radius: 18px;
  }
  #pg-game.app-fs .stage .rps-card-face {
    font-size: clamp(3.1rem, 8vw, 4.6rem);
  }
  #pg-game.app-fs .stage .rps-side-tag {
    font-size: clamp(0.8rem, 1.7vh, 1rem);
    padding: 4px 14px;
  }
  #pg-game.app-fs .stage .rps-picks .rpsBtn {
    min-width: clamp(86px, 26vw, 130px);
    padding: clamp(12px, 2.6vh, 20px) 10px clamp(9px, 2vh, 16px);
  }
  #pg-game.app-fs .stage .rps-emoji {
    font-size: clamp(2.5rem, 6.5vw, 3.8rem);
  }
  /* ── Penalty: المرمى أكبر مع الحفاظ على نسق الحارس/الكرة ── */
  #pg-game.app-fs .stage .pn-arena {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #pg-game.app-fs .stage .pn-arena .goal {
    width: clamp(260px, 82vw, 380px);
    height: clamp(140px, 33vh, 210px);
  }
  #pg-game.app-fs .stage .goal .keeper {
    font-size: clamp(2.6rem, 6.5vh, 4rem);
  }
  #pg-game.app-fs .stage .goal .pball2 {
    font-size: clamp(1.6rem, 4vh, 2.4rem);
  }
  /* ── Wingo: كرة أكبر في المنتصف ── */
  #pg-game.app-fs .stage .wg-ball {
    width: clamp(118px, 36vw, 210px);
    height: clamp(118px, 36vw, 210px);
  }
  #pg-game.app-fs .stage .wg-ball-face {
    font-size: clamp(2.6rem, 7vw, 4.4rem);
  }
}
/* ── لاندسكيب: نفس التمدد مع أحجام أفقية معتدلة ── */
@media (orientation: landscape) {
  #pg-game.app-fs #gamePageBody .stage:has(.hl-table) > .hl-table,
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) > .rps-arena,
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) > .pn-arena,
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) > .wg-ball,
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) > div:first-of-type {
    flex: 1 1 auto;
    flex-shrink: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.hl-table),
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena),
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena),
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball),
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) {
    flex: 1 1 auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
  }
  #pg-game.app-fs .stage .hl-table {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 5vw, 40px);
    margin: 8px 0 6px;
  }
  #pg-game.app-fs .stage .hl-card {
    width: clamp(86px, 15vw, 130px);
    height: clamp(120px, 21vw, 184px);
  }
  #pg-game.app-fs .stage .coin3d {
    width: clamp(100px, 16vw, 160px);
    height: clamp(100px, 16vw, 160px);
  }
  #pg-game.app-fs .stage .rps-arena {
    gap: clamp(12px, 4vw, 26px);
  }
  #pg-game.app-fs .stage .rps-card {
    width: clamp(84px, 14vw, 130px);
    height: clamp(104px, 17vw, 160px);
  }
  #pg-game.app-fs .stage .rps-card-face {
    font-size: clamp(2.6rem, 6vw, 4rem);
  }
  #pg-game.app-fs .stage .pn-arena .goal {
    width: clamp(220px, 36vw, 340px);
    height: clamp(120px, 26vh, 190px);
  }
  #pg-game.app-fs .stage .goal .keeper {
    font-size: clamp(2.2rem, 6vh, 3.4rem);
  }
  #pg-game.app-fs .stage .goal .pball2 {
    font-size: clamp(1.4rem, 3.4vh, 2.1rem);
  }
  #pg-game.app-fs .stage .wg-ball {
    width: clamp(100px, 15vw, 170px);
    height: clamp(100px, 15vw, 170px);
  }
  #pg-game.app-fs .stage .wg-ball-face {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
  }
}

/* ════════════════════════════════════════════════════════════════
   [Fill-2] ملء الحاويات المتبقية في ملء الشاشة (بورتريه أولاً)
   نفس نهج [Fill]: تمدد الحاوية الرئيسية (flex:1) وتكبير العناصر
   المركزية بـ clamp — دون أي مساس بمنطق اللعب أو التفاعل.
   ════════════════════════════════════════════════════════════════ */
#pg-game.app-fs .stage:has(.l7-arena),
#pg-game.app-fs .stage:has(.sb-wrap),
#pg-game.app-fs .stage:has(.dc-wrap),
#pg-game.app-fs .stage:has(.bc-table),
#pg-game.app-fs .stage:has(.ab-joker-box),
#pg-game.app-fs .stage:has(.cf-wrap),
#pg-game.app-fs .stage:has(.sl-wrap) {
  display: flex;
  flex-direction: column;
}
#pg-game.app-fs .stage:has(.l7-arena) > .l7-arena,
#pg-game.app-fs .stage:has(.sb-wrap) > .sb-wrap,
#pg-game.app-fs .stage:has(.dc-wrap) > .dc-wrap,
#pg-game.app-fs .stage:has(.bc-table) > .bc-table,
#pg-game.app-fs .stage:has(.ab-joker-box) > .ab-joker-box,
#pg-game.app-fs .stage:has(.cf-wrap) > .cf-wrap,
#pg-game.app-fs .stage:has(.sl-wrap) > .sl-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

/* Lucky7: كرة أكبر تملأ المسرح */
#pg-game.app-fs .stage .l7-ball { font-size: clamp(4.5rem, 17vh, 8.5rem); }
#pg-game.app-fs .stage .l7-slot { max-width: min(420px, 92%); }
#pg-game.app-fs .stage .l7-result { font-size: clamp(1rem, 3vh, 1.5rem); }

/* SicBo: نرد أكبر */
#pg-game.app-fs .stage .sb-die { width: clamp(96px, 17vh, 150px); height: clamp(96px, 17vh, 150px); }
#pg-game.app-fs .stage .sb-die .pip,
#pg-game.app-fs .stage .sb-face { font-size: clamp(2.4rem, 7vh, 4.2rem); }
#pg-game.app-fs .stage .sb-total { font-size: clamp(1.2rem, 4vh, 2rem); }

/* Dragon Tiger / Baccarat: بطاقات أكبر */
#pg-game.app-fs .stage .dc-card,
#pg-game.app-fs .stage .bc-card { font-size: clamp(2.6rem, 9vh, 5rem); }
#pg-game.app-fs .stage .dc-cards,
#pg-game.app-fs .stage .bc-cards { min-height: clamp(120px, 22vh, 210px); }

/* Andar Bahar: صندوق الجوكر والمجموعات */
#pg-game.app-fs .stage .ab-joker-box { font-size: clamp(2.6rem, 9vh, 5rem); min-height: clamp(110px, 20vh, 190px); }
#pg-game.app-fs .stage .ab-pile { font-size: clamp(1.6rem, 5.5vh, 3rem); }

/* Coin Flip: عملة أكبر */
#pg-game.app-fs .stage .cf-coin,
#pg-game.app-fs .stage .coin3d { font-size: clamp(4rem, 15vh, 7.5rem); }
#pg-game.app-fs .stage .cf-hint { font-size: clamp(0.95rem, 2.8vh, 1.3rem); }

/* Slots: شبكة الرموز أكبر */
#pg-game.app-fs .stage .sl-grid { font-size: clamp(2rem, 8vh, 4.6rem); }
#pg-game.app-fs .stage .sl-cell { font-size: clamp(2rem, 8vh, 4.6rem); }

/* عائلة الـ Slots (نفس بنية x-grid/x-row): تكبير الرموز والبطاقات */
#pg-game.app-fs .stage .cr-grid,
#pg-game.app-fs .stage .lg-grid,
#pg-game.app-fs .stage .mj-grid,
#pg-game.app-fs .stage .mo-grid,
#pg-game.app-fs .stage .sw-grid { font-size: clamp(1.5rem, 6.5vh, 4rem); gap: clamp(4px, 1.2vh, 10px); }
#pg-game.app-fs .stage .gt-row,
#pg-game.app-fs .stage .lt-row,
#pg-game.app-fs .stage .ol-row,
#pg-game.app-fs .stage .pk-row,
#pg-game.app-fs .stage .ro-row { font-size: clamp(1.5rem, 6.5vh, 4rem); min-height: clamp(90px, 18vh, 170px); }
#pg-game.app-fs .stage .fh-sea { min-height: clamp(120px, 24vh, 230px); font-size: clamp(2rem, 8vh, 4.5rem); }

/* Crash: حاوية 3D تتمدد لتملأ المساحة الرأسية المتاحة (تتجاوز 320px الثابتة).
   onCrashResize يعيد ضبط renderer/camera تلقائياً عند تغيّر الحاوية. */
#pg-game.app-fs .stage:has(.crash-3d-container) {
  display: flex;
  flex-direction: column;
}
#pg-game.app-fs .stage .crash-3d-container {
  flex: 1 1 auto;
  min-height: 260px;
  height: auto;
  max-height: 62vh;
}
/* بورتريه الجوال: الحاوية تأخذ الحصة الكبرى من الشاشة مباشرة */
@media (orientation: portrait) {
  #pg-game.app-fs .stage .crash-3d-container { height: min(48vh, 380px); }
}

/* ════════════════════════════════════════════════════════════════
   [Fit-3] صفوف الرموز الأحادية (lottery/rose/poker/olympus/gates/fishing):
   في ملء الشاشة يتمدد الصف عمودياً وتكبر الرموز بتناسب — دون أي
   تغيير في منطق اللعب (شبكة 6 أعمدة كما هي، فقط الأحجام والمسافات).
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 300px) {
  #pg-game.app-fs .stage .lt-row,
  #pg-game.app-fs .stage .ro-row,
  #pg-game.app-fs .stage .pk-row,
  #pg-game.app-fs .stage .ol-row,
  #pg-game.app-fs .stage .gt-row {
    max-width: min(560px, 94vw);
    gap: clamp(9px, 1.8vw, 16px);
    margin: clamp(12px, 3vh, 26px) auto clamp(10px, 2.5vh, 22px);
  }
  /* رموز البطاقات داخل الصفوف: أكبر ومتناسبة مع الشاشة */
  #pg-game.app-fs .stage .lt-tick,
  #pg-game.app-fs .stage .ro-rose {
    font-size: clamp(1.7rem, 7.2vh, 3.4rem);
  }
  #pg-game.app-fs .stage .lt-tick .lt-num,
  #pg-game.app-fs .stage .ro-rose .ro-mult {
    font-size: clamp(0.8rem, 2.6vh, 1.25rem);
  }
  #pg-game.app-fs .stage .pk-card,
  #pg-game.app-fs .stage .ol-card,
  #pg-game.app-fs .stage .gt-card {
    font-size: clamp(1.7rem, 7.2vh, 3.4rem);
    min-height: clamp(90px, 17vh, 170px);
  }
  /* الصف الرئيسي يتمدد ليأخذ حصة أكبر من المسرح */
  #pg-game.app-fs .stage:has(.lt-row),
  #pg-game.app-fs .stage:has(.ro-row),
  #pg-game.app-fs .stage:has(.pk-row),
  #pg-game.app-fs .stage:has(.ol-row),
  #pg-game.app-fs .stage:has(.gt-row),
  #pg-game.app-fs .stage:has(.fh-sea) {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
  }
  #pg-game.app-fs .stage .lt-row,
  #pg-game.app-fs .stage .ro-row,
  #pg-game.app-fs .stage .pk-row,
  #pg-game.app-fs .stage .ol-row,
  #pg-game.app-fs .stage .gt-row {
    flex: 1 1 auto;
    min-height: 0;
    align-content: center;
  }
}

/* ════════════════════════════════════════════════════════════════
   [Landscape-2] توافق الوضع الأفقي — طبقة موحدة (2026-09-04)
   المشكلة المقاسة: في اللاندسكيب (800×360) ألعاب المحركات البسيطة
   تُعرض كعمود ضيق متمركز (max-width 340-560px) وسط شاشة عريضة —
   الأعمدة الخارجية 100% فراغ أسود (قياس ffmpeg quad).
   الحل: شبكة عمودين مثل LANDSCAPE FIX الموجود (3957) — لوحة اللعب
   تتمدد يساراً والتحكم ينتظم يميناً — لكل الألعاب غير المشمولة بعد.
   بورتريه لا يُمس. منطق اللعب لا يُمس (CSS فقط).
   ════════════════════════════════════════════════════════════════ */
@media (orientation: landscape) {
  /* ── عام: منع الفيض العمودي في ملء الشاشة اللاندسكيب ── */
  #pg-game.app-fs #gamePageBody .stage {
    max-height: 100%;
  }
  /* [L2-core] stage يملأ الارتفاع المتاح كاملاً: app-fs عمود flex حقيقي
     وstage تأخذ flex:1 — قبل الإصلاح كانت height الطبيعية للمحتوى فقط
     (قياس lottery: stage h=133px وسط شاشة 360px). */
  #pg-game.app-fs {
    display: flex;
    flex-direction: column;
  }
  #pg-game.app-fs #gamePageBody .stage {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0;
  }

  /* ── Coin Flip (cf): العملة والتلميح في العمود الأيسر، الرهان يميناً ──
     قبل الإصلاح: vOv=551px (شاشة 911 داخل نافذة 360) + نصف الشاشة ميت.
     ملاحظة: eCoin كان يضع width/height inline ثابتة تُبطل clamp() — أُزيلت. */
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) > .cf-wrap {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: stretch;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  #pg-game.app-fs .stage .coin3d {
    width: clamp(96px, 24vh, 170px) !important;
    height: clamp(96px, 24vh, 170px) !important;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) > .bets {
    grid-column: 2;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) > .bets:nth-of-type(2) {
    grid-row: 1;
    align-self: center;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) > .bets:first-of-type {
    grid-row: 1;
    align-self: center;
    margin-top: 8px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.coin3d) > .res {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    padding: 4px 8px;
    font-size: 0.85rem;
  }
}

/* ════════════════════════════════════════════════════════════════
   [Landscape-3] عائلة السلوتس في الوضع الأفقي — عمودان (2026-09-04)
   المقاس قبل الإصلاح: crabbin/ab cols dead% = 11/4 24/32 100 100
   (العمودان الخارجيان كلهما فراغ أسود — الشبكة 340px وسط شاشة 800px)
   النمط الموحد: لوحة الرموز يسار (تتمدد) + hint/status/زر/رهان يمين.
   يشمل: crabbin(.cr-grid) lightning(.lg-grid) mahjong(.mj-grid)
   money(.mo-grid) sweet(.sw-grid) lottery(.lt-row) rose(.ro-row)
   poker(.pk-row) olympus(.ol-row) gates(.gt-row) fishing(.fh-sea)
   slots(.sl-wrap) andarbahar(.ab-sides)
   بورتريه لا يُمس. صفر منطق لعب.
   ════════════════════════════════════════════════════════════════ */
@media (orientation: landscape) {

  /* ── النمط الموحد: stage عمودان — الرموز يساراً، التحكم يميناً ──
     RTL: العمود 1 (يمين بصرياً) = تحكم 210-300px، العمود 2 = لوحة الرموز */
  #pg-game.app-fs #gamePageBody .stage:has(.cr-grid),
  #pg-game.app-fs #gamePageBody .stage:has(.lg-grid),
  #pg-game.app-fs #gamePageBody .stage:has(.mj-grid),
  #pg-game.app-fs #gamePageBody .stage:has(.mo-grid),
  #pg-game.app-fs #gamePageBody .stage:has(.sw-grid),
  #pg-game.app-fs #gamePageBody .stage:has(.lt-row),
  #pg-game.app-fs #gamePageBody .stage:has(.ro-row),
  #pg-game.app-fs #gamePageBody .stage:has(.pk-row),
  #pg-game.app-fs #gamePageBody .stage:has(.ol-row),
  #pg-game.app-fs #gamePageBody .stage:has(.gt-row) {
    display: grid;
    grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    align-content: stretch;
    overflow: hidden;
  }

  /* لوحة الرموز: العمود الأيسر بكامل الارتفاع، متمركزة ذاتياً */
  #pg-game.app-fs .stage .cr-grid,
  #pg-game.app-fs .stage .lg-grid,
  #pg-game.app-fs .stage .mj-grid,
  #pg-game.app-fs .stage .mo-grid,
  #pg-game.app-fs .stage .sw-grid,
  #pg-game.app-fs .stage .lt-row,
  #pg-game.app-fs .stage .ro-row,
  #pg-game.app-fs .stage .pk-row,
  #pg-game.app-fs .stage .ol-row,
  #pg-game.app-fs .stage .gt-row {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    margin: 0;
    max-width: 100%;
    max-height: 100%;
  }

  /* التحكم (hint/status/الأزرار/الرهان): العمود الأيمن — hint أول،
     status ثانٍ في الصف السفلي، الأزرار والرهان تتكدس خلف hint */
  #pg-game.app-fs #gamePageBody .stage:has(.cr-grid) > .cr-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.lg-grid) > .lg-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.mj-grid) > .mj-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.mo-grid) > .mo-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.sw-grid) > .sw-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.lt-row) > .lt-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.ro-row) > .ro-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.pk-row) > .pk-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.ol-row) > .ol-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.gt-row) > .gt-hint {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    font-size: clamp(0.72rem, 2vh, 0.9rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.cr-grid) > .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.lg-grid) > .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.mj-grid) > .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.mo-grid) > .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.sw-grid) > .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.lt-row) > .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.ro-row) > .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.pk-row) > .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.ol-row) > .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.gt-row) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    padding: 0;
  }
  /* .bets الثانية (betRow): صف تحكم ثالث منفصل — لا تراكب مع الأولى */
  #pg-game.app-fs #gamePageBody .stage:has(.cr-grid) > .bets ~ .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.lg-grid) > .bets ~ .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.mj-grid) > .bets ~ .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.mo-grid) > .bets ~ .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.sw-grid) > .bets ~ .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.lt-row) > .bets ~ .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.ro-row) > .bets ~ .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.pk-row) > .bets ~ .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.ol-row) > .bets ~ .bets,
  #pg-game.app-fs #gamePageBody .stage:has(.gt-row) > .bets ~ .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin-bottom: 0;
  }
  /* زر اللعب (الأول داخل .bets الأولى) يظهر فوق betRow بلا تراكب:
     الأولى center والثانية end داخل نفس الخلية عمودياً — المسافة عبر
     margin-top سالب مضبوطة حسب ارتفاع الزر (~42px) */
  #pg-game.app-fs #gamePageBody .stage:has(.cr-grid) > .bets ~ .bets .bbtn,
  #pg-game.app-fs #gamePageBody .stage:has(.lg-grid) > .bets ~ .bets .bbtn,
  #pg-game.app-fs #gamePageBody .stage:has(.mj-grid) > .bets ~ .bets .bbtn,
  #pg-game.app-fs #gamePageBody .stage:has(.mo-grid) > .bets ~ .bets .bbtn,
  #pg-game.app-fs #gamePageBody .stage:has(.sw-grid) > .bets ~ .bets .bbtn,
  #pg-game.app-fs #gamePageBody .stage:has(.lt-row) > .bets ~ .bets .bbtn,
  #pg-game.app-fs #gamePageBody .stage:has(.ro-row) > .bets ~ .bets .bbtn,
  #pg-game.app-fs #gamePageBody .stage:has(.pk-row) > .bets ~ .bets .bbtn,
  #pg-game.app-fs #gamePageBody .stage:has(.ol-row) > .bets ~ .bets .bbtn,
  #pg-game.app-fs #gamePageBody .stage:has(.gt-row) > .bets ~ .bets .bbtn {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.cr-grid) > .bets ~ .bets .bamt,
  #pg-game.app-fs #gamePageBody .stage:has(.lg-grid) > .bets ~ .bets .bamt,
  #pg-game.app-fs #gamePageBody .stage:has(.mj-grid) > .bets ~ .bets .bamt,
  #pg-game.app-fs #gamePageBody .stage:has(.mo-grid) > .bets ~ .bets .bamt,
  #pg-game.app-fs #gamePageBody .stage:has(.sw-grid) > .bets ~ .bets .bamt,
  #pg-game.app-fs #gamePageBody .stage:has(.lt-row) > .bets ~ .bets .bamt,
  #pg-game.app-fs #gamePageBody .stage:has(.ro-row) > .bets ~ .bets .bamt,
  #pg-game.app-fs #gamePageBody .stage:has(.pk-row) > .bets ~ .bets .bamt,
  #pg-game.app-fs #gamePageBody .stage:has(.ol-row) > .bets ~ .bets .bamt,
  #pg-game.app-fs #gamePageBody .stage:has(.gt-row) > .bets ~ .bets .bamt {
    font-size: 0.8rem;
  }
  /* status النتائج: أسفل يمين (الصف الثاني) */
  #pg-game.app-fs #gamePageBody .stage:has(.cr-grid) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage:has(.lg-grid) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage:has(.mj-grid) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage:has(.mo-grid) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage:has(.sw-grid) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage:has(.lt-row) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage:has(.ro-row) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage:has(.pk-row) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage:has(.ol-row) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage:has(.gt-row) > .cr-status,
  #pg-game.app-fs #gamePageBody .stage > .res {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    font-size: clamp(0.78rem, 2.2vh, 1rem);
  }

  /* أحجام الرموز في اللاندسكيب: مرجع dvh مع حد أدنى px —
     6.5vh على ارتفاع 360 = 23px صغيرة جداً؛ الحد الأدنى يضمن وضوحها */
  #pg-game.app-fs .stage .cr-grid,
  #pg-game.app-fs .stage .lg-grid,
  #pg-game.app-fs .stage .mj-grid,
  #pg-game.app-fs .stage .mo-grid,
  #pg-game.app-fs .stage .sw-grid {
    font-size: clamp(1.15rem, max(6.5vh, 34px), 3rem);
    gap: 6px;
  }
  #pg-game.app-fs .stage .lt-row,
  #pg-game.app-fs .stage .ro-row,
  #pg-game.app-fs .stage .pk-row,
  #pg-game.app-fs .stage .ol-row,
  #pg-game.app-fs .stage .gt-row {
    font-size: clamp(1.15rem, max(7.2vh, 34px), 3rem);
    gap: clamp(9px, 1.8vw, 16px);
    max-width: min(720px, 100%);
    width: 100%;
    justify-self: stretch;
  }
  #pg-game.app-fs .stage .cr-cell,
  #pg-game.app-fs .stage .lg-cell,
  #pg-game.app-fs .stage .mj-cell,
  #pg-game.app-fs .stage .mo-cell,
  #pg-game.app-fs .stage .sw-cell { aspect-ratio: 1; }
  #pg-game.app-fs .stage .cr-grid { width: min(62vh, 100%); }
  #pg-game.app-fs .stage .lg-grid,
  #pg-game.app-fs .stage .sw-grid { width: min(72vh, 100%); }
  #pg-game.app-fs .stage .mj-grid,
  #pg-game.app-fs .stage .mo-grid { width: min(62vh, 100%); }

  /* ── Slots (sl): البكرات يسار، جدول الدفع والتحكم يمين ── */
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) {
    display: grid;
    grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) > .sl-wrap {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    margin: 0;
    padding: 4px 6px;
    justify-content: center;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) > .sl-wrap .reels {
    gap: 10px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) .reel {
    width: clamp(64px, 16vh, 110px);
    height: clamp(84px, 30vh, 220px);
    font-size: clamp(1.6rem, 9vh, 3.4rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) .sl-pay { max-width: 100%; }
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) .sl-pay-item {
    font-size: clamp(0.6rem, 1.6vh, 0.8rem);
    padding: 2px 6px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) > .sl-status {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: clamp(0.78rem, 2.2vh, 1rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) > div:not(.sl-wrap):not(.sl-status):not(.res) {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    display: flex;
    justify-content: center;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.sl-wrap) > div:not(.sl-wrap):not(.sl-status) .big {
    padding: clamp(8px, 2vh, 14px) clamp(14px, 3vw, 22px);
    font-size: clamp(0.8rem, 2.2vh, 1.05rem);
  }

  /* ── Fishing (fh): البحر يسار، المدفع/التحكم يمين ── */
  #pg-game.app-fs #gamePageBody .stage:has(.fh-sea) {
    display: grid;
    grid-template-columns: minmax(170px, 250px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.fh-sea) > .fh-hint {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    font-size: clamp(0.72rem, 2vh, 0.9rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.fh-sea) > .fh-sea {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    justify-self: stretch;
    min-height: 0;
    margin: 0;
    font-size: clamp(1.6rem, max(8vh, 36px), 4rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.fh-sea) > .fh-cannon {
    position: absolute;
    bottom: 12px;
    inset-inline-end: 12px;
    font-size: clamp(1.6rem, 5vh, 2.6rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.fh-sea) > .cr-status {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    font-size: clamp(0.78rem, 2.2vh, 1rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.fh-sea) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }

  /* ── Andar Bahar (ab): الجوكر والمجموعتان يسار، الأزرار يمين ── */
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) {
    display: grid;
    grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) > .ab-hint {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    font-size: clamp(0.72rem, 2vh, 0.9rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) > .ab-joker-box,
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) > .ab-sides {
    grid-column: 2;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) > .ab-joker-box {
    grid-row: 1;
    align-self: start;
    justify-self: center;
    min-height: 0;
    font-size: clamp(2rem, max(9vh, 44px), 4.4rem);
    padding: 6px 18px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) > .ab-sides {
    grid-row: 1;
    align-self: stretch;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) .ab-cards {
    max-height: 38vh;
    overflow-y: auto;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) > .ab-status {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: clamp(0.78rem, 2.2vh, 1rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
    flex-direction: column;
    gap: 8px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ab-joker-box) > .bets ~ .bets {
    grid-row: 1;
    align-self: end;
  }

  /* ── Wingo (wg): القياس الحي — hint/ball/picks تستهلك 317px فتبقى
     .bets الثانية (y=417) و res (y=485) مقصوصتين تحت شاشة 360.
     حل: عمودان — ball+picks يسار، hint/bets/res يمين ── */
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) {
    display: grid;
    grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) > .wg-hint {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    font-size: clamp(0.72rem, 2vh, 0.9rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) > .wg-ball {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    margin: 0;
    width: clamp(96px, 26vh, 180px);
    height: clamp(96px, 26vh, 180px);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) > .wg-picks {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: center;
    margin: 0;
    width: 100%;
    max-width: 480px;
    padding: 6px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) > .bets ~ .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin-bottom: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) > .bets .big {
    padding: clamp(8px, 2vh, 14px) clamp(14px, 3vw, 22px);
    font-size: clamp(0.8rem, 2.2vh, 1.05rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wg-ball) > .res {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    padding: 4px 8px;
    font-size: clamp(0.78rem, 2.2vh, 1rem);
  }
  #pg-game.app-fs .stage .wg-picks .wgBtn {
    min-width: clamp(72px, 22vw, 120px);
    padding: clamp(8px, 1.8vh, 14px) 8px;
    font-size: clamp(0.72rem, 2vh, 0.92rem);
  }

  /* ── Wheel of Fortune (wf): كانفس العجلة 320px مربع + hint فوقه
     وزر تحت → مجموع يقصّ الزر في 360px. عمودان: العجلة يسار، تحكم يمين ── */
  #pg-game.app-fs #gamePageBody .stage:has(.wf-holder) {
    display: grid;
    grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wf-holder) > .wf-wrap {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    min-height: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wf-holder) .wf-holder {
    position: relative;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wf-holder) #wCv {
    width: clamp(180px, 52vh, 330px);
    height: clamp(180px, 52vh, 330px);
    max-height: none !important;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wf-holder) .wf-hint {
    font-size: clamp(0.72rem, 2vh, 0.9rem);
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wf-holder) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wf-holder) > .bets ~ .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin-bottom: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wf-holder) > .bets .big {
    padding: clamp(8px, 2vh, 14px) clamp(14px, 3vw, 22px);
    font-size: clamp(0.8rem, 2.2vh, 1.05rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.wf-holder) > .res {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    padding: 4px 8px;
    font-size: clamp(0.78rem, 2.2vh, 1rem);
  }

  /* ── Blackjack (bj): طاولة بجانب عمود الأزرار.
     القياس: زر تقسيم اليد bottom=569 داخل شاشة 360 (مقصوص داخل
     overflow:hidden). betRow أول عنصر في stage (eBj خاص: betRow أولاً). ── */
  #pg-game.app-fs #gamePageBody .stage:has(.bjt) {
    display: grid;
    grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.bjt) > .bjt {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: stretch;
    justify-self: center;
    max-width: 100%;
    width: min(100%, 560px);
    margin: 0;
    padding: clamp(10px, 3vh, 24px) 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.bjt) .bjcs {
    gap: clamp(2px, 1vh, 8px);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.bjt) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.bjt) > .bets .big {
    padding: clamp(8px, 2vh, 14px) clamp(12px, 2.5vw, 20px);
    font-size: clamp(0.72rem, 2vh, 0.95rem);
    min-width: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.bjt) > .bets:first-child {
    grid-row: 2;
    align-self: end;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.bjt) > .res {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    margin: 0;
    padding: 2px 8px;
    font-size: clamp(0.75rem, 2.1vh, 0.95rem);
  }

  /* ── Roulette (rl): العجلة يسار، شبكة الرهانات (10 أزرار) يمين عمودياً.
     القياس: زر bottom=661 (مقصوص). .rl-bets شبكة g3 → عمودان مضغوطان. ── */
  #pg-game.app-fs #gamePageBody .stage:has(.rl-stage) {
    display: grid;
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rl-stage) > .rl-stage {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    margin: 0;
    min-height: 0;
    gap: 6px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rl-stage) .rl-wheel {
    width: clamp(160px, 48vh, 320px);
    animation: none;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rl-stage) .rl-last {
    font-size: clamp(0.72rem, 2vh, 0.9rem);
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rl-stage) > .rl-bets {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
    align-content: center;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rl-stage) .rl-b {
    padding: clamp(6px, 1.6vh, 12px) 6px;
    font-size: clamp(0.68rem, 1.9vh, 0.85rem);
    min-height: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rl-stage) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rl-stage) > .bets .big {
    padding: clamp(8px, 2vh, 14px) clamp(12px, 2.5vw, 20px);
    font-size: clamp(0.78rem, 2.2vh, 1rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rl-stage) > .res {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    margin: 0;
    padding: 2px 8px;
    font-size: clamp(0.75rem, 2.1vh, 0.95rem);
  }

  /* ── Keno (ke): شبكة 80 رقماً يسار (تتمدد بكثافة أعمدة)، التحكم يمين.
     القياس: زر bottom=639 داخل شاشة 360 (مقصوص داخل overflow:hidden). ── */
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) > .ke-wrap {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    justify-self: stretch;
    margin: 0;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) .ke-top {
    margin: 0;
    padding: 2px 4px;
    font-size: clamp(0.68rem, 1.9vh, 0.85rem);
    gap: 6px;
    flex-wrap: wrap;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) .kgrid {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: clamp(4px, 1.2vh, 10px);
    max-width: none;
    width: 100%;
    gap: 3px;
    align-content: stretch;
    grid-template-columns: repeat(14, minmax(0, 1fr));
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) .kc {
    aspect-ratio: 1;
    font-size: clamp(0.55rem, 1.5vh, 0.8rem);
    border-radius: 50%;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) .ke-hint {
    margin: 0;
    font-size: clamp(0.62rem, 1.7vh, 0.8rem);
    line-height: 1.3;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) > .bets ~ .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin-bottom: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) > .bets .big {
    padding: clamp(8px, 2vh, 14px) clamp(10px, 2vw, 18px);
    font-size: clamp(0.75rem, 2.1vh, 0.95rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.ke-wrap) > .res {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    margin: 0;
    padding: 2px 8px;
    font-size: clamp(0.75rem, 2.1vh, 0.95rem);
  }

  /* ── Video Poker (vp): جدول المدفوع يمين (عمود مضغوط)، اليد يسار.
     القياس: زر bottom=488 (مقصوص 128px). جدول المدفوع 9 صفوف = الضلع الطويل. ── */
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) > .vp-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: stretch;
    margin: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) .vp-pt {
    grid-column: 1;
    margin: 0;
    padding: clamp(6px, 1.6vh, 12px) clamp(8px, 1.5vw, 14px);
    align-self: start;
    max-height: 100%;
    overflow-y: auto;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) .vp-pt-title {
    font-size: clamp(0.7rem, 2vh, 0.9rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) .vp-pt-grid {
    gap: 2px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) .vp-pt-row {
    padding: clamp(2px, 0.8vh, 5px) 4px;
    font-size: clamp(0.6rem, 1.7vh, 0.78rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) .vp-hand {
    grid-column: 2;
    align-self: center;
    justify-self: center;
    margin: 0;
    max-width: 100%;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) .vp-hint {
    grid-column: 2;
    align-self: end;
    justify-self: center;
    margin: 0;
    font-size: clamp(0.65rem, 1.8vh, 0.85rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) > .bets {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) > .bets .big {
    padding: clamp(8px, 2vh, 14px) clamp(14px, 3vw, 22px);
    font-size: clamp(0.75rem, 2.1vh, 0.98rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.vp-wrap) > .res {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    margin: 0;
    padding: 2px 8px;
    font-size: clamp(0.72rem, 2vh, 0.9rem);
  }

  /* ── Penalty (pn): المرمى يسار، الاتجاهات/الرهان يمين.
     القياس: زر bottom=459 داخل شاشة 360 (مقصوص). عمود hint+arena+role+picks
     يفوق 360px — قواعد [Fill] القديمة تمدد فقط دون ترتيب عمودين. ── */
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) {
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) > .pn-arena {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    margin: 0;
    min-height: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) .goal {
    width: clamp(220px, 42vw, 360px);
    height: clamp(110px, 34vh, 200px);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) .goal .keeper {
    font-size: clamp(1.9rem, 6vh, 3.2rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) .goal .pball2 {
    font-size: clamp(1.2rem, 3.6vh, 2rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) > .pn-hint,
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) > .pn-role {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    font-size: clamp(0.7rem, 2vh, 0.9rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) > .pn-picks {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: center;
    margin: 0;
    width: min(100%, 460px);
    gap: 5px;
    padding: 6px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) .pnBtn {
    min-width: clamp(64px, 18vw, 110px);
    padding: clamp(8px, 2vh, 14px) 6px;
    font-size: clamp(0.68rem, 1.9vh, 0.85rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) > .pn-status {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    margin: 0;
    font-size: clamp(0.72rem, 2vh, 0.9rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.pn-arena) > .res {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    margin: 0;
    padding: 2px 8px;
    font-size: clamp(0.72rem, 2vh, 0.9rem);
  }

  /* ── RPS (rp): بطاقتا المواجهة يسار، اختيارات الرهان يمين.
     القياس: زر bottom=484 داخل شاشة 360 (مقصوص 124px). ── */
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) {
    display: grid;
    grid-template-columns: minmax(170px, 250px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    align-content: stretch;
    overflow: hidden;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) > .rps-arena {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    margin: 0;
    min-height: 0;
    gap: clamp(12px, 4vw, 26px);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) .rps-card {
    width: clamp(80px, 14vw, 130px);
    height: clamp(100px, 17vw, 160px);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) .rps-card-face {
    font-size: clamp(2.4rem, 6vw, 4rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) > .rps-hint {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    font-size: clamp(0.7rem, 2vh, 0.9rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) > .rps-picks {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: center;
    margin: 0;
    width: min(100%, 440px);
    gap: 6px;
    padding: 6px;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) .rpsBtn {
    min-width: clamp(80px, 24vw, 120px);
    padding: clamp(10px, 2.4vh, 18px) 8px;
    font-size: clamp(0.75rem, 2vh, 0.95rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) .rps-emoji {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) > .rps-status {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    margin: 0;
    font-size: clamp(0.72rem, 2vh, 0.9rem);
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) > .bets {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }
  #pg-game.app-fs #gamePageBody .stage:has(.rps-arena) > .res {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    margin: 0;
    padding: 2px 8px;
    font-size: clamp(0.72rem, 2vh, 0.9rem);
  }
}
