/* Casino games: the Groovy Lounge at night. Same palette as the rest, on a dark ground. */

body.casino,
body.lounge {
  --night: #2b1a10;
  --night-ray: #3a2216;
  --felt-1: #2fae9f;
  --felt-2: #1f6f66;
  --felt-3: #185a53;
  --rail: #a0522d;
  --neon: #ffe680;
  background-color: var(--night);
  background-image: repeating-conic-gradient(from 0deg at 50% 0%, var(--night-ray) 0deg 6deg, var(--night) 6deg 12deg);
  color: var(--bar-ink);
}

.casino .toast {
  top: 36%;
  z-index: 300;
}

.sl .ptitle {
  text-transform: uppercase;
}

/* ---- chip balance and chip bank ---------------------------------------------------- */

.bankpill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 6px;
  border: 0;
  border-radius: 999px;
  background: var(--night, #2b1a10);
  box-shadow: inset 0 0 0 2px var(--accent-2);
  color: var(--accent-2);
  font: 400 21px var(--font-display);
  cursor: pointer;
  flex: none;
}

.bankpill.glow {
  animation: bank-glow 1.4s ease-in-out infinite;
}

.chipi {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-3);
  border: 3px dashed #fff1d6;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px var(--accent-3), 0 3px 0 2px #7a1f15;
  flex: none;
}

.bank-bal {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 14px;
}

.bank-bal .chipi {
  width: 46px;
  height: 46px;
  border-width: 4px;
}

.bank-bal small {
  display: block;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bank-bal b {
  font: 400 38px/1 var(--font-display);
  color: var(--accent-3);
}

.claim {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fbe0b4;
}

.claim > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.claim b {
  font-weight: 900;
  font-size: 16px;
}

.claim .btn {
  flex: none;
}

.claim .btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.bank-body .fine,
.modal .why {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.modal .why {
  margin: 0 0 10px;
  color: var(--accent-3);
  font-size: 15px;
}

/* The helper switch in the how-to-play card. */
.helper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fbe0b4;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}

.helper input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 50px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: #c9b49a;
  flex: none;
  cursor: pointer;
  transition: background 0.2s;
}

.helper input::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.helper input:checked {
  background: #2a9d8f;
}

.helper input:checked::after {
  transform: translateX(22px);
}

.helper input:focus-visible {
  outline: 3px solid var(--accent-3);
  outline-offset: 2px;
}

.helper small {
  display: block;
  font-weight: 700;
  font-size: 13px;
  opacity: 0.8;
}

/* ---- chips ------------------------------------------------------------------------ */

.disc,
.chipb {
  border-radius: 50%;
  border: 3px dashed #fff1d6;
  box-sizing: border-box;
}

.c25 { background: #2a9d8f; --edge: #1f6f66; }
.c100 { background: #c0392b; --edge: #7a1f15; }
.c500 { background: #7b4fa0; --edge: #4a2c5e; }
.c1k { background: #2b1a10; --edge: #000; }

.chipb {
  width: 56px;
  height: 56px;
  color: #fff1d6;
  font: 900 14px var(--font-body);
  box-shadow: 0 0 0 3px var(--edge), 0 4px 0 3px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.12s;
}

.chipb.c1k {
  box-shadow: 0 0 0 3px #4a2c1a, 0 4px 0 3px rgba(0, 0, 0, 0.5);
}

.chipb:hover {
  transform: translateY(-3px);
}

.chipb:active {
  transform: translateY(1px);
}

.stack {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
}

.stack .disc {
  position: absolute;
  left: 0;
  bottom: calc(var(--k) * 5px);
  width: 44px;
  height: 44px;
  box-shadow: 0 0 0 2px var(--edge), 0 3px 0 2px rgba(0, 0, 0, 0.35);
  animation: chip-in 0.25s var(--ease) both;
}

/* ---- blackjack --------------------------------------------------------------------- */

.bj {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.bj .felt {
  position: absolute;
  left: 2%;
  right: 2%;
  top: -40px;
  bottom: calc(var(--bar-h) + 6px);
  border-radius: 0 0 50% 50% / 0 0 40% 40%;
  background: radial-gradient(ellipse at 50% 35%, var(--felt-1) 0%, var(--felt-2) 70%, var(--felt-3) 100%);
  box-shadow: inset 0 0 0 12px var(--rail), inset 0 0 0 16px var(--ink), inset 0 0 70px rgba(0, 0, 0, 0.35);
}

.bj .arc {
  position: absolute;
  left: 50%;
  width: min(760px, 92%);
  transform: translateX(-50%);
  pointer-events: none;
}

.bj .arc .a1 {
  font: 400 34px var(--font-display);
  fill: var(--accent-2);
  letter-spacing: 2px;
}

.bj .arc .a2 {
  font: 900 15px var(--font-body);
  fill: #fff1d6;
  letter-spacing: 3px;
  opacity: 0.85;
}

.bj.narrow .arc .a1 {
  font-size: 44px;
}

.bj.narrow .arc .a2 {
  display: none;
}

.bj .shoe,
.bj .tray {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cw);
  height: var(--ch);
}

.bj .sback {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--cw) * 0.15);
  border: 2px solid var(--card-edge);
  background: var(--card-back);
  box-shadow: inset 0 0 0 calc(var(--cw) * 0.05) var(--card-face), 0 4px 0 rgba(0, 0, 0, 0.35);
  transform: rotate(-4deg);
}

.bj .sback.b2 {
  transform: rotate(3deg) translate(3px, -3px);
}

.bj .tray {
  border-radius: calc(var(--cw) * 0.15);
  border: 3px dashed rgba(255, 241, 214, 0.35);
  box-sizing: border-box;
}

.bj .tray.has {
  border-style: solid;
  border-color: rgba(255, 241, 214, 0.15);
}

.bj .shoe-count,
.bj .tray-count {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cw);
  text-align: center;
  font: 900 12px var(--font-body);
  letter-spacing: 0.06em;
  color: #fff1d6;
  white-space: nowrap;
}

.bj .cards .card {
  cursor: default;
  transition: transform 0.38s var(--ease) var(--d, 0ms);
}

.bj .cards.no-anim .card,
.bj .card.no-anim {
  transition: none !important;
}

.bj .total,
.bj .dtotal {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 46px;
  height: 40px;
  padding: 0 10px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--night);
  color: var(--neon);
  font: 400 22px/40px var(--font-display);
  text-align: center;
  box-shadow: 0 0 0 3px var(--accent-2);
}

