/* ==========================================================
   Jack Vegas: inside the rooms (game pages)
   ========================================================== */

.room-door {
  padding: clamp(22px, 4vw, 48px) 0 clamp(18px, 3vw, 32px);
  background: linear-gradient(180deg, var(--sky) 0%, var(--cream) 100%);
}
.room-door__grid { display: grid; gap: 20px 40px; align-items: center; grid-template-columns: minmax(0, 1fr) auto; }
.room-door__plate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .6rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.room-door__no {
  display: inline-grid;
  place-items: center;
  min-width: 2.6rem;
  height: 2rem;
  padding: 0 .6rem;
  border-radius: 50%;
  background: var(--chrome);
  color: var(--ink);
  font-family: var(--display);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
.room-door h1 { margin-bottom: .3em; }
.room-door__say { max-width: 58ch; font-size: 1.1rem; color: var(--ink-soft); margin: 0; }
.room-door__porthole {
  width: clamp(92px, 18vw, 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .6), transparent 40%),
    linear-gradient(160deg, #a8ded9, #f6d9a6);
  box-shadow: 0 0 0 6px #e9edf0, 0 0 0 8px #8e98a1, 0 14px 26px rgba(42, 29, 20, .2);
}
.room-door__porthole img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) {
  .room-door__grid { grid-template-columns: minmax(0, 1fr) 84px; align-items: start; }
  .room-door__porthole { width: 84px; }
  .room-door__say { font-size: 1rem; }
}

/* ---------- the playroom: kidney table + rail ---------- */

.playroom { margin-top: clamp(14px, 2vw, 24px); }

.kidney {
  position: relative;
  isolation: isolate;
  color: var(--cream);
  --focus: var(--sun);
}
.kidney__shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: visible;
  filter: drop-shadow(0 18px 22px rgba(42, 29, 20, .28));
}
.kidney__shape--tall { display: none; }
.kidney__felt {
  position: relative;
  padding: clamp(64px, 9vw, 96px) clamp(40px, 8vw, 110px) clamp(46px, 7vw, 80px);
  min-height: 340px;
}
.kidney__felt::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 260px; height: 260px;
  margin: -130px 0 0 -130px;
  background: rgba(255, 255, 255, .05);
  clip-path: polygon(50% 0, 56% 40%, 85% 15%, 60% 44%, 100% 50%, 60% 56%, 85% 85%, 56% 60%, 50% 100%, 44% 60%, 15% 85%, 40% 56%, 0 50%, 40% 44%, 15% 15%, 44% 40%);
  z-index: -1;
  pointer-events: none;
}
@media (max-width: 719px) {
  .kidney__shape--wide { display: none; }
  .kidney__shape--tall { display: block; }
  .kidney__felt { padding: 44px 22px 40px; min-height: 0; }
}

.felt-motto {
  margin: 14px auto;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(.82rem, .75rem + .35vw, 1rem);
  letter-spacing: .04em;
  color: #fef0cf;
  max-width: 52ch;
}
.felt-motto span { color: var(--sun); }

.zone-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.05rem;
}
.zone-sum, .seat__sum {
  display: inline-block;
  min-width: 3.2em;
  padding: .12rem .7rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--display);
  font-size: .95rem;
  text-align: center;
}

/* rail under the table */
.rail {
  display: grid;
  gap: 16px 28px;
  margin-top: 22px;
  padding: 18px clamp(14px, 3vw, 26px);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--chrome-flat), 0 12px 24px rgba(42, 29, 20, .1);
  align-items: center;
}
@media (min-width: 900px) {
  .rail { grid-template-columns: auto minmax(0, 1fr) auto; }
  .rail .say { grid-column: 1 / -1; }
}
.rail__moves { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.rail__side { display: grid; gap: 8px; justify-items: start; }
@media (max-width: 899px) { .rail__side { justify-items: center; text-align: center; } }
.rail__coins { margin: 0; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.rail__coins-label { color: var(--ink-soft); font-weight: 600; }
.rail__coins strong { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--teal-deep); }
.rail__checkin {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--tangerine-deep);
  text-decoration: underline;
  cursor: pointer;
}

.say {
  margin: 0;
  min-height: 3.2em;
  padding: .8rem 1rem;
  border-radius: 16px;
  background: var(--night);
  color: #fff6e3;
  font-weight: 500;
  line-height: 1.45;
  --focus: var(--sun);
}

