/* Scoped artwork and input for the two jade tables. */
#bauCuaPanel,.jade-sicbo #jadeStage{touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
#bauCuaPanel button,.jade-sicbo button{touch-action:manipulation;cursor:pointer}
#bauCuaPanel button:focus-visible,.jade-sicbo button:focus-visible{outline:3px solid #fff2a8!important;outline-offset:3px}
#bauCuaPanel[hidden]{display:none!important}
#bauCuaPanel{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;min-height:0!important;max-height:none!important;z-index:5000!important;border:0!important;border-radius:0!important;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)!important;background:#031a13!important}
#bauCuaPanel .bau-cua-header{top:max(5px,env(safe-area-inset-top));left:30%;right:30%;text-align:center}
#bauCuaPanel .bau-cua-header h2{color:#ffe5a0;font-family:Georgia,Arial;font-size:clamp(16px,3.6vh,30px)!important;text-shadow:0 2px 3px #000}
#bauCuaPanel .bau-cua-header .portal-status{display:none}
#bauCuaPanel .exit-game,#bauCuaPanel .bau-cua-toolbar button,.jade-sicbo .lobby-btn,.jade-sicbo #sicboStatsToggle{background:transparent url('/assets/images/jade-bau-sicbo-v1/button.webp') center/100% 100% no-repeat!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:#342109!important;font-weight:900!important;text-shadow:none!important}
#bauCuaPanel .exit-game{top:max(6px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));width:96px;height:36px;min-width:0;font-size:14px!important}
#bauCuaPanel .bau-cua-toolbar{top:max(6px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));gap:7px}
#bauCuaPanel .bau-cua-toolbar button{height:36px;min-width:90px;padding:4px 10px;font-size:10px}
#bauCuaPanel .bau-cua-betbar{left:50%!important;right:auto!important;bottom:max(4px,env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;width:auto!important;max-width:96%!important;border:0;background:none;box-shadow:none;padding:0;gap:8px}
#bauCuaPanel .bau-cua-chips{max-width:none;overflow:visible;gap:8px;padding:4px}
#bauCuaPanel .bau-cua-chips button{width:clamp(40px,6vh,62px);height:clamp(40px,6vh,62px);min-width:40px;border:0!important;border-radius:50%;background:transparent url('/assets/images/jade-bau-sicbo-v1/chip-green.webp') center/contain no-repeat;color:#fff7d6;font-size:clamp(9px,1.5vh,14px);text-shadow:0 1px 3px #000;box-shadow:none}
#bauCuaPanel .bau-cua-chips button:nth-child(3n+2){background-image:url('/assets/images/jade-bau-sicbo-v1/chip-blue.webp')}
#bauCuaPanel .bau-cua-chips button:nth-child(3n){background-image:url('/assets/images/jade-bau-sicbo-v1/chip-red.webp')}
#bauCuaPanel .bau-cua-chips button.selected{outline:2px solid #ffefa6;outline-offset:1px;transform:translateY(-3px)}
#bauCuaPanel .bau-cua-betbar input{width:72px;height:32px;min-height:0;font-size:16px;padding:0 3px;background:#06261ddd}
#bauCuaPanel #bauCuaBetButton{width:145px;height:48px;min-height:0;border:0;border-radius:0;background:transparent url('/assets/images/jade-bau-sicbo-v1/button.webp') center/100% 100% no-repeat;box-shadow:none;color:#3c260c;font-size:16px;text-shadow:none}
#bauCuaPanel button:disabled,.jade-sicbo button:disabled{cursor:default;filter:saturate(.55);opacity:.62}
#bauCuaPanel .bau-cua-stats{display:none;position:absolute!important;top:18%!important;bottom:auto!important;right:12px!important;left:auto!important;width:min(320px,44vw)!important;max-height:54vh!important;z-index:40;overflow:auto;background:#072c23f2!important}
#bauCuaPanel.jade-show-stats .bau-cua-stats:not([hidden]){display:block}
.jade-rotate{display:none}
.jade-sicbo{margin:0;background:#041a12 url('/assets/images/jade-bau-sicbo-v1/table.webp') center/cover fixed no-repeat!important;color:#fff0bc;overflow:hidden}
.jade-sicbo #jadeStage{width:100%;height:100dvh;min-height:0;position:relative;overflow:hidden;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);box-sizing:border-box}
.jade-sicbo .wrap{height:100%;min-height:0;width:100%;max-width:1440px;margin:auto;padding:4px 6% 62px;display:flex;flex-direction:column;box-sizing:border-box}
.jade-sicbo .top{height:36px;min-height:36px;margin:0 0 3px;gap:8px}
.jade-sicbo .lobby-btn,.jade-sicbo #sicboStatsToggle{height:34px;padding:0 20px;font-size:12px}
.jade-sicbo .top-right{margin-left:auto}
.jade-sicbo .pill{background:#05291ece;border:1px solid #cbb16870;padding:6px 12px;min-height:0}
.jade-sicbo .layout{display:block;flex:1;min-height:0}
.jade-sicbo .table{background:none;border:0;border-radius:0;padding:0;box-shadow:none;min-height:0;height:100%;display:flex;flex-direction:column}
.jade-sicbo .table:before,.jade-sicbo .bowl:before,.jade-sicbo .bowl:after,.jade-sicbo .bowl-shadow{display:none}
.jade-sicbo .table-head{height:22px;flex:0 0 22px;margin:0;padding:0;color:#ffe8a3}
.jade-sicbo .section-title{font:900 18px Georgia,Arial;color:#ffe8a3;letter-spacing:.08em}
.jade-sicbo .stage{position:relative;flex:0 0 clamp(64px,16vh,132px);height:clamp(64px,16vh,132px);min-height:0;margin:0;padding:0}
.jade-sicbo .prompt,.jade-sicbo .stage>.result{display:none}
.jade-sicbo .bowl-wrap{width:clamp(150px,24vw,280px);height:100%;min-height:0;margin:0 auto;padding:0}
.jade-sicbo .bowl{position:relative;width:100%;height:100%;background:none;border:0;border-radius:0;box-shadow:none;transform:none}
.jade-sicbo .dice-area{position:absolute;inset:0!important;width:100%;height:100%}
.jade-sicbo .round-clock{position:absolute;right:8%;top:28%;left:auto;width:auto;min-width:0;gap:6px;padding:5px 10px;background:#072b21d9;border-color:#b8a45c}
.jade-sicbo .round-clock strong{font-size:24px}.jade-sicbo .round-clock span,.jade-sicbo .round-clock small{font-size:9px}
.jade-sicbo .bet-groups{flex:1;min-height:0;display:grid;grid-template-rows:1.5fr .55fr .85fr .9fr .95fr;gap:3px;margin:0;padding:0}
.jade-sicbo .bet-group{margin:0;padding:0;border:0;background:none;min-height:0}
.jade-sicbo .group-title{display:none}
.jade-sicbo .side-bets{height:100%;display:grid;grid-template-columns:1fr 4fr 1fr;gap:4px}
.jade-sicbo .side-stack{min-height:0;height:100%;gap:3px;display:grid;grid-template-rows:1fr 1fr}
.jade-sicbo .special-stack{min-height:0;height:100%;display:grid;grid-template-rows:1fr 1fr;gap:3px}
.jade-sicbo .special-grid{height:100%;min-height:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}
.jade-sicbo .any-triple-grid{grid-template-columns:1fr}
.jade-sicbo .sum-grid{grid-template-columns:repeat(14,minmax(0,1fr))}
.jade-sicbo .combo-grid{grid-template-columns:repeat(15,minmax(0,1fr))}
.jade-sicbo .single-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.jade-sicbo .door-grid{height:100%;min-height:0;gap:3px}
.jade-sicbo .bet{height:100%;min-height:0;margin:0;padding:1px 3px;background:#063a2ed4;border:1px solid #cfb96d;border-radius:6px;color:#fff0b5;box-shadow:inset 0 0 10px #0005}
.jade-sicbo .bet strong{font-family:Georgia,Arial;font-size:clamp(10px,1.6vh,16px);color:#ffe4a0;line-height:1.1}
.jade-sicbo .bet span,.jade-sicbo .bet em{font-size:clamp(7px,1.1vh,11px);line-height:1.1;color:#f8dd8c}
.jade-sicbo .bet.total strong{font-size:clamp(13px,2.1vh,20px)}
.jade-sicbo .bet.side-door strong{font-size:clamp(13px,2.3vh,24px)}
.jade-sicbo .bet.selected{background:#0a5947;border-color:#fff1a2}
.jade-sicbo .bet.jade-winner{border-color:#fffbb4;box-shadow:inset 0 0 12px #dab64f70,0 0 8px #ffe58990;animation:jade-win-pulse .55s ease-in-out 3}
.jade-sicbo .door-dice{display:flex;flex-wrap:nowrap;gap:2px;justify-content:center;margin:0;height:auto}
.jade-sicbo .mini-die{--sicbo-mini-size:clamp(9px,2.5vh,22px);width:var(--sicbo-mini-size);height:var(--sicbo-mini-size);min-width:0;min-height:0;flex:0 0 var(--sicbo-mini-size);padding:2px;border-radius:3px;gap:1px}
.jade-sicbo .mini-die i.pip{width:3px;height:3px}.jade-sicbo .mini-die i{width:3px;height:3px}
.jade-sicbo .combo-dice-stack{position:static;display:flex;flex-direction:row;gap:3px;justify-content:center;align-items:center;height:100%}
.jade-sicbo .combo-dice-stack .mini-die{--sicbo-mini-size:clamp(12px,3vh,28px)}
.jade-sicbo .side{display:none;position:absolute;z-index:200;right:6%;top:48px;bottom:70px;width:min(360px,65vw);overflow:auto;background:#062c24ee;border:1px solid #d8bd74;border-radius:12px;padding:8px;box-sizing:border-box}
.jade-sicbo .side.jade-open{display:block}
.jade-sicbo .side .card{background:#07392ce6;margin:0 0 8px;border-color:#aa925566}
.jade-sicbo .chip-dock{height:58px;bottom:env(safe-area-inset-bottom);padding:2px 4%;gap:12px;background:none;box-sizing:border-box}
.jade-sicbo .chips{gap:8px;background:none;border:0;padding:0;box-shadow:none}
.jade-sicbo .chip{width:48px;height:48px;background:transparent url('/assets/images/jade-bau-sicbo-v1/chip-blue.webp') center/contain no-repeat!important;border:0!important;border-radius:50%;box-shadow:none!important;color:#fff7d8;font-size:12px;text-shadow:0 1px 3px #000}
.jade-sicbo .chip:nth-child(3n+2){background-image:url('/assets/images/jade-bau-sicbo-v1/chip-red.webp')!important}
.jade-sicbo .chip:nth-child(3n){background-image:url('/assets/images/jade-bau-sicbo-v1/chip-green.webp')!important}
.jade-sicbo .chip.active{outline:2px solid #fff0a4;outline-offset:1px;transform:translateY(-3px)}
.jade-sicbo .dock-action{height:42px;min-width:90px;border:0;border-radius:0;background:transparent url('/assets/images/jade-bau-sicbo-v1/button.webp') center/100% 100% no-repeat;color:#40290d;box-shadow:none;font-size:13px}
#jadeFxLayer{position:absolute;inset:0;z-index:80;pointer-events:none}
#jadeFxLayer canvas{display:block;width:100%!important;height:100%!important;pointer-events:none}
.jade-sicbo .toast{z-index:1000;bottom:75px}
@keyframes jade-win-pulse{50%{filter:brightness(1.2)}}
@media(orientation:landscape) and (max-height:500px){
 #bauCuaPanel .bau-cua-betbar{gap:5px}
 #bauCuaPanel .bau-cua-chips{gap:5px}
 #bauCuaPanel .bau-cua-chips button{width:40px;height:40px}
 #bauCuaPanel #bauCuaBetButton{width:120px;height:40px;font-size:13px}
 #bauCuaPanel .bau-cua-betbar input{width:58px;height:30px}
 .jade-sicbo .wrap{padding:3px 5% 52px}
 .jade-sicbo .top{height:28px;min-height:28px;margin:0}
 .jade-sicbo .top .pill{padding:3px 7px;font-size:10px}
 .jade-sicbo .lobby-btn,.jade-sicbo #sicboStatsToggle{height:28px;font-size:10px;padding:0 14px}
 .jade-sicbo .table-head{height:18px;flex-basis:18px}
 .jade-sicbo .section-title{font-size:14px}
 .jade-sicbo .stage{flex-basis:64px;height:64px}
 .jade-sicbo .round-clock{right:10%;top:20%;padding:4px 7px}
 .jade-sicbo .round-clock strong{font-size:19px}
 .jade-sicbo .chip-dock{height:48px;gap:8px}
 .jade-sicbo .chip{width:40px;height:40px;font-size:10px}
 .jade-sicbo .dock-action{height:36px;min-width:76px;font-size:11px}
 .jade-sicbo .chips{gap:7px}
 .jade-sicbo .bet.special strong,.jade-sicbo .bet.single strong{display:none}
}
@media(orientation:portrait) and (pointer:coarse){
 #bauCuaPanel .jade-rotate,.jade-sicbo .jade-rotate{display:flex;position:fixed;inset:0;z-index:2000;align-items:center;justify-content:center;flex-direction:column;gap:18px;background:#041e18f5;color:#ffe6a2;text-align:center}
 .jade-rotate span{font-size:72px}.jade-rotate strong{font-size:20px}
}
@media(prefers-reduced-motion:reduce){#bauCuaPanel *, .jade-sicbo *{animation:none!important;transition:none!important}}


.jade-sicbo .bet{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;overflow:hidden}
.jade-sicbo .bet strong,.jade-sicbo .bet em,.jade-sicbo .bet span{position:static!important;margin:0!important;transform:none!important}
.jade-sicbo .mini-die{border:0!important;box-shadow:none!important;background-color:transparent!important;background-image:url('/assets/images/jade-bau-sicbo-v1/jade-atlas.webp')!important;background-size:1280% 960%!important;padding:0!important;border-radius:0!important}
.jade-sicbo .mini-die i{display:none!important}
.jade-sicbo .mini-die.face-1{background-position:94.91525423728814% 20.058139534883722%!important}
.jade-sicbo .mini-die.face-2{background-position:0.211864406779661% 39.825581395348834%!important}
.jade-sicbo .mini-die.face-3{background-position:9.110169491525424% 39.825581395348834%!important}
.jade-sicbo .mini-die.face-4{background-position:18.008474576271187% 39.825581395348834%!important}
.jade-sicbo .mini-die.face-5{background-position:26.906779661016948% 39.825581395348834%!important}
.jade-sicbo .mini-die.face-6{background-position:35.80508474576271% 39.825581395348834%!important}

#bauCuaPanel #bauCuaBetButton{background:transparent url('/assets/images/jade-bau-sicbo-v1/button.webp') center/100% 100% no-repeat!important;box-shadow:none!important;border-radius:0!important}

.jade-sicbo .any-triple-grid .bet{flex-direction:row;gap:8px}.jade-sicbo .any-triple-grid .door-dice{display:none!important}.jade-sicbo .any-triple-grid .bet.special strong{display:block!important}

/* Complete typographic artwork; DOM text remains solely for accessibility. */
#bauCuaPanel .bau-cua-header{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)}
#bauCuaPanel .bau-cua-canvas{inset:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
#bauCuaPanel .exit-game,#bauCuaPanel .bau-cua-toolbar button,#bauCuaPanel #bauCuaBetButton,#bauCuaPanel .bau-cua-chips button{font-size:0!important;color:transparent!important;text-shadow:none!important;border:0!important;padding:0!important;background-repeat:no-repeat!important;background-position:center!important}
#bauCuaPanel .exit-game{width:108px!important;height:36px!important;background-image:url('/assets/images/jade-bau-sicbo-v2/button-lobby.webp')!important;background-size:100% 100%!important}
#bauCuaPanel #bauCuaStatsToggle{width:126px!important;height:42px!important;background-image:url('/assets/images/jade-bau-sicbo-v2/button-stats.webp')!important;background-size:100% 100%!important}
#bauCuaPanel #bauCuaSound{width:108px!important;height:36px!important;background-image:url('/assets/images/jade-bau-sicbo-v2/button-sound-on.webp')!important;background-size:100% 100%!important}
#bauCuaPanel #bauCuaSound[aria-pressed="true"]{background-image:url('/assets/images/jade-bau-sicbo-v2/button-sound-off.webp')!important}
#bauCuaPanel #bauCuaBetButton{width:180px!important;height:60px!important;background-image:url('/assets/images/jade-bau-sicbo-v2/button-bet.webp')!important;background-size:100% 100%!important}
#bauCuaPanel .bau-cua-chips button{width:clamp(44px,8vh,76px)!important;height:clamp(44px,8vh,76px)!important;min-width:44px!important;background-size:contain!important;box-shadow:none!important}
#bauCuaPanel .bau-cua-betbar{padding:4px!important;gap:10px!important;max-width:94%!important}
#bauCuaPanel .bau-cua-chips{gap:8px!important}
#bauCuaPanel .bau-cua-betbar input{width:65px;height:34px;border:1px solid #be9d51;background:#072c21;color:#ffe4a2;font-family:Georgia,serif;font-size:16px}
@media(orientation:landscape) and (max-height:500px){
 #bauCuaPanel .exit-game,#bauCuaPanel #bauCuaSound{width:96px!important;height:32px!important}
 #bauCuaPanel #bauCuaStatsToggle{width:111px!important;height:37px!important}
 #bauCuaPanel #bauCuaBetButton{width:144px!important;height:48px!important}
 #bauCuaPanel .bau-cua-betbar{gap:6px!important}
 #bauCuaPanel .bau-cua-chips{gap:6px!important}
 #bauCuaPanel .bau-cua-betbar input{width:52px;height:30px}
}
#bauCuaPanel .bau-cua-chips button[data-bau-chip="1000"]{background-image:url("/assets/images/jade-bau-sicbo-v2/chip-1000.webp")!important}
#bauCuaPanel .bau-cua-chips button[data-bau-chip="2000"]{background-image:url("/assets/images/jade-bau-sicbo-v2/chip-2000.webp")!important}
#bauCuaPanel .bau-cua-chips button[data-bau-chip="5000"]{background-image:url("/assets/images/jade-bau-sicbo-v2/chip-5000.webp")!important}
#bauCuaPanel .bau-cua-chips button[data-bau-chip="10000"]{background-image:url("/assets/images/jade-bau-sicbo-v2/chip-10000.webp")!important}
#bauCuaPanel .bau-cua-chips button[data-bau-chip="50000"]{background-image:url("/assets/images/jade-bau-sicbo-v2/chip-50000.webp")!important}
#bauCuaPanel .bau-cua-chips button[data-bau-chip="100000"]{background-image:url("/assets/images/jade-bau-sicbo-v2/chip-100000.webp")!important}
#bauCuaPanel .bau-cua-chips button[data-bau-chip="500000"]{background-image:url("/assets/images/jade-bau-sicbo-v2/chip-500000.webp")!important}

#bauCuaPanel .bau-cua-chips button{width:clamp(48px,11vh,96px)!important;height:clamp(48px,11vh,96px)!important}

#bauCuaPanel .bau-cua-chips button{width:clamp(48px,12vh,112px)!important;height:clamp(48px,12vh,112px)!important}
#bauCuaPanel{margin:0!important;max-width:none!important;box-sizing:border-box!important}
#bauCuaPanel .bau-cua-betbar input{width:80px;appearance:textfield;padding:0 3px}
#bauCuaPanel .bau-cua-betbar input::-webkit-inner-spin-button,#bauCuaPanel .bau-cua-betbar input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
@media(orientation:landscape) and (max-height:500px){#bauCuaPanel .bau-cua-betbar input{width:64px;font-size:14px}}