.bj .spots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.bj .spot {
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bj .spot::before {
  content: '';
  position: absolute;
  left: 4px;
  top: -6px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px dashed rgba(255, 241, 214, 0.45);
}

.bj .spot.on::before {
  border-color: var(--accent-2);
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.6);
}

.bj .spot .stack {
  margin-top: 6px;
}

.bj .spot .amt {
  font: 900 14px var(--font-body);
  color: #fff1d6;
  text-shadow: 0 1px 0 #000;
}

.bj .htotal.on {
  box-shadow: 0 0 0 3px var(--accent-2), 0 0 18px var(--accent-2);
}

.bj .res {
  position: absolute;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff1d6;
  color: var(--ink);
  font: 400 19px var(--font-display);
  white-space: nowrap;
  box-shadow: 0 0 0 3px var(--ink);
  animation: res-in 0.4s var(--ease) both;
  z-index: 40;
}

.bj .res b {
  font: 900 15px var(--font-body);
  color: var(--accent-3);
}

.bj .res.r-blackjack,
.bj .res.r-win {
  background: var(--accent-2);
  box-shadow: 0 0 0 3px var(--ink), 0 0 24px rgba(241, 196, 15, 0.8);
}

.bj .res.r-lose,
.bj .res.r-bust {
  background: #6b3f23;
  color: #fff1d6;
}

.bj .htotal {
  position: absolute;
}

.bj .coach {
  position: absolute;
  right: 3%;
  top: 38%;
  width: min(300px, 30%);
  padding: 14px 18px;
  border-radius: 20px;
  background: #fff1d6;
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--ink), 0 10px 24px rgba(0, 0, 0, 0.35);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  animation: float 2.2s ease-in-out infinite;
  z-index: 45;
}

.bj .coach b {
  display: block;
  margin-bottom: 4px;
  font: 400 20px var(--font-display);
  color: var(--accent-3);
  text-transform: none;
}

.bj.narrow .coach {
  left: 10px;
  right: 10px;
  top: auto;
  bottom: calc(var(--bar-h) + 8px);
  width: auto;
  padding: 8px 12px;
  font-size: 13px;
  animation: none;
}

.bj.narrow .coach b {
  display: inline;
  font-size: 15px;
  margin-right: 6px;
}

.bj .note {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translateX(-50%);
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--night);
  color: var(--neon);
  font: 400 22px var(--font-display);
  box-shadow: 0 0 0 3px var(--accent-2);
  z-index: 60;
  white-space: nowrap;
}

.bjbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
  box-sizing: border-box;
  background: rgba(43, 26, 16, 0.92);
  box-shadow: 0 -3px 0 #6b3f23;
  flex-wrap: wrap;
  align-content: center;
}

.bjbar .rack {
  display: flex;
  gap: 12px;
  margin-right: 8px;
}

.bjbar .betinfo {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  line-height: 1.1;
}