/* bet tokens */
.tokens { border: 0; margin: 0; padding: 0; min-width: 0; }
.tokens__legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
@media (max-width: 899px) { .tokens { justify-self: center; text-align: center; } .tokens__legend { margin-inline: auto; } }
.tokens__row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.token { position: relative; display: block; cursor: pointer; }
.token input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.token span[aria-hidden] {
  --tok: var(--sun);
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--tok) 0 54%, #fff 55% 58%, transparent 59%),
    repeating-conic-gradient(var(--tok) 0 22.5deg, #fffbf3 22.5deg 45deg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1rem;
  box-shadow: 0 0 0 2px rgba(42, 29, 20, .35), 0 3px 0 rgba(42, 29, 20, .3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.token--2 span[aria-hidden] { --tok: var(--coral); }
.token--3 span[aria-hidden] { --tok: #6fd3cc; }
.token--4 span[aria-hidden] { --tok: var(--tangerine); }
.token input:checked + span {
  transform: translateY(-5px);
  box-shadow: 0 0 0 3px var(--teal-deep), 0 0 0 5px var(--paper), 0 0 0 7px var(--teal-deep), 0 8px 10px rgba(42, 29, 20, .25);
}
.token input:focus-visible + span { outline: 3px solid var(--tangerine-deep); outline-offset: 7px; }
.token input:disabled + span { opacity: .55; }
.token input:disabled { cursor: not-allowed; }

/* starburst seal buttons */
.seal {
  --seal: var(--teal-mid);
  --seal-ink: var(--cream);
  position: relative;
  isolation: isolate;
  width: 78px;
  height: 78px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--seal-ink);
  font-family: var(--display);
  font-size: .98rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  filter: drop-shadow(0 3px 0 rgba(42, 29, 20, .28));
  transition: transform .15s ease, filter .15s ease;
  flex: none;
}
.seal::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--seal);
  clip-path: polygon(50.0% 0.0%, 58.4% 7.8%, 69.1% 3.8%, 73.9% 14.2%, 85.4% 14.6%, 85.8% 26.1%, 96.2% 30.9%, 92.2% 41.6%, 100.0% 50.0%, 92.2% 58.4%, 96.2% 69.1%, 85.8% 73.9%, 85.4% 85.4%, 73.9% 85.8%, 69.1% 96.2%, 58.4% 92.2%, 50.0% 100.0%, 41.6% 92.2%, 30.9% 96.2%, 26.1% 85.8%, 14.6% 85.4%, 14.2% 73.9%, 3.8% 69.1%, 7.8% 58.4%, 0.0% 50.0%, 7.8% 41.6%, 3.8% 30.9%, 14.2% 26.1%, 14.6% 14.6%, 26.1% 14.2%, 30.9% 3.8%, 41.6% 7.8%);
}
.seal::after {
  content: "";
  position: absolute;
  inset: 15%;
  z-index: -1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), inset 0 -4px 0 rgba(0, 0, 0, .12);
}
.seal:hover:not([disabled]) { transform: rotate(-6deg) scale(1.04); }
.seal:active:not([disabled]) { transform: scale(.96); }
.seal:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; border-radius: 50%; }
.seal[disabled] { opacity: .38; cursor: not-allowed; filter: none; }
.seal--sun { --seal: var(--sun); --seal-ink: var(--ink); }
.seal--tangerine { --seal: var(--tangerine); --seal-ink: var(--ink); }
.seal--coral { --seal: var(--coral); --seal-ink: var(--ink); }
.seal--big {
  --seal: var(--tangerine);
  --seal-ink: var(--ink);
  width: 104px;
  height: 104px;
  font-size: 1.2rem;
}
@media (max-width: 560px) {
  .rail__moves .seal--big { margin-inline: calc(50% - 46px); width: 92px; height: 92px; }
  .rail__moves:has(.seal:not(.seal--big)) .seal--big { margin-bottom: 4px; }
}
@media (max-width: 400px) {
  .seal { width: 68px; height: 68px; font-size: .88rem; }
  .rail__moves .seal--big { width: 88px; height: 88px; margin-inline: calc(50% - 44px); font-size: 1.08rem; }
  .token span[aria-hidden] { width: 50px; height: 50px; }
}

/* toggle switch for the strategy hint */
.flip { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 600; position: relative; }
.flip input { position: absolute; opacity: 0; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.flip__track {
  width: 46px; height: 26px;
  border-radius: 999px;
  background: #cdbfa8;
  position: relative;
  flex: none;
  transition: background-color .2s ease;
}
.flip__track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  transition: transform .2s ease;
}
.flip input:checked + .flip__track { background: var(--teal-mid); }
.flip input:checked + .flip__track::after { transform: translateX(20px); }
.flip input:focus-visible + .flip__track { outline: 3px solid var(--teal-deep); outline-offset: 3px; }
.hint-line {
  margin: 0;
  padding: .35rem .8rem;
  border-radius: 12px;
  background: #fdf0d2;
  border-left: 4px solid var(--sun);
  font-weight: 600;
}
.hint-line[hidden] { display: none; }

