/* Deck 5 casino. Felt, rail and cream cards; sized for a phone held at arm's length. */
.casino {
  display: grid;
  grid-template-columns: minmax(240px, .6fr) minmax(540px, 1.4fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
  padding: clamp(5rem, 9vw, 8rem) clamp(1rem, 5vw, 5rem) clamp(2rem, 7vw, 5rem);
  /* clip, not hidden: hidden would trap the sticky action bar inside this box */
  overflow: clip !important;
  background: #0b3535;
}
.casino-window {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  opacity: .34;
  background: linear-gradient(90deg, rgba(3, 29, 31, .16), #0b3535 94%), url("manini-beach.png") center/cover;
}
.casino-copy, .casino-room { position: relative; z-index: 2; }
.casino-copy { max-width: 26rem; padding-top: 2rem; }
.casino-copy h2 {
  max-width: 8ch;
  margin: .55rem 0 1.35rem;
  color: #ffe6ad;
  font: clamp(3.4rem, 7vw, 7.3rem)/.84 Hanalei, serif;
  letter-spacing: -.05em;
}
.casino-rules { max-width: 24rem; margin-top: 2rem; padding-top: .8rem; border-top: 1px dashed rgba(255, 226, 168, .72); color: #bed7c6; font-size: 1.05rem; line-height: 1.45; }

.casino-room {
  width: 100%;
  max-width: 820px;
  padding: clamp(1rem, 3vw, 2rem);
  border: 12px solid #653a24;
  border-radius: 38px 38px 18px 18px;
  box-shadow: 0 0 0 3px #c29451, 0 24px 54px rgba(0, 0, 0, .34), inset 0 0 0 2px rgba(255, 240, 187, .24);
  background:
    radial-gradient(circle at 50% 39%, rgba(217, 197, 96, .16) 0 1px, transparent 1.5px) 0 0 / 13px 13px,
    radial-gradient(ellipse at 50% 30%, #28766a, #0f4d46 62%, #0a3935 100%);
  color: #f8edca;
  font-size: 1.06rem;
}
.table-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .2rem .25rem 1rem; }
.table-head h3 { flex: 1; min-width: 0; margin: 0; white-space: nowrap; color: #ffe6ad; font: clamp(2.2rem, 5vw, 3.6rem)/.9 Hanalei, serif; outline: none; }
.to-lobby { flex: none; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(255, 226, 168, .55); border-radius: 50%; background: none; color: #ffe2a8; cursor: pointer; font: 700 1.3rem Inika, serif; }
.to-lobby[hidden] { display: none; }
.casino-balance { margin: 0; padding: .45rem .75rem; border: 1px solid rgba(255, 231, 175, .65); color: #ffe6ad; font-weight: 700; white-space: nowrap; }

/* ---------- lobby ---------- */
.lobby, .friends { display: grid; gap: .8rem; }
.lobby-lede { margin: 0 .2rem .2rem; color: #d9e8cf; }
.table-card {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  gap: .9rem;
  align-items: center;
  width: 100%;
  min-height: 96px;
  padding: 1rem 1.1rem;
  border: 2px solid rgba(255, 226, 168, .55);
  border-radius: 16px;
  background: rgba(4, 42, 39, .55);
  color: #fff9e9;
  cursor: pointer;
  font: 1rem Inika, serif;
  text-align: left;
  transition: transform .15s ease, background .15s ease;
}
.table-card:hover, .table-card:focus-visible { background: rgba(4, 42, 39, .85); transform: translateY(-2px); }
.table-card:focus-visible { outline: 3px solid #ff755f; outline-offset: 3px; }
.table-card[aria-disabled="true"] { opacity: .55; }
.table-card-suit { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: #fff9e9; color: #153f3e; font-size: 1.8rem; }
.table-card.holdem .table-card-suit { color: #153f3e; background: #e0b853; }
.table-card.friends .table-card-suit { color: #fff9e9; background: #dc765e; }
.table-card-text { display: grid; gap: .25rem; }
.table-card-text b { color: #ffe6ad; font: clamp(1.7rem, 5vw, 2.1rem)/1 Hanalei, serif; letter-spacing: .01em; }
.table-card-text span { color: #d9e8cf; font-size: 1rem; line-height: 1.35; }
.table-card-text em { color: #ffe2a8; font-size: .95rem; font-style: normal; font-weight: 700; }
.table-card-go { color: #ffe2a8; font-size: 1.6rem; }
.stats-line { margin: .3rem .2rem 0; color: #c5dcbe; font-size: .95rem; line-height: 1.4; }
.text-button { min-height: 44px; padding: 0 .3rem; border: 0; background: transparent; color: #d4e1bb; cursor: pointer; font: 700 .95rem Inika, serif; text-decoration: underline; text-underline-offset: 3px; justify-self: end; }
.fine-print { margin: .2rem; color: #bcd3bd; font-size: .95rem; line-height: 1.45; }

/* ---------- felt ---------- */
.felt { border-top: 1px solid rgba(255, 239, 188, .3); }
.dealer-row { padding: .9rem .25rem; border-bottom: 1px dashed rgba(255, 239, 188, .34); }
.seat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid rgba(255, 239, 188, .3); }
.seat-row.seats-1 { grid-template-columns: 1fr; }
.seat-row.seats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seat-row.seats-4, .seat-row.seats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seat { min-width: 0; padding: .8rem .35rem .9rem; border-right: 1px dashed rgba(255, 239, 188, .25); transition: background .2s ease; }
.seat:last-child { border-right: 0; }
.seat.is-turn { background: rgba(255, 226, 168, .12); box-shadow: inset 0 3px 0 #ffe2a8; }
.seat.is-you .seat-name { color: #ffe6ad; }
.seat.is-folded, .seat.is-out { opacity: .55; }
.seat-name { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 .55rem; color: #e8edc5; font-size: .88rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.seat-name small, .people small { padding: .05rem .25rem; border: 1px solid rgba(255, 230, 173, .6); color: #ffe6ad; font-size: .62rem; letter-spacing: .06em; }
.seat-stack { margin-left: auto; color: #ffe6ad; letter-spacing: 0; text-transform: none; }
.seat-stack::after { content: " chips"; font-weight: 400; font-size: .75rem; }
.dealer-total { margin-left: .2rem; color: #ffe6ad; font-size: 1.05rem; letter-spacing: 0; }
.cards { display: flex; min-height: 96px; align-items: center; padding-left: .1rem; }
.playing-card {
  display: grid;
  flex: none;
  align-content: space-between;
  width: 64px;
  height: 92px;
  margin-right: -26px;
  padding: 7px;
  transform: rotate(var(--tilt, -2deg));
  border: 1px solid #e4d4a7;
  border-radius: 5px 9px 6px 8px;
  box-shadow: 3px 5px 0 rgba(0, 0, 0, .22);
  background: #fff9e9;
  color: #173c3c;
  font-family: Inika, serif;
}
.playing-card:last-child { margin-right: 0; }
.playing-card:nth-child(2n) { --tilt: 3deg; margin-top: 6px; }
.playing-card:nth-child(3n) { --tilt: -4deg; margin-top: -4px; }
.playing-card.red { color: #bd4739; }
.playing-card b { font-size: 1.35rem; line-height: .8; }
.playing-card span { justify-self: end; font-size: 1.8rem; line-height: .8; }
.playing-card.face-down { display: block; border-color: #ffe9b0; background: repeating-linear-gradient(45deg, #d06a50 0 4px, #ffe9b0 4px 6px, #1a655f 6px 10px); }
.playing-card.slot { border: 1px dashed rgba(255, 239, 188, .35); background: transparent; box-shadow: none; transform: none; margin-top: 0; }
.playing-card.is-folded { filter: grayscale(.8); }
.deal-in { animation: deal-in .42s cubic-bezier(.2, .8, .3, 1) both; animation-delay: var(--deal-delay, 0ms); }
@keyframes deal-in {
  from { opacity: 0; transform: translate(40px, -60px) rotate(18deg) scale(.8); }
  to { opacity: 1; transform: rotate(var(--tilt, -2deg)); }
}
.bj-hand { margin-bottom: .3rem; padding: .2rem .15rem .35rem; border-radius: 8px; }
.bj-hand.is-active { background: rgba(255, 226, 168, .14); outline: 2px solid rgba(255, 226, 168, .7); }
.hand-total, .seat-status, .hand-name { margin: .35rem 0 0; color: #fff5d3; font-size: .98rem; line-height: 1.3; }
.hand-name { color: #ffe6ad; font-weight: 700; }
.seat-status { min-height: 1.3em; color: #c5dcbe; }
.bet-chip { display: inline-grid; place-items: center; min-width: 2.2rem; height: 1.6rem; margin-right: .35rem; padding: 0 .4rem; border: 2px dashed #fff5d3; border-radius: 999px; background: #dc765e; color: #fff9e9; font-size: .82rem; font-weight: 700; }
.sitting { margin: 0; color: #bcd3bd; font-size: .9rem; }
.result-chip { display: inline-block; margin-top: .4rem; padding: .2rem .55rem; border-radius: 999px; font-size: .92rem; font-weight: 700; letter-spacing: .02em; }
.result-chip.good { background: #ffe2a8; color: #153f3e; }
.result-chip.bad { background: rgba(88, 44, 34, .75); color: #ffd9cc; }
.result-chip.even { background: rgba(255, 255, 255, .15); color: #fff5d3; }
.seat-net { margin: .3rem 0 0; font-weight: 700; }
.seat-net.good { color: #ffe2a8; }
.seat-net.bad { color: #ffb4a3; }
.badge { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .25rem; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff5d3; font-size: .66rem; letter-spacing: 0; }
.badge.dealer-button { background: #fff9e9; color: #153f3e; }

.board { padding: .9rem .25rem; border-bottom: 1px solid rgba(255, 239, 188, .3); background: rgba(255, 243, 194, .05); }
.board-head { display: flex; justify-content: space-between; margin: 0 0 .5rem; color: #e8edc5; font-size: .88rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pot { color: #ffe6ad; letter-spacing: .02em; text-transform: none; font-size: 1.05rem; }
.board-cards .playing-card { margin-right: 6px; transform: none; margin-top: 0; }
.seat-me { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "name name" "cards info"; column-gap: 1.6rem; align-items: center; border-right: 0; padding-top: .8rem; }
.seat-me .seat-name { grid-area: name; }
.seat-me .cards { grid-area: cards; }
.seat-me .seat-status, .seat-me .hand-name, .seat-me .result-chip { grid-column: 2; }
.seat-me .seat-status { grid-row: 2; align-self: start; margin-top: .2rem; }
.seat-me .hand-name { grid-row: 2; align-self: end; margin-bottom: .2rem; }
.seat-me .result-chip { grid-row: 3; justify-self: start; }
.seat-me .playing-card { width: 78px; height: 112px; margin-right: -22px; }
.seat-me .playing-card b { font-size: 1.6rem; }
.seat-me .playing-card span { font-size: 2.2rem; }
.seat-me .hand-name { font-size: 1.15rem; }
.holdem-felt .seat-row .playing-card { width: 44px; height: 64px; margin-right: -16px; padding: 5px; }
.holdem-felt .seat-row .playing-card b { font-size: 1rem; }
.holdem-felt .seat-row .playing-card span { font-size: 1.25rem; }
.holdem-felt .seat-row .cards { min-height: 70px; }

.table-log { min-height: 1.4rem; margin: .7rem .25rem 0; padding: 0; list-style: none; color: #c5dcbe; font-size: .92rem; line-height: 1.4; }
.table-log li:not(:last-child) { opacity: .7; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; margin: 0 .2rem .5rem; color: #c5dcbe; font-size: .92rem; }
.table-toolbar .text-button { font-size: .9rem; }

/* ---------- action bar: pinned to the bottom so the buttons are always under a thumb ---------- */
.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: .6rem -.5rem -.5rem;
  padding: .9rem .75rem max(1rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 226, 168, .35);
  border-radius: 14px 14px 0 0;
  background: rgba(8, 52, 49, .96);
  box-shadow: 0 -12px 24px rgba(0, 0, 0, .25);
}
.headline { margin: 0 0 .5rem; color: #fff5d3; font-size: 1.18rem; line-height: 1.35; font-weight: 700; }
.charlotte { margin: 0 0 .7rem; color: #ffe2a8; font-size: 1rem; font-style: italic; }
.charlotte span { font-style: normal; opacity: .8; font-size: .9rem; }
.waiting, .turn-call { margin: 0 0 .6rem; color: #fff5d3; font-size: 1.08rem; }
.turn-call { color: #ffe6ad; font-weight: 700; }
.countdown { margin-left: .35rem; padding: .1rem .45rem; border-radius: 999px; background: rgba(255, 255, 255, .14); font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown.is-urgent { background: #dc765e; color: #fff9e9; }
.bar-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.bar-buttons .button { flex: 1 1 6.5rem; }
.bar-buttons > .waiting { flex-basis: 100%; }
.casino .button { min-height: 52px; padding: 10px 14px; font-size: 1.08rem; border-radius: 10px; }
.casino .button small { font-weight: 400; opacity: .85; font-size: .85rem; }
.casino .button.big { min-height: 64px; font-size: 1.2rem; }
.casino-deal { background: #ffe2a8 !important; color: #153f3e !important; border-color: #ffe2a8 !important; }
.casino .button:disabled { opacity: .45; cursor: not-allowed; }
.bet-line, .opponents-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .1rem 0 .75rem; color: #d9e8cf; }
.opponents-pick { margin: .8rem 0 0; }
.opponents-pick button { min-height: 44px; padding: .3rem .7rem; border: 1px solid rgba(255, 226, 168, .5); border-radius: 999px; background: transparent; color: #fff5d3; cursor: pointer; font: 700 .9rem Inika, serif; }
.opponents-pick button[aria-pressed="true"] { background: #ffe2a8; color: #153f3e; }
.wagers { display: flex; flex-wrap: wrap; gap: .5rem; }
.wagers button {
  width: 52px;
  height: 52px;
  border: 2px dashed #fff5d3;
  border-radius: 50%;
  background: #dc765e;
  color: #fff9e9;
  cursor: pointer;
  font: 700 .98rem Inika, serif;
}
.wagers button:nth-child(2) { background: #e0b853; color: #153f3e; }
.wagers button:nth-child(3) { background: #d4e1bb; color: #153f3e; }
.wagers button[aria-pressed="true"] { box-shadow: 0 0 0 3px #083b37, 0 0 0 6px #ffe6ad; transform: translateY(-3px); }
.wagers button:disabled { cursor: not-allowed; opacity: .4; }
.wagers.small button { width: auto; min-width: 48px; height: 44px; padding: 0 .55rem; border-radius: 999px; }
.wagers.small button:nth-child(1) { background: rgba(255, 255, 255, .12); color: #fff5d3; }
.wagers.small button:nth-child(2) { background: #dc765e; color: #fff9e9; }
.wagers.small button:nth-child(3) { background: #e0b853; color: #153f3e; }
.wagers.small button:nth-child(4) { background: #d4e1bb; color: #153f3e; }
.party-bets { display: grid; gap: .55rem; margin-bottom: .8rem; }
.party-bet { display: grid; gap: .3rem; }
.party-bet > span { color: #fff5d3; font-weight: 700; }
.party-bet small { color: #c5dcbe; font-weight: 400; }

.raise-sheet { display: grid; gap: .7rem; }
.raise-amount { margin: 0; color: #fff5d3; font-size: 1.15rem; }
.raise-amount b { color: #ffe6ad; font-size: 1.6rem; }
.raise-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.raise-presets button, .raise-stepper button {
  min-height: 48px;
  border: 1px solid rgba(255, 226, 168, .6);
  border-radius: 10px;
  background: transparent;
  color: #fff5d3;
  cursor: pointer;
  font: 700 1rem Inika, serif;
}
.raise-presets button[aria-pressed="true"] { background: #ffe2a8; color: #153f3e; }
.raise-stepper { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: .5rem; text-align: center; color: #c5dcbe; font-size: .9rem; }
.raise-stepper button { font-size: 1.6rem; }

/* ---------- pass the phone ---------- */
.pass-cover { display: grid; gap: .8rem; justify-items: center; padding: 2.5rem 1rem; text-align: center; border-top: 1px solid rgba(255, 239, 188, .3); }
.pass-cover h4 { margin: 0; color: #ffe6ad; font: clamp(2.4rem, 9vw, 3.4rem)/1 Hanalei, serif; }
.pass-cover p { margin: 0; color: #d9e8cf; }
.pass-cover .button { width: min(100%, 22rem); }

/* ---------- forms ---------- */
.party-form, .join-form { display: grid; gap: .9rem; }
.party-form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: .5rem; }
.party-form legend, .field-label, .join-form label { margin-bottom: .4rem; color: #ffe6ad; font-weight: 700; }
.name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.party-form input[type="text"], .party-form input:not([type]), .join-form input, #player-name {
  width: 100%;
  min-height: 52px;
  padding: .6rem .8rem;
  border: 1px solid rgba(255, 226, 168, .6);
  border-radius: 10px;
  background: rgba(4, 42, 39, .6);
  color: #fff9e9;
  font: 1.08rem Inika, serif;
}
.check { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-height: 44px; color: #fff5d3; }
.check input { width: 22px; height: 22px; accent-color: #ffe2a8; }
.check small { flex-basis: 100%; margin-left: 1.9rem; margin-top: -.5rem; color: #bcd3bd; font-size: .88rem; }
.form-actions { display: flex; gap: .6rem; }
.form-actions .button { flex: 1; }
.join-form { margin-top: .6rem; padding: 1rem; border: 1px dashed rgba(255, 226, 168, .5); border-radius: 14px; }
.join-row { display: flex; gap: .5rem; }
.join-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .2em; }

/* ---------- rooms ---------- */
.room-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem; margin-bottom: .6rem; color: #d9e8cf; }
.room-bar b { color: #ffe6ad; letter-spacing: .12em; }
.room-bar em { color: #ffb4a3; font-style: normal; }
.room-bar-buttons { display: flex; gap: .4rem; }
.invite { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 1rem; align-items: center; margin-bottom: .9rem; padding: 1rem; border-radius: 14px; background: #fff9e9; color: #153f3e; }
.invite .qr svg { display: block; width: 100%; height: auto; }
.invite-text p { margin: 0 0 .6rem; line-height: 1.4; }
.room-code { color: #153f3e; font: 2.6rem/1 Hanalei, serif; letter-spacing: .12em; }
.invite .button { color: #153f3e; border-color: #153f3e; }
.people { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; padding: 0; list-style: none; }
.people li { padding: .3rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff5d3; font-size: .95rem; }
.people li.is-away { opacity: .55; }
.host-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.segmented { display: flex; gap: .25rem; padding: .25rem; border: 1px solid rgba(255, 239, 188, .35); border-radius: 999px; }
.segmented button { min-height: 44px; padding: 0 .9rem; border: 0; border-radius: 999px; background: transparent; color: #d9e8cf; cursor: pointer; font: 700 .95rem Inika, serif; }
.segmented button[aria-pressed="true"] { background: #ffe2a8; color: #153f3e; }
.room-events { margin: 0 0 .5rem; color: #c5dcbe; font-size: .92rem; font-style: italic; }

.casino-status { min-height: 0; margin: .6rem .25rem 0; color: #ffe2a8; font-weight: 700; }
.casino-status:empty { margin: 0; }
.casino-storage-notice { margin: 1rem .25rem .25rem; padding: .65rem .75rem; border: 1px solid #ffe2a8; color: #fff3d0; background: rgba(88, 44, 34, .6); font-size: .92rem; line-height: 1.45; }

@media (max-width: 900px) {
  .casino { grid-template-columns: 1fr; gap: 1.2rem; padding-top: 5.5rem; }
  .casino-window { width: 100%; height: 38%; opacity: .2; background: linear-gradient(0deg, #0b3535, transparent), url("manini-beach.png") center/cover; }
  .casino-copy { max-width: 38rem; padding-top: 0; }
  .casino-copy h2 { max-width: 13ch; }
  .casino-room { justify-self: center; }
  /* Once a table is open, get the headline out of the way so the cards sit at the top. */
  .casino.is-playing .casino-copy, .casino.is-playing > .map-exit { display: none; }
  .casino.is-playing { padding-top: max(.6rem, env(safe-area-inset-top)); }
  .casino.is-playing .table-head { padding-bottom: .6rem; }
  .casino.is-playing .table-head h3 { font-size: clamp(1.7rem, 8vw, 2.1rem); }
}
@media (max-width: 540px) {
  .casino { padding: 5rem .5rem 1rem; }
  .casino-copy { padding-inline: .45rem; }
  .casino-copy h2 { font-size: clamp(3.2rem, 16vw, 5.2rem); }
  .casino-room { border-width: 7px; border-radius: 26px 26px 12px 12px; padding: .8rem .6rem .5rem; }
  .table-card { grid-template-columns: 2.8rem 1fr auto; padding: .9rem .8rem; }
  .table-card-suit { width: 2.8rem; height: 2.8rem; font-size: 1.5rem; }
  .seat { padding-inline: .25rem; }
  .playing-card { width: 54px; height: 78px; margin-right: -22px; padding: 5px; }
  .playing-card b { font-size: 1.1rem; }
  .playing-card span { font-size: 1.45rem; }
  .seat-row.seats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seat-row.seats-3 .seat:last-child { grid-column: 1 / -1; border-top: 1px dashed rgba(255, 239, 188, .25); }
  .board-cards .playing-card { width: 50px; height: 72px; margin-right: 5px; }
  .seat-me .playing-card { width: 66px; height: 94px; }
  .board { padding-block: .6rem; }
  .dealer-row { padding-block: .6rem; }
  .cards { min-height: 84px; }
  .invite { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .invite .qr { width: min(240px, 70vw); }
  .name-grid { grid-template-columns: 1fr; }
  .action-bar { margin-inline: -.35rem; }
}
@media (max-width: 350px) {
  .table-head h3 { font-size: 2rem; }
  .casino-balance { padding: .35rem .45rem; font-size: .9rem; }
  .board-cards .playing-card { width: 42px; height: 62px; margin-right: 3px; }
  .raise-presets { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .deal-in { animation: none; }
  .wagers button[aria-pressed="true"], .table-card:hover { transform: none; }
}

/* The two of us on the last ship, pinned beside the casino headline. */
.casino-polaroid { width: min(260px, 70%); margin: 1.6rem 0 0; padding: 10px 10px 12px; background: #fff9e9; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); transform: rotate(-3deg); }
.casino-polaroid img { display: block; width: 100%; height: auto; }
.casino-polaroid figcaption { margin-top: .5rem; color: #16454a; font: 1.05rem/1.1 Inika, serif; text-align: center; }
@media (max-width: 900px) { .casino-polaroid { width: min(230px, 62%); margin-top: 1.2rem; } }

/* Tables are the hero: the ship polaroid sits under the headline on wide screens and below
   the tables on phones. */
.casino-copy { grid-column: 1; grid-row: 1; }
.casino-room { grid-column: 2; grid-row: 1 / span 2; }
.casino > .casino-polaroid { position: relative; z-index: 2; grid-column: 1; grid-row: 2; align-self: start; margin-top: 0; }
@media (max-width: 900px) {
  .casino-copy, .casino-room, .casino > .casino-polaroid { grid-column: 1; grid-row: auto; }
  .casino > .casino-polaroid { justify-self: center; margin: .5rem 0 1.5rem; }
  .casino.is-playing > .casino-polaroid { display: none; }
}
@media (max-width: 540px) {
  .casino-copy h2 { font-size: clamp(2.4rem, 11vw, 3rem); margin-bottom: .8rem; }
  .casino-rules { margin-top: .8rem; font-size: .95rem; }
}
@media (min-width: 901px) { .casino-copy h2 { font-size: clamp(3rem, 5vw, 5.6rem); } }

/* "← lounge": a labeled way back from any table, friend rooms included. */
.to-lobby { width: auto; height: 44px; padding: 0 .9rem; border-radius: 999px; font: 700 .95rem Inika, serif; }
/* Desktop: keep the ship polaroid right under the headline instead of below the table's height. */
@media (min-width: 901px) {
  .casino { grid-template-rows: auto 1fr; }
  .casino-copy { align-self: start; }
  .casino > .casino-polaroid { align-self: start; margin-top: 1.4rem; }
}

/* Suit printed under the rank in the corner, like a real card, so it shows even when cards overlap. */
.playing-card b { display: grid; justify-items: center; align-content: start; width: max-content; gap: 1px; }
.playing-card b i { font-style: normal; font-size: .8em; line-height: 1; }
@media (max-width: 420px) { .casino.is-playing .table-head { gap: .4rem .6rem; } .casino.is-playing .table-head h3 { font-size: 1.55rem; } .casino.is-playing .casino-balance { padding: .35rem .5rem; font-size: .9rem; } .to-lobby { padding: 0 .7rem; font-size: .88rem; } }
