html.hand-playing,html.hand-playing body{overflow:hidden!important;height:100%}
#handRoot{position:fixed;inset:0;z-index:2200;display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100dvh;color:#f5ecd9;background:radial-gradient(ellipse at top,#173659,#080f22 65%);font-family:inherit;--hn-gold:#e5c482;--hn-cyan:#58dbe4;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
#handRoot *{box-sizing:border-box}#handRoot button,#handRoot select{font:inherit}#handRoot button{cursor:pointer;touch-action:manipulation}#handRoot button:disabled{opacity:.45;cursor:default}#handRoot button:focus-visible{outline:3px solid #6fe5eb;outline-offset:2px}
#handRoot .hn-top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 16px;border-bottom:1px solid #c8a66455;background:#0a172c;min-height:56px;font-size:13px}
#handRoot .hn-brand{display:flex;gap:10px;align-items:center}#handRoot .hn-brand img{width:38px;height:38px;border-radius:10px}#handRoot .hn-brand b{display:block;color:#efd390;font-size:19px}#handRoot small{display:block;font-size:11px;color:#b8c9df}#handRoot .hn-top button{background:#1a2a43;border:1px solid #be9d6555;border-radius:12px;width:40px;height:40px;color:#e8d9b8}
#handRoot .hn-lobby-wrap{display:grid;place-items:center;padding:16px;overflow:auto}#handRoot .hn-lobby{width:min(680px,94vw);padding:24px;border:1px solid #d9b77866;border-radius:24px;background:linear-gradient(145deg,#181e2b,#0b0f19);box-shadow:0 24px 70px #0009;text-align:center}
#handRoot .hn-lobby-title img{width:66px;height:66px;border-radius:18px}#handRoot h1{font-size:25px;color:#efd390;margin:10px}#handRoot p{margin:10px}#handRoot .hn-seats{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin:18px 0}#handRoot .hn-seats>div{background:#1a2c43;border:1px solid #7088a633;border-radius:14px;padding:10px 18px}#handRoot .hn-lobby-options{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}#handRoot select{display:block;background:#15253d;color:#f0e8d7;border:1px solid #a4885355;border-radius:10px;padding:8px;min-height:44px;margin-top:6px}#handRoot .hn-muted{color:#afbed2;font-size:13px}#handRoot .hn-gold{background:linear-gradient(120deg,#f3dda0,#c69a49)!important;color:#17243d!important;border:1px solid #efd69a!important;min-height:44px;padding:10px 24px;border-radius:12px;font-weight:700;box-shadow:inset 0 1px #fff7cd,0 4px 12px #0003}#handRoot #hnStart{width:100%;margin:10px 0}#handRoot .hn-rules{margin:14px 0;font-size:12px;text-align:right;color:#becbe0}#handRoot .hn-rules div{line-height:1.9;padding:10px}#handRoot .hn-results{display:grid;gap:9px;margin:20px 0}#handRoot .hn-results>div{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#1a2b44;border-radius:12px;padding:14px}
#handRoot .hn-table{min-height:0;margin:9px 12px 0;border:4px solid #172741;border-radius:65px 65px 24px 24px;box-shadow:0 0 0 1px #c7a86b88,inset 0 0 0 1px #efd49a66,inset 0 0 44px #02091f;background:radial-gradient(ellipse at 50% 35%,#23617855,transparent 63%),repeating-linear-gradient(35deg,#ffffff03 0 1px,transparent 1px 4px),linear-gradient(145deg,#142e4b,#0a1932 70%);padding:12px 18px 6px;display:grid;grid-template-rows:auto minmax(40px,1fr) auto auto auto auto auto;gap:6px}
#handRoot .hn-opponents{display:flex;justify-content:space-around;gap:8px}#handRoot .hn-player{display:flex;gap:7px;align-items:center;font-size:12px;padding:5px 12px;border:1px solid transparent;border-radius:16px}#handRoot .hn-avatar{display:grid;place-items:center;width:35px;height:35px;background:#162d4a;border:1px solid #ba9a5d;border-radius:50%;font-size:21px}#handRoot .hn-player.active{border-color:#5bdddf;background:#2ad6de13}#handRoot .hn-board{min-height:0;overflow:auto;display:flex;flex-wrap:wrap;gap:15px 22px;justify-content:center;align-content:center;padding:8px;scrollbar-width:thin}#handRoot .hn-table-mark{color:#d4b97955;letter-spacing:2px;text-align:center;font-size:24px;margin:auto}#handRoot .hn-table-mark small{font-size:13px;color:#72b7c477}
#handRoot .hn-card{display:inline-block;position:relative;flex-shrink:0;width:58px;height:82px;border:1px solid #d1c9b8;border-radius:7px;background:linear-gradient(115deg,#fffefa,#f0eee5);color:#182027;box-shadow:1px 4px 7px #0007;font-family:Georgia,'Times New Roman',serif;vertical-align:middle;padding:0}#handRoot .hn-card.red{color:#b02632}#handRoot .hn-corner{position:absolute;left:4px;top:4px;font-size:18px;text-align:center;line-height:1.02}#handRoot .hn-bottom{top:auto;left:auto;right:4px;bottom:4px;transform:rotate(180deg)}#handRoot .hn-pip{position:absolute;inset:22px 15px;display:grid;place-items:center;font-size:30px}#handRoot .hn-meld{direction:ltr;border:0;background:none;position:relative;padding:0 0 14px;color:#cdd9ea}#handRoot .hn-meld .hn-card+.hn-card{margin-left:-31px}#handRoot .hn-meld small{position:absolute;bottom:0;left:0;right:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:10px}#handRoot .hn-board.target .hn-meld{outline:2px solid #50dfe5;outline-offset:3px;border-radius:8px}
#handRoot .hn-piles{display:flex;align-items:center;justify-content:center;gap:24px}#handRoot .hn-pile{background:none;border:0;color:#b9c9df;padding:0;text-align:center}#handRoot .hn-pile small{margin-top:4px}#handRoot .hn-back{display:grid;place-items:center;width:58px;height:82px;border:3px solid #e8d4a8;outline:1px solid #91876a;border-radius:7px;background:#091b3b;box-shadow:2px 2px #c4baa2,4px 4px #3b465b,6px 6px #c4baa2;overflow:hidden}#handRoot .hn-back img{width:100%;height:auto}#handRoot .hn-empty{display:grid;place-items:center;width:58px;height:82px;border:1px dashed #a9b6c466;border-radius:7px}#handRoot .hn-turn{font-size:15px;color:#e8d5a8;text-align:center}#handRoot .hn-turn small{margin-top:5px}
#handRoot .hn-handline{display:flex;justify-content:space-between;font-size:12px;color:#64dfe4;border-top:1px solid #a8b9ce22;padding-top:4px}#handRoot .hn-hand{direction:ltr;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));padding:17px 37px 0 0;margin:0 auto;width:min(100%,900px);min-height:100px}#handRoot .hn-hand .hn-card{width:70px;height:94px;transition:transform .15s ease}#handRoot .hn-hand .hn-card.chosen{transform:translateY(-14px);outline:3px solid #50dbe1;z-index:10;box-shadow:0 0 15px #27d7e03b,1px 5px 10px #0008}#handRoot .hn-draft{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;font-size:11px;color:#f0d398}#handRoot .hn-draft span{padding:2px 8px;background:#b4984933;border-radius:6px}#handRoot .hn-notice{font-size:12px;min-height:16px;text-align:center;color:#f1d393}#handRoot .hn-tools{display:flex;gap:8px;justify-content:center;align-items:center;padding:9px 12px;background:#08162d}#handRoot .hn-tools button{min-height:42px;border:1px solid #667892;border-radius:11px;background:linear-gradient(#213751,#162740);color:#e5edf8;padding:8px 13px;font-size:12px;white-space:nowrap}
@media(orientation:landscape) and (max-height:550px){#handRoot .hn-top{min-height:42px;padding:3px 12px}#handRoot .hn-brand img{width:30px;height:30px}#handRoot .hn-brand b{font-size:15px}#handRoot .hn-top button{width:34px;height:34px}#handRoot .hn-table{margin-top:5px;padding:5px 15px 3px;gap:3px;border-radius:45px 45px 20px 20px}#handRoot .hn-avatar{width:27px;height:27px;font-size:17px}#handRoot .hn-player{padding:2px 7px}#handRoot .hn-piles{gap:18px}#handRoot .hn-piles .hn-card,#handRoot .hn-back,#handRoot .hn-empty{width:42px;height:56px}#handRoot .hn-piles .hn-corner{font-size:13px}#handRoot .hn-piles .hn-pip{inset:14px 10px;font-size:22px}#handRoot .hn-meld .hn-card{width:40px;height:54px}#handRoot .hn-meld .hn-card+.hn-card{margin-left:-19px}#handRoot .hn-meld .hn-corner{font-size:13px;left:2px;top:2px}#handRoot .hn-meld .hn-bottom{display:none}#handRoot .hn-meld .hn-pip{font-size:19px;inset:15px 10px}#handRoot .hn-board{padding:3px;gap:6px 16px}#handRoot .hn-hand{min-height:80px;padding-top:14px}#handRoot .hn-hand .hn-card{height:68px;width:58px}#handRoot .hn-tools{padding:5px 10px}#handRoot .hn-tools button{min-height:36px;padding:6px 11px}#handRoot .hn-notice{font-size:11px;min-height:13px}#handRoot .hn-lobby{padding:12px 22px}#handRoot .hn-lobby-title img{display:none}#handRoot .hn-seats{margin:10px 0}}
@media(orientation:portrait){#handRoot .hn-table{margin:7px;padding:12px 8px 6px;border-radius:32px 32px 20px 20px}#handRoot .hn-player{flex-direction:column;padding:3px;font-size:11px;text-align:center}#handRoot .hn-opponents{gap:3px}#handRoot .hn-hand{grid-template-columns:repeat(7,minmax(0,1fr));gap:12px 0;padding-right:20px}#handRoot .hn-hand .hn-card{width:52px;height:76px}#handRoot .hn-tools{flex-wrap:wrap;gap:6px}#handRoot .hn-tools button{padding:7px 9px;font-size:11px}#handRoot .hn-turn{font-size:12px}#handRoot .hn-piles{gap:12px}#handRoot .hn-top{font-size:11px;padding:6px 10px}#handRoot .hn-lobby{padding:18px}#handRoot .hn-results>div{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){#handRoot .hn-card{transition:none!important}}

/* Private arrangement: independent of turn and server melds. */
#handRoot .hn-private-hand{display:flex;flex-wrap:wrap;align-content:center;gap:10px;overflow:auto;min-height:80px;touch-action:none;direction:ltr;padding:14px 8px!important;}
#handRoot .hn-private-group{display:flex;flex-wrap:nowrap;align-items:center;padding:5px 9px;border:1px solid #d3b76b55;border-radius:12px;background:#06172c55;gap:0;}
#handRoot .hn-private-group .hn-card{margin:0 0 0 -18px!important;flex-shrink:0;transform:none;}
#handRoot .hn-private-group .hn-card:first-child{margin-left:0!important;}
#handRoot .hn-private-group .hn-card.chosen{transform:translateY(-9px);}
#handRoot .hn-private-hand.dragging{outline:2px dashed #67d9db;}
#handRoot .hn-tools{flex-wrap:wrap;gap:5px;padding:6px;}
#handRoot .hn-tools button{padding:8px 10px;min-height:36px;}
#handRoot .hn-lobby-options{flex-wrap:wrap;}
.hn-ledger{overflow:auto;max-height:35vh;margin:12px 0;}
.hn-ledger table{border-collapse:collapse;width:100%;font-size:14px;text-align:center;}
.hn-ledger td,.hn-ledger th{padding:9px;border-bottom:1px solid #d3b76b55;white-space:nowrap;}
.hn-dialog{color:#eee;background:#10263c;border:1px solid #d3b76b;border-radius:16px;max-width:90vw;max-height:85vh;width:650px;}
.hn-dialog::backdrop{background:#0009;}
@media(max-height:500px){#handRoot .hn-private-group .hn-card{width:45px;height:63px;}#handRoot .hn-tools button{font-size:11px;padding:5px 8px;min-height:29px;}#handRoot .hn-private-hand{gap:4px;}}
#handRoot .hn-private-group{max-width:100%;flex-wrap:wrap;row-gap:10px;box-sizing:border-box;}

#handRoot .hn-round-tools{display:flex;direction:rtl;align-items:center;gap:8px;flex-shrink:0;}
#handRoot .hn-round-tools #hnScore{width:auto;padding:0 10px;font:inherit;white-space:nowrap;}
#handRoot .hn-round-label{white-space:nowrap;}
@media(max-width:400px){#handRoot .hn-top{gap:5px;padding-inline:7px;}#handRoot .hn-brand{gap:4px;}#handRoot .hn-brand small{display:none;}#handRoot .hn-round-tools{gap:5px;}#handRoot .hn-round-tools #hnScore{padding:0 7px;}}

/* Keep the start of every hand reachable in short Safari viewports. */
#handRoot{box-sizing:border-box;overflow:hidden;}
#handRoot .hn-table{overflow:auto;overscroll-behavior:contain;grid-template-rows:auto minmax(40px,.4fr) auto auto minmax(110px,1fr) auto auto;}
#handRoot .hn-private-hand{align-content:flex-start;align-items:flex-start;min-width:0;min-height:110px;height:100%;margin:0 auto;touch-action:pan-y;overscroll-behavior:contain;}
#handRoot .hn-private-group{align-items:flex-start;gap:5px;padding:10px 6px 6px;}
#handRoot .hn-private-group .hn-card{margin:0!important;}
#handRoot .hn-round-tools #hnCancel{width:auto;min-width:48px;height:auto;min-height:36px;white-space:normal;}
@media(orientation:landscape) and (max-height:550px){
 #handRoot .hn-table{grid-template-rows:auto minmax(24px,.2fr) auto auto minmax(90px,1fr) auto auto;}
 #handRoot .hn-private-hand{min-height:90px;}
 #handRoot .hn-table-mark{font-size:16px;}
}

/* Reserve a full meld row including its owner label. */
#handRoot .hn-table:has(.hn-meld){grid-template-rows:auto minmax(120px,.4fr) auto auto minmax(110px,1fr) auto auto;}
#handRoot .hn-board:has(.hn-meld){align-content:flex-start;}
#handRoot .hn-meld{flex-shrink:0;white-space:nowrap;}
@media(orientation:landscape) and (max-height:550px){#handRoot .hn-table:has(.hn-meld){grid-template-rows:auto minmax(80px,.2fr) auto auto minmax(90px,1fr) auto auto;}}

/* v100: keep card typography independent of mobile text autosizing. */
@media(max-width:600px),(max-height:550px) and (pointer:coarse){
 #handRoot .hn-card{direction:ltr;-webkit-text-size-adjust:100%;text-size-adjust:100%;overflow:hidden;isolation:isolate}
 #handRoot .hn-card .hn-corner{font-family:Georgia,'Times New Roman',serif;font-size:14px!important;font-weight:400;line-height:1!important;letter-spacing:0;left:3px;top:3px}
 #handRoot .hn-card .hn-bottom{left:auto;top:auto;right:3px;bottom:3px}
 #handRoot .hn-card .hn-pip{font-family:Georgia,'Times New Roman',serif;font-size:22px!important;line-height:1;inset:0;display:grid;place-items:center;pointer-events:none}
 #handRoot .hn-private-group .hn-card{box-shadow:0 2px 3px #0005;background:#fffdf7}
}

/* Shared vector suits stay sharp and consistent across WebView and browsers. */
#handRoot .hn-suit{display:block;width:1em;height:1em;flex:none;overflow:visible}
#handRoot .hn-corner .hn-suit{width:.72em;height:.72em;margin:1px auto 0}
#handRoot .hn-pip .hn-suit{width:1em;height:1em}
#handRoot .hn-brand>div{position:relative;padding-inline-end:35px}
#handRoot .hn-top #hnHelp{position:absolute;inset-inline-end:0;top:0;width:30px;height:30px;min-height:30px;font-size:18px;color:#72e3e3;border-color:#72e3e366;border-radius:50%}
.hn-help-dialog{width:min(560px,94vw);max-height:85dvh;box-sizing:border-box;padding:18px;color:#edf2fa;background:#10253d;border:1px solid #c8ab71;border-radius:20px;font-family:inherit;overflow:auto}
.hn-help-dialog::backdrop{background:#020817c9}
.hn-help-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hn-help-dialog h2{margin:0;font-size:22px;color:#f0d391}
.hn-help-dialog header button{width:44px;height:44px;font-size:27px;color:#fff;background:#203851;border:1px solid #6f8199;border-radius:12px;flex-shrink:0}
.hn-help-dialog p{font-size:15px;line-height:1.9;margin:12px 0;color:#d3deeb}
.hn-help-dialog details{border:1px solid #526b8255;border-radius:12px;padding:10px 12px;margin:8px 0}
.hn-help-dialog summary{cursor:pointer;font-size:16px;min-height:30px;color:#f4dba2}
.hn-help-picture{display:grid;justify-items:center;gap:6px;background:#07192c;padding:14px;border-radius:10px;margin-top:10px;color:#78e2df}
.hn-help-picture>div{display:flex;gap:7px;direction:ltr}
.hn-help-card{display:flex;flex-direction:column;align-items:center;justify-content:center;width:44px;height:60px;border-radius:5px;background:#fffdf5;color:#152330;font:18px Georgia,serif;box-shadow:0 2px 4px #0005}
.hn-help-card.red{color:#b02632}.hn-help-card svg{width:21px;height:21px}.hn-help-arrow{font-size:22px}

/* v111: tablet card sizing and isolated suit placement. */
@media(min-width:601px) and (min-height:600px) and (pointer:coarse){
 #handRoot .hn-card{direction:ltr;-webkit-text-size-adjust:100%;text-size-adjust:100%;overflow:hidden;isolation:isolate}
 #handRoot .hn-private-group .hn-card{width:82px;height:116px;background:#fffdf7;box-shadow:0 2px 4px #0005}
 #handRoot .hn-card .hn-corner{font-family:Georgia,'Times New Roman',serif;font-size:18px!important;font-weight:400;line-height:1!important;letter-spacing:0;left:4px;top:4px}
 #handRoot .hn-card .hn-bottom{left:auto;top:auto;right:4px;bottom:4px}
 #handRoot .hn-card .hn-pip{font-size:28px!important;line-height:1;inset:0;display:grid;place-items:center;pointer-events:none}
 #handRoot .hn-card .hn-pip .hn-suit{width:28px;height:28px}
 #handRoot .hn-card .hn-corner .hn-suit{width:12px;height:12px}
 #handRoot .hn-tools button{font-size:16px;min-height:46px;padding:10px 14px}
}

/* v112: intrinsic wrapped rows in Safari and visible card selection. */
#handRoot .hn-private-group{flex:0 0 auto;max-width:100%;height:auto;align-self:flex-start}
#handRoot .hn-private-hand{height:auto;align-content:flex-start;scroll-padding-top:14px}
#handRoot .hn-private-group .hn-card.chosen{transform:none;outline:3px solid #50dbe1;outline-offset:-3px}
#handRoot #hnPrepareAll{border-color:#58dbe499;color:#8aefeb}

/* v113: clear turn owner and primary actions on phones and tablets. */
#handRoot .hn-turn{flex:1;min-width:0;max-width:240px;padding:6px 7px;border:1px solid #e5c48288;border-radius:14px;background:#09182c}
#handRoot .hn-turn strong{display:block;font-size:clamp(16px,2.2vw,20px);line-height:1.25;color:#ffe8a8;overflow-wrap:anywhere}
#handRoot .hn-turn small{font-size:clamp(11px,1.5vw,13px);line-height:1.35;color:#dfebf7}
#handRoot .hn-turn.hn-your-turn{border:1px solid #65efe0;background:#103638;box-shadow:0 0 16px #3addca22}
#handRoot .hn-your-turn strong{color:#83ffdf}
#handRoot .hn-tools #hnDiscard,#handRoot .hn-tools #hnFinish{font-size:clamp(20px,2.8vw,26px);font-weight:800;min-height:56px;min-width:170px;padding:12px 24px}
#handRoot .hn-tools #hnFinish{background:linear-gradient(120deg,#8cffe0,#24cdbb)!important;border-color:#afffea!important;color:#062c2d!important}
#handRoot #hnFinish[hidden]{display:none!important}
@media(orientation:landscape) and (max-height:550px){#handRoot .hn-turn{padding:5px 8px}#handRoot .hn-turn strong{font-size:16px}#handRoot .hn-tools #hnDiscard,#handRoot .hn-tools #hnFinish{font-size:20px;min-height:46px;padding:8px 18px}}

/* v115: vector court portraits stay crisp at every screen density. */
#handRoot .hn-card .hn-pip.hn-face{inset:3% 21%;overflow:hidden}#handRoot .hn-court{display:block;width:100%;height:100%;pointer-events:none}#handRoot .hn-card .hn-corner{z-index:1}

/* v117 larger readable cards and clear court suits. */
#handRoot .hn-private-group .hn-card{width:80px;height:110px}#handRoot .hn-card .hn-corner .hn-suit{width:16px;height:16px}#handRoot .hn-court-suit{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#fffdf7;border:1px solid #d1c9b8;z-index:2;pointer-events:none}#handRoot .hn-court-suit .hn-suit{width:19px;height:19px}#handRoot .hn-ready-badge{color:#8cffe0;font-weight:700}#handRoot .hn-ready-badge[hidden]{display:none}#handRoot .hn-handline{flex-wrap:wrap;gap:5px}
@media(max-width:600px){#handRoot .hn-private-group .hn-card{width:60px;height:86px}#handRoot .hn-card .hn-corner{font-size:17px!important}#handRoot .hn-card .hn-corner .hn-suit{width:14px;height:14px}#handRoot .hn-court-suit{width:22px;height:22px;bottom:3px}#handRoot .hn-court-suit .hn-suit{width:17px;height:17px}}
@media(orientation:landscape) and (max-height:550px){#handRoot .hn-private-group .hn-card{width:54px;height:76px}}

/* v122: room for piles, larger distinct portraits and explicit finish choice. */
#handRoot .hn-piles{display:grid;grid-template-columns:max-content minmax(0,180px) max-content;justify-content:center;gap:clamp(8px,2vw,16px);width:100%;max-width:360px;margin-inline:auto;padding-inline:10px}
#handRoot .hn-turn{width:100%;max-width:180px;padding:5px 6px;border-radius:12px}
#handRoot .hn-turn strong{font-size:16px;line-height:1.2}
#handRoot .hn-turn small{font-size:11px;line-height:1.3;margin-top:3px}
#handRoot .hn-pile{min-width:44px;min-height:44px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#handRoot .hn-pile>*{pointer-events:none}
#handRoot .hn-card .hn-pip.hn-face{inset:2% 17%}
#handRoot .hn-court-suit{bottom:21px;width:20px;height:20px}
#handRoot .hn-court-suit .hn-suit{width:16px;height:16px}
#handRoot #hnContinue[hidden]{display:none!important}
#handRoot #hnContinue{color:#9bf4df;border-color:#57cbb9;min-height:44px}
@media(max-width:600px){#handRoot .hn-turn{max-width:165px}#handRoot .hn-turn strong{font-size:15px}#handRoot .hn-turn small{font-size:10px}#handRoot .hn-court-suit{bottom:17px;width:18px;height:18px}#handRoot .hn-court-suit .hn-suit{width:14px;height:14px}}
@media(orientation:landscape) and (max-height:550px){#handRoot .hn-piles{max-width:310px;padding-inline:10px;gap:12px}#handRoot .hn-turn strong{font-size:14px}#handRoot .hn-court-suit{bottom:15px;width:17px;height:17px}}

/* v123: approved heritage cartoons; dynamic vector suits remain separate. */
#handRoot .hn-card .hn-pip.hn-face{inset:2px 15%;border-radius:4px;overflow:hidden}
#handRoot .hn-card .hn-court{width:100%;height:100%}
#handRoot .hn-card .hn-corner{background:#fffdf7;border-radius:2px;padding:1px;z-index:3}
#handRoot .hn-court-suit{bottom:3px;width:23px;height:23px;background:#fffdf7;box-shadow:0 1px 3px #0004}
#handRoot .hn-court-suit .hn-suit{width:18px;height:18px}
#handRoot .hn-joker .hn-corner{font-size:11px!important;font-weight:bold}
@media(max-width:600px){#handRoot .hn-court-suit{width:21px;height:21px}#handRoot .hn-court-suit .hn-suit{width:17px;height:17px}}

/* v127: shared opening total and next required minimum. */
#handRoot .hn-handline>span:last-child{font-size:13px;line-height:1.6;text-align:right;max-width:100%;overflow-wrap:anywhere}#handRoot .hn-handline strong{color:#ffe29e;font-weight:800}#handRoot .hn-handline b{color:#e7edf6;font-weight:700}#handRoot .hn-opened-label{color:#64dfe4}
@media(min-width:601px){#handRoot .hn-handline>span:last-child{font-size:15px}}

/* v129: balanced felt table, full visible tools and readable private groups. */
#handRoot{background:radial-gradient(ellipse at 50% 15%,#163b52,#071223 70%)}
#handRoot .hn-top{display:grid;grid-template-columns:max-content max-content minmax(90px,1fr) max-content;gap:8px;padding:8px 12px;min-height:70px;direction:rtl}
#handRoot .hn-top #hnExit{grid-column:1;grid-row:1;width:78px!important;min-height:46px;height:auto;font-size:12px!important;padding:6px!important;white-space:normal!important}
#handRoot .hn-top .nl-host-end{grid-column:2;grid-row:1;width:58px!important;min-height:46px;height:auto;font-size:12px!important;padding:6px!important;white-space:normal!important}
#handRoot .hn-brand{grid-column:3;grid-row:1;justify-content:center;min-width:0;gap:5px}
#handRoot .hn-brand img{width:30px;height:30px;border-radius:8px;flex:none}
#handRoot .hn-brand>div{min-width:0;padding-inline-end:26px}
#handRoot .hn-brand b{font-size:20px;line-height:1.2}
#handRoot .hn-brand small{display:block;font-size:10px;line-height:1.35;overflow-wrap:anywhere}
#handRoot .hn-top #hnHelp{width:24px;height:24px;min-height:24px;font-size:16px}
#handRoot .hn-round-tools{grid-column:4;grid-row:1;display:flex;flex-direction:column;gap:4px;font-size:11px}
#handRoot .hn-round-tools #hnScore{min-height:32px;height:auto;padding:6px 9px;font-size:12px}
#handRoot .hn-table,#handRoot .hn-table:has(.hn-meld){margin:8px 10px 0;border:2px solid #19374c;border-radius:24px;padding:10px 10px 6px;gap:8px;grid-template-rows:auto minmax(70px,.5fr) auto auto minmax(140px,1.1fr) auto auto;background:radial-gradient(ellipse at 50% 30%,#1d53624d,transparent 70%),repeating-linear-gradient(35deg,#ffffff02 0 1px,transparent 1px 4px),linear-gradient(145deg,#102c40,#091a2b)}
#handRoot .hn-opponents{justify-content:center;flex-wrap:wrap;gap:8px}
#handRoot .hn-player{flex-direction:row;gap:8px;min-height:46px;padding:5px 12px;border-radius:13px;background:#07172866;border-color:#bfa06833;text-align:right}
#handRoot .hn-player small{font-size:11px}
#handRoot .hn-avatar{width:30px;height:30px;font-size:19px}
#handRoot .hn-board,#handRoot .hn-board:has(.hn-meld){justify-content:center;align-content:center;gap:14px 18px;padding:6px;min-height:70px}
#handRoot .hn-meld{padding-bottom:20px;max-width:100%}
#handRoot .hn-meld small{background:#0c2138;border:1px solid #b7986055;border-radius:7px;padding:2px 6px;font-size:10px;line-height:1.2;max-width:100%;width:max-content;margin:auto}
#handRoot .hn-table-mark{font-size:18px;letter-spacing:0;color:#bca47438}
#handRoot .hn-piles{max-width:380px;grid-template-columns:70px minmax(0,170px) 70px;gap:12px;padding-inline:8px;justify-content:center;align-items:center}
#handRoot .hn-piles .hn-card,#handRoot .hn-back,#handRoot .hn-empty{width:64px;height:90px}
#handRoot .hn-pile small{font-size:11px;margin-top:6px}
#handRoot .hn-turn{max-width:170px;width:100%;padding:7px;border-radius:12px}
#handRoot .hn-turn strong{font-size:16px}
#handRoot .hn-turn small{font-size:11px}
#handRoot .hn-handline{align-items:center;gap:4px 10px;background:#061627aa;border:1px solid #bfa26555;border-radius:10px;padding:7px 9px;font-size:12px}
#handRoot .hn-handline>span:last-child{font-size:12px;line-height:1.5}
#handRoot .hn-private-hand{width:100%;margin:0;padding:6px 3px!important;gap:8px;justify-content:center;align-content:flex-start;min-height:140px;scroll-padding-top:8px}
#handRoot .hn-private-group{display:grid;grid-template-columns:repeat(var(--hn-cols),var(--hn-card-width,80px));gap:6px 5px;flex:0 0 auto;max-width:100%;padding:7px 6px;border-radius:12px;background:#0d353144;border:1px solid #c7ae6a88;align-items:start}
#handRoot .hn-private-group .hn-card{width:var(--hn-card-width,80px);height:110px}
#handRoot .hn-draft:empty{display:none}
#handRoot .hn-notice:empty{display:none}
#handRoot .hn-notice{font-size:12px;line-height:1.4;min-height:0}
#handRoot .hn-tools{padding:8px 10px;gap:6px;background:#07182c;border-top:1px solid #bfa26555}
#handRoot .hn-tools button{font-size:12px;min-height:38px;padding:8px 10px;border-radius:10px}
#handRoot .hn-tools #hnDiscard,#handRoot .hn-tools #hnFinish{order:2;font-size:22px;min-height:50px;padding:10px 18px;min-width:170px}
#handRoot .hn-tools #hnUndo{order:3}
@media(max-width:600px){
 #handRoot{--hn-card-width:60px}
 #handRoot .hn-top{gap:5px;padding:7px;grid-template-columns:67px 48px minmax(80px,1fr) 65px}
 #handRoot .hn-top #hnExit{width:67px!important;font-size:11px!important}
 #handRoot .hn-top .nl-host-end{width:48px!important;font-size:11px!important}
 #handRoot .hn-brand img{width:25px;height:25px}
 #handRoot .hn-brand b{font-size:18px}
 #handRoot .hn-brand small{font-size:9px}
 #handRoot .hn-table,#handRoot .hn-table:has(.hn-meld){margin:7px 7px 0;padding:8px 7px 4px;gap:7px}
 #handRoot .hn-piles{grid-template-columns:64px minmax(0,160px) 64px;gap:10px}
 #handRoot .hn-turn strong{font-size:15px}
 #handRoot .hn-turn small{font-size:10px}
 #handRoot .hn-private-group .hn-card{height:86px}
 #handRoot .hn-tools button{font-size:11px;padding:7px 9px;min-height:36px}
}
@media(orientation:landscape) and (max-height:550px){
 #handRoot{--hn-card-width:54px}
 #handRoot .hn-top{min-height:45px;padding:4px 10px}
 #handRoot .hn-top #hnExit,#handRoot .hn-top .nl-host-end{min-height:35px}
 #handRoot .hn-brand small{font-size:9px}
 #handRoot .hn-round-tools{flex-direction:row;align-items:center}
 #handRoot .hn-table,#handRoot .hn-table:has(.hn-meld){grid-template-rows:auto minmax(55px,.4fr) auto auto minmax(80px,1fr) auto auto;gap:4px;padding:5px 9px 3px}
 #handRoot .hn-player{min-height:30px;padding:3px 8px}
 #handRoot .hn-avatar{width:24px;height:24px;font-size:16px}
 #handRoot .hn-board{min-height:55px;gap:8px}
 #handRoot .hn-piles{grid-template-columns:48px minmax(0,160px) 48px;gap:12px}
 #handRoot .hn-piles .hn-card,#handRoot .hn-back,#handRoot .hn-empty{width:44px;height:60px}
 #handRoot .hn-turn{padding:4px 6px}
 #handRoot .hn-turn strong{font-size:14px}
 #handRoot .hn-handline{padding:4px 8px}
 #handRoot .hn-private-hand{min-height:80px}
 #handRoot .hn-private-group .hn-card{height:76px}
 #handRoot .hn-tools{padding:5px;gap:5px}
 #handRoot .hn-tools button{min-height:32px;font-size:11px;padding:5px 8px}
 #handRoot .hn-tools #hnDiscard,#handRoot .hn-tools #hnFinish{min-height:40px;font-size:19px;padding:6px 15px}
}

/* v130: reserve readable meld space and keep overflowing rows reachable. */
#handRoot .hn-table:has(.hn-meld){grid-template-rows:auto minmax(clamp(180px,30dvh,280px),.9fr) auto auto minmax(140px,1.1fr) auto auto}
#handRoot .hn-board:has(.hn-meld){align-content:flex-start;align-items:flex-start;min-height:180px;scroll-padding:8px;padding:8px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
#handRoot .hn-meld{flex:0 0 auto}
@media(orientation:landscape) and (max-height:550px){
 #handRoot .hn-table:has(.hn-meld){grid-template-rows:auto minmax(110px,.8fr) auto auto minmax(80px,1fr) auto auto}
 #handRoot .hn-board:has(.hn-meld){min-height:110px;padding:7px;gap:10px 16px}
}

/* v131: one reachable landscape table, with touch chaining from melds. */
@media(orientation:landscape) and (max-height:550px){
 #handRoot .hn-table,#handRoot .hn-table:has(.hn-meld){display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;touch-action:pan-y;-webkit-overflow-scrolling:touch;scroll-padding-block:8px}
 #handRoot .hn-table> *{flex:0 0 auto}
 #handRoot .hn-board,#handRoot .hn-board:has(.hn-meld){height:110px;min-height:110px;overflow-y:auto;overscroll-behavior-y:auto;touch-action:pan-y}
 #handRoot .hn-private-hand{height:auto;min-height:80px;overflow:visible;overscroll-behavior-y:auto;touch-action:pan-y}
 #handRoot .hn-meld{touch-action:pan-y}
}
