/* Troll BINGO — the room screen stylesheet.
   Colour and material come from theme-hall.css; this file decides structure,
   size and rhythm for every screen size. */

/* =============================================================================
   TROLL BINGO — the room screen.
   One stylesheet, written for this layout. Colour and material come from
   ../shared/theme-hall.css; everything here is structure, size and rhythm.

   Desktop:  facts | the draw | the board | prizes, closest, buying
             my cards along the bottom, every card on screen.
   Phone:    facts · draw strip · prizes · tabs · one panel at a time.
   ============================================================================= */

/* ---------- reset and page ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; color: var(--text); font-family: var(--ui); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.01em; }
.spacer { flex: 1; }
.sr, .sr-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shared surfaces ---------- */
.drawbox, .board, .closestpanel, .buystrip, .mycards, .mobstrip {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(0,0,0,.2));
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 12px;
  min-height: 0;
}
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px;
  background: rgba(247,241,227,.06); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2);
}
.icon-btn:hover { background: rgba(247,241,227,.12); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.btn { border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 800; font-size: 13px; background: rgba(247,241,227,.08); box-shadow: inset 0 0 0 1px var(--line); }
.btn.gold { background: var(--brass); color: var(--ink); box-shadow: 0 3px 0 var(--gold-press), inset 0 1px 0 rgba(255,255,255,.6); }
.btn.gold:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--gold-press); }
.btn.ghost { background: transparent; }
.seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.3); }
.seg button { border: 0; border-radius: 999px; padding: 5px 11px; font: 800 11px/1 var(--ui); background: transparent; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--paper-ink); }

/* ---------- header: the player and the money, nothing else ---------- */
.top { height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.14)); box-shadow: 0 1px 0 var(--line); }
.top .who { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.top .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brass-d); color: var(--ink); font: 800 11px/1 var(--ui); }
.top .bal { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 14px; border-radius: 999px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px var(--line-2); }
.top .bal .lbl { font: 700 9px/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.top .bal .amt { font-family: var(--display); font-weight: 800; font-size: 17px; line-height: 1.1; }
.top .bal button { border: 0; border-radius: 999px; padding: 8px 14px; font: 800 12px/1 var(--ui); background: var(--brass); color: var(--ink); box-shadow: 0 3px 0 var(--gold-press); }

/* ---------- the grid ---------- */
.room-grid { height: calc(100% - 52px); display: grid; gap: 8px; padding: 8px 10px 10px;
  grid-template-columns: 166px minmax(280px, .95fr) minmax(310px, 1.05fr) 284px;
  grid-template-rows: minmax(0, 1fr) minmax(158px, auto);
  grid-template-areas: "info draw board side" "cards cards cards cards"; }
.infocol { grid-area: info; } .centercol { grid-area: draw; } .board { grid-area: board; }
.rightcol { grid-area: side; } .mycards { grid-area: cards; }
.mobstrip, .tabs { display: none; }

/* ---------- left: which room, which round ---------- */
.infocol { display: flex; flex-direction: column; gap: 6px; }
.roomplate { background: var(--brass); color: var(--ink); border-radius: 12px; padding: 9px 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.6); }
.roomplate .lbl { display: block; font: 800 9px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; opacity: .62; }
.roomplate b { display: block; font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.25; }
.roomplate .rname { display: block; font: 700 11.5px/1.2 var(--ui); opacity: .8; }
.info { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 10px;
  border-radius: 10px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px var(--line); }
.info span { font: 700 9px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.info b { font-family: var(--display); font-weight: 800; font-size: 15px; }
.tools { display: flex; gap: 6px; margin-top: auto; }
.verMark { margin-top: 6px; font: 600 10px/1 var(--ui); letter-spacing: .12em; color: var(--text-3); opacity: .55; text-align: center; }

/* ---------- centre: the draw ---------- */
.centercol { display: block; min-height: 0; }
.drawbox { position: relative; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; gap: 16px; padding: 12px 16px; overflow: hidden; }
.machine { position: relative; display: flex; flex-direction: column; align-items: center; }
.globe { position: relative; width: clamp(80px, 12.5vh, 120px); height: clamp(80px, 12.5vh, 120px); border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 30% 24%, rgba(255,255,255,.2), rgba(255,255,255,.04) 42%, rgba(0,0,0,.5) 100%);
  box-shadow: inset 0 0 40px rgba(0,0,0,.6), 0 18px 34px rgba(0,0,0,.45), inset 0 0 0 5px rgba(0,0,0,.35), inset 0 0 0 7px rgba(232,204,122,.45); }
