/* ===== Games menu ===== */
.games-sheet{max-height:92dvh;overflow-y:auto}
.gm-head{display:flex;align-items:center;gap:6px}.gm-head h3{margin:0}
#gmBack{width:34px;height:34px}
.gm-list{display:flex;flex-direction:column;gap:8px}
.gm-card,.gm-live{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--surface2);border-radius:18px;padding:12px 14px;color:var(--text);font:inherit;transition:transform .15s var(--ease),background .15s}
.gm-card:active{transform:scale(.98)}
.gm-live{background:linear-gradient(135deg,rgba(79,107,255,.16),rgba(240,108,155,.16))}
.gm-ic{width:46px;height:46px;border-radius:14px;background:var(--surface);display:flex;align-items:center;justify-content:center;font-size:26px;flex-shrink:0;box-shadow:var(--sh1)}
.gm-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.gm-t b{font-size:16px}.gm-t span{font-size:13px;color:var(--sub);line-height:1.3}
.gm-ppl{font-size:11.5px;font-weight:700;color:var(--sub);white-space:nowrap}
.gm-go{background:var(--grad);color:#fff;border-radius:999px;padding:6px 14px;font-weight:700;font-size:14px}
.gm-setup{display:flex;flex-direction:column;gap:12px}
#gmBots button,#tlBots button{min-width:34px;padding:7px 10px}
/* chat banner */
#tbBanner{display:flex;align-items:center;gap:10px;margin:8px 12px 0;padding:9px 12px;border-radius:16px;background:linear-gradient(135deg,rgba(79,107,255,.14),rgba(47,179,122,.14));font-size:14px;font-weight:600}
#tbBanner.hidden{display:none}#tbBanner span:nth-child(2){flex:1}

/* ===== The table ===== */
#table{position:fixed;inset:0;z-index:85;background:radial-gradient(120% 90% at 50% 20%,#2c6b52,#173b30);color:#fff;display:flex;flex-direction:column;overflow:hidden}
#table.hidden{display:none}
.tb-head{display:flex;align-items:center;gap:10px;padding:calc(10px + var(--sat)) 12px 8px}
.tb-head .icon{background:rgba(255,255,255,.14);color:#fff}
.tb-title{display:flex;flex-direction:column;min-width:0}.tb-title b{font-size:17px}
.tb-turn{font-size:13px;opacity:.85;font-weight:600}.tb-turn.mine{color:#ffd166;opacity:1;animation:tbpulse 1.6s ease-in-out infinite}.tb-turn.over{color:#ffd166;opacity:1}
@keyframes tbpulse{50%{opacity:.6}}
.tb-board{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:6px 10px calc(12px + var(--sab));position:relative}
#table .g-panel{background:rgba(10,30,24,.45)}
.tl-seats{display:flex;flex-direction:column;gap:6px;text-align:left}
.tl-seat{display:flex;align-items:center;gap:10px;background:var(--surface2);border-radius:14px;padding:9px 12px;font-weight:600}
.tl-seat.bot{opacity:.85}.tl-seat.empty{opacity:.55;font-weight:500;font-size:13.5px;border:1.5px dashed var(--line);background:transparent;justify-content:center}
.tl-em{font-size:20px}.tl-host{margin-left:auto;font-size:11.5px;color:var(--sub);text-transform:uppercase;font-weight:700;letter-spacing:.05em}
.to-row{display:flex;align-items:center;gap:10px;background:var(--surface2);border-radius:14px;padding:9px 12px;font-weight:600}
.to-row em{font-style:normal;width:26px;text-align:center;font-size:18px}.to-row span{flex:1}.to-row.me{box-shadow:inset 0 0 0 2px var(--accent)}
.hidden{display:none!important}

/* ===== Crownfall ===== */
.cf-wrap{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;max-width:min(560px,calc(100dvh - 210px))}
.cf-side{display:flex;align-items:center;gap:10px;width:100%;font-weight:700;font-size:14.5px;min-height:30px;padding:4px 8px;border-radius:12px;transition:background .2s}
.cf-side.active{background:rgba(255,255,255,.12)}.cf-side em{font-style:normal;color:#ffd166;font-size:12.5px;margin-left:4px}
.cf-dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:6px;vertical-align:-1px;box-shadow:0 0 0 2px rgba(255,255,255,.5)}.cf-dot.w{background:#fff8ee}.cf-dot.b{background:#2b2f3a}
.cf-taken{display:flex;align-items:center;flex-wrap:wrap;margin-left:auto}.cf-taken .cf-pc{width:20px;height:20px;margin-left:-6px}.cf-taken b{margin-left:6px;font-size:12.5px;opacity:.9}
.cf-board-wrap{position:relative;width:100%;aspect-ratio:1}
.cf-board{display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);width:100%;height:100%;border-radius:14px;overflow:hidden;box-shadow:0 0 0 6px #6b4a2e,0 0 0 8px #3e2a19,0 18px 40px rgba(0,0,0,.45)}
.cf-sq{position:relative;border:0;padding:0;border-radius:0;display:flex;align-items:center;justify-content:center;background:#f2e3c6;cursor:pointer}
.cf-sq.dk{background:#b98a5e}
.cf-sq.last{box-shadow:inset 0 0 0 100px rgba(255,214,102,.38)}
.cf-sq.sel{box-shadow:inset 0 0 0 100px rgba(79,170,255,.45)}
.cf-sq.check{background:radial-gradient(circle,#ff5a5f 0,#e5484d 45%,transparent 75%),#b98a5e}
.cf-sq.dot::after{content:"";width:28%;height:28%;border-radius:50%;background:rgba(30,40,60,.32)}
.cf-sq.hit::after{content:"";position:absolute;inset:5%;border-radius:50%;box-shadow:inset 0 0 0 5px rgba(30,40,60,.32)}
.cf-pc{width:88%;height:88%;pointer-events:none;position:relative;z-index:1;filter:drop-shadow(0 2px 1.5px rgba(0,0,0,.35))}
.cf-pc.lt{fill:#fffaf1;stroke:#3a2f24;stroke-width:1.6;stroke-linejoin:round}
.cf-pc.dk{fill:#2b2f3a;stroke:#0d0f14;stroke-width:1.6;stroke-linejoin:round}
.cf-pc.dk .eye{fill:#fffaf1;stroke:none}.cf-pc.lt .eye{fill:#3a2f24;stroke:none}
.cf-pc .cut{fill:none;stroke-linecap:round;stroke-width:2}.cf-pc.dk .cut{stroke:#fffaf1}
.cf-rk,.cf-fl{position:absolute;font-style:normal;font-size:10px;font-weight:700;opacity:.6;color:#3a2f24;pointer-events:none}.cf-rk{left:3px;top:2px}.cf-fl{right:3px;bottom:1px}
.cf-promo{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:rgba(10,20,15,.65);border-radius:14px;z-index:3}
.cf-promo-t{font-weight:800;font-size:18px}.cf-promo-row{display:flex;gap:8px}
.cf-promo-row button{display:flex;flex-direction:column;align-items:center;gap:2px;background:#fff;color:#222;border-radius:14px;padding:8px 6px;width:72px;font-weight:700;font-size:12px}.cf-promo-row .cf-pc{width:48px;height:48px}
.cf-tools{display:flex;justify-content:flex-end;width:100%}.cf-tools .ghost{color:#fff;border-color:rgba(255,255,255,.3);background:transparent}

/* ===== Vine Climb ===== */
.vc-wrap{display:flex;flex-direction:column;gap:8px;width:100%;max-width:min(560px,calc(100dvh - 250px));align-items:center}
.vc-players{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.vc-p{display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.12);border-radius:999px;padding:4px 10px;font-size:13px;font-weight:600}
.vc-p.on{background:#fff;color:#1d3d2f}.vc-p i{width:12px;height:12px;border-radius:50%}.vc-p b{opacity:.75;font-size:12px}
.vc-board{position:relative;width:100%;aspect-ratio:1;border-radius:16px;overflow:hidden;box-shadow:0 0 0 5px #5b3a1f,0 18px 40px rgba(0,0,0,.4)}
.vc-grid{position:absolute;inset:0;display:grid;grid-template-columns:repeat(10,1fr);grid-template-rows:repeat(10,1fr)}
.vc-cell{position:relative;background:#a8d672;display:flex;align-items:flex-start;justify-content:flex-start;padding:2px 3px}
.vc-cell.b{background:#8cc65c}.vc-cell span{position:relative;z-index:1;font-size:clamp(8px,1.9vmin,12px);font-weight:800;color:rgba(20,60,30,.75);text-shadow:0 0 3px rgba(255,255,255,.8)}
.vc-cell.goal{background:#ffd166}.vc-cell.goal span{font-size:clamp(12px,3vmin,20px)}.vc-cell.start{background:#ffe7a8}
.vc-ban{position:absolute;right:8%;bottom:8%;width:42%;height:42%}
.vc-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.vc-slide-o{fill:none;stroke:rgba(80,20,40,.3);stroke-width:3.2;stroke-linecap:round}
.vc-slide{fill:none;stroke:url(#vcs);stroke-width:2.3;opacity:.92;stroke-linecap:round}
.vc-slide-s{fill:none;stroke:rgba(255,255,255,.55);stroke-width:.7;stroke-dasharray:1.2 1.6;stroke-linecap:round}
.vc-slide-top{fill:#fff;stroke:#f06c9b;stroke-width:.8}
.vc-vine-o{fill:none;stroke:#1f5f2a;stroke-width:2.4;stroke-linecap:round}
.vc-vine{fill:none;stroke:#3fa34d;stroke-width:1.4;stroke-linecap:round}
.vc-leaf{fill:#2f8f3f}.vc-flower{fill:#ff8fb1;stroke:#fff;stroke-width:.5}
.vc-tokens{position:absolute;inset:0;pointer-events:none}
.vc-tok{position:absolute;width:7.6%;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2.5px #fff,0 4px 10px rgba(0,0,0,.35);transition:left .16s ease,top .16s ease;z-index:2}
.vc-tok img{width:70%;height:70%}
.vc-tok.turn{box-shadow:0 0 0 2.5px #fff,0 0 0 5px #ffd166,0 4px 10px rgba(0,0,0,.35);z-index:3}
.vc-tok.hopping{animation:vchop .17s ease}
@keyframes vchop{50%{transform:translate(-50%,-85%)}}
.vc-tok.climb{transition:left .75s cubic-bezier(.3,.1,.3,1),top .75s cubic-bezier(.3,.1,.3,1)}
.vc-tok.slide{transition:left .7s cubic-bezier(.5,0,.8,.6),top .7s cubic-bezier(.5,0,.8,.6)}
.vc-bottom{display:flex;align-items:center;gap:12px;width:100%}
.vc-msg{flex:1;font-weight:600;font-size:14.5px;min-height:20px}
.vc-roll{display:flex;align-items:center;gap:10px;background:#fff;color:#1d3d2f;border-radius:18px;padding:8px 18px 8px 8px;font-weight:800;font-size:17px;box-shadow:0 6px 0 #c9b28a,0 10px 20px rgba(0,0,0,.25)}
.vc-roll:disabled{opacity:.55;box-shadow:0 3px 0 #c9b28a}.vc-roll.ready{animation:vcready 1.2s ease-in-out infinite}
@keyframes vcready{50%{transform:translateY(-3px)}}
.vc-die{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;width:42px;height:42px;padding:6px;border-radius:10px;background:#fff8ee;box-shadow:inset 0 0 0 1.5px #e5d4b4}
.vc-die i{border-radius:50%}.vc-die i.on{background:#2b2f3a}
.vc-die.spin{animation:vcspin .45s linear infinite}.vc-die.land{animation:vcland .35s ease}
@keyframes vcspin{to{transform:rotate(360deg)}}@keyframes vcland{0%{transform:scale(1.3) rotate(-20deg)}100%{transform:none}}

/* ===== Rainbow Rush ===== */
.rr-wrap{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;height:100%;max-width:760px;justify-content:space-between}
.rr-opps{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;width:100%}
.rr-opp{display:flex;flex-direction:column;align-items:center;gap:2px;background:rgba(255,255,255,.1);border-radius:16px;padding:8px 10px;min-width:84px;transition:background .2s,transform .2s}
.rr-opp.on{background:rgba(255,255,255,.95);color:#173b30;transform:translateY(2px)}.rr-opp.one .rr-cnt{color:#ff5a5f;font-weight:800}
.rr-av{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #fff}.rr-av img{width:70%}
.rr-nm{font-weight:700;font-size:13px;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rr-cnt{font-size:11.5px;opacity:.8}
.rr-fan{position:relative;height:26px;width:60px;display:flex;justify-content:center}.rr-fan .rr-back{position:absolute;transform-origin:50% 120%}
.rr-mid-area{position:relative;display:flex;align-items:center;justify-content:center;gap:26px;flex:1;min-height:150px}
.rr-deck{background:none;padding:0;border-radius:14px}.rr-deck.ready{animation:vcready 1.2s ease-in-out infinite}
.rr-pile{position:relative;width:96px;height:140px}.rr-pile .rr-card{position:absolute;inset:0}
.rr-colour{position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);font-size:12px;font-weight:800;padding:3px 10px;border-radius:999px;background:#fff;color:#222;box-shadow:0 3px 8px rgba(0,0,0,.25)}
.rr-colour.c-r{background:#ef4a5a;color:#fff}.rr-colour.c-y{background:#f6b928}.rr-colour.c-g{background:#2fb37a;color:#fff}.rr-colour.c-b{background:#3d8bff;color:#fff}
.rr-dir{position:absolute;top:-8px;right:calc(50% - 120px);font-size:26px;opacity:.5;animation:rrspin 6s linear infinite}.rr-dir.rev{animation-direction:reverse}
@keyframes rrspin{to{transform:rotate(360deg)}}
.rr-card{position:relative;width:96px;height:140px;border-radius:14px;border:0;padding:0;color:#fff;box-shadow:0 0 0 3px #fff inset,0 6px 14px rgba(0,0,0,.35);display:block;flex-shrink:0;cursor:pointer;transition:transform .18s var(--ease),filter .18s}
.rr-card.c-r{background:linear-gradient(160deg,#ff6b78,#d93848)}.rr-card.c-y{background:linear-gradient(160deg,#ffcf55,#e6a114);color:#5a3d00}.rr-card.c-g{background:linear-gradient(160deg,#4fd19a,#1f9a63)}.rr-card.c-b{background:linear-gradient(160deg,#6aa8ff,#2f6fe0)}
.rr-card.c-w{background:conic-gradient(from 45deg,#ef4a5a 0 25%,#3d8bff 0 50%,#2fb37a 0 75%,#f6b928 0);}
.rr-card.c-w::before{content:"";position:absolute;inset:7px;border-radius:9px;background:#22252e}
.rr-mid{position:absolute;inset:16% 14%;border-radius:18px;background:rgba(255,255,255,.95);display:flex;align-items:center;justify-content:center;transform:rotate(-8deg);box-shadow:0 2px 0 rgba(0,0,0,.08)}
.rr-card.c-w .rr-mid{background:transparent;box-shadow:none}
.rr-num{font-size:48px;font-weight:900;line-height:1;transform:rotate(8deg)}.rr-num.sm{font-size:36px}
.c-r .rr-num,.c-r .rr-ic{color:#d93848}.c-y .rr-num,.c-y .rr-ic{color:#d99400}.c-g .rr-num,.c-g .rr-ic{color:#1f9a63}.c-b .rr-num,.c-b .rr-ic{color:#2f6fe0}
.rr-ic{width:58%;height:58%;transform:rotate(8deg)}.rr-ic.wheel{width:70%;height:70%}
.rr-plus{position:absolute;bottom:4px;right:6px;font-size:22px;font-weight:900;color:#fff;transform:rotate(8deg);text-shadow:0 2px 0 rgba(0,0,0,.35)}
.rr-corner{position:absolute;font-weight:900;font-size:15px;line-height:1;z-index:1;text-shadow:0 1px 0 rgba(0,0,0,.2)}.rr-corner.tl{top:7px;left:8px}.rr-corner.br{bottom:7px;right:8px;transform:rotate(180deg)}
.rr-back{width:96px;height:140px;border-radius:14px;background:radial-gradient(circle at 50% 120%,#ef4a5a 0 18%,#f6b928 0 28%,#2fb37a 0 38%,#3d8bff 0 48%,#22252e 0);box-shadow:0 0 0 3px #fff inset,0 6px 14px rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center}
.rr-back span{font-weight:900;color:#fff;font-size:24px;letter-spacing:-.04em;transform:rotate(-8deg)}
.rr-back.mini{width:18px;height:26px;border-radius:4px;box-shadow:0 0 0 1.5px #fff inset}.rr-back.mini span{display:none}
.rr-pile .rr-card.land{animation:rrland .28s var(--ease)}
@keyframes rrland{0%{transform:scale(1.25) rotate(-12deg);opacity:.4}}
.rr-status{font-weight:700;font-size:15px;text-align:center;min-height:20px}
.rr-actions{display:flex;gap:8px;justify-content:center;min-height:0}
.rr-actions button{border-radius:999px;padding:9px 16px;font-weight:800}
.rr-call{background:#fff;color:#222;box-shadow:0 4px 0 #c9c9c9}.rr-call.on{background:linear-gradient(90deg,#ef4a5a,#f6b928,#2fb37a,#3d8bff);color:#fff;box-shadow:0 0 0 3px #fff}
.rr-catch{background:#ffd166;color:#3a2f00;animation:vcready .8s ease-in-out infinite}
.rr-keep{color:#fff;border-color:rgba(255,255,255,.4);background:transparent}
.rr-hand{display:flex;justify-content:center;width:100%;padding:18px 6px 14px;overflow-x:auto;overflow-y:visible;scrollbar-width:none}
.rr-hand .rr-card{margin:0 -14px;transform:translateY(4px)}
.rr-hand.many .rr-card{margin:0 -26px}
.rr-hand .rr-card.ok{transform:translateY(-6px);z-index:1}.rr-hand .rr-card.no{filter:brightness(.7) saturate(.7)}
.rr-hand .rr-card.fresh{box-shadow:0 0 0 3px #fff inset,0 0 0 4px #ffd166,0 6px 14px rgba(0,0,0,.35)}
@media (hover:hover){.rr-hand .rr-card.ok:hover{transform:translateY(-16px)}}
.rr-pick{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:rgba(10,30,24,.6);border-radius:18px}
.rr-pick-t{font-weight:800;font-size:20px}.rr-pick-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rr-swatch{width:120px;height:72px;border-radius:18px;font-weight:800;font-size:16px;color:#fff;box-shadow:0 0 0 3px #fff inset,0 6px 14px rgba(0,0,0,.3)}
.rr-swatch.c-r{background:#ef4a5a}.rr-swatch.c-y{background:#f6b928;color:#5a3d00}.rr-swatch.c-g{background:#2fb37a}.rr-swatch.c-b{background:#3d8bff}
.rr-flash{position:absolute;top:38%;left:50%;transform:translateX(-50%);background:#fff;color:#173b30;font-weight:800;padding:10px 18px;border-radius:999px;box-shadow:0 10px 30px rgba(0,0,0,.35);animation:rrflash 1.9s ease forwards;z-index:4;white-space:nowrap}
@keyframes rrflash{0%{opacity:0;transform:translate(-50%,10px) scale(.9)}12%{opacity:1;transform:translate(-50%,0) scale(1)}80%{opacity:1}100%{opacity:0;transform:translate(-50%,-10px)}}
@media (max-width:520px){
  .rr-card,.rr-back{width:70px;height:102px}.rr-pile{width:70px;height:102px}.rr-num{font-size:34px}.rr-num.sm{font-size:26px}.rr-corner{font-size:12px}
  .rr-hand .rr-card{margin:0 -12px}.rr-hand.many .rr-card{margin:0 -22px}.rr-opp{min-width:70px;padding:6px 8px}
}

.vc-nums{pointer-events:none}.vc-num{padding:2px 3px}.vc-num span{font-size:clamp(8px,1.9vmin,12px);font-weight:800;color:rgba(20,60,30,.8);text-shadow:0 0 3px #fff,0 0 2px #fff}

/* ===== Riverstones ===== */
.rs-wrap{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;height:100%;max-width:880px;justify-content:center}
.rs-top{width:100%;display:flex;justify-content:center}
.rs-who{display:flex;align-items:center;gap:7px;font-weight:700;font-size:13.5px;opacity:.92}
.rs-dot{width:14px;height:14px;border-radius:50%;box-shadow:0 0 0 1.5px rgba(255,255,255,.8)}.rs-dot.l{background:#f4ede0}.rs-dot.d{background:#30343e}
.rs-boardbox{width:100%;flex:0 1 auto;display:flex;justify-content:center;min-height:0}
.rs-svg{width:100%;max-height:min(62vh,600px);aspect-ratio:10/7;filter:drop-shadow(0 10px 24px rgba(0,0,0,.35));touch-action:manipulation}
.rs-pt{cursor:default;transition:filter .15s}.rs-pt.go{cursor:pointer;filter:brightness(1.25) drop-shadow(0 0 6px #ffd166)}
.rs-hint{fill:#ffd166;stroke:#fff;stroke-width:3;pointer-events:none;animation:rshint 1s ease-in-out infinite}
@keyframes rshint{50%{opacity:.45}}
.rs-st{stroke-width:2.5;transition:filter .15s}.rs-st.l{fill:url(#rsl);stroke:#b9a98c}.rs-st.d{fill:url(#rsd);stroke:#14161b}
.rs-st.can{cursor:pointer;stroke:#ffd166;stroke-width:4}.rs-st.sel{stroke:#ffd166;stroke-width:6;filter:drop-shadow(0 0 8px #ffd166)}
.rs-n{font-size:24px;font-weight:900;text-anchor:middle;pointer-events:none}.rs-n.l{fill:#5b4a2c}.rs-n.d{fill:#fff}
.rs-off.l{fill:#f4ede0}.rs-off.d{fill:#30343e;stroke:#777;stroke-width:1}
.rs-tray.go{cursor:pointer;fill:#8a5f32;stroke:#ffd166;stroke-width:4;animation:rshint 1s ease-in-out infinite}
.rs-bar{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;flex-wrap:wrap;justify-content:center}
.rs-dice{display:flex;gap:8px}
.rs-die{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;width:44px;height:44px;padding:6px;border-radius:10px;background:#fff8ee;box-shadow:inset 0 0 0 1.5px #e5d4b4,0 4px 0 #c9b28a;animation:vcland .35s ease}
.rs-die i{border-radius:50%}.rs-die i.on{background:#2b2f3a}
.rs-die.dk{background:#2f333d;box-shadow:inset 0 0 0 1.5px #555,0 4px 0 #15171c}.rs-die.dk i.on{background:#fff}
.rs-die.used{opacity:.35;transform:scale(.88)}
.rs-roll{background:#fff;color:#1d3d2f;border-radius:18px;padding:10px 20px;font-weight:800;font-size:17px;box-shadow:0 6px 0 #c9b28a,0 10px 20px rgba(0,0,0,.25);animation:vcready 1.2s ease-in-out infinite}
.rs-roll:disabled{opacity:.6;animation:none}
.rs-undo{color:#fff;border-color:rgba(255,255,255,.4);background:transparent;border-radius:999px;padding:7px 14px;font-weight:700}
.rs-msg{flex:1 1 180px;font-weight:600;font-size:14.5px;text-align:center;min-height:20px}
@media (max-width:520px){.rs-die{width:36px;height:36px;padding:5px}.rs-who{font-size:12px}.rs-roll{padding:8px 16px;font-size:15px}}

/* ===== Repair Bay ===== */
.rb-wrap{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;height:100%;max-width:900px;justify-content:center}
.rb-scores{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.rb-sc{display:flex;align-items:center;gap:7px;background:rgba(255,255,255,.1);border-radius:999px;padding:6px 12px 6px 8px;font-weight:700;font-size:13.5px;transition:background .2s}
.rb-sc i{width:14px;height:14px;border-radius:50%;box-shadow:0 0 0 2px #fff}.rb-sc b{font-weight:900;min-width:22px;text-align:right}
.rb-sc.on{background:#fff;color:#173b30}
.rb-stage{position:relative;width:min(100%,calc(min(58vh,560px) * 1000 / 640));aspect-ratio:1000/640;max-height:min(58vh,560px);border-radius:22px;overflow:hidden;background:radial-gradient(circle at 30% 20%,#2a3c66,#121a30 70%);box-shadow:inset 0 0 0 3px rgba(255,255,255,.08),0 12px 30px rgba(0,0,0,.35)}
.rb-stage::before{content:"";position:absolute;inset:0;background-image:radial-gradient(1.5px 1.5px at 12% 20%,#fff8,transparent),radial-gradient(1px 1px at 70% 15%,#fff9,transparent),radial-gradient(1.5px 1.5px at 85% 70%,#fff6,transparent),radial-gradient(1px 1px at 35% 85%,#fff8,transparent),radial-gradient(1px 1px at 55% 45%,#fff5,transparent);pointer-events:none}
.rb-cv{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab}
.rb-zap{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:44px;font-weight:900;color:#ffe14d;text-shadow:0 0 18px #ff3b3b,0 4px 0 #a01818;animation:rbzap .8s ease forwards;pointer-events:none;white-space:nowrap}
@keyframes rbzap{0%{transform:translate(-50%,-50%) scale(.6) rotate(-6deg);opacity:0}20%{transform:translate(-50%,-50%) scale(1.15) rotate(3deg);opacity:1}100%{transform:translate(-50%,-50%) scale(1);opacity:0}}
.rb-info{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;height:60px;flex-shrink:0;overflow:hidden}
.rb-msg{font-weight:600;font-size:14.5px;text-align:center;line-height:1.3;max-height:2.6em;overflow:hidden}
.rb-timer.off{visibility:hidden}.rb-timer{width:min(320px,80%);height:8px;border-radius:99px;background:rgba(255,255,255,.18);overflow:hidden}.rb-timer i{display:block;height:100%;background:linear-gradient(90deg,#ff5a5f,#ffd166,#4fd19a);border-radius:99px}
.rb-tray{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;width:100%}
.rb-part{display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.1);border-radius:12px;padding:5px 8px;font-size:12.5px;font-weight:600;transition:opacity .3s}
.rb-part img{width:20px;height:20px}.rb-part span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rb-part b{font-weight:800;opacity:.8}
.rb-part.out{opacity:.35;text-decoration:line-through}
@media (max-width:520px){.rb-tray{grid-template-columns:repeat(2,1fr)}.rb-zap{font-size:30px}}

/* ===== Wobble Tower ===== */
.wt-wrap{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;height:100%;max-width:720px;justify-content:center}
.wt-top{display:flex;justify-content:space-between;width:100%;font-weight:700;font-size:14px}.wt-moves{opacity:.75}
.wt-stage{position:relative;width:100%;flex:1 1 auto;min-height:300px;max-height:min(64vh,620px);border-radius:22px;overflow:hidden;background:linear-gradient(transparent 0 84%,#7a4e2a 84%,#5d3a1f 100%),radial-gradient(ellipse at 50% 30%,#2a5a4a,#173b30 70%)}
.wt-cv{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:pointer}
.wt-rot{position:absolute;bottom:12px;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:22px;font-weight:700;display:flex;align-items:center;justify-content:center;border:0}
.wt-rot.l{left:12px}.wt-rot.r{right:12px}.wt-rot:active{background:rgba(255,255,255,.3)}
.wt-boom{position:absolute;top:22%;left:50%;transform:translateX(-50%);font-size:30px;font-weight:900;background:#fff;color:#c0392b;padding:10px 20px;border-radius:20px;box-shadow:0 10px 30px rgba(0,0,0,.35);animation:rbzap 2.4s ease forwards;white-space:nowrap}
.wt-msg{font-weight:600;font-size:14.5px;text-align:center;line-height:1.3;height:2.6em;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.wt-pull.off{visibility:hidden}.wt-pull{flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:8px;width:min(460px,100%)}
.wt-meter{display:flex;align-items:center;gap:10px;width:100%;font-weight:700;font-size:13px}
.wt-bar{flex:1;height:10px;border-radius:99px;background:rgba(255,255,255,.18);overflow:hidden}
.wt-bar i{display:block;height:100%;width:0;background:#4fd19a;border-radius:99px;transition:width .08s linear,background .2s}.wt-bar i.warm{background:#ffd166}.wt-bar i.hot{background:#ff5a5f}
.wt-track{position:relative;width:100%;height:56px;border-radius:999px;background:rgba(0,0,0,.25);box-shadow:inset 0 0 0 2px rgba(255,255,255,.15);overflow:hidden;touch-action:none}
.wt-track span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;opacity:.7;pointer-events:none;padding-left:40px}
.wt-fill{position:absolute;left:0;top:0;bottom:0;width:0;background:linear-gradient(90deg,rgba(233,195,143,.25),rgba(233,195,143,.55))}
.wt-knob{position:absolute;left:4px;top:4px;width:48px;height:48px;border-radius:50%;background:linear-gradient(#efcb98,#d9a86b);color:#5d3a1f;font-size:22px;font-weight:900;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 10px rgba(0,0,0,.35);cursor:grab;touch-action:none;z-index:1}
.wt-cancel{color:#fff;border-color:rgba(255,255,255,.35);background:transparent;border-radius:999px;padding:6px 14px;font-weight:600;font-size:13px}

/* ===== Boomtown ===== */
.bt-wrap{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;height:100%;justify-content:center}
.bt-board{position:relative;display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);gap:2px;width:min(100%,calc(100dvh - 210px),720px);aspect-ratio:1;background:#0f2a22;padding:3px;border-radius:16px;box-shadow:0 12px 30px rgba(0,0,0,.35)}
.bt-sq{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:2px;border:0;border-radius:6px;background:#fdf7ea;color:#2a2a2a;overflow:hidden;min-width:0;min-height:0;cursor:pointer;transition:transform .15s,box-shadow .2s}
.bt-sq.corner{background:#ffe9b8}.bt-sq.t-dip{background:#f3e6ff}.bt-sq.t-ride,.bt-sq.t-util{background:#e8f3ff}.bt-sq.t-tax{background:#ffe5e5}
.bt-sq img{width:42%;max-width:30px;aspect-ratio:1}.bt-sq.corner img{width:52%;max-width:38px}
.bt-nm{font-size:clamp(6.5px,1.35vmin,10.5px);font-weight:700;line-height:1.05;text-align:center;max-width:100%;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.bt-pr{font-size:clamp(6.5px,1.3vmin,10px);font-weight:800;opacity:.6}
.bt-band{position:absolute;left:0;right:0;height:16%;top:0}
.bt-sq.top .bt-band{top:auto;bottom:0}.bt-sq.left .bt-band{top:0;bottom:0;left:auto;right:0;width:16%;height:auto}.bt-sq.right .bt-band{top:0;bottom:0;right:auto;left:0;width:16%;height:auto}
.bt-sq.owned{box-shadow:inset 0 0 0 2.5px var(--own)}
.bt-own{display:flex;align-items:center;gap:1px;font-size:clamp(6px,1.2vmin,10px);line-height:1}.bt-dot{width:7px;height:7px;border-radius:50%;box-shadow:0 0 0 1px #fff;flex-shrink:0}
.bt-sq.pawned{background-image:repeating-linear-gradient(45deg,rgba(0,0,0,.08) 0 4px,transparent 4px 8px);filter:saturate(.4)}
.bt-sq.can{animation:btglow 1.1s ease-in-out infinite}
@keyframes btglow{50%{box-shadow:inset 0 0 0 2.5px var(--own),0 0 0 3px #ffd166,0 0 14px #ffd166}}
.bt-sq.offer{transform:scale(1.08);z-index:2;box-shadow:0 0 0 3px #ffd166,0 6px 16px rgba(0,0,0,.4)}
.bt-mid{grid-row:2/8;grid-column:2/8;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:6px;padding:8px;border-radius:12px;background:radial-gradient(circle at 50% 40%,#2c6b55,#1b4a3b);color:#fff;min-height:0;overflow:hidden}
.bt-top{display:flex;justify-content:space-between;width:100%;font-weight:700;font-size:clamp(10px,2vmin,14px)}.bt-round{opacity:.75}
.bt-dice{display:flex;gap:8px;min-height:34px}
.bt-die{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;width:clamp(30px,6vmin,46px);aspect-ratio:1;padding:5px;border-radius:9px;background:#fff8ee;box-shadow:0 4px 0 #c9b28a}.bt-die i{border-radius:50%}.bt-die i.on{background:#2b2f3a}
.bt-die.land{animation:vcland .35s ease}
.bt-news{flex:1;display:flex;flex-direction:column;justify-content:center;gap:3px;text-align:center;font-size:clamp(10px,1.9vmin,14px);line-height:1.25;min-height:0;overflow:hidden;width:100%}
.bt-news .old{opacity:.5;font-size:.88em}
.bt-acts{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;width:100%}
.bt-btn{border-radius:999px;padding:8px 14px;font-weight:800;font-size:clamp(11px,2vmin,15px)}
.bt-btn.go{background:#fff;color:#173b30;box-shadow:0 4px 0 #c9b28a}.bt-btn.go.big{padding:10px 26px;font-size:clamp(14px,2.6vmin,19px);animation:vcready 1.2s ease-in-out infinite}
.bt-btn.ghost{background:transparent;color:#fff;border:1.5px solid rgba(255,255,255,.45)}.bt-btn:disabled{opacity:.5;animation:none}
.bt-wait,.bt-hint{font-size:clamp(10px,1.8vmin,13px);opacity:.8;width:100%;text-align:center}
.bt-tokens{position:absolute;inset:3px;pointer-events:none}
.bt-tok{position:absolute;width:4.6%;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #fff,0 3px 8px rgba(0,0,0,.4);transition:left .14s ease,top .14s ease;z-index:3}
.bt-tok img{width:72%}.bt-tok.turn{box-shadow:0 0 0 2px #fff,0 0 0 4.5px #ffd166,0 3px 8px rgba(0,0,0,.4);z-index:4}.bt-tok.gone{display:none}.bt-tok.jam::after{content:"🚦";position:absolute;right:-40%;top:-40%;font-size:10px}
.bt-card{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:6}
.bt-card-in{width:min(70%,300px);background:linear-gradient(160deg,#b46cf0,#6a3fd6);color:#fff;border-radius:18px;padding:18px;text-align:center;box-shadow:0 0 0 4px #fff,0 18px 40px rgba(0,0,0,.45)}
.bt-card.flip .bt-card-in{animation:btflip .45s cubic-bezier(.2,.8,.2,1)}
@keyframes btflip{0%{transform:rotateY(90deg) scale(.7)}100%{transform:none}}
.bt-card-h{font-weight:900;font-size:14px;opacity:.85;margin-bottom:8px}.bt-card-t{font-weight:800;font-size:clamp(14px,2.6vmin,19px);line-height:1.3}
.bt-info{position:absolute;inset:0;z-index:7;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.35);border-radius:16px}
.bt-ic{width:min(82%,320px);background:#fff;color:#222;border-radius:16px;overflow:hidden;box-shadow:0 18px 40px rgba(0,0,0,.45);max-height:94%;overflow-y:auto}
.bt-ih{display:flex;align-items:center;gap:8px;padding:10px 12px;background:#e9e2d2;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.35)}.bt-ih img{width:26px}.bt-ih b{flex:1;font-size:16px}
.bt-x{background:rgba(255,255,255,.3);color:#fff;border:0;width:28px;height:28px;border-radius:50%;padding:0}
.bt-row{display:flex;justify-content:space-between;padding:4px 14px;font-size:13.5px}.bt-row.now{background:#fff3cf;font-weight:700}.bt-row.sm{opacity:.7;font-size:12.5px}
.bt-p{padding:6px 14px;font-size:13px;line-height:1.35}.bt-p.sm{opacity:.7;font-size:12px}
.bt-iacts{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px 12px}.bt-iacts .bt-btn.go{background:#2fb37a;color:#fff;box-shadow:none}.bt-iacts .bt-btn.ghost{color:#333;border-color:#ccc}
.bt-players{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;width:100%}
.bt-pl{display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.1);border-radius:999px;padding:4px 10px 4px 4px;font-size:13px;font-weight:700;transition:background .2s}
.bt-pl i{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px #fff}.bt-pl i img{width:70%}
.bt-pl.on{background:#fff;color:#173b30}.bt-pl.out{opacity:.45;text-decoration:line-through}.bt-pn{max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bt-pl em{font-style:normal}
.bt-deal{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.45);padding:12px}
.bt-dc{width:min(100%,420px);max-height:min(92dvh,720px);display:flex;flex-direction:column}
.bt-ih.deal{background:linear-gradient(90deg,#3d8bff,#6a3fd6)}
.bt-dl{padding:8px 14px 2px;font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#7a7f8c}
.bt-whos{display:flex;flex-wrap:wrap;gap:6px;padding:4px 12px}
.bt-who{display:flex;align-items:center;gap:6px;border:1.5px solid #dde1e8;background:#fff;color:#333;border-radius:999px;padding:3px 10px 3px 3px;font-weight:700;font-size:13px}
.bt-who i{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center}.bt-who i img{width:70%}
.bt-who.on{border-color:#3d8bff;background:#eaf2ff}
.bt-side{padding:2px 12px 4px}
.bt-cash{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;padding:2px 0 6px}.bt-cash span{flex:0 0 auto;margin-right:auto}
.bt-cash input{width:84px;padding:6px 8px;border:1.5px solid #dde1e8;border-radius:10px;font-size:15px;font-weight:700;text-align:center;color:#222;background:#fff}
.bt-step{width:30px;height:30px;border-radius:50%;padding:0;border:1.5px solid #dde1e8;background:#f5f6f8;color:#333;font-size:18px;font-weight:800;line-height:1}
.bt-cash em{font-style:normal;font-size:11.5px;color:#8a8f99;min-width:52px}
.bt-chips{display:flex;flex-wrap:wrap;gap:5px}
.bt-chip{display:flex;align-items:center;gap:5px;border:1.5px solid #dde1e8;background:#fff;color:#333;border-radius:10px;padding:4px 8px 4px 4px;font-size:12.5px;font-weight:600;position:relative;overflow:hidden}
.bt-chip i{width:5px;align-self:stretch;border-radius:3px}.bt-chip img{width:16px}
.bt-chip.on{border-color:#2fb37a;background:#e6f8ef;box-shadow:0 0 0 1px #2fb37a}.bt-chip.on::after{content:"✓";color:#2fb37a;font-weight:900;margin-left:2px}
.bt-chip.pawned{opacity:.75}
.bt-why{padding:8px 14px 0;font-size:12.5px;color:#555;min-height:18px}
.bt-lis{padding:2px 12px;display:flex;flex-direction:column;gap:4px}
.bt-li{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:600;padding:6px 8px;border-radius:10px;background:#f5f6f8}.bt-li i{width:6px;align-self:stretch;border-radius:3px}.bt-li img{width:20px}.bt-li em{font-style:normal;color:#888;font-weight:500}
.bt-p.good{color:#1f9a63;font-weight:700}.bt-p.warn{color:#c0392b;font-weight:700}

/* small phones: setup rows stack so labels don't get squeezed */
@media(max-width:430px){.gm-setup .sw-row{flex-wrap:wrap;gap:8px}.gm-setup .sw-row .seg2{width:100%}.gm-setup .sw-row .seg2 button{flex:1}}

/* phones on their side: boards use the height, controls move beside them */
@media(max-height:520px) and (orientation:landscape){
  .tb-head{padding:calc(4px + var(--sat)) 12px 2px}
  .tb-board{padding:2px 10px calc(6px + var(--sab))}
  .cf-wrap{max-width:calc(100dvh - 120px);gap:4px}.cf-side{min-height:22px;padding:2px 6px;font-size:13px}
  .vc-wrap{display:grid;grid-template-columns:calc(100dvh - 96px) minmax(170px,260px);grid-template-rows:auto 1fr;column-gap:18px;row-gap:8px;max-width:none;width:auto;align-items:center}
  .vc-board{grid-row:1/3;grid-column:1}.vc-players{grid-column:2;align-self:end}.vc-bottom{grid-column:2;flex-direction:column;align-items:flex-start;align-self:start}
  .rr-wrap{gap:4px}.rr-card,.rr-back{width:56px;height:82px}.rr-pile{width:56px;height:82px}.rr-num{font-size:28px}.rr-num.sm{font-size:22px}.rr-corner{font-size:11px}
  .rr-mid-area{min-height:90px;gap:16px}.rr-opp{min-width:64px;padding:4px 6px}.rr-av{width:26px;height:26px}.rr-fan{display:none}.rr-hand{padding:8px 6px 6px}.rr-hand .rr-card{margin:0 -10px}
  .rs-svg{max-height:calc(100dvh - 130px)}.rs-bar{min-height:44px}.rs-top{display:none}
  .rb-stage{max-height:calc(100dvh - 180px);width:min(100%,calc((100dvh - 180px) * 1000 / 640));aspect-ratio:1000/640;height:auto}.rb-info{height:44px}
  .wt-wrap{display:grid;grid-template-columns:1fr minmax(220px,300px);grid-template-rows:auto 1fr auto;column-gap:14px;max-width:none}
  .wt-top{grid-column:1/3}.wt-stage{grid-row:2/4;grid-column:1;min-height:0;max-height:none;height:100%}.wt-msg{grid-column:2;grid-row:2;align-self:end}.wt-pull{grid-column:2;grid-row:3}
  .bt-wrap{flex-direction:row;gap:14px}.bt-board{width:min(calc(100dvh - 70px),62vw)}.bt-players{flex-direction:column;width:auto;max-width:210px;align-items:stretch}
}
