/* Isolated from the mobile player and spectator layout. */
.hy-page{max-width:1450px;margin:auto}.hy-page .heading-actions{display:flex;gap:8px;flex-wrap:wrap}
.hy-summary,.hy-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.hy-summary{margin:0 0 22px;background:#083e31;border:1px solid #2b6554;border-radius:18px;padding:22px;color:#f7efdc}
.hy-metric{display:flex;flex-direction:column;gap:8px;min-width:0}.hy-metric>span{font-size:12px;font-weight:650}.hy-metric strong{font-size:24px;line-height:1.25;overflow-wrap:anywhere}.hy-metric strong small{font-size:12px}.hy-metric>small{font-size:10px;line-height:1.5;opacity:.73}
.hy-policy{display:flex;align-items:flex-start;gap:10px;line-height:1.7;margin:0 0 15px}.hy-policy .icon{flex:none}.hy-sync-state{font-size:11px;color:#68786d;margin-bottom:20px}
.hy-branch{margin:22px 0;background:#eff4ed;border:1px solid #c9d7cc;border-radius:18px;overflow:hidden}.hy-branch-title{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:18px 22px;background:#e0eae1;border-bottom:1px solid #c5d5c9;flex-wrap:wrap;color:#154d3c}.hy-branch-title>div{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.hy-branch-title span{font-size:12px}
.hy-account{margin:14px;padding:22px;border:1px solid #dce2d6;border-radius:13px;background:#fffef9}.hy-account-title{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.hy-account-title h3{font:700 20px/1.25 system-ui;margin:7px 0 4px;color:#144938}.hy-account-title p{font-size:12px;margin:0;color:#6c7a6c;overflow-wrap:anywhere}.hy-level{font-size:10px;text-transform:uppercase;letter-spacing:1.4px;color:#947c36;font-weight:800}
.hy-counts{display:flex;gap:16px;flex-wrap:wrap;font-size:11px;margin:16px 0;color:#5d7462}.hy-values{padding:16px 0;border-top:1px solid #e5e8dc}.hy-values .hy-metric strong{font-size:21px}.hy-values .hy-metric:nth-child(3)>strong{color:#9b7427}.hy-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.hy-actions .btn{min-height:36px;padding:8px 11px;font-size:11px}
.hy-children{margin-left:30px;border-left:3px solid #99b6a0;margin-bottom:14px}.hy-more{border-top:1px solid #e5e8dc;padding:12px 0 0}.hy-more summary{cursor:pointer;color:#2a6951;font-size:12px;min-height:24px}.hy-more>p{font-size:11px;color:#627c66}.hy-no-children{padding:0 25px 12px;font-size:12px;color:#6e7e6e}
@media(max-width:950px){.hy-summary,.hy-values{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.hy-account{padding:18px}.hy-branch-title{padding:16px}}
@media(max-width:520px){.hy-summary{padding:17px;gap:20px 12px}.hy-metric strong{font-size:21px}.hy-account{margin:9px;padding:14px}.hy-account-title h3{font-size:17px}.hy-values .hy-metric strong{font-size:19px}.hy-children{margin-left:12px}.hy-branch-title{gap:9px;padding:13px}.hy-counts{gap:8px;font-size:10px}.hy-page .page-heading{gap:12px}.hy-actions .btn{min-height:42px;font-size:11px}.hy-policy{font-size:12px}}

.match-confirm-values{display:grid;grid-template-columns:1fr 1fr;gap:14px;background:#eef4ed;border:1px solid #c8dccc;border-radius:13px;padding:17px;margin:16px 0;color:#174c3b}
.match-confirm-values>div{display:flex;flex-direction:column;gap:7px;min-width:0}.match-confirm-values span{font-size:12px;line-height:1.4}.match-confirm-values strong{font-size:23px;overflow-wrap:anywhere}
.match-confirm-mode{font-size:17px;font-weight:700}#match-confirm-form .form-actions{flex-wrap:wrap}#match-confirm-form .btn{min-height:44px}#match-confirm-form p{line-height:1.6}
@media(max-width:420px){.match-confirm-values{padding:13px;gap:12px}.match-confirm-values strong{font-size:20px}#match-confirm-form .form-actions>.btn{flex:1;justify-content:center}}

/* The lobby is centered in the safe viewport, independent of hidden sidebar offsets. */
body.pool-lobby-mode .app-shell{display:block!important;min-height:100dvh}
body.pool-lobby-mode .main-wrap{margin:0!important;width:100%;box-sizing:border-box;display:flex!important;flex-direction:column;align-items:center;justify-content:center;min-height:100dvh}
body.pool-lobby-mode .main-content{flex:0 0 auto;width:100%;max-width:1040px!important;margin:0 auto!important;min-width:0}
body.pool-lobby-mode .fixed-lobby.pool-premium{width:100%;margin:0 auto!important}
body.pool-lobby-mode .pool-lobby-top{display:grid;grid-template-columns:32px minmax(0,1fr) auto auto 34px;gap:9px;align-items:center}
body.pool-lobby-mode .pool-lobby-top .pool-brand{margin:0;min-width:0}
body.pool-lobby-mode .pool-lobby-top .pg-language{padding:2px;border-radius:18px;gap:0}
body.pool-lobby-mode .pool-lobby-top .pg-language button{min-width:36px;min-height:40px;font-size:11px;padding:6px}
body.pool-lobby-mode .pool-lobby-top .pool-menu,body.pool-lobby-mode .pool-lobby-top .pool-settings{min-height:40px;height:40px;width:32px;min-width:32px}
body.pool-lobby-mode .pool-wallet{min-width:0;max-width:100%;min-height:40px}
body.pool-lobby-mode .pool-wallet strong{overflow-wrap:anywhere;min-width:0;white-space:normal}
@media(max-width:700px){
 body.pool-lobby-mode .main-content{max-width:480px!important}
 body.pool-lobby-mode .pool-lobby-top{padding:10px 10px;grid-template-columns:30px minmax(40px,1fr) auto minmax(52px,auto) 30px;gap:5px}
 body.pool-lobby-mode .pool-lobby-top .pool-brand>img{display:none}
 body.pool-lobby-mode .pool-wallet{padding:5px 7px}
 body.pool-lobby-mode .pool-wallet>.icon{display:none}
 body.pool-lobby-mode .pool-lobby-top .pool-brand strong{font-size:25px}
 body.pool-lobby-mode .pool-lobby-top .pool-brand small{font-size:6px;letter-spacing:2px}
 body.pool-lobby-mode .pool-lobby-top .pg-language button{min-width:32px;padding:5px}
}
@media(max-height:500px) and (orientation:landscape){body.pool-lobby-mode .main-content{max-width:1000px!important}}
/* Duel has only north/south players: pull their discard spots inward. */
body.pg-mode.pg-south.pg-duel .pg-discard-0{left:64%;right:auto;top:auto;bottom:24%;transform:none}
body.pg-mode.pg-south.pg-duel .pg-discard-2{left:64%;right:auto;bottom:auto;top:24%;transform:none}
@media(orientation:portrait){
 body.pg-mode.pg-south.pg-duel .pg-discard-0{left:62%;bottom:26%}
 body.pg-mode.pg-south.pg-duel .pg-discard-2{left:62%;top:26%}
}
@media(max-height:360px) and (orientation:landscape){
 body.pg-mode.pg-south.pg-duel .pg-discard-0{left:74%;right:auto;top:42%;bottom:auto}
 body.pg-mode.pg-south.pg-duel .pg-discard-2{left:65%;right:auto;top:42%;bottom:auto}
}

/* Read-only split inside the existing level-2 dashboard bank card. */
.admin-shell .bank-split-kpi .bank-split-values{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:14px 0 12px}
.admin-shell .bank-split-values>div{min-width:0}
.admin-shell .bank-split-values>div+div{padding-top:12px;border-top:1px solid #d8c08155}
.admin-shell .bank-split-values dt{font-size:12px;line-height:1.4;font-weight:600;color:#e0e8d9;overflow-wrap:anywhere}
.admin-shell .bank-split-values dd{margin:4px 0 0;min-width:0}
.admin-shell .bank-split-values strong{display:block;font-size:26px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.5px;overflow-wrap:anywhere}
.admin-shell .bank-split-kpi>small{line-height:1.5;color:#c4d6bd}
@media(max-width:600px){
 .admin-shell .bank-split-kpi .bank-split-values{gap:10px;margin:12px 0 10px}
 .admin-shell .bank-split-values>div+div{padding-top:10px}
 .admin-shell .bank-split-values dt{font-size:11px}
 .admin-shell .bank-split-values strong{font-size:23px}
}

/* Isolated destructive-reset preview: values must be visible without horizontal scrolling. */
.modal-body .journal-reset-totals{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse;font-size:12px}
.modal-body .journal-reset-totals th,.modal-body .journal-reset-totals td{padding:10px 7px;vertical-align:middle;border-bottom:1px solid #dde2d5;line-height:1.45}
.modal-body .journal-reset-totals th:first-child{width:46%;white-space:normal;overflow-wrap:anywhere;text-align:left}
.modal-body .journal-reset-totals th:not(:first-child),.modal-body .journal-reset-totals td{width:27%;text-align:right;white-space:normal;overflow-wrap:anywhere}
.modal-body .journal-reset-totals tbody th{font-size:12px;color:#304c40;font-weight:500}
.modal-body .journal-reset-totals td{font-size:12px;color:#233d32}
.modal-body .journal-reset-totals thead th{font-size:11px;color:#52644b;background:#f2f4ec}
@media(max-width:480px){.modal-body .journal-reset-totals th,.modal-body .journal-reset-totals td{padding:8px 4px}.modal-body .journal-reset-totals tbody th,.modal-body .journal-reset-totals td{font-size:11px}}

/* Scoped bulk table controls: never let flex rules override conditional fields. */
#bulk-tables-form [hidden]{display:none!important}
#bulk-tables-form .form-actions{display:flex;flex-wrap:wrap;gap:8px}
#bulk-table-preview{overflow-wrap:anywhere}
#bulk-table-preview p{margin:6px 0}
/* Isolated play-flow editor and vote dialog. No dimensions of the existing game rack are changed. */
.flow-panel{margin-top:22px;padding:22px;border:1px solid #c9d6cb;border-radius:14px;background:#fffef8}
.flow-panel h2,.flow-panel h3{color:#124d3c;margin:0 0 12px}.flow-panel p{line-height:1.55;color:#50634f;font-size:13px}
.flow-panel label{min-width:0}.flow-panel fieldset{border:1px solid #cad7cc;border-radius:10px;padding:15px;margin:16px 0}.flow-panel legend{padding:0 8px;font-weight:700;color:#235944}
.flow-panel .flow-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.flow-panel .flow-grid input{width:100%;min-width:0}.flow-panel textarea{min-height:80px;line-height:1.45}
.flow-panel .flow-text-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px 0;border-bottom:1px solid #d5dfd4}
.flow-panel .flow-preview{background:#edf3e9;border:1px solid #cedace;border-radius:12px;padding:15px;margin-top:15px}
.flow-panel [data-flow-error]{background:#f8e1df;color:#862f2b;padding:12px;border-radius:8px}
.flow-vote-dialog{color:#214738;font:14px/1.5 system-ui}.flow-vote-dialog p{line-height:1.6}.flow-vote-metrics{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}
.flow-vote-metrics>span{flex:1;min-width:84px;background:#edf3e8;border-radius:10px;padding:12px}.flow-vote-metrics b{display:block;font-size:20px}
.flow-vote-buttons{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:18px 0}.flow-vote-buttons .btn{flex:1;min-height:46px;white-space:normal;line-height:1.4}
.flow-vote-answer{padding:12px;border:1px solid #b8d3bc;border-radius:9px;background:#ebf5e9}.flow-vote-countdown{font-weight:700;text-align:center;margin-top:8px}
.flow-vote-countdown [data-vote-countdown]{font-size:22px;color:#9d3229}
.data-table tbody tr.withdrawal-row>td{background:#fce5e4!important;border-bottom-color:#ebc2bf!important}
.data-table tbody tr.withdrawal-row:hover>td{background:#fad8d6!important}
@media(max-width:800px){.flow-panel .flow-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.flow-panel{padding:15px}.flow-panel .flow-text-row{grid-template-columns:1fr}}
@media(max-width:480px){.flow-panel .flow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.flow-panel{padding:10px}.flow-vote-buttons{flex-direction:column}.flow-vote-metrics{gap:5px}.flow-vote-metrics>span{padding:9px;min-width:70px}}

.flow-times{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.flow-times small{font-weight:400}.flow-text-grid fieldset{display:grid;grid-template-columns:1fr 1fr;gap:12px}.flow-preview-wrap{padding:16px;border:1px solid #c7d4c4;background:#eef4e9;border-radius:10px;margin:16px 0}.flow-preview-wrap>select{max-width:100px;display:inline-block;margin-left:10px}[data-flow-preview]{background:#fffef8;border-radius:10px;padding:18px;margin-top:12px}
@media(max-width:680px){.flow-times{grid-template-columns:repeat(3,minmax(0,1fr))}.flow-text-grid fieldset{grid-template-columns:1fr}}@media(max-width:420px){.flow-times{grid-template-columns:repeat(2,minmax(0,1fr))}}

#modal-root .modal:has(.flow-vote-dialog) .modal-header h2{color:#174c3a!important;font-size:18px;line-height:1.4}
