/* Desktop-only: transparent structural wrapper on phones; legacy mobile CSS remains authoritative. */
.hud-hand-frame{display:contents}
@media (min-width:821px) and (hover:hover) and (pointer:fine){
body:not(.is-setup) .reference-hud .hud-hand-frame{display:block}
/* V91 — actual reference-derived metal frames, native cards/actions and live scores. */
body:not(.is-setup) .controls.reference-hud{--hud-frame:url('./assets/hud-panel-frame-v91.webp?v=20261025-desktop-hud-v92');--hud-face:url('./assets/hud-check-face-v91.webp?v=20261025-desktop-hud-v92');position:relative;inset:auto;display:grid;grid-template-columns:minmax(0,1fr) 124px minmax(200px,250px);grid-template-rows:minmax(34px,auto) 208px;grid-template-areas:'hint hint hint' 'hand action scores';align-items:stretch;width:100%;height:auto;min-height:0;margin:0;padding:8px 12px 12px;gap:12px;border:0;border-radius:0;overflow:visible;background:radial-gradient(ellipse at 30% 100%,#13444438,transparent 60%),linear-gradient(180deg,#050d15aa,#07131bf5 50%,#040c12);box-shadow:0 -12px 32px #0005;backdrop-filter:none;isolation:isolate}
body:not(.is-setup) .reference-hud #actionHint{grid-area:hint;position:relative;display:flex;align-items:center;justify-content:center;justify-self:center;gap:12px;width:calc(100% - 40px);max-width:none;min-height:34px;max-height:none;padding:5px 26px;border:1px solid #aa895773;border-radius:22px;background:linear-gradient(180deg,#132331e8,#06101be8);box-shadow:inset 0 0 0 2px #020a12,inset 0 0 0 3px #a38b4a33,0 0 12px #46b8bf15;color:#e4d8ba;font:500 13px/1.4 Georgia,'Times New Roman',serif;letter-spacing:.01em;text-align:center;overflow:hidden}
body:not(.is-setup) .reference-hud #actionHint::before{content:'!';position:static;display:grid;place-items:center;flex:0 0 21px;width:21px;height:21px;border:1px solid #d7bf82;border-radius:50%;background:radial-gradient(circle at 38% 25%,#beaa75,#66512b 65%,#231e14);box-shadow:inset 0 0 0 2px #291e14,0 0 12px #c9ac6644;color:#f5e4b7;font:bold 14px/1 Georgia,serif}
body:not(.is-setup) .reference-hud .action-hint-text{flex:0 1 auto;min-width:0;white-space:normal;overflow:visible;text-overflow:clip}
body:not(.is-setup) .reference-hud .action-hint-text::before,body:not(.is-setup) .reference-hud .action-hint-text::after{content:'◆';display:inline-block;margin:0 12px;color:#b89960;font-size:8px;vertical-align:middle;text-shadow:0 0 7px #cda54c55}
body:not(.is-setup) .reference-hud .hud-hand-frame,body:not(.is-setup) .reference-hud #scoreList{position:relative;isolation:isolate;min-width:0;min-height:0;border:0;border-radius:10px;background:radial-gradient(ellipse at 50% 110%,#23657726,transparent 65%),linear-gradient(145deg,#0e1b26f5,#07111cf2);box-shadow:inset 0 0 22px #0008,0 0 14px #438b8820}
body:not(.is-setup) .reference-hud .hud-hand-frame{grid-area:hand;container-type:inline-size;overflow:visible}
body:not(.is-setup) .reference-hud .hud-hand-frame::after,body:not(.is-setup) .reference-hud #scoreList::after{content:'';position:absolute;inset:0;z-index:120;border:14px solid transparent;border-image:var(--hud-frame) 14 stretch;pointer-events:none}
body:not(.is-setup) .reference-hud .hud-hand-frame::before{content:'';position:absolute;z-index:0;bottom:10px;left:8%;width:84%;height:42%;border:1px solid #c1a66348;border-radius:50%;background:repeating-radial-gradient(ellipse at center,transparent 0 11%,#baa05e33 11.3% 11.7%,transparent 12% 24%);box-shadow:0 0 16px #a39b5514,inset 0 0 12px #51b8b91b;transform:perspective(300px) rotateX(42deg);pointer-events:none;animation:hud91-light 5s ease-in-out infinite alternate}
body:not(.is-setup) .reference-hud #hand{position:relative;z-index:1;display:flex;justify-content:center;align-items:flex-end;width:100%;height:100%;min-height:0;max-height:none;padding:22px 26px 15px;margin:0;gap:0;border:0;border-radius:10px;background:none;box-shadow:none;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#a48e5955 transparent;perspective:900px}
body:not(.is-setup) .reference-hud .hand-slot{--hud-w:clamp(48px,calc((100cqw - 56px) / (var(--hand-count)*.6 + .4)),120px);flex:0 0 var(--hud-w);width:var(--hud-w);min-width:var(--hud-w);max-width:none;height:auto;min-height:0;margin-inline:calc(var(--hud-w)*-.2);padding:0;border:0;border-radius:8px;background:transparent;box-shadow:none;transform-origin:50% 110%;transform:translateY(calc(var(--hand-offset)*var(--hand-offset)*.65px)) rotate(calc(var(--hand-offset)*3.8deg))!important;filter:drop-shadow(0 7px 6px #0008);z-index:calc(20 + var(--hand-index));transition:transform 160ms ease,filter 160ms ease}
body:not(.is-setup) .reference-hud .hand-slot .game-card,body:not(.is-setup) .reference-hud .hand-slot .card-back{width:100%;height:calc(var(--hud-w)*1.45);min-height:0;border:1px solid #d1c7aa9c;border-radius:7px;box-shadow:inset 0 0 0 1px #342d1e,0 5px 10px #0008}
body:not(.is-setup) .reference-hud .hand-slot:not(:disabled):hover,body:not(.is-setup) .reference-hud .hand-slot:focus-visible{z-index:90;transform:translateY(-10px) rotate(calc(var(--hand-offset)*2deg))!important;filter:drop-shadow(0 5px 8px #7dcecf38)}
body:not(.is-setup) .reference-hud .hand-slot.selected{z-index:100;transform:translateY(-14px) rotate(0deg) scale(1.035)!important;filter:brightness(1.05) drop-shadow(0 0 6px #78c5c55c);box-shadow:none}
body:not(.is-setup) .reference-hud .hand-slot.selected .game-card{border-color:#e3d29b;box-shadow:0 0 0 1px #68bebe77,0 0 15px #65c4c439,0 8px 16px #0009}
body:not(.is-setup) .reference-hud #hand.hand-locked::before{position:absolute;z-index:110;top:6px;left:50%;margin:0;transform:translateX(-50%);padding:2px 10px;border:0;border-radius:10px;background:#06101de0;color:#b6c7cd;font:10px/1.3 Georgia,serif;pointer-events:none}
body:not(.is-setup) .reference-hud .turn-actions{grid-area:action;position:relative;display:flex;flex-direction:column;align-items:stretch;justify-content:center;min-width:0;width:100%;height:100%;min-height:0;margin:0;padding:0;gap:6px;overflow:visible;background:transparent;border:0}
body:not(.is-setup) .reference-hud .turn-actions::before{content:'◆';position:absolute;left:-10px;top:50%;transform:translate(-50%,-50%);font-size:9px;color:#baa46d;text-shadow:0 0 9px #cfa95c80;pointer-events:none}
body:not(.is-setup) .reference-hud #endTurnBtn,body:not(.is-setup) .reference-hud #readyBtn{position:relative;flex:1 1 auto;min-width:0;width:100%;max-width:none;min-height:44px;height:auto;padding:18px 12px;border:0;border-radius:9px;background:var(--hud-face) center/100% 100% no-repeat;color:#eee6cd;font:600 18px/1.35 Georgia,'Times New Roman',serif;text-transform:none;letter-spacing:.02em;text-shadow:0 1px 3px #000;box-shadow:0 0 14px #b6954d1f,0 6px 16px #0005;overflow:hidden;overflow-wrap:anywhere;white-space:normal}
body:not(.is-setup) .reference-hud #endTurnBtn:disabled{opacity:.55;filter:saturate(.35);box-shadow:none;cursor:default}
body:not(.is-setup) .reference-hud #endTurnBtn:not(:disabled):hover,body:not(.is-setup) .reference-hud #readyBtn:not(:disabled):hover{filter:brightness(1.12);box-shadow:0 0 17px #bfa26b3d}
body:not(.is-setup) .reference-hud #endTurnBtn.mastery-available{color:#fff0bd;box-shadow:0 0 0 1px #edcd81,0 0 24px #dbbd6470}
body:not(.is-setup) .reference-hud .turn-actions>button[hidden]{display:none}
body:not(.is-setup) .reference-hud #awayBtn,body:not(.is-setup) .reference-hud #quitGameBtn{flex:0 0 auto;width:100%;min-width:0;min-height:32px;height:auto;max-width:none;padding:5px 8px;border:1px solid #ab91565c;border-radius:5px;background:#0b1925;color:#cdd4d4;font:11px/1.3 Georgia,serif;white-space:normal}
body:not(.is-setup) .reference-hud #scoreList{grid-area:scores;display:flex;flex-direction:column;gap:0;align-items:stretch;justify-content:flex-start;width:100%;height:100%;padding:12px 13px;overflow:auto;scrollbar-width:thin;scrollbar-color:#a48e5955 transparent}
body:not(.is-setup) .reference-hud #scoreList .score-row{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:8px;flex:0 0 auto;min-width:0;min-height:49px;padding:7px 3px;border:0;border-bottom:1px solid #7f8c8e29;border-radius:0;background:transparent;box-shadow:none;color:#dbded9;font:12px/1.3 Georgia,'Times New Roman',serif}
body:not(.is-setup) .reference-hud #scoreList .score-row:last-child{border-bottom:0}
body:not(.is-setup) .reference-hud #scoreList .score-row.active{background:linear-gradient(90deg,#509b9330,transparent);color:#f4ead0}
body:not(.is-setup) .reference-hud #scoreList .score-dot{width:6px;height:6px;border:0;border-radius:50%;box-shadow:0 0 8px currentColor}
body:not(.is-setup) .reference-hud #scoreList .score-row>span:nth-child(2){min-width:0;overflow-wrap:anywhere;white-space:normal}
body:not(.is-setup) .reference-hud #scoreList .score-row small{display:block;margin-top:2px;color:#8dc9bc;font:10px/1.35 Georgia,serif;white-space:normal}
body:not(.is-setup) .reference-hud #scoreList .score-row>strong{display:grid;place-items:center;min-width:29px;min-height:24px;padding:3px 7px;border:1px solid #718b962e;border-radius:7px;background:linear-gradient(#142331,#08121d);color:#e8e3d5;font:600 16px/1 Georgia,serif;font-variant-numeric:tabular-nums}
body:not(.is-setup) .reference-hud button:focus-visible,body:not(.is-setup) .reference-hud #scoreList:focus-visible{outline:2px solid #84dcde;outline-offset:2px}
@keyframes hud91-light{from{opacity:.58}to{opacity:.82}}
@media(max-width:1050px) and (min-width:821px){body:not(.is-setup) .controls.reference-hud{grid-template-columns:minmax(0,1fr) 100px 195px;gap:10px}body:not(.is-setup) .reference-hud #scoreList{padding:10px}body:not(.is-setup) .reference-hud #scoreList .score-row{font-size:11px;gap:5px}}
@media(max-width:820px) and (orientation:portrait){
body:not(.is-setup) .controls.reference-hud{position:absolute;inset:auto 0 0;z-index:30;height:240px;grid-template-columns:minmax(0,1fr) 74px;grid-template-rows:30px minmax(0,1fr) 50px;grid-template-areas:'hint hint' 'hand action' 'scores scores';padding:5px 7px max(5px,env(safe-area-inset-bottom));gap:6px;background:linear-gradient(180deg,#07111acf,#050e17f7 30%);box-shadow:0 -8px 26px #0005}
body:not(.is-setup) .reference-hud #actionHint{width:100%;min-height:30px;max-height:30px;padding:3px 8px;gap:7px;font-size:10px}
body:not(.is-setup) .reference-hud #actionHint::before{flex-basis:17px;width:17px;height:17px;font-size:12px}
body:not(.is-setup) .reference-hud .action-hint-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:not(.is-setup) .reference-hud .action-hint-text::before,body:not(.is-setup) .reference-hud .action-hint-text::after{display:none}
body:not(.is-setup) .reference-hud #hand{padding:13px 11px 12px}
body:not(.is-setup) .reference-hud .hand-slot{--hud-w:clamp(46px,calc((100cqw - 22px) / (var(--hand-count)*.45 + .55)),78px);margin-inline:calc(var(--hud-w)*-.275);transform:translateY(calc(var(--hand-offset)*var(--hand-offset)*.3px)) rotate(calc(var(--hand-offset)*2.5deg))!important}
body:not(.is-setup) .reference-hud .hand-slot.selected{transform:translateY(-8px) rotate(0deg) scale(1.02)!important}
body:not(.is-setup) .reference-hud #endTurnBtn,body:not(.is-setup) .reference-hud #readyBtn{padding:8px;font-size:14px}
body:not(.is-setup) .reference-hud #scoreList{flex-direction:row;align-items:stretch;padding:5px 9px;overflow-x:auto;overflow-y:hidden;border-radius:7px}
body:not(.is-setup) .reference-hud #scoreList::after{display:none}
body:not(.is-setup) .reference-hud #scoreList{border:1px solid #9f8b4f6b;box-shadow:inset 0 0 0 2px #050c13,inset 0 0 0 3px #4c8c8d33}
body:not(.is-setup) .reference-hud #scoreList .score-row{flex:1 0 124px;grid-template-columns:6px minmax(0,1fr) auto;gap:5px;min-height:0;padding:0 8px;border:0;border-right:1px solid #727c7b3b;font-size:10px}
body:not(.is-setup) .reference-hud #scoreList .score-row small{font-size:9px}
body:not(.is-setup) .reference-hud #scoreList .score-row>strong{min-width:24px;min-height:23px;padding:3px;font-size:13px}
body:not(.is-setup) .reference-hud .turn-actions::before{display:none}
body:not(.is-setup) .reference-hud #awayBtn,body:not(.is-setup) .reference-hud #quitGameBtn{font-size:10px;min-height:26px;padding:3px}
}
@media(orientation:landscape) and (max-height:600px){
body:not(.is-setup) .controls.reference-hud{grid-template-columns:minmax(0,1fr) 88px minmax(160px,210px);grid-template-rows:28px 128px;padding:4px 10px 5px;gap:6px}
body:not(.is-setup) .reference-hud #actionHint{min-height:28px;font-size:11px}
body:not(.is-setup) .reference-hud #hand{padding:14px 18px 10px}
body:not(.is-setup) .reference-hud .hand-slot{--hud-w:clamp(46px,calc((100cqw - 36px) / (var(--hand-count)*.5 + .5)),76px);margin-inline:calc(var(--hud-w)*-.25)}
body:not(.is-setup) .reference-hud #endTurnBtn,body:not(.is-setup) .reference-hud #readyBtn{font-size:14px}
body:not(.is-setup) .reference-hud #scoreList{padding:7px 10px}
body:not(.is-setup) .reference-hud #scoreList .score-row{font-size:10px;min-height:36px;padding:3px;gap:5px}
}
/* Fit complete original artwork: do not crop card footers behind redundant metadata. */
body:not(.is-setup) .reference-hud .hand-slot .card-art{flex:1 1 auto;width:100%;height:100%;min-height:0;aspect-ratio:auto;object-fit:contain;background:none}
body:not(.is-setup) .reference-hud .hand-slot .card-meta{display:none}
body:not(.is-setup) .reference-hud #hand{padding-bottom:23px}
@media(max-width:820px) and (orientation:portrait){
body:not(.is-setup) .controls.reference-hud{height:262px;grid-template-rows:34px minmax(0,1fr) 60px}
body:not(.is-setup) .reference-hud #actionHint{min-height:34px;max-height:34px;font-size:11px;color:#ede4cf}
body:not(.is-setup) .reference-hud #hand{padding:17px 24px 26px}
body:not(.is-setup) .reference-hud .hand-slot{--hud-w:clamp(46px,calc((100cqw - 48px) / (var(--hand-count)*.45 + .55)),74px);transform:translateY(calc(var(--hand-offset)*var(--hand-offset)*.55px)) rotate(calc(var(--hand-offset)*3.5deg))!important}
body:not(.is-setup) .reference-hud #scoreList .score-row{flex-basis:152px;font-size:12px}
body:not(.is-setup) .reference-hud #scoreList .score-row small{font-size:10.5px}
body:not(.is-setup) .poker-table .seat-0,body:not(.is-setup) .poker-table .seat-6{bottom:270px}
body:not(.is-setup) .poker-table .seat-1,body:not(.is-setup) .poker-table .seat-3,body:not(.is-setup) .poker-table .seat-4{top:110px}
body:not(.is-setup) .poker-table .seat-2,body:not(.is-setup) .poker-table .seat-5{top:158px}
}
@media(max-width:360px) and (orientation:portrait){body:not(.is-setup) .reference-hud .hand-slot{--hud-w:clamp(44px,calc((100cqw - 48px) / (var(--hand-count)*.35 + .65)),70px);margin-inline:calc(var(--hud-w)*-.325)}}
body:not(.is-setup) .reference-hud .hud-hand-frame::after,body:not(.is-setup) .reference-hud #scoreList::after{filter:saturate(.75) brightness(.96)}
body:not(.is-setup) .reference-hud .hud-hand-frame::before{left:5%;width:90%;height:56%;bottom:4px}
@media(orientation:landscape) and (max-height:600px){body:not(.is-setup) .app-shell{display:grid;height:100dvh;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:30px minmax(0,1fr) 171px;grid-template-areas:'status' 'board' 'controls';gap:4px}body:not(.is-setup) .board-wrap,body:not(.is-setup) .board,body:not(.is-setup) .poker-table{min-height:0;height:100%}body:not(.is-setup) .reference-hud .hand-slot{--hud-w:clamp(44px,calc((100cqw - 36px) / (var(--hand-count)*.5 + .5)),62px);transform:translateY(calc(var(--hand-offset)*var(--hand-offset)*.4px)) rotate(calc(var(--hand-offset)*2.2deg))!important}body:not(.is-setup) .reference-hud .hand-slot.selected{transform:translateY(-6px) rotate(0deg) scale(1.02)!important}}
@media(max-width:820px) and (orientation:portrait){body:not(.is-setup) .reference-hud #scoreList:not(:has(.score-row:nth-child(4))){display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);overflow:hidden}body:not(.is-setup) .reference-hud #scoreList:not(:has(.score-row:nth-child(4))) .score-row{min-width:0;padding:0 4px;gap:4px}body:not(.is-setup) .reference-hud #scoreList .score-row>span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body:not(.is-setup) .reference-hud #scoreList .score-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
@media(prefers-reduced-motion:reduce){body:not(.is-setup) .reference-hud .hud-hand-frame::before{animation:none}body:not(.is-setup) .reference-hud .hand-slot{transition:none}}

}
