/* v40: one screen-aligned control grid over the physical table. */
.game .player-dock{inset:auto 4.7% 6%;grid-template-columns:19% minmax(0,1fr) 20%;gap:3%;align-items:end}
.game .turn-text{align-self:end;font-size:2.2cqw;line-height:1.2;color:#ead9b6;position:relative}
.game .turn-title{white-space:normal;overflow:visible;text-wrap:balance}
.game.is-your-turn .turn-title::before{content:'';position:absolute;left:-1.3cqw;top:.8cqw;width:.3cqw;height:.45cqw;min-width:3px;min-height:5px;border-radius:50%;background:#f0dbaa;box-shadow:0 0 9px #ffe2a75c}
.game .turn-text small{font:1.32cqw/1.4 "Literata", Georgia,serif;margin-top:.65cqw;color:#dbcfb6;text-wrap:pretty}
.game .turn-text .hand-count-text{font-size:1.05cqw;color:#adae96;margin-top:1.2cqw}
.game .control-stack{align-self:end;margin:0;display:flex;flex-direction:column;gap:.7cqw}
.game .sort-label{order:0;text-align:center;font:1.1cqw/1.2 "Literata", Georgia,serif;color:#c6bea5}
.game .hand-tools{order:1;display:grid;grid-template-columns:1fr 1fr;gap:4px;height:3.3cqw;min-height:40px}
.game .actions{order:2;height:4.4cqw;min-height:48px;margin-top:.8cqw}
.game .actions:empty{visibility:hidden}
.game .actions button,.game .hand-tools button{border:1px solid #8c754b;border-radius:6px;padding:6px 8px;height:100%;color:#eadbbd;text-shadow:0 1px 2px #0008;box-shadow:inset 0 1px 1px #dfc89530,inset 0 -2px 3px #0007,0 3px 6px #0005;background:linear-gradient(180deg,#28372b,#14251b);font:1.08cqw/1.2 "Literata", Georgia,serif}
.game .actions button::before,.game .hand-tools button::before,.game .hand-tools button::after{display:none}
.game .actions button{font-size:1.75cqw;background:linear-gradient(165deg,#673a32,#492620 55%,#321b17);border-color:#b09564;box-shadow:inset 0 0 0 2px #241d144d,inset 0 2px 2px #e4b99730,inset 0 -3px 4px #160b0a80,0 4px 8px #0007}
.game .actions button:hover{background:linear-gradient(165deg,#79473b,#5b3026);box-shadow:inset 0 1px 1px #e4b99750,0 4px 10px #0007}
.game .hand-tools button[aria-pressed=true]{background:linear-gradient(#3e4a33,#2a3626);border-color:#a9966d;color:#f2e4c5;box-shadow:inset 0 0 0 1px #ddc59025,0 2px 5px #0005}
.game .hand-tools button:hover{background:#354330;box-shadow:inset 0 1px 1px #dfc89530,0 3px 6px #0005}
.game .actions button:active,.game .hand-tools button:active{translate:0 1px;box-shadow:inset 0 3px 6px #0007}
body.in-game #sound,.game .game-menu{border-color:#89764f;background:linear-gradient(150deg,#26372b,#101c16);box-shadow:inset 0 1px 1px #f1dfb82b,0 3px 7px #0006}
body.in-game #sound:hover,.game .game-menu:hover{background:#304030;box-shadow:inset 0 1px 2px #f1dfb840,0 3px 8px #0006}
.game .opponent .portrait{border:1px solid #ad9566;box-shadow:0 0 0 2px #172017,0 4px 8px #0006}
.game .opponent.active .portrait{box-shadow:0 0 0 2px #6f6040,0 0 12px #e1c88722,0 4px 8px #0006}
.game .hand-area{inset:73% 26% 0!important}
.game .hand .card{--card-w:13.2cqw;bottom:-13cqh}
.game .play-area{left:22%;right:22%;top:32%;bottom:33%}
.game .table-empty{font-size:1.25cqw;color:#ceccb3;opacity:.6}
/* The menu shares the quiet material palette; remove old engraved image borders. */
dialog#modal::before,.menu-resume::before{display:none}
dialog#modal{border:1px solid #89754d;border-radius:10px;background:linear-gradient(150deg,#27382a,#122218);box-shadow:0 24px 80px #000b,inset 0 1px 0 #c9b58a25}
.menu-resume{border:1px solid #a99060;background:linear-gradient(155deg,#62382e,#3e221c)}
.menu-resume:hover{background:linear-gradient(155deg,#764536,#503025)}
@media(max-width:900px) and (orientation:portrait){
 .game .player-dock{inset:auto 5% 25%;grid-template-columns:minmax(0,1fr) minmax(158px,1fr);gap:14px;align-items:end}
 .game .turn-text{font-size:22px}.game .turn-text small{font-size:14px;margin-top:7px}.game .turn-text .hand-count-text{font-size:13px;margin-top:10px}
 .game.is-your-turn .turn-title::before{left:-9px;top:9px;width:3px;height:5px}
 .game .control-stack{grid-column:2;gap:6px}.game .sort-label{font-size:12px}
 .game .hand-tools{height:42px;min-height:42px;gap:4px}.game .hand-tools button{font-size:12px;padding:4px 3px}
 .game .actions{height:46px;min-height:46px;margin-top:6px}.game .actions button{font-size:17px;padding:5px 7px}
 .game .hand-area{inset:80% 5% 0!important}.game .hand .card{--card-w:min(38cqw,23cqh);bottom:-12cqh}
 .game .play-area{left:5%;right:5%;top:36%;bottom:44%}.game .table-empty{font-size:15px}
 .game .table-stats{inset:30% 5% auto!important}
 .game .opponents,.game:has(.opponent:only-child) .opponents{top:9%!important}
}
@media(max-height:700px) and (orientation:portrait){
 .game .player-dock{bottom:23%}.game .turn-text{font-size:20px}.game .turn-text small{font-size:13px}.game .turn-text .hand-count-text{font-size:12px;margin-top:7px}
 .game .hand .card{--card-w:min(37cqw,23cqh);bottom:-13cqh}
 .game .play-area{top:36%;bottom:47%}.game .table-stats{inset:30% 5% auto!important}
 .game .sort-label{font-size:11px}.game .hand-tools{height:40px;min-height:40px}.game .actions{height:44px;min-height:44px}
}
@media(max-height:500px) and (orientation:landscape){
 .game .player-dock{inset:auto 4.7% 5%;grid-template-columns:23% minmax(0,1fr) 25%;gap:2%}
 .game .turn-text{font-size:19px}.game .turn-text small{font-size:12px}.game .turn-text .hand-count-text{font-size:11px;margin-top:7px}
 .game .control-stack{gap:4px}.game .sort-label{font-size:11px}.game .hand-tools{min-height:32px;height:32px}.game .hand-tools button{font-size:11px;padding:3px}
 .game .actions{min-height:36px;height:36px;margin-top:3px}.game .actions button{font-size:16px}
 .game .hand-area{inset:76% 29% 0!important}.game .hand .card{--card-w:12cqw;bottom:-14cqh}
 .game .table-empty{font-size:13px}
}