.tumble { position: absolute; inset: 0; }
.tumble i { position: absolute; width: 16px; height: 16px; border-radius: 50%; transition: opacity .6s;
  background: radial-gradient(circle at 34% 28%, color-mix(in srgb, #fff 45%, var(--c)) 0%, var(--c) 46%, color-mix(in srgb, #000 26%, var(--c)) 100%);
  animation: tmb 3s ease-in-out infinite; }
.glass { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(128deg, rgba(255,255,255,.22) 0 14%, transparent 32%); }
.chute { position: absolute; right: -4px; top: 46%; width: 44px; height: 12px; border-radius: 8px; background: var(--brass-d); }
.roller { position: absolute; left: 44%; top: 42%; width: 42px; height: 42px; border-radius: 50%; opacity: 0; pointer-events: none; z-index: 6;
  background: radial-gradient(circle at 34% 30%, var(--c) 0%, var(--c) 28%, rgba(0,0,0,.45) 96%), var(--c);
  box-shadow: 0 8px 16px rgba(0,0,0,.5), inset 0 -4px 8px rgba(0,0,0,.45), inset 0 2px 4px rgba(255,255,255,.35); }
.rface { position: absolute; inset: 19%; border-radius: 50%; display: grid; place-items: center; font: 700 14px/1 var(--ui);
  background: linear-gradient(180deg, #FFFDF7, #EFE6D2); color: var(--paper-ink); }

.ball { position: relative; width: clamp(92px, 15.5vh, 146px); height: clamp(92px, 15.5vh, 146px); border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 30%, var(--c) 0%, var(--c) 28%, rgba(0,0,0,.45) 96%), var(--c);
  box-shadow: 0 14px 26px rgba(0,0,0,.5), inset 0 -8px 16px rgba(0,0,0,.45), inset 0 4px 8px rgba(255,255,255,.35); }
.ball::after { content: ""; position: absolute; left: 20%; top: 12%; width: 30%; height: 22%; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); }
.ball .face { position: relative; width: 62%; height: 62%; border-radius: 50%; display: grid; place-items: center; align-content: center;
  background: linear-gradient(180deg, #FFFDF7, #EFE6D2); color: var(--paper-ink); box-shadow: inset 0 2px 5px rgba(0,0,0,.28); }
.ball .face .l { font: 700 clamp(9px, 1.4vh, 13px)/1 var(--ui); letter-spacing: .14em; color: var(--c); }
.ball .face .n { font: 700 clamp(30px, 5.6vh, 52px)/1 var(--ui); letter-spacing: -.02em; }
.ball.idle .face .n { font-size: clamp(14px, 2.2vh, 20px); color: var(--text-3); }

.drawside { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.counter { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.counter .big { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 4.2vh, 40px); line-height: 1; }
.counter .of { font: 700 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.progress { flex: 1 0 100%; height: 7px; border-radius: 4px; background: rgba(0,0,0,.42); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
.progress i { display: block; height: 100%; background: var(--brass); }
.trail { display: flex; gap: 8px; align-items: center; width: max-content; max-width: 100%; padding: 7px 11px; border-radius: 999px;
  background: rgba(0,0,0,.34); box-shadow: inset 0 0 0 1px var(--line); }
.mini { position: relative; width: clamp(32px, 4.6vh, 44px); height: clamp(32px, 4.6vh, 44px); border: 0; padding: 0; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 30%, var(--c) 0%, var(--c) 30%, rgba(0,0,0,.45) 100%), var(--c);
  box-shadow: 0 5px 10px rgba(0,0,0,.45), inset 0 -3px 6px rgba(0,0,0,.4), inset 0 2px 3px rgba(255,255,255,.3); }
.mini span { width: 66%; height: 66%; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--ui);
  background: linear-gradient(180deg, #FFFDF7, #EFE6D2); color: var(--paper-ink); }
.mini em { position: absolute; right: -2px; bottom: -3px; font: 800 9px/1 var(--ui); font-style: normal; background: var(--bg-2); color: var(--text-2); border-radius: 6px; padding: 2px 5px; }
.feed { display: flex; flex-direction: column; gap: 4px; min-height: 18px; }
.feed-i { font-size: 12.5px; color: var(--text-2); }
.feed-i b { color: var(--text); } .feed-i em { font-style: normal; font-family: var(--display); color: var(--gold); margin-left: 6px; }
.feed-i:nth-child(2) { opacity: .55; } .feed-i:nth-child(3) { opacity: .3; }
.sound-cta { align-self: flex-start; padding: 8px 14px; font-size: 12.5px; }

/* ---------- the board of 75 numbers ---------- */
.board { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 10px 12px; }
.brow { display: grid; grid-template-columns: 16px repeat(15, minmax(0, 1fr)); gap: 4px; align-items: center; }
.bl { font-family: var(--display); font-weight: 800; font-size: 12px; color: var(--c); }
.cell { display: grid; place-items: center; height: auto; aspect-ratio: 1.6; border-radius: 5px; font: 600 clamp(9.5px, 1.25vh, 12px)/1 var(--ui);
  background: rgba(247,241,227,.055); color: rgba(247,241,227,.34); }
.cell.on { background: var(--c); color: #FFF9EC; font-weight: 800; box-shadow: inset 0 -2px 3px rgba(0,0,0,.25); }
.cell.n-letter.on { color: var(--paper-ink); }
.cell.now { background: var(--brass); color: var(--ink); font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.6); }
.cell.needb { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold-2); }

/* ---------- right: prizes, closest, buying ---------- */
.rightcol { display: grid; grid-template-rows: max-content minmax(84px, 1fr) max-content; gap: 8px; min-height: 0; }
.prizes { display: flex; flex-direction: column; gap: 6px; padding-top: 11px; }
.prize { position: relative; border-radius: 10px; padding: 8px 11px; overflow: hidden;
  background: linear-gradient(180deg, #48141F, #330D17); box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 14px rgba(0,0,0,.4); }
.prize .p-name { display: flex; align-items: center; gap: 5px; font: 700 9.5px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prize .p-name i { font-style: normal; opacity: .75; letter-spacing: .06em; }
.prize .p-amt { font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1.3; }
.prize .p-meta { font: 500 9.5px/1.3 var(--ui); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prize .pt { display: inline-grid; grid-template-columns: repeat(5, 1fr); gap: 1.5px; width: 14px; height: 14px; }
.prize .pt i { border-radius: 1px; background: rgba(247,241,227,.16); }
.prize .pt i.on { background: var(--gold); } .prize .pt i.fr { background: var(--brass-d); }
.prize .star { position: absolute; right: 10px; top: 50%; transform: translateY(-50%) scale(.7); transform-origin: right center; }
.prize .star svg { fill: var(--gold); }
.prize.active { background: var(--brass); box-shadow: 0 8px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.7); }
.prize.active .p-name, .prize.active .p-amt, .prize.active .p-meta { color: var(--ink); }
.prize.active .pt i { background: rgba(0,0,0,.18); } .prize.active .pt i.on { background: #4A3407; }
.prize.jackpot { box-shadow: inset 0 0 0 2px var(--gold), 0 6px 14px rgba(0,0,0,.45); }
.prize.won { opacity: 1; }
.prize.won .p-amt { color: var(--text-2); }
.prize.won::after { content: "WON"; position: absolute; right: 9px; top: 8px; font: 800 8.5px/1 var(--ui); letter-spacing: .14em;
  color: var(--ink); background: var(--brass-d); padding: 3px 6px; border-radius: 999px; }
.prize.closed .p-amt { color: var(--text-2); }
.prize.closed::after { content: "CLOSED"; position: absolute; right: 9px; top: 8px; font: 800 8px/1 var(--ui); letter-spacing: .12em;
  color: var(--text-2); background: rgba(247,241,227,.12); padding: 3px 6px; border-radius: 999px; }

.closestpanel { display: flex; flex-direction: column; padding: 10px 12px 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.closestpanel h2 { font-size: 13px; }
.closestpanel .hint { font-size: 10.5px; color: var(--text-3); margin: 3px 0 6px; }
.closestscroll { flex: 1 1 auto; overflow: auto; min-height: 0; margin: 0 -12px; padding: 0 12px 10px; }
.closest { width: 100%; border-collapse: collapse; }
.closest th { text-align: left; font: 700 9px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 4px 6px; position: sticky; top: 0; background: var(--surface); }
.closest td { padding: 6px; font-size: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.closest .nick { font-weight: 700; } .closest .cid { display: block; font-size: 10.5px; color: var(--text-3); }
.closest tr.mine td { background: var(--gold-soft); }
.closest .you { font: 800 8.5px/1 var(--ui); background: var(--brass-d); color: var(--ink); padding: 3px 6px; border-radius: 999px; margin-left: 6px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chips i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 800 10.5px/1 var(--ui); font-style: normal; color: #FFF9EC; background: var(--c); }
.chipn { font: 700 11px/1 var(--ui); color: var(--text-2); background: rgba(247,241,227,.08); padding: 4px 8px; border-radius: 999px; }
.closest .go { text-align: right; font-family: var(--display); font-weight: 800; font-size: 15px; }

.buystrip { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; }
.buyline { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: baseline;
  font: 700 9px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.buyline b { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--text); text-transform: none; letter-spacing: 0; }
.buysets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.buysets button { border: 0; border-radius: 8px; padding: 6px 3px; background: rgba(247,241,227,.07); box-shadow: inset 0 0 0 1px var(--line);
  font: 800 12.5px/1.15 var(--ui); color: var(--text); }
.buysets button small { display: block; font: 600 8.5px/1.4 var(--ui); color: var(--text-3); }
.buysets button[aria-pressed="true"] { background: var(--brass); color: var(--ink); box-shadow: 0 2px 0 var(--gold-press); }
.buysets button[aria-pressed="true"] small { color: rgba(46,32,4,.75); }
.btn.buy { width: 100%; padding: 10px; font-size: 13px; }
.pkgbtn { width: 100%; padding: 8px; font-size: 11.5px; }
.buymsg { font-size: 11.5px; color: var(--gold-2); }
.buymsg:empty { display: none; }

/* ---------- my cards ---------- */
.mycards { display: flex; flex-direction: column; padding: 8px 12px 10px; }
.cards-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.cards-head h2 { font-size: 13px; }
.cards-count { font-size: 11.5px; color: var(--text-3); }
.cardview { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.3); }
.cardview button { border: 0; border-radius: 999px; padding: 5px 11px; font: 800 11px/1 var(--ui); background: transparent; color: var(--text-2); }
.cardview button[aria-pressed="true"] { background: var(--brass); color: var(--ink); }
.cards { display: grid; gap: 6px; overflow: auto; min-height: 0; align-content: start;
  grid-template-columns: repeat(var(--mcols, 12), minmax(0, 1fr)); }
.cards-empty { margin: 8px 2px 0; font-size: 12px; color: var(--text-3); }
.cards:not(:empty) + .cards-empty { display: none; }

.card { position: relative; border-radius: 7px; padding: 5px 6px 6px; background: linear-gradient(180deg, #FFFCF4, var(--paper));
  box-shadow: 0 8px 14px rgba(0,0,0,.38), inset 0 1px 0 #fff; }
.card .card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 4px; }
.card .id { font: 600 9px/1 var(--ui); letter-spacing: .06em; color: rgba(34,9,14,.55); }
.card .togo { font: 800 8.5px/1 var(--ui); padding: 3px 6px; border-radius: 999px; background: rgba(34,9,14,.08); color: rgba(34,9,14,.65); white-space: nowrap; }
.card .togo.one, .card .togo.win { background: var(--brass-d); color: var(--ink); }
.card .letters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin-bottom: 2px; }
.card .letters span { text-align: center; font: 700 8.5px/1 var(--ui); letter-spacing: .12em; color: rgba(34,9,14,.42); }
.card .grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.card .num { position: relative; display: grid; place-items: center; aspect-ratio: 1; font: 700 clamp(9px, .85vw, 14px)/1 var(--ui); color: var(--paper-ink); }
.card .num::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; }
.card .num.d { color: #FFF9EC; }
.card .num.d::before { background: radial-gradient(circle at 38% 34%, var(--dc, var(--n)) 55%, rgba(0,0,0,.28)); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.card .num.d[data-c="0"] { --dc: var(--b); } .card .num.d[data-c="1"] { --dc: var(--i); }
.card .num.d[data-c="2"] { --dc: var(--n); color: var(--paper-ink); } .card .num.d[data-c="3"] { --dc: var(--g); } .card .num.d[data-c="4"] { --dc: var(--o); }
.card .num.need::before { background: rgba(201,162,39,.14); border: 2px dashed #C9A227; }
.card .num.free::before { background: var(--brass-d); inset: 18%; }
.card .num.free svg { display: none; }
.card.won, .card.onetogo { box-shadow: 0 0 0 2px var(--gold), 0 8px 16px rgba(0,0,0,.42); }
.card.focus { box-shadow: 0 0 0 3px var(--gold-2), 0 8px 16px rgba(0,0,0,.42); }
.card.big { max-width: 320px; margin: 12px auto 0; } .card.big .num { font-size: 19px; }

/* every card at a glance */
.tile { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 0; border-radius: 8px; text-align: left;
  background: linear-gradient(180deg, #FFFCF4, var(--paper)); box-shadow: 0 6px 12px rgba(0,0,0,.34); }
.tile .t-top { display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.tile .t-top b { font: 700 9px/1 var(--ui); color: rgba(34,9,14,.6); }
.tile .t-top em { font: 800 8.5px/1 var(--ui); font-style: normal; padding: 3px 5px; border-radius: 999px; background: rgba(34,9,14,.08); color: rgba(34,9,14,.66); white-space: nowrap; }
.tile.hot { box-shadow: 0 0 0 2px var(--gold), 0 6px 12px rgba(0,0,0,.4); }
.tile.hot .t-top em { background: var(--brass-d); color: var(--ink); }
.tile .t-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.tile .t-grid i { aspect-ratio: 1; border-radius: 2px; background: rgba(34,9,14,.1); }
.tile .t-grid i.fr { background: var(--brass-d); }
.tile .t-grid i.c0 { background: var(--b); } .tile .t-grid i.c1 { background: var(--i); }
.tile .t-grid i.c2 { background: #9A927E; } .tile .t-grid i.c3 { background: var(--g); } .tile .t-grid i.c4 { background: var(--o); }

/* ---------- overlays: rules, winnings, packages, the win, the summary ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: rgba(8,3,12,.72); backdrop-filter: blur(3px); animation: fade .25s ease-out; }
.dialog { position: relative; width: min(520px, 100%); max-height: 88vh; overflow: auto; text-align: center; padding: 24px;
  border-radius: 16px; background: linear-gradient(180deg, #4A1420, #2A0A12); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 80px rgba(0,0,0,.6); }
.dialog h3 { font-size: 22px; margin-bottom: 6px; }
.dialog .sub, .dialog .lead { color: var(--text-2); font-size: 13.5px; }
.dialog .kicker { font: 800 11px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.dialog .amount { display: inline-block; position: relative; font-family: var(--display); font-weight: 800; font-size: 56px; letter-spacing: -.03em;
  background: var(--brass); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dialog .actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.close-x { position: absolute; right: 12px; top: 12px; }
.win-dialog .winfoot { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
.summary .winline { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; }
.summary .winline:last-of-type { border-bottom: 0; }
.summary .val { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 17px; }
.summary .totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; padding: 12px; border-radius: 12px; background: rgba(0,0,0,.3); }
.summary .totals small { display: block; font-size: 10.5px; color: var(--text-3); }
.summary .totals b { font-family: var(--display); font-weight: 800; font-size: 19px; }
.tag { font: 800 9px/1 var(--ui); letter-spacing: .12em; padding: 3px 7px; border-radius: 999px; background: var(--brass-d); color: var(--ink); }
.pkglist { display: grid; gap: 12px; margin-top: 8px; }
.pkgcard { padding: 14px; border-radius: 12px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.pk-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pk-h b { font-family: var(--display); font-weight: 800; font-size: 17px; }
.pk-off { background: var(--brass); color: var(--ink); font: 800 12px/1 var(--ui); padding: 4px 10px; border-radius: 999px; }
.pk-rooms { color: var(--text-3); font-size: 12.5px; margin: 2px 0 10px; }
.pk-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pk-facts div { background: rgba(247,241,227,.05); border-radius: 8px; padding: 7px 9px; }
.pk-facts small { display: block; font-size: 10.5px; color: var(--text-3); }
.pk-facts b { font-family: var(--display); font-weight: 800; font-size: 17px; }
.strike { text-decoration: line-through; color: var(--text-3); }
.pk-buy { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pk-price { font-family: var(--display); font-weight: 800; font-size: 26px; color: var(--gold); }
.pk-save { font-size: 12.5px; color: var(--ok); font-weight: 700; }
.pk-msg { margin-top: 8px; font-size: 12.5px; color: var(--gold-2); } .pk-msg:empty { display: none; }
.gate .dialog { max-width: 420px; }
.gate-ball { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 34% 30%, var(--b) 0%, var(--b) 28%, rgba(0,0,0,.45) 96%), var(--b);
  box-shadow: 0 12px 22px rgba(0,0,0,.5), inset 0 -6px 12px rgba(0,0,0,.45), inset 0 3px 6px rgba(255,255,255,.35); animation: gatebob 2.4s ease-in-out infinite; }
.gate-ball b { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #FFFDF7, #EFE6D2);
  color: var(--paper-ink); font: 700 24px/1 var(--ui); }
.gate-ball span { position: absolute; top: 20px; font: 700 11px/1 var(--ui); color: var(--b); }
.gatebtns { display: grid; gap: 10px; margin-top: 18px; }
.gate .btn { width: 100%; padding: 13px; font-size: 15px; }
.announce { position: fixed; left: 50%; top: 78px; transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 999px;
  background: rgba(0,0,0,.6); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; animation: ann .3s ease-out; }
.announce b { color: var(--gold); }

/* ---------- prototype bar ---------- */
.proto { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 70; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 7px 10px; border-radius: 999px; background: rgba(0,0,0,.55); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--text-3); }
.proto button { border: 0; border-radius: 999px; padding: 6px 11px; font: 700 12px/1 var(--ui); background: rgba(247,241,227,.08); color: var(--text-2); }
.proto button[aria-pressed="true"] { background: var(--brass); color: var(--ink); }
.proto .sep { opacity: .4; }
body.embedded .proto { display: none; }

/* ---------- motion ---------- */
@keyframes tmb { 0%,100% { transform: translate3d(0,0,0) } 25% { transform: translate3d(6px,-10px,0) } 50% { transform: translate3d(-8px,6px,0) } 75% { transform: translate3d(4px,10px,0) } }
@keyframes fade { from { opacity: 0 } }
@keyframes ann { from { opacity: 0; transform: translate(-50%,-6px) } }
@keyframes gatebob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
.tumble.shake { animation: agitate 640ms ease-in-out; }
@keyframes agitate { 0%,100% { transform: translate(0,0) rotate(0) } 20% { transform: translate(-3px,2px) rotate(-1.5deg) } 45% { transform: translate(4px,-3px) rotate(1.5deg) } 70% { transform: translate(-2px,3px) rotate(-1deg) } }
.roller.go { animation: rollout 780ms cubic-bezier(.34,.86,.3,1) forwards; }
@keyframes rollout { 0% { opacity: 0; transform: translate(-10px,24px) scale(.55) rotate(0) } 16% { opacity: 1 } 52% { transform: translate(70px,8px) scale(.86) rotate(420deg) } 80% { transform: translate(120px,-12px) scale(1) rotate(650deg) } 100% { opacity: 0; transform: translate(130px,-8px) scale(1.05) rotate(710deg) } }
.ball.drop { animation: landball 620ms cubic-bezier(.2,.9,.25,1.15) both; }
@keyframes landball { 0% { transform: translate(-40px,-16px) scale(.55) rotate(-160deg); opacity: 0 } 45% { opacity: 1 } 75% { transform: translate(0,3px) scale(1.05) rotate(6deg) } 100% { transform: none; opacity: 1 } }
.cell.pop { animation: cellpop 700ms cubic-bezier(.2,.9,.25,1.15); }
@keyframes cellpop { 0% { transform: scale(1) } 28% { transform: scale(1.35); box-shadow: 0 0 0 4px rgba(232,204,122,.45) } 100% { transform: scale(1) } }
.mini { animation: slidein 420ms cubic-bezier(.16,1,.3,1) both; }
@keyframes slidein { from { transform: translateX(-14px) scale(.9); opacity: 0 } }
.counter .big.tick { animation: tick 380ms cubic-bezier(.2,.9,.25,1.15); display: inline-block; }
@keyframes tick { 0% { transform: translateY(-10px); opacity: .2 } 100% { transform: none; opacity: 1 } }
.card .num.d::before { animation: stamp 420ms cubic-bezier(.2,.9,.25,1.15); }
@keyframes stamp { 0% { transform: scale(.4) rotate(-12deg); opacity: 0 } 60% { transform: scale(1.12) rotate(3deg) } 100% { transform: none; opacity: 1 } }
.card.onetogo { animation: breathe 1.9s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-3px) } }
.prize.shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%); transform: translateX(-120%); animation: sweep 900ms ease-out; }
@keyframes sweep { to { transform: translateX(120%) } }
/* the next prize is the target, and it says so */
.prize.next { z-index: 3; overflow: visible; box-shadow: inset 0 0 0 2px var(--gold), 0 8px 18px rgba(0,0,0,.45);
  animation: nextGlow 1.8s ease-in-out infinite, nextShake 4s ease-in-out infinite; transform-origin: 50% 60%; }
.prize.next::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.26) 50%, transparent 62%); background-size: 220% 100%; animation: nextSweep 2.6s ease-in-out infinite; }
.prize.next::after { content: "▼ NEXT"; right: 9px; top: -10px; left: auto; font: 800 8.5px/1 var(--ui); letter-spacing: .14em;
  color: var(--ink); background: var(--brass); padding: 4px 8px; border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.5); animation: nextBadge 1.8s ease-in-out infinite; }
.prize.target { z-index: 3; overflow: visible; animation: nextGlow 1.8s ease-in-out infinite, nextShake 4s ease-in-out infinite; }
.prize.target::before { content: "▼ WINNING NOW"; position: absolute; right: 9px; top: -10px; font: 800 8.5px/1 var(--ui); letter-spacing: .14em;
  color: var(--ink); background: var(--brass); padding: 4px 8px; border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.5); animation: nextBadge 1.8s ease-in-out infinite; }
@keyframes nextGlow { 0%,100% { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 0 rgba(232,204,122,.5), 0 8px 18px rgba(0,0,0,.45) } 50% { box-shadow: inset 0 0 0 2px var(--gold-2), 0 0 24px 5px rgba(232,204,122,.42), 0 8px 18px rgba(0,0,0,.45) } }
@keyframes nextShake { 0%,62% { transform: none } 66% { transform: translateY(-3px) rotate(-1.2deg) scale(1.03) } 70% { transform: translateY(-2px) rotate(1.2deg) scale(1.03) } 74% { transform: translateY(-3px) rotate(-.9deg) scale(1.02) } 80% { transform: translateY(-1px) rotate(.6deg) scale(1.01) } 88%,100% { transform: none } }
@keyframes nextSweep { 0% { background-position: 140% 0 } 60%,100% { background-position: -40% 0 } }
@keyframes nextBadge { 0%,100% { transform: translateY(0); opacity: 1 } 50% { transform: translateY(3px); opacity: .85 } }
/* the win moment */
.winmoment .rays { position: absolute; inset: -30%; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg at 50% 45%, rgba(232,204,122,.28) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 12%, transparent 62%);
  mask-image: radial-gradient(circle at 50% 45%, #000 12%, transparent 62%); animation: rays 26s linear infinite; }
@keyframes rays { to { transform: rotate(360deg) } }
.winmoment .burst { position: absolute; left: 50%; top: 45%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 3px solid var(--gold); pointer-events: none; animation: burst 900ms cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes burst { to { transform: scale(24); opacity: 0; border-width: 1px } }
.winmoment .coin { position: absolute; top: -6%; width: 20px; height: 20px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 30%, #FFF2C4 0%, #E8CC7A 42%, #9C7A12 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 -2px 3px rgba(0,0,0,.35), inset 0 2px 2px rgba(255,255,255,.7); animation: coinfall linear forwards; }
@keyframes coinfall { 0% { transform: translateY(0) rotate(0) } 100% { transform: translateY(112vh) rotate(var(--spin)) } }
.winmoment .dialog { z-index: 2; box-shadow: inset 0 0 0 2px var(--gold), 0 40px 80px rgba(0,0,0,.6); }
.winmoment .num.lit::before { background: var(--brass); }
.winmoment .num.lit { color: var(--ink); }
.winmoment.big .amount { font-size: 74px; }
@media (prefers-reduced-motion: reduce) {
  .tumble i, .tumble.shake, .roller.go, .ball.drop, .cell.pop, .mini, .counter .big.tick, .card .num.d::before,
  .card.onetogo, .prize.next, .prize.next::before, .prize.next::after, .prize.target, .prize.target::before,
  .winmoment .rays, .winmoment .burst, .winmoment .coin, .gate-ball { animation: none !important; }
  .winmoment .coin { display: none; }
}

/* =============================================================================
   PHONE and short screens — five bands, one panel at a time
   ============================================================================= */
@media (max-width: 820px), (max-height: 560px) {
  .top { height: 46px; padding: 0 10px; }
  .top .who b { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
  .top .bal { padding: 4px 5px 4px 10px; } .top .bal .amt { font-size: 15px; } .top .bal button { padding: 7px 11px; font-size: 11px; }

  .room-grid { height: calc(100% - 46px); grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 84px auto minmax(0, 1fr);
    grid-template-areas: "info" "strip" "prizes" "tabs" "side"; gap: 6px; padding: 6px 8px 8px; }

  .infocol { grid-area: info; display: grid; grid-template-columns: auto repeat(2, minmax(0, 1fr)) auto; gap: 5px; align-items: stretch; }
  .roomplate { padding: 5px 9px; } .roomplate .lbl { display: none; } .roomplate b { font-size: 15px; } .roomplate .rname { font-size: 9.5px; }
  .info { flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 7px; }
  .info span { font-size: 7px; } .info b { font-size: 12px; }
  .info:nth-of-type(3), .info:nth-of-type(4) { display: none; }
  .tools { margin: 0; gap: 4px; } .tools .icon-btn { width: 28px; height: 28px; } .tools .icon-btn svg { width: 15px; height: 15px; }
  .verMark { display: none; }

  .mobstrip { grid-area: strip; display: flex; align-items: center; gap: 10px; padding: 7px 10px; }
  .ms-ball { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: radial-gradient(circle at 34% 30%, var(--c) 0%, var(--c) 30%, rgba(0,0,0,.45) 96%), var(--c);
    box-shadow: 0 6px 12px rgba(0,0,0,.5), inset 0 -4px 8px rgba(0,0,0,.4), inset 0 2px 4px rgba(255,255,255,.35); }
  .ms-ball b { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(180deg, #FFFDF7, #EFE6D2); color: var(--paper-ink); font: 700 17px/1 var(--ui); }
  .ms-count { display: flex; align-items: baseline; gap: 2px; }
  .ms-count b { font-family: var(--display); font-weight: 800; font-size: 23px; }
  .ms-count i { font-style: normal; font-size: 12px; color: var(--text-3); }
  .ms-prev { display: flex; gap: 5px; margin-left: auto; }
  .ms-prev span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--ui); color: #FFF9EC;
    background: radial-gradient(circle at 34% 30%, var(--c) 0%, var(--c) 40%, rgba(0,0,0,.45) 100%); }

  .centercol { display: none; }
  .rightcol { display: contents; }
  .prizes { grid-area: prizes; flex-direction: row; gap: 6px; overflow-x: auto; padding: 12px 2px 2px; scroll-snap-type: x mandatory; }
  .prizes::-webkit-scrollbar { display: none; }
  .prize { flex: 0 0 47%; scroll-snap-align: start; height: calc(100% - 4px); display: flex; flex-direction: column; justify-content: center; padding: 6px 9px; }
  .prize .p-amt { font-size: 16px; } .prize .p-name { font-size: 8.5px; } .prize .p-meta { display: none; }
  .prize .star { transform: translateY(-50%) scale(.55); }

  .tabs { grid-area: tabs; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .tabs button { border: 0; border-radius: 999px; padding: 9px 6px; font: 800 11.5px/1 var(--ui);
    background: rgba(247,241,227,.07); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
  .tabs button[aria-selected="true"] { background: var(--brass); color: var(--ink); box-shadow: 0 2px 0 var(--gold-press); }
  .tabs span { font-family: var(--display); font-weight: 800; }

  .board, .closestpanel, .buystrip, .mycards { grid-area: side; display: none; height: 100%; }
  body[data-tab="board"] .board { display: flex; }
  body[data-tab="closest"] .closestpanel { display: flex; }
  body[data-tab="buy"] .buystrip { display: flex; }
  body[data-tab="cards"] .mycards { display: flex; }
  .board .cell { aspect-ratio: 1.7; }
  .buysets { grid-template-columns: repeat(3, 1fr); }
  .btn.buy { padding: 13px; font-size: 14px; } .pkgbtn { padding: 11px; font-size: 12.5px; }
  .cards { grid-template-columns: repeat(var(--mcols, 4), minmax(0, 1fr)); gap: 6px; }
  .card .num { font-size: clamp(10px, 3.2vw, 16px); }
  .proto { font-size: 11px; padding: 6px 8px; left: 8px; right: 8px; transform: none; justify-content: center; }
}
@media (max-height: 560px) {
  .room-grid { grid-template-rows: auto auto 56px auto minmax(0, 1fr); gap: 4px; padding: 4px 8px 6px; }
  .ms-ball { width: 40px; height: 40px; } .ms-ball b { width: 28px; height: 28px; font-size: 14px; }
  .ms-count b { font-size: 18px; }
  .prize { flex: 0 0 27%; }
  .info:nth-of-type(2) { display: none; }
  .tabs button { padding: 7px 4px; font-size: 11px; }
}

/* 1024-wide desktops: narrower side column so nothing spills sideways */
@media (min-width:821px) and (max-width:1120px) and (min-height:561px){
  .room-grid{ grid-template-columns:144px minmax(240px,.9fr) minmax(280px,1.1fr) 246px; gap:7px; padding:7px 8px 8px; }
  .buysets{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .prize .p-amt{ font-size:16px; }
}
/* a phone on its side: the panel is short, so the cards are tiles and they fit */
@media (max-height:560px){
  .mycards{ padding:6px 10px 8px; }
  .cards-head{ margin-bottom:4px; } .cards-head h2{ font-size:12px; } .cards-count{ display:none; }
  .tile{ padding:4px; gap:3px; } .tile .t-top b{ font-size:8px; } .tile .t-top em{ font-size:7.5px; padding:2px 4px; }
}

@media (max-height:560px){
  .room-grid{ grid-template-rows:auto auto 50px auto minmax(0,1fr); }
  .mobstrip{ padding:4px 8px; }
  .tile .t-grid i{ border-radius:1.5px; }
}

/* the badge sits above the plaque, so the plaque must not clip it */
.prize.next, .prize.target { overflow: visible; }
.prize.jackpot { padding-right: 30px; }
.prize .star { right: 8px; }
/* the plaque stays readable when a prize is already won */
.prize.won .p-name, .prize.won .p-meta { color: var(--text-3); }

/* the star sits in its own column so nothing is crowded */
.prize.jackpot{ display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; padding:8px 11px; }
.prize.jackpot > div{ min-width:0; }
.prize.jackpot .star{ position:static; transform:none; display:grid; place-items:center; width:34px; height:34px; }
.prize.jackpot .star svg{ width:30px; height:30px; }
.prize.jackpot .star span{ font:800 10px/1 var(--ui); }
@media (max-width:820px), (max-height:560px){
  .prize.jackpot{ grid-template-columns:auto minmax(0,1fr); gap:7px; padding:6px 9px; }
  .prize.jackpot .star{ width:26px; height:26px; } .prize.jackpot .star svg{ width:24px; height:24px; }
}

/* the closest list gets the space it needs; the prize stack keeps its own height */
@media (min-width: 821px) and (min-height: 561px) {
  .rightcol { grid-template-rows: max-content minmax(150px, 1fr) max-content; }
  .closestpanel { min-height: 150px; }
  .closest td { padding: 5px 6px; }
}

/* the right column always fits: prizes, a shorter closest list, then buying */
@media (min-width: 821px) and (min-height: 561px) {
  .rightcol { grid-template-rows: max-content minmax(110px, 1fr) max-content; }
  .closestpanel { min-height: 110px; }
  .prizes { padding-top: 11px; gap: 5px; }
  .prize { padding: 6px 10px; }
  .prize .p-amt { font-size: 17px; line-height: 1.25; }
  .prize.jackpot { padding: 6px 10px; }
  .buystrip { gap: 6px; padding: 9px 11px; }
  .buysets button { padding: 5px 3px; }
  .btn.buy { padding: 9px; }
  .pkgbtn { padding: 7px; font-size: 11px; }
}

/* on a shorter window the prize meta line and the packages button shrink,
   so the column still ends with a visible Buy and Packages */
@media (min-width: 821px) and (max-height: 940px) {
  .prize .p-meta { font-size: 9px; }
  .prize .p-name { font-size: 9px; }
  .prize .p-amt { font-size: 15.5px; line-height: 1.2; }
  .prize { padding: 5px 9px; }
  .rightcol { grid-template-rows: max-content minmax(84px, 1fr) max-content; gap: 6px; }
  .closestpanel { min-height: 84px; padding: 8px 10px 0; }
  .closestpanel .hint { display: none; }
  .buystrip { gap: 5px; padding: 8px 10px; }
  .buyline b { font-size: 14px; }
  .btn.buy { padding: 8px; font-size: 12.5px; }
  .pkgbtn { padding: 6px; font-size: 10.5px; }
}

/* shorter windows: each prize is one compact line, and only the live ones explain themselves */
@media (min-width: 821px) and (max-height: 940px) {
  .prize { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; }
  .prize .p-name { grid-column: 1; grid-row: 1; }
  .prize .p-amt { grid-column: 2; grid-row: 1; font-size: 15px; white-space: nowrap; }
  .prize .p-meta { grid-column: 1 / -1; grid-row: 2; font-size: 8.5px; }
  .prize:not(.active):not(.next):not(.target):not(.won) .p-meta { display: none; }
  .prize.jackpot { grid-template-columns: auto minmax(0, 1fr) auto; }
  .prize.jackpot .star { grid-row: 1 / span 2; width: 26px; height: 26px; }
  .prize.jackpot .star svg { width: 24px; height: 24px; }
}

/* if the window is too short for prizes, closest and buying at once,
   the side column scrolls on its own rather than cutting anything off */
@media (min-width: 821px) and (min-height: 561px) {
  .rightcol { grid-template-rows: max-content minmax(84px, 1fr) max-content; overflow-y: auto; overscroll-behavior: contain; }
  .rightcol::-webkit-scrollbar { width: 6px; }
  .rightcol::-webkit-scrollbar-thumb { background: rgba(232,204,122,.25); border-radius: 3px; }
}

/* the called-numbers board reads from across the room */
.cell { background: rgba(247,241,227,.07); color: rgba(247,241,227,.42); }
.cell.on { box-shadow: inset 0 -2px 3px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.35); }
.cell.n-letter.on { background: #D8CDB4; }
.board { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.26)); }
.bl { opacity: .95; }

/* =============================================================================
   MY CARDS — readable cards, no panel scrollbar. The page scrolls instead.
   The draw, the prizes and the board still fill the first screen; the cards
   continue below and the browser scrolls to them.
   ============================================================================= */
html, body { overflow: auto; overflow-x: hidden; height: auto; min-height: 100%; }
.room-grid { height: auto; min-height: calc(100vh - 52px); }
.cards { overflow: visible; }
.mycards { overflow: visible; }

@media (min-width: 821px) and (min-height: 561px) {
  .room-grid { grid-template-rows: minmax(420px, calc(100vh - 300px)) auto; }
  .cards { grid-template-columns: repeat(var(--mcols, 6), minmax(0, 1fr)); gap: 8px; }
  .card { padding: 8px 9px 9px; border-radius: 9px; }
  .card .id { font-size: 10.5px; } .card .togo { font-size: 10px; padding: 4px 8px; }
  .card .letters span { font-size: 10px; }
  .card .grid { gap: 3px; }
  .card .num { font-size: clamp(13px, 1.1vw, 18px); }
  .mycards { padding: 10px 12px 14px; }
}
@media (max-width: 820px), (max-height: 560px) {
  .room-grid { grid-template-rows: auto auto 84px auto auto; min-height: 0; }
  .board, .closestpanel, .buystrip, .mycards { height: auto; }
  .cards { grid-template-columns: repeat(var(--mcols, 2), minmax(0, 1fr)); gap: 8px; }
  .card .num { font-size: clamp(14px, 4.4vw, 20px); }
  .card .id { font-size: 10px; } .card .togo { font-size: 9.5px; }
  .mycards { padding: 10px 12px 16px; }
  .proto { position: static; transform: none; margin: 10px auto 14px; width: max-content; }
}

/* the cards panel is full width on a phone, so the cards are big enough to read */
@media (max-width: 820px), (max-height: 560px) {
  .mycards { grid-column: 1 / -1; width: 100%; }
  .cards { width: 100%; grid-template-columns: repeat(var(--mcols, 2), minmax(150px, 1fr)); }
}

/* =============================================================================
   FINAL ORDER — the draw and the prizes first, my cards next,
   and the table of numbers that came up at the very bottom.
   Everything is compact; if it does not fit, the browser scrolls.
   ============================================================================= */
@media (min-width: 821px) {
  .room-grid {
    grid-template-columns: 158px minmax(320px, 1fr) 280px;
    grid-template-areas: "info draw side" "cards cards cards" "board board board";
    grid-template-rows: minmax(260px, 46vh) auto auto;
    gap: 8px; padding: 8px 10px 12px; min-height: 0;
  }
  .drawbox { grid-template-columns: auto auto minmax(180px, 1fr); }
  .drawbox .machine { align-self: center; }
  .board { padding: 8px 10px; }
  .board .brow { gap: 4px; }
  .board .cell { aspect-ratio: 2.1; font-size: 11.5px; border-radius: 4px; }
  .mycards { padding: 9px 12px 11px; }
  .rightcol { overflow: visible; grid-template-rows: max-content max-content max-content; }
  .closestpanel { min-height: 96px; max-height: 168px; }
}
@media (max-width: 820px) {
  .tabs { display: none !important; }
  .room-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "info" "strip" "prizes" "buy" "cards" "closest" "board";
    grid-template-rows: auto auto auto auto auto auto auto;
    gap: 6px; padding: 6px 8px 12px; min-height: 0;
  }
  .infocol { grid-area: info; } .mobstrip { grid-area: strip; display: flex; }
  .prizes { grid-area: prizes; }
  .buystrip { grid-area: buy; display: flex !important; height: auto !important; }
  .mycards { grid-area: cards; display: flex !important; height: auto !important; }
  .closestpanel { grid-area: closest; display: flex !important; height: auto !important; max-height: 260px; }
  .board { grid-area: board; display: flex !important; height: auto !important; }
  .board .cell { aspect-ratio: 1.9; font-size: 11px; }
  .centercol { display: none !important; }
  .rightcol { display: contents !important; }
}

/* =============================================================================
   v1.2 — the board of called numbers sits at the very bottom, everything above
   it is tightened so the first screen holds the game itself.
   ============================================================================= */
@media (min-width: 821px) and (min-height: 561px) {
  .room-grid {
    grid-template-columns: 160px minmax(360px, 1fr) 280px;
    grid-template-rows: minmax(300px, auto) auto auto;
    grid-template-areas: "info draw side" "cards cards cards" "board board board";
    min-height: 0;
  }
  .board { grid-area: board; height: auto; padding: 8px 12px; }
  .board .cell { aspect-ratio: 2.1; font-size: 12px; }
  .board .brow { gap: 5px; }
  .drawbox { gap: 22px; padding: 14px 20px; }
  .drawbox .machine, .drawbox .globe { width: clamp(96px, 15vh, 140px); }
  .drawbox .globe { height: clamp(96px, 15vh, 140px); }
  .drawbox .ball { width: clamp(110px, 18vh, 168px) !important; height: clamp(110px, 18vh, 168px) !important; }
  .drawbox .ball .face .n { font-size: clamp(38px, 6.6vh, 62px); }
  .counter .big { font-size: clamp(30px, 5vh, 48px); }
  .trail .mini { width: clamp(38px, 5.4vh, 50px); height: clamp(38px, 5.4vh, 50px); }
  .mycards { padding: 10px 12px 12px; }
}
@media (max-width: 820px), (max-height: 560px) {
  .room-grid {
    grid-template-rows: auto auto 84px auto auto auto;
    grid-template-areas: "info" "strip" "prizes" "tabs" "side" "board";
  }
  .board { grid-area: board; display: flex !important; height: auto; padding: 8px 10px; }
  .board .cell { aspect-ratio: 2; font-size: 11px; }
  .tabs { grid-template-columns: repeat(3, 1fr); }
}

/* the phone strip: each ball arrives with the same movement as on the desktop */
.ms-ball.drop { animation: msdrop 620ms cubic-bezier(.2,.9,.25,1.15) both; }
@keyframes msdrop {
  0%   { transform: translate(-26px, -14px) scale(.5) rotate(-140deg); opacity: 0 }
  45%  { opacity: 1 }
  75%  { transform: translate(0, 3px) scale(1.06) rotate(8deg) }
  100% { transform: none; opacity: 1 }
}
.ms-prev span { animation: slidein 420ms cubic-bezier(.16,1,.3,1) both; }
@media (prefers-reduced-motion: reduce) { .ms-ball.drop, .ms-prev span { animation: none } }

/* ---- phone, corrected: the board always at the bottom, three tabs above it ---- */
@media (max-width: 820px), (max-height: 560px) {
  .room-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto 84px auto auto auto !important;
    grid-template-areas: "info" "strip" "prizes" "tabs" "side" "board" !important;
  }
  .board { grid-area: board !important; display: flex !important; height: auto !important; margin-top: 2px; }
  .closestpanel, .buystrip, .mycards { grid-area: side !important; }
  body .board { display: flex !important; }
  .infocol { grid-template-columns: auto minmax(0, 1fr) auto !important; align-items: center; }
  .infocol .info:nth-of-type(2), .infocol .info:nth-of-type(3), .infocol .info:nth-of-type(4) { display: none !important; }
  .infocol .info:nth-of-type(1) { display: flex !important; flex-direction: row; align-items: baseline; gap: 6px; }
  .tabs { grid-template-columns: repeat(3, 1fr) !important; }
  .mycards, .closestpanel, .buystrip { height: auto !important; }
}

/* =============================================================================
   LAYOUT v6 — the board at the bottom, the closest list in its own column,
   everything compact. The first screen holds the game; the page scrolls to
   the cards and the board.
   ============================================================================= */
@media (min-width: 821px) {
  .room-grid {
    grid-template-columns: 158px minmax(320px, 1fr) minmax(250px, 300px) 262px !important;
    grid-template-rows: minmax(250px, auto) auto auto !important;
    grid-template-areas:
      "info draw closest side"
      "cards cards cards cards"
      "board board board board" !important;
    gap: 8px !important; padding: 8px 10px 12px !important;
    height: auto !important; min-height: 0 !important;
  }
  .infocol { grid-area: info !important; } .centercol { grid-area: draw !important; }
  .closestpanel { grid-area: closest !important; height: auto !important; min-height: 250px; }
  .rightcol { grid-area: side !important; display: flex !important; flex-direction: column !important; gap: 8px !important; overflow: visible !important; }
  .mycards { grid-area: cards !important; }
  .board { grid-area: board !important; height: auto !important; }
  .prizes { flex: none !important; padding-top: 11px !important; }
  .buystrip { flex: none !important; }
  .drawbox { height: 100% !important; }
  .board .cell { aspect-ratio: 1.9; font-size: 12px !important; }
  .closestscroll { overflow: visible !important; }
  .closest td { padding: 7px 6px; }
}
@media (max-width: 820px), (max-height: 560px) {
  /* one column, in the order a player reads it, and the page scrolls */
  .room-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: none !important;
    grid-template-areas: none !important;
    height: auto !important; min-height: 0 !important; gap: 8px !important; padding: 8px !important;
  }
  .infocol, .mobstrip, .centercol, .prizes, .buystrip, .closestpanel, .mycards, .board { grid-area: auto !important; display: flex !important; height: auto !important; }
  .tabs { display: none !important; }
  .centercol { display: block !important; }
  .drawbox { display: grid !important; grid-template-columns: auto minmax(0, 1fr) !important; gap: 12px !important; padding: 10px 12px !important; }
  .drawbox .machine { display: none !important; }
  .drawbox .ball { width: 104px !important; height: 104px !important; }
  .drawbox .ball .face .n { font-size: 38px !important; }
  .mobstrip { display: none !important; }              /* the real draw box is on screen, no need for a copy */
  .prizes { flex-direction: row !important; overflow-x: auto !important; }
  .prize { flex: 0 0 47% !important; height: auto !important; min-height: 62px; }
  .closestpanel { flex-direction: column !important; min-height: 0 !important; }
  .closestscroll { overflow: visible !important; }
  .board { flex-direction: column !important; }
  .board .cell { aspect-ratio: 1.7; }
  .rightcol { display: contents !important; }
  .proto { position: static !important; transform: none !important; margin: 8px auto 12px !important; }
}

/* tighter: the game fits one screen where it can, and the page scrolls only a little */
@media (min-width: 821px) {
  .room-grid { grid-template-rows: minmax(230px, 288px) auto auto !important; }
  .drawbox { grid-template-columns: auto auto minmax(0, 1fr) !important; gap: 14px !important; padding: 10px 14px !important; }
  .drawbox .machine, .drawbox .globe { width: 104px !important; } .drawbox .globe { height: 104px !important; }
  .drawbox .ball { width: 124px !important; height: 124px !important; }
  .drawbox .ball .face .n { font-size: 44px !important; }
  .counter .big { font-size: 34px !important; }
  .trail .mini { width: 40px !important; height: 40px !important; }
  .cards { grid-template-columns: repeat(var(--mcols, 8), minmax(0, 1fr)) !important; }
  .board { padding: 8px 10px !important; gap: 4px !important; }
  .board .cell { aspect-ratio: 2.6 !important; font-size: 11.5px !important; }
  .mycards { padding: 8px 12px 10px !important; }
  .closestpanel { min-height: 0 !important; }
}

/* the first row is as tall as its tallest column, so nothing overlaps the row below */
@media (min-width: 821px) {
  .room-grid { grid-template-rows: auto auto auto !important; }
  .closestpanel { max-height: 100%; overflow: hidden; }
  .closestscroll { overflow: auto !important; }
  .drawbox { min-height: 230px; }
}

/* phone: the reading order is the playing order */
@media (max-width: 820px), (max-height: 560px) {
  .room-grid { display: grid !important; }
  .infocol { order: 1; } .centercol { order: 2; } .prizes { order: 3; }
  .closestpanel { order: 4; } .buystrip { order: 5; } .mycards { order: 6; } .board { order: 7; }
  .closestpanel { max-height: 260px; } .closestscroll { overflow: auto !important; }
}

/* phone: the numbers board is readable, not a strip of dots */
@media (max-width: 820px) {
  .board { padding: 10px 8px; gap: 4px; }
  .board .brow { grid-template-columns: 13px repeat(15, minmax(0, 1fr)); gap: 3px; }
  .board .cell { aspect-ratio: 1.05; font-size: 10.5px; border-radius: 4px; }
  .board .bl { font-size: 10px; }
}

/* =============================================================================
   The draw fills its space: the ball is the biggest thing on the screen.
   ============================================================================= */
@media (min-width: 821px) {
  .drawbox { align-content: center; padding: 12px 18px !important; }
  .drawbox .ball { width: clamp(130px, 19vh, 210px) !important; height: clamp(130px, 19vh, 210px) !important; }
  .drawbox .ball .face .n { font-size: clamp(46px, 7vh, 76px) !important; }
  .drawbox .ball .face .l { font-size: clamp(12px, 1.8vh, 18px) !important; }
  .drawbox .machine, .drawbox .globe { width: clamp(104px, 15vh, 168px) !important; }
  .drawbox .globe { height: clamp(104px, 15vh, 168px) !important; }
  .counter .big { font-size: clamp(30px, 4.6vh, 46px) !important; }
  .trail .mini { width: clamp(40px, 5.4vh, 54px) !important; height: clamp(40px, 5.4vh, 54px) !important; }
  .trail .mini span { font-size: clamp(13px, 1.9vh, 17px); }
  .drawside { gap: 12px; }
}
/* card size, chosen by the player with S, M and L */
.cardview button { min-width: 30px; }
body[data-cardsize="s"] .card .num { font-size: clamp(10px, .78vw, 13px); }
body[data-cardsize="l"] .card .num { font-size: clamp(15px, 1.25vw, 22px); }
body[data-cardsize="s"] .card { padding: 5px 6px 6px; }
body[data-cardsize="l"] .card { padding: 9px 10px 10px; }

/* =============================================================================
   Dialogs: one rhythm for every window, so nothing looks off-centre.
   ============================================================================= */
.dialog { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding: 26px 24px 24px; text-align: center; }
.dialog > * { width: 100%; }
.dialog h3 { margin: 0; }
.dialog .sub, .dialog .lead, .dialog .kicker, .dialog .winfoot { margin: 0; }
.dialog .amount { margin: 4px 0 2px; }
.dialog .card, .dialog .bigcard { align-self: center; }
.dialog .actions { margin-top: 14px; }
.summary .winline { width: 100%; }
.summary .totals { width: 100%; }
.win-dialog .kicker { order: -1; }

/* the first row hugs its content: prizes and buying are compact, so the draw has no dead space */
@media (min-width: 821px) {
  .prizes { padding-top: 10px !important; gap: 5px !important; }
  .prize { padding: 6px 10px !important; }
  .prize .p-amt { font-size: 15.5px !important; line-height: 1.2 !important; }
  .prize .p-meta { font-size: 9px !important; }
  .buystrip { padding: 8px 10px !important; gap: 6px !important; }
  .buysets button { padding: 5px 3px !important; font-size: 12px !important; }
  .buysets button small { font-size: 8px !important; }
  .btn.buy { padding: 9px !important; font-size: 12.5px !important; }
  .pkgbtn { padding: 7px !important; font-size: 11px !important; }
  .closestpanel { padding: 9px 11px 0 !important; }
  .closest td { padding: 5px 6px !important; }
  .drawbox { min-height: 0 !important; }
}

/* the round summary reads as a list, so its lines are left aligned under a centred title */
.summary .winline { text-align: left; justify-content: flex-start; }
.summary .winline .val { text-align: right; }
.summary .totals { text-align: center; }
.summary .actions { justify-content: center; }

/* the summary rows: prize on the left, amount on the right */
.summary .srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; padding: 9px 2px; border-bottom: 1px solid var(--line); text-align: left; }
.summary .srow:last-of-type { border-bottom: 0; }
.summary .srow .who { display: block; font-size: 12px; color: var(--text-3); }
.summary .srow .val { grid-column: 2; font-family: var(--display); font-weight: 800; font-size: 17px; text-align: right; white-space: nowrap; }
.summary .lead { color: var(--text-3); font-size: 12.5px; margin-bottom: 6px; }
.summary .totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; padding: 12px;
  border-radius: 12px; background: rgba(0,0,0,.3); }

/* =============================================================================
   A marked number must still be read. The mark is painted behind the digit,
   never over it, and the digit keeps its contrast on every colour.
   ============================================================================= */
.card .num { position: relative; z-index: 0; }
.card .num::before { z-index: -1; }
.card .num.d { color: #FFFDF7; text-shadow: 0 1px 2px rgba(0,0,0,.45); font-weight: 800; }
.card .num.d[data-c="2"] { color: #22090E; text-shadow: 0 1px 0 rgba(255,255,255,.45); }
.card .num.free { color: transparent; }
.winmoment .num.lit { color: #2E2004; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.winmoment .num.lit::before { z-index: -1; }
.tile .t-grid i { box-shadow: none; }

/* =============================================================================
   TEXT IS ALWAYS READABLE.
   No state may dim a plaque, and no badge may sit on top of words.
   ============================================================================= */
.prize, .prize.won, .prize.closed, .prize.jackpot, .prize.jackpot.closed, .prize.target, .prize.next { opacity: 1 !important; }

/* badges live in their own lane on the right; the text stops before them */
.prize { padding-right: 78px !important; }
.prize.jackpot { padding-right: 78px !important; }
.prize .p-name, .prize .p-amt, .prize .p-meta { max-width: 100%; }
.prize.won::after, .prize.closed::after { top: 8px; right: 10px; }
.prize.next::after, .prize.target::before { top: 6px; right: 10px; left: auto; transform: none; }
.prize .star { right: auto; left: 10px; top: 50%; transform: translateY(-50%) scale(.72); }
.prize.jackpot { padding-left: 46px !important; }

/* every state gets its own explicit colours, never a faded copy */
.prize .p-name { color: var(--text-2); }
.prize .p-amt { color: var(--text); }
.prize .p-meta { color: var(--text-3); }
.prize.active .p-name { color: rgba(46,32,4,.78) !important; }
.prize.active .p-amt { color: var(--ink) !important; }
.prize.active .p-meta { color: rgba(46,32,4,.8) !important; }
.prize.won .p-name { color: var(--text-2) !important; }
.prize.won .p-amt { color: var(--gold-2) !important; }
.prize.won .p-meta { color: var(--text-2) !important; }
.prize.closed .p-name, .prize.closed .p-meta { color: var(--text-2) !important; }
.prize.closed .p-amt { color: var(--text) !important; }
.prize.target .p-name, .prize.next .p-name { color: var(--gold-2) !important; }
.prize.target .p-amt, .prize.next .p-amt { color: var(--text) !important; }
.prize.target .p-meta, .prize.next .p-meta { color: var(--gold-2) !important; }
.prize.active.next .p-name, .prize.active.target .p-name { color: rgba(46,32,4,.8) !important; }
.prize.active.next .p-amt, .prize.active.target .p-amt { color: var(--ink) !important; }

/* the sweep that runs across the next prize must never wash out the words */
.prize.next::before { opacity: .5; }
.prize.shine::after { opacity: .5; }

/* nothing else on the screen may fade text below reading level */
.mut, .muted, .sub, .hint, .cards-empty, .feed-i { color: var(--text-2) !important; }
.feed-i:nth-child(2) { opacity: .8 !important; } .feed-i:nth-child(3) { opacity: .65 !important; }
.closest .cid { color: var(--text-2) !important; }
.info span, .buyline, .closest th { color: var(--text-2) !important; }
.card .id { color: rgba(34,9,14,.72) !important; }
.card .togo { color: rgba(34,9,14,.8) !important; }
.tile .t-top b { color: rgba(34,9,14,.75) !important; }
.tile .t-top em { color: rgba(34,9,14,.8) !important; }
.verMark { opacity: .8 !important; color: var(--text-3) !important; }

/* the mark is the cell's own background, so the digit always sits on it, never beside it */
.card .num.d::before { display: none; }
.card .num.d {
  background-image: radial-gradient(circle at 50% 50%, var(--dc, #C9BFA6) 0 45%, rgba(0,0,0,.18) 46%, transparent 47%);
  background-repeat: no-repeat; background-position: center;
}
.card .num.d[data-c="0"] { --dc: #C2362F; } .card .num.d[data-c="1"] { --dc: #D98A24; }
.card .num.d[data-c="2"] { --dc: #C9BFA6; } .card .num.d[data-c="3"] { --dc: #1F7A5A; } .card .num.d[data-c="4"] { --dc: #2C5AA8; }
.card .num.free.d { background-image: radial-gradient(circle at 50% 50%, #C8A44A 0 42%, transparent 43%); }
.card .letters span { color: rgba(34,9,14,.68) !important; }
.winmoment .num.lit { background-image: radial-gradient(circle at 50% 50%, #E8CC7A 0 46%, transparent 47%) !important; }

/* the blue column: white on that blue is too close, so the blue goes darker wherever a digit sits on it */
:root { --o: #2A50A8; }
.card .num.d[data-c="4"] { --dc: #24499C; }
.cell.on { color: #FFFDF7 !important; text-shadow: 0 1px 2px rgba(0,0,0,.45); font-weight: 800; }
.brow:nth-child(5) .cell.on, .cell.on[data-col="4"] { background: #24499C !important; }
.bl { color: color-mix(in srgb, var(--c) 60%, #FFF6E8) !important; }
.proto .sep { color: var(--text-2) !important; }

/* the last three: the orange column, the current ball on the board, and the ivory column */
.card .num.d[data-c="1"] { --dc: #B06E12; }
.cell.on { background-color: currentColor; }
.cell.on { color: #FFFDF7 !important; }
.brow .cell.on { background: var(--c) !important; }
.brow:nth-child(2) .cell.on { background: #B06E12 !important; }
.cell.n-letter.on, .brow:nth-child(3) .cell.on { background: #C9BFA6 !important; color: #22090E !important; text-shadow: none !important; }
.cell.now { background: var(--brass) !important; color: #2E2004 !important; text-shadow: none !important; font-weight: 800 !important; }
.proto .sep { color: var(--text) !important; }

/* the ring around a mark is what the audit sees; keep the disc solid to its edge */
.card .num.d {
  background-image: radial-gradient(circle at 50% 50%, var(--dc, #C9BFA6) 0 46%, transparent 47%) !important;
}
.card .num.d, .cell.on { text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.card .num.d[data-c="2"], .cell.n-letter.on { text-shadow: 0 1px 0 rgba(255,255,255,.5); }

/* the letter on the called ball: dark enough to read on the ivory window, whatever the column */
.ball .face .l { color: color-mix(in srgb, var(--c) 72%, #22090E) !important; font-weight: 800; }
.mini span, .ms-ball b { color: #22090E; }

/* the plaque never truncates: the name on one line, the amount on its own, the badge in its own lane */
@media (min-width: 821px) {
  .prize { display: block !important; padding: 7px 64px 7px 11px !important; }
  .prize.jackpot { padding-left: 44px !important; }
  .prize .p-name { grid-column: auto !important; grid-row: auto !important; display: flex; align-items: center; gap: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px !important; }
  .prize .p-amt { grid-column: auto !important; grid-row: auto !important; text-align: left !important;
    font-size: 16px !important; line-height: 1.25 !important; white-space: nowrap; }
  .prize .p-meta { grid-column: auto !important; grid-row: auto !important; display: block !important; font-size: 9px !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* the Accumulated plaque has a star and a badge, so its name line gets the room it needs */
@media (min-width: 821px) {
  .prize.jackpot .p-name i { display: none; }        /* the pattern name repeats the line below */
  .prize.jackpot .p-name { font-size: 8.5px !important; letter-spacing: .1em; }
  .prize.jackpot { padding-right: 58px !important; }
}

/* phone: the Accumulated amount is long, so its plaque is wider and the star smaller */
@media (max-width: 820px) {
  .prize { flex: 0 0 52% !important; padding: 6px 9px 6px 34px !important; }
  .prize:not(.jackpot) { padding-left: 9px !important; }
  .prize.jackpot { flex: 0 0 62% !important; }
  .prize .star { left: 7px; transform: translateY(-50%) scale(.6); }
  .prize .p-amt { font-size: 15px !important; white-space: nowrap; }
  .prize .p-name { font-size: 8px !important; }
}

@media (max-width: 820px) {
  .prize { padding-right: 46px !important; }
  .prize.jackpot { padding-right: 46px !important; padding-left: 40px !important; }
  .prize.next::after, .prize.target::before { font-size: 7.5px !important; padding: 3px 6px !important; top: 4px !important; right: 6px !important; }
  .prize.won::after, .prize.closed::after { font-size: 7.5px !important; padding: 3px 5px !important; top: 4px; right: 6px; }
}

/* the confirmation before buying into a round that has already started */
.confirmbox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin: 14px 0 4px;
  padding: 12px; border-radius: 12px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px var(--line); }
.confirmbox small { display: block; font: 700 9.5px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin-bottom: 4px; }
.confirmbox b { font-family: var(--display); font-weight: 800; font-size: 19px; }

/* the close X sits clear of the kicker line */
.dialog .close-x { top: 10px; right: 10px; z-index: 4; }
.dialog .kicker { padding-right: 44px; }

/* =============================================================================
   The header carries the player, the game and the controls.
   ============================================================================= */
.hdr-sep { width: 1px; height: 22px; background: var(--line-2); }
.hdr-game { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hdr-game b { font-family: var(--display); font-weight: 800; font-size: 15px; white-space: nowrap; }
.hdr-game span { font: 700 9.5px/1 var(--ui); letter-spacing: .14em; color: var(--text-2); }
.hdr-tools { margin: 0 !important; display: flex; gap: 6px; }
.hdr-tools .icon-btn { width: 34px; height: 34px; }
.infocol .tools { display: none; }
.verMark { margin-top: 8px; }
@media (max-width: 820px), (max-height: 560px) {
  .hdr-sep { display: none; }
  .hdr-game { display: none; }                 /* the room plate right below already names the game */
  .hdr-tools .icon-btn { width: 30px; height: 30px; }
  .hdr-tools { gap: 4px; }
  .top .who b { max-width: 24vw; }
  .infocol { grid-template-columns: auto repeat(2, minmax(0, 1fr)) !important; }
}

/* phone header: name, controls and balance all fit on one line */
@media (max-width: 820px) {
  .top { gap: 8px; padding: 0 8px; }
  .top .who { gap: 7px; }
  .top .av { width: 26px; height: 26px; font-size: 10px; }
  .top .who b { font-size: 12px; max-width: 26vw; }
  .hdr-tools .icon-btn { width: 28px; height: 28px; }
  .hdr-tools .icon-btn svg { width: 15px; height: 15px; }
  .top .bal { padding: 3px 4px 3px 8px; gap: 6px; }
  .top .bal .lbl { display: none; }
  .top .bal .amt { font-size: 14px; }
  .top .bal button { padding: 6px 9px; font-size: 10.5px; }
}

/* very narrow phones: the rules control moves into the room line, the header stays on one row */
@media (max-width: 380px) {
  .top .who b { max-width: 18vw; }
  .hdr-tools .icon-btn { width: 26px; height: 26px; }
  .hdr-tools { gap: 3px; }
  .top .bal button { padding: 6px 8px; font-size: 10px; }
  .top .bal .amt { font-size: 13px; }
}

/* =============================================================================
   LAYOUT v7 — no dead space. The side column spans both rows, so the draw band
   is only as tall as it needs to be and the cards start higher up.
   ============================================================================= */
@media (min-width: 821px) {
  .room-grid {
    grid-template-columns: 154px minmax(300px, 1fr) minmax(240px, 288px) 268px !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas:
      "info draw closest side"
      "cards cards cards side"
      "board board board board" !important;
    gap: 8px !important; padding: 8px 10px 12px !important;
  }
  .rightcol { grid-area: side !important; align-self: stretch; }
  .drawbox { min-height: 0 !important; padding: 10px 14px !important; }
  .drawside { gap: 8px !important; }
  .drawbox .ball { width: clamp(120px, 17vh, 168px) !important; height: clamp(120px, 17vh, 168px) !important; }
  .drawbox .ball .face .n { font-size: clamp(40px, 6vh, 60px) !important; }
  .drawbox .machine, .drawbox .globe { width: clamp(92px, 13vh, 132px) !important; }
  .drawbox .globe { height: clamp(92px, 13vh, 132px) !important; }
  .counter .big { font-size: clamp(26px, 4vh, 38px) !important; }
  .sound-cta { position: absolute; right: 12px; bottom: 10px; }
  .closestpanel { min-height: 0 !important; align-self: stretch; }
  .infocol { gap: 4px !important; }
  .info { padding: 5px 9px !important; } .info b { font-size: 14px !important; }
  .roomplate { padding: 7px 10px !important; } .roomplate b { font-size: 19px !important; }
  .tools { margin-top: 6px !important; }
  .mycards { padding: 8px 12px 10px !important; }
  .board { padding: 8px 10px !important; }
  .board .cell { aspect-ratio: 2.9 !important; }
}

/* =============================================================================
   DIALOGS — a proper document: centred head, left-aligned body, real lists.
   ============================================================================= */
.dialog { padding: 22px 22px 20px !important; gap: 4px !important; }
.dialog h3 { font-size: 21px; line-height: 1.25; }
.dialog .close-x { position: absolute; top: 10px; right: 10px; }
.dialog h3 + .sub, .dialog .sub { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.dialog ol, .dialog ul { width: 100%; margin: 12px 0 0; padding: 0 0 0 20px; text-align: left; }
.dialog ol li, .dialog ul li { margin: 0 0 9px; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.dialog ol li b, .dialog ul li b { color: var(--text); }
.dialog .rules-list { list-style: decimal; }
.dialog p { text-align: left; }
.dialog h3, .dialog .kicker, .dialog .amount, .dialog .lead, .dialog .actions, .dialog .totals { text-align: center; }
.dialog .winline, .dialog .srow { text-align: left; }
.dialog .card.big { margin: 14px auto 6px; }

/* =============================================================================
   THE WIN MOMENT — confetti across the whole screen, a flash, then the card.
   ============================================================================= */
.winmoment .confetti { position: fixed; top: -8vh; z-index: 3; pointer-events: none; background: var(--col);
  animation-name: confettiFall; animation-timing-function: cubic-bezier(.25,.6,.35,1); animation-fill-mode: forwards; }
.winmoment .confetti.circle { border-radius: 50%; }
.winmoment .confetti.ribbon { border-radius: 2px; }
.winmoment .confetti.rect { border-radius: 1px; }
@keyframes confettiFall {
  0%   { transform: translate3d(0, 0, 0) rotate(0) skewX(0); opacity: 0; }
  8%   { opacity: 1; }
  100% { transform: translate3d(var(--x), 112vh, 0) rotate(var(--rot)) skewX(var(--tilt)); opacity: .9; }
}
.winmoment .winflash { position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(255,245,210,.55), rgba(255,245,210,0) 58%);
  animation: winFlash 820ms ease-out forwards; }
@keyframes winFlash { 0% { opacity: 0 } 12% { opacity: 1 } 100% { opacity: 0 } }
.winmoment .dialog { animation: winPop 620ms cubic-bezier(.2,.9,.25,1.2) both; }
@keyframes winPop { 0% { transform: scale(.82) translateY(14px); opacity: 0 } 60% { transform: scale(1.03) } 100% { transform: none; opacity: 1 } }
.winmoment.big .amount, .winmoment.acc .amount { animation: amtPulse 1.6s ease-in-out infinite; }
@keyframes amtPulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.045) } }
@media (prefers-reduced-motion: reduce) {
  .winmoment .confetti, .winmoment .winflash { display: none !important; }
  .winmoment .dialog, .winmoment .amount { animation: none !important; }
}

/* the dialog head: title clear of the close button, subtitle centred under it */
.dialog h3 { padding: 0 44px; }
.dialog .close-x { background: rgba(0,0,0,.35); }
.dialog > .sub:first-of-type { text-align: center; color: var(--text-3); margin-bottom: 4px; }
.dialog ol { margin-top: 14px; }
.dialog ol li::marker { color: var(--gold-2); font-weight: 800; }
/* the minimum-players line is no longer part of the rules */

/* a phone on its side keeps the single-column order and its own plaque sizes */
@media (max-height: 560px) and (max-width: 1100px) {
  .room-grid { grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: none !important;
    grid-template-rows: none !important; }
  .infocol { order: 1 } .centercol { order: 2 } .prizes { order: 3 } .closestpanel { order: 4 }
  .buystrip { order: 5 } .mycards { order: 6 } .board { order: 7 }
  .infocol, .centercol, .prizes, .closestpanel, .buystrip, .mycards, .board { grid-area: auto !important; }
  .rightcol { display: contents !important; }
  .prize { flex: 0 0 34% !important; padding: 6px 40px 6px 9px !important; }
  .prize.jackpot { flex: 0 0 44% !important; padding-left: 34px !important; }
  .prize .p-amt { font-size: 14px !important; }
}

/* =============================================================================
   PHONE v2 — tight bands, less scrolling, everything still readable.
   ============================================================================= */
@media (max-width: 820px) {
  .room-grid { gap: 7px !important; padding: 7px !important; }

  /* the room line: code on the left, four facts in a row */
  .infocol { display: grid !important; grid-template-columns: auto repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important; align-items: stretch !important; }
  .roomplate { padding: 5px 8px !important; display: flex; flex-direction: column; justify-content: center; }
  .roomplate b { font-size: 14px !important; } .roomplate .rname { font-size: 8.5px !important; }
  .infocol .info { display: flex !important; padding: 4px 5px !important; }
  .infocol .info:nth-of-type(3), .infocol .info:nth-of-type(4) { display: flex !important; }
  .infocol .info span { font-size: 6.5px !important; letter-spacing: .08em; }
  .infocol .info b { font-size: 11.5px !important; }
  .infocol .info:nth-of-type(2) { display: none !important; }   /* the card price lives in the buy panel */
  .tools { display: none !important; }                          /* sound, wins and rules sit in the header */

  /* the draw band */
  .drawbox { padding: 8px 10px !important; gap: 10px !important; }
  .drawbox .ball { width: 96px !important; height: 96px !important; }
  .drawbox .ball .face .n { font-size: 34px !important; }
  .counter .big { font-size: 22px !important; } .counter .of { font-size: 9.5px !important; }
  .trail { padding: 5px 8px !important; gap: 6px !important; }
  .trail .mini { width: 34px !important; height: 34px !important; }
  .trail .mini span { font-size: 12px !important; } .trail .mini em { display: none; }
  .feed { min-height: 0 !important; } .feed-i { font-size: 11.5px !important; }
  .sound-cta { padding: 6px 10px !important; font-size: 11px !important; }

  /* prizes, closest and buying: compact */
  .prizes { padding: 11px 2px 2px !important; }
  .prize { flex: 0 0 46% !important; min-height: 54px !important; }
  .closestpanel { max-height: 190px !important; padding: 8px 10px 0 !important; }
  .closest td { padding: 5px 5px !important; font-size: 11.5px !important; }
  .closest th { font-size: 8.5px !important; }
  .buystrip { padding: 8px 10px !important; gap: 6px !important; }
  .buysets { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 4px !important; }
  .buysets button { padding: 5px 2px !important; font-size: 11.5px !important; }
  .buysets button small { font-size: 7.5px !important; }
  .btn.buy { padding: 11px !important; font-size: 13px !important; }
  .pkgbtn { padding: 8px !important; font-size: 11px !important; }

  /* my cards: three across, still readable */
  .cards { gap: 5px !important; }
  .card { padding: 4px 5px 5px !important; }
  .card .num { font-size: clamp(11px, 3.1vw, 15px) !important; }
  .card .id { font-size: 8.5px !important; } .card .togo { font-size: 8px !important; padding: 2px 4px !important; }
  .card .letters span { font-size: 7.5px !important; }
  .cards-head { margin-bottom: 5px !important; } .cards-head h2 { font-size: 12px !important; }
  .cards-count { font-size: 10px !important; }

  .board { padding: 8px 7px !important; }
  .board .cell { aspect-ratio: 1.25 !important; font-size: 10px !important; }
}

/* phone: the card grid must never be wider than the panel */
@media (max-width: 820px) {
  .cards { grid-template-columns: repeat(var(--mcols, 3), minmax(0, 1fr)) !important; width: 100% !important; }
  .mycards { overflow: hidden !important; }
  .infocol { grid-template-columns: auto repeat(4, minmax(0, 1fr)) !important; }
  .infocol .info { min-width: 0 !important; }
  .infocol .info b, .infocol .info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* =============================================================================
   PHONE v3 — nothing wraps, nothing is cut in half.
   ============================================================================= */
@media (max-width: 820px) {
  /* one room line: the code, the card price, the players, the cards */
  .infocol { grid-template-columns: auto repeat(3, minmax(0, 1fr)) !important; }
  .infocol .info:nth-of-type(1) { display: none !important; }   /* round number lives in the plate */
  .infocol .info:nth-of-type(3) { display: none !important; }   /* date */
  .infocol .info:nth-of-type(4) { display: none !important; }   /* time */
  .infocol .info:nth-of-type(2), .infocol .info:nth-of-type(5), .infocol .info:nth-of-type(6) { display: flex !important; }

  /* all four prizes visible at once, two across, nothing cut off the edge */
  .prizes { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 6px !important;
    overflow: visible !important; padding: 11px 0 0 !important; }
  .prize { flex: none !important; width: auto !important; min-height: 52px !important;
    padding: 6px 34px 6px 9px !important; }
  .prize.jackpot { padding-left: 32px !important; }
  .prize .p-amt { font-size: 14.5px !important; }
  .prize .p-name { font-size: 7.5px !important; }
  .prize.next::after, .prize.target::before { font-size: 7px !important; padding: 2px 5px !important; }

  /* the closest list shows whole rows only */
  .closestpanel { max-height: none !important; }
  .closestscroll { max-height: 132px !important; overflow: auto !important; }
  .closest td { padding: 6px 5px !important; }

  /* the buy panel and the cards keep their rhythm */
  .buystrip { padding: 9px 10px !important; }
  .mycards { padding: 8px 10px 12px !important; }
}

/* =============================================================================
   PHONE — the prizes are a grid, not a strip that runs off the edge.
   Every prize is on screen, two to a row, in playing order.
   ============================================================================= */
@media (max-width: 820px) {
  .prizes {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important; overflow: visible !important; height: auto !important;
    padding: 11px 0 0 !important; scroll-snap-type: none !important;
  }
  .prize {
    flex: none !important; width: auto !important; height: auto !important; min-height: 56px !important;
    display: flex !important; flex-direction: column; justify-content: center;
    padding: 7px 34px 7px 10px !important; scroll-snap-align: none !important;
  }
  .prize.jackpot { grid-column: 1 / -1; flex-direction: row !important; align-items: center; gap: 10px;
    padding-left: 44px !important; }
  .prize .p-name { font-size: 8.5px !important; white-space: normal; line-height: 1.25; }
  .prize .p-amt { font-size: 16px !important; }
  .prize .p-meta { display: block !important; font-size: 8.5px !important; color: var(--text-2) !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prize .star { left: 10px; transform: translateY(-50%) scale(.62); }
  .prize.next::after, .prize.target::before { top: -9px !important; right: 8px !important; }
  .prize.won::after, .prize.closed::after { top: 6px !important; right: 6px !important; }
}

/* phone: the prize name stays on one line, the NEXT badge sits above the plaque */
@media (max-width: 820px) {
  .prize .p-name { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; font-size: 8px !important; }
  .prize .p-name i { font-size: 7.5px !important; }
  .prize { padding: 8px 30px 7px 10px !important; }
  .prize.next { margin-top: 4px; }
  .prize.next::after { top: -8px !important; right: 8px !important; font-size: 7px !important; padding: 3px 6px !important; }
  .prize.target::before { top: -8px !important; right: 8px !important; font-size: 7px !important; padding: 3px 6px !important; }
  .prizes { padding-top: 13px !important; }
}

/* =============================================================================
   The Accumulated plaque while it is the one being played.
   It keeps the dark treasure look, so its text must stay light, never ink.
   ============================================================================= */
.prize.jackpot.active, .prize.jackpot.target, .prize.jackpot.next {
  background: linear-gradient(180deg, #3E1019, #2A0A12) !important;
  box-shadow: inset 0 0 0 2px var(--gold), 0 8px 18px rgba(0,0,0,.45) !important;
}
.prize.jackpot.active .p-name, .prize.jackpot.target .p-name, .prize.jackpot.next .p-name { color: var(--gold-2) !important; }
.prize.jackpot.active .p-amt,  .prize.jackpot.target .p-amt,  .prize.jackpot.next .p-amt  { color: #F7F1E3 !important; }
.prize.jackpot.active .p-meta, .prize.jackpot.target .p-meta, .prize.jackpot.next .p-meta { color: var(--gold-2) !important; }
.prize.jackpot.active .pt i, .prize.jackpot.target .pt i { background: rgba(247,241,227,.18) !important; }
.prize.jackpot.active .pt i.on, .prize.jackpot.target .pt i.on { background: var(--gold) !important; }
.prize.jackpot.active .star svg, .prize.jackpot.target .star svg { fill: var(--gold) !important; }
.prize.jackpot.active .star span, .prize.jackpot.target .star span { color: var(--ink) !important; }

/* the rule behind all of this: ink text only ever sits on a brass plaque */
.prize.active:not(.jackpot) { background: var(--brass) !important; }
.prize.active:not(.jackpot) .p-amt { color: var(--ink) !important; }
.prize.active:not(.jackpot) .p-name { color: rgba(46,32,4,.8) !important; }
.prize.active:not(.jackpot) .p-meta { color: rgba(46,32,4,.82) !important; }

/* =============================================================================
   PHONE — the player's cards belong on the first screen.
   Order: room line · the draw · a one-line prize bar · MY CARDS · closest ·
   buying · the board. The full prize detail sits under the cards.
   ============================================================================= */
@media (max-width: 820px) {
  .infocol { order: 1; } .centercol { order: 2; } .prizes { order: 3; }
  .mycards { order: 4; } .closestpanel { order: 5; } .buystrip { order: 6; } .board { order: 7; }

  /* the prize bar: one line, swipeable, every prize as a pill */
  .prizes { display: flex !important; grid-template-columns: none !important; flex-direction: row !important;
    gap: 6px !important; overflow-x: auto !important; padding: 10px 2px 2px !important;
    scroll-snap-type: x proximity !important; }
  .prizes::-webkit-scrollbar { display: none; }
  .prize { flex: 0 0 auto !important; width: auto !important; min-height: 0 !important;
    display: grid !important; grid-template-columns: auto auto; align-items: center; gap: 8px;
    padding: 7px 10px !important; scroll-snap-align: start; }
  .prize.jackpot { grid-column: auto !important; flex-direction: row !important; padding-left: 34px !important; }
  .prize .p-name { grid-row: 1; font-size: 8px !important; white-space: nowrap; }
  .prize .p-amt { grid-row: 1; grid-column: 2; font-size: 15px !important; white-space: nowrap; }
  .prize .p-meta { grid-row: 2; grid-column: 1 / -1; font-size: 8px !important; white-space: nowrap; }
  .prize .star { left: 8px; transform: translateY(-50%) scale(.55); }
  .prize.next::after, .prize.target::before { top: -8px !important; right: 6px !important; }

  /* the cards get the rest of the first screen */
  .mycards { padding-top: 8px !important; }
  .cards-head { margin-bottom: 6px !important; }
}

/* phone: trim the bands above the cards so more of the set is on the first screen */
@media (max-width: 820px) {
  .room-grid { gap: 6px !important; padding: 6px !important; }
  .infocol { grid-template-columns: auto repeat(3, minmax(0, 1fr)) !important; }
  .infocol .info:nth-of-type(5) { display: none !important; }   /* cards in round: shown in the buy panel */
  .roomplate b { font-size: 13px !important; } .roomplate .rname { font-size: 8px !important; }
  .infocol .info b { font-size: 11px !important; }
  .drawbox { padding: 7px 9px !important; gap: 8px !important; }
  .drawbox .ball { width: 84px !important; height: 84px !important; }
  .drawbox .ball .face .n { font-size: 30px !important; }
  .counter .big { font-size: 20px !important; }
  .trail .mini { width: 30px !important; height: 30px !important; }
  .trail .mini span { font-size: 11px !important; }
  .sound-cta { padding: 5px 9px !important; font-size: 10.5px !important; }
  .feed { display: none !important; }              /* the winner line also appears in the round summary */
  .prizes { padding: 9px 2px 0 !important; }
  .prize { padding: 6px 9px !important; }
  .prize .p-amt { font-size: 14px !important; }
  .mycards { padding: 7px 10px 10px !important; }
  .cards-head h2 { font-size: 11.5px !important; }
  .card { padding: 4px 4px 5px !important; }
  .card .num { font-size: clamp(10.5px, 2.9vw, 14px) !important; }
}

/* =============================================================================
   PHONE — nothing scrolls sideways. The prizes are a two-column grid of
   one-line pills, so every prize is fully on screen.
   ============================================================================= */
@media (max-width: 820px) {
  .prizes {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important; overflow: visible !important; padding: 9px 0 0 !important;
  }
  .prize {
    flex: none !important; width: auto !important; min-width: 0 !important;
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center; gap: 6px; padding: 6px 8px !important; min-height: 0 !important;
  }
  .prize .p-name { grid-column: 1; grid-row: 1; font-size: 7.5px !important; letter-spacing: .08em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prize .p-amt { grid-column: 2; grid-row: 1; font-size: 14px !important; white-space: nowrap; }
  .prize .p-meta { grid-column: 1 / -1; grid-row: 2; font-size: 7.5px !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prize:not(.active):not(.next):not(.target):not(.won) .p-meta { display: none !important; }
  .prize .pt { display: none !important; }
  .prize.jackpot { grid-template-columns: auto minmax(0, 1fr) auto !important; padding-left: 6px !important; }
  .prize.jackpot .star { position: static !important; transform: scale(.55) !important; grid-row: 1 / span 2; width: 22px; }
  .prize.jackpot .p-name { grid-column: 2; } .prize.jackpot .p-amt { grid-column: 3; }
  .prize.jackpot .p-meta { grid-column: 1 / -1; }
  .prize.next::after, .prize.target::before { top: -7px !important; right: 5px !important;
    font-size: 6.5px !important; padding: 2px 5px !important; }
  .prize.won::after, .prize.closed::after { top: 4px !important; right: 4px !important; font-size: 6.5px !important; padding: 2px 4px !important; }
  .prize.won, .prize.closed { padding-right: 40px !important; }
}

/* phone: the room line is a real grid, and the version mark never joins it */
@media (max-width: 820px), (max-height: 560px) {
  .infocol { display: grid !important; grid-auto-flow: column !important;
    grid-template-columns: auto repeat(3, minmax(0, 1fr)) !important; gap: 5px !important;
    align-items: stretch !important; overflow: hidden !important; }
  .infocol .info:nth-of-type(n+4) { display: none !important; }
  .verMark { display: none !important; }
  .infocol > * { min-width: 0 !important; }
}
/* a phone on its side: the prizes are a grid too, four across */
@media (max-height: 560px) and (max-width: 1100px) {
  .prizes { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important; overflow: visible !important; }
  .prize { flex: none !important; width: auto !important; }
  .prize.jackpot { grid-column: auto !important; }
}

/* phone: the Accumulated amount is the longest number on the screen, so its pill
   takes the full row and the amount is never squeezed */
@media (max-width: 820px) {
  .prize.jackpot { grid-column: 1 / -1 !important; }
  .prize .p-amt { font-size: 13.5px !important; letter-spacing: -.01em; }
  .prize.jackpot .p-amt { font-size: 15px !important; }
}

/* phone: the room line keeps four facts, the prize grid stays tight */
@media (max-width: 820px) {
  .infocol { grid-template-columns: auto repeat(3, minmax(0, 1fr)) !important; }
  .infocol .info:nth-of-type(1), .infocol .info:nth-of-type(3), .infocol .info:nth-of-type(4) { display: flex !important; }
  .infocol .info:nth-of-type(2), .infocol .info:nth-of-type(5) { display: none !important; }
  .prizes { gap: 4px !important; padding-top: 8px !important; }
  .prize { padding: 5px 8px !important; }
  .prize .p-meta { font-size: 7px !important; }
  .prize.jackpot { padding: 5px 8px 5px 4px !important; }
}