.bjbar .betinfo small,
.bjbar .betinfo span {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.bjbar .betinfo span {
  letter-spacing: 0.02em;
  text-transform: none;
  color: #fff1d6;
  opacity: 0.75;
}

.bjbar .betinfo b {
  font: 400 26px var(--font-display);
  color: var(--neon);
}

.bbtn {
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #fff1d6;
  color: var(--ink);
  font: 900 16px var(--font-body);
  box-shadow: 0 4px 0 var(--rail);
  cursor: pointer;
}

.bbtn.ghost {
  background: transparent;
  color: #fff1d6;
  box-shadow: inset 0 0 0 2px #fff1d6;
}

.bbtn.deal {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 0 #a0522d, 0 0 0 3px var(--accent-2);
  font: 400 22px var(--font-display);
  padding: 0 30px;
}

.bbtn:disabled,
.bjbar .act:disabled {
  opacity: 0.35;
  cursor: default;
}

.bjbar .ask {
  font-weight: 800;
  font-size: 16px;
  color: #fff1d6;
}

.bjbar .wait {
  font: 400 20px var(--font-display);
  color: var(--neon);
  opacity: 0.8;
}

.bjbar .act {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  height: 64px;
  padding: 0 14px;
  border: 0;
  border-radius: 18px;
  font: 400 22px var(--font-display);
  color: #fff1d6;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.bjbar .act small {
  font: 800 12px var(--font-body);
  opacity: 0.85;
}

.a-hit { background: #2a9d8f; }
.a-stand { background: #c0392b; }
.a-double { background: #e67e22; color: #2b1407 !important; }
.a-split { background: #7b4fa0; }
.a-surrender { background: #6b3f23; }

.bjbar .act.hot {
  box-shadow: 0 0 0 4px var(--accent-2), 0 5px 0 rgba(0, 0, 0, 0.4), 0 0 26px rgba(241, 196, 15, 0.8);
  animation: pulse 1s ease-in-out infinite;
}

.bj.narrow .bjbar {
  gap: 8px;
  padding: 8px;
}

.bj.narrow .bjbar .rack {
  gap: 10px;
  margin: 0;
}

.bj.narrow .chipb {
  width: 50px;
  height: 50px;
}

.bj.narrow .bjbar .act {
  min-width: 0;
  flex: 1 1 28%;
  height: 52px;
  font-size: 18px;
}

.bj.narrow .bbtn {
  height: 46px;
  padding: 0 18px;
}

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

.sl {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sl .cab {
  position: relative;
  width: var(--cab-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 16px;
  box-sizing: border-box;
  border-radius: 36px 36px 24px 24px;
  background: linear-gradient(#c0392b, #7a1f15);
  box-shadow: 0 0 0 6px var(--ink), 0 0 0 12px var(--accent-2), 0 0 60px rgba(241, 196, 15, 0.4);
}

.sl .topper {
  width: 100%;
}

.sl .bulbs {
  position: relative;
  height: 92px;
  border-radius: 24px;
  background: radial-gradient(circle at 25% 50%, #fff3b0 0 4px, transparent 5px) 0 0 / 20px 20px,
    radial-gradient(circle at 75% 50%, #e76f9a 0 4px, transparent 5px) 0 0 / 20px 20px, var(--ink);
  animation: chase 0.45s steps(1) infinite;
}

.sl .bulbs .inner {
  position: absolute;
  inset: 11px;
  border-radius: 15px;
  background: var(--night);
  box-shadow: inset 0 0 0 3px var(--accent-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sl .bulbs small {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: #e76f9a;
}

.neon {
  font-family: var(--font-display);
  color: var(--neon, #ffe680);
  text-shadow: 0 0 6px #f1c40f, 0 0 18px #e67e22, 0 0 34px #c0392b;
}

.sl .bulbs .neon {
  font-size: 46px;
  line-height: 1;
}

.sl .glass {
  position: relative;
  padding: 12px;
  border-radius: 20px;
  background: var(--ink);
  box-shadow: inset 0 0 0 4px var(--accent-2), 0 6px 0 #2b1a10;
}

.sl .reels {
  display: grid;
  grid-template-columns: repeat(5, var(--cs));
  gap: 6px;
}

.sl .reel {
  position: relative;
  width: var(--cs);
  height: calc(var(--cs) * 3);
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(#d9c9a8, #fffaf0 16%, #fffaf0 84%, #d9c9a8);
}

.sl .reel::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 14px 14px -8px rgba(0, 0, 0, 0.3), inset 0 -14px 14px -8px rgba(0, 0, 0, 0.3);
}

.sl .strip {
  will-change: transform;
}

.sl .reel.blur .strip {
  filter: blur(1.4px);
}

.sl .sym {
  width: var(--cs);
  height: var(--cs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sl .sym img {
  width: 76%;
  height: 76%;
  user-select: none;
  -webkit-user-drag: none;
}

.sl .sym.win {
  background: radial-gradient(circle, #fff3b0 0 40%, #f1c40f 72%);
  animation: glow-cell 0.5s ease-in-out infinite alternate;
}

.sl .sym.win img {
  animation: hop 0.5s ease-in-out infinite alternate;
}

.sl .sym.dim img {
  opacity: 0.35;
  filter: grayscale(0.6);
}

.sl .lines {
  position: absolute;
  left: 12px;
  top: 12px;
  width: calc(var(--cs) * 5 + 24px);
  height: calc(var(--cs) * 3);
  overflow: visible;
  pointer-events: none;
}

.sl .lines polyline {
  fill: none;
  stroke-width: 7;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: 0.92;
  filter: drop-shadow(0 0 6px rgba(241, 196, 15, 0.9));
}

.sl .ticker {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--night);
  color: var(--neon);
  font: 800 13px var(--font-body);
  white-space: nowrap;
  box-shadow: 0 0 0 2px var(--accent-2);
}

.sl .ticker:empty {
  display: none;
}

.sl .party {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(43, 26, 16, 0.45);
  cursor: pointer;
  z-index: 5;
}

.sl .party[hidden] {
  display: none;
}

.sl .burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1000px;
  height: 1000px;
  margin: -500px 0 0 -500px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(241, 196, 15, 0.55) 0deg 10deg, rgba(230, 126, 34, 0) 10deg 20deg);
  animation: spin 8s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 0 22%, transparent 60%);
  mask: radial-gradient(circle, #000 0 22%, transparent 60%);
}

.sl .ptitle {
  position: relative;
  font: 400 clamp(40px, calc(var(--cs) * 0.8), 104px) / 1 var(--font-display);
  color: var(--accent-2);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 #c0392b, 0 12px 0 var(--ink), 0 0 40px #f1c40f;
  animation: boom 0.9s ease-in-out infinite alternate;
  text-align: center;
}

.sl .party.lv3 .ptitle {
  color: #e76f9a;
}

.sl .pamt {
  position: relative;
  padding: 6px 26px;
  border-radius: 999px;
  background: var(--night);
  box-shadow: 0 0 0 4px var(--accent-2), 0 0 30px rgba(241, 196, 15, 0.7);
  font: 400 clamp(26px, calc(var(--cs) * 0.36), 46px) var(--font-display);
  color: #fff1d6;
}

.sl .coins img {
  position: absolute;
  top: -60px;
  width: 44px;
  height: 44px;
  animation: shower 1.6s linear infinite;
}

.sl .deck {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  box-sizing: border-box;
  border-radius: 22px;
  background: var(--night);
  box-shadow: inset 0 0 0 3px #6b3f23;
}

.sl .meters {
  display: flex;
  gap: 10px;
  flex: 1;
}

.sl .meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 84px;
  height: 78px;
  padding: 0 12px;
  border-radius: 16px;
  background: #120a05;
  box-shadow: inset 0 0 0 2px #6b3f23;
  flex: 1;
}

.sl .meter.lb {
  flex-direction: row;
  gap: 10px;
  flex: 1.5;
}

.sl .meter.lb > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sl .meter span {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
}

.sl .meter b {
  font: 400 25px var(--font-display);
  color: var(--neon);
  text-shadow: 0 0 8px rgba(241, 196, 15, 0.6);
}

.sl .meter.win {
  box-shadow: inset 0 0 0 3px var(--accent-2), 0 0 16px rgba(241, 196, 15, 0.35);
}

.sl .pm {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 900 20px var(--font-body);
  cursor: pointer;
  flex: none;
}

.sl .btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sl .btns .col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sl .sbtn {
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #fff1d6;
  color: var(--ink);
  font: 900 14px var(--font-body);
  box-shadow: 0 4px 0 var(--rail);
  cursor: pointer;
  white-space: nowrap;
}

.sl .sbtn.auto {
  background: #2a9d8f;
  color: #fff1d6;
  box-shadow: 0 4px 0 #1f6f66;
}

.sl .sbtn.auto.on {
  background: var(--accent-2);
  color: var(--ink);
  animation: pulse 1s ease-in-out infinite;
}

.sl .spin {
  width: 116px;
  height: 116px;
  margin-left: 6px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ff7a5c, #c0392b 60%, #7a1f15);
  box-shadow: 0 0 0 6px var(--accent-2), 0 0 0 10px var(--ink), 0 8px 0 10px #2b1a10, 0 0 30px rgba(241, 196, 15, 0.5);
  font: 400 28px var(--font-display);
  color: #fff1d6;
  text-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  animation: pulse 1.3s ease-in-out infinite;
  flex: none;
}

.sl .spin:disabled {
  animation: none;
  filter: grayscale(0.4) brightness(0.8);
  cursor: default;
}

.sl .spin:active {
  transform: translateY(4px);
}

.sl.narrow .cab {
  gap: 10px;
  padding: 10px 10px 12px;
  border-radius: 26px 26px 18px 18px;
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 8px var(--accent-2), 0 0 40px rgba(241, 196, 15, 0.4);
}

.sl.narrow .bulbs {
  height: 72px;
}

.sl.narrow .bulbs .inner {
  inset: 9px;
}

.sl.narrow .bulbs .neon {
  font-size: 32px;
}

.sl.narrow .bulbs small {
  font-size: 9px;
}

.sl.narrow .glass {
  padding: 8px;
}

.sl.narrow .reels {
  gap: 4px;
}

.sl.narrow .lines {
  left: 8px;
  top: 8px;
}

.sl.narrow .deck {
  flex-direction: column;
  padding: 10px;
  gap: 10px;
}

.sl.narrow .meters {
  width: 100%;
  gap: 6px;
  flex-wrap: wrap;
}

.sl.narrow .meter {
  min-width: 0;
  height: 60px;
  padding: 0 6px;
}

.sl.narrow .meter.lb {
  flex: 1 1 100%;
  height: 52px;
}

.sl.narrow .meter b {
  font-size: 20px;
}

.sl.narrow .btns {
  width: 100%;
  justify-content: space-between;
}

.sl.narrow .btns .spin {
  order: 1;
  margin: 0;
}

.sl.narrow .btns .auto {
  order: 2;
}

.sl.narrow .btns .col .sbtn {
  height: 40px;
}

.sl.narrow .sbtn {
  padding: 0 10px;
  font-size: 13px;
}

.sl.narrow .spin {
  width: 92px;
  height: 92px;
  font-size: 24px;
}

/* ---- the lounge (casino lobby) -------------------------------------------------- */

.lounge-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 20px 40px;
}

.lounge-top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;
}

.marquee {
  position: relative;
  flex: 999 1 520px;
  min-height: 200px;
  border-radius: 28px;
  background: radial-gradient(circle at 25% 50%, #fff3b0 0 4px, transparent 5px) 0 0 / 22px 22px,
    radial-gradient(circle at 75% 50%, #e67e22 0 4px, transparent 5px) 0 0 / 22px 22px, #6b3f23;
  animation: chase 0.6s steps(1) infinite;
  box-shadow: 0 0 30px rgba(241, 196, 15, 0.35);
}

.marquee .inner {
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  background: var(--night);
  box-shadow: inset 0 0 0 3px var(--accent-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}

.marquee .pre {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #e76f9a;
}

.marquee h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 70px);
  font-weight: 400;
  line-height: 1;
}

.marquee p {
  margin: 0;
  font-weight: 800;
  font-size: 18px;
}

.bankcard {
  flex: 1 1 360px;
  padding: 18px 20px;
  border-radius: 26px;
  background: #fff1d6;
  color: var(--ink);
  box-shadow: 0 0 0 5px var(--ink), 0 0 0 10px var(--accent-2), 0 18px 40px rgba(0, 0, 0, 0.45);
}

.bankcard .bank-bal {
  margin-top: 0;
}

.lounge .shelf-section h2 {
  color: var(--neon);
  text-shadow: 0 0 12px rgba(241, 196, 15, 0.5);
}

.lounge .game-card {
  box-shadow: 0 0 0 5px var(--ink), 0 14px 30px rgba(0, 0, 0, 0.45);
}

.lounge .soon {
  margin: 26px 0 0;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 241, 214, 0.08);
  box-shadow: inset 0 0 0 2px rgba(255, 241, 214, 0.2);
  font-weight: 800;
  text-align: center;
}

.lounge .site-foot,
.casino-fine {
  color: #fff1d6;
}

.casino-fine {
  margin: 22px 0 0;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
}

/* Lobby art for casino games. */
.game-art .mp-sym {
  width: 56px;
  height: 56px;
}

.game-art .mp-sym img,
.game-art .mp-sym {
  display: block;
}

.game-art .mp-sym img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.25));
}

/* ---- motion ------------------------------------------------------------------------ */

@keyframes chase {
  50% {
    background-position: 10px 0, 10px 0, 0 0;
  }
}

@keyframes bank-glow {
  50% {
    box-shadow: inset 0 0 0 2px var(--accent-2), 0 0 18px rgba(241, 196, 15, 0.9);
  }
}

@keyframes chip-in {
  from {
    transform: translateY(-14px);
    opacity: 0;
  }
}

@keyframes res-in {
  from {
    transform: translate(-50%, 10px) scale(0.6);
    opacity: 0;
  }
}

@keyframes float {
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulse {
  50% {
    transform: scale(1.05);
  }
}

@keyframes glow-cell {
  to {
    box-shadow: inset 0 0 0 4px #c0392b;
  }
}

@keyframes hop {
  to {
    transform: scale(1.12) rotate(-4deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes boom {
  from {
    transform: scale(0.94) rotate(-3deg);
  }
  to {
    transform: scale(1.06) rotate(2deg);
  }
}

@keyframes shower {
  from {
    transform: translateY(0) rotate(0);
  }
  to {
    transform: translateY(800px) rotate(540deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sl .bulbs,
  .marquee,
  .sl .spin,
  .bjbar .act.hot,
  .bj .coach,
  .sl .burst,
  .sl .ptitle {
    animation: none;
  }
}

/* ---- paytable (in the how-to-play card) -------------------------------------------- */

.paytable {
  width: 100%;
  border-collapse: collapse;
  font-weight: 800;
  font-size: 15px;
}

.paytable th,
.paytable td {
  padding: 3px 8px;
  border-bottom: 2px dotted #e0c9a0;
  text-align: center;
}

.paytable th[scope='row'] {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-weight: 800;
}

.paytable thead th {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.paytable td {
  color: var(--accent-3);
  font-weight: 900;
}

.paynote {
  margin: 8px 0 0;
  font-size: 13px;
}

/* Only two casino games so far: keep their cards the same size as the other lobby cards. */
#casino .games-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.lounge .games-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
}

.lounge .game-card {
  color: var(--ink);
}

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

.c50 { background: #e76f9a; --edge: #a8456b; }

.rl {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.rl .bowl {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #6b3f23 0 62%, var(--ink) 63% 100%);
  box-shadow: 0 0 0 7px var(--rail), 0 0 0 11px var(--ink), 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(241, 196, 15, 0.25);
}

.rl .wheel,
.rl .orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  user-select: none;
}

.rl .ball {
  --r: 0.455;
  position: absolute;
  left: 50%;
  top: calc((0.5 - var(--r)) * 100%);
  width: 4.4%;
  height: 4.4%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #fff, #d9d0c0);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}

.rl .ball[hidden] {
  display: none;
}

.rl .result {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 8px;
  border-radius: 999px;
  background: #fff1d6;
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 8px var(--accent-2), 0 0 24px rgba(241, 196, 15, 0.5);
  white-space: nowrap;
}

.rl .result b {
  display: block;
  font: 400 22px/1.1 var(--font-display);
  color: var(--accent-3);
}

.rl .result small {
  font-weight: 800;
  font-size: 12px;
}

.rl .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  font: 400 1em var(--font-display);
  color: #fff1d6;
  flex: none;
}

.rl .result .num {
  font-size: 22px;
  box-shadow: 0 0 0 3px var(--ink);
}

.rl .red { background: #c0392b; }
.rl .black { background: #2b1a10; }
.rl .green { background: #2a9d8f; }

.rl .hist {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.rl .hist i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 900 13px var(--font-body);
  font-style: normal;
  color: #fff1d6;
  box-shadow: 0 0 0 2px var(--ink);
}

.rl .hist i:first-child {
  box-shadow: 0 0 0 2px var(--accent-2);
}

.rl .layout {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rl .layout > * {
  pointer-events: auto;
}

.rl .felt2 {
  position: absolute;
  border-radius: 22px;
  background: radial-gradient(ellipse at 50% 40%, var(--felt-1), var(--felt-2));
  box-shadow: inset 0 0 0 8px var(--rail), inset 0 0 0 11px var(--ink), 0 16px 34px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.rl .cell {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(241, 196, 15, 0.85);
  background: transparent;
  color: #fff1d6;
  font: 900 13px var(--font-body);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.rl .cell:hover {
  background: rgba(255, 241, 214, 0.14);
}

.rl .cell .num {
  font-size: 16px;
}

.rl .layout.vertical .cell .num {
  font-size: 13px;
}

.rl .cell.hit {
  z-index: 1;
  animation: hit-glow 0.5s ease-in-out infinite alternate;
}

.rl .dia {
  width: 22px;
  height: 22px;
  transform: rotate(45deg);
  box-shadow: 0 0 0 2px #fff1d6;
}

.rl .layout.vertical .cell.k-word span:not(.dia) {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.rl .layout.vertical .cell.k-word[data-bet^='c'] span {
  writing-mode: horizontal-tb;
  transform: none;
}

.rl .layout.vertical .dia {
  width: 16px;
  height: 16px;
}

.rl .edge {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.rl .edge:hover {
  background: rgba(255, 230, 128, 0.55);
  box-shadow: 0 0 0 2px var(--accent-2);
}

.rl .bchip {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 3px dashed #fff1d6;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px var(--edge), 0 3px 0 2px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 900 10px var(--font-body);
  color: #fff1d6;
  pointer-events: none;
  z-index: 3;
  animation: chip-in 0.2s var(--ease) both;
}

.rl .layout.vertical .bchip {
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  font-size: 9px;
}

.rl .bchip.lost {
  opacity: 0.25;
  filter: grayscale(0.8);
  transition: opacity 0.6s;
}

.rl .bchip.won {
  box-shadow: 0 0 0 2px var(--edge), 0 0 16px 4px rgba(241, 196, 15, 0.9);
}

.rl .bchip em {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--ink);
  font: 900 11px var(--font-body);
  font-style: normal;
  white-space: nowrap;
}

.rbar {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.rl:not(.narrow) .rbar {
  right: 30px;
  bottom: 16px;
  left: calc(var(--rl-left, 520px));
}

.rbar .rack {
  display: flex;
  gap: 10px;
}

.rbar .chipb.sel {
  outline: 3px solid var(--neon);
  outline-offset: 4px;
  transform: translateY(-4px);
}

.rbar .betinfo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.rbar .betinfo small {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.rbar .betinfo b {
  font: 400 24px var(--font-display);
  color: var(--neon);
}

.rbar .rbtns {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px;
}

.rbar .rbtns .bbtn {
  height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.rbar .bbtn:disabled {
  opacity: 0.35;
}

.rl .spin {
  width: 108px;
  height: 108px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ff7a5c, #c0392b 60%, #7a1f15);
  box-shadow: 0 0 0 6px var(--accent-2), 0 0 0 10px var(--ink), 0 0 30px rgba(241, 196, 15, 0.5);
  font: 400 26px var(--font-display);
  color: #fff1d6;
  text-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  animation: pulse 1.3s ease-in-out infinite;
  flex: none;
}

.rl .spin:disabled {
  animation: none;
  filter: grayscale(0.4) brightness(0.8);
}

.rl .payout {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 18px;
  border-radius: 18px;
  background: #fff1d6;
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--ink), 0 10px 24px rgba(0, 0, 0, 0.35);
  font-weight: 800;
  font-size: 14px;
  z-index: 20;
  animation: res-in-plain 0.35s var(--ease) both;
}

.rl .payout b {
  font: 400 22px var(--font-display);
  color: var(--accent-3);
}

.rl:not(.narrow) .payout {
  left: var(--rl-left, 520px);
  bottom: 140px;
}

.rl.narrow .payout {
  left: 10px;
  right: 10px;
  bottom: 98px;
  padding: 6px 12px;
  font-size: 12px;
}

.rl.narrow .payout b {
  font-size: 17px;
}

.rl .result[hidden],
.rl .payout[hidden] {
  display: none;
}

.rl .cell.hit {
  background: rgba(241, 196, 15, 0.3);
}

.rl.narrow .rbar {
  left: 8px;
  right: 8px;
  bottom: 8px;
  gap: 8px;
  justify-content: space-between;
}

.rl.narrow .rbar .rack {
  gap: 6px;
}

.rl.narrow .chipb {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.rl.narrow .rbar .betinfo,
.rl.narrow .rbar .rbtns {
  display: none;
}

.rl.narrow .spin {
  width: 84px;
  height: 84px;
  font-size: 21px;
}

.rl.narrow .result {
  transform: none;
  padding: 5px 14px 5px 5px;
}

.rl.narrow .result .num {
  font-size: 16px;
}

.rl.narrow .result b {
  font-size: 17px;
}

.rl.narrow .hist {
  transform: none;
}

.rl.narrow .hist i {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.rl .mini-btns {
  position: absolute;
  display: flex;
  gap: 6px;
}

@keyframes hit-glow {
  to {
    background: rgba(241, 196, 15, 0.6);
    box-shadow: inset 0 0 0 3px var(--neon), 0 0 18px var(--accent-2);
  }
}

@keyframes res-in-plain {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}

.rl > .rbtns {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 5;
}

.rl > .rbtns .bbtn {
  height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.game-art .mp-wheel {
  left: 50%;
  top: -4px;
  width: 112px;
  height: 112px;
  margin-left: -56px;
  border-radius: 50%;
  animation: spin 14s linear infinite;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.25));
}

.game-art .mp-wheel img {
  width: 100%;
  height: 100%;
}

.game-art .mp-face {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--ink), 0 4px 0 3px rgba(0, 0, 0, 0.25);
}

.game-art .mp-face img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* ---- Texas Hold'em -------------------------------------------------------------------- */

.hd {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hd .ptable {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, var(--felt-1) 0%, var(--felt-2) 65%, var(--felt-3) 100%);
  box-shadow: 0 0 0 16px var(--rail), 0 0 0 20px var(--ink), inset 0 0 60px rgba(0, 0, 0, 0.35), 0 30px 50px rgba(0, 0, 0, 0.5);
}

.hd.narrow .ptable {
  box-shadow: 0 0 0 11px var(--rail), 0 0 0 14px var(--ink), inset 0 0 40px rgba(0, 0, 0, 0.35);
}

.hd .pname {
  position: absolute;
  left: 0;
  right: 0;
  top: 64%;
  text-align: center;
  font: 400 28px var(--font-display);
  color: rgba(255, 241, 214, 0.16);
}

.hd .board {
  position: absolute;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hd .board .card,
.hd .board .slot {
  position: relative;
  width: var(--cw);
  height: var(--ch);
  flex: none;
}

.hd .board .slot {
  border-radius: calc(var(--cw) * 0.15);
  border: 3px dashed rgba(255, 241, 214, 0.3);
  box-sizing: border-box;
}

.hd .card {
  cursor: default;
}

.hd .board .card.deal {
  animation: deal-in 0.45s var(--ease) both;
  animation-delay: calc(var(--k) * 120ms);
}

.hd .pot {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px 0 8px;
  border-radius: 999px;
  background: var(--night);
  box-shadow: 0 0 0 3px var(--accent-2);
  font-weight: 800;
  white-space: nowrap;
}

.hd .pot b {
  font: 400 18px var(--font-display);
  color: var(--accent-2);
}

.hd .pot[hidden] {
  display: none;
}

.pchip {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-3);
  border: 2px dashed #fff1d6;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px var(--accent-3);
  vertical-align: middle;
  flex: none;
}

.hd .pseat {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
}

.hd .av {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--ink);
  position: relative;
  z-index: 2;
  background: var(--night);
}

.hd .av.you {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-2);
  color: var(--ink);
  font: 400 22px var(--font-display);
}

.hd .plate {
  margin-top: -8px;
  min-width: 132px;
  padding: 10px 10px 6px;
  box-sizing: border-box;
  border-radius: 14px;
  background: var(--night);
  text-align: center;
  box-shadow: 0 0 0 2px #6b3f23;
  line-height: 1.15;
}

.hd .plate b {
  display: block;
  font: 400 16px var(--font-display);
  color: var(--neon);
  white-space: nowrap;
}

.hd .plate > span:not(.tag) {
  font-weight: 800;
  font-size: 14px;
}

.hd .tag {
  display: block;
  width: max-content;
  margin: 3px auto 0;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2b1a10;
}

.t-roxy { background: #e76f9a; }
.t-dan { background: #f1c40f; }
.t-mel { background: #2a9d8f; color: #fff1d6 !important; }
.t-carla { background: #7b4fa0; color: #fff1d6 !important; }
.t-ted { background: #e67e22; }

.hd .pseat.acting .av {
  animation: seat-ring 1s ease-in-out infinite;
}

.hd .pseat.folded .av,
.hd .pseat.folded .plate {
  opacity: 0.5;
  filter: grayscale(0.6);
}

.hd .pseat.out {
  opacity: 0.3;
  filter: grayscale(1);
}

.hd .pseat.winner .plate {
  box-shadow: 0 0 0 3px var(--accent-2), 0 0 26px rgba(241, 196, 15, 0.8);
}

.hd .say {
  position: absolute;
  top: -6px;
  left: calc(50% + 26px);
  padding: 4px 11px;
  border-radius: 12px;
  background: #fff1d6;
  color: var(--ink);
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 0 0 3px var(--ink);
  z-index: 3;
  animation: res-in-plain 0.25s var(--ease) both;
}

.hd .say.hot {
  background: var(--accent-3);
  color: #fff1d6;
}

.hd .pseat.winner .say {
  background: var(--accent-2);
}

.hd .say.think i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--ink);
  animation: think 1s ease-in-out infinite;
}

.hd .say.think i:nth-child(2) {
  animation-delay: 0.15s;
}

.hd .say.think i:nth-child(3) {
  animation-delay: 0.3s;
}

.hd .hole {
  position: absolute;
  top: -34px;
  display: flex;
  z-index: 1;
  --cw: 40px;
  --ch: 56px;
}

.hd .hole .card {
  position: relative;
  width: var(--cw);
  height: var(--ch);
}

.hd .hole .card + .card {
  margin-left: -18px;
  transform: rotate(8deg);
}

.hd .hole .card:first-child {
  transform: rotate(-6deg);
}

.hd .pseat:not(.me) .hole {
  left: calc(50% - 74px);
}

.hd .pseat:not(.me) .hole.up {
  --cw: 52px;
  --ch: 73px;
  top: -52px;
  z-index: 3;
}

.hd .hole.mine {
  position: relative;
  top: auto;
  margin-bottom: -18px;
  z-index: 3;
  --cw: calc(var(--ch) * 0.71 * 1.05);
  --ch: calc(var(--cw) * 1.4);
}

.hd .hole.mine .card {
  width: 84px;
  height: 118px;
  --cw: 84px;
  --ch: 118px;
}

.hd .hole.mine .card + .card {
  margin-left: -26px;
}

.hd .hname {
  position: absolute;
  top: -66px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--ink);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
  z-index: 5;
}

.hd .pseat.me .hname {
  top: 10px;
  left: auto;
  right: calc(50% + 66px);
  transform: none;
}

.hd .pbet {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  font-size: 14px;
  color: #fff1d6;
  text-shadow: 0 1px 0 #000;
  z-index: 2;
  animation: chip-in 0.25s var(--ease) both;
}

.hd .dealer {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff1d6;
  color: var(--ink);
  font: 900 13px/28px var(--font-body);
  text-align: center;
  box-shadow: 0 0 0 2px var(--ink), 0 3px 0 2px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.hd .pbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  box-sizing: border-box;
  background: rgba(43, 26, 16, 0.94);
  box-shadow: 0 -3px 0 #6b3f23;
  flex-wrap: wrap;
}

.hd .helper-line {
  flex: 1 1 260px;
  max-width: 420px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}

.hd .helper-line b {
  color: var(--accent);
}

.hd .pbar .wait {
  flex: 1;
  font: 400 20px var(--font-display);
  color: var(--neon);
  text-align: center;
}

.hd .acts {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.hd .pact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 62px;
  padding: 0 16px;
  border: 0;
  border-radius: 18px;
  font: 400 21px var(--font-display);
  color: #fff1d6;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.hd .pact small {
  font: 800 12px var(--font-body);
}

.hd .pact.fold { background: #c0392b; }
.hd .pact.call { background: #2a9d8f; }
.hd .pact.raise-btn {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 3px var(--accent-2), 0 5px 0 rgba(0, 0, 0, 0.4);
}

.hd .raise {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hd .presets {
  display: flex;
  gap: 6px;
}

.hd .preset {
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #6b3f23;
  color: #fff1d6;
  font: 900 12px var(--font-body);
  cursor: pointer;
}

.hd .raise input {
  width: 100%;
  accent-color: var(--accent-2);
}

.hd .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(43, 26, 16, 0.55);
  z-index: 50;
}

.hd .overlay[hidden] {
  display: none;
}

.hd .sng {
  width: min(560px, 100%);
  max-height: 100%;
  overflow: auto;
  box-sizing: border-box;
  padding: 22px 24px;
  border-radius: 26px;
  background: #fff1d6;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 0 0 5px var(--ink), 0 0 0 10px var(--accent-2), 0 24px 50px rgba(0, 0, 0, 0.5);
}

.hd .sng h2 {
  margin: 0;
  font: 400 38px/1.05 var(--font-display);
  color: var(--accent-3);
}

.hd .sng .lede {
  margin: 6px 0 14px;
  font-weight: 800;
}

.hd .faces {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hd .faces figure {
  margin: 0;
  width: 92px;
}

.hd .faces img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--ink);
}

.hd .faces figcaption b {
  display: block;
  font-size: 12px;
  white-space: nowrap;
}

.hd .terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}

.hd .terms div {
  padding: 8px;
  border-radius: 14px;
  background: var(--night);
  color: #fff1d6;
}

.hd .terms dt {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.hd .terms dd {
  margin: 2px 0 0;
  font: 400 18px var(--font-display);
  color: var(--neon);
}

.hd .sng .fine {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.hd .standings {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.hd .standings li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 2px dotted #e0c9a0;
  font-weight: 800;
}

.hd .standings li b {
  min-width: 64px;
  color: var(--accent-3);
}

.hd .standings li span {
  margin-left: auto;
  color: #2a9d8f;
}

.hd .standings li.you {
  background: #fbe0b4;
  border-radius: 10px;
}

.hsub {
  font-weight: 800;
  font-size: 12px;
  opacity: 0.8;
}

/* Hold'em on a phone. */
.hd.narrow .av {
  width: 48px;
  height: 48px;
  box-shadow: 0 0 0 3px var(--ink);
}

.hd.narrow .av.you {
  font-size: 15px;
}

.hd.narrow .plate {
  min-width: 86px;
  padding: 7px 4px 3px;
}

.hd.narrow .plate b {
  font-size: 12px;
}

.hd.narrow .plate > span:not(.tag) {
  font-size: 11px;
}

.hd.narrow .tag {
  display: none;
}

.hd.narrow .say {
  left: calc(50% + 14px);
  font-size: 11px;
  padding: 2px 7px;
}

.hd.narrow .hole {
  --cw: 28px;
  --ch: 40px;
  top: -24px;
}

.hd.narrow .pseat:not(.me) .hole {
  left: calc(50% - 50px);
}

.hd.narrow .pseat:not(.me) .hole.up {
  --cw: 36px;
  --ch: 50px;
  top: -34px;
}

.hd.narrow .hole .card + .card {
  margin-left: -12px;
}

.hd.narrow .hole.mine .card {
  width: 62px;
  height: 87px;
  --cw: 62px;
  --ch: 87px;
}

.hd.narrow .board {
  gap: 5px;
}

.hd.narrow .pbar {
  min-height: 146px;
  padding: 8px 10px;
  gap: 8px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.hd.narrow .helper-line {
  flex: none;
  max-width: none;
  font-size: 12px;
}

.hd.narrow .acts {
  margin: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.hd.narrow .raise {
  order: -1;
  flex: 1 1 100%;
}

.hd.narrow .presets .preset {
  flex: 1;
}

.hd.narrow .pact {
  flex: 1;
  min-width: 0;
  height: 52px;
  font-size: 18px;
}

.hd.narrow .hname {
  font-size: 10px;
  top: -50px;
}

.hd.narrow .faces figure {
  width: 64px;
}

.hd.narrow .faces img {
  width: 46px;
  height: 46px;
}

.hd.narrow .faces .tag {
  display: none;
}

.hd.narrow .sng h2 {
  font-size: 30px;
}

@keyframes seat-ring {
  50% {
    box-shadow: 0 0 0 4px var(--ink), 0 0 0 9px var(--accent-2), 0 0 26px var(--accent-2);
  }
}

@keyframes think {
  50% {
    transform: translateY(-4px);
    opacity: 0.4;
  }
}

@keyframes deal-in {
  from {
    transform: translateY(-40px) rotate(-12deg);
    opacity: 0;
  }
}

/* On a phone your cards sit beside you, so they stay clear of the board. */
.hd.narrow .hole.mine {
  position: absolute;
  top: -10px;
  right: calc(50% + 30px);
  margin: 0;
}

.hd.narrow .pseat.me .hname {
  top: -30px;
}

.hd .pname {
  top: 70%;
}

.hd .mine-row {
  display: contents;
}

.hd.narrow .mine-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hd .mycards {
  display: flex;
  flex: none;
  --cw: 40px;
  --ch: 56px;
}

.hd .mycards .card {
  position: relative;
  width: 40px;
  height: 56px;
}

.hd .mycards .card + .card {
  margin-left: -8px;
}

.hd .mycards.folded {
  opacity: 0.4;
}

.hd.narrow .mine-row .helper-line {
  flex: 1;
  min-width: 0;
}

/* Revealed cards sit beside the player, with the hand's name under the plate. */
.hd .pseat:not(.me) .hole.up {
  top: -4px;
  left: auto;
  right: calc(50% + 34px);
}

.hd .pseat:not(.me) .hname {
  top: auto;
  bottom: -24px;
}

.hd.narrow .pseat:not(.me) .hole.up {
  top: -10px;
  right: calc(50% + 20px);
}

.hd.narrow .pseat:not(.me) .hname {
  bottom: -20px;
}

.hd .pseat.lefty:not(.me) .hole.up {
  right: auto;
  left: calc(50% + 34px);
}

.hd.narrow .pseat.lefty:not(.me) .hole.up {
  right: auto;
  left: calc(50% + 20px);
}

.hd.narrow .pseat:not(.me) .hole.up {
  display: none;
}

.hd .hname i {
  font-style: normal;
  font-weight: 900;
}

.hd .hname i.red {
  color: #b3261e;
}

.hd .pseat.me .say {
  left: auto;
  right: calc(50% + 26px);
}

/* The casino header also carries the chip balance: wrap it a little sooner. */
@media (max-width: 1320px) {
  body.casino {
    --bar-h: 104px;
  }
  .casino .bar {
    flex-wrap: wrap;
    align-content: center;
    gap: 8px 10px;
    padding: 0 12px;
  }
  .casino .games {
    order: 3;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
}

@media (max-width: 720px) {
  body.casino {
    --bar-h: 140px;
  }
  .casino .games {
    overflow: visible;
  }
}

/* Small phones: the balance and up to four buttons share the top row with the logo. */
@media (max-width: 380px) {
  .casino .bar {
    gap: 8px;
  }
  .casino .logo {
    margin: 0 4px;
  }
  .casino .bankpill {
    gap: 6px;
    height: 38px;
    padding: 0 10px 0 4px;
    font-size: 18px;
  }
  .casino .bankpill .chipi {
    width: 26px;
    height: 26px;
  }
  .casino .tools {
    gap: 4px;
  }
  .casino .tool,
  .casino .tool.icon {
    width: 38px;
    height: 38px;
  }
}
