/* Flurry · mini-games and the interactive roll-off, in all three looks.
   Rivalry Showdown (Party, one device), the gamble (Gentleman's Wager / Options Trade / Double or Nothing),
   Sealed Bid, Market Call, the pass-the-device curtain, their results, the live chip in the turn card,
   the setup toggles, Party sip bets and the roll for first turn.
   Built on the shared tokens every look re-points (--fg, --muted, --line, --surface, --gold, --f-display...),
   then dressed per look below. Phone first (390), 44px targets, reduced motion respected. */

/* ================= shared ================= */
.mini-ov { z-index: 64; }
.mini-sheet { width: min(560px, 100%); gap: 14px; }
.mini-sheet h2 { font-size: clamp(24px, 6vw, 32px); }
.mini-sheet .label { margin: 0; }
.mini-sheet .mg-foot { justify-content: center; }
.mg-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.mg-acts .btn { min-height: 52px; font-size: 17px; }
.mg-acts .btn.big { padding-left: 10px; padding-right: 10px; }
.mg-warn { margin: 0; color: var(--down); font-weight: 700; }
.mg-result { margin: 0; font: var(--w-display) 24px/1.15 var(--f-display); text-align: center; }
.mg-result.win { color: var(--up); }
.mg-result.lose { color: var(--down); }

/* chips: stakes, quick bids */
.mg-stake { display: grid; gap: 6px; }
.mg-l { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mg-chip { min-height: 44px; min-width: 56px; padding: 6px 14px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--fg); font: 700 16px/1 var(--f-body); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.mg-chip small { font-weight: 500; font-size: 12px; color: var(--muted); }
.mg-chip svg { width: 16px; height: 16px; }
.mg-chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.mg-chip[aria-pressed="true"] small { color: inherit; }
.mg-chip:focus-visible, .mg-pm:focus-visible, .mg-co:focus-visible, .mini-tog:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }

/* the dice: the one showing, and the one turned over */
.mg-dice { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 6px 0; }
.mg-die { width: 96px; height: 96px; position: relative; }
.mg-die .die { width: 96px; height: 96px; animation: none; }
.mg-q { font: var(--w-num) 34px/1 var(--f-num); color: var(--muted); min-width: 28px; text-align: center; }
.mg-odds { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.mg-flip { perspective: 600px; }
.mg-face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.mg-face.back { border: 3px dashed var(--line-2); border-radius: 18px; font: var(--w-num) 44px/1 var(--f-num); color: var(--muted); background: var(--surface-2); }
.mg-face.front { transform: rotateY(180deg); }
.mg-flip.flipped .mg-face.back { transform: rotateY(-180deg); }
.mg-flip.flipped .mg-face.front { transform: rotateY(0); }

/* the lot on offer */
.mg-lot { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line-2); border-left: 8px solid var(--pc); background: var(--surface-2); }
.mg-lot b { display: block; font: var(--w-display) 20px/1.15 var(--f-display); }
.mg-lot small { color: var(--muted); font-size: 14px; }
.mg-emb { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; color: var(--pc); }
.mg-emb svg { width: 44px; height: 44px; }

/* the bid stepper (also the sip stepper on side bets) */
.mg-step { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 8px; align-items: stretch; }
.mg-pm { min-width: 44px; min-height: 44px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--fg); font: 700 24px/1 var(--f-body); cursor: pointer; border-radius: var(--r-sm); }
.mg-pm:disabled { opacity: .4; cursor: not-allowed; }
.mg-amt { display: flex; align-items: center; justify-content: center; gap: 4px; border: 2px solid var(--fg); background: var(--surface); padding: 0 12px; min-height: 60px; }
.mg-amt span { font: var(--w-num) 28px/1 var(--f-num); color: var(--muted); }
.mg-amt input { width: 100%; min-width: 0; max-width: 7ch; border: 0; background: transparent; color: var(--fg); font: var(--w-num) 34px/1 var(--f-num); text-align: center; padding: 0; min-height: 0; -moz-appearance: textfield; }
.mg-amt input::-webkit-outer-spin-button, .mg-amt input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mg-amt:focus-within { outline: 3px solid var(--fg); outline-offset: 2px; }

