.cheat-card{background:linear-gradient(135deg,#6c254b,#241a40)!important}
.cheat-screen{min-height:100vh;padding-bottom:0;overflow:visible;background:radial-gradient(circle at 50% 25%,#7c4a8a,#2c1c48 48%,#17132d);color:#fff}
.cheat-phase{font:900 .78rem 'DM Mono',monospace;letter-spacing:.12em;color:#ffd875}
.cheat-table{position:relative;z-index:2;max-width:1180px;height:min(62vh,650px);min-height:470px;margin:15px auto 0;overflow:visible;border:12px solid #6a3d25;border-radius:50% 50% 20% 20%;background:radial-gradient(ellipse at center,#256856,#12473e 62%,#0d332d);box-shadow:inset 0 0 90px #071c18,0 25px 70px #09051a99}
.cheat-atmosphere{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none;background:radial-gradient(circle at 50% 40%,#ffffff10,transparent 55%)}

/* Centre table: claim up top, pile + played cards in the middle, seats around the rim. */
/* Sit between the top seat and the pile so the banner never covers faces. */
.cheat-claim{position:absolute;z-index:8;top:32%;left:50%;translate:-50% 0;padding:10px 17px;max-width:min(320px,70%);border-radius:20px;background:#fff9e9;color:#2b2041;text-align:center;font-weight:900;box-shadow:0 6px 0 #b68a68}
.cheat-pile{position:absolute;z-index:7;left:50%;top:46%;translate:-50% -50%;display:grid;place-items:center;width:96px;height:120px;border-radius:10px;background:repeating-linear-gradient(135deg,#f3e6cd 0 5px,#b23650 5px 8px);border:5px solid #f8efd9;box-shadow:9px 10px 0 #642a35,18px 19px 0 #3e1b27;color:#27172c;transform:rotate(4deg)}
.cheat-pile i{font-size:1.7rem}.cheat-pile b{font-size:.62rem;letter-spacing:.14em}.cheat-pile strong{font:1.25rem 'DM Mono',monospace}
.cheat-play{position:absolute;z-index:9;left:50%;top:46%;translate:-50% -50%;display:flex;align-items:center;justify-content:center;gap:0;pointer-events:none;perspective:900px;min-width:120px;min-height:100px}
.cheat-play[hidden]{display:none!important}
.cheat-play-card{position:relative;width:64px;height:90px;margin:0 -14px;border-radius:8px;transform-style:preserve-3d;transition:transform .7s cubic-bezier(.2,.8,.2,1);animation:cheat-deal .45s cubic-bezier(.2,.8,.2,1) both}
.cheat-play-card:nth-child(1){rotate:-12deg;animation-delay:0s}.cheat-play-card:nth-child(2){rotate:-4deg;translate:0 -8px;animation-delay:.08s}.cheat-play-card:nth-child(3){rotate:5deg;animation-delay:.16s}.cheat-play-card:nth-child(4){rotate:12deg;translate:0 -5px;animation-delay:.24s}
.cheat-play-card .face,.cheat-play-card .back{position:absolute;inset:0;border-radius:8px;backface-visibility:hidden;border:3px solid #f8efd9;box-shadow:0 10px 18px #0008}
.cheat-play-card .back{background:repeating-linear-gradient(135deg,#f3e6cd 0 5px,#b23650 5px 8px)}
.cheat-play-card .face{display:grid;place-items:center;background:#fffaf1;color:#251b30;transform:rotateY(180deg);font-weight:900}
.cheat-play-card .face b{font-size:1.4rem;line-height:1}
.cheat-play-card .face i{font-style:normal;font-size:1.55rem}
.cheat-play-card .face .hearts,.cheat-play-card .face .diamonds{color:#d63f50}
.cheat-play.is-revealed .cheat-play-card{transform:rotateY(180deg)}
@keyframes cheat-deal{0%{opacity:0;transform:translateY(28px) scale(.7)}100%{opacity:1;transform:translateY(0) scale(1)}}

.cheat-seats{position:absolute;inset:0;z-index:5;pointer-events:none}
.cheat-seat{position:absolute;display:grid;justify-items:center;gap:4px;width:140px;text-align:center;pointer-events:auto;z-index:5}
.cheat-seat .cheat-avatar-frame{position:relative;width:132px;height:186px;overflow:hidden;border-radius:22px 22px 10px 10px;background:#0d2a2488;filter:drop-shadow(0 9px 6px #071b1699)}
/* Outer slot owns portrait framing. Top-anchor + top origin so the scaled face sits inside the clip. */
.cheat-seat .cheat-rig-slot{position:absolute;left:50%;top:2px;bottom:auto;width:330px;height:475px;margin-left:-165px;transform:scale(.45);transform-origin:50% 0;pointer-events:none}
/* Expression-driven transforms stay on the inner rig only — never !important transform overrides. */
.cheat-seat .cheat-rig{position:absolute!important;left:50%!important;bottom:0!important;scale:1!important;--avatar-scale:1}
.cheat-seat .cheat-name{padding:5px 9px;border-radius:20px;background:#171329df;color:#fff;font-size:.72rem;font-weight:900}
.cheat-seat .cheat-risk{font-size:.57rem;letter-spacing:.08em;color:#ffe891;font-weight:800}
.cheat-seat.eliminated{filter:grayscale(1);opacity:.48}
.cheat-seat.is-turn .cheat-name{box-shadow:0 0 0 2px #ffe891,0 0 16px #ffe89166}
.cheat-seat.speaking .cheat-avatar-frame{box-shadow:0 0 0 3px #80d8c4,0 0 22px #80d8c477}
/* Seat 0 = local/bottom rim — keep inside the table so the hand panel does not cover the face. */
.seat-0{left:50%;bottom:4%;translate:-50% 0}
.seat-1{left:2%;top:34%}
.seat-2{right:2%;top:34%}
.seat-3{left:50%;top:0;translate:-50% 0;scale:.92;transform-origin:50% 0}
.seat-4{left:14%;top:6%;scale:.88;transform-origin:0 50%}
.seat-5{right:14%;top:6%;scale:.88;transform-origin:100% 50%}
.seat-6{left:0;top:14%;scale:.82;transform-origin:0 50%}
.seat-7{right:0;top:14%;scale:.82;transform-origin:100% 50%}

.cheat-history{position:absolute;z-index:4;left:20px;bottom:20px;display:grid;gap:4px;max-width:180px}
.cheat-history div{padding:5px 8px;border-radius:9px;background:#081f1bb8;font-size:.66rem;font-weight:800}
.cheat-call{position:absolute;z-index:10;right:30px;bottom:28px;border:0;border-radius:19px;padding:16px 21px;background:#f35158;color:#fff;box-shadow:0 6px 0 #9c2739;font-size:1.2rem;font-weight:1000}
.cheat-call small{display:block;font:.7rem 'DM Mono',monospace;margin-top:3px}
.cheat-hand-area{position:relative;z-index:4;max-width:1180px;margin:8px auto 0;padding:13px 20px 20px;border-radius:24px 24px 0 0;background:#17132bef;text-align:center;overflow:visible}
.cheat-hand-note{font-weight:900;color:#ffe09a;font-size:.82rem}
.cheat-claim-line{display:flex;justify-content:center;align-items:center;gap:10px;margin:12px 0 6px;font-size:1.15rem;font-weight:900;color:#fff6e4}
.cheat-claim-line strong{display:inline-grid;place-items:center;min-width:2.1rem;padding:4px 10px;border-radius:10px;background:#ffd46e;color:#2d1937;font:900 1.2rem 'DM Mono',monospace}
.cheat-rank-select select{appearance:none;border:2px solid #ffd46e;border-radius:12px;padding:8px 34px 8px 14px;background:#2a2148 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffd46e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;color:#fff;font-weight:900;font-size:1.05rem}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.cheat-hand{display:flex;justify-content:center;align-items:end;min-height:128px;overflow:visible;padding:36px 18px 10px}
.playing-card{flex:none;position:relative;width:61px;height:88px;margin:0 -7px;border:2px solid #dfd2bb;border-radius:8px;background:#fffaf1;color:#251b30;box-shadow:0 5px 10px #0007;transition:transform .15s;touch-action:manipulation}
.playing-card b{position:absolute;left:7px;top:5px;font-size:1.05rem}
.playing-card i{position:absolute;right:8px;bottom:5px;font-size:1.6rem;font-style:normal}
.playing-card .hearts,.playing-card .diamonds{color:#d63f50}
.playing-card:hover:not(:disabled),.playing-card.selected{transform:translateY(-22px);border-color:#f1b94c;z-index:2}
.playing-card:disabled{opacity:.7}
.cheat-result{position:fixed;z-index:20;left:50%;top:50%;translate:-50% -50%;max-width:min(500px,90vw);padding:26px;border-radius:24px;background:#fff9e9;color:#2a1938;text-align:center;font-size:1.35rem;font-weight:1000;box-shadow:0 20px 80px #0009}

/* Revolver cinematic — png gun, random suspense, bang muzzle FX */
#revolverStage{position:fixed;inset:0;z-index:60;display:grid;place-items:center;pointer-events:none}
#revolverStage[hidden]{display:none!important}
.revolver-veil{position:absolute;inset:0;background:radial-gradient(circle at 50% 45%,#5a1d2888,#07040fd9 70%);opacity:0}
.revolver-stage-copy{position:relative;z-index:2;text-align:center;color:#fff7e4;transform:translateY(-18vh)}
.revolver-kicker{margin:0;font:900 .72rem 'DM Mono',monospace;letter-spacing:.22em;color:#ffb45c}
.revolver-title{margin:8px 0 4px;font-size:clamp(2.4rem,7vw,4.6rem);letter-spacing:-.05em;line-height:.95}
.revolver-sub{margin:0;font-weight:800;opacity:.85}
.revolver-gun{position:relative;z-index:3;width:min(520px,88vw);transform:translateY(10vh) scale(.82);opacity:0;transform-origin:72% 62%}
.revolver-img{display:block;width:100%;height:auto;filter:drop-shadow(0 22px 28px #000c);mix-blend-mode:lighten}
.revolver-muzzle{position:absolute;left:1%;top:36%;width:0;height:0;pointer-events:none}
.revolver-fx{position:absolute;left:0;top:0}
.revolver-flash{position:absolute;left:-10px;top:-28px;width:70px;height:70px;border-radius:50%;background:radial-gradient(circle,#fff7c8 0 16%,#ffb347 28%,#ff4d2a55 48%,transparent 70%);opacity:0;filter:blur(1px);mix-blend-mode:screen;translate:-50% -50%}
.revolver-flame,.revolver-smoke{position:absolute;left:0;top:0;border-radius:50%;opacity:0;pointer-events:none;translate:-50% -50%}
.revolver-flame{width:18px;height:18px;background:radial-gradient(circle,#fff6c2 0 20%,#ffb14a 40%,#ff4d2a 70%,transparent 75%);box-shadow:0 0 16px #ff8a3a}
.revolver-smoke{width:26px;height:26px;background:radial-gradient(circle,#d7d2c8cc 0 35%,#6a655d66 60%,transparent 72%);filter:blur(2px)}
.revolver-verdict{position:relative;z-index:4;margin-top:min(34vh,260px);font:900 clamp(1.4rem,5vw,2.8rem) 'DM Mono',monospace;letter-spacing:.18em;color:#ffd875;opacity:0;text-shadow:0 0 30px #ff8a3a88}

#revolverStage.is-firing .revolver-veil{animation:revolver-veil 1.2s ease forwards;opacity:1}
#revolverStage.is-firing .revolver-gun{animation:revolver-enter .9s cubic-bezier(.2,.7,.2,1) forwards}
#revolverStage.is-firing .revolver-stage-copy{animation:revolver-copy .6s ease forwards}
#revolverStage.is-cocked .revolver-gun{filter:brightness(1.05)}
#revolverStage.is-bang.is-shot .revolver-gun{animation:revolver-recoil .65s cubic-bezier(.15,.85,.25,1) forwards}
#revolverStage.is-bang.is-shot .revolver-flash{animation:revolver-flash .55s ease-out forwards}
#revolverStage.is-bang.is-shot .revolver-flame{animation:revolver-flame .55s ease-out forwards;animation-delay:var(--delay)}
#revolverStage.is-bang.is-shot .revolver-smoke{animation:revolver-smoke 1.1s ease-out forwards;animation-delay:var(--delay)}
#revolverStage.is-done .revolver-verdict{opacity:1;transition:opacity .45s ease}
#revolverStage.is-done .revolver-stage-copy{opacity:1;transform:translateY(-18vh)}
#revolverStage.is-click.is-shot .revolver-gun{animation:revolver-dry .35s ease-out forwards}

@keyframes revolver-veil{0%{opacity:0}100%{opacity:1}}
@keyframes revolver-enter{0%{opacity:0;transform:translateY(18vh) scale(.62) rotate(-6deg)}100%{opacity:1;transform:translateY(10vh) scale(.9) rotate(0)}}
@keyframes revolver-copy{0%{opacity:0;transform:translateY(-14vh)}100%{opacity:1;transform:translateY(-18vh)}}
/* Points left — recoil kicks the barrel up (clockwise). */
@keyframes revolver-recoil{0%{transform:translateY(10vh) scale(.9) rotate(0)}14%{transform:translateY(8vh) scale(.94) rotate(22deg)}40%{transform:translateY(9vh) scale(.9) rotate(10deg)}100%{transform:translateY(10vh) scale(.9) rotate(3deg)}}
@keyframes revolver-dry{0%{transform:translateY(10vh) scale(.9) rotate(0)}40%{transform:translateY(10vh) scale(.9) rotate(4deg)}100%{transform:translateY(10vh) scale(.9) rotate(0)}}
@keyframes revolver-flash{0%{opacity:0;scale:.25}18%{opacity:1;scale:1.4}55%{opacity:.45;scale:1.9}100%{opacity:0;scale:2.4}}
@keyframes revolver-flame{0%{opacity:0;transform:translate(0,0) scale(.4) rotate(0)}12%{opacity:1;transform:translate(calc(var(--dx) * .35),calc(var(--dy) * .35)) scale(var(--s)) rotate(var(--spin))}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(calc(var(--s) * .35)) rotate(var(--spin))}}
@keyframes revolver-smoke{0%{opacity:0;transform:translate(0,0) scale(.5)}20%{opacity:.85;transform:translate(calc(var(--dx) * .4),calc(var(--dy) * .4)) scale(var(--s))}100%{opacity:0;transform:translate(var(--dx),calc(var(--dy) - 24px)) scale(calc(var(--s) * 1.6))}}

body.reduce-motion #revolverStage.is-firing .revolver-gun,
body.reduce-motion #revolverStage.is-bang.is-shot .revolver-gun,
body.reduce-motion #revolverStage.is-bang.is-shot .revolver-flash,
body.reduce-motion #revolverStage.is-bang.is-shot .revolver-flame,
body.reduce-motion #revolverStage.is-bang.is-shot .revolver-smoke,
body.reduce-motion #revolverStage.is-click.is-shot .revolver-gun{animation:none}
body.reduce-motion #revolverStage.is-firing .revolver-veil,
body.reduce-motion #revolverStage.is-firing .revolver-gun{opacity:1;transform:translateY(10vh) scale(.9)}
body.reduce-motion .cheat-play-card{animation:none}

@media(max-width:760px){
  .cheat-screen{padding:12px;padding-bottom:8px}
  .cheat-table{height:48vh;min-height:360px;border-width:7px}
  .cheat-seat{width:92px}
  .cheat-seat .cheat-avatar-frame{width:84px;height:120px;border-radius:16px 16px 8px 8px}
  .cheat-seat .cheat-rig-slot{top:1px;bottom:auto;transform:scale(.3)}
  .cheat-seat .cheat-name{font-size:.52rem;padding:3px 5px;max-width:86px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .cheat-seat .cheat-risk{font-size:.4rem}
  /* Every participant stays visible — never hide seats by shuffled index.
     Avoid per-seat CSS scale here: center-origin scale pulls side seats inward. */
  .seat-0{bottom:2%;scale:1}
  .seat-1{left:0;top:36%;scale:1}
  .seat-2{right:0;top:36%;scale:1}
  .seat-3{top:0;scale:1}
  .seat-4{left:6%;top:10%;scale:1;display:grid}
  .seat-5{right:6%;top:10%;scale:1;display:grid}
  .seat-6{left:-1%;top:20%;scale:1;display:grid}
  .seat-7{right:-1%;top:20%;scale:1;display:grid}
  .cheat-pile{width:64px;height:82px;top:48%}
  .cheat-play-card{width:44px;height:64px;margin:0 -10px}
  .cheat-claim{top:34%;font-size:.65rem;padding:6px 8px;max-width:min(240px,62%)}
  .cheat-history{display:none}
  .cheat-call{right:10px;bottom:10px;padding:10px 12px;font-size:1rem}
  .cheat-hand-area{position:relative;z-index:6;margin-top:2px;padding:8px 8px 12px}
  .cheat-hand{min-height:96px;padding:22px 8px 6px}
  .playing-card{width:48px;height:70px;margin:0 -7px}
  .cheat-claim-line{font-size:.92rem;gap:6px;flex-wrap:wrap}
  .cheat-screen .room-topbar .button{padding:9px}
  .revolver-gun{width:min(360px,90vw)}
}

/* Landscape phones: keep a compact oval so all seats remain on-screen. */
@media(max-width:900px) and (orientation:landscape){
  .cheat-table{height:min(72vh,420px);min-height:280px}
  .cheat-seat{width:78px}
  .cheat-seat .cheat-avatar-frame{width:72px;height:102px}
  .cheat-seat .cheat-rig-slot{top:1px;bottom:auto;transform:scale(.27)}
  .cheat-hand-area{padding:6px 8px 8px}
  .cheat-hand{min-height:72px;padding:14px 6px 4px}
  .playing-card{width:40px;height:58px}
  .seat-4,.seat-5,.seat-6,.seat-7{display:grid}
}
