/* ============================================================================
   Bubble Craps - Interblock-style Crapless layout with the Lucky Roller.
   The whole cabinet is laid out on a fixed 1600x1000 canvas and scaled to the
   window, so proportions never drift.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

/* Author display rules below would otherwise beat the UA's [hidden] rule. */
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #05070a;
  font-family: 'Arial Narrow', 'Helvetica Neue Condensed', Roboto, Arial, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#machine {
  position: absolute; left: 50%; top: 50%;
  width: 1600px; height: 1000px;
  transform-origin: 50% 50%;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  /* the felt, with the hot bloom these cabinets always have up top */
  background:
    radial-gradient(58% 42% at 50% 20%, rgba(255,255,190,.30) 0%, rgba(255,255,150,0) 62%),
    radial-gradient(120% 95% at 50% 26%, #7fce33 0%, #4f9f22 24%, #26761a 58%, #0e3d10 100%);
  box-shadow: 0 0 0 3px #000, 0 24px 80px rgba(0,0,0,.9);
}
#machine::after {              /* screen glass */
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 60;
  background:
    radial-gradient(90% 60% at 22% 6%, rgba(255,255,255,.10), rgba(255,255,255,0) 55%),
    radial-gradient(130% 100% at 50% 50%, rgba(0,0,0,0) 52%, rgba(0,0,0,.45) 100%);
}

