/* Pound's landscape majlis. Fixed coordinates share the same 1280 x 640 stage
   as the motion layer, including the rotated portrait presentation. */
body.in-game{background:#091c2c}
#gameStage{background:radial-gradient(ellipse at 50% 42%,#31546d 0,#18354a 54%,#0d2334 100%);overflow:hidden}
#gameStage:before{content:'';position:absolute;inset:0;pointer-events:none;opacity:.15;background-image:repeating-linear-gradient(45deg,transparent 0 27px,#93bad01a 28px 29px,transparent 30px 58px),repeating-linear-gradient(-45deg,transparent 0 27px,#93bad01a 28px 29px,transparent 30px 58px)}
#gameStage .table{left:334px;top:154px;width:612px;height:290px;border:6px solid #b89b60;border-radius:28px;background-color:var(--table-skin,#45403f);background-image:var(--table-skin-image,none);background-size:cover;background-position:center;box-shadow:0 3px 0 #f3dbaa99,0 9px 0 #0a1b2b,0 20px 35px #03111d66,inset 0 0 50px #0004}
#gameStage .table:before{content:'';position:absolute;inset:7px;border:1px solid #e3c48866;border-radius:17px;box-shadow:inset 0 0 0 3px #080f151c;pointer-events:none}
#gameStage .felt-mark{font-size:48px;font-weight:900;color:#f6e3b712;top:49%;line-height:1.1}
#gameStage .felt-mark span{font-size:12px;letter-spacing:2px;margin-top:7px}
#gameStage #players{position:absolute;left:-340px;top:-160px;width:1280px;height:640px;pointer-events:none}
#gameStage .player{position:absolute!important;transform:none!important;bottom:auto!important;right:auto!important;pointer-events:auto;width:140px;max-width:140px;min-width:0;padding:0;border:0;border-radius:12px;box-shadow:none;background:transparent;z-index:4}
#gameStage .player .avatar{width:82px;height:88px;margin:0 auto;border:3px solid #b6cede;border-radius:17px;background-color:#416783;box-shadow:0 4px 0 #071c2e,0 6px 17px #00132170;transition:border-color .2s,box-shadow .2s;transform-origin:center}
#gameStage .player.active .avatar{border-color:#8be4cf;box-shadow:0 0 0 4px #46c5a744,0 0 24px #5adebe55,0 5px 0 #071c2e}
#gameStage .player-name{background:linear-gradient(#233f54,#112c40);border:1px solid #8da7bc66;border-radius:9px;padding:3px 6px;position:relative;margin:4px 0 0;min-height:28px;z-index:2;box-shadow:0 3px 8px #071a2933}
#gameStage .player-name b{font-size:14px;color:#eef7ff;line-height:1.4}
#gameStage .player small{display:block;font-size:10px;margin:3px 0;color:#b1c6d7}
#gameStage .player.mine .player-name{border-color:#ddbb7b99}
#gameStage .player.is-vip .player-name b{color:#ffdf95}
#gameStage .player.is-vip:not(.active) .avatar{border-color:#f0cd82;box-shadow:0 0 0 2px #a7762c,0 5px 14px #071c2e}
#gameStage .turn-chip{position:absolute;top:-8px;right:6px;padding:2px 9px;border-radius:8px;background:#8be4cf;color:#102c31;border:1px solid #d3fff5;font-size:10px;font-weight:800;z-index:3;box-shadow:0 3px 7px #061b2a55}
#gameStage .choice-badge{position:absolute;left:-7px;top:46px;min-width:36px;max-width:85px;padding:4px 6px;border:1px solid #f7db9c;border-radius:7px;background:#b98b43;color:#fff8e2;font-size:12px;font-weight:bold;z-index:3}
#gameStage .dealer-badge{bottom:auto;left:8px;right:auto;top:74px;padding:1px 5px;background:#8f7549;color:#fff0ce;transform:rotate(-7deg);font-size:9px;border:1px solid #dec48e;border-radius:4px;z-index:3}
#gameStage .bidder-mark{position:absolute;right:-6px;top:-34px;display:flex;gap:3px;padding:3px 5px;background:#dfbd78;border:1px solid #ffe6af;border-radius:7px;box-shadow:0 3px 7px #071b2a77;min-height:29px}
#gameStage .bid-amount{font:bold 16px Tahoma,sans-serif;color:#1d3340}
#gameStage .player .trump-badge{width:21px;height:22px;font-size:21px;border:0;background:#fff8dd}
#gameStage .seat0{left:1090px;top:475px!important}
#gameStage .four .seat1{left:1048px!important;top:244px!important}
#gameStage .four .seat2{left:570px!important;top:22px!important}
#gameStage .four .seat3{left:92px!important;top:244px!important}
#gameStage .six .seat1{left:1060px!important;top:286px!important}
#gameStage .six .seat2{left:1035px!important;top:110px!important}
#gameStage .six .seat3{left:570px!important;top:22px!important}
#gameStage .six .seat4{left:105px!important;top:110px!important}
#gameStage .six .seat5{left:80px!important;top:286px!important}
#gameStage .opponent-fan{display:block;position:absolute;left:-92px;top:10px;width:91px;height:85px;direction:ltr;pointer-events:none}
#gameStage .back-card{display:block;position:absolute;width:36px;height:54px;left:calc(50% - 18px);top:5px;border:2px solid #e5eff6;border-radius:4px;box-shadow:0 2px 4px #0006;background-repeat:no-repeat;transform:translateX(calc((var(--back-index) - (var(--back-count) - 1)/2)*6px)) rotate(calc((var(--back-index) - (var(--back-count) - 1)/2)*6deg));transform-origin:50% 120%;transition:transform .25s ease}
#gameStage .four .seat3 .opponent-fan,#gameStage .six .seat4 .opponent-fan,#gameStage .six .seat5 .opponent-fan{left:auto;right:-92px}
#gameStage .four .seat2 .opponent-fan,#gameStage .six .seat3 .opponent-fan{left:-116px;top:43px}
#gameStage .match-strip{left:auto;right:24px;top:20px;width:326px;height:68px;background:linear-gradient(130deg,#132b3ff5,#21455ae6);border:1px solid #c4ae7b88;box-shadow:0 5px 12px #07172555;padding:7px 10px;grid-template-columns:1fr 1.1fr 1fr;gap:6px}
#gameStage .match-center #roundInfo{font-size:13px;color:#f2d18e}
#gameStage .match-center #matchInfo,#gameStage .match-center #remainingTricks{font-size:8px;color:#b2c7d9}
#gameStage .team-label{font-size:11px}
#gameStage .tricks-total b{font-size:25px}
#gameStage .tricks-total span{font-size:8px}
#gameStage .match-points{font-size:9px}
#gameStage .game-tools{left:25px;top:22px;gap:9px}
#gameStage .game-tools button{width:44px;height:42px;background:linear-gradient(#335b76,#17384f);border:1px solid #a9c6d8;border-radius:11px;box-shadow:0 4px #061c2d;font-size:22px}
#gameStage .game-tools button:active{transform:translateY(2px);box-shadow:0 2px #061c2d}
#gameStage .hand{top:447px;width:800px;height:184px;transform:translateX(-50%) scale(var(--hand-scale,1));transform-origin:50% 0;overflow:visible}
#gameStage .hand .card{width:var(--card-width,112px);height:var(--card-height,164px);left:calc(50% - var(--card-width,112px)/2);border-radius:var(--card-radius,8px);margin:0;box-shadow:0 5px 12px #03142188;transition:transform .24s cubic-bezier(.2,.75,.25,1),filter .18s,box-shadow .18s;outline-offset:3px}
#gameStage .hand .corner{font-size:var(--card-corner,29px);top:5px;left:5px}
#gameStage .hand .corner small{font-size:24px}
#gameStage .hand .pips{font-size:var(--card-pips,26px)}
#gameStage .hand .card.playable{border:2px solid #ffe2a0;box-shadow:0 0 0 1px #e3bc6880,0 6px 12px #04111e88}
#gameStage[data-phase=playing] .hand .card:disabled{filter:brightness(.72) saturate(.8);opacity:1}
#gameStage[data-phase=playing][data-turn=mine] .hand .card.playable{filter:none}
#gameStage .hand .card.playable:hover,#gameStage .hand .card.playable:focus-visible{transform:translate(var(--fan-offset),calc(var(--fan-rise) - 24px)) rotate(var(--fan-angle));z-index:20;box-shadow:0 0 0 2px #ffe9bb,0 15px 24px #020e1baa}
#gameStage .played-item{width:84px}
#gameStage .played-item .card{width:84px;height:116px;border:1px solid #e8dec8;border-radius:7px;box-shadow:0 4px 9px #030d1466}
#gameStage .played-item>small{font-size:9px;line-height:1.25;color:#efe7d1;background:#142532a6;margin:3px -4px 0;padding:1px 3px;max-width:none;border:1px solid #e2c89025}
#gameStage .four .played-seat0{left:50%;top:75%}
#gameStage .four .played-seat1{left:78%;top:50%}
#gameStage .four .played-seat2{left:50%;top:25%}
#gameStage .four .played-seat3{left:22%;top:50%}
#gameStage .six .played-seat0{left:50%;top:75%}
#gameStage .six .played-seat1{left:72%;top:75%}
#gameStage .six .played-seat2{left:72%;top:25%}
#gameStage .six .played-seat3{left:50%;top:25%}
#gameStage .six .played-seat4{left:28%;top:25%}
#gameStage .six .played-seat5{left:28%;top:75%}
#gameStage .trick-counter{display:none;top:auto;bottom:5px;left:50%;transform:translateX(-50%);max-width:none;font-size:9px;color:#e8dfc5;background:#0f253466;padding:1px 8px;border-radius:8px;white-space:nowrap}
#gameStage .controls{top:444px;left:145px;width:250px;padding:4px 12px;z-index:7;background:transparent}
#gameStage .controls h2{font-size:15px;color:#e2d2ac;margin:0}
#gameStage .controls p{color:#aac1d1;font-size:10px;line-height:1.6;margin:3px 0 0}
#gameStage[data-turn=mine][data-phase=playing] .controls h2{color:#96e8d1}
#gameStage[data-choices=bidding] .controls,#gameStage[data-choices=trump] .controls,#gameStage[data-phase=upgrade] .controls,#gameStage[data-phase=result] .controls,#gameStage[data-phase=finished] .controls{top:170px;left:50%;width:454px;padding:0 14px 13px;background:linear-gradient(145deg,#2b4f65fa,#112e43fa);border:2px solid #e3c38c;border-radius:16px;box-shadow:0 6px 0 #071c2b,0 14px 28px #03122277;z-index:8}
#gameStage[data-choices=bidding] .controls h2,#gameStage[data-choices=trump] .controls h2,#gameStage[data-phase=upgrade] .controls h2{margin:-9px 45px 7px;padding:7px 8px;border:1px solid #ffdfa3;border-radius:8px;background:linear-gradient(#edcd8d,#bc9254);color:#1d3341;box-shadow:0 4px 10px #081d2f55;font-size:18px;text-shadow:0 1px #fff3cf77}
#gameStage[data-choices=bidding] .controls p{min-height:16px;color:#cadddf}
#gameStage[data-choices=bidding] .buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;direction:ltr;margin-top:7px}
#gameStage[data-choices=trump] .buttons{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin-top:9px}
#gameStage .buttons button{background:linear-gradient(#75a9c8,#426f98);border:1px solid #c8e2ed;border-radius:9px;color:#fff;font:bold 34px/1 Arial,sans-serif;min-height:65px;box-shadow:0 4px #081c2f,inset 0 1px #e2f6ff66;padding:5px 7px;text-shadow:0 2px #284e6c;transition:transform .12s,box-shadow .12s,filter .12s}
#gameStage .buttons button:hover:not(:disabled){filter:brightness(1.09);transform:translateY(-2px)}
#gameStage .buttons button:active:not(:disabled){transform:translateY(2px);box-shadow:0 2px #081c2f}
#gameStage .buttons button:focus-visible{outline:3px solid #fff2bf;outline-offset:3px}
#gameStage .buttons button small{font:700 11px/1.3 Tahoma,sans-serif;min-height:14px;display:block;margin-top:3px}
#gameStage .buttons button:disabled{opacity:.3;box-shadow:none;cursor:default}
#gameStage .buttons .primary{background:linear-gradient(#f0ce84,#b78a42);border-color:#ffe4ad;color:#183242;text-shadow:0 1px #fff1c266}
#gameStage .buttons .suit{background:linear-gradient(#fffdf4,#dfd6c3);text-shadow:none;color:#162938;min-height:79px;font-size:42px;border-color:#fff1cf;box-shadow:0 4px #061b2b}
#gameStage .buttons .suit.red{color:#bf4053}
#gameStage .buttons .suit small{font-size:11px;margin:0}
#gameStage .extra-actions{margin-top:8px}
#gameStage .extra-actions button{background:#22455b;border:1px solid #b9d0d8;color:#f3eddc;min-height:28px;font-size:12px;padding:3px 12px;border-radius:7px}
#gameStage[data-phase=playing] .extra-actions button{background:#9e7b45}
#gameStage[data-phase=upgrade] .controls{top:219px;padding-bottom:18px}
#gameStage[data-phase=upgrade] .buttons{margin-top:18px}
#gameStage[data-phase=result] .controls,#gameStage[data-phase=finished] .controls{top:180px;width:415px;padding:16px 18px 17px}
#gameStage[data-phase=result] .controls h2,#gameStage[data-phase=finished] .controls h2{font-size:21px;color:#f4d699;margin-top:5px;line-height:1.5}
#gameStage[data-phase=result] .controls p,#gameStage[data-phase=finished] .controls p{font-size:12px;color:#d0e0e7;margin:6px 0}
#gameStage[data-phase=result] .buttons button,#gameStage[data-phase=finished] .buttons button,#gameStage[data-phase=upgrade] .buttons button{font:700 16px/1.5 Tahoma,sans-serif;text-shadow:none;min-height:42px;padding:7px 20px}
#gameStage .result-medallion{position:absolute;left:20px;top:16px;font-size:44px;color:#e6c282;text-shadow:0 0 20px #f4d07e44}
#gameStage[data-outcome=loss] .result-medallion{color:#9fb4c8;text-shadow:none}
#gameStage .result-contract{display:flex;align-items:center;justify-content:center;gap:9px;font-size:14px;color:#e1cfaa}
#gameStage .result-contract .avatar{width:43px;height:47px;border-radius:10px;margin:0;border:2px solid #c4b48b;box-shadow:none}
#gameStage .notice{left:27px;right:auto;bottom:69px;width:233px;font-size:12px;line-height:1.65;max-height:69px;color:#c5d5df;text-align:right;min-height:0}
#gameStage .hand-heading{left:27px;bottom:22px;width:230px;font-size:11px;color:#91adbf}
#gameStage .hand-heading #timer{color:#e8c78a;font-size:12px;margin-top:5px}
#gameStage .speech-bubble{bottom:calc(100% + 9px);top:auto;z-index:12;max-width:190px;font-size:13px;color:#253b45;background:#fff4d6;left:50%;right:auto;transform:translateX(-50%);border-color:#e0c08a;border-radius:12px;box-shadow:0 5px 16px #03121f66}
#gameStage .seat0 .speech-bubble{left:-85px;bottom:70px;max-width:166px;transform:translateX(-50%)}
#gameStage .four .seat2 .speech-bubble,#gameStage .six .seat3 .speech-bubble{top:calc(100% + 9px);bottom:auto}
#gameStage .table-vip-badge{font:700 9px Arial,sans-serif;background:#ddb35c;color:#152d38;border-radius:4px;padding:2px 3px;white-space:nowrap}
#gameStage .table-vip-badge[hidden],#gameStage .player [hidden]{display:none!important}
body[data-cards=bold] .card .corner{font-family:Arial,sans-serif;font-weight:900}
body[data-cards=bold] .card .pips{font-family:Arial,sans-serif}
body[data-cards=night] .card{--paper:#192536;color:#e8f3ff;border-color:#8a9cb6}
body[data-cards=night] .card.red{color:#ff95aa}
body[data-cards=night] .court-art{opacity:.9}
/* Transient, non-interactive effects live above the table, never above menus. */
.table-motion{position:absolute;inset:0;z-index:12;pointer-events:none;overflow:hidden;direction:ltr;contain:layout style}
.motion-flight{position:absolute;top:0;left:0;width:84px;height:116px;transform-origin:center;pointer-events:none;perspective:600px;will-change:transform,opacity}
.motion-flip{position:relative;width:100%;height:100%;transform-style:preserve-3d}
.motion-flight .motion-face,.motion-back{position:absolute!important;inset:0!important;width:84px!important;height:116px!important;min-width:0;margin:0!important;border:1px solid #efe8d7;border-radius:7px;backface-visibility:hidden;-webkit-backface-visibility:hidden;box-shadow:0 7px 16px #03122070;pointer-events:none}
.motion-back{background-repeat:no-repeat;background-color:#245779;border:2px solid #f2eee1}
.motion-back.reverse{transform:rotateY(180deg)}
.motion-face .corner{font-size:19px!important;left:4px!important;top:4px!important}
.motion-face .corner small{font-size:16px!important}
.motion-face .corner.mirrored{left:auto!important;top:auto!important;right:4px!important;bottom:4px!important}
.motion-face .pips{font-size:20px!important}
.motion-face .ace-symbol{font-size:48px!important}
.trump-emblem{position:absolute;left:0;top:0;width:106px;height:106px;display:grid;place-items:center;border-radius:27px;background:radial-gradient(circle,#fffae6,#dec18a);border:3px solid #fff1c4;box-shadow:0 0 0 10px #f4d08514,0 0 55px #e7c47077,0 10px 20px #09233588;font:76px/1 Georgia,serif;color:#19364b;transform-origin:center}
.trump-emblem.red{color:#b6384e}
.table-confetti{position:absolute;left:0;top:0;width:7px;height:12px;border-radius:2px;pointer-events:none}
@media(prefers-reduced-motion:reduce){#gameStage .card,#gameStage .back-card,#gameStage .avatar,#gameStage button{transition:none!important}.table-motion{display:none}}
