/* All standing hands use the same 1:1.4 face ratio as the local player's hand. */
#game-screen .opponent-rack .back-hand .tile{width:34px;height:47.6px;--tile-depth:21px}
#game-screen .wall-top{top:27%}
#game-screen .river-top{top:31%}
#game-screen .wall-stack.is-treasure-target .wall-layer:last-of-type .tile-front{animation:treasure-glow .7s ease-in-out infinite alternate}
@keyframes treasure-glow{from{box-shadow:0 0 8px 5px #f6da72,inset 0 0 12px #ffe8a4}to{box-shadow:0 0 24px 10px #72f3bc,inset 0 0 16px #d1ffe8}}
#game-screen .wall-pick{position:absolute;left:50%;top:50%;width:max(66px,calc(44px/var(--table-scale)));height:max(72px,calc(44px/var(--table-scale)));transform:translate(-50%,-50%) translateZ(calc((var(--pick-level) + 1)*22px + 2px));border:0;background:transparent;pointer-events:auto;cursor:pointer;opacity:1;touch-action:manipulation}
#game-screen .wall-pick:disabled{pointer-events:none;opacity:1}
#game-screen .wall-pick:focus-visible{outline:3px solid #ffe5a0;border-radius:10px}
#table-flights{position:absolute;inset:0;pointer-events:none;z-index:40;overflow:hidden}
.flying-tile{position:absolute;left:0;top:0;will-change:transform,opacity;filter:drop-shadow(0 4px 4px #0006)}
.flying-tile .tile{width:100%;height:100%;--tile-depth:3px}
body .treasure-reveal{position:fixed;left:calc(var(--physical-width)/2 + var(--viewport-x,0px));top:calc(var(--physical-height)/2 + var(--viewport-y,0px));margin:0;transform:translate(-50%,-50%);padding:12px 30px 18px;border:1px solid #c9b47688;border-radius:20px;background:radial-gradient(ellipse at 50% 40%,#234f49f5,#102e29f5);color:#f3dfad;text-align:center;overflow:visible;max-height:none;max-width:none}
body.rotated-screen .treasure-reveal{transform:translate(-50%,-50%) rotate(90deg)}
.treasure-reveal::backdrop{background:#041e1bb8;backdrop-filter:blur(3px)}
.treasure-reveal h2{font:20px/1.4 serif;letter-spacing:5px;margin:0 0 8px}
.scratch-card{--scratch-height:min(260px,calc(var(--app-height) - 110px));position:relative;width:calc(var(--scratch-height)/1.4);height:var(--scratch-height);margin:auto;box-shadow:0 0 35px #dfb86144;border-radius:9px}
.scratch-card>.tile{position:absolute;inset:0;width:100%;height:100%;--tile-depth:0px;transform:none}
.scratch-card .tile-side,.scratch-card .tile-under{display:none}
.scratch-card canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair;border-radius:9px;transition:opacity .35s;z-index:2}
.scratch-card.revealed canvas{opacity:0;pointer-events:none}
.treasure-reveal p{margin:12px 0 0;font-size:13px;color:#d3c9ac}
.treasure-reveal p:empty{display:none}

#game-screen .is-treasure-target:after{content:"";position:absolute;inset:-5px;border:3px solid #ffe478;border-radius:5px;transform:translateZ(calc((var(--pick-level) + 1)*22px + 4px));background:#ffdf6b22;box-shadow:0 0 16px 7px #f3ce5a;animation:treasure-ring .65s ease-in-out infinite alternate;pointer-events:none}
@keyframes treasure-ring{to{border-color:#78ffbc;background:#5bffa533;box-shadow:0 0 24px 9px #47e0a5}}
