:root{font-family:system-ui,'Microsoft YaHei',sans-serif;color:#f0f2df;background:#101e1b;color-scheme:dark;--gold:#eee0a0;--line:#728c7744}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{min-height:44px;border:1px solid #81988870;border-radius:9px;padding:8px 12px;background:#243d33;color:#f6f4e3;cursor:pointer;touch-action:manipulation;font-size:14px}button:disabled{opacity:.48;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #f3d680;outline-offset:2px}button:not(:disabled):active{filter:brightness(1.2)}[hidden]{display:none!important}input,select{min-height:44px;min-width:0;border:1px solid #799584;border-radius:8px;background:#112b22;color:#fff;padding:6px 8px;font-size:16px}p{margin:6px 0;line-height:1.5}small{font-size:12px}dialog{color:#f4f0dc;background:#192f27;border:1px solid #7d9179;border-radius:16px;padding:20px;width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto}dialog::backdrop{background:#04100bdd}dialog h2{margin:0 0 12px;font-size:20px}dialog button{margin-top:8px}dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px}dialog label{display:flex;align-items:center;justify-content:space-between;margin:12px 0;gap:12px}dialog select{max-width:65%}dialog pre{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.preview-bar{height:48px;display:flex;align-items:center;gap:10px;padding:0 max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left));background:#edeada;color:#263e34}.preview-bar strong{font-size:13px}.preview-bar button{min-height:44px;padding:4px 10px;font-size:13px}.preview-bar span{font-size:12px;margin-left:auto}#table{height:calc(100dvh - 48px)}.river-table{display:flex;flex-direction:column;overflow:hidden;min-height:0;padding-bottom:env(safe-area-inset-bottom)}.table-header{height:52px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:4px 16px;border-bottom:1px solid var(--line);gap:8px}.table-header>div{display:flex;align-items:center;gap:18px}.brand{font-family:Georgia,'Microsoft YaHei',serif;font-size:20px;color:var(--gold)}.table-meta{font-size:14px;color:#ccd8c6}.mode-info{min-height:28px;flex:none;padding:4px 16px;background:#23392e;font-size:13px;color:#e1e8d6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.play-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;padding:10px 14px}.table-main{min-height:0;display:flex;flex-direction:column;position:relative;gap:8px}.arena{flex:1;position:relative;min-height:130px;isolation:isolate;background:linear-gradient(#10201822,#0c211dcc),var(--room-image,none) center 42%/cover;border-radius:18px;overflow:hidden}.table-image{position:absolute;width:96%;height:auto;max-height:100%;object-fit:contain;left:2%;bottom:0;z-index:-1}.table-fallback{position:absolute;z-index:-2;left:3%;right:3%;top:25%;bottom:6%;border:12px solid #262c27;border-radius:50%;background:radial-gradient(ellipse,#387956,#184631);box-shadow:0 2px 0 2px #ac9160}.river-table[data-table=ready] .table-fallback{visibility:hidden}.river-table[data-table=failed] .table-image{display:none}.table-wordmark{position:absolute;top:54%;left:50%;transform:translate(-50%,-50%);font:14px Georgia;letter-spacing:3px;color:#dac98e85;pointer-events:none}.seats{position:absolute;inset:12% 3% 7%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:1fr 1fr;gap:clamp(10px,3vw,60px) 10px;align-items:end}.seat{min-width:0;width:100%;position:relative;text-align:center;padding:5px 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60px;border:1px solid #a4b79366;background:#102b22eb;box-shadow:0 4px 12px #04170d99;z-index:1}.seat-name{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px}.seat-name small{font-size:12px;color:#e8dba4}.seat-stack{font-size:16px;line-height:22px;font-variant-numeric:tabular-nums;max-width:100%;overflow-wrap:anywhere}.seat-state{font-size:12px;line-height:16px;color:#c4d9bc}.seat.acting{border:2px solid #f7df86;background:#38523bed}.sprite{position:absolute;z-index:-1;width:clamp(68px,8vw,124px);height:clamp(68px,8vw,124px);bottom:calc(100% - 8px);left:50%;transform:translateX(-50%);background-image:var(--cast-image,none);background-size:300% 300%;background-position:var(--cx) var(--cy);pointer-events:none;filter:drop-shadow(0 4px 4px #0008)}.river-table[data-count="2"] .seats{display:flex;justify-content:center;align-items:flex-start;padding-top:12%}.river-table[data-count="2"] .seat{width:150px}.river-table[data-count="8"] .seat:nth-child(6){grid-column:2}.river-table[data-count="10"] .seat:nth-child(6){grid-column:1}.board-strip{flex:none;min-height:78px;display:flex;align-items:center;justify-content:center;gap:22px;padding:5px;background:#254737;border-radius:12px}.board,.hole{display:flex;gap:5px;align-items:center}.card{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#faf6e5;color:#192c26;border-radius:5px;width:43px;height:59px;box-shadow:0 2px 0 #b1a988;font-size:21px;flex:none;line-height:1.05}.card b{font:700 19px Georgia}.card.red{color:#aa362d}.pot-info{display:flex;flex-direction:column;font-size:12px;gap:2px;min-width:90px}.pot-info strong{font-size:21px;color:var(--gold);font-variant-numeric:tabular-nums}.self-strip{display:flex;align-items:center;gap:14px;min-height:76px;flex:none;padding:5px 12px;background:#122e24;border:1px solid var(--line);border-radius:12px}.self-money{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px;font-size:13px}.self-money strong{font-size:23px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.wallet-button{font-size:13px;padding:6px}.turn-line{flex:none;min-height:26px;font-size:14px;color:#f6e6a8;line-height:20px;padding:3px 7px;background:#354731;border-radius:6px}.wager{min-height:0;overflow-y:auto;border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px;background:#172c24}.wager-heading{display:flex;align-items:center;justify-content:space-between;font-size:15px;min-height:24px}.wager-heading span{font-size:12px;color:#c7d5c2}.action-row{display:flex;gap:8px}.action-row button{flex:1;padding:5px;white-space:nowrap}.action-row .call{flex:1.6;background:#466440}.editor{display:flex;flex-direction:column;gap:8px}.amount-line{display:flex;align-items:center;justify-content:space-between;gap:8px}.amount-line label{font-size:14px}.amount-line label small{display:block;color:#bed0b6}.amount-line input{width:56%;font-variant-numeric:tabular-nums}.range-line{display:flex;align-items:center;gap:6px}.range-line input{flex:1;width:50%;padding:0;accent-color:#eadc95;touch-action:pan-y}.range-line span{font-size:12px;max-width:95px}.chip-shortcuts{display:flex;gap:8px}.chip-shortcuts button{flex:1;min-width:0;font-size:13px;padding:4px}.draft-summary{display:flex;justify-content:space-between;font-size:13px;gap:6px}.draft-summary b{display:block;font-size:18px;line-height:26px;font-variant-numeric:tabular-nums;color:var(--gold)}#wager-hint{font-size:12px;color:#c9d5c1;margin:0}#wager-error{font-size:13px;color:#ffcaac;margin:0}#wager-error:empty{display:none}.primary{background:#e8dea4;color:#233a2a;font-weight:700;border-color:#e8dea4}.danger{background:#aa593e}.request-status{font-size:12px;overflow-wrap:anywhere;line-height:18px;margin:0;min-height:18px}.confirm-dialog>div{display:flex;gap:12px;justify-content:flex-end}.physical-chips{display:flex;gap:16px;align-items:flex-end;flex-wrap:wrap;padding:16px 0}.physical-stack{display:flex;align-items:center;flex-direction:column}.coin-tower{width:65px;height:auto;max-height:160px}.stack-caption{display:flex;gap:5px;font-size:14px}.preview-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px}.preview-tools button{margin:0}
@media(max-width:700px){
 .table-header{height:44px;padding:0 10px}.table-header>div{gap:8px}.brand{font-size:16px}.table-meta{font-size:12px}.details-button{font-size:12px;padding:4px 7px}.mode-info{font-size:12px;padding:4px 10px;min-height:26px}
 .play-layout{display:flex;flex-direction:column;gap:6px;padding:6px 8px}.table-main{flex:1;gap:5px}.arena{min-height:160px}.seats{inset:6px 5px;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,1fr);gap:7px;align-items:end}.seat{min-height:58px;padding:2px}.seat .sprite{height:52px;width:52px;bottom:calc(100% - 22px);opacity:.9}.seat-name{font-size:12px}.seat-state{font-size:12px;line-height:14px}.seat-stack{font-size:16px;line-height:20px}.river-table[data-count="8"] .seat:nth-child(6),.river-table[data-count="10"] .seat:nth-child(6){grid-column:auto}.river-table[data-count="8"] .seat:last-child{grid-column:2}.river-table[data-count="2"] .seats{padding-top:25%}.river-table[data-count="2"] .sprite{width:95px;height:95px;bottom:calc(100% - 10px)}
 .board-strip{min-height:64px;gap:10px;padding:3px 7px}.card{width:32px;height:48px;font-size:19px}.card b{font-size:17px}.board{gap:4px}.pot-info{min-width:88px;font-size:12px}.pot-info strong{font-size:19px}.pot-info small{font-size:12px}.self-strip{min-height:64px;padding:4px 8px;gap:9px}.self-money{font-size:12px}.self-money strong{font-size:19px}.self-money small{font-size:12px}.hole .card{width:32px;height:45px}.wallet-button{max-width:62px;font-size:12px}.turn-line{font-size:13px;min-height:24px;line-height:18px;padding:2px 5px}
 .wager{flex:none;padding:6px 8px;gap:4px;overflow:visible}.wager-heading{display:none}.action-row{gap:8px}.action-row button{min-height:44px;font-size:14px}.editor{display:grid;grid-template-columns:1fr 1fr;gap:4px 8px}.amount-line{grid-column:1;gap:4px}.amount-line label small{display:none}.amount-line input{width:70%;height:44px}.range-line{grid-column:2;gap:3px}.range-line span{display:none}.range-line input{width:100%;height:44px}.chip-shortcuts{grid-column:1/-1;gap:8px}.chip-shortcuts button{min-height:44px}.draft-summary{grid-column:1;align-items:center;font-size:12px;gap:4px}.draft-summary b{font-size:16px;line-height:20px}.submit{grid-column:2;font-size:14px;min-height:44px;padding:4px}#wager-hint{display:none}#wager-error{grid-column:1/-1;font-size:12px}.request-status{font-size:12px;line-height:16px}.wager [data-do=query]{min-height:44px}.wager:has([data-do=query]:not([hidden])) .chip-shortcuts{display:none}
}
@media(max-height:500px) and (min-width:701px){
 .preview-bar{height:44px}#table{height:calc(100dvh - 44px)}.table-header{height:44px;padding:0 10px}.brand{font-size:16px}.mode-info{min-height:24px;font-size:12px;padding:3px 10px}.play-layout{padding:5px 8px;gap:8px;grid-template-columns:minmax(0,1fr) 280px}.table-main{gap:4px}.arena{min-height:80px}.seats{inset:0 3px;gap:4px 5px;align-items:end}.seat{min-height:48px;padding:1px}.seat-name{font-size:12px;line-height:15px}.seat-stack{font-size:16px;line-height:18px}.seat-state{font-size:12px;line-height:14px}.sprite{width:43px;height:43px;bottom:calc(100% - 25px)}.river-table[data-count="2"] .seats{padding-top:8%}.river-table[data-count="2"] .sprite{width:85px;height:85px;bottom:calc(100% - 20px)}.board-strip{min-height:53px;padding:2px;gap:12px}.card{width:30px;height:44px;font-size:17px}.card b{font-size:16px}.pot-info{font-size:12px;gap:0}.pot-info strong{font-size:18px}.pot-info small{display:none}.self-strip{min-height:51px;padding:2px 8px;gap:8px}.self-money strong{font-size:18px;line-height:20px}.self-money{font-size:12px;gap:0}.self-money small{font-size:12px}.hole .card{width:28px;height:42px}.turn-line{font-size:13px;line-height:18px;min-height:22px;padding:2px 5px}.wager{padding:6px;gap:4px}.wager-heading{display:none}.editor{gap:4px;display:grid;grid-template-columns:1fr 1fr}.amount-line{grid-column:1/-1}.amount-line label small{display:inline;margin-left:6px}.range-line{grid-column:1}.range-line span{display:none}.range-line input{width:100%}.chip-shortcuts{grid-column:2;gap:4px}.chip-shortcuts [data-chip]{display:none}.draft-summary{grid-column:1/-1}.draft-summary b{display:inline;font-size:16px;margin-left:4px}.submit{grid-column:1/-1;min-height:44px}#wager-hint{display:none}#wager-error{grid-column:1/-1;font-size:12px}.action-row button{padding:3px;font-size:14px}.request-status{font-size:12px;line-height:16px}.wager:has([data-do=query]:not([hidden])) .range-line,.wager:has([data-do=query]:not([hidden])) .chip-shortcuts{display:none}
}
@media(prefers-reduced-motion:no-preference){button{transition:background-color .12s}.acting{box-shadow:0 0 12px #dbc77c44}}
/* Portrait art sits behind, never across, the independent name/amount layer. */
.seat-name,.seat-stack,.seat-state{position:relative;z-index:2;background:#173429;border-radius:3px}
@media(max-width:700px){.seat .sprite{bottom:calc(100% - 3px)}}
@media(max-height:500px) and (min-width:701px){.sprite{bottom:calc(100% - 18px)}.seat-name,.seat-stack,.seat-state{background:#173429}}
.wager.no-range #wager-hint{display:block;grid-column:1/-1}.wager.has-pending .editor{display:none}.tournament .mode-info{white-space:normal;line-height:18px}.level-clock{display:inline-block}
@media(max-width:700px){.wager.no-range:not(.has-pending) #wager-hint{font-size:12px;line-height:16px}}
@media(max-width:700px){.seat .sprite{width:42px;height:42px}}
@media(max-height:500px) and (min-width:701px){.seat{padding-left:30px}.seat .sprite{width:32px;height:40px;left:0;top:5px;bottom:auto;transform:none;z-index:1}.seat-name small{display:none}.seat-name{max-width:100%;font-size:12px}.seat-stack,.seat-state{background:#173429}}

/* A visual-viewport reduction never remounts the editor or discards its draft. */
.keyboard-compact .arena{display:none}.keyboard-compact .action-row,.keyboard-compact .chip-shortcuts{display:none}.keyboard-compact .wager #wager-hint{display:none}.keyboard-compact .play-layout{gap:4px;padding:4px 8px}.keyboard-compact .table-main{flex:0;gap:3px}.keyboard-compact .table-header{height:40px}.keyboard-compact .mode-info{min-height:22px;padding-top:2px;padding-bottom:2px}
.keyboard-compact .table-main{flex:none}
.session-outcome{margin:auto 0;padding:12px 4px;display:flex;flex-direction:column;gap:12px}.session-outcome h2{margin:0;color:var(--gold);font-size:24px}.session-outcome p{color:#d5dfcf;font-size:14px;line-height:1.6}.session-actions{display:flex;flex-wrap:wrap;gap:8px}.session-actions button{flex:1;white-space:nowrap}
@media(max-width:700px),(max-height:500px){.session-outcome{padding:4px;gap:6px}.session-outcome h2{font-size:19px}.session-outcome p{font-size:13px;margin:0}}

/* Public showdown cards replace stack/status text only while actually revealed. */
.table-header .table-actions{display:flex;gap:6px;flex:none}.table-actions button{white-space:nowrap}
.seat.has-revealed .seat-stack,.seat.has-revealed .seat-state{display:none}
.seat-cards{display:flex;gap:4px;justify-content:center;position:relative;z-index:2;margin:3px 0}
.seat-cards .card{width:29px;height:37px;font-size:16px;border-radius:4px;padding:2px}.seat-cards .card b{font-size:15px}
.seat-hand-name{font-size:12px;line-height:16px;color:#f2efda;position:relative;z-index:2}
.seat.winner{border:2px solid #f0cf72;background:#354631}.winner-badge{font-size:12px;line-height:16px;color:#ffe198;position:relative;z-index:2;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.self-result{color:#ffe198!important}.result-player{padding:10px;margin-top:10px;border:1px solid var(--line);border-radius:10px}.result-player h3{margin:0 0 8px;font-size:16px}.result-winner{border-color:#d3b362;background:#38452c}.result-player .board{justify-content:flex-start}
@media(max-width:700px){.table-header>div:first-child{gap:2px;min-width:0;flex-direction:column;align-items:flex-start}.table-header .table-actions{gap:4px}.table-actions button{padding:4px 6px;font-size:12px}.seat-cards{margin:1px 0;gap:3px}.seat-cards .card{width:25px;height:30px;font-size:13px;flex-direction:row;gap:0;padding:2px;justify-content:space-around}.seat-cards .card b{font-size:13px}.seat.has-revealed .sprite{opacity:.35}.seat-hand-name,.winner-badge{line-height:14px}.seat.has-revealed{padding:2px}.self-result{font-size:12px;line-height:14px}}
@media(max-height:500px) and (min-width:701px){.table-actions button{padding:4px 6px;font-size:12px}.seat.has-revealed{padding-left:2px}.seat.has-revealed .sprite{display:none}.seat-cards{margin:0;gap:3px}.seat-cards .card{width:27px;height:23px;flex-direction:row;gap:1px;font-size:13px;padding:1px}.seat-cards .card b{font-size:13px}.seat-hand-name,.winner-badge{line-height:13px}.self-result{font-size:12px;line-height:13px}}

.winner-hand{display:none}
@media(max-height:500px) and (min-width:701px){.seat.winner.has-revealed .seat-hand-name{display:none}.winner-hand{display:inline}.self-money{position:relative;padding-right:94px}.self-money .self-result{position:absolute;right:0;top:50%;transform:translateY(-50%);max-width:90px;white-space:normal}}
