/* Game surface: white/cobalt chrome, quiet blue table, real card faces. */
.phone.is-game{height: min(880px,calc(100dvh - 78px));min-height:600px;display:flex;flex-direction:column;background:#487c9b}
.is-game #header,.is-game #nav{display:none!important}.is-game #main{padding:0!important;min-height:0;height:100%;overflow:hidden;flex:1}
.game-screen{height:100%;display:flex;flex-direction:column;position:relative;color:#fff;isolation:isolate;background:radial-gradient(ellipse at 50% 35%,#6092ad 0,#477b99 75%)}
.game-top{height:56px;display:flex;align-items:center;justify-content:space-between;padding:8px 12px;gap:8px;background:#fff;color:#1d304e;flex-shrink:0}
.game-top strong{font-size:15px;display:block}.game-top small{font-size:10px;color:#61718a;display:block}.game-top button{height:40px;min-width:42px;display:grid;place-items:center;border-radius:9px;background:#f0f4fc;color:#275ae0}.game-top .game-stake{text-align:right;margin-left:auto;margin-right:4px}
.game-felt{flex:1;position:relative;min-height:230px;display:flex;align-items:center;justify-content:center;padding:115px 52px 12px}
.opponent{position:absolute;width:76px;text-align:center;font-size:11px;z-index:3}.opponent .op-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#e8eff9;color:#294c7d;margin:0 auto 4px;font-size:20px;font-weight:700;border:2px solid #ffffffa6;position:relative}.opponent.turn .op-avatar{box-shadow:0 0 0 3px #fff,0 0 0 5px #245cda}.opponent .op-count{position:absolute;right:-10px;bottom:-3px;font-size:10px;min-width:22px;height:22px;border-radius:6px;background:#234a6d;color:white;display:grid;place-items:center;border:1px solid #fff}.opponent strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.opponent small{color:#e3eef6;font-size:9px;display:block;min-height:14px}.opponent.pos-0{top:14px;left:calc(50% - 38px)}.opponent.pos-1{top:77px;right:8px}.opponent.pos-2{top:77px;left:8px}.opponent.pos-3{top:8px;left:8px}.opponent.pos-4{top:8px;right:8px}
.game-stock{position:absolute;left:10px;top:48%;width:46px;height:83px;text-align:center;font-size:10px;color:#eef5fb}.stock-back,.discard-back{background:repeating-linear-gradient(45deg,#e8effa 0 2px,#3d66b1 2px 4px);border:3px solid white;border-radius:4px;box-shadow:0 2px 4px #173b5540}.stock-back{width:34px;height:48px;position:relative;z-index:1}.trump-face{position:absolute;width:34px;height:48px;object-fit:contain;left:13px;top:13px;transform:rotate(90deg);border-radius:3px;box-shadow:0 1px 3px #173b5555}.game-stock b{display:block;margin-top:22px;font-size:14px}.game-stock.empty-stock b{margin-top:3px;font-size:25px}.game-discard{position:absolute;right:9px;top:49%;font-size:10px;text-align:center;color:#e8f0f7}.discard-back{width:29px;height:42px;transform:rotate(8deg);margin:0 auto 5px;opacity:.8}.game-discard.empty-discard .discard-back{background:none;border:1px dashed #c7dce57a;box-shadow:none;transform:none}
.table-pairs{display:grid;grid-template-columns:repeat(2,76px);gap:12px 12px;justify-content:center;align-content:center;min-height:124px}.table-pairs.many{grid-template-columns:repeat(3,65px);gap:10px 4px}.table-pair{width:76px;height:111px;position:relative}.many .table-pair{width:65px;height:100px}.table-card{padding:0;width:58px;height:84px;position:absolute;top:0;left:0;border-radius:5px;background:white;box-shadow:0 2px 5px #153e5955}.table-card img{display:block;width:100%;height:100%;border-radius:4px}.table-card.cover{left:17px;top:22px;transform:rotate(6deg);pointer-events:none}.table-card.target{outline:3px solid #d7e5ff;outline-offset:3px}.table-card.target:focus-visible{outline-color:#fff}.table-card:disabled{opacity:1}.table-empty{width:160px;min-height:115px;border:1px dashed #d4e6ef66;border-radius:12px;color:#f1f6fa;display:grid;align-content:center;justify-items:center;font-size:13px;gap:6px;padding:12px}.table-empty small{color:#e0ebf3;font-size:11px}.table-empty.actionable{background:#ffffff12;border:2px solid #e0ebff;color:white;font-weight:700}.throw-target{grid-column:1/-1;min-height:44px;background:#ffffff1c;border:1px dashed #d8e8f6;border-radius:9px;color:#fff;font-size:12px;padding:8px}.transfer-target{position:absolute;bottom:5px;left:50%;transform:translateX(-50%);min-height:44px;background:#fff;color:#2457cd;border-radius:9px;font-weight:700;padding:10px 15px;font-size:12px;white-space:nowrap;z-index:4}
.game-guidance{flex-shrink:0;text-align:center;padding:6px 16px 0;min-height:45px;font-size:13px;font-weight:700;line-height:1.45;color:white}.game-guidance small{font-weight:400;display:block;font-size:11px;color:#e4eef5;min-height:17px}.game-hand-scroll{overflow-x:auto;overflow-y:hidden;flex-shrink:0;height:141px;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#b5cee0 transparent;touch-action:pan-x}.game-hand{position:relative;height:141px;margin:0 auto;min-width:100%;padding:0 18px}.hand-card{position:absolute;bottom:12px;left:calc(50% + var(--x));width:70px;height:102px;padding:0;border-radius:6px;background:#fff;box-shadow:0 2px 5px #12344a50;transform:translateX(-50%) translateY(var(--drop)) rotate(var(--angle));transform-origin:50% 120%;transition:transform 160ms ease,box-shadow 160ms ease;touch-action:pan-x}.hand-card img{width:100%;height:100%;display:block;border-radius:5px;pointer-events:none}.hand-card.selected{transform:translateX(-50%) translateY(calc(var(--drop) - 16px)) rotate(var(--angle));box-shadow:0 0 0 3px #d5e4ff,0 6px 12px #12344a50;z-index:30!important}.hand-card:focus-visible{outline:3px solid white;outline-offset:4px}.hand-card.unplayable:after{content:'';position:absolute;inset:0;background:#7891ae20;pointer-events:none;border-radius:5px}.game-bottom{background:#fff;color:#20334c;min-height:72px;display:flex;align-items:center;gap:10px;padding:10px 12px max(10px,env(safe-area-inset-bottom));flex-shrink:0}.game-self{display:flex;align-items:center;gap:8px;flex:1}.game-self .avatar{width:36px;height:36px;font-size:19px;background:#e7efff;color:#2b5cde}.game-self strong{font-size:12px;display:block}.game-self small{font-size:10px;display:block;color:#657691}.game-bottom .primary{width:auto;min-width:112px;min-height:44px;padding:9px 18px;font-size:14px;border-radius:10px}.game-bottom .quiet-turn{font-size:12px;color:#526880;padding-right:6px}.game-bottom .clear-card{font-size:12px;color:#3565d8;min-height:44px;padding:8px}.game-timer{font-variant-numeric:tabular-nums}.game-pause{position:absolute;inset:56px 0 0;background:#23415899;backdrop-filter:blur(5px);display:grid;place-content:center;text-align:center;padding:24px;z-index:50}.game-pause h2{color:white;margin-bottom:10px}.game-pause p{font-size:13px;margin-bottom:22px;color:#e2edf7}.game-pause .primary{background:#fff;color:#285adb}.game-pause button+button{color:white;min-height:44px;margin-top:10px}.game-result-list{margin:20px 0;background:white;border-radius:12px;padding:4px 15px}.game-result-row{display:flex;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid #e3eaf7}.game-result-row:last-child{border:0}.game-result-row>strong{color:#3062e6;font-size:19px;width:24px}.game-result-row .grow strong{font-size:14px;display:block}.game-result-row small{display:block;font-size:11px}.demo-seats{display:grid;gap:8px;margin:18px 0}.demo-seats .waiting-person{padding:10px 12px;border:1px solid #e2e9f6;border-radius:10px}.demo-seats .waiting-person strong{font-size:14px}.demo-seats .waiting-person .avatar{width:36px;height:36px;font-size:18px}.demo-seats .waiting-person .ready{font-size:10px}.game-instructions{display:grid;gap:12px}.game-instructions p{font-size:13px;color:#54667e}.game-instructions strong{display:block;color:#1e3049;margin-bottom:3px}
.table-pairs.single{grid-template-columns:76px}.game-top button svg{width:21px}.game-top button[aria-label="Меню партии"] svg{stroke-width:4}.game-top button:focus-visible{outline-color:#245bde}.game-bottom{gap:6px}.game-self{min-width:0}.game-bottom .primary{min-width:96px}.game-bottom .clear-card{padding:6px}
@media(max-width:480px){.phone.is-game{height:100dvh;min-height:500px;margin:0;border-radius:0}.is-game .game-screen{height:100%}body:has(.is-game) .demo-tools{display:none}.game-felt{padding-top:109px}.game-hand-scroll,.game-hand{height:139px}}
@media(max-height:700px){.game-top{height:48px}.game-felt{padding-top:89px;min-height:200px}.opponent.pos-1,.opponent.pos-2{top:53px}.opponent .op-avatar{width:33px;height:33px;font-size:17px}.opponent.pos-0{top:8px}.game-hand-scroll,.game-hand{height:122px}.hand-card{width:63px;height:92px;bottom:7px}.game-guidance{min-height:41px;font-size:12px}.table-pairs{gap:5px 8px}.table-pair{height:96px}.table-card{width:52px;height:75px}.table-card.cover{left:14px;top:17px}.table-pairs.many{grid-template-columns:repeat(3,57px)}.many .table-pair{height:91px;width:57px}.game-bottom{min-height:64px}}
@media(prefers-reduced-motion:reduce){.hand-card{transition:none}.game-pause{backdrop-filter:none}}

/* Larger cards, denser portrait table. The hand keeps its fan at every size. */
.phone.is-game{height:min(760px,calc(100dvh - 78px));min-height:560px}
.game-screen{--table-card-width:84px;--pair-width:108px;--pair-height:148px;--hand-card-width:100px;--opponent-space:96px}
.game-felt{min-height:0;padding:var(--opponent-space) 12px 4px;align-items:center}
.game-opponents{position:absolute;top:12px;left:65px;right:65px;display:flex;justify-content:space-evenly;gap:6px}
.game-opponents .opponent{position:static;width:76px;flex-shrink:1;min-width:0}
.opponent .op-avatar{width:46px;height:46px;font-size:23px;margin-bottom:4px}
.opponent strong{font-size:12px}.opponent small{font-size:10px;min-height:15px}
.game-stock{top:22px;left:14px;width:48px;font-size:11px}.game-discard{top:23px;right:14px;font-size:11px}
.stock-back{width:37px;height:54px}.trump-face{width:37px;height:54px;left:15px;top:14px}
.game-stock b{margin-top:22px;font-size:15px}.discard-back{width:34px;height:48px}
.game-table-zone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;min-height:190px;max-height:100%;padding:12px 0}
.table-pairs,.table-pairs.single,.table-pairs.many{grid-template-columns:repeat(2,var(--pair-width));gap:12px 14px;min-height:0}
.table-pairs.single{grid-template-columns:var(--pair-width)}
.table-pairs.many{--table-card-width:74px;--pair-width:94px;--pair-height:130px;grid-template-columns:repeat(3,var(--pair-width));gap:8px 4px}
.table-pair,.many .table-pair{width:var(--pair-width);height:var(--pair-height)}
.table-card{width:var(--table-card-width);height:calc(var(--table-card-width)*1.45);border-radius:7px;touch-action:manipulation}
.table-card.cover{left:21px;top:24px;transform:rotate(5deg)}
.table-card img{border-radius:6px}
.table-empty{width:210px;min-height:155px;font-size:15px;gap:8px;opacity:1!important}
.table-empty small{font-size:12px}
.transfer-target{position:static;transform:none;min-height:54px;min-width:135px;border:2px dashed #dfeaff;background:#f0f6ff17;color:#fff;border-radius:10px;font-size:14px;margin:2px auto 0}
.throw-target{min-height:48px;font-size:14px}
.game-guidance{min-height:53px;padding:6px 12px 2px;font-size:15px;line-height:1.4}
.game-guidance small{font-size:12px;min-height:18px}
.game-hand-scroll,.game-hand{height:195px}
.game-hand-scroll{touch-action:pan-x;scrollbar-width:none}
.game-hand-scroll::-webkit-scrollbar{display:none}
.hand-card{width:var(--hand-card-width);height:calc(var(--hand-card-width)*1.45);bottom:16px;border-radius:8px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.hand-card img{border-radius:7px;user-select:none;-webkit-user-drag:none}
.hand-card.selected{transform:translateX(-50%) translateY(calc(var(--drop) - 20px)) rotate(var(--angle))}
.game-bottom{min-height:72px;padding:10px 12px max(10px,env(safe-area-inset-bottom));gap:6px}
.game-bottom .primary{min-height:48px;min-width:100px;font-size:16px}
.game-self strong{font-size:13px}.game-self small{font-size:11px}.game-bottom .clear-card{font-size:13px}
.participants-5,.participants-6{--opponent-space:150px}
.participants-5 .game-opponents,.participants-6 .game-opponents{left:10px;right:10px;display:grid;grid-template-columns:repeat(3,1fr);gap:7px;justify-items:center}
.participants-5 .opponent .op-avatar,.participants-6 .opponent .op-avatar{width:38px;height:38px;font-size:20px;margin-bottom:2px}
.participants-5 .opponent strong,.participants-6 .opponent strong{font-size:11px}
.participants-5 .opponent small,.participants-6 .opponent small{font-size:9px;min-height:12px}
.participants-6 .game-opponents .opponent:nth-child(5){grid-column:3}
.participants-5 .game-stock,.participants-6 .game-stock{top:88px;left:calc(50% - 47px)}
.participants-5 .game-discard,.participants-6 .game-discard{top:89px;right:calc(50% - 47px)}
.participants-5 .game-stock .stock-back,.participants-6 .game-stock .stock-back{width:27px;height:39px}
.participants-5 .trump-face,.participants-6 .trump-face{width:27px;height:39px;left:12px;top:10px}
.participants-5 .game-stock b,.participants-6 .game-stock b{margin-top:13px;font-size:12px}
.participants-5 .discard-back,.participants-6 .discard-back{width:26px;height:37px}
.hand-card.drag-origin{opacity:.16!important;box-shadow:none}
.drag-card{position:fixed;left:0;top:0;z-index:10000;pointer-events:none;will-change:transform;border-radius:8px;background:#fff;box-shadow:0 12px 26px #14344d55,0 0 0 2px #fff;overflow:hidden;transform-origin:center;contain:layout paint}
.drag-card img{display:block;width:100%;height:100%;pointer-events:none}
.drag-card.valid-drop{box-shadow:0 12px 26px #14344d55,0 0 0 3px #bad5ff}
.drop-hover{outline:3px solid #fff!important;outline-offset:6px;background-color:#ffffff25!important}
.game-screen.drag-active{user-select:none;-webkit-user-select:none}
.game-screen.drag-active .game-guidance{color:#fff}
@media(max-width:480px){
 .phone.is-game{height:100dvh;min-height:500px;margin:0;border-radius:0}
 body:has(.is-game) .demo-tools,body:has(.is-game)>.prototype-label{display:none}
 .game-felt{padding:var(--opponent-space) 10px 4px}
}
@media(max-height:740px){
 .game-top{height:48px;padding-top:4px;padding-bottom:4px}
 .game-screen{--table-card-width:76px;--pair-width:97px;--pair-height:131px;--opponent-space:82px}
 .opponent .op-avatar{width:38px;height:38px;font-size:20px}.game-opponents{top:8px}
 .opponent strong{font-size:11px}.opponent small{font-size:9px;min-height:12px}
 .game-stock,.game-discard{top:12px}
 .game-table-zone{min-height:150px;padding:4px 0;gap:5px}
 .table-pairs{gap:6px 10px}.table-pairs.many{--table-card-width:68px;--pair-width:88px;--pair-height:115px;gap:5px 4px}
 .table-card.cover{left:17px;top:18px}
 .game-hand-scroll,.game-hand{height:172px}.hand-card{height:calc(var(--hand-card-width)*1.35);bottom:9px}
 .game-guidance{min-height:44px;font-size:14px;padding-top:4px}.game-guidance small{font-size:11px}
 .game-bottom{min-height:64px;padding-top:7px;padding-bottom:max(7px,env(safe-area-inset-bottom))}
 .participants-5,.participants-6{--opponent-space:126px}
 .participants-5 .opponent .op-avatar,.participants-6 .opponent .op-avatar{width:32px;height:32px;font-size:17px}
 .participants-5 .game-opponents,.participants-6 .game-opponents{gap:3px}
 .participants-5 .game-stock,.participants-6 .game-stock{top:74px}
 .participants-5 .game-discard,.participants-6 .game-discard{top:75px}
 .game-pause{inset-block-start:48px}
}
@media(max-height:620px){
 .game-hand-scroll,.game-hand{height:152px}.hand-card{height:calc(var(--hand-card-width)*1.2)}
 .game-guidance{min-height:39px;font-size:13px}.game-guidance small{font-size:10px}
 .table-pairs.many{--table-card-width:60px;--pair-width:79px;--pair-height:98px}
 .table-pairs.many .table-card.cover{top:13px}
}
@media(prefers-reduced-motion:reduce){.drag-card{will-change:auto}}

/* Reference table: R-Soft portrait screenshots, original-1 / original-6 / original-7.
   Shared menu styling stays outside the game. No original paid power-up controls. */
.game-screen{--hand-zone-height:202px;background:#4d7c99 url('felt.svg') repeat;box-shadow:inset 0 0 65px #14364e16;font-family:Arial,sans-serif}
.game-top{height:42px;padding:6px 12px;background:none;color:#fff;align-items:flex-start}
.game-rule-strip{display:flex;align-items:center;justify-content:center;gap:9px;flex:1;margin-left:35px;margin-right:8px;color:#c9dce799;min-height:30px}
.game-rule-strip svg{width:24px;height:24px}.game-rule-strip .deck-rule{border:1px solid currentColor;border-radius:3px;font-size:13px;padding:3px 2px}.game-rule-strip small{font-size:10px;color:#dae8ef9c}
.game-top .game-stake{margin:0;white-space:nowrap;padding:0}
.game-stake strong{font:400 24px/1.2 Arial,sans-serif}.game-stake strong small{display:inline;font:400 11px Arial,sans-serif;color:#edf4f9}
.game-felt{--opponent-space:104px;padding:104px 14px 2px;overflow:visible}
.game-opponents,.participants-5 .game-opponents,.participants-6 .game-opponents{position:absolute;inset:0;display:block;pointer-events:none}
.game-opponents .opponent{position:absolute;top:12px;left:calc(50% - 35px);width:70px;pointer-events:auto}
.opponent .op-avatar,.participants-5 .opponent .op-avatar,.participants-6 .opponent .op-avatar{position:relative;z-index:2;margin:0 auto;width:58px;height:58px;display:block;overflow:visible;border:4px solid #ff5269;border-radius:8px;background:#eef1f2;color:#416d88;box-shadow:0 2px 4px #17364c66}
.op-avatar>img{display:block;width:100%;height:100%;object-fit:cover;border-radius:3px;pointer-events:none}
.opponent.turn .op-avatar{border-color:#a5cf18;box-shadow:0 2px 4px #17364c66}
.opponent .op-avatar strong,.participants-5 .op-avatar strong,.participants-6 .op-avatar strong{position:absolute;bottom:0;left:0;right:0;border-radius:0 0 3px 3px;background:#263c50a6;color:#fff;text-align:center;font:400 12px/1.3 Arial,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.opponent .op-count{position:absolute;top:-2px;right:0;bottom:auto;background:#ffffffd9;color:#243747;border:0;border-radius:1px;font:400 11px/16px Arial,sans-serif;min-width:16px;height:16px}
.opponent>small{position:relative;z-index:3;font-size:10px!important;color:#eef3f7;margin-top:4px;min-height:12px!important}
.op-mini-hand{position:absolute;width:80px;height:48px;top:27px;left:calc(50% - 40px);pointer-events:none;z-index:1}
.op-mini-hand img{position:absolute;left:6px;top:0;width:35px;height:52px;transform:rotate(-25deg);box-shadow:0 2px 4px #17364c55;border-radius:3px}
.op-mini-hand img:nth-child(2){left:22px;transform:rotate(0)}.op-mini-hand img:nth-child(3){left:38px;transform:rotate(25deg)}
.participants-3 .opponent.pos-0{left:calc(28% - 35px)}.participants-3 .opponent.pos-1{left:calc(72% - 35px)}
.participants-4 .opponent.pos-0{left:calc(15% - 35px);top:99px}.participants-4 .opponent.pos-1{left:calc(50% - 35px)}.participants-4 .opponent.pos-2{left:calc(85% - 35px);top:99px}
.participants-5 .opponent.pos-0{left:calc(13% - 35px);top:106px}.participants-5 .opponent.pos-1{left:calc(33% - 35px)}.participants-5 .opponent.pos-2{left:calc(67% - 35px)}.participants-5 .opponent.pos-3{left:calc(87% - 35px);top:106px}
.participants-6 .opponent.pos-0{left:calc(13% - 35px);top:106px}.participants-6 .opponent.pos-1{left:calc(23% - 35px)}.participants-6 .opponent.pos-2{left:calc(50% - 35px)}.participants-6 .opponent.pos-3{left:calc(77% - 35px)}.participants-6 .opponent.pos-4{left:calc(87% - 35px);top:106px}
.participants-4 .game-felt,.participants-5 .game-felt,.participants-6 .game-felt{padding-top:165px}
.participants-5 .opponent .op-avatar,.participants-6 .opponent .op-avatar{width:48px;height:48px;border-width:3px}
.participants-5 .op-mini-hand,.participants-6 .op-mini-hand{top:20px;transform:scale(.86)}
.participants-5 .opponent strong,.participants-6 .opponent strong{font-size:10px}
.game-stock,.participants-5 .game-stock,.participants-6 .game-stock{position:absolute;top:43%;left:0;width:49px;height:110px;text-align:left;z-index:3}
.stock-back,.participants-5 .game-stock .stock-back,.participants-6 .game-stock .stock-back{position:absolute;top:0;left:-22px;width:56px;height:84px;border:0;border-radius:4px;transform:rotate(-7deg);background:none;box-shadow:0 2px 4px #15364c66;z-index:2;object-fit:fill}
.trump-face,.participants-5 .trump-face,.participants-6 .trump-face{position:absolute;top:31px;left:-7px;width:56px;height:84px;transform:rotate(100deg);border-radius:4px;z-index:1;box-shadow:0 2px 4px #15364c66;object-fit:fill}
.game-stock b,.participants-5 .game-stock b,.participants-6 .game-stock b{position:absolute;top:-36px;left:7px;font:400 27px/1.2 Arial,sans-serif;margin:0;color:#fff}
.game-stock>span{display:none}.game-stock.empty-stock{top:46%;width:32px;height:50px}.game-stock.empty-stock b{top:0;left:8px;font-size:25px}
.game-discard,.participants-5 .game-discard,.participants-6 .game-discard{position:absolute;top:43%;right:-24px;width:59px;height:115px;z-index:2;opacity:1}
.game-discard.empty-discard{visibility:hidden}
.discard-back,.participants-5 .discard-back,.participants-6 .discard-back{position:absolute;top:0;left:0;width:56px;height:84px;border:0;border-radius:4px;background:none;opacity:1;transform:rotate(-14deg);box-shadow:0 2px 4px #15364c44}
.discard-back:nth-child(2){top:14px;left:3px;transform:rotate(12deg)}.discard-back:nth-child(3){top:28px;left:0;transform:rotate(-4deg)}
.game-discard small{position:absolute;top:117px;right:28px;white-space:nowrap;color:#deebf3;font-size:10px}
.game-table-zone{min-height:185px;padding:4px 8px;z-index:2}
.table-card{height:calc(var(--table-card-width)*1.5);transform:rotate(-4deg);border-radius:5px;box-shadow:0 3px 7px #17364c55}
.table-card.cover{transform:rotate(6deg);left:18px;top:20px}
.table-pairs.many{--table-card-width:72px;--pair-width:92px;--pair-height:132px}
.participants-4 .table-pairs.many,.participants-5 .table-pairs.many,.participants-6 .table-pairs.many{--table-card-width:65px;--pair-width:84px;--pair-height:117px}
.table-empty{border:0;background:none;font-size:17px;color:#f0f4f7;min-height:130px;font-weight:400}
.table-empty:not(.actionable){opacity:.55!important}.table-empty small{font-size:12px;color:#dfebf2}
.table-empty.actionable{border:1px dashed #ecf4fa99;background:#ffffff0d;font-weight:400}
.game-guidance{font:400 14px/1.35 Arial,sans-serif;min-height:40px;padding:3px 10px 0}
.game-guidance small{font-size:11px;min-height:15px;color:#e0ebf2}
.game-hand-scroll,.game-hand{height:var(--hand-zone-height)}
.hand-card{height:calc(var(--hand-card-width)*1.5);bottom:7px;border-radius:7px;box-shadow:0 -2px 7px #18384f55}
.hand-card.selected{transform:translateX(-50%) translateY(calc(var(--drop) - 21px)) rotate(var(--angle));box-shadow:0 0 0 2px #d7ebff,0 0 10px #17364c55}
.hand-card img{object-fit:fill;border-radius:6px}.hand-card.unplayable:after{background:#5a738a10}
.hand-clear{position:absolute;right:12px;bottom:calc(var(--hand-zone-height) + 71px);z-index:9;min-height:36px;padding:5px 10px;color:#425f76;background:#fff;border:1px solid #b3c6d5;border-radius:6px;font:400 12px Arial,sans-serif;box-shadow:0 2px 5px #17364c33}
.game-bottom{height:78px;min-height:78px;position:relative;display:flex;justify-content:space-between;align-items:center;padding:7px 10px max(7px,env(safe-area-inset-bottom));gap:10px;border-radius:10px 10px 0 0;background:linear-gradient(#fff,#e9e9e9);box-shadow:0 -2px 6px #17364c33;z-index:10;color:#7c858b}
.game-action{flex:1;min-width:75px;max-width:160px;text-align:center}
.game-bottom .primary{width:100%;height:56px;min-height:56px;min-width:0;padding:5px 8px;font:400 27px/1.1 Arial,sans-serif;border:1px solid #d0d0d0;border-radius:7px;background:#fff;color:#e6324e;box-shadow:0 1px 3px #0001}
.game-bottom .quiet-turn{font:400 15px Arial,sans-serif;padding:0;color:#7b8a94}
.game-self{flex:0 0 64px;display:flex;flex-direction:column;align-items:center;gap:0;position:relative}
.self-picture{display:block;position:relative;width:52px;height:52px;background:#f5f5f5;border:4px solid #aaa;border-radius:7px;box-shadow:0 1px 3px #0002}
.self-turn .self-picture{border-color:#9dcc18}.self-picture img{width:100%;height:100%;display:block;border-radius:2px;object-fit:cover}
.self-picture>b{position:absolute;right:-1px;top:-3px;color:#244155;background:#ffffffdb;min-width:14px;text-align:center;font:400 10px/14px Arial,sans-serif}
.self-picture>strong{position:absolute;bottom:0;left:0;right:0;color:#fff;background:#263c50a6;font:400 11px/1.1 Arial,sans-serif;text-align:center}
.game-self .game-timer{position:absolute;top:-6px;right:-4px;background:#fff;border-radius:3px;padding:0 2px;color:#6f777c;font:400 10px/14px Arial,sans-serif;white-space:nowrap}
.game-tool{flex-shrink:0;width:44px;height:44px;min-width:44px;border-radius:7px;border:1px solid #ddd;background:#fff;color:#ed526b;box-shadow:0 1px 3px #0002;display:grid;place-items:center}
.game-tool svg{width:24px;height:24px}.game-tool[aria-label="Меню партии"] svg{stroke-width:3}
.game-pause{inset:42px 0 0}
@media(max-height:740px){
 .game-screen{--hand-zone-height:180px}.game-top{height:38px;padding-top:4px}.game-top strong{font-size:22px}.game-rule-strip{margin-left:20px;gap:7px}
 .game-felt{padding-top:88px}.game-opponents .opponent{top:8px}
 .opponent .op-avatar{width:50px;height:50px}.op-mini-hand{top:20px;transform:scale(.9)}
 .game-hand-scroll .hand-card{height:calc(var(--hand-card-width)*1.36);bottom:5px}
 .game-guidance{min-height:36px;font-size:13px}.game-guidance small{font-size:10px}
 .participants-4 .opponent.pos-0,.participants-4 .opponent.pos-2,.participants-5 .opponent.pos-0,.participants-5 .opponent.pos-3,.participants-6 .opponent.pos-0,.participants-6 .opponent.pos-4{top:80px}
 .participants-4 .game-felt,.participants-5 .game-felt,.participants-6 .game-felt{padding-top:132px}
 .participants-4 .table-pairs.many,.participants-5 .table-pairs.many,.participants-6 .table-pairs.many{--table-card-width:60px;--pair-width:79px;--pair-height:106px}
 .game-bottom{height:72px;min-height:72px;padding-top:5px;padding-bottom:max(5px,env(safe-area-inset-bottom))}
 .game-bottom .primary{min-height:52px;height:52px;font-size:25px}.self-picture{width:48px;height:48px}
 .game-table-zone{min-height:140px;padding:2px 5px}.game-pause{inset-block-start:38px}
}
@media(max-width:350px){.game-bottom{gap:6px;padding-left:8px;padding-right:8px}.game-self{flex-basis:54px}.game-bottom .primary{font-size:24px}.game-rule-strip{margin-left:12px;gap:7px}.game-rule-strip small{display:none}}
@media(max-height:620px){.game-screen{--hand-zone-height:158px}.game-guidance small{display:none}.game-guidance{min-height:24px}.hand-card{height:calc(var(--hand-card-width)*1.2)}.game-table-zone{min-height:115px}}
.opponent>small{display:none}

/* Small alignment pass: stable central seat, quieter piles and clearer counters. */
.game-top{align-items:center;padding-left:14px;padding-right:14px}
.game-rule-strip{color:#d9e7f0b3;gap:8px}
.game-rule-strip small{color:#dce9f0b3}
.game-top .game-stake strong{font-size:23px;font-variant-numeric:tabular-nums}
.participants-2 .op-avatar,.participants-3 .op-avatar{width:62px;height:62px}
.participants-2 .op-mini-hand,.participants-3 .op-mini-hand{top:31px}
.opponent .op-count{top:-3px;right:-2px;min-width:19px;height:19px;border:1px solid #d8e3eb;border-radius:3px;background:#fff;color:#304859;font:400 12px/17px Arial,sans-serif}
.opponent .op-avatar strong{background:#253e50c7;line-height:1.4}
.table-pair:not(:has(.cover)) .table-card{left:calc((100% - var(--table-card-width))/2);transform:rotate(-2deg)}
.table-card.cover{transform:rotate(5deg)}
.stock-back,.participants-5 .game-stock .stock-back,.participants-6 .game-stock .stock-back{left:-19px}
.trump-face,.participants-5 .trump-face,.participants-6 .trump-face{left:-4px;transform:rotate(96deg)}
.game-stock b,.participants-5 .game-stock b,.participants-6 .game-stock b{left:10px;font-size:25px}
.game-discard,.participants-5 .game-discard,.participants-6 .game-discard{right:-20px;height:106px}
.discard-back:nth-child(2){top:10px;left:2px;transform:rotate(9deg)}
.discard-back:nth-child(3){top:20px;left:0;transform:rotate(-3deg)}
.game-discard small{top:109px;right:27px;font-size:11px}
.game-guidance{font-size:14px;line-height:1.4}
.game-guidance small{color:#dfebf3;margin-top:2px}
.hand-card.selected{box-shadow:0 0 0 2px #e2f0ff,0 -3px 10px #17364c55}
.game-bottom{display:grid;grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr);gap:10px;height:82px;min-height:82px;padding:8px 12px max(8px,env(safe-area-inset-bottom));background:linear-gradient(#fff,#f0f1f2)}
.game-action{width:100%;max-width:none}
.game-bottom .primary{height:54px;min-height:54px;font-size:26px;box-shadow:0 1px 2px #17364c0c}
.game-self{height:64px;gap:2px;justify-content:center}
.self-picture{width:50px;height:50px;flex-shrink:0;border-width:3px}
.self-picture>b{top:-4px;right:-3px;min-width:18px;height:18px;background:#fff;border:1px solid #d8e3eb;border-radius:3px;font:400 11px/16px Arial,sans-serif}
.self-picture>strong{background:#253e50c7;line-height:1.2}
.game-self .game-timer{position:static;height:12px;min-height:12px;padding:0;background:none;color:#5d7180;font:400 10px/12px Arial,sans-serif}
.game-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px;min-width:0}
.game-tool{width:44px;height:44px;min-width:44px;border-color:#d8dee2;box-shadow:0 1px 2px #17364c0d;color:#dc4b64}
.game-tool:focus-visible,.game-bottom .primary:focus-visible{outline:2px solid #3975a0;outline-offset:3px}
.hand-clear{bottom:calc(var(--hand-zone-height) + 80px)}
@media(max-width:350px){
 .game-bottom{grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr);gap:7px;padding-left:8px;padding-right:8px}
 .game-tools{gap:6px}.game-bottom .primary{font-size:24px}
 .game-top{padding-left:10px;padding-right:10px}
}
@media(max-height:740px){
 .participants-2 .op-avatar,.participants-3 .op-avatar{width:56px;height:56px}
 .participants-2 .op-mini-hand,.participants-3 .op-mini-hand{top:25px}
 .game-bottom{height:76px;min-height:76px;padding-top:5px;padding-bottom:max(5px,env(safe-area-inset-bottom))}
 .game-self{height:62px}.self-picture{width:48px;height:48px}
 .game-guidance{font-size:13px}.hand-clear{bottom:calc(var(--hand-zone-height) + 74px)}
}

/* Cards travel in an isolated clipped layer; the table itself never reflows per frame. */
.card-motion-layer{position:fixed;z-index:9998;overflow:hidden;pointer-events:none;isolation:isolate;contain:layout paint;perspective:800px}
.motion-card{position:absolute;left:0;top:0;width:100px;height:150px;transform-origin:50% 50%;will-change:transform;pointer-events:none}
.motion-card-inner{position:relative;width:100%;height:100%;transform-style:preserve-3d;box-shadow:0 3px 7px #18384f3d;border-radius:6px}
.motion-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;border-radius:6px;backface-visibility:hidden;pointer-events:none}
.motion-card .motion-back{transform:rotateY(180deg)}
.motion-deal-pack{position:absolute;width:40px;height:60px;border-radius:4px;box-shadow:0 2px 4px #18384f44;pointer-events:none}
.game-screen.is-animating .hand-card,.game-screen.is-animating .game-action,.game-screen.is-animating .hand-clear{pointer-events:none}
.game-screen.is-animating .game-guidance{transition:none}
.game-screen.is-animating .table-empty{visibility:hidden}
.drag-card{transition:box-shadow 110ms ease;touch-action:none}
.table-card.target,.table-empty.actionable{transition:outline-color 120ms ease,background-color 120ms ease}
@media(prefers-reduced-motion:reduce){.drag-card,.table-card.target,.table-empty.actionable{transition:none}.motion-card{will-change:auto}}

/* Opponents hold a real-count fan, capped visually at six backs. */
.opponent .op-mini-hand{display:block;top:42px;left:calc(50% - 55px);width:110px;height:66px;transform:none;z-index:1}
.opponent .op-mini-hand img{left:calc(50% - 16px + var(--fan-x));top:var(--fan-y);width:32px;height:48px;transform:rotate(var(--fan-angle));transform-origin:50% 110%;border:1px solid #f4f1e3;box-shadow:0 1px 3px #17364c55}
.participants-5 .opponent .op-mini-hand,.participants-6 .opponent .op-mini-hand{top:33px;transform:scale(.87)}
.game-screen.large-hand .opponent .op-mini-hand{display:block;top:30px;transform:scale(.65);transform-origin:50% 0}
.game-screen.large-hand .op-mini-hand img{display:block}
@media(max-height:740px){.participants-2 .opponent .op-mini-hand,.participants-3 .opponent .op-mini-hand{top:36px}}

/* Focus must never pan the entire table toward clipped stock/discard piles. */
.phone.is-game #main{overflow:clip}