/* ------------------------------------------------------------------- chips */
.chip {
  --s: 40px; --chip: #d0342c; --ink: #fff;
  position: relative; display: inline-grid; place-items: center;
  width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--chip); flex: none;
  box-shadow: 0 2px 5px rgba(0,0,0,.55), inset 0 -2px 4px rgba(0,0,0,.35);
  touch-action: none;
}
.chip::before {                                    /* edge spots */
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 15deg, #fff 0deg 13deg, transparent 13deg 45deg);
  -webkit-mask: radial-gradient(circle, transparent 63%, #000 64%);
          mask: radial-gradient(circle, transparent 63%, #000 64%);
  opacity: .92;
}
.chip::after {                                     /* inner face */
  content: ''; position: absolute; inset: 15%; border-radius: 50%;
  background: var(--chip); filter: brightness(1.1);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45), inset 0 3px 6px rgba(255,255,255,.18);
}
.chip-face {
  position: relative; z-index: 2; color: var(--ink);
  font: 800 calc(var(--s) * .27) / 1 Arial, sans-serif; letter-spacing: -.2px;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
  white-space: nowrap;
}
.c1    { --chip: #eef0f2; --ink: #23262b; }
.c2    { --chip: #ef7fa9; --ink: #46101f; }
.c5    { --chip: #cf3128; --ink: #fff; }
.c10   { --chip: #2668cf; --ink: #fff; }
.c25   { --chip: #17853f; --ink: #fff; }
.c50   { --chip: #e0761c; --ink: #3a1600; }
.c100  { --chip: #23262b; --ink: #fff; }
.c500  { --chip: #6c3ba6; --ink: #fff; }
.c1000 { --chip: #d9a521; --ink: #37260a; }

.chip-under {
  position: absolute; left: 0; border-radius: 50%; width: 100%; height: 100%;
  background: inherit; z-index: -1;
  top: calc(var(--i) * 3px); filter: brightness(.7);
  box-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.chip.placed { animation: chipDrop .22s cubic-bezier(.2,1.5,.5,1); }
@keyframes chipDrop {
  from { transform: translateY(-16px) scale(1.25); opacity: .2; }
  to   { transform: none; opacity: 1; }
}
.chip.offbet { filter: grayscale(.55) brightness(.72); }
/* the dealer's OFF / ON lammer sitting on top of the bet */
.lammer {
  position: absolute; z-index: 4; bottom: -3px; left: 50%; transform: translateX(-50%);
  font: 800 8px/1.4 Arial, sans-serif; padding: 0 3px; border-radius: 2px;
}
.lammer.off { background: #111; color: #fff; border: 1px solid #888; }
.lammer.on {
  background: #1d8f2a; color: #fff; border: 1px solid #9dff9d;
  box-shadow: 0 0 6px rgba(120,255,120,.7);
}

/* -------------------------------------------------------------------- dice */
.die {
  --s: 30px; --p: calc(var(--s) * .2);
  display: inline-grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  width: var(--s); height: var(--s); padding: calc(var(--s) * .1);
  border-radius: calc(var(--s) * .18);
  background: linear-gradient(155deg, #fff 0%, #f2f2f2 55%, #cfcfcf 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.18);
  flex: none; vertical-align: middle;
}
.pip { width: var(--p); height: var(--p); border-radius: 50%; place-self: center; background: transparent; }
.pip.on { background: #16181c; box-shadow: inset 0 -1px 1px rgba(255,255,255,.35); }
.die.mini { --s: 15px; }
.die.big  { --s: 76px; border-radius: 12px; }

/* ------------------------------------------------------------------ topbar */
.topbar {
  height: 58px; flex: none; display: flex; align-items: stretch; gap: 6px;
  padding: 5px 9px; z-index: 30;
  background: linear-gradient(#15181c, #05070a);
  border-bottom: 1px solid #b99433;
}
.tb-btn {
  border: 1px solid #6d7480; border-radius: 4px; color: #e9eef5; cursor: pointer;
  background: linear-gradient(#39414c, #1c2128);
  font: 700 16px/1 Arial, sans-serif; letter-spacing: .5px; padding: 0 13px;
  white-space: nowrap;
}
.tb-btn:hover { background: linear-gradient(#4a5460, #262c35); }
.tb-btn.help { background: linear-gradient(#b23b2c, #7b1f14); border-color: #e08b7d; font-size: 17px; }
.tb-btn.icon { font-size: 23px; padding: 0 10px; }
.meter {
  display: flex; align-items: center; gap: 7px; padding: 0 12px;
  border: 1px solid #333a44; border-radius: 4px; background: rgba(0,0,0,.45);
}
.meter.small { padding: 0 9px; }
.m-lbl { font: 700 13px/1 Arial, sans-serif; color: #8f9bab; letter-spacing: .8px; }
.m-val { font: 800 21px/1 'Courier New', monospace; color: #ffd75e; }
.meter.small .m-val { font-size: 18px; }
.m-val.win { color: #7dff8d; }
.m-val.bet { color: #7fd4ff; }
.tb-mid { flex: 1; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.variant-name { font: 800 20px/1.1 Arial, sans-serif; color: #fff; letter-spacing: 2px; }
.minbet { font: 600 14px/1.2 Arial, sans-serif; color: #ffd75e; }

/* -------------------------------------------------------------------- main */
.main {
  flex: 1; display: flex; gap: 7px; padding: 7px 8px 3px; min-height: 0;
}
.panel-left { width: 412px; flex: none; display: flex; flex-direction: column; gap: 4px; }
.center     { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; position: relative; }
.panel-right{ width: 92px; flex: none; display: flex; flex-direction: column; gap: 2px; }

/* ------------------------------------------------------------- left panel */
.tabs { display: flex; gap: 6px; flex: none; }
.tab {
  flex: 1; cursor: pointer; border-radius: 8px 8px 0 0; padding: 5px 10px;
  border: 2px solid #6f8f5a; border-bottom: none;
  background: linear-gradient(#2b6d1c, #17400f);
  color: #cfe6bd; font: 800 13px/1.1 Arial, sans-serif; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tab.active {
  background: linear-gradient(#f4f0c8, #d9d08a); color: #2b2000; border-color: #ffe98a;
  box-shadow: 0 0 14px rgba(255,235,140,.45);
}
.tab-total { font: 800 12px/1 'Courier New', monospace; color: #1d5c0f; }
.tab:not(.active) .tab-total { color: #ffd75e; }

.tabpane {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px;
  border: 2px solid #d8cf87; border-radius: 0 8px 8px 8px; padding: 5px;
  background: linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.34));
}
.secthead {
  flex: none; text-align: center; padding: 3px 6px;
  background: linear-gradient(#0b2a0d, #051805);
  border: 1px solid #c9a13a; border-radius: 3px;
  font: 800 13px/1.2 Arial, sans-serif; letter-spacing: 1.2px; color: #fff;
}
.secthead em { font: italic 400 10px/1 Arial, sans-serif; color: #bcd3a8; letter-spacing: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; grid-auto-rows: 1fr; min-height: 0; }
.hw-spot, .horn-spot, .hop-spot, .wide-spot {
  position: relative; cursor: pointer; touch-action: none; user-select: none;
  border: 1px solid #9fb98c; border-radius: 4px;
  background: linear-gradient(#f4f4ee, #d7d9cf);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hw-spot, .horn-spot, .hop-spot { min-height: 0; }
.hw-dice { display: flex; gap: 4px; }
.hw-spot .hw-dice .die { --s: 21px; }
.hw-pay { font: 800 13px/1 Arial, sans-serif; color: #1c1c1c; letter-spacing: .3px; }
.hw-since {
  position: absolute; top: 2px; right: 4px;
  font: 800 11px/1 'Courier New', monospace; color: #7a1b1b;
}
#paneHardways > .grid2 { flex: 1; }

.oneroll { flex: 2; display: flex; flex-direction: column; gap: 5px; min-height: 0; }
.wide-spot {
  flex: 1; min-height: 0; justify-content: space-around;
  background: linear-gradient(#123a13, #071e08); border: 2px solid #c9a13a;
}
.wide-spot .or-name { font: 800 22px/1 Arial, sans-serif; color: #ff5a4d; letter-spacing: 2px; }
.wide-spot .or-pay  { font: 800 13px/1 Arial, sans-serif; color: #fff; }
.hornwrap {
  flex: 2.1; min-height: 0; display: flex; flex-direction: column; gap: 3px;
  border: 2px solid #c9a13a; border-radius: 5px; padding: 4px;
  background: linear-gradient(#0f3410, #061c07);
}
.hornlabel {
  flex: none; text-align: center; font: 800 16px/1.2 Arial, sans-serif; color: #fff; letter-spacing: 2px;
}
.horn-grid { flex: 1; gap: 4px; }
.horn-spot .hw-dice .die { --s: 19px; }

.hopgrid { flex: 1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; min-height: 0; }
.hopcol { display: flex; flex-direction: column; gap: 5px; min-height: 0; }
.hopcol.c1 { justify-content: center; }
.hop-spot { flex: 1; gap: 6px; }
.hop-name { font: 800 16px/1 Arial, sans-serif; color: #1c1c1c; }
.hop-d { display: flex; gap: 2px; }
.hop-d .die { --s: 18px; }
.hop-spot.hard { background: linear-gradient(#fbf7e2, #e6dfba); }
.grid2.hardhops { flex: .85; }
#paneHop > .hopgrid { flex: 2.6; }

/* ------------------------------------------------------------ lucky roller */
.lucky {
  flex: none; height: 138px; margin: 0 auto; width: 690px; position: relative;
  display: flex; flex-direction: column; align-items: center; z-index: 12;
}
.lucky-head {
  height: 88px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  position: relative;
}
.lucky-side {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.lucky-word {
  font: 400 42px/.95 'Brush Script MT', 'Segoe Script', 'Bradley Hand', cursive;
  background: linear-gradient(#fff6c0, #f0a81e 55%, #b3730a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.55));
  transform: rotate(-4deg);
}
.lucky-word.right { transform: rotate(4deg); }
.lamps { display: flex; gap: 4px; align-items: center; }
.lamp {
  width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center;
  font: 800 10px/1 Arial, sans-serif; font-style: normal;
  background: radial-gradient(circle at 35% 30%, #46504a, #10160f);
  color: #6f7d6d; border: 1px solid #26301f; transition: all .25s;
}
.lamp.lit {
  background: radial-gradient(circle at 35% 30%, #fff9c4, #f5c60f 60%, #b8860b);
  color: #3a2a00; border-color: #fff3a0;
  box-shadow: 0 0 9px 2px rgba(255,214,60,.75);
}
.dice-area {
  flex: none; display: flex; gap: 10px; align-items: center; justify-content: center;
  width: 206px; height: 88px; position: relative;
}
.dice-area::before {                     /* the bubble dome */
  content: ''; position: absolute; inset: -2px 6px; border-radius: 50%;
  background: radial-gradient(60% 55% at 40% 26%, rgba(255,255,255,.5), rgba(255,255,255,.05) 60%, rgba(255,255,255,0) 75%);
  box-shadow: inset 0 0 18px rgba(255,255,255,.28);
  pointer-events: none;
}
.dice-area .die { transition: transform .18s cubic-bezier(.2,1.6,.4,1); }
.dice-area.rolling .die { transition: none; }
.dice-area .die.landed { animation: dieLand .32s ease-out; }
@keyframes dieLand {
  0% { filter: brightness(1.6); }
  40% { transform: scale(1.14); }
  100% { filter: none; }
}

.lucky-bets { position: relative; display: flex; gap: 5px; width: 100%; height: 50px; }
.lucky-spot {
  flex: 1; position: relative; cursor: pointer; touch-action: none; user-select: none;
  border: 2px solid #ffe98a; border-radius: 5px;
  background: linear-gradient(#2f7d1e, #14480f);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 3px 7px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.2);
}
.lucky-spot.wide { flex: 1.25; }
.lucky-spot b  { font: 800 16px/1.1 Arial, sans-serif; letter-spacing: .8px; color: #fff; }
.lucky-spot em { font: 700 9px/1.2 Arial, sans-serif; color: #ffe98a; font-style: normal; letter-spacing: 1px; }
.lucky-spot s  { font: 800 15px/1.1 Arial, sans-serif; color: #fff; text-decoration: none; }
.lucky-spot.closed { opacity: .42; filter: grayscale(.6); }
.qmark {
  position: absolute; right: -26px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 36% 30%, #ffe98a, #d9a521);
  border: 2px solid #7a5a06; color: #4a3300;
  font: 900 15px/1 Arial, sans-serif;
}
.qmark:hover { filter: brightness(1.15); }

/* ------------------------------------------------------------ number rows */
.pointline {
  flex: none; height: 26px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
#pointText {
  font: 700 20px/1 Arial, sans-serif; letter-spacing: 9px; color: rgba(255,255,255,.55);
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
/* Crapless covers ten numbers and has no don't side, so the leading cell and
   the LAY row collapse away. Standard craps runs six numbers plus DON'T COME. */
.numrow { flex: none; display: grid; gap: 5px; }
.variant-crapless .numrow { grid-template-columns: repeat(10, 1fr); }
.variant-crapless .rowlead,
.variant-crapless .dc-box,
.variant-crapless .layrow,
.variant-crapless .dontrow,
.variant-crapless .dc-holder { display: none; }
.variant-standard .numrow { grid-template-columns: 1.35fr repeat(6, 1fr); }
.variant-standard .unused { display: none; }

.layrow   { height: 40px; }
.buyrow   { height: 44px; }
.boxrow   { height: 146px; }
.placerow { height: 44px; }

/* ON / OFF puck */
.puck {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%); z-index: 14;
  width: 36px; height: 36px; border-radius: 50%; text-align: center;
  font: 900 12px/30px Arial, sans-serif;
  background: radial-gradient(circle at 38% 30%, #fff, #d8d8d8);
  color: #111; border: 3px solid #111;
  box-shadow: 0 3px 6px rgba(0,0,0,.55);
}
.puck.off-park {
  position: static; transform: none; margin-left: 22px;
  background: radial-gradient(circle at 38% 30%, #3a3a3a, #0b0b0b);
  color: #fff; border-color: #e6e6e6;
}

.spot { position: relative; cursor: pointer; user-select: none; touch-action: none; }
.chips {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; z-index: 6;
}

.buy-spot {
  border: 2px dashed rgba(255,255,255,.4); border-radius: 22px;
  background: rgba(0,0,0,.2); display: grid; place-items: center;
}
.buy-spot .lbl { font: 800 15px/1 Arial, sans-serif; color: rgba(255,255,255,.72); letter-spacing: 1px; }
.buy-spot .chips .chip { --s: 36px; }

.numbox {
  position: relative; border: 2px solid #f6ecac; border-radius: 5px;
  background: linear-gradient(#3b8f24, #1b5c14);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 3px 8px rgba(0,0,0,.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-top: 36px; overflow: visible;
}
.numbox.is-point { border-color: #fff; box-shadow: 0 0 16px 3px rgba(255,255,255,.5); }
.boxnum {
  font: 900 58px/1 'Arial Narrow', Impact, sans-serif; color: #fff; letter-spacing: 1px;
  text-shadow: 0 3px 4px rgba(0,0,0,.45);
}
.numbox.n6 .boxnum, .numbox.n9 .boxnum { font-size: 34px; letter-spacing: 0; }
.numbox.n10 .boxnum, .numbox.n11 .boxnum, .numbox.n12 .boxnum { font-size: 50px; }
.come-holder {
  position: absolute; top: 3px; left: 3px; right: 3px; height: 36px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
/* Standard craps stacks don't-come action above come action inside the box,
   which is how a live layout separates them. */
.variant-standard .come-holder { top: 34px; }
.variant-standard .numbox { padding-top: 66px; }
.variant-standard .numbox.n6 .boxnum,
.variant-standard .numbox.n9 .boxnum { font-size: 40px; }
.come-chip { display: grid; place-items: center; }
.come-chip .chip { --s: 34px; }
.come-tag {
  position: absolute; z-index: 4; top: -5px; left: 50%; transform: translateX(-50%);
  background: #a3122f; color: #fff; font: 800 7px/1.4 Arial, sans-serif;
  padding: 0 3px; border-radius: 2px;
}
.odds-spot {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px dashed rgba(255,255,255,.5); opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.odds-spot.live { opacity: 1; pointer-events: auto; }
.odds-spot .lbl { font: 800 8px/1 Arial, sans-serif; color: rgba(255,255,255,.8); }
.odds-spot .chips .chip { --s: 32px; }

.place-spot {
  border: 1px solid #cbe0b4; border-radius: 4px;
  background: linear-gradient(#1d5c14, #0d3a0c);
  display: grid; place-items: center; text-align: center;
}
.place-spot .lbl { font: 800 12px/1.05 Arial, sans-serif; color: #fff; letter-spacing: .4px; }
.place-spot .lbl em { display: block; font: 700 10px/1.2 Arial, sans-serif; color: #ffe98a; font-style: normal; }
.place-spot .chips .chip { --s: 34px; }

/* ---- don't side ---- */
.lay-spot {
  border: 1px solid #e0b4b4; border-radius: 4px;
  background: linear-gradient(#5c1414, #380c0c);
  display: grid; place-items: center; text-align: center;
}
.lay-spot .lbl { font: 800 12px/1.05 Arial, sans-serif; color: #fff; letter-spacing: .4px; }
.lay-spot .lbl em { display: block; font: 700 10px/1.2 Arial, sans-serif; color: #ffc9c9; font-style: normal; }
.lay-spot .chips .chip { --s: 32px; }

.dc-box {
  border: 2px solid #f6ecac; border-radius: 5px;
  background: linear-gradient(#1d5c14, #0b3309);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 3px; padding-top: 10px;
}
.dc-word { font: 900 22px/1.05 'Arial Narrow', Impact, sans-serif; color: #fff; text-align: center; letter-spacing: 1px; }
.bar-note {
  display: flex; align-items: center; gap: 3px;
  font: 800 11px/1 Arial, sans-serif; color: #ffe98a;
}
/* keep the chip low so the box still reads as DON'T COME */
.dc-box .chips { align-items: flex-end; padding-bottom: 6px; }
.dc-box .chips .chip { --s: 38px; }

.dc-holder {
  position: absolute; top: 2px; left: 3px; right: 3px; height: 30px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
.dc-chip { display: grid; place-items: center; }
.dc-chip .chip { --s: 28px; }
.dc-tag {
  position: absolute; z-index: 4; top: -4px; left: 50%; transform: translateX(-50%);
  background: #1c4f8f; color: #fff; font: 800 7px/1.4 Arial, sans-serif;
  padding: 0 3px; border-radius: 2px;
}
.odds-spot.dc-odds { width: 28px; height: 28px; }
.odds-spot.dc-odds .chips .chip { --s: 26px; }

.dont-box { background: rgba(90,10,10,.3); }
.dont-word { font-size: 30px; color: #ff8b7d; letter-spacing: 2px; }
.bar-dice { display: flex; gap: 3px; margin-left: 8px; }
.dont-box { display: flex; align-items: center; justify-content: center; }

.unused { opacity: .18; pointer-events: none; filter: grayscale(1); }
.dim { filter: brightness(.82) saturate(.75); }

/* ------------------------------------------------------------- lower felt */
.lower { flex: 1; min-height: 0; display: flex; gap: 8px; padding-top: 2px; }
.props-col { width: 268px; flex: none; display: flex; gap: 8px; }
.circles { display: flex; flex-direction: column; justify-content: space-around; align-items: center; }
.circle {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  border: 3px solid #fff; background: rgba(0,0,0,.16);
}
.circle .lbl { font: 800 26px/1 Arial, sans-serif; color: #fff; }
.circle .chips .chip { --s: 38px; }
.actionbtns { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 6px; padding: 4px 0; }
.fbtn {
  cursor: pointer; border-radius: 6px; padding: 9px 6px;
  border: 2px solid #a7b79a; background: linear-gradient(#e8ecdf, #b9c3ac);
  color: #1b2416; font: 800 14px/1 Arial, sans-serif; letter-spacing: 1px;
}
.fbtn:hover:not(:disabled) { background: linear-gradient(#f6f8ee, #c9d3bc); }
.fbtn:disabled { opacity: .42; cursor: default; }
.fbtn.engaged { background: linear-gradient(#ffd75e, #e0a41c); border-color: #fff3a0; }
.fbtn.small { font-size: 12px; line-height: 1.15; padding: 7px 6px; }
#btnComeOutWorking.engaged {
  background: linear-gradient(#8ff07a, #2f9c22); border-color: #d9ffd0; color: #06210a;
  box-shadow: 0 0 12px rgba(120,255,120,.55);
}

.felt-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.come-box, .field-box, .pass-box {
  position: relative; border: 3px solid #fff; border-radius: 6px;
  background: rgba(0,0,0,.1); display: grid; place-items: center;
}
.come-box  { flex: 1.05; }
.field-box { flex: 1.15; }
.passrow   { flex: 1.1; display: flex; gap: 7px; }
.odds-box {
  width: 118px; flex: none; border: 3px dashed rgba(255,255,255,.55); border-radius: 6px;
  display: grid; place-items: center; opacity: .35; pointer-events: none; transition: opacity .2s;
}
.odds-box.live { opacity: 1; pointer-events: auto; border-style: solid; }
.odds-box .lbl { font: 800 15px/1.05 Arial, sans-serif; color: #fff; text-align: center; letter-spacing: 1px; }
.odds-box .chips .chip { --s: 46px; }
.pass-box { flex: 1; }
.big-word {
  font: 900 40px/1 'Arial Narrow', Impact, sans-serif; letter-spacing: 4px;
  color: #ff2f6d; text-shadow: 0 2px 4px rgba(0,0,0,.5);
}
.pass-word { color: #49c9ff; }
.field-word { font-size: 36px; color: #fff; letter-spacing: 5px; margin: 0 6px; }
.field-box { padding: 4px 10px; }
.field-nums { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.fnum { position: relative; font: 900 32px/1 'Arial Narrow', Impact, sans-serif; color: #fff; }
.fnum.dbl { font-size: 36px; }
.fnum.dbl i {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -13px;
  font: 700 7px/1.1 Arial, sans-serif; font-style: normal; color: #ffe98a; white-space: nowrap;
}
.fdot { color: rgba(255,255,255,.7); font-size: 16px; }
.come-box .chips, .field-box .chips, .pass-box .chips { align-items: center; }
.come-box .chips .chip, .field-box .chips .chip, .pass-box .chips .chip { --s: 48px; }

/* --------------------------------------------------------- win condition */
.panel-right { font: 800 11px/1 Arial, sans-serif; }
.wc-head {
  text-align: center; padding: 4px 2px; border: 1px solid #c9a13a; border-radius: 3px;
  background: rgba(0,0,0,.45); font-size: 12px; letter-spacing: 1px; color: #fff; flex: none;
}
.wc-row {
  flex: 1; display: flex; align-items: center; gap: 4px; padding: 0 3px;
  border-radius: 3px; background: rgba(0,0,0,.18); min-height: 0;
}
.wc-n {
  width: 24px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 2px;
  background: linear-gradient(#4aa8e0, #1c6fa8); color: #fff; font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.wc-row[data-wc="7"] .wc-n { background: linear-gradient(#e9edf2, #b6bfc9); color: #23262b; }
.wc-v { flex: 1; text-align: right; font: 800 11px/1 'Courier New', monospace; color: #cfe0c2; }
.wc-row.pos { background: rgba(40,180,70,.3); }
.wc-row.pos .wc-v { color: #9dff9d; }
.wc-row.neg { background: rgba(200,40,40,.3); }
.wc-row.neg .wc-v { color: #ff9d9d; }
.wc-row.is-point { box-shadow: inset 0 0 0 2px #ffe98a; }

/* ------------------------------------------------------------- status line */
/* Its own row at the foot of the felt so a sticky message never covers a bet. */
.status {
  flex: none; height: 34px; align-self: center; max-width: 100%;
  display: flex; align-items: center; padding: 0 24px; border-radius: 17px;
  white-space: nowrap; overflow: hidden;
  background: rgba(4,14,4,.86); border: 2px solid #ffe98a;
  font: 800 19px/1 Arial, sans-serif; letter-spacing: 1.6px; color: #fff;
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity .2s, transform .2s;
  box-shadow: 0 6px 22px rgba(0,0,0,.55);
}
.status.show { opacity: 1; transform: none; }
.status.good { border-color: #7dff8d; color: #d9ffdd; }
.status.bad  { border-color: #ff6b6b; color: #ffd9d9; }
.status.info { border-color: #7fd4ff; color: #e2f5ff; }

/* ---------------------------------------------------------- history strip */
.historystrip {
  flex: none; height: 54px; margin: 2px 8px 0; display: flex; gap: 3px; align-items: stretch;
  padding: 3px 5px; overflow-x: auto; overflow-y: hidden;
  background: linear-gradient(#0a1a0a, #041004);
  border: 1px solid #c9a13a; border-radius: 4px; z-index: 20;
  scrollbar-width: none;
}
.historystrip::-webkit-scrollbar { display: none; }
.hist {
  flex: none; width: 52px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; border-radius: 3px; position: relative;
  background: rgba(255,255,255,.07);
}
.hist-n { font: 800 16px/1 Arial, sans-serif; color: #fff; }
.hist-d { display: flex; gap: 2px; }
.hist-d .die { --s: 17px; }
.hist.sevenout { background: rgba(210,40,40,.55); }
.hist.crapsout { background: rgba(210,90,40,.5); }
.hist.natural  { background: rgba(40,170,70,.5); }
.hist.pointmade{ background: rgba(230,190,40,.55); }
.hist.pointset { background: rgba(50,120,210,.5); }
.hist.newest { box-shadow: 0 0 0 2px #7dff8d; }
.hist-mark {
  position: absolute; top: -1px; right: 1px; font-size: 10px; color: #7dff8d;
}

/* -------------------------------------------------------------------- rack */
.rack {
  flex: none; height: 94px; display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; z-index: 30;
  background: linear-gradient(#15181c, #05070a);
  border-top: 1px solid #b99433;
}
.rbtn {
  flex: none; width: 104px; height: 70px; cursor: pointer; border-radius: 8px;
  border: 1px solid #6d7480; background: linear-gradient(#39414c, #1c2128); color: #e9eef5;
  font: 700 14px/1.2 Arial, sans-serif; letter-spacing: .4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.rbtn i { font-size: 19px; font-style: normal; color: #ffd75e; }
.rbtn:hover:not(:disabled) { background: linear-gradient(#4a5460, #262c35); }
.rbtn:disabled { opacity: .38; cursor: default; }
.rbtn.clearall i { color: #ff8b7d; }
.chiprack { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; }
.rackchip {
  --s: 66px; border: none; padding: 0; cursor: pointer; transition: transform .14s;
}
.rackchip .chip-face { font-size: 19px; }
.rackchip.c1000 .chip-face { font-size: 15px; }
.rackchip:hover { transform: translateY(-5px); }
.rackchip.selected {
  transform: translateY(-9px);
  outline: 3px solid #ffe98a; outline-offset: 3px;
  filter: drop-shadow(0 0 10px rgba(255,235,120,.95));
}
.rackchip.unaffordable { opacity: .35; }
.rollbtn {
  flex: none; width: 150px; height: 78px; cursor: pointer; border-radius: 10px;
  border: 3px solid #9dff9d; color: #06210a; letter-spacing: 3px;
  background: linear-gradient(#a9f57a, #2f9c22);
  font: 900 34px/1 'Arial Narrow', Impact, sans-serif;
  box-shadow: 0 0 20px rgba(120,255,120,.45), inset 0 2px 0 rgba(255,255,255,.6);
}
.rollbtn:hover:not(:disabled) { filter: brightness(1.12); }
.rollbtn:disabled {
  opacity: .45; cursor: default; box-shadow: none;
  background: linear-gradient(#8d968d, #4a534a); border-color: #b7c0b7;
}
.rollbtn.ready { animation: rollPulse 1.9s ease-in-out infinite; }
@keyframes rollPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(120,255,120,.4), inset 0 2px 0 rgba(255,255,255,.6); }
  50%      { box-shadow: 0 0 30px rgba(150,255,150,.85), inset 0 2px 0 rgba(255,255,255,.6); }
}
body.locked .rack, body.locked .main { pointer-events: none; }
body.locked .rollbtn { animation: none; }

/* ---------------------------------------------------------------------- fx */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 55; overflow: hidden; }
#fxTop { position: fixed; inset: 0; pointer-events: none; z-index: 250; overflow: hidden; }
.ghostchip {
  position: absolute; transform: translate(-50%, -50%) scale(1.12);
  pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6));
}
.droptarget { outline: 2px dashed rgba(255,255,255,.75); outline-offset: 1px; }
.drophover  { outline: 3px solid #ffe98a; outline-offset: 2px; background: rgba(255,235,140,.2); }
.lifting .chips { opacity: .35; }
.floatwin {
  position: absolute; transform: translate(-50%, -50%);
  font: 800 17px/1 Arial, sans-serif; white-space: nowrap;
  animation: floatUp 1.7s ease-out forwards; text-shadow: 0 2px 4px rgba(0,0,0,.85);
}
.floatwin.win  { color: #a9ff9d; }
.floatwin.lose { color: #ff9d9d; }
.floatwin.move { color: #ffe98a; }
@keyframes floatUp {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  18%  { opacity: 1; transform: translate(-50%, -85%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -240%) scale(1); }
}
.flash-win  { animation: flashWin .85s ease-out; }
.flash-lose { animation: flashLose .85s ease-out; }
@keyframes flashWin {
  0%, 100% { box-shadow: none; }
  25% { box-shadow: 0 0 0 3px #a9ff9d, 0 0 22px 6px rgba(140,255,140,.75); }
}
@keyframes flashLose {
  0%, 100% { box-shadow: none; }
  25% { box-shadow: 0 0 0 3px #ff8b7d, 0 0 18px 4px rgba(255,90,80,.6); }
}
.confetti {
  position: absolute; top: -14px; width: 8px; height: 13px; border-radius: 2px;
  animation: fall 2.4s linear forwards;
}
@keyframes fall {
  0%   { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(1020px) rotate(900deg); opacity: .1; }
}

/* ------------------------------------------------------------------ modals */
#modalScrim { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 300; }
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(860px, 94vw); max-height: 90vh; z-index: 310;
  display: flex; flex-direction: column;
  background: linear-gradient(#141a14, #090d09);
  border: 2px solid #c9a13a; border-radius: 10px;
  box-shadow: 0 26px 70px rgba(0,0,0,.85);
  font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
.modal.small { width: min(430px, 92vw); }
.modal-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid #3c4a3c;
  font: 800 15px/1 Arial, sans-serif; letter-spacing: 2px; color: #ffd75e;
}
.modal-close {
  border: none; background: none; color: #9aa8b6; font-size: 19px; cursor: pointer;
}
.modal-close:hover { color: #fff; }
.modal-body { padding: 14px 20px 20px; overflow-y: auto; font-size: 13.5px; line-height: 1.55; color: #dbe4dd; }
.modal-body h3 {
  margin: 18px 0 6px; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: #9dff9d;
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body ul { margin: 4px 0; padding-left: 20px; }
.modal-body li { margin: 3px 0; }
.modal-body b { color: #fff; }
.modal-body table { border-collapse: collapse; margin: 6px 0; width: 100%; }
.modal-body th, .modal-body td {
  border: 1px solid #33403a; padding: 4px 8px; text-align: center; font-size: 12.5px;
}
.modal-body th { background: rgba(255,215,94,.13); color: #ffd75e; }
.fineprint { color: #8fa094; font-size: 12px; }
.note { color: #ffb86b; font-size: 12px; margin: 2px 0 8px; }

.setrow { display: flex; align-items: center; gap: 10px; margin: 9px 0; }
.setrow label { flex: 1; }
.setrow label em {
  display: block; font-style: normal; font-size: 11.5px; color: #8fa094;
}
.setrow.check { gap: 8px; }
.setrow.check label { flex: 1; order: 2; }
.setrow.check input { order: 1; width: 17px; height: 17px; accent-color: #2f9c22; }
.setrow select, .setrow input[type="number"] {
  background: #0d130d; color: #fff; border: 1px solid #4a5a4a; border-radius: 4px;
  padding: 6px 8px; font: 600 13px/1 inherit; min-width: 130px;
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0; }
.stats div {
  display: flex; justify-content: space-between; padding: 5px 9px;
  background: rgba(255,255,255,.05); border-radius: 4px;
}
.stats span { color: #92a396; }
.stats b { color: #ffd75e; font-family: 'Courier New', monospace; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.mbtn {
  cursor: pointer; padding: 10px 16px; border-radius: 6px; flex: 1;
  border: 1px solid #6d7480; background: linear-gradient(#39414c, #1c2128); color: #e9eef5;
  font: 700 13px/1 Arial, sans-serif; letter-spacing: 1px;
}
.mbtn:hover { background: linear-gradient(#4a5460, #262c35); }
.mbtn.primary { background: linear-gradient(#2f9c22, #196312); border-color: #9dff9d; }
.mbtn.danger  { background: linear-gradient(#a5342a, #6d1c14); border-color: #ff9d8d; }
.creditgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; }
.ticket { text-align: center; }
.ticket-paper {
  background: linear-gradient(#fffdf2, #efe9d4); color: #1b1b1b; border-radius: 4px;
  padding: 18px; margin-bottom: 14px; font-family: 'Courier New', monospace;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}
.t-brand { font-size: 12px; letter-spacing: 3px; }
.t-amt { font-size: 38px; font-weight: 800; margin: 8px 0; }
.t-fine { font-size: 10px; letter-spacing: 1px; color: #4a4a4a; }
