/* Midnight Lounge · offline presentation only. */
:root{color-scheme:dark;--bg:#0d1118;--panel:#161c26;--panel-soft:#121923;--line:#2c3441;--text:#f1eee7;--muted:#9aa6b6;--dim:#748294;--gold:#d6b77c;--gold-light:#ecd3a3;--felt:#182e38;--card-w:66px;--card-h:94px;--card-gap:5px;--board-w:350px;font-family:Inter,"Segoe UI","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}html{margin:0;background:var(--bg);scroll-behavior:smooth}body{margin:0;color:var(--text);background:radial-gradient(ellipse at 18% 0,#1b243337,transparent 50%),var(--bg);min-width:280px}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button{touch-action:manipulation}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--gold-light);outline-offset:4px}[hidden]{display:none!important}::selection{background:#d6b77c44;color:#fff}
.skip-link{position:fixed;top:10px;left:12px;transform:translateY(-180%);z-index:20;padding:12px 18px;border-radius:9px;background:var(--gold);color:#171b22}.skip-link:focus{transform:translateY(0)}
.h-demo{width:100%;max-width:1240px;margin:0 auto;padding:0 32px 24px}.app-line{min-height:100px;display:flex;align-items:center;justify-content:space-between;gap:24px;border-bottom:1px solid #ffffff0d}.brand{display:flex;align-items:center;gap:13px;flex-shrink:0}.brand-name{display:block;font:600 25px/1.1 Georgia,"Times New Roman",serif;letter-spacing:.035em}.brand-caption{display:block;margin-top:6px;font-size:8px;font-weight:600;letter-spacing:.23em;color:var(--gold)}.brand-chip{width:35px;height:35px;border:2px dashed var(--gold);border-radius:50%;position:relative;transform:rotate(-15deg)}.brand-chip::after{content:"";position:absolute;inset:6px;border:1px solid #d6b77c88;border-radius:50%}
.connection-pill{display:flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid var(--line);border-radius:30px;background:#141c26;min-width:0;max-width:52%;font-size:10px;line-height:1.5;color:#a7b7c7;overflow-wrap:anywhere}.connection-dot{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#8caeab;box-shadow:0 0 0 4px #8caeab0b}.lounge-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:31px 0 28px}.eyebrow{display:block;margin:0;color:var(--gold);font-size:9px;font-weight:650;line-height:1.6;letter-spacing:.16em}.lounge-heading h1{margin:8px 0 8px;font-size:30px;font-weight:650;line-height:1.3;letter-spacing:-1px}.lounge-subtitle{margin:0;color:var(--muted);font-size:12px}.play-note{font-size:11px;color:#bcb5a8;text-align:right;line-height:1.7}.play-note span{display:block;color:var(--dim);font-size:10px}
.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:24px;align-items:start}.play-column,.action-rail{min-width:0}.action-rail{display:flex;flex-direction:column;gap:12px}.h-table{position:relative;width:100%;overflow:hidden;border:1px solid #3b424d;border-radius:23px;background:#171f2a;box-shadow:0 18px 45px #00000025,inset 0 1px #ffffff04;padding:0 20px}.h-head{min-height:64px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #ffffff09;font-size:12px;font-weight:550;color:#dfdcd5}.h-head>span:first-child{min-width:0;line-height:1.6}.h-blind{padding:6px 9px;border-radius:6px;background:#222a35;border:1px solid #3a414b;color:#c3b395;font-size:10px;font-weight:500;white-space:nowrap}
.h-stage{position:relative;width:100%;height:420px;min-width:0;isolation:isolate}.h-stage::before{content:"";position:absolute;z-index:-2;inset:24px 4px 26px;border:8px solid #25313b;border-radius:47%;background:radial-gradient(ellipse at 50% 35%,#24414a 0,#1c3540 42%,#172e38 78%);box-shadow:0 0 0 1px #48505a88,inset 0 0 0 1px #bcab7526,inset 0 0 45px #00000038,0 9px 15px #00000023}.h-stage::after{content:"";position:absolute;z-index:-1;inset:43px 22px 45px;border:1px solid #acc5c90b;border-radius:47%;pointer-events:none}.felt-mark{position:absolute;top:91px;left:50%;transform:translateX(-50%);text-align:center;color:#b9d0cf12;pointer-events:none;user-select:none;white-space:nowrap}.felt-mark span{display:block;font:600 25px/1.1 Georgia,serif;letter-spacing:.14em}.felt-mark small{display:block;font-size:7px;letter-spacing:.3em;margin-top:6px}.table-caption{height:30px;display:flex;align-items:flex-start;justify-content:space-between;color:#6a7c8a;font-size:7px;font-weight:600;letter-spacing:.18em}
.h-opp{position:absolute;top:29px;left:22px;display:flex;flex-direction:column;align-items:flex-start;gap:9px;max-width:100%;z-index:1}.h-user{position:absolute;bottom:14px;right:20px;display:flex;flex-direction:column;align-items:flex-end;gap:10px;max-width:100%;z-index:1}.h-meta{font-size:11px;line-height:1.8;color:#b8c6cc;max-width:310px;overflow-wrap:anywhere;text-shadow:0 1px 4px #0006}.h-meta b{font-size:12px;color:#f6efe0;font-weight:650}.h-user .h-meta{text-align:right;max-width:340px}.h-cards{display:flex;align-items:flex-start;flex-wrap:nowrap;gap:5px;width:max-content;max-width:100%}
.h-card{position:relative;display:block;width:var(--card-w);height:var(--card-h);min-width:var(--card-w);min-height:var(--card-h);flex:0 0 var(--card-w);border-radius:8px;overflow:hidden;box-shadow:0 4px 9px #00000032}.h-face{background:linear-gradient(145deg,#fffdf8,#eeeae1);border:1px solid #f0eee7;color:#202834}.h-face.heart,.h-face.diamond{color:#ca4552}.h-rank{position:absolute;top:7px;left:8px;font:650 24px/1 "Segoe UI",Arial,sans-serif;letter-spacing:-.7px;white-space:nowrap}.h-rank.ten{font-size:22px;letter-spacing:-1.1px}.h-suit{position:absolute;right:8px;bottom:8px;width:27px;height:27px;display:block;fill:currentColor;overflow:visible}.h-back{background:repeating-linear-gradient(45deg,#263e53,#263e53 3px,#294155 3px,#294155 5px);border:1px solid #81929c}.h-back svg{display:block;width:100%;height:100%}.h-back svg path{stroke:#d1ba87;stroke-width:1.2}.h-blank{border:1px solid #b5c5cc1c;background:#0e20294a;box-shadow:inset 0 2px 6px #0000000d}
.h-board-zone{position:absolute;top:166px;left:50%;transform:translateX(-50%);width:var(--board-w);height:var(--card-h)}.h-board{display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:center;gap:var(--card-gap);width:var(--board-w);height:var(--card-h)}.h-pot{position:absolute;top:calc(var(--card-h) + 20px);left:50%;transform:translateX(-50%);display:flex;align-items:baseline;justify-content:center;gap:8px;white-space:nowrap;line-height:1;pointer-events:none}.h-pot-label{font-size:9px;letter-spacing:.1em;color:#a6b6bb}.h-pot-amount{font-size:27px;font-weight:600;color:var(--gold-light);font-variant-numeric:tabular-nums;letter-spacing:-.7px}.h-pot-bb{font-size:11px;color:#a6b6bb}
.h-history{margin-top:20px;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--panel-soft)}.h-history-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:17px;font-size:13px;font-weight:600}.h-history-head .eyebrow{font-size:8px;letter-spacing:.15em;margin-bottom:5px}.h-history-meta{color:var(--dim);font-size:10px;font-weight:400}#history-rows{display:flex;flex-direction:column;gap:0}.h-history-row{display:grid;grid-template-columns:67px minmax(0,1fr);gap:16px;font-size:11px;line-height:1.95;padding:8px 0;border-top:1px solid #ffffff06}.h-history-street{color:#a9b2bd;font-weight:500;white-space:nowrap}.h-history-actions{min-width:0;overflow-wrap:anywhere;color:#d6dce3}.h-history-next{color:var(--gold);white-space:nowrap}
.action-card{padding:22px 20px 16px;border:1px solid #3e4146;border-radius:18px;background:linear-gradient(145deg,#20252f,#171e28);box-shadow:0 12px 25px #00000017}.h-control{display:flex;flex-direction:column;gap:12px;width:100%}.panel-heading{margin-bottom:5px}.panel-heading h2,.end-actions h2{font-size:17px;font-weight:600;letter-spacing:-.4px;margin:7px 0 5px}.h-btn-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.h-button{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;min-height:45px;padding:10px 11px;border:1px solid #434c59;border-radius:9px;background:#242c38;color:#e0e5eb;font-size:12px;font-weight:550;cursor:pointer;text-align:center;line-height:1.5;transition:background .16s,border-color .16s,transform .16s;overflow-wrap:anywhere}.h-button:hover:not(:disabled){background:#303b49;border-color:#667280}.h-button:active:not(:disabled){transform:translateY(1px)}.h-button:disabled{opacity:.36;cursor:not-allowed}.h-button.fold{background:#33252d;border-color:#64414a;color:#e8a1a5}.h-button.fold:hover:not(:disabled){background:#47303a;border-color:#9c5d68}#a-pass{border-color:#657173;background:#28373c;color:#e3efeb}#a-pass:hover:not(:disabled){background:#34474c;border-color:#8ba29d}
.bet-divider{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #ffffff0a;padding-top:17px;margin-top:3px;color:#b7c0cb;font-size:11px}.bet-divider span+span{color:var(--dim);font-size:10px}.h-size-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.h-size-row .h-button{padding:8px 3px;min-height:36px;background:#1b232e;color:#b1becb;font-size:11px;border-color:#36414e}.h-button.is-selected{background:#d6b77c12!important;border-color:var(--gold)!important;color:var(--gold-light)!important;box-shadow:inset 0 0 0 1px var(--gold)}.h-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:2px}.h-field{display:flex;flex-direction:column;gap:7px;min-width:0}.h-field label{font-size:10px;color:#acb8c5;display:flex;justify-content:space-between;gap:6px}.h-field label span{color:#708093}.h-input{display:block;width:100%;min-width:0;height:47px;padding:10px 11px;border:1px solid #3b4551;border-radius:8px;background:#111923;color:#f6f0e5;font-size:17px;font-weight:550;font-variant-numeric:tabular-nums;outline:none}.h-input:focus-visible{border-color:var(--gold);outline:2px solid #d6b77c33;outline-offset:1px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{appearance:textfield;-moz-appearance:textfield}.h-help{display:flex;justify-content:space-between;gap:8px;color:#8795a7;font-size:9px;line-height:1.6;flex-wrap:wrap}
.h-button.submit{min-height:49px;background:linear-gradient(110deg,#d4b578,#e2c791);border-color:#ddc28d;color:#28251e;font-weight:700;font-size:13px;box-shadow:0 4px 12px #00000015}.h-button.submit:hover:not(:disabled){background:var(--gold-light);border-color:var(--gold-light)}.h-button.submit:disabled{background:#6f6653;border-color:#6f6653;color:#c4bba9;opacity:.55}.h-notice{font-size:10px;line-height:1.8;color:#8795a7;overflow-wrap:anywhere;min-height:14px}#payment{padding:0 2px;color:#96a3b4;font-size:9px;line-height:1.75}.status-line{display:flex;align-items:center;gap:9px;flex-wrap:wrap;border-top:1px solid #ffffff09;margin-top:17px;padding-top:14px;color:#a8b9bd;font-size:10px;line-height:1.8}.status-line>span{flex:1 1 100%;overflow-wrap:anywhere}.h-button.small{width:auto;min-height:35px;padding:7px 11px;font-size:10px;font-weight:500}.error{margin-top:12px;padding:11px;border:1px solid #774752;border-radius:8px;background:#482a323d;color:#efb5ba;font-size:11px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.end-actions .h-button{margin-top:20px}.end-actions h2{font-size:16px;line-height:1.7}
.settings-panel,.fairness,.session-details{border:1px solid var(--line);border-radius:12px;background:#131b25;min-width:0}.settings-panel>summary,.fairness>summary,.session-details>summary{padding:15px 16px;cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#b9c4cf}.settings-panel>summary::-webkit-details-marker,.fairness>summary::-webkit-details-marker,.session-details>summary::-webkit-details-marker{display:none}.settings-panel>summary::after,.fairness>summary::after,.session-details>summary::after{content:"+";font-size:14px;color:#8d9aaa;margin-left:auto}.settings-panel[open]>summary::after,.fairness[open]>summary::after,.session-details[open]>summary::after{content:"−"}.summary-hint{font-size:9px;color:#6e7e91}.fairness>summary span{font-size:8px;color:#6e7e91;letter-spacing:.04em}.settings{padding:0 16px 16px;display:grid;grid-template-columns:1fr;gap:12px}.settings label{font-size:10px;color:#aeb9c6}.settings select{margin-top:6px;font-size:12px;height:42px;padding-right:7px;font-weight:400}.settings .h-notice{font-size:9px}.settings .reset-button{width:100%;border-color:#50434b;color:#c49aa0;background:#241e29}.fairness>div,.session-details>div,.session-details>p{margin:0;padding:0 16px 13px;overflow-wrap:anywhere;font-size:9px;line-height:1.85;color:#8d9dad}.session-details>summary{font-size:10px;color:#8797a8}.footer-actions{display:flex;justify-content:space-between;gap:8px}.footer-actions .h-button{border-color:transparent;background:transparent;color:#94a3b5;padding:6px 2px;min-width:0;font-size:10px;gap:8px}.footer-actions .h-button:hover:not(:disabled){color:var(--gold-light);background:transparent}.footer-actions .h-button:first-child{color:#c5b28d}.lounge-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-top:30px;padding-top:20px;border-top:1px solid #ffffff09;font-size:10px;line-height:1.8;color:#69798e}.lounge-footer a{color:#8290a2;text-decoration:none}.lounge-footer a:hover{color:var(--gold-light)}
#result{padding:23px;margin-top:20px;border:1px solid #8c805345;border-radius:16px;background:linear-gradient(115deg,#d6b77c0c,#131b25);font-size:11px;line-height:1.85;overflow-wrap:anywhere}#result strong{font-size:19px;display:block;font-weight:600;color:var(--gold-light);margin-bottom:8px}.stack-result{margin:7px 0 0;color:#a9b6c6}#analysis{margin-top:20px;min-width:0;border:1px solid var(--line);border-radius:16px;background:var(--panel-soft);overflow:hidden}#analysis::before{content:"HAND REVIEW   /   나의 선택 돌아보기";display:block;padding:20px;border-bottom:1px solid #ffffff09;font-size:11px;font-weight:550;color:var(--gold)}.analysis-scroll{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#47505b #111923}table{width:100%;border-collapse:collapse;text-align:left;font-size:11px;line-height:1.8}th,td{padding:13px 12px;vertical-align:top;border-bottom:1px solid #ffffff08;min-width:70px}th{color:#8e9dae;font-size:10px;font-weight:500;white-space:nowrap;background:#18212c}td{color:#c5cfd9}td:nth-child(4){min-width:120px}td:nth-child(5){min-width:240px}tr:last-child>td{border-bottom:none}.rating{display:inline-block;white-space:nowrap;font-size:10px;font-weight:550;padding:3px 7px;border-radius:5px}.rating.good{color:#76d3a0;background:#22c55e12}.rating.mixed{color:#efbb63;background:#f59e0b12}.rating.mistake{color:#ee939b;background:#ef444412}.calculation{margin-top:12px;max-width:100%;font-size:10px;line-height:1.85;overflow-wrap:anywhere}.calculation summary{cursor:pointer;color:#9cb7c7}.calculation p{color:#96a5b7}.calculation table{font-size:10px}.calculation td,.calculation th{min-width:0!important;padding:8px 6px}.calculation[open]{padding-top:8px;border-top:1px solid #ffffff0a}
#history-dialog{width:calc(100% - 40px);max-width:980px;max-height:86vh;overflow:auto;padding:26px;border:1px solid #4a525e;border-radius:20px;background:#131b25;color:var(--text);box-shadow:0 30px 100px #0008;scrollbar-width:thin}#history-dialog::backdrop{background:#060b14c9;backdrop-filter:blur(7px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.dialog-head h2{margin:6px 0 0;font-size:21px;font-weight:550}#history-list{display:flex;flex-direction:column;gap:8px}#history-list>.h-button{justify-content:flex-start;text-align:left;padding:13px 16px;background:#1c2633;font-weight:400}#replay-body{font-size:11px;line-height:1.9;min-width:0}#replay-body p{overflow-wrap:anywhere}#replay-body table{display:block;overflow-x:auto;max-width:100%}.replay-cards{display:flex;justify-content:center;gap:var(--card-gap);margin:20px 0}
.h-stage.multi{height:calc(310px + var(--rows-desktop)*164px)}.multi .felt-mark{top:auto;bottom:260px}.multi .h-board-zone{top:auto;bottom:160px}.multi::before{inset:20px 0 30px;border-radius:30%}.multi::after{inset:39px 18px 49px;border-radius:30%}.opponent-grid{position:absolute;top:24px;left:15px;right:15px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 12px}.multi-seat{min-width:0;height:148px;position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:7px}.multi-seat .h-cards{position:absolute;bottom:0}.multi-seat .h-meta{font-size:10px;line-height:1.7}.multi-seat .h-meta b{font-size:11px}.folded{opacity:.36}.acting .h-cards{outline:2px solid #d6b77c9c;outline-offset:5px;border-radius:7px}
@media(min-width:1200px){.action-rail{position:sticky;top:20px}}
@media(max-width:1100px){.h-demo{padding-left:22px;padding-right:22px}.play-layout{grid-template-columns:minmax(0,1fr) 290px;gap:18px}.h-table{padding:0 14px}:root{--card-w:58px;--card-h:84px;--board-w:310px}.h-rank{font-size:22px}.h-rank.ten{font-size:20px}.h-suit{width:24px;height:24px}.opponent-grid{gap:16px 8px;left:7px;right:7px}.multi-seat .h-meta{font-size:8px}.h-meta{max-width:280px;font-size:9px}.h-user .h-meta{max-width:270px}.h-head{font-size:11px}.h-blind{font-size:9px}.h-stage.multi{height:calc(310px + var(--rows-desktop)*158px)}.multi-seat{height:142px}}
@media(max-width:960px){.play-layout{grid-template-columns:minmax(0,1fr);gap:20px}.action-rail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}.action-card{grid-row:1/5}.footer-actions{grid-column:1/-1;justify-content:flex-end;gap:24px}.h-demo{max-width:880px}.h-stage{height:420px}.h-head{font-size:12px}:root{--card-w:66px;--card-h:94px;--board-w:350px}.h-meta{max-width:330px;font-size:11px}.h-user .h-meta{max-width:330px}.multi-seat .h-meta{font-size:10px}.h-rank{font-size:24px}.h-rank.ten{font-size:22px}.h-suit{width:27px;height:27px}.h-blind{font-size:10px}.h-table{padding:0 20px}.opponent-grid{left:15px;right:15px;gap:16px 12px}.multi-seat{height:148px}.h-stage.multi{height:calc(310px + var(--rows-desktop)*164px)}}
@media(max-width:720px){.opponent-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.h-stage.multi{height:calc(310px + var(--rows-mobile)*164px)}}
@media(max-width:600px){:root{--card-w:50px;--card-h:72px;--card-gap:4px;--board-w:266px}.h-demo{padding:0 14px 24px}.app-line{min-height:83px;gap:12px}.brand{gap:9px}.brand-chip{width:29px;height:29px}.brand-name{font-size:21px}.brand-caption{font-size:6px;letter-spacing:.18em;margin-top:5px}.connection-pill{border:none;background:transparent;font-size:8px;padding:0;gap:6px;max-width:46%}.connection-dot{width:5px;height:5px;flex-basis:5px}.lounge-heading{padding:25px 0 23px}.lounge-heading h1{font-size:25px;margin:6px 0 7px}.eyebrow{font-size:8px}.lounge-subtitle{font-size:10px}.play-note{display:none}.play-layout{gap:16px}.h-table{padding:0 12px;border-radius:18px}.h-head{min-height:61px;gap:6px;font-size:10px}.h-blind{font-size:8px;padding:5px 6px}.h-stage{height:410px}.h-stage::before{inset:30px -5px 29px;border-width:6px;border-radius:40%}.h-stage::after{inset:44px 9px 43px;border-radius:40%}.h-opp{left:9px;top:24px;gap:8px}.h-user{right:8px;bottom:15px;gap:10px}.h-meta,.h-user .h-meta{font-size:11px;max-width:245px;line-height:1.8}.h-meta b{font-size:11px}.h-card{border-radius:6px}.h-rank{top:5px;left:6px;font-size:20px}.h-rank.ten{font-size:18px;letter-spacing:-.9px}.h-suit{width:21px;height:21px;right:6px;bottom:6px}.h-board-zone{top:148px}.h-pot{top:calc(var(--card-h) + 18px);gap:6px}.h-pot-amount{font-size:24px}.h-pot-label{font-size:8px}.h-pot-bb{font-size:10px}.felt-mark{top:101px}.felt-mark span{font-size:17px}.felt-mark small{font-size:5px;margin-top:4px}.table-caption{height:27px;font-size:6px;letter-spacing:.12em}.h-history{padding:17px 15px;border-radius:13px;margin-top:16px}.h-history-head{font-size:12px;margin-bottom:13px}.h-history-meta{font-size:8px}.h-history-row{grid-template-columns:55px minmax(0,1fr);gap:9px;font-size:10px;line-height:1.9;padding:9px 0}.h-history-head .eyebrow{font-size:7px}.action-rail{display:flex;gap:12px;align-items:stretch}.action-card{padding:21px 18px 16px;border-radius:15px}.h-control{gap:12px}.panel-heading h2{font-size:18px}.h-button{font-size:13px;min-height:46px}.h-size-row .h-button{min-height:39px;font-size:12px}.h-fields{gap:12px}.h-field label{font-size:11px}.h-input{height:49px;font-size:18px}.h-help{font-size:10px}.h-button.submit{min-height:51px;font-size:14px}#payment{font-size:10px}.status-line{font-size:11px}.settings-panel>summary,.fairness>summary{font-size:12px}.summary-hint{font-size:10px}.settings label{font-size:11px}.settings select{font-size:13px}.settings .h-notice{font-size:10px}.footer-actions{justify-content:space-between;gap:10px}.footer-actions .h-button{font-size:11px}.lounge-footer{margin-top:25px;font-size:9px;gap:10px}.lounge-footer>span{font-size:9px}#result{padding:19px 16px;font-size:11px}#analysis::before{font-size:10px;padding:18px 15px}.h-stage.multi{height:calc(310px + var(--rows-mobile)*150px)}.opponent-grid{top:22px;left:9px;right:9px;gap:16px 18px}.multi-seat{height:134px}.multi-seat .h-meta{font-size:10px;line-height:1.75}.multi-seat .h-meta b{font-size:11px}.multi .h-board-zone{bottom:180px}.multi .felt-mark{bottom:272px}.multi::before{border-radius:18% / 12%;inset:20px -5px 29px}.multi::after{border-radius:18% / 12%;inset:34px 9px 43px}#history-dialog{width:calc(100% - 24px);padding:20px 15px;border-radius:15px}.replay-cards{gap:4px}}
@media(max-width:350px){:root{--card-w:46px;--card-h:66px;--board-w:246px}.h-demo{padding-left:10px;padding-right:10px}.h-table{padding:0 10px}.h-head{font-size:9px}.h-blind{font-size:7px}.h-card{border-radius:6px}.h-rank{font-size:18px;left:5px}.h-rank.ten{font-size:16px}.h-suit{width:19px;height:19px;right:5px;bottom:5px}.h-meta,.h-user .h-meta{max-width:225px;font-size:9px}.h-history-meta{display:none}.brand-name{font-size:19px}.brand-chip{width:26px;height:26px}.brand-caption{font-size:5px}.connection-pill{max-width:44%;font-size:7px}.h-fields{gap:8px}.h-history-row{grid-template-columns:49px minmax(0,1fr);gap:7px}.multi-seat .h-meta{font-size:9px}.opponent-grid{gap:16px 13px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}

/* Compact game shell. Native dialogs keep non-playing controls out of the table. */
.compact-game .app-line{min-height:58px;gap:16px;border-bottom:1px solid #ffffff08}
.compact-game .brand{gap:10px}.compact-game .brand-chip{width:26px;height:26px}.compact-game .brand-name{font-size:21px}
.game-toolbar{display:flex;align-items:center;gap:8px}.game-toolbar .h-button{min-height:34px;background:#151d28;border-color:#303b48;color:#b8c4d0;padding:6px 13px}.game-toolbar .more-button{font-size:21px;line-height:1;padding:2px 12px;min-width:38px}
.compact-game .play-layout{grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:auto 1fr;grid-template-areas:"table actions" "history actions";gap:16px;margin-top:18px}
.compact-game .h-table{grid-area:table}.compact-game .h-history{grid-area:history;margin:0}.compact-game .action-rail{grid-area:actions;position:static;display:flex;align-items:stretch;gap:0}
.compact-game .panel-heading{margin-bottom:3px}.compact-game .panel-heading h2{font-size:14px;margin:0 0 8px}
.compact-game #result{margin:0 0 12px;padding:14px;max-height:min(35dvh,300px);overflow:auto;font-size:10px}.compact-game #result strong{font-size:17px}
.compact-game .end-actions .h-button{margin-top:10px}.review-open{display:none;margin-top:10px}.compact-game:has(#result:not([hidden])) .review-open{display:flex}
.app-dialog{width:calc(100% - 32px);max-width:540px;max-height:88dvh;overflow:auto;padding:24px;border:1px solid #4a525e;border-radius:17px;background:#131b25;color:var(--text);box-shadow:0 30px 100px #0008;scrollbar-width:thin}
.app-dialog::backdrop{background:#060b14cc;backdrop-filter:blur(6px)}.app-dialog .dialog-head{margin-bottom:18px}.app-dialog .dialog-head h2{font-size:19px;line-height:1.5;margin:0}.app-dialog .dialog-head .eyebrow{margin-bottom:5px}
.dialog-description{font-size:12px;line-height:1.8;color:#a8b5c5;margin:0 0 20px}.app-dialog .settings{padding:0;grid-template-columns:1fr 1fr;gap:16px}.app-dialog .settings select{font-size:13px;height:44px}.app-dialog .settings .h-notice{grid-column:1/-1;font-size:11px;line-height:1.8}.dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}.dialog-actions .h-button{min-height:44px}
#app-info-dialog .connection-pill{max-width:100%;margin-bottom:18px;border-radius:8px}#app-info-dialog>details{margin-top:12px}.app-info-actions{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:20px;font-size:11px}.app-info-actions a{color:#9bafc3}.review-dialog{max-width:1160px}.review-dialog #analysis{margin:0}.review-dialog #analysis::before{display:none}.review-dialog .analysis-scroll{max-height:70dvh;overflow:auto}
@media(max-width:960px){.compact-game .play-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;grid-template-areas:"table" "history" "actions"}.compact-game .action-rail{display:flex;align-items:stretch}.compact-game .h-table{margin:0}.compact-game .game-toolbar{gap:6px}}
@media(max-width:600px){.compact-game .app-line{min-height:64px;gap:10px}.compact-game .brand{gap:7px}.compact-game .brand-name{font-size:18px}.compact-game .brand-chip{width:23px;height:23px}.game-toolbar .h-button{padding:6px 9px;font-size:10px;min-height:38px}.game-toolbar .more-button{font-size:19px;min-width:30px;padding:2px 8px}.compact-game .play-layout{margin-top:14px}.app-dialog{padding:20px 16px}.app-dialog .settings{gap:12px}.app-info-actions{flex-wrap:wrap}}

/* 16:9 first, with ultrawide support: reserve the viewport for table, hand log and betting. Long logs stay in their panel. */
@media(min-width:1200px) and (min-aspect-ratio:3/2){
  :root{--card-w:clamp(48px,6dvh,78px);--card-h:clamp(68px,8.5dvh,110px);--card-gap:5px;--board-w:calc(var(--card-w)*5 + 20px)}
  html,body{height:100%;overflow:hidden}
  .compact-game.h-demo{height:100dvh;width:100%;max-width:none;margin:0;padding:12px 20px;display:grid;grid-template-rows:44px minmax(0,1fr);gap:12px;overflow:hidden}
  .compact-game .app-line{min-height:0;height:44px;margin:0;padding:0 3px;border:none}
  .compact-game .play-layout{height:100%;min-height:0;margin:0;grid-template-columns:minmax(0,1fr) 288px;grid-template-rows:minmax(0,1fr) clamp(108px,20dvh,218px);grid-template-areas:"table actions" "history actions";gap:12px}
  .compact-game .h-table{height:100%;min-height:0;padding:0 18px;display:grid;grid-template-rows:46px minmax(0,1fr);border-radius:18px}
  .compact-game .h-head{height:46px;min-height:0;font-size:12px}.compact-game .h-blind{font-size:10px}
  .compact-game .h-stage,.compact-game .h-stage.multi{height:100%;min-height:0;width:100%}
  .compact-game .h-stage::before{inset:14px 3px 18px;border-width:7px;border-radius:46%}
  .compact-game .h-stage::after{inset:31px 20px 35px;border-radius:46%}
  .compact-game .h-opp{top:20px;left:20px;gap:8px}.compact-game .h-user{right:18px;bottom:14px;gap:8px}
  .compact-game .h-meta{font-size:10px;line-height:1.7;max-width:350px}.compact-game .h-meta b{font-size:12px}.compact-game .h-user .h-meta{max-width:350px}
  .compact-game .h-board-zone{top:calc(50% - var(--card-h)/2);bottom:auto}.compact-game .h-pot{top:calc(var(--card-h) + 16px);gap:7px}.compact-game .h-pot-amount{font-size:25px}
  .compact-game .h-rank{font-size:clamp(19px,2.3dvh,24px);top:6px;left:7px}.compact-game .h-rank.ten{font-size:clamp(17px,2.1dvh,22px)}.compact-game .h-suit{width:clamp(21px,2.5dvh,27px);height:clamp(21px,2.5dvh,27px);right:6px;bottom:6px}
  .compact-game .felt-mark,.compact-game .multi .felt-mark{top:calc(50% - var(--card-h)/2 - 55px);bottom:auto}
  .compact-game .opponent-grid{top:18px;left:16px;right:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(calc(var(--card-w)*2 + 5px),1fr));gap:clamp(4px,.5vw,10px)}
  .compact-game .multi-seat{height:clamp(118px,18dvh,176px);min-width:0;align-items:center}.compact-game .multi-seat .h-cards{bottom:0}.compact-game .multi-seat .h-meta{font-size:9px;line-height:1.7;width:100%;max-width:200px;text-align:center}.compact-game .multi-seat .h-meta b{font-size:11px}
  .compact-game .multi .h-board-zone{top:max(calc(50% - var(--card-h)/2),calc(clamp(118px,18dvh,176px) + 32px));bottom:auto}
  .compact-game .action-rail{min-height:0;height:100%;overflow:hidden;position:static}
  .compact-game .action-card{padding:18px 16px 14px;max-height:100%;overflow:auto;scrollbar-width:thin}
  .compact-game .h-control{gap:10px}.compact-game .panel-heading h2{font-size:14px}.compact-game .h-button{min-height:42px;font-size:12px}.compact-game .h-size-row .h-button{min-height:35px;font-size:11px}
  .compact-game .h-fields{gap:8px}.compact-game .h-input{height:44px;font-size:16px}.compact-game .h-help{font-size:9px}.compact-game .h-button.submit{min-height:46px;font-size:13px}.compact-game .bet-divider{padding-top:13px;margin-top:0}.compact-game .status-line{margin-top:13px;padding-top:11px}
  .compact-game .h-history{min-height:0;height:100%;padding:12px 16px;display:flex;flex-direction:column;border-radius:12px;overflow:hidden}
  .compact-game .h-history-head{margin-bottom:7px;flex:0 0 auto;font-size:11px}.compact-game .h-history-head>div{display:flex;align-items:center;gap:10px}.compact-game .h-history-head .eyebrow{margin:0;font-size:7px}.compact-game .h-history-meta{font-size:9px}
  .compact-game #history-rows{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#47505b #111923;flex:1}.compact-game .h-history-row{grid-template-columns:60px minmax(0,1fr);gap:12px;padding:4px 0;font-size:10px;line-height:1.75}
}
@media(min-width:1200px) and (min-aspect-ratio:3/2) and (max-height:650px){
  .compact-game.h-demo{padding:8px 14px;grid-template-rows:38px minmax(0,1fr);gap:8px}.compact-game .app-line{height:38px}.compact-game .play-layout{grid-template-columns:minmax(0,1fr) 270px;gap:8px;grid-template-rows:minmax(0,1fr) 96px}
  .compact-game .h-table{grid-template-rows:38px minmax(0,1fr);padding:0 12px}.compact-game .h-head{height:38px;font-size:10px}.compact-game .action-card{padding:12px}.compact-game .h-control{gap:7px}.compact-game .panel-heading{display:none}.compact-game .bet-divider{padding-top:8px;font-size:10px}.compact-game .h-fields{margin:0}.compact-game .h-field{gap:4px}.compact-game .h-input{height:38px}.compact-game .h-button{min-height:38px}.compact-game .h-size-row .h-button{min-height:30px}.compact-game .h-button.submit{min-height:40px}.compact-game .status-line{margin-top:8px;padding-top:8px}.compact-game .h-notice{font-size:9px}.compact-game .h-help{font-size:8px}.compact-game .multi-seat .h-meta{font-size:8px}.compact-game .multi-seat .h-meta b{font-size:10px}.compact-game .multi .h-board-zone{top:max(calc(50% - var(--card-h)/2),142px)}
}

/* Touch devices keep the same game flow, with readable fields and reachable controls. */
.mobile-remote #a-quit{display:none!important}
@media(max-width:1199px){
  .compact-game .h-button,.compact-game .game-toolbar .h-button,.app-dialog .h-button{min-height:44px;min-width:44px}
  .compact-game .h-size-row .h-button{min-height:44px}
  .compact-game .h-input,.app-dialog .settings select{font-size:16px;min-height:44px}
  .app-dialog{overscroll-behavior:contain;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  .app-dialog .dialog-head{gap:12px}.app-dialog .dialog-head .h-button{flex-shrink:0}
  .compact-game #history-rows{max-height:120px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
}
@media(max-width:600px){
  :root{--card-w:46px;--card-h:66px;--card-gap:4px;--board-w:246px}
  .compact-game.h-demo{padding:max(0px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
  .compact-game .app-line{min-height:58px;gap:8px}.compact-game .brand-name{font-size:19px}.compact-game .brand-chip{width:22px;height:22px}
  .compact-game .game-toolbar{gap:5px}.compact-game .game-toolbar .h-button{padding:7px 9px;font-size:11px}.compact-game .game-toolbar .more-button{font-size:21px;padding:4px 8px}
  .compact-game .play-layout{margin-top:10px;gap:10px}
  .compact-game .h-table{padding:0 12px;border-radius:16px}.compact-game .h-head{min-height:46px;font-size:10px;gap:6px}.compact-game .h-blind{font-size:8px}
  .compact-game .h-stage{height:330px}.compact-game .h-stage::before{inset:16px -5px 19px;border-width:5px}.compact-game .h-stage::after{inset:28px 7px 31px}
  .compact-game .h-opp{top:12px;left:3px;gap:6px}.compact-game .h-user{right:3px;bottom:10px;gap:6px}
  .compact-game .h-meta,.compact-game .h-user .h-meta{max-width:100%;font-size:10px;line-height:1.65}.compact-game .h-meta b{font-size:11px}
  .compact-game .h-board-zone{top:122px}.compact-game .h-pot{top:calc(var(--card-h) + 12px);gap:6px}.compact-game .h-pot-amount{font-size:23px}
  .compact-game .felt-mark{top:92px}.compact-game .felt-mark span{font-size:15px}.compact-game .felt-mark small{display:none}
  .compact-game .h-rank{top:5px;left:5px;font-size:19px}.compact-game .h-rank.ten{font-size:17px}.compact-game .h-suit{width:20px;height:20px;right:5px;bottom:5px}
  .compact-game .h-history{padding:10px 12px;border-radius:12px}.compact-game .h-history-head{font-size:11px;margin-bottom:5px}.compact-game .h-history-head>div{display:flex;align-items:center;gap:8px}.compact-game .h-history-head .eyebrow{font-size:6px;margin:0}.compact-game .h-history-meta{display:none}
  .compact-game #history-rows{max-height:76px}.compact-game .h-history-row{grid-template-columns:50px minmax(0,1fr);gap:8px;padding:5px 0;font-size:10px;line-height:1.7}
  .compact-game .action-card{width:100%;padding:14px;border-radius:14px}.compact-game .panel-heading{display:none}.compact-game .h-control{gap:9px}
  .compact-game .bet-divider{padding-top:10px;margin:0;font-size:11px}.compact-game .h-button{font-size:13px;min-height:46px}.compact-game .h-size-row .h-button{font-size:12px}
  .compact-game .h-fields{gap:10px}.compact-game .h-field{gap:5px}.compact-game .h-field label{font-size:11px}.compact-game .h-input{height:46px;font-size:17px}
  .compact-game .h-help{font-size:10px}.compact-game .h-button.submit{min-height:48px;font-size:14px}.compact-game .status-line{margin-top:10px;padding-top:9px;font-size:11px}
  .compact-game #result{max-height:none;font-size:11px}.compact-game #payment{font-size:10px}
  .compact-game .h-stage.multi{--mobile-seat-rows:1;height:calc(254px + var(--mobile-seat-rows)*124px)}
  .compact-game .h-stage.multi:has(.multi-seat:nth-child(4)){--mobile-seat-rows:2}
  .compact-game .h-stage.multi:has(.multi-seat:nth-child(7)){--mobile-seat-rows:3}
  .compact-game .opponent-grid{top:10px;left:0;right:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 5px}
  .compact-game .multi-seat{height:112px;gap:4px;align-items:center}.compact-game .multi-seat .h-meta{width:100%;font-size:9px;line-height:1.6;text-align:center}.compact-game .multi-seat .h-meta b{font-size:10px}
  .compact-game .multi-seat .h-cards{bottom:0;gap:4px}.compact-game .multi .h-board-zone{top:calc(var(--mobile-seat-rows)*124px + 16px);bottom:auto}
  .compact-game .multi .felt-mark{display:none}.compact-game .multi::before{border-radius:22% / 12%}.compact-game .multi::after{border-radius:22% / 12%}
  .app-dialog,#history-dialog{width:calc(100% - 20px);padding:18px 14px;border-radius:15px;max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  .app-dialog .dialog-head{margin-bottom:14px}.app-dialog .dialog-head h2{font-size:19px}.app-dialog .dialog-description{font-size:13px;line-height:1.75;margin-bottom:16px}
  .app-dialog .settings label{font-size:12px}.app-dialog .settings select{font-size:16px;height:46px}.app-dialog .settings .h-notice{font-size:12px}
  .app-dialog .dialog-actions{margin-top:18px}.app-dialog .fairness>summary,.app-dialog .session-details>summary{min-height:44px;font-size:12px}.app-dialog .app-info-actions{font-size:12px}
  #history-list>.h-button{font-size:12px}#replay-body{font-size:12px}.review-dialog .analysis-scroll{max-height:65dvh}
}
@media(max-width:350px){
  .compact-game.h-demo{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .compact-game .brand{gap:5px}.compact-game .brand-name{font-size:16px}.compact-game .brand-chip{width:18px;height:18px}
  .compact-game .game-toolbar .h-button{padding-left:7px;padding-right:7px;font-size:10px}.compact-game .game-toolbar{gap:4px}
  .compact-game .h-table{padding:0 10px}.compact-game .h-meta,.compact-game .h-user .h-meta{font-size:9px}
  .compact-game .opponent-grid{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px}
  .compact-game .h-stage.multi:has(.multi-seat:nth-child(3)){--mobile-seat-rows:2}
  .compact-game .h-stage.multi:has(.multi-seat:nth-child(5)){--mobile-seat-rows:3}
  .compact-game .h-stage.multi:has(.multi-seat:nth-child(7)){--mobile-seat-rows:4}
}
@media(min-width:601px) and (max-width:960px) and (min-aspect-ratio:3/2){
  :root{--card-w:46px;--card-h:66px;--card-gap:4px;--board-w:246px}
  .compact-game.h-demo{max-width:none;padding:0 max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
  .compact-game .app-line{min-height:54px}.compact-game .play-layout{grid-template-columns:minmax(0,1fr) 260px;grid-template-rows:auto auto;grid-template-areas:"table actions" "history actions";gap:10px;margin-top:8px}
  .compact-game .h-table{padding:0 10px}.compact-game .h-head{min-height:42px;font-size:10px}.compact-game .h-blind{font-size:8px}
  .compact-game .h-stage{height:310px}.compact-game .h-opp{top:10px;left:4px;gap:5px}.compact-game .h-user{right:4px;bottom:10px;gap:5px}.compact-game .h-meta{font-size:9px;max-width:100%;line-height:1.6}
  .compact-game .h-board-zone{top:112px}.compact-game .h-pot{top:calc(var(--card-h) + 10px)}.compact-game .h-pot-amount{font-size:22px}.compact-game .felt-mark{display:none}
  .compact-game .h-rank{font-size:19px;top:5px;left:5px}.compact-game .h-rank.ten{font-size:17px}.compact-game .h-suit{width:20px;height:20px;right:5px;bottom:5px}
  .compact-game .action-card{width:100%;padding:12px}.compact-game .panel-heading{display:none}.compact-game .h-control{gap:8px}.compact-game .bet-divider{padding-top:9px;margin:0}.compact-game .h-field{gap:4px}.compact-game .h-fields{gap:8px}.compact-game .h-input{height:44px}.compact-game .status-line{margin-top:8px;padding-top:8px}
  .compact-game .h-history{padding:10px}.compact-game .h-history-head{margin-bottom:5px;font-size:11px}.compact-game .h-history-meta,.compact-game .h-history-head .eyebrow{display:none}.compact-game #history-rows{max-height:70px}.compact-game .h-history-row{font-size:10px;padding:4px 0;gap:8px;grid-template-columns:50px minmax(0,1fr)}
  .compact-game .h-stage.multi{height:calc(244px + var(--rows-mobile)*126px)}.compact-game .opponent-grid{grid-template-columns:repeat(2,minmax(0,1fr));left:2px;right:2px;top:10px;gap:10px}.compact-game .multi-seat{height:116px;align-items:center}.compact-game .multi-seat .h-meta{font-size:9px;line-height:1.6;text-align:center}
  .compact-game .multi .h-board-zone{top:calc(var(--rows-mobile)*126px + 16px);bottom:auto}
}