/* who has answered (never what) */
.mg-ticks { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px; }
.sheet ul.mg-ticks { display: flex; flex-wrap: wrap; }
.mini-sheet .mg-ticks li { flex: 0 0 auto; width: auto; min-height: 0; margin: 0; }
@media (max-width: 480px) { .mg-co .mlogo { display: none; } .mg-co { grid-template-columns: minmax(0, 1fr); } .mg-co > * { grid-column: 1; } }
.mg-ticks li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.mg-ticks li .ptoken { width: 24px; height: 24px; }
.mg-ticks li .ptoken svg { width: 14px; height: 14px; }
.mg-ticks li i { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; }
.mg-ticks li i svg { width: 16px; height: 16px; }
.mg-ticks li.in { color: var(--fg); border-color: var(--pcol); }
.mg-ticks li.in i { color: var(--fg); }

/* the six companies to call */
.mg-cos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mg-co { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; min-height: 64px; padding: 8px 10px; border: 1.5px solid var(--line-2); border-left: 6px solid var(--pc); background: var(--surface); color: var(--fg); cursor: pointer; }
.mg-co .mlogo { grid-row: span 2; }
.mg-co b { font-size: 15px; line-height: 1.15; }
.mg-co small { font-size: 13px; color: var(--muted); }
.mg-co:hover { background: var(--surface-2); }
@media (min-width: 600px) { .mg-cos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* pass the device */
.mg-curtain { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 12px 0 4px; }
.mg-curtain .ptoken.big { width: 84px; height: 84px; cursor: default; }
.mg-curtain .ptoken.big svg { width: 44px; height: 44px; }
.mg-curtain h2 { font-size: clamp(30px, 8vw, 40px); }
.mg-curtain .mg-acts { width: 100%; }
.mini-sheet.mg-pass { background: var(--surface-2); }

/* the envelopes */
.mg-env { list-style: none; margin: 0; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.env { position: relative; display: grid; justify-items: center; gap: 6px; padding: 10px 8px; border: 1.5px solid var(--line); background: var(--surface-2); text-align: center; }
.env b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.env-card { position: relative; width: 100%; max-width: 120px; height: 52px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.env-flap { position: absolute; inset: 0 0 auto; height: 60%; background: var(--surface-2); border-bottom: 1.5px solid var(--line-2); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.env-amt { font: var(--w-num) 22px/1 var(--f-num); opacity: 0; transform: translateY(8px); transition: opacity .25s .15s, transform .25s .15s; }
.env.open .env-flap { transform: rotateX(180deg) translateY(-2px); opacity: .25; }
.env.open .env-amt { opacity: 1; transform: none; }
.env.win { border-color: var(--fg); box-shadow: inset 0 0 0 2px var(--pcol); }
.env-cert { position: absolute; top: -10px; right: -6px; display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px; background: var(--gold); color: var(--gold-ink); font: 700 13px/1 var(--f-body); opacity: 0; transform: translateY(14px) scale(.6); }
.env.win .env-cert { animation: mgCert .6s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.mg-env.opened .env { animation: mgEnvIn .4s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--k) * 90ms); }
@keyframes mgCert { to { opacity: 1; transform: none; } }
@keyframes mgEnvIn { from { opacity: 0; transform: translateY(8px); } }

/* drinks that came with a result */
.mg-drinks { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 6px; }
.mg-drinks li { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.mg-drinks svg { width: 22px; height: 22px; flex: 0 0 auto; }

/* the showdown poster */
.sd-poster { display: grid; gap: 14px; text-align: center; }
.sd-kick { margin: 0; font: var(--w-display) 15px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; }
.sd-face { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.sd-side { display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 12px 6px; border: 2px solid var(--pcol); background: var(--surface-2); }
.sd-side .ptoken.big { width: 60px; height: 60px; cursor: default; }
.sd-side .ptoken.big svg { width: 32px; height: 32px; }
.sd-side > b { font: var(--w-display) 18px/1.1 var(--f-display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-co { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.sd-co em { font-style: normal; font-weight: 700; color: var(--fg); }
.sd-vs { font: var(--w-num) 28px/1 var(--f-num); }
.sd-chal { display: grid; gap: 6px; padding: 14px; border: 2px solid var(--fg); }
.sd-name { margin: 0; font: var(--w-display) 22px/1.15 var(--f-display); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.sd-drinks { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1.5px solid currentColor; font: 700 12px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; }
.sd-drinks svg { width: 16px; height: 16px; }
.sd-stakes { margin: 0; font-size: 14px; color: var(--muted); }
.sd-acts .btn { white-space: normal; line-height: 1.15; }
.sd-moves { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 8px; }
.sd-moves li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line-2); border-left: 6px solid var(--pc); text-align: left; font-variant-numeric: tabular-nums; }
.sd-moves li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-from { color: var(--muted); text-decoration: line-through; }
.sd-to { font: var(--w-num) 20px/1 var(--f-num); }
.sd-moves em { font-style: normal; font-weight: 700; min-width: 3.5em; text-align: right; }
.sd-moves li.up em { color: var(--up); }
.sd-moves li.down em { color: var(--down); }
.sd-result .sd-moves li { animation: mgEnvIn .45s cubic-bezier(.2, .7, .2, 1) both; }
.sd-result .sd-moves li + li { animation-delay: .25s; }
@media (max-width: 420px) {
  .sd-moves li { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .sd-moves li .sd-from, .sd-moves li > span[aria-hidden] { display: none; }
}

/* round summary blocks */
.mg-sum { display: grid; gap: 10px; }
.mg-top { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mg-picks { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 4px; }
.mg-picks li { display: grid; grid-template-columns: auto minmax(0, 7rem) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; font-size: 14px; }
.mg-picks li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-picks li.win { background: var(--surface-2); box-shadow: inset 4px 0 0 var(--pcol); }
.mg-pk { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.mg-next { display: grid; gap: 2px; padding: 12px 14px; border: 2px dashed var(--line-2); }
.mg-next-k { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mg-next b { font: var(--w-display) 20px/1.15 var(--f-display); }
.mg-next small { color: var(--muted); font-size: 14px; }

/* the live mini-game in the turn card */
.mini-live { display: grid; gap: 6px; margin-top: 10px; }
.mini-live[hidden] { display: none; }
.ml-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border: 1.5px solid var(--line-2); background: var(--surface-2); font-size: 14px; }
.ml-k { font-weight: 700; }
.ml-t { color: var(--muted); flex: 1 1 10rem; min-width: 0; }
.ml-dots { display: inline-flex; gap: 4px; }
.ml-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--pcol); }
.ml-dots i.on { background: var(--pcol); }
.ml-row .btn { min-height: 44px; margin-left: auto; }

/* setup toggles: lobby and room */
.minis-field { min-width: 0; }
.minis-pick { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .minis-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini-tog { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; text-align: left; min-height: 56px; padding: 10px 12px; border: 1.5px solid var(--line-2); background: transparent; color: var(--fg); border-radius: var(--r-sm); cursor: pointer; }
.mt-box { width: 24px; height: 24px; margin-top: 1px; border: 2px solid var(--fg); display: grid; place-items: center; }
.mini-tog[aria-pressed="true"] .mt-box { background: var(--fg); }
.mini-tog[aria-pressed="true"] .mt-box::after { content: ""; width: 12px; height: 7px; border: 3px solid var(--bg); border-top: 0; border-right: 0; transform: translateY(-2px) rotate(-45deg); }
.mt-txt { display: grid; gap: 2px; min-width: 0; }
.mt-txt b { font-size: 15px; }
.mt-txt small { font-size: 13px; line-height: 1.35; color: var(--muted); font-weight: 400; }
.mini-tog[aria-pressed="false"] .mt-txt b { color: var(--muted); }
.room .rm-minis .minis-pick { grid-template-columns: minmax(0, 1fr); }

/* Party sip bets on the side-bet card */
.bet-stake { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bet-stake .seg { flex-wrap: wrap; }
.bet-sips { display: inline-flex; align-items: center; gap: 6px; }
.bet-sips-l { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; }
.bet-sips-l svg { width: 18px; height: 18px; }
.bet-sips output { min-width: 2ch; text-align: center; font: var(--w-num) 22px/1 var(--f-num); }
.bet-stake #betGo { margin-left: auto; }
.bet-list li > span { min-width: 0; }

/* the roll-off, played live */
.ro-live .ro-list li { grid-template-columns: auto minmax(0, 1fr) auto 48px; min-height: 60px; }
.ro-live .ro-list li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-live .ro-list li.up { box-shadow: inset 4px 0 0 var(--pcol); background: var(--surface-2); }
.ro-live .ro-list li.out { opacity: .55; }
.ro-live .ro-list li.first { box-shadow: inset 4px 0 0 var(--gold); }
.ro-live .ro-dice { flex-wrap: wrap; justify-content: flex-end; }
.ro-live .ro-die.landed { animation: land .5s cubic-bezier(.2, 1.6, .4, 1); }
.ro-wait { font-size: 13px; color: var(--muted); }
.ro-say { margin: 0; min-height: 1.4em; text-align: center; font-size: 16px; }
.ro-tie { color: var(--down); }
.ro-waiting::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: roDots 1.2s steps(4) infinite; }
.ro-act { display: grid; }
.ro-act:empty { display: none; }
.ro-act .btn { min-height: 60px; font-size: 19px; width: 100%; }
.ro-act .dice-ico { font-size: 26px; line-height: 1; }
@keyframes roDots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ================= Classic: printed, engraved, a gentleman's word ================= */
[data-theme="classic"]:not(.home) .mini-sheet .mg-chip { border-radius: 0; border-color: var(--c-ink); font-family: var(--c-body); }
[data-theme="classic"]:not(.home) .mini-sheet .mg-chip[aria-pressed="true"] { background: var(--c-ink); color: var(--c-paper); }
[data-theme="classic"]:not(.home) .mg-lot, [data-theme="classic"]:not(.home) .mg-co, [data-theme="classic"]:not(.home) .env, [data-theme="classic"]:not(.home) .ml-row { border-color: var(--c-ink); background: var(--c-paper-2); }
[data-theme="classic"]:not(.home) .mg-amt { border-color: var(--c-ink); }
[data-theme="classic"]:not(.home) .mg-amt input, [data-theme="classic"]:not(.home) .env-amt, [data-theme="classic"]:not(.home) .sd-to { font-family: var(--c-flap); letter-spacing: .02em; }
[data-theme="classic"]:not(.home) .mg-face.back { border-radius: 6px; border-color: var(--c-ink-2); background: var(--c-paper-2); color: var(--c-ink-2); font-family: var(--c-display); }
[data-theme="classic"]:not(.home) .env-card { border-color: var(--c-ink); background: var(--c-paper); }
[data-theme="classic"]:not(.home) .env-flap { background: var(--c-paper-3); border-color: var(--c-ink); }
[data-theme="classic"]:not(.home) .env.win { box-shadow: inset 4px 0 0 var(--c-red); }
[data-theme="classic"]:not(.home) .env-cert { background: var(--c-red); color: var(--c-paper); }
[data-theme="classic"]:not(.home) .mg-result { font-family: var(--c-display); }
[data-theme="classic"]:not(.home) .mg-result.lose { color: var(--c-red); }
[data-theme="classic"]:not(.home) .mg-next { border-color: var(--c-ink); border-style: double; border-width: 3px; }
[data-theme="classic"]:not(.home) .mg-curtain h2 { font-style: italic; }
[data-theme="classic"]:not(.home) .mini-tog { border-radius: 0; border-color: var(--c-ink); }
[data-theme="classic"]:not(.home) .mt-box { border-color: var(--c-ink); }
[data-theme="classic"]:not(.home) .mini-tog[aria-pressed="true"] .mt-box { background: var(--c-ink); }
[data-theme="classic"]:not(.home) .mini-tog[aria-pressed="true"] .mt-box::after { border-color: var(--c-paper); }
[data-theme="classic"]:not(.home) .mg-pm { border-radius: 0; border-color: var(--c-ink); }
[data-theme="classic"]:not(.home) .mg-gamble h2 { font-style: italic; }
[data-theme="classic"]:not(.home) .bet-sips output { font-family: var(--c-flap); }
[data-theme="classic"]:not(.home) .ro-live .ro-list li.up { box-shadow: inset 4px 0 0 var(--c-ink); background: var(--c-tint); }
[data-theme="classic"]:not(.home) .ro-live .ro-list li.first { box-shadow: inset 4px 0 0 var(--c-red); background: var(--c-tint); }
[data-theme="classic"]:not(.home) .ro-tie { color: var(--c-red); }
[data-theme="classic"]:not(.home) .ro-say { font-family: var(--c-body); }

/* ================= Modern: the lamp wall ================= */
[data-theme="modern"]:not(.home) .mini-sheet .label { font-family: var(--m-mono); }
[data-theme="modern"]:not(.home) .mg-chip { border-radius: 0; border-color: var(--m-ink); font: 500 15px/1 var(--m-mono); background: var(--m-paper); }
[data-theme="modern"]:not(.home) .mg-chip[aria-pressed="true"] { background: var(--m-ink); color: var(--m-paper); box-shadow: inset 0 -4px 0 var(--m-lamp); }
[data-theme="modern"]:not(.home) .mg-lot, [data-theme="modern"]:not(.home) .mg-co, [data-theme="modern"]:not(.home) .env, [data-theme="modern"]:not(.home) .ml-row, [data-theme="modern"]:not(.home) .mg-ticks li { border-radius: 0; border-color: var(--m-ink); background: var(--m-paper); }
[data-theme="modern"]:not(.home) .mg-amt { background: var(--m-ink); border-color: var(--m-ink); }
[data-theme="modern"]:not(.home) .mg-amt span { color: var(--m-lamp); font-family: var(--m-dots); }
[data-theme="modern"]:not(.home) .mg-amt input { color: var(--m-lamp); background: var(--m-ink); border-color: transparent; font: 900 38px/1 var(--m-dots); }
[data-theme="modern"]:not(.home) .mg-amt:focus-within { outline-color: var(--m-ink); box-shadow: 0 0 0 5px var(--m-lamp); }
[data-theme="modern"]:not(.home) .mg-pm { border-radius: 0; border-color: var(--m-ink); background: var(--m-paper); }
[data-theme="modern"]:not(.home) .mg-face.back { border-radius: 0; border: 3px solid var(--m-ink); background: var(--m-ink); color: var(--m-lamp); font-family: var(--m-dots); }
[data-theme="modern"]:not(.home) .env-card { border-color: var(--m-ink); background: var(--m-paper); }
[data-theme="modern"]:not(.home) .env-flap { background: var(--m-ink); border: 0; }
[data-theme="modern"]:not(.home) .env-amt { font: 700 20px/1 var(--m-mono); }
[data-theme="modern"]:not(.home) .env.win { box-shadow: inset 0 -5px 0 var(--m-lamp); }
[data-theme="modern"]:not(.home) .env-cert { background: var(--m-ink); color: var(--m-lamp); font-family: var(--m-mono); }
[data-theme="modern"]:not(.home) .mg-result { font-family: var(--m-sans); }
[data-theme="modern"]:not(.home) .mg-result.win { background: var(--m-lamp); color: var(--m-ink); padding: 8px; }
[data-theme="modern"]:not(.home) .mg-result.lose { border: var(--m-rule) solid var(--m-ink); padding: 8px; }
[data-theme="modern"]:not(.home) .mg-next { border: var(--m-rule) solid var(--m-ink); border-left: 8px solid var(--m-lamp); }
[data-theme="modern"]:not(.home) .mg-next-k, [data-theme="modern"]:not(.home) .mg-l { font-family: var(--m-mono); font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--m-ink-2); }
[data-theme="modern"]:not(.home) .mini-tog { border-radius: 0; border-color: var(--m-ink); }
[data-theme="modern"]:not(.home) .mini-tog[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--m-lamp); }
[data-theme="modern"]:not(.home) .mt-box { border-color: var(--m-ink); }
[data-theme="modern"]:not(.home) .mini-tog[aria-pressed="true"] .mt-box { background: var(--m-ink); }
[data-theme="modern"]:not(.home) .mini-tog[aria-pressed="true"] .mt-box::after { border-color: var(--m-lamp); }
[data-theme="modern"]:not(.home) .mg-ticks li.in { box-shadow: inset 0 -3px 0 var(--m-lamp); }
[data-theme="modern"]:not(.home) .ml-k { font-family: var(--m-mono); }
[data-theme="modern"]:not(.home) .ml-dots i { border-radius: 0; border-color: var(--m-ink); }
[data-theme="modern"]:not(.home) .ml-dots i.on { background: var(--m-lamp); }
[data-theme="modern"]:not(.home) .bet-sips output { font: 900 24px/1 var(--m-dots); }
[data-theme="modern"]:not(.home) .ro-live .ro-list li.up { box-shadow: inset 6px 0 0 var(--m-lamp); background: var(--m-paper-2); }
[data-theme="modern"]:not(.home) .ro-live .ro-list li.first { box-shadow: inset 6px 0 0 var(--m-lamp); }
[data-theme="modern"]:not(.home) .ro-tie { color: var(--m-ink); background: var(--m-lamp); padding: 0 4px; }
[data-theme="modern"]:not(.home) .sd-vs { font-family: var(--m-dots); }

/* ================= Party: office party poster, 1987 ================= */
[data-theme="party"]:not(.home) .mg-chip { border-radius: 0; border: var(--pt-line) solid var(--pt-ink); background: var(--pt-paper); box-shadow: var(--pt-shadow-sm); font: 400 15px/1 var(--f-display); }
[data-theme="party"]:not(.home) .mg-chip[aria-pressed="true"] { background: var(--pt-pink); color: var(--pt-ink); }
[data-theme="party"]:not(.home) .mg-chip small { color: var(--pt-muted); }
[data-theme="party"]:not(.home) .mg-lot, [data-theme="party"]:not(.home) .mg-co, [data-theme="party"]:not(.home) .env, [data-theme="party"]:not(.home) .ml-row { border: var(--pt-line) solid var(--pt-ink); border-radius: 0; background: var(--pt-paper); box-shadow: var(--pt-shadow-sm); }
[data-theme="party"]:not(.home) .mg-lot { border-left: 10px solid var(--pc); }
[data-theme="party"]:not(.home) .mg-co { border-left-width: 8px; border-left-color: var(--pc); }
[data-theme="party"]:not(.home) .mg-co:hover { background: var(--pt-tint); }
[data-theme="party"]:not(.home) .mg-amt { border: var(--pt-line) solid var(--pt-ink); background: var(--pt-tint); box-shadow: var(--pt-shadow-sm); }
[data-theme="party"]:not(.home) .mg-pm { border-radius: 0; border: var(--pt-line) solid var(--pt-ink); background: var(--pt-paper); box-shadow: var(--pt-shadow-sm); }
[data-theme="party"]:not(.home) .mg-face.back { border-radius: 0; border: var(--pt-line) solid var(--pt-ink); background: var(--pt-pink-tint); color: var(--pt-ink); }
[data-theme="party"]:not(.home) .env-card { border: 2px solid var(--pt-ink); background: var(--pt-paper); }
[data-theme="party"]:not(.home) .env-flap { background: var(--pt-pink); border-color: var(--pt-ink); }
[data-theme="party"]:not(.home) .env.win { background: var(--pt-pink-tint); box-shadow: 6px 6px 0 var(--pt-cobalt); }
[data-theme="party"]:not(.home) .env-cert { background: var(--pt-cobalt); color: var(--pt-paper); border: 2px solid var(--pt-ink); font-family: var(--f-display); font-weight: 400; }
[data-theme="party"]:not(.home) .mg-result { text-shadow: 3px 3px 0 var(--pt-pink); }
[data-theme="party"]:not(.home) .mg-result.lose { color: var(--pt-down); text-shadow: none; }
[data-theme="party"]:not(.home) .mg-next { border: var(--pt-line) dashed var(--pt-ink); background: var(--pt-pink-tint); }
[data-theme="party"]:not(.home) .mg-next-k { font: 400 20px/1 var(--f-hand); letter-spacing: 0; text-transform: none; color: var(--pt-cobalt); }
[data-theme="party"]:not(.home) .mg-l { font: 400 18px/1 var(--f-hand); letter-spacing: 0; text-transform: none; color: var(--pt-cobalt); }
[data-theme="party"]:not(.home) .mini-tog { border-radius: 0; border: var(--pt-line) solid var(--pt-ink); }
[data-theme="party"]:not(.home) .mini-tog[aria-pressed="true"] { background: var(--pt-pink-tint); box-shadow: var(--pt-shadow-sm); }
[data-theme="party"]:not(.home) .mt-box { border: var(--pt-line) solid var(--pt-ink); }
[data-theme="party"]:not(.home) .mini-tog[aria-pressed="true"] .mt-box { background: var(--pt-ink); }
[data-theme="party"]:not(.home) .mini-tog[aria-pressed="true"] .mt-box::after { border-color: var(--pt-pink); }
[data-theme="party"]:not(.home) .mg-ticks li { border: 2px solid var(--pt-ink); background: var(--pt-paper); color: var(--pt-muted); }
[data-theme="party"]:not(.home) .mg-ticks li.in { background: var(--pt-tint); color: var(--pt-ink); }
[data-theme="party"]:not(.home) .ml-dots i { border-radius: 0; border: 2px solid var(--pt-ink); }
[data-theme="party"]:not(.home) .ml-dots i.on { background: var(--pt-pink); }
[data-theme="party"]:not(.home) .mini-sheet.mg-pass { background: var(--pt-tint); }
[data-theme="party"]:not(.home) .mg-curtain h2 { text-shadow: 4px 4px 0 var(--pt-pink); }
[data-theme="party"]:not(.home) .ro-live .ro-list li.up { box-shadow: inset 8px 0 0 var(--pt-pink); background: var(--pt-tint); }
[data-theme="party"]:not(.home) .ro-live .ro-list li.first { box-shadow: inset 8px 0 0 var(--pt-pink); background: var(--pt-pink-tint); }
[data-theme="party"]:not(.home) .ro-tie { color: var(--pt-down); }
[data-theme="party"]:not(.home) .ro-die { border-radius: 0; background: var(--pt-cobalt); color: var(--pt-paper); border: 2px solid var(--pt-ink); box-shadow: 2px 2px 0 var(--pt-ink); font-family: var(--f-display); }
[data-theme="party"]:not(.home) .bet-sips output { font-family: var(--f-display); }
[data-theme="party"]:not(.home) .bet-sips .mg-pm { width: 44px; }
/* the showdown: a boxing-night poster on the office photocopier */
[data-theme="party"]:not(.home) .mini-sheet.mg-showdown { background: var(--pt-paper) var(--tex-confetti, none); box-shadow: 10px 10px 0 var(--pt-pink); }
[data-theme="party"]:not(.home) .sd-kick { display: inline-block; justify-self: center; padding: 8px 14px; background: var(--pt-ink); color: var(--pt-paper); font: 400 18px/1 var(--f-display); letter-spacing: .08em; transform: rotate(-2deg); box-shadow: 4px 4px 0 var(--pt-pink); }
[data-theme="party"]:not(.home) .sd-side { border: var(--pt-line) solid var(--pt-ink); background: var(--pt-paper); box-shadow: 5px 5px 0 var(--pcol); }
[data-theme="party"]:not(.home) .sd-side.a { transform: rotate(-1.5deg); }
[data-theme="party"]:not(.home) .sd-side.b { transform: rotate(1.5deg); }
[data-theme="party"]:not(.home) .sd-side > b { font-family: var(--f-display); font-weight: 400; }
[data-theme="party"]:not(.home) .sd-vs { display: grid; place-items: center; width: 54px; height: 54px; background: var(--pt-pink); color: var(--pt-ink); border: var(--pt-line) solid var(--pt-ink); font: 400 20px/1 var(--f-display); transform: rotate(8deg); box-shadow: var(--pt-shadow-sm); }
[data-theme="party"]:not(.home) .sd-chal { border: var(--pt-line) solid var(--pt-ink); background: var(--pt-tint); }
[data-theme="party"]:not(.home) .sd-name { font: 400 24px/1.1 var(--f-display); }
[data-theme="party"]:not(.home) .sd-chal p:last-child { font: 400 21px/1.2 var(--f-hand); }
[data-theme="party"]:not(.home) .sd-drinks { background: var(--pt-pink); border: 2px solid var(--pt-ink); color: var(--pt-ink); transform: rotate(-4deg); }
[data-theme="party"]:not(.home) .sd-stakes { font: 400 19px/1.2 var(--f-hand); color: var(--pt-muted); background: var(--pt-paper); padding: 6px 10px; justify-self: center; }
[data-theme="party"]:not(.home) .sd-moves li { border: var(--pt-line) solid var(--pt-ink); border-left: 10px solid var(--pc); background: var(--pt-paper); box-shadow: var(--pt-shadow-sm); }
[data-theme="party"]:not(.home) .sd-result h2 { text-shadow: 4px 4px 0 var(--pt-pink); }
[data-theme="party"]:not(.home) .mg-gamble .mg-die .die { box-shadow: 5px 5px 0 var(--pt-ink); border: var(--pt-line) solid var(--pt-ink); }

/* ================= non-party, quieter showdown frame (never shown, kept tidy) ================= */
[data-theme="classic"]:not(.home) .sd-side, [data-theme="modern"]:not(.home) .sd-side { border-width: 1.5px; }

/* ================= reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  .mg-face, .env-flap, .env-amt { transition: none; }
  .env.win .env-cert { animation: none; opacity: 1; transform: none; }
  .mg-env.opened .env, .sd-result .sd-moves li, .ro-live .ro-die.landed { animation: none; }
  .ro-waiting::after { animation: none; content: "…"; }
  [data-theme="party"]:not(.home) .sd-side.a, [data-theme="party"]:not(.home) .sd-side.b, [data-theme="party"]:not(.home) .sd-vs, [data-theme="party"]:not(.home) .sd-kick { transform: none; }
}

/* ================= the mini-game lobby: rules on screen while everyone readies up ================= */
.mg-lobby .lb-head { display: grid; gap: 4px; justify-items: start; }
.lb-badge { display: inline-block; padding: 5px 10px; font: 700 12px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; background: var(--fg); color: var(--surface); }
.lb-rules { display: grid; gap: 6px; padding: 12px 14px; border: 1.5px solid var(--line-2); background: var(--surface-2); }
.lb-rules ol { margin: 0; padding-left: 22px !important; display: grid; gap: 8px; counter-reset: none; }
.lb-rules li { line-height: 1.4; font-size: 15px; }
.lb-seats { display: grid; gap: 8px; }
.sheet ul.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 4px 8px 4px 6px; border: 1.5px solid var(--line-2); border-left: 6px solid var(--pcol); background: var(--surface); }
.lb-list li .ptoken { width: 36px; height: 36px; }
.lb-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name small { font-weight: 500; color: var(--muted); font-size: 12px; }
.lb-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.lb-tag svg { width: 16px; height: 16px; }
.lb-tag.in { color: var(--fg); font-weight: 700; padding: 4px 10px; background: var(--gold); color: var(--gold-ink); }
.lb-list li.in { background: var(--surface-2); }
.lb-list li .btn.sm { min-height: 44px; min-width: 88px; }
.lb-dots { display: inline-flex; gap: 3px; }
.lb-dots b { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: lb-dot 1.2s infinite ease-in-out; }
.lb-dots b:nth-child(2) { animation-delay: .15s; } .lb-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes lb-dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.lb-list li.pop { animation: lb-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes lb-pop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: none; } }
.lb-watch { margin: 0; text-align: center; }
.lb-acts:empty, .lb-force:empty { display: none; }
.lb-go { grid-column: 1 / -1; margin: 0; text-align: center; font: var(--w-display) 24px/1.15 var(--f-display); animation: lb-pop .5s ease-out; }
.mg-lobby.go .lb-list li { border-left-color: var(--pcol); }

[data-theme="classic"]:not(.home) .lb-badge { background: var(--c-red); color: var(--c-paper); font-family: var(--c-body); }
[data-theme="classic"]:not(.home) .lb-rules { border: 1px solid var(--c-ink); background: var(--c-paper-2); box-shadow: inset 0 0 0 3px var(--c-paper-2), inset 0 0 0 4px var(--c-ink); padding: 16px 18px; }
[data-theme="classic"]:not(.home) .lb-rules li::marker { font-family: var(--c-display); color: var(--c-red); font-weight: 700; }
[data-theme="classic"]:not(.home) .lb-list li { border-color: var(--c-ink); border-radius: 0; background: var(--c-paper); }
[data-theme="classic"]:not(.home) .lb-list li.in { background: var(--c-paper-2); }
[data-theme="classic"]:not(.home) .lb-tag.in { background: var(--c-ink); color: var(--c-paper); }
[data-theme="classic"]:not(.home) .lb-go { font-family: var(--c-display); font-style: italic; color: var(--c-ink); }

[data-theme="modern"]:not(.home) .lb-badge { background: var(--m-ink); color: var(--m-lamp); font-family: var(--m-dots); letter-spacing: .1em; }
[data-theme="modern"]:not(.home) .lb-rules { border: 1px solid var(--m-ink); border-radius: 0; background: var(--m-paper); }
[data-theme="modern"]:not(.home) .lb-rules li::marker { font-family: var(--m-dots); color: var(--m-ink); }
[data-theme="modern"]:not(.home) .lb-list li { border-radius: 0; border-color: var(--m-ink); background: var(--m-paper); }
[data-theme="modern"]:not(.home) .lb-list li.in { box-shadow: inset 0 -3px 0 var(--m-lamp); }
[data-theme="modern"]:not(.home) .lb-tag.in { background: var(--m-ink); color: var(--m-lamp); font-family: var(--m-dots); }

[data-theme="party"]:not(.home) .lb-badge { background: var(--pt-pink); color: var(--pt-ink); border: 2px solid var(--pt-ink); font-family: var(--f-display); font-weight: 400; transform: rotate(-3deg); box-shadow: 3px 3px 0 var(--pt-ink); }
[data-theme="party"]:not(.home) .lb-rules { border: var(--pt-line) solid var(--pt-ink); background: var(--pt-tint); box-shadow: var(--pt-shadow-sm); }
[data-theme="party"]:not(.home) .lb-rules li::marker { font-family: var(--f-display); color: var(--pt-ink); }
[data-theme="party"]:not(.home) .lb-list li { border: var(--pt-line) solid var(--pt-ink); border-left: 10px solid var(--pcol); background: var(--pt-paper); box-shadow: var(--pt-shadow-sm); }
[data-theme="party"]:not(.home) .lb-list li.in { background: var(--pt-pink-tint, var(--pt-tint)); }
[data-theme="party"]:not(.home) .lb-tag.in { background: var(--pt-ink); color: var(--pt-paper); transform: rotate(-2deg); }
[data-theme="party"]:not(.home) .lb-go { font-family: var(--f-display); text-shadow: 3px 3px 0 var(--pt-pink); color: var(--pt-ink); }

@media (prefers-reduced-motion: reduce) {
  .lb-dots b, .lb-list li.pop, .lb-go { animation: none; }
  [data-theme="party"]:not(.home) .lb-badge, [data-theme="party"]:not(.home) .lb-tag.in { transform: none; }
}