/* ---------- playing cards ---------- */

.face {
  --w: var(--card-w, 74px);
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--w);
  height: calc(var(--w) * 1.4);
  border-radius: calc(var(--w) * .1);
  background: #fffdf8;
  color: #1f1a17;
  font-family: var(--display);
  box-shadow: inset 0 0 0 1px rgba(42, 29, 20, .14), 0 2px 0 rgba(0, 0, 0, .12), 0 8px 14px rgba(0, 0, 0, .25);
}
.face--red { color: #b3261e; }
.face__corner {
  position: absolute;
  top: 6%; left: 9%;
  font-size: calc(var(--w) * .24);
  line-height: .95;
  text-align: center;
}
.face__corner--low { top: auto; left: auto; bottom: 6%; right: 9%; transform: rotate(180deg); }
.face__pip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: calc(var(--w) * .52);
  font-family: "Segoe UI Symbol", "Apple Symbols", var(--text);
}
.face--down {
  background:
    radial-gradient(circle, var(--sun) 0 9%, transparent 10%),
    repeating-linear-gradient(45deg, #0f7f7a 0 5px, #16a39c 5px 10px);
  box-shadow: inset 0 0 0 4px #fff7e8, inset 0 0 0 5px #b9c1c8, 0 2px 0 rgba(0, 0, 0, .12), 0 8px 14px rgba(0, 0, 0, .25);
}
.face--down::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 46%; height: 33%;
  transform: translate(-50%, -50%);
  background: var(--sun);
  clip-path: polygon(50% 0, 60% 38%, 100% 50%, 60% 62%, 50% 100%, 40% 62%, 0 50%, 40% 38%);
}
.face.is-new { animation: deal-in .34s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes deal-in {
  from { transform: translate(60px, -40px) rotate(10deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.fan {
  display: flex;
  justify-content: center;
  min-height: calc(var(--card-w, 74px) * 1.4);
}
.fan .face + .face { margin-left: calc(var(--card-w, 74px) * -.4); }
@media (max-width: 560px) { .playroom { --card-w: 58px; } }
@media (max-width: 380px) { .playroom { --card-w: 52px; } }

/* ---------- blackjack ---------- */

.bj-zone { text-align: center; }
.seats { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 22px; }
.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 10px 12px 8px;
  border-radius: 18px;
  transition: box-shadow .2s ease, background-color .2s ease;
}
.seat--empty { padding: 30px 12px; color: #fef0cf; font-family: var(--display); }
.seat.is-turn { background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 3px var(--sun); }
.seat__bet { margin: 0; font-size: .9rem; color: #fef0cf; }
.seat__end {
  margin: 0;
  padding: .1rem .7rem;
  border-radius: 999px;
  font-family: var(--display);
  font-size: .9rem;
  background: var(--night);
  color: var(--cream);
}
.seat--win .seat__end, .seat--blackjack .seat__end { background: var(--sun); color: var(--ink); }
.seat--push .seat__end { background: #e8ecef; color: var(--ink); }

/* ---------- atomic reels ---------- */

.cabinet {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 26px;
  background: var(--chrome);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
.cabinet__window {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  background: #3c2b20;
}
.spool {
  position: relative;
  aspect-ratio: 1 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, #e7d6b5 0%, #fffaf0 18%, #fffaf0 82%, #e7d6b5 100%);
}
.spool__ribbon { display: flex; flex-direction: column; will-change: transform; }
.glyph {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  flex: none;
}
.glyph img { width: 86%; height: 86%; object-fit: contain; }
.glyph__word {
  display: none;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  place-items: center;
  font-family: var(--display);
  font-size: clamp(.55rem, .4rem + .6vw, .85rem);
  line-height: 1.05;
  text-align: center;
  color: var(--ink);
  background: var(--sand);
}
.glyph.is-bare img { display: none; }
.glyph.is-bare .glyph__word { display: grid; }
.glyph--starburst .glyph__word { background: var(--sun); }
.glyph--saucer .glyph__word { background: #9fded8; }
.glyph--finscar .glyph__word { background: var(--coral); }
.glyph--horseshoe .glyph__word { background: #e8ecef; }
.glyph--palm .glyph__word { background: #b8e3a8; }
.glyph.is-hit { background: rgba(244, 183, 64, .38); box-shadow: inset 0 0 0 3px var(--tangerine); border-radius: 8px; }
.paylines {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  pointer-events: none;
}
.paylines polyline { fill: none; stroke: transparent; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.paylines polyline.is-hit { stroke: var(--tangerine); filter: drop-shadow(0 0 3px #fff); }
.cabinet__meter {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 10px 4px 0;
  font-family: var(--display);
  font-size: .95rem;
  color: var(--ink);
}

.paygrid { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.paygrid th, .paygrid td { padding: .45rem .5rem; border-bottom: 1px solid var(--dune); text-align: right; }
.paygrid th:first-child, .paygrid td:first-child { text-align: left; }
.paygrid thead th { font-family: var(--display); font-weight: 400; color: var(--teal-deep); }
.paygrid__sym { display: inline-flex; align-items: center; gap: .55rem; }
.paygrid__sym img { width: 34px; height: 34px; object-fit: contain; }
.paygrid__sym img.is-missing { display: none; }

.line-maps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.line-maps li { font-size: .85rem; text-align: center; }
.line-maps svg { display: block; width: 100%; max-width: 92px; margin: 0 auto 4px; background: var(--paper); border-radius: 8px; box-shadow: 0 0 0 1px var(--dune); }

/* ---------- starburst wheel ---------- */

.wheel-mount { position: relative; width: min(440px, 100%); margin: 0 auto; }
.wheel { display: block; width: 100%; height: auto; overflow: visible; }
#sw-rotor { transform-origin: 0 0; }
.wheel text { font-family: var(--display); }
.wheel-note { text-align: center; margin: 12px 0 0; font-family: var(--display); color: #fef0cf; }
.slice-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.slice-list li { padding: .45rem .7rem; border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px var(--dune); display: flex; justify-content: space-between; gap: 8px; }
.slice-list li.is-landed { box-shadow: 0 0 0 3px var(--tangerine); }
.slice-list b { font-family: var(--display); font-weight: 400; }

/* ---------- red dog ---------- */

.dog-row { display: flex; justify-content: center; align-items: center; gap: clamp(10px, 3vw, 28px); }
.dog-slot {
  display: grid;
  place-items: center;
  width: calc(var(--card-w, 74px) + 14px);
  height: calc(var(--card-w, 74px) * 1.4 + 14px);
  border-radius: 12px;
  border: 2px dashed rgba(255, 247, 232, .5);
}
.dog-slot--middle { border-color: var(--sun); border-style: solid; background: rgba(0, 0, 0, .08); }
.slot-ghost { font-family: var(--display); font-size: .9rem; color: #fef0cf; }
.dog-slot--middle .slot-ghost { font-size: 1.8rem; color: var(--sun); }
.dog-spread {
  margin: 16px auto 10px;
  width: fit-content;
  max-width: 100%;
  padding: .3rem 1rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--display);
  text-align: center;
}
.spread-ladder {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 560px;
}
.spread-ladder li {
  padding: .2rem .65rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 247, 232, .55);
  font-size: .85rem;
  color: #fef0cf;
}
.spread-ladder li.is-lit { background: var(--sun); border-color: var(--sun); color: var(--ink); font-weight: 700; }
.dog-bet { text-align: center; margin: 10px 0 0; color: #fef0cf; }

/* ---------- notes under the table ---------- */

.room-notes {
  display: grid;
  gap: 28px 48px;
  margin-top: clamp(36px, 6vw, 64px);
}
@media (min-width: 960px) { .room-notes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .room-notes > .coin-caveat { grid-column: 1 / -1; } }
.room-notes h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); color: var(--teal-deep); }
.room-notes ol, .room-notes ul { padding-left: 1.25rem; }
.room-notes li { margin-bottom: .45rem; }
.odds-box { padding: 1rem 1.1rem; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 2px var(--sand); }
.odds-box p:last-child { margin-bottom: 0; }
.scroller { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  .face.is-new { animation: none; }
  .seal:hover:not([disabled]) { transform: none; }
}
.rail__note { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.paygrid--snug td { white-space: nowrap; }
.table-key { font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 560px) {
  .paygrid { font-size: .9rem; }
  .paygrid th, .paygrid td { padding: .4rem .3rem; }
}
.paygrid--snug td { white-space: nowrap; }
.table-key { font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 560px) {
  .paygrid { font-size: .9rem; }
  .paygrid th, .paygrid td { padding: .4rem .3rem; }
}
