/* MA | HEAVEN shared casino chip component v4
   Canonical chip system for PC + mobile.
   - Flat 2D chip
   - White center / black value on every denomination
   - Up to 7 denomination colors
   - Same component before and after betting
*/
.gameChip{
  --chip-tone:#d94b4b;
  --chip-edge:#8d2929;
  --chip-center:#fffdf7;
  position:relative;
  display:grid;
  place-items:center;
  isolation:isolate;
  border-radius:50%;
  border:2px solid var(--chip-edge)!important;
  background:
    radial-gradient(circle at 50% 50%,var(--chip-center) 0 47%,transparent 48%),
    repeating-conic-gradient(from -7.5deg,var(--chip-tone) 0 12deg,#fffdf7 12deg 20deg,var(--chip-tone) 20deg 32deg),
    var(--chip-tone)!important;
  box-shadow:
    0 3px 8px #0005,
    inset 0 0 0 4px color-mix(in srgb,var(--chip-tone) 78%,#fff 22%),
    inset 0 0 0 6px var(--chip-edge)!important;
  color:#101010!important;
  transition:.16s transform,.16s box-shadow,.16s filter!important;
}
.gameChip::before{
  content:"";
  position:absolute;
  inset:22%;
  border-radius:50%;
  background:var(--chip-center);
  border:1px solid #cfc7b9;
  box-shadow:inset 0 0 0 2px #fff;
  z-index:-1;
}
.gameChip::after{
  content:"";
  position:absolute;
  inset:8%;
  border-radius:50%;
  border:1px solid color-mix(in srgb,var(--chip-edge) 72%,#fff 28%);
  pointer-events:none;
}
.gameChip .gameChipValue{
  position:relative;
  z-index:2;
  font-family:Arial,sans-serif;
  font-weight:1000;
  font-size:15px;
  letter-spacing:-.05em;
  line-height:1;
  color:#0d0d0d!important;
  text-shadow:none!important;
  white-space:nowrap;
}
.gameChip.chipWide .gameChipValue{font-size:12.5px;letter-spacing:-.07em}
.gameChip small{display:none}
.gameChip.active{
  transform:translateY(-4px) scale(1.06);
  box-shadow:0 0 0 3px #d8b85d,0 7px 14px #0008,inset 0 0 0 4px color-mix(in srgb,var(--chip-tone) 78%,#fff 22%),inset 0 0 0 6px var(--chip-edge)!important;
}
.gameChip:hover{transform:translateY(-2px)}

/* Canonical denomination order: red > orange > sky > green > blue-sky > lavender > black */
.gameChip.chipTone0,.chipTone0 .miniGameChip{--chip-tone:#d94b4b;--chip-edge:#8d2929}
.gameChip.chipTone1,.chipTone1 .miniGameChip{--chip-tone:#ea913a;--chip-edge:#9f531d}
.gameChip.chipTone2,.chipTone2 .miniGameChip{--chip-tone:#73c6ec;--chip-edge:#3e8daf}
.gameChip.chipTone3,.chipTone3 .miniGameChip{--chip-tone:#55aa71;--chip-edge:#2d7044}
.gameChip.chipTone4,.chipTone4 .miniGameChip{--chip-tone:#5d8ed8;--chip-edge:#345a96}
.gameChip.chipTone5,.chipTone5 .miniGameChip{--chip-tone:#b69add;--chip-edge:#75579e}
.gameChip.chipTone6,.chipTone6 .miniGameChip{--chip-tone:#29282e;--chip-edge:#08080a}

/* Bet tray is part of layout, never absolutely overlaid on text. */
.diceV4 .parityCard{
  padding:14px!important;
  min-height:126px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:"eyebrow mult" "title mult" "rule rule" "tray tray"!important;
  align-items:start!important;
  overflow:hidden!important;
}
.diceV4 .parityCard>span{grid-area:eyebrow!important;position:relative!important}
.diceV4 .parityCard>b{grid-area:title!important;position:relative!important}
.diceV4 .parityCard>small{grid-area:rule!important;position:relative!important}
.diceV4 .parityCard>em{grid-area:mult!important;position:static!important;align-self:start!important;justify-self:end!important}
.diceV4 .betChipStack{
  grid-area:tray!important;
  position:static!important;
  width:100%!important;
  height:auto!important;
  margin-top:11px!important;
  pointer-events:none!important;
  transform:none!important;
  filter:none!important;
}
.diceV4 .betChipStack:empty{display:none!important}
.diceV4 .betTray{
  width:100%;
  padding:10px 11px;
  border:1px solid #ffffff1e;
  border-radius:12px;
  background:#0d0d0cf4;
  box-shadow:0 5px 14px #0006,inset 0 1px 0 #ffffff0a;
  animation:betTrayIn .18s ease-out;
}
.diceV4 .betTrayTop{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin-bottom:9px;
}
.diceV4 .betTrayLabel{font-size:7px;letter-spacing:.18em;color:#c9aa60;font-weight:950;white-space:nowrap}
.diceV4 .betTrayTop strong{font-size:17px;line-height:1;color:#fff7e8;white-space:nowrap;text-align:right}
.diceV4 .betTrayMix{display:flex;flex-wrap:wrap;gap:7px;min-width:0}
.diceV4 .betMixItem{
  display:grid;
  grid-template-columns:36px auto;
  align-items:center;
  gap:7px;
  min-width:104px;
  max-width:145px;
  padding:4px 8px 4px 4px;
  border:1px solid #ffffff15;
  border-radius:10px;
  background:#ffffff06;
}
.diceV4 .miniGameChip{
  --chip-tone:#d94b4b;
  --chip-edge:#8d2929;
  width:36px;height:36px;
  border-radius:50%;
  display:grid;
  place-items:center;
  position:relative;
  background:
    radial-gradient(circle at 50% 50%,#fffdf7 0 47%,transparent 48%),
    repeating-conic-gradient(from -7.5deg,var(--chip-tone) 0 12deg,#fffdf7 12deg 20deg,var(--chip-tone) 20deg 32deg),
    var(--chip-tone);
  border:1px solid var(--chip-edge);
  box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--chip-tone) 78%,#fff 22%),inset 0 0 0 4px var(--chip-edge);
}
.diceV4 .miniGameChip b{
  width:23px;height:23px;
  border-radius:50%;
  display:grid;place-items:center;
  background:#fffdf7;
  border:1px solid #cfc7b9;
  color:#0d0d0d!important;
  font-family:Arial,sans-serif;
  font-size:8px;
  font-weight:1000;
  letter-spacing:-.055em;
  font-style:normal;
  white-space:nowrap;
}
.diceV4 .miniGameChip.chipWide b{font-size:6.8px}
.diceV4 .betMixItem em{display:flex;flex-direction:column;gap:2px;font-style:normal;line-height:1.05;min-width:0}
.diceV4 .betMixItem em b{font-size:10px;color:#fff6e7;font-weight:950;white-space:nowrap}
.diceV4 .betMixItem em small{font-size:8px;color:#a9a198;font-weight:800;white-space:nowrap}
.diceV4 .betTrayMeta{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:8px;
  padding-top:7px;
  border-top:1px solid #ffffff10;
  color:#aaa196;
  font-size:8px;
  font-weight:850;
  letter-spacing:.03em;
}
.diceV4 .betTrayMeta span:last-child{text-align:right}
.diceV4 .placedChip,.diceV4 .chipMore{display:none!important}
@keyframes betTrayIn{0%{opacity:.25;transform:translateY(6px) scale(.98)}70%{transform:translateY(-1px)}100%{opacity:1;transform:none}}

/* Selector row */
.diceV4 .chipRow{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:13px!important;
  padding:13px 18px!important;
  min-height:82px!important;
  background:linear-gradient(135deg,#eee6d8,#faf6ee 55%,#e5dbc9)!important;
  border:1px solid #aa9b80!important;
  border-radius:13px!important;
  box-shadow:inset 0 1px 0 #fff!important;
}
.diceV4 .chipBtn{flex:0 0 62px!important;width:62px!important;min-width:62px!important;height:62px!important;padding:0!important}

@media(max-width:900px){
  .diceV4 .parityCard{padding:13px!important}
  .diceV4 .betTrayMix{gap:6px}
  .diceV4 .betMixItem{min-width:98px;max-width:140px}
  .diceV4 .chipRow{justify-content:flex-start!important;overflow-x:auto!important;scrollbar-width:none;padding:11px 12px!important;gap:10px!important}
  .diceV4 .chipRow::-webkit-scrollbar{display:none}
  .diceV4 .chipBtn{flex-basis:58px!important;width:58px!important;min-width:58px!important;height:58px!important}
}
@media(max-width:520px){
  .diceV4 .betTrayTop{grid-template-columns:1fr;gap:4px;align-items:start}
  .diceV4 .betTrayTop strong{font-size:16px;text-align:left}
  .diceV4 .betTrayMix{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .diceV4 .betMixItem{min-width:0;max-width:none;grid-template-columns:34px minmax(0,1fr);padding-right:6px}
  .diceV4 .miniGameChip{width:34px;height:34px}.diceV4 .miniGameChip b{width:22px;height:22px;font-size:7.5px}.diceV4 .miniGameChip.chipWide b{font-size:6.4px}
  .diceV4 .betMixItem em b{font-size:9px}.diceV4 .betMixItem em small{font-size:7.5px}
  .diceV4 .chipBtn{flex-basis:56px!important;width:56px!important;min-width:56px!important;height:56px!important}
  .gameChip .gameChipValue{font-size:13.5px}.gameChip.chipWide .gameChipValue{font-size:11px}
}
@media(max-width:380px){
  .diceV4 .betTrayMix{grid-template-columns:1fr}
  .diceV4 .betTrayMeta{font-size:7.5px}
}

/* V5.6.1 HOTFIX: neutralize legacy dice-v4 chip pseudo layers.
   Legacy .diceV4 .chipBtn::before/::after had higher specificity and painted
   a black center over the canonical chip. Keep one white center + black value. */
.diceV4 .chipBtn.gameChip::before,
.diceV4 .chipBtn.gameChip::after{
  content:none!important;
  display:none!important;
  background:none!important;
  border:0!important;
  box-shadow:none!important;
  -webkit-mask:none!important;
  mask:none!important;
}
.diceV4 .chipBtn.gameChip{
  background:
    radial-gradient(circle at 50% 50%,#fffdf7 0 46%,#fffdf7 47%,transparent 48%),
    repeating-conic-gradient(from -7.5deg,var(--chip-tone) 0 12deg,#fffdf7 12deg 20deg,var(--chip-tone) 20deg 32deg),
    var(--chip-tone)!important;
  color:#0d0d0d!important;
}
.diceV4 .chipBtn.gameChip .gameChipValue{
  color:#0d0d0d!important;
  text-shadow:none!important;
  z-index:5!important;
}


/* MA_HEAVEN_CHIP_TRAY_DARK_BG_V1
   Shared rule for all common-shell chip betting games.
   Keep chip geometry/spacing unchanged; remove only the ivory tray surface.
*/
body.gameCommonV4 .chipRow{
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
