/* Back Room — classic card room: felt, cream cards, brass trim. */
:root {
  --felt: #0f3b2e; --felt-2: #072219; --felt-3: #0b2e23;
  --card: #fbf7ee; --card-edge: #e8dfcb;
  --ink-red: #c8242f; --ink-black: #1b1b1f; --ink-blue: #1f5fbf; --ink-green: #1d7a3a;
  --brass: #d4a64a; --brass-2: #f0cf86; --brass-dim: #d4a64a4d;
  --chips: #3a8dde; --mult: #ff4d4d; --xmult: #ffcc33; --money: #f0cf86;
  --panel: rgba(0, 0, 0, .34); --panel-2: rgba(0, 0, 0, .5);
  --text: #f4efe2; --muted: #b9c4b5; --line: #d4a64a4d;
  --display: "Playfair Display", Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --speed: 1;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-pop: cubic-bezier(.3, 1.5, .5, 1);
  --cw: 58px; --ch: 82px;
}
html, body { background: radial-gradient(130% 90% at 50% 0%, #17503f 0%, var(--felt) 38%, var(--felt-2) 100%) fixed, var(--felt-2);
  font-family: var(--ui); color: var(--text); }
body::before { /* felt grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E"); }
#app { position: relative; z-index: 1; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
button { font-family: var(--ui); background: rgba(255, 255, 255, .06); border-color: var(--line); color: var(--text); }
button.primary { background: linear-gradient(180deg, var(--brass-2), var(--brass)); color: #2a1b02; box-shadow: 0 3px 0 #8a6420;
  font-family: var(--ui); font-weight: 700; letter-spacing: .02em; }
button.primary:active:not(:disabled) { box-shadow: 0 1px 0 #8a6420; }
button.danger { background: linear-gradient(180deg, #ff6e6e, #d93a3a); color: #fff; border-color: transparent; box-shadow: 0 3px 0 #8a1d1d; font-weight: 700; }
.topbar { background: rgba(4, 22, 16, .72); border-bottom: 1px solid var(--line); }
.topbar .home, .topbar .title { font-family: var(--display); color: var(--brass-2); }
.modal .sheet { background: linear-gradient(180deg, #10392d, #082219); border: 1px solid var(--line); color: var(--text); }
.toast { font-family: var(--display); }
.muted { color: var(--muted); }
a { color: var(--brass-2); }

/* ============================================================ playing cards */
.pc { position: relative; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .1); flex: none;
  background: linear-gradient(160deg, #fffdf6, var(--card) 60%, #f3ecdc); color: var(--ink-black);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 4px 10px rgba(0, 0, 0, .35); border: 1px solid var(--card-edge);
  font-family: Georgia, "Times New Roman", serif; user-select: none; -webkit-user-select: none; overflow: hidden; }
.pc.red { color: var(--ink-red); }
.four .pc.s-D { color: var(--ink-blue); } .four .pc.s-C { color: var(--ink-green); }
.pc .idx { position: absolute; left: 4%; top: 3%; display: flex; flex-direction: column; align-items: center; line-height: .92;
  font-weight: 700; font-size: calc(var(--cw) * .3); }
.pc .idx small { font-size: .78em; }
.pc .idx.br { left: auto; top: auto; right: 4%; bottom: 3%; transform: rotate(180deg); }
.pc .pips { position: absolute; inset: 18% 22%; }
.pc .pip { position: absolute; transform: translate(-50%, -50%); font-size: calc(var(--cw) * .2); line-height: 1; }
.pc .pip.flip { transform: translate(-50%, -50%) rotate(180deg); }
.pc .pip.ace { font-size: calc(var(--cw) * .56); }
.pc .face { position: absolute; inset: 15% 22%; border: 1px solid currentColor; border-radius: 3px; overflow: hidden; background: #fbf7ee; }
.pc .face svg { width: 100%; height: 100%; display: block; }
.pc .face b { font-family: var(--display); font-size: calc(var(--cw) * .5); line-height: 1; }
.pc .face i { position: absolute; font-style: normal; font-size: calc(var(--cw) * .2); }
.pc .face i.a { top: 4%; left: 8%; } .pc .face i.b { bottom: 4%; right: 8%; transform: rotate(180deg); }
/* upgrades */
.pc.u-gold { border-color: #c99a2e; box-shadow: 0 0 0 2px #e8c460 inset, 0 4px 10px rgba(0, 0, 0, .35);
  background: linear-gradient(160deg, #fff6d6, #f6e3a6 60%, #e9cd7c); }
.pc.u-glass { background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(214, 235, 255, .85) 50%, rgba(255, 255, 255, .95));
  border-color: #9cc5f0; }
.pc.u-glass::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .9) 45%, transparent 55%); }
.pc.u-steel { background: linear-gradient(160deg, #eef0f3, #cfd4db 60%, #b8bec7); border-color: #8f98a3; }
.pc.u-lucky { box-shadow: 0 0 0 2px #3fbf6b inset, 0 4px 10px rgba(0, 0, 0, .35); }
.pc.u-lucky::before { content: "☘"; position: absolute; right: 5%; top: 3%; color: #2e9d55; font-size: calc(var(--cw) * .2); }
.pc.u-wild .pips, .pc.u-wild .face, .pc.u-wild .idx small { background: linear-gradient(90deg, #c8242f, #d4a64a, #1d7a3a, #1f5fbf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pc.stone { background: radial-gradient(circle at 30% 30%, #9a958c, #6f6a62 70%); border-color: #4f4b45; color: #f4efe2; }
.pc.stone .stone-mark { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--ui); font-weight: 800;
  font-size: calc(var(--cw) * .2); letter-spacing: .08em; opacity: .9; }
.pc.debuff { filter: grayscale(1) brightness(.75); }
.pc.debuff::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(200, 36, 47, .35) 6px 8px); }
.pc .new { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); font: 700 9px/1 var(--ui); background: var(--brass); color: #2a1b02;
  padding: 2px 4px; border-radius: 4px; letter-spacing: .05em; }

/* card back (deck) */
.back { width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .1); border: 1px solid #5b1a1a;
  background: radial-gradient(circle at 50% 50%, #8e2a2a 0 30%, transparent 31%),
    repeating-linear-gradient(45deg, #7a1f22 0 4px, #6a1a1d 4px 8px); box-shadow: 0 0 0 3px #fbf7ee inset, 0 4px 10px rgba(0, 0, 0, .35); }

/* ============================================================ hub */
.br-hub { max-width: 520px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.br-hero { text-align: center; padding: 1.4rem 0 1rem; }
.br-hero .fan { height: 92px; position: relative; margin: 0 auto .6rem; width: 160px; }
.br-hero .fan .pc { position: absolute; left: 50%; bottom: 0; transform-origin: 50% 120%; --cw: 56px; --ch: 78px; }
.br-hero h1 { font-size: 2.6rem; margin: .1em 0 0; color: var(--brass-2); text-shadow: 0 2px 0 #0008; }
.br-hero .tag { margin: .2rem 0 0; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; margin: .8rem 0; }
.panel h3 { margin: 0 0 .5rem; color: var(--brass-2); font-size: 1.15rem; }
.kicker { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); font-weight: 700; }
.mode-btn { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: .7rem; width: 100%; text-align: left;
  padding: .9rem 1rem; border-radius: 16px; margin: .55rem 0; background: var(--panel); }
.mode-btn .ic { font-size: 1.6rem; text-align: center; }
.mode-btn b { font-family: var(--display); font-size: 1.15rem; display: block; color: var(--text); }
.mode-btn small { color: var(--muted); }
.mode-btn .go { color: var(--brass-2); font-size: 1.3rem; }
.mode-btn:disabled { opacity: .5; }
.statrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.statrow b { display: block; font-size: 1.3rem; font-family: var(--display); color: var(--brass-2); }
.statrow span { font-size: .74rem; color: var(--muted); }
ol.board { list-style: none; margin: 0; padding: 0; }
ol.board li { display: grid; grid-template-columns: 28px 1fr auto; gap: .5rem; padding: .45rem .2rem; border-bottom: 1px solid #ffffff12; align-items: center; }
ol.board li.me { color: var(--brass-2); font-weight: 700; }
ol.board .rk { color: var(--muted); text-align: right; }

/* setup */
.setup label { color: var(--text); margin: .8rem 0; }
.setup small { color: var(--muted); }
.seg { display: flex; background: var(--panel-2); border-radius: 12px; padding: 3px; gap: 3px; margin-top: .35rem; }
.seg button { flex: 1; border: 0; background: transparent; padding: .55em .4em; border-radius: 9px; font-size: .9rem; }
.seg button.on { background: var(--brass); color: #2a1b02; font-weight: 700; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid #ffffff10; }
.switch input { width: auto; accent-color: var(--brass); transform: scale(1.3); }
.setup input[type=text], .setup input[type=number] { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

/* ============================================================ game screen */
body.in-game #app { height: 100%; }
.br-game { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto;
  padding: .4rem .5rem calc(.5rem + env(safe-area-inset-bottom)); gap: .35rem; }
.pop { position: fixed; z-index: 45; transform: translate(-50%, -100%); font: 900 .95rem/1 var(--ui); white-space: nowrap;
  padding: 3px 6px; border-radius: 6px; pointer-events: none; animation: popup calc(.5s * var(--speed)) var(--ease-pop) forwards; z-index: 3; }
.pop.chips { background: var(--chips); color: #fff; }
.pop.mult { background: var(--mult); color: #fff; }
.pop.xmult { background: var(--xmult); color: #2a1b02; font-size: 1.05rem; }
.pop.money { background: var(--money); color: #2a1b02; }
.pop.info { background: #000c; color: #fff; }

.calc { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .4rem; width: 100%; max-width: 280px; margin-top: .6rem; }
.calc .box { border-radius: 10px; padding: .25rem .5rem; font: 800 1.35rem/1.2 var(--ui); text-align: center; color: #fff;
  font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.calc .c { background: var(--chips); box-shadow: 0 3px 0 #1d5a99; }
.calc .m { background: var(--mult); box-shadow: 0 3px 0 #a52828; }
.calc .x { font: 900 1.1rem var(--ui); color: var(--muted); }
.calc.idle .box { opacity: .35; }
.calc .box.bump { animation: bump calc(.18s * var(--speed)) var(--ease-pop); }
.handname { font-family: var(--display); font-size: 1.25rem; color: var(--brass-2); min-height: 1.6rem; text-align: center; margin-bottom: 1.1rem; }
.handname small { font-family: var(--ui); font-size: .72rem; color: var(--muted); margin-left: .3rem; }
.total { font: 900 2rem/1 var(--ui); font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 3px 0 #0008; min-height: 2rem; }
.total.flame { color: var(--xmult); text-shadow: 0 0 18px #ff7a1a, 0 3px 0 #0008; animation: flame .6s ease-in-out infinite alternate; }
.preview { text-align: center; font-size: .84rem; color: var(--muted); min-height: 1.2rem; }
.preview b { color: var(--text); }

/* (the rest of the play screen is in the v2 block at the end) */
.hand { position: relative; height: calc(var(--ch) + 34px); margin: 0 auto; width: 100%; }
.hand .pc { position: absolute; bottom: 4px; cursor: pointer; touch-action: manipulation;
  transition: transform calc(.2s * var(--speed)) var(--ease-out), left calc(.25s * var(--speed)) var(--ease-out), box-shadow .2s; }
.hand .pc.sel { transform: translateY(-18px); box-shadow: 0 0 0 2px var(--brass-2), 0 10px 18px rgba(0, 0, 0, .5); }
.hand .pc.deal { animation: deal calc(.32s * var(--speed)) var(--ease-out) both; }
.handtools { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--muted); padding: 0 .2rem; }
.handtools button { padding: .25em .7em; font-size: .78rem; border-radius: 999px; }
.counts { display: flex; gap: .8rem; }
.counts b { color: var(--text); font-size: .95rem; }
.counts .p b { color: var(--chips); } .counts .d b { color: var(--mult); }
.actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: .5rem; }
.actions button { min-height: 56px; font-size: 1.05rem; border-radius: 14px; }
.actions .disc { background: linear-gradient(180deg, #ff7070, #d93a3a); color: #fff; border: 0; box-shadow: 0 3px 0 #7d1a1a; font-weight: 800; }
.actions .disc:active:not(:disabled) { box-shadow: 0 1px 0 #7d1a1a; transform: translateY(2px); }
.speed { padding: .2em .55em !important; }

/* overlays (round result, pick, run over) */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(2, 14, 10, .72);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .25s; padding: 1rem; }
.overlay .box { width: 100%; max-width: 420px; background: linear-gradient(180deg, #144636, #0a281f); border: 1px solid var(--brass-dim);
  border-radius: 22px; padding: 1.2rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); animation: rise calc(.35s * var(--speed)) var(--ease-pop);
  max-height: 92dvh; overflow: auto; }
.overlay h2 { text-align: center; color: var(--brass-2); margin: .1rem 0 .3rem; font-size: 1.7rem; }
.overlay .big-score { text-align: center; font: 900 2.2rem/1.1 var(--ui); font-variant-numeric: tabular-nums; }
.overlay .sub { text-align: center; color: var(--muted); margin-bottom: .8rem; }
.paylines { list-style: none; padding: 0; margin: .6rem 0; }
.paylines li { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed #ffffff1c; opacity: 0;
  animation: slidein calc(.3s * var(--speed)) var(--ease-out) forwards; }
.paylines li b { color: var(--money); }
.paylines li.tot { border: 0; font-weight: 800; font-size: 1.1rem; }
.levelup { text-align: center; background: rgba(58, 141, 222, .16); border: 1px solid rgba(58, 141, 222, .5); border-radius: 12px; padding: .5rem; margin: .4rem 0; }
.levelup b { color: #9fd0ff; }
.pickrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .6rem 0; }
.bigch { border-radius: 14px; padding: .6rem .5rem; min-height: 150px; display: flex; flex-direction: column; gap: .35rem; text-align: left;
  background: linear-gradient(170deg, #1f4c3e, #0f2c23); border: 2px solid var(--rc, #9db7aa); cursor: pointer; }
.bigch.r-C { --rc: #9db7aa; } .bigch.r-U { --rc: #5aa9ff; } .bigch.r-R { --rc: #ffcc33; }
.bigch .nm { font-family: var(--display); font-weight: 700; font-size: .95rem; line-height: 1.1; }
.bigch .ds { font-size: .74rem; color: var(--muted); line-height: 1.25; flex: 1; }
.bigch .rr { font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rc); }
.bigch.flip { animation: flipin calc(.45s * var(--speed)) var(--ease-out) both; }

/* shop */
.shop { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: .5rem; padding-bottom: .4rem; }
.shop h3 { margin: .2rem 0 .1rem; color: var(--brass-2); font-size: 1.05rem; display: flex; justify-content: space-between; align-items: baseline; }
.shop h3 small { font-family: var(--ui); font-weight: 500; color: var(--muted); font-size: .76rem; }
.offers { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.offer { position: relative; }
.offer .bigch { min-height: 128px; width: 100%; }
.offer .price { position: absolute; right: 8px; bottom: 8px; background: var(--money); color: #2a1b02; font-weight: 900; border-radius: 8px; padding: 2px 7px; font-size: .85rem; }
.offer.sold { opacity: .3; pointer-events: none; }
.offer.cant .price { background: #6b6b6b; color: #ddd; }
.bigch.tip { --rc: var(--chips); background: linear-gradient(170deg, #173f5f, #0b2236); }
.bigch.trick { --rc: #c77dff; background: linear-gradient(170deg, #4a2153, #22102a); }
.pack { display: flex; gap: .5rem; align-items: center; justify-content: center; padding: .6rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.pack .pc { --cw: 62px; --ch: 87px; cursor: pointer; transition: transform .2s var(--ease-out); }
.pack .pc:active { transform: scale(.95); }
.pack.taken { opacity: .35; pointer-events: none; }
.shopbar { display: grid; grid-template-columns: 1fr 1.6fr; gap: .5rem; }
.shopbar button { min-height: 54px; border-radius: 14px; font-size: 1rem; }

/* summary */
.sumgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .6rem 0; }
.sumgrid div { background: var(--panel); border-radius: 12px; padding: .5rem .6rem; }
.sumgrid span { font-size: .7rem; color: var(--muted); display: block; text-transform: uppercase; letter-spacing: .08em; }
.sumgrid b { font-size: 1.05rem; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 70px; margin: .4rem 0 .2rem; }
.bars i { flex: 1; background: linear-gradient(180deg, var(--brass-2), var(--brass)); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.bars i.f { background: linear-gradient(180deg, #ff8a8a, #c62f2f); }
.barlabels { display: flex; gap: 4px; font-size: .62rem; color: var(--muted); } .barlabels span { flex: 1; text-align: center; }
.minicards { display: flex; gap: 3px; justify-content: center; margin: .3rem 0; } .minicards .pc { --cw: 38px; --ch: 54px; }
.chips-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.chips-list span { font-size: .74rem; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .5rem; }

/* detail sheet */
.detail .bigch { min-height: 0; cursor: default; margin-bottom: .6rem; }
.detail .btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .4rem; }
.sandbox-list { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; max-height: 50vh; overflow: auto; }
.sandbox-list button { text-align: left; font-size: .78rem; padding: .5rem; }

@keyframes deal { from { transform: translate(140px, -160px) rotate(25deg); opacity: 0; } to { opacity: 1; } }
@keyframes popup { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.5); } 60% { opacity: 1; transform: translate(-50%, -110%) scale(1.12); }
  100% { opacity: 1; transform: translate(-50%, -105%) scale(1); } }
@keyframes bump { 50% { transform: scale(1.16); } }
@keyframes shake { 20% { transform: rotate(-6deg) scale(1.08); } 45% { transform: rotate(5deg) scale(1.1); } 70% { transform: rotate(-3deg); } }
@keyframes flame { from { transform: scale(1); } to { transform: scale(1.05); } }
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.96); } }
@keyframes slidein { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes flipin { from { transform: perspective(600px) rotateY(90deg); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes pulse { 50% { outline-color: transparent; } }
@keyframes screenshake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, -1px); } 80% { transform: translate(2px, 1px); } }
.shake-screen { animation: screenshake calc(.3s * var(--speed)) linear; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-height: 700px) { :root { --cw: 52px; --ch: 73px; } .rack { min-height: 64px; } .ch, .it, .slot { min-height: 62px; } .total { font-size: 1.6rem; } }
@media (min-height: 780px) { :root { --cw: 66px; --ch: 92px; } .stage .played { gap: .45rem; } .total { font-size: 2.3rem; } }
@media (min-width: 480px) and (min-height: 700px) { :root { --cw: 68px; --ch: 95px; } }
.toast { font-size: 1.5rem; }

/* ================================================================== v2: the table
   Objects, not panels: a leather rail, lit felt, a score dial, chip stacks, framed regulars. */
:root { --bronze: #b98552; --silver: #cfd8e1; --gold: #f0c75a; --leather: #4a2a18; --leather-2: #24130a; --chip-blue: #2a6fd1; --chip-red: #c8242f; --go: #5fe08f; }
body.in-game .topbar { padding: .15rem .55rem; padding-top: max(.15rem, env(safe-area-inset-top)); }
body.in-game .topbar .title { font-size: .98rem; }
body.in-game .topbar button.icon { width: 30px; height: 30px; font-size: .85rem; }
.br-game.play { gap: .4rem; }

/* placard: round + money */
.placard { display: flex; justify-content: space-between; align-items: center; padding: .1rem .25rem 0; }
.placard .rd { display: flex; align-items: baseline; gap: .35rem; }
.placard .lbl { font-size: .8rem; color: var(--muted); }
.placard .rd b { font-family: var(--display); font-size: 1.6rem; line-height: 1; color: var(--brass-2); }
.placard .of { font-size: .8rem; color: var(--muted); }
.placard .hr { align-self: center; font-size: .7rem; font-weight: 800; color: #2a1b02; background: linear-gradient(180deg, #ffe08a, var(--xmult)); padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 0 #8a6420; }
.placard .shopt { font-family: var(--display); font-size: 1.45rem; color: var(--brass-2); }
.cash { display: flex; align-items: center; gap: .35rem; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 3px; }
.cash svg { width: 26px; height: 26px; display: block; }
.cash b { font-size: 1.15rem; font-weight: 800; color: var(--money); }
.twist { font-size: .8rem; color: #ffe7a6; background: linear-gradient(90deg, rgba(255, 204, 51, .18), rgba(255, 204, 51, .04)); border-left: 3px solid var(--xmult);
  padding: .3rem .6rem; border-radius: 0 8px 8px 0; }
.twist b { color: var(--xmult); margin-right: .25rem; }
.nextup { font-size: .82rem; color: var(--muted); padding: 0 .3rem; } .nextup b { color: var(--text); }

/* the regulars: framed portrait cards */
.rack { display: flex; gap: .4rem; align-items: stretch; min-height: 0; }
.chars { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; }
.slot { aspect-ratio: 3 / 4; min-height: 0; border: 1.5px dashed #ffffff22; border-radius: 9px; background: rgba(0, 0, 0, .15); }
.ch { position: relative; aspect-ratio: 3 / 4; min-height: 0; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 2px var(--frame), 0 0 0 3px #0008, 0 5px 12px rgba(0, 0, 0, .5); cursor: pointer; touch-action: none; display: block; }
.ch.r-C { --frame: var(--bronze); } .ch.r-U { --frame: var(--silver); } .ch.r-R { --frame: var(--gold); }
.ch .art, .ch .art svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ch .eff { position: absolute; left: 3px; top: 3px; font: 800 .6rem/1.15 var(--ui); padding: 1px 4px; border-radius: 4px; color: #fff; max-width: calc(100% - 6px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px #0008; }
.ch .eff.m { background: var(--mult); } .ch .eff.c { background: var(--chips); } .ch .eff.x { background: var(--xmult); color: #2a1b02; }
.ch .eff.d { background: var(--money); color: #2a1b02; } .ch .eff.o { background: #000a; }
.ch .plate { position: absolute; left: 0; right: 0; bottom: 0; padding: 9px 2px 3px; text-align: center; font: 700 .64rem/1.05 var(--display); color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .85) 45%); text-shadow: 0 1px 2px #000; }
.ch .plate.long { font-size: .54rem; letter-spacing: -.01em; }
.ch.fire { animation: charfire calc(.36s * var(--speed)) var(--ease-out); }
@keyframes charfire { 30% { transform: translateY(-5px) rotate(-4deg) scale(1.08); box-shadow: 0 0 0 2px var(--frame), 0 0 18px var(--frame); } 65% { transform: rotate(3deg) scale(1.06); } }
.items { display: grid; grid-template-columns: repeat(2, 42px); gap: .3rem; padding-left: .4rem; border-left: 1px solid #ffffff18; align-content: start; }
.items .slot { aspect-ratio: auto; height: 100%; border-radius: 50%/30%; }
.it { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; border: 0; background: none; padding: 0; min-height: 0; }
.it svg { width: 40px; height: 40px; display: block; filter: drop-shadow(0 3px 2px #0009); }
.it .tglyph { width: 34px; height: 44px; display: grid; place-items: center; font-size: 1.25rem; color: #f3e1ff; border-radius: 6px;
  background: linear-gradient(160deg, #6a2f7a, #2a1032); box-shadow: 0 0 0 1.5px #c77dff, 0 3px 6px #0009; }
.it small { font-size: .62rem; color: var(--muted); font-weight: 700; }
.it.armed svg, .it.armed .tglyph { animation: armpulse 1s ease-in-out infinite; }
@keyframes armpulse { 50% { transform: translateY(-4px); filter: drop-shadow(0 0 8px var(--brass-2)); } }

/* the table: leather rail, stitched edge, lamp-lit felt */
.table { flex: 1; min-height: 150px; position: relative; padding: 9px; border-radius: 48% / 26%;
  background: linear-gradient(180deg, #6a3d24, var(--leather) 40%, var(--leather-2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .16), inset 0 -4px 8px rgba(0, 0, 0, .55), 0 10px 26px rgba(0, 0, 0, .55); }
.felt { position: relative; height: 100%; border-radius: 48% / 25%; overflow: hidden;
  background: radial-gradient(58% 52% at 50% 46%, #2f9469 0%, #1d7351 34%, #114d37 68%, #0a3123 100%);
  box-shadow: inset 0 0 0 1.5px rgba(212, 166, 74, .45), inset 0 0 44px rgba(0, 0, 0, .7);
  display: grid; grid-template-columns: 50px minmax(0, 1fr) 50px; align-items: center; }
.felt::before { content: ""; position: absolute; inset: 6px; border-radius: 48% / 25%; border: 1px dashed rgba(255, 255, 255, .13); pointer-events: none; }
.table.hot .felt { animation: lamp calc(.45s * var(--speed)) ease-out 2; }
@keyframes lamp { 50% { filter: brightness(1.28) saturate(1.1); } }
.ring { grid-column: 2; grid-row: 1; justify-self: center; height: calc(100% - 14px); aspect-ratio: 1; max-width: 100%; position: relative; }
.dial { width: 100%; height: 100%; display: block; overflow: visible; }
.dial .ticks line { stroke: var(--brass); stroke-width: .7; opacity: .55; }
.dial .trk { fill: rgba(0, 0, 0, .22); stroke: rgba(0, 0, 0, .35); stroke-width: 5.5; }
.dial .arc { fill: none; stroke: var(--brass-2); stroke-width: 5.5; stroke-linecap: round; filter: drop-shadow(0 0 2.5px rgba(240, 207, 134, .7));
  transition: stroke-dasharray calc(.7s * var(--speed)) var(--ease-out), stroke .4s; }
.dial .arc.done { stroke: var(--go); filter: drop-shadow(0 0 3px rgba(95, 224, 143, .8)); }
.cstack { grid-row: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; z-index: 1; }
.s-play { grid-column: 1; } .s-disc { grid-column: 3; }
.cstack .cks { position: relative; width: 36px; height: 46px; }
.ck { position: absolute; left: 0; bottom: calc(var(--i) * 6px); width: 36px; height: 13px; border-radius: 50%; box-shadow: 0 2px 0 rgba(0, 0, 0, .55); }
.ck.blue { background: radial-gradient(ellipse at 50% 50%, var(--chip-blue) 0 46%, transparent 48%), repeating-conic-gradient(var(--chip-blue) 0 26deg, #f4efe2 26deg 38deg); }
.ck.red { background: radial-gradient(ellipse at 50% 50%, var(--chip-red) 0 46%, transparent 48%), repeating-conic-gradient(var(--chip-red) 0 26deg, #f4efe2 26deg 38deg); }
.cstack b { font-size: 1.15rem; font-weight: 900; line-height: 1.1; }
.s-play b { color: #8ec0ff; } .s-disc b { color: #ff9a9a; }
.cstack small { font-size: .62rem; color: var(--muted); }
.ringin { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; z-index: 2; }
.ringin > * { display: none; }
.m-idle .rl, .m-idle .rscore, .m-idle .rt, .m-idle .preview { display: block; }
.m-sel .handname, .m-sel .preview { display: block; } .m-sel .calc { display: grid; }
.m-score .handname, .m-score .total { display: block; } .m-score .played { display: flex; } .m-score .calc { display: grid; }
.ringin .rl { font-size: .74rem; color: var(--muted); letter-spacing: .03em; }
.ringin .rscore { font: 900 clamp(1.9rem, 9vw, 2.7rem)/1.05 var(--ui); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); font-variant-numeric: tabular-nums; }
.ringin .rt { font-size: .82rem; color: var(--muted); } .ringin .rt b { color: var(--text); }
.ringin .preview { font-size: .78rem; color: var(--muted); margin-top: .35rem; min-height: 0; }
.m-sel .preview { margin-top: .4rem; }
.preview .est { font-size: 1.05rem; color: var(--text); } .preview .est b { font-weight: 900; }
.preview .clr { display: inline-block; margin-left: .4rem; font-size: .7rem; font-weight: 800; color: #08301b; background: var(--go); padding: 2px 7px; border-radius: 999px; vertical-align: 2px; }
.ringin .handname { margin: 0 0 .35rem; font-size: 1.2rem; min-height: 0; }
.ringin .handname small { margin-left: .35rem; }
.ringin .played { gap: .3rem; justify-content: center; margin: 0 0 .45rem; }
.ringin .played .pc { --cw: 50px; --ch: 70px; }
.ringin .calc { max-width: 200px; margin: 0; gap: .3rem; }
.ringin .calc .box { font-size: 1.12rem; padding: .18rem .45rem; }
.ringin .total { font-size: 2rem; margin-top: .3rem; min-height: 0; }

/* hand tools + deck */
.handtools { padding: 0 .1rem; }
.minideck { display: flex; align-items: center; gap: .35rem; }
.minideck .back { --cw: 20px; --ch: 28px; border-radius: 3px; box-shadow: 0 0 0 1.5px #fbf7ee inset, 2px 2px 0 #3a0e10, 3px 3px 0 #2a0a0c; }
.minideck span { font-weight: 800; color: var(--text); } .minideck small { font-size: .72rem; }
.handtools .tools { display: flex; gap: .3rem; }

/* buttons: waiting looks calm, never broken */
.actions button:disabled { background: transparent !important; color: rgba(255, 255, 255, .42) !important; border: 1.5px solid rgba(255, 255, 255, .16) !important; box-shadow: none !important; opacity: 1; }
.actions .playbtn.go { animation: gopulse 1.4s ease-in-out infinite; }
@keyframes gopulse { 50% { box-shadow: 0 3px 0 #8a6420, 0 0 22px rgba(95, 224, 143, .55); } }

/* big cards (pick, shop, details) with portraits */
.bigch { padding: 0; overflow: hidden; display: flex; flex-direction: column; gap: 0; border-width: 0; position: relative;
  box-shadow: 0 0 0 2px var(--frame, var(--rc)), 0 8px 18px rgba(0, 0, 0, .45); }
.bigch.r-C { --frame: var(--bronze); } .bigch.r-U { --frame: var(--silver); } .bigch.r-R { --frame: var(--gold); }
.bigch.tip { --frame: var(--chip-blue); } .bigch.trick { --frame: #c77dff; }
.bigch .art { height: 84px; flex: none; position: relative; background: #000; }
.bigch .art svg { width: 100%; height: 100%; display: block; }
.bigch .itemart { display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .12), transparent 60%); }
.bigch.tip .itemart { background: radial-gradient(circle at 50% 45%, #2b5f99, #0b2236 70%); }
.bigch.trick .itemart { background: radial-gradient(circle at 50% 45%, #6a2f7a, #22102a 70%); }
.bigch .itemart svg { width: 58px; height: 58px; filter: drop-shadow(0 4px 4px #000a); }
.bigch .tglyph { font-size: 2.4rem; color: #f3e1ff; text-shadow: 0 3px 8px #000; }
.bigch .body { padding: .45rem .55rem .6rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.bigch .rr { color: var(--frame); }
.bigch .now { color: var(--frame); }
.pickrow .bigch .art { height: 96px; }
.detail .bigch .art { height: 150px; }
.offer .bigch { min-height: 0; height: 100%; }
.offers { align-items: stretch; }
.offer .price { position: absolute; right: 6px; top: 64px; bottom: auto; background: #f4efe2; color: #2a1b02; font-weight: 900; font-size: .9rem;
  padding: 3px 9px 3px 15px; border-radius: 3px; transform: rotate(-5deg);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); box-shadow: none; filter: drop-shadow(0 2px 2px #0008); }
.offer .price::before { content: ""; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #7a5a2a; }
.offer.cant .price { background: #9a9488; color: #2a2418; }

/* the dealer's receipt (round results) */
.overlay .box.receipt { background: #f6f1e4; color: #2a2418; border: 0; border-radius: 6px 6px 0 0; padding: 1.3rem 1.2rem 1.6rem; position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6); overflow: visible; }
.overlay .box.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background: linear-gradient(-45deg, transparent 7px, #f6f1e4 0) 0 0 / 14px 10px, linear-gradient(45deg, transparent 7px, #f6f1e4 0) 0 0 / 14px 10px; }
.receipt .kicker { color: #8a5a10; }
.receipt h2 { color: #123a2b; }
.receipt .big-score { color: #123a2b; }
.receipt .sub { color: #6b6253; }
.receipt .paylines li { border-bottom: 1px dashed #c9bfa8; }
.receipt .paylines li b { color: #8a5a10; }
.receipt .paylines li.tot { border-top: 2px solid #2a2418; border-bottom: 0; margin-top: .2rem; }
.receipt .levelup { background: #e3eefb; border-color: #9cc0ea; color: #1d3a5f; } .receipt .levelup b { color: #1f5fbf; }
.receipt .stamp { position: absolute; right: 14px; top: 14px; transform: rotate(9deg); border: 2.5px solid #2e9d55; color: #2e9d55; font: 900 .8rem/1 var(--ui);
  padding: 5px 8px; border-radius: 6px; opacity: .85; }

/* hub: a table seen from above */
.br-hero .fan { width: 230px; height: 118px; margin-bottom: 2.1rem; }
.br-hero .fan::before { content: ""; position: absolute; left: -24px; right: -24px; top: 22px; bottom: -18px; border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 45%, #2f9469, #114d37 75%); box-shadow: 0 0 0 7px var(--leather), 0 0 0 8px #0008, 0 14px 30px rgba(0, 0, 0, .6); }
.mode-btn { background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .42)); }
.mode-btn .ic { width: 40px; height: 54px; display: grid; place-items: center; border-radius: 6px; background: #fbf7ee; color: var(--ink-black);
  font-size: 1.5rem; box-shadow: 0 3px 8px #0008; transform: rotate(-6deg); }
@media (max-height: 700px) { .cstack .cks { height: 36px; } .ck { bottom: calc(var(--i) * 4px); } .ringin .rscore { font-size: 1.8rem; } }

.bigch .art.framed { display: flex; justify-content: center; align-items: flex-end; padding-top: 8px;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--pbg) 70%, #fff 8%), color-mix(in srgb, var(--pbg) 45%, #000) 80%); }
.bigch .art.framed svg { width: auto; height: 100%; border-radius: 4px 4px 0 0; box-shadow: 0 0 0 2px var(--frame), 0 -2px 12px rgba(0, 0, 0, .5); }
.offer .bigch .art, .pickrow .bigch .art { height: 104px; }
.ch .plate { hyphens: auto; -webkit-hyphens: auto; }

/* ================================================================== v3: clarity
   Multipliers you can't miss, the score-to-beat always in view, Trick mode, hint bubbles. */
/* × regulars: gold badge, gold glow; + regulars keep a plain badge */
.ch .eff.x { font-size: .78rem; padding: 1px 6px; background: linear-gradient(180deg, #ffe58a, #f0b82e); color: #2a1b02; box-shadow: 0 0 0 1px #8a6420, 0 2px 6px rgba(0, 0, 0, .6); }
.ch.k-x { box-shadow: 0 0 0 2px var(--frame), 0 0 0 3px #0008, 0 0 14px rgba(255, 204, 51, .45), 0 5px 12px rgba(0, 0, 0, .5); }
.ch.wrong { animation: wrongpulse 1s ease-in-out infinite; }
@keyframes wrongpulse { 50% { box-shadow: 0 0 0 3px var(--xmult), 0 0 22px rgba(255, 204, 51, .9); transform: translateY(-3px); } }

/* score to beat: stays in the dial while you pick and score */
.ringin .need { font-size: .78rem; color: var(--muted); margin-top: .45rem; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .35); }
.ringin .need b { color: var(--text); } .ringin .need .ok { color: var(--go); font-weight: 800; }
.m-sel .need, .m-score .need { display: block; }
.m-score .need { margin-top: .5rem; }

/* Trick mode */
.m-trick .handname, .m-trick .preview, .m-trick .need { display: block; }
.m-trick .handname { color: #e2b8ff; }
.m-trick .preview { max-width: 220px; font-size: .8rem; line-height: 1.35; }
.m-trick .preview .pick { display: inline-block; margin-top: .35rem; color: #f3e1ff; font-size: .9rem; }
.m-trick .preview .warn { color: #ff9a9a; font-weight: 800; }
.m-trick .felt { box-shadow: inset 0 0 0 2px rgba(199, 125, 255, .6), inset 0 0 44px rgba(0, 0, 0, .7); }
.it.armed .tglyph { box-shadow: 0 0 0 2.5px #f3e1ff, 0 0 16px #c77dff; }

/* hint bubbles */
.br-coach { position: fixed; z-index: 55; background: #fbf7ee; color: #1d2a24; border-radius: 14px; padding: .7rem .8rem .6rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 2px var(--brass); font-size: .9rem; line-height: 1.35; animation: coachin .25s var(--ease-pop); }
.br-coach .br-cmsg b { color: #0f4a35; }
.br-coach .br-cbtns { display: flex; gap: .4rem; margin-top: .55rem; align-items: center; flex-wrap: wrap; }
.br-coach .br-cbtns button { color: #1d2a24; border-color: #c9bfa8; background: #fff; padding: .35em .8em; }
.br-coach .br-cbtns button.primary { background: linear-gradient(180deg, var(--brass-2), var(--brass)); border: 0; }
.br-coach .br-cbtns button.ghost { background: none; border: 0; color: #6b6253; margin-left: auto; text-decoration: underline; padding: .35em .2em; }
.br-coach .br-carrow { position: absolute; bottom: -7px; width: 14px; height: 14px; margin-left: -7px; background: #fbf7ee; transform: rotate(45deg);
  box-shadow: 2px 2px 0 0 var(--brass); }
.br-coach.below .br-carrow { bottom: auto; top: -7px; box-shadow: -2px -2px 0 0 var(--brass); }
@keyframes coachin { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.hand .pc.suggest { box-shadow: 0 0 0 3px var(--go), 0 0 18px rgba(95, 224, 143, .8); animation: suggestbob 1.2s ease-in-out infinite; }
@keyframes suggestbob { 50% { transform: translateY(-8px); } }
.hand .pc.suggest.sel { animation: none; }
.br-coach .br-cmsg { color: #1d2a24; display: block; font-size: .9rem; }
.br-coach .br-cmsg b { display: inline; font: inherit; font-weight: 800; }
.actions button.suggest { animation: btnhint 1.1s ease-in-out infinite; }
@keyframes btnhint { 50% { box-shadow: 0 3px 0 #8a6420, 0 0 0 4px rgba(95, 224, 143, .6), 0 0 24px rgba(95, 224, 143, .7); } }

/* opening pick: framed portrait cards as buttons */
.pickbtn { padding: 0; border: 0; background: none; text-align: left; border-radius: 14px; display: flex; min-width: 0; }
.pickbtn .bigch { width: 100%; cursor: pointer; transition: transform .15s var(--ease-out); }
.pickbtn:active .bigch { transform: scale(.96); }
.pickrow .bigch .body { padding: .45rem .5rem .55rem; }
.pickrow .bigch .nm { font-size: .9rem; }
.pickrow .bigch .ds { font-size: .74rem; }
@media (min-width: 560px) { .pickrow .bigch .art { height: 120px; } }

/* ================================================================== v4: progression */
.chars { grid-template-columns: repeat(var(--slots, 5), minmax(0, 1fr)); }
/* editions: a finish over the portrait */
.ch.ed-foil .art::after, .bigch.ed-foil .art::after, .ch.ed-holo .art::after, .bigch.ed-holo .art::after, .ch.ed-gilded .art::after, .bigch.ed-gilded .art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; background-size: 250% 250%; animation: sheen 3.5s linear infinite; }
.ed-foil .art::after { background-image: linear-gradient(115deg, transparent 30%, rgba(210, 225, 245, .55) 45%, transparent 60%); }
.ed-holo .art::after { background-image: linear-gradient(115deg, rgba(255, 0, 128, .22), rgba(255, 220, 0, .22), rgba(0, 255, 160, .22), rgba(0, 140, 255, .22), rgba(200, 0, 255, .22)); }
.ed-gilded .art::after { background-image: linear-gradient(115deg, transparent 25%, rgba(255, 214, 90, .65) 45%, transparent 65%); }
.ch.ed-gilded { box-shadow: 0 0 0 2px var(--gold), 0 0 0 3px #0008, 0 0 16px rgba(255, 204, 51, .55), 0 5px 12px rgba(0, 0, 0, .5); }
@keyframes sheen { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.ch .edtag { position: absolute; left: 50%; bottom: 21px; transform: translateX(-50%); font: 800 .5rem/1 var(--ui); padding: 2px 5px; border-radius: 999px; background: rgba(0, 0, 0, .75); color: #fff; letter-spacing: .03em; text-transform: uppercase; z-index: 1; white-space: nowrap; }
.ch.ed-gilded .edtag { background: var(--gold); color: #2a1b02; } .ch.ed-holo .edtag { background: linear-gradient(90deg, #ff4fa3, #ffd34f, #4fffb0, #4fb0ff); color: #1a1a1a; }
.bigch .edline { color: var(--xmult); }

/* family chips */
.famchip { display: inline-grid; place-items: center; flex: none; }
.famchip svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45)); }

/* the house tip choice (on the receipt and before the shop) */
.tipchoice { margin: .8rem 0 .6rem; }
.tchead { text-align: center; font-size: .9rem; margin-bottom: .5rem; }
.tcrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.tcopt { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .6rem .3rem .55rem; border-radius: 12px; text-align: center;
  background: #fff; border: 1.5px solid #d9cfb8; color: #1d2a24; transition: transform .15s var(--ease-out); }
.tcopt:active:not(:disabled) { transform: scale(.96); }
.tcopt b { font-family: var(--display); font-size: .98rem; margin-top: .15rem; }
.tcopt small { font-size: .72rem; color: #6b6253; }
.tcopt .tcnum { font-size: .68rem; color: #6b6253; } .tcopt .tcnum b { font-family: var(--ui); font-size: .7rem; color: #123a2b; }
.tcopt .tcm { font-size: .68rem; font-weight: 900; color: #2a1b02; background: linear-gradient(180deg, #ffe58a, #f0b82e); padding: 2px 6px; border-radius: 999px; margin-top: .15rem; }
.tcopt .tcn { font-size: .64rem; color: #8a7a5a; }
.tcopt.picked { border-color: var(--go); box-shadow: 0 0 0 2px var(--go), 0 6px 16px rgba(46, 157, 85, .35); }
.tcopt:disabled:not(.picked) { opacity: .4; }
.overlay .box:not(.receipt) .tcopt { background: rgba(0, 0, 0, .3); border-color: var(--line); color: var(--text); }
.overlay .box:not(.receipt) .tcopt small, .overlay .box:not(.receipt) .tcopt .tcnum { color: var(--muted); }
.overlay .box:not(.receipt) .tcopt .tcnum b { color: var(--text); }
.receipt .tipchoice { border-top: 1px dashed #c9bfa8; padding-top: .7rem; }

/* the hands table */
.famrow { display: flex; gap: .65rem; padding: .6rem 0; border-bottom: 1px solid #ffffff14; }
.fambody { flex: 1; min-width: 0; }
.famtop { display: flex; align-items: center; gap: .45rem; margin-bottom: .2rem; }
.famtop b { font-family: var(--display); font-size: 1.05rem; }
.famtop .lv { font-size: .78rem; font-weight: 800; background: rgba(255, 255, 255, .1); padding: 1px 7px; border-radius: 999px; }
.famtop .mx { font-size: .72rem; font-weight: 900; color: #2a1b02; background: linear-gradient(180deg, #ffe58a, #f0b82e); padding: 1px 7px; border-radius: 999px; }
.famhand { display: flex; justify-content: space-between; font-size: .86rem; padding: 1px 0; }
.famhand i { font-style: normal; font-weight: 800; } .famhand .c { color: #8ec0ff; } .famhand .m { color: #ff9a9a; } .famhand .x { color: var(--xmult); }
.handname .mxs { font-style: normal; color: var(--xmult); font-weight: 800; }

/* shop: perk, owned perks, tip pack */
.perk { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .65rem .8rem; border-radius: 14px;
  background: linear-gradient(135deg, #3b2a0d, #1f1606); border: 1.5px solid var(--brass); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.perk .pk-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffe58a, #b8862a); color: #3a2604; font-size: 1.2rem; }
.perk .pk-t b { font-family: var(--display); font-size: 1rem; color: var(--brass-2); display: block; } .perk .pk-t small { color: var(--muted); }
.perk .pk-p { font-weight: 900; color: #2a1b02; background: #f4efe2; padding: 3px 9px; border-radius: 6px; }
.perk.sold { opacity: .5; } .perk.cant .pk-p { background: #9a9488; }
.owned-perks { display: flex; flex-wrap: wrap; gap: .3rem; } .owned-perks span { font-size: .72rem; color: var(--brass-2); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .5rem; }
.tippack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; padding: .55rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.tippack button { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .45rem .2rem; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.tippack button b { font-family: var(--display); font-size: .9rem; } .tippack button small { font-size: .7rem; color: var(--muted); }
.tippack.taken { opacity: .35; pointer-events: none; }

/* setup: decks and stakes */
.decks { display: grid; gap: .4rem; }
.deckopt { display: flex; align-items: center; gap: .7rem; text-align: left; padding: .55rem .7rem; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.deckopt b { display: block; font-family: var(--display); } .deckopt small { color: var(--muted); font-size: .78rem; }
.deckopt.on { border-color: var(--brass); box-shadow: 0 0 0 1.5px var(--brass) inset; background: rgba(212, 166, 74, .12); }
.deckopt:disabled { opacity: .55; }
.dk { flex: none; width: 30px; height: 42px; border-radius: 4px; box-shadow: 0 0 0 2px #fbf7ee inset, 2px 2px 0 #0006; }
.dk-classic { background: repeating-linear-gradient(45deg, #7a1f22 0 4px, #6a1a1d 4px 8px); }
.dk-red { background: repeating-linear-gradient(45deg, #d93a3a 0 4px, #b82a2a 4px 8px); }
.dk-blue { background: repeating-linear-gradient(45deg, #2a6fd1 0 4px, #1f55a5 4px 8px); }
.dk-gold { background: repeating-linear-gradient(45deg, #e8c460 0 4px, #c99a2e 4px 8px); }
.dk-twotone { background: linear-gradient(135deg, #c8242f 50%, #1b1b1f 50%); }
.dk-nofaces { background: repeating-linear-gradient(0deg, #6b6b6b 0 4px, #555 4px 8px); }
.stakes { display: flex; gap: .5rem; }
.stakeopt { width: 46px; height: 46px; border-radius: 50%; padding: 0; display: grid; place-items: center; }
.stakeopt i { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 2px 0 #0007; }
.stakeopt.s1 i { background: #f4efe2; } .stakeopt.s2 i { background: #c8242f; } .stakeopt.s3 i { background: #2e9d55; } .stakeopt.s4 i { background: #1b1b1f; border: 2px solid #777; } .stakeopt.s5 i { background: linear-gradient(180deg, #ffe58a, #c99a2e); }
.stakeopt.on { box-shadow: 0 0 0 2.5px var(--brass-2); }
.stakeopt:disabled { opacity: .3; }

/* history */
ol.history { list-style: none; padding: 0; margin: 0 0 .6rem; }
ol.history li { display: grid; grid-template-columns: 52px 1fr; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid #ffffff12; align-items: center; }
ol.history .hd { font-weight: 900; color: var(--brass-2); text-align: center; }
.btns2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .6rem; }
.btnlink { display: grid; place-items: center; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: .6em .5em; color: var(--text); text-decoration: none; font-size: .95rem; }
