:root{font-family:Arial,'Malgun Gothic',sans-serif;color:#fff;background:#292b2b;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible{outline:3px solid #ffdd71;outline-offset:3px}button:disabled{cursor:default}button:hover:not(:disabled){filter:brightness(1.17)}[hidden]{display:none!important}.game-screen{position:relative;display:grid;grid-template-columns:62.5% 37.5%;grid-template-rows:minmax(420px,69fr) minmax(190px,31fr);height:100svh;min-height:620px;overflow:hidden}.video-panel{position:relative;overflow:hidden;background:#123f3d}.dealer-poster,video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.dealer-poster{background:url('/asset/dealer-poster-78aeed0a17.webp') center/cover no-repeat}.video-label{position:absolute;top:10px;left:12px;border-radius:4px;background:#0008;padding:4px 7px;font-size:10px;color:#eeec}.countdown{position:absolute;right:3.5%;top:9%;width:92px;height:94px;border:1px solid #8889;border-radius:12px;background:linear-gradient(#3a3a3aeb,#141414e3);display:grid;place-items:center;font-size:58px;font-weight:bold;color:#eee;box-shadow:0 3px 0 #0004}.countdown:after{content:'';height:1px;background:#0007;position:absolute;top:50%;left:0;right:0}.sound{position:absolute;bottom:26px;left:18px;padding:0;border:0;background:none;font-size:27px;font-weight:bold;color:#e7f5de}.video-status{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:6px 14px;font-size:10px;background:linear-gradient(transparent,#0006);color:#fff9}.payout{position:absolute;left:50%;top:50%;width:min(80%,420px);max-width:calc(100% - 32px);min-height:100px;padding:20px 24px;transform:translate(-50%,-50%);background:linear-gradient(120deg,#331949,#4f2d61);border:1px solid #c2ac00;border-radius:16px;display:flex;align-items:center;flex-direction:row;justify-content:center;flex-wrap:wrap;gap:8px 16px;z-index:2;text-align:center;box-shadow:0 0 25px #0002}.payout-label{font-size:clamp(20px,2.6vw,32px);font-weight:bold}.payout strong{font-size:clamp(24px,3.3vw,43px);overflow-wrap:anywhere;min-width:0}.bet-panel{padding:22px 27px 10px 40px;background:radial-gradient(ellipse at 49% 59%,#5a2766 0,#32103e 44%,#131016 86%);position:relative;display:flex;flex-direction:column}.topbar{display:flex;align-items:center;gap:12px;height:20px;margin-bottom:16px;font-size:10px;white-space:nowrap}.logo{font-size:12px;color:#ef9b12;font-weight:bold;font-style:italic;display:flex;align-items:center;gap:2px}.logo i{font-style:normal;font-size:27px;transform:rotate(-20deg);line-height:12px}.logo>span{color:#d3d2d3}.game-number{font-weight:bold}.limits{margin-left:auto;background:none;border:0;font-size:9px;padding:0}.wallet{height:27px;min-height:27px;background:#e6e4e6;border-radius:20px;color:#444;display:flex;align-items:center;justify-content:space-between;padding:0 30px 0 12px;font-size:13px;font-weight:bold;margin-bottom:20px}.bet-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:14px 13px;padding:0 12px}.market{grid-column:span 2;border:1px solid #b6a9ba8a;border-radius:5px;background:#ffffff03;min-height:62px;display:flex;flex-direction:column;align-items:center;padding:3px 0 2px;position:relative;line-height:1.1}.market:nth-child(4){grid-column:2/4}.market:nth-child(5){grid-column:4/6}.market:nth-child(n+4){min-height:67px;margin-left:-20px;margin-right:-20px}.market:nth-child(4){margin-right:8px}.market:nth-child(5){margin-left:8px}.market b{font-size:30px;font-weight:900}.market:nth-child(n+4) b{font-size:28px}.market span{font-size:10px;color:#ccc}.market small{font-size:11px;color:#f7f5fa;line-height:14px}.market-X b,.market-U b{color:#f11926}.market-T b{color:#53e500}.market-O b,.market-V b{color:#4cbbff}.market.selected{background:#c8a33932;border-color:#efce45;box-shadow:0 0 12px #e3c13344}.market:disabled{opacity:.82}.chip-row{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:16px}.chips{display:flex;align-items:center;justify-content:space-between;flex:1;gap:11px}.chip{height:clamp(54px,6.25vw,90px);width:clamp(54px,6.25vw,90px);flex-shrink:0;border-radius:50%;background:radial-gradient(circle,#155b21 40%,#328943 42%,#002a0c 58%,#276831 62%);border:7px dashed #e5e9e4;box-shadow:0 2px 6px #0009,inset 0 0 0 2px #eee7;display:grid;place-items:center;font-size:12px;font-weight:bold;padding:0}.chip:nth-child(2){background:radial-gradient(circle,#204b63 40%,#408ea4 42%,#032836 58%,#31586b 62%)}.chip:nth-child(3){background:radial-gradient(circle,#c7120a 40%,#ee583f 42%,#8f0e00 58%,#c93c21 62%)}.chip:nth-child(4){background:radial-gradient(circle,#353535 40%,#707070 42%,#191919 58%,#4e4e4e 62%)}.chip.active{outline:2px solid #e8d177;outline-offset:3px;transform:translateY(-2px)}.chip-arrow{font-size:32px;background:none;border:0;padding:0;color:#ddd}.bet-actions{display:flex;gap:14px;justify-content:center;margin-top:auto;padding-top:20px}.bet-actions button{background:#78508060;border:1px solid #b19bbf;border-radius:7px;padding:6px 19px;font-size:14px;font-weight:bold;min-height:33px}.bet-actions button:disabled{opacity:.5}.notice{text-align:center;font-size:10px;color:#e5c4e8;min-height:16px;margin-top:7px}.connection{font-size:8px;color:#c7c4c7;position:absolute;bottom:2px;right:12px}.scoreboard{position:relative;grid-column:1/-1;display:grid;grid-template-columns:minmax(170px,1.15fr) minmax(190px,1fr) 130px minmax(190px,1fr) 200px;gap:0;align-items:stretch;padding:0 38px 12px 16px;background:linear-gradient(#292c2c,#303331);min-width:0}.scoreboard:before{content:'';position:absolute;inset:0 238px 11px 16px;border-radius:7px;background:linear-gradient(#9d9e9d,#a5a6a5);opacity:.8}.road-panel,.score-hand,.winner-area{z-index:1;min-width:0;margin:14px 0 0;background-image:linear-gradient(#676d7333 1px,transparent 1px),linear-gradient(90deg,#676d7333 1px,transparent 1px);background-size:27px 26px}.road-panel{position:relative;display:flex;padding:4px 10px;overflow:hidden}.road-label{display:flex;flex-direction:column;font-weight:bold;font-size:17px;gap:3px;margin-right:8px}.road-label span{width:22px;height:22px;border-radius:50%;background:#0876a5;display:grid;place-items:center;color:#c8cbd2}.road-label span+span{background:#ae2222}.road{display:grid;grid-template-rows:repeat(6,26px);grid-auto-flow:column;grid-auto-columns:27px;align-content:start;overflow:auto;min-width:0;flex:1}.road-dot{margin:2px auto;border-radius:50%;width:21px;height:21px;color:white;font-size:13px;display:grid;place-items:center;font-weight:bold;background:#be2b31}.road-dot.O{background:#2777c3}.road-dot.T{background:#299553}.score-hand{padding:0 5px 0}.score-title{display:flex;align-items:center;gap:3px;height:31px;margin-bottom:9px;position:relative}.score-title b{flex:1;height:29px;display:grid;place-items:center;border-radius:18px;background:linear-gradient(#6d0000,#bb0400);border:1px solid #ffce10;box-shadow:0 2px 3px #000b;font-size:14px}.score-title strong{height:30px;min-width:30px;border-radius:50%;background:linear-gradient(#970000,#c30000);border:1px solid #ffcd23;display:grid;place-items:center;font-size:16px}.o-hand .score-title{flex-direction:row-reverse}.o-hand .score-title b,.o-hand .score-title strong{background:linear-gradient(#100b49,#29278c)}.cards{display:flex;justify-content:space-between;gap:8px}.card-wrap{width:33.333%;max-width:95px;transition:opacity .2s}.score-hand .card{border:2px solid #a10000}.score-hand .card-month{display:none}.score-subtitle{font-size:9px;color:#222;text-align:center;margin:7px 0 0}.winner-area{display:flex;align-items:center;justify-content:center;flex-direction:column;padding:15px 0 0}.winner-medal{width:110px;height:97px;position:relative;display:flex;flex-direction:column;align-items:center;background:linear-gradient(#e8cc40,#916ca8 58%,#4c2373);clip-path:polygon(50% 0,63% 14%,85% 13%,85% 30%,100% 43%,85% 60%,81% 76%,50% 100%,19% 76%,15% 60%,0 43%,15% 30%,15% 13%,37% 14%);filter:drop-shadow(0 0 9px gold);padding-top:24px}.winner-medal span{background:linear-gradient(#ffcc25,#c53100);font-weight:bold;width:100%;text-align:center;font-size:14px;padding:4px;color:#fff}.winner-medal strong{font-size:24px;text-shadow:0 0 10px white}.winner-area p{font-size:9px;color:#202123;max-width:120px;text-align:center;margin:8px 0}.stats{z-index:1;padding:8px 22px 0 70px;display:flex;flex-direction:column;gap:13px;justify-content:flex-start;font-size:15px}.stat{display:flex;gap:15px;align-items:center;font-weight:bold;color:#b62c27}.stat b{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;color:#e7b4bc;background:#a53e3e;font-size:12px}.stat-T{color:#246b39}.stat-T b{background:#2b6c39;color:#a6d2b2}.stat-O,.stat-V{color:#2e58c2}.stat-O b,.stat-V b{background:#244fae;color:#a1b6e5}.tools{position:absolute;right:0;top:67%;width:40px;background:linear-gradient(#a21aad,#650b71);border-radius:15px 0 0 15px;padding:10px 0;display:flex;flex-direction:column;z-index:5}.tools button{background:none;border:0;padding:10px 0;font-size:20px}.road-expanded .road-panel{position:absolute;inset:12px 238px 10px 16px;background-color:#969b99;z-index:4;border-radius:7px}.road-expanded .road{grid-template-rows:repeat(6,26px)}dialog{max-width:540px;width:90%;border:1px solid #b7a5c3;border-radius:12px;background:#34153d;color:#fff;padding:24px;line-height:1.8}dialog p{font-size:13px}dialog::backdrop{background:#000a}dialog button{border:1px solid #b5a0c1;background:#72437d;border-radius:5px;padding:8px 24px}@media(min-width:1550px){.bet-panel{padding:30px 5%}.topbar{font-size:13px}.wallet{height:34px;min-height:34px;margin:14px 0 30px}.market{min-height:80px}.market:nth-child(n+4){min-height:80px}.chip-row{margin-top:30px}.bet-actions{padding-top:30px}.scoreboard{grid-template-columns:minmax(250px,1.1fr) minmax(270px,1fr) 160px minmax(270px,1fr) 240px}.card-wrap{max-width:120px}}
@media(max-width:1050px) and (min-width:761px){.bet-panel{padding:18px 17px}.topbar{gap:7px}.limits{font-size:7px}.chip{width:55px;height:55px;border-width:5px;font-size:9px}.chips{gap:7px}.bet-grid{gap:12px 8px}.scoreboard{grid-template-columns:160px 1fr 90px 1fr 105px;padding-right:30px}.stats{padding:10px 10px 0 30px}.scoreboard:before{right:135px}.winner-medal{width:85px;height:80px;padding-top:17px}.cards{gap:5px}.countdown{width:73px;height:76px;font-size:46px}}
@media(max-width:760px){.game-screen{height:auto;min-height:100svh;display:flex;flex-direction:column;overflow:visible}.video-panel{order:0;aspect-ratio:800/426;width:100%;flex:none}.bet-panel{order:2;padding:17px 22px 26px;min-height:400px}.scoreboard{order:1;padding:7px 10px 10px;grid-template-columns:minmax(0,1fr) 80px minmax(0,1fr);gap:4px;min-height:190px}.scoreboard:before{inset:7px 10px 10px}.road-panel{grid-column:1/-1;grid-row:2;height:35px;margin:7px 0 0;align-items:center;padding:0 5px}.road-label{display:none}.road{display:flex;gap:5px;align-items:center;min-height:27px}.road-dot{flex-shrink:0;margin:0}.score-hand{grid-row:1;margin-top:3px}.winner-area{grid-column:2;grid-row:1;padding:0;margin-top:3px}.x-hand{grid-column:1}.o-hand{grid-column:3}.score-title{height:23px;margin-bottom:6px}.score-title b,.score-title strong{font-size:11px;height:23px;min-width:23px}.cards{gap:4px}.card-wrap{max-width:56px}.winner-medal{width:74px;height:76px;padding-top:18px}.winner-medal span{font-size:10px}.winner-medal strong{font-size:20px}.winner-area p{font-size:8px;margin:5px 0}.score-subtitle{font-size:8px;margin:3px 0}.stats{display:none}.topbar{margin-bottom:15px;font-size:10px}.logo{font-size:12px}.limits{font-size:8px}.wallet{margin-bottom:19px}.bet-grid{padding:0 9px;gap:12px}.market{min-height:59px}.market:nth-child(n+4){min-height:61px}.chip-row{margin-top:18px}.chips{justify-content:space-around;gap:10px}.chip{height:64px;width:64px;font-size:10px;border-width:6px}.bet-actions{margin-top:20px;padding-top:0}.notice{margin-top:11px}.tools{top:120px;width:29px;padding:4px 0}.tools button{font-size:16px;padding:8px 0}.countdown{width:52px;height:57px;right:4%;top:9%;font-size:34px;border-radius:7px}.sound{font-size:19px;bottom:20px;left:10px}.video-status{font-size:8px;padding:4px 10px}.video-label{font-size:8px;top:7px;left:8px}.payout{left:50%;top:50%;width:min(80%,340px);min-height:70px;padding:14px 18px;border-radius:10px;gap:8px 12px}.payout-label{font-size:21px}.payout strong{font-size:28px}.road-expanded .road-panel{position:relative;inset:auto;height:auto;min-height:100px}.road-expanded .road{display:grid;grid-template-rows:repeat(3,26px);grid-auto-flow:column;justify-content:start}.back{border-width:2px}.back span{font-size:7px}}
@media(max-width:360px){.bet-panel{padding-left:12px;padding-right:12px}.chips{gap:6px}.chip{width:56px;height:56px;font-size:9px}.scoreboard{grid-template-columns:minmax(0,1fr) 65px minmax(0,1fr)}.winner-medal{width:62px}.limits{font-size:7px}.card-wrap{max-width:46px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media(min-width:1051px) and (max-width:1549px){.scoreboard{grid-template-columns:21% 20% 18% 20% 21%}.scoreboard:before{right:19%}.score-hand .card-wrap{max-width:75px}.score-hand .cards{gap:9px;justify-content:flex-start}.winner-medal{width:125px;height:107px}.stats{padding-left:65px}}

/* Keep payout and each result group inside its own visible area. */
.game-screen{grid-template-columns:minmax(0,62.5fr) minmax(0,37.5fr)}
.video-panel,.bet-panel{min-width:0}
.chips{min-width:0}
.score-hand{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:6px 5px;align-self:stretch}
.score-title,.score-hand .cards{width:100%}
.score-hand .cards{justify-content:center}
.score-hand .card-wrap{flex:0 1 75px;min-width:0}
.score-subtitle{width:100%;line-height:1.4;margin:7px 0 0}
.winner-area{justify-content:center;align-items:center;padding:6px 0;align-self:stretch;min-width:0}
.winner-medal{flex-shrink:0}
.winner-area p{width:100%;max-width:none;padding:0 8px;line-height:1.4;overflow-wrap:anywhere}
@media(min-width:761px){
 .game-screen{grid-template-rows:minmax(420px,69fr) minmax(210px,31fr);min-height:630px;overflow:visible}
 .scoreboard{grid-template-columns:minmax(0,21fr) minmax(0,20fr) minmax(90px,18fr) minmax(0,20fr) minmax(80px,21fr)}
 .score-hand,.winner-area{margin-top:0}
 .road-panel{align-self:stretch}
 .topbar{gap:8px}
 .limits{white-space:normal;text-align:right;min-width:0}
 .chip-row{min-width:0;gap:6px}
 .chips{gap:clamp(5px,.7vw,11px);justify-content:space-around}
 .chip{flex:0 1 80px;min-width:0;width:auto;height:auto;aspect-ratio:1;border-width:clamp(4px,.55vw,7px);font-size:clamp(9px,.9vw,12px)}
 .stats{padding-left:clamp(16px,4.5vw,65px)}
}
@media(min-width:1051px) and (max-width:1549px){.score-hand .cards{justify-content:center}}
@media(min-width:1550px){.score-hand .card-wrap{flex-basis:100px}}
@media(max-width:760px){
 .score-hand .card-wrap{flex-basis:56px}
 .score-hand,.winner-area{padding:4px 0;margin-top:0}
 .scoreboard{grid-template-rows:minmax(130px,auto) 35px;align-items:stretch;min-height:190px}
 .score-subtitle{margin-top:5px}
}
@media(max-width:360px){.score-hand .card-wrap{flex-basis:46px}.payout{padding:12px;gap:6px 10px}.payout strong{font-size:25px}}
/* Result badge: gold rays and small sparkles around the ribbon. */
.winner-area{position:relative;isolation:isolate}
.winner-area::before,.winner-area::after{content:'';position:absolute;left:50%;top:50%;pointer-events:none;opacity:0;z-index:-1}
.winner-area::before{width:160px;aspect-ratio:1;transform:translate(-50%,-58%);background:repeating-conic-gradient(from 8deg,#ffe55600 0deg 13deg,#ffe84abf 17deg 22deg,#fff5a84d 24deg 27deg,#ffe55600 31deg 40deg);mask-image:radial-gradient(circle,#000 0 24%,#000b 42%,transparent 71%);filter:blur(2px)}
.winner-area::after{content:'✦';width:10px;height:10px;font-size:16px;line-height:10px;color:#fffbd9;transform:translate(-50%,-70px);text-shadow:-37px 20px 3px #fff7a4,38px 11px 2px #fff,-52px 59px 4px #ffe55f,54px 48px 2px #fff2a3,-24px 104px 3px #fff084,31px 108px 3px #fff7b1}
.winner-area.has-win::before{opacity:1;animation:win-rays 2.8s ease-in-out infinite}
.winner-area.has-win::after{opacity:1;animation:win-sparkle 1.8s ease-in-out infinite}
.winner-medal{position:relative;isolation:isolate;overflow:visible;clip-path:none;background:none;filter:drop-shadow(0 3px 4px #4a23075c);padding:0;display:block}
.winner-medal::before{content:'';position:absolute;inset:8% 13% 0;background:linear-gradient(135deg,#fff6ab 0%,#f7cc37 13%,#8b62c2 17%,#503092 59%,#321967 84%,#a98ae4 100%);clip-path:polygon(50% 0,100% 21%,91% 75%,50% 100%,9% 75%,0 21%);z-index:-1}
.winner-medal::after{content:'';position:absolute;left:-8%;top:31%;width:116%;height:28%;background:linear-gradient(#ffba22,#e14700 80%,#b83700);clip-path:polygon(0 0,18% 8%,82% 8%,100% 0,94% 50%,100% 100%,78% 88%,22% 88%,0 100%,6% 50%);z-index:-1}
.winner-medal span{position:absolute;left:1%;top:28%;width:98%;height:27%;padding:0;border-radius:45% 45% 9% 9% / 22% 22% 15% 15%;display:grid;place-items:center;background:linear-gradient(#ffe56f 0%,#ff9b0d 30%,#ed4e00 83%,#b82e00);border-top:1px solid #fff4aa;border-bottom:2px solid #ffc147;font-size:14px;box-shadow:0 3px 4px #8c340066;text-shadow:0 1px 2px #c34c00}
.winner-medal strong{position:absolute;left:0;top:57%;width:100%;text-align:center;font-size:27px;line-height:1.1;color:white;text-shadow:0 0 9px #d6c6ff,0 2px 3px #3a1675}
.has-win .winner-medal{animation:win-arrive .55s cubic-bezier(.2,1.4,.5,1) both;filter:drop-shadow(0 0 9px #ffda4b99)}
.countdown{width:110px;height:112px;font-size:76px;font-variant-numeric:tabular-nums;line-height:1}
.stat span{font-size:21px;line-height:1;font-variant-numeric:tabular-nums}
.score-title strong{font-size:20px}
.tools{position:fixed;left:50%;right:auto;top:auto;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);width:auto;display:flex;flex-direction:row;align-items:center;gap:5px;padding:5px 9px;border-radius:14px;background:linear-gradient(#a326b0,#650c71);border:1px solid #d966d95c;box-shadow:0 4px 12px #0006;z-index:8}
.tools button{width:40px;height:36px;padding:0;font-size:22px;border-radius:7px;display:grid;place-items:center}
.tools button:hover{background:#ffffff1f}
@media(min-width:761px){.scoreboard{padding-bottom:65px}.game-screen{grid-template-rows:minmax(420px,69fr) minmax(263px,31fr);min-height:683px}.road-expanded .road-panel{bottom:65px}}
@media(max-width:1050px) and (min-width:761px){.countdown{width:91px;height:94px;font-size:62px}.winner-area::before{width:130px}.winner-area::after{font-size:12px;transform:translate(-50%,-58px);text-shadow:-28px 16px 3px #fff7a4,30px 10px 2px #fff,-40px 44px 4px #ffe55f,40px 42px 2px #fff2a3,-20px 85px 3px #fff084}.winner-medal strong{font-size:23px}}
@media(max-width:760px){
 .countdown{width:66px;height:70px;font-size:46px}
 .tools{top:auto;right:auto;bottom:max(9px,env(safe-area-inset-bottom));left:50%;width:auto;padding:4px 8px;gap:5px;border-radius:12px}
 .tools button{width:38px;height:34px;padding:0;font-size:21px}
 .game-screen{padding-bottom:62px}
 .winner-area::before{width:110px;transform:translate(-50%,-60%)}
 .winner-area::after{font-size:11px;transform:translate(-50%,-48px);text-shadow:-22px 14px 2px #fff7a4,24px 7px 2px #fff,-30px 39px 3px #ffe55f,31px 29px 2px #fff2a3,-16px 68px 2px #fff084,17px 70px 2px #fff7b1}
 .winner-medal span{font-size:11px}.winner-medal strong{font-size:22px}.score-title strong{font-size:16px}
}
@keyframes win-rays{0%,100%{opacity:.75;filter:blur(2px) brightness(1)}50%{opacity:1;filter:blur(1px) brightness(1.3)}}
@keyframes win-sparkle{0%,100%{opacity:.55}50%{opacity:1}}
@keyframes win-arrive{from{opacity:0;transform:scale(.65) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}
@media(prefers-reduced-motion:reduce){.has-win .winner-medal,.winner-area.has-win::before,.winner-area.has-win::after{animation:none!important}}

/* Reference layout: compact history, wide hands, central badge, right-side tools. */
@media(min-width:761px){
 .game-screen{grid-template-rows:minmax(420px,69fr) minmax(263px,31fr)}
 .scoreboard{grid-template-columns:minmax(45px,8fr) minmax(0,24fr) minmax(110px,20fr) minmax(0,24fr) minmax(135px,20fr);padding:0 16px 12px 20px}
 .scoreboard::before{inset:0 19% 11px 20px}
 .road-panel{padding:5px 10px;margin-top:14px}
 .score-hand{padding:12px 5px;align-items:center;justify-content:center}
 .score-title{width:100%;max-width:345px;height:36px;margin-bottom:12px}
 .score-title b{height:35px;font-size:16px}
 .score-title strong{height:36px;min-width:36px;font-size:24px}
 .score-hand .cards{max-width:300px;justify-content:center;gap:10px}
 .score-hand .card-wrap{flex:0 1 90px;max-width:90px}
 .score-subtitle{font-size:10px;margin-top:9px}
 .winner-area{padding:10px 0;justify-content:center}
 .winner-medal{width:160px;height:125px}
 .winner-medal span{font-size:17px}
 .winner-medal strong{font-size:32px}
 .winner-area p{font-size:11px;margin-top:10px}
 .winner-area::before{width:190px}
 .stats{padding:10px 60px 8px 34px;gap:17px;justify-content:center}
 .stat{gap:23px}.stat b{width:30px;height:30px;font-size:18px}.stat span{font-size:27px}
 .tools{position:absolute;left:auto;right:0;top:auto;bottom:50px;transform:none;flex-direction:column;gap:4px;padding:10px 0;width:40px;border-radius:16px 0 0 16px}
 .tools button{width:39px;height:40px;font-size:22px}
 .road-expanded .road-panel{inset:12px 20% 20px 20px;z-index:4}
}
@media(min-width:761px) and (max-width:1050px){
 .scoreboard{grid-template-columns:45px minmax(0,1fr) 115px minmax(0,1fr) 130px;padding-left:12px}
 .scoreboard::before{left:12px;right:145px}
 .score-hand .cards{gap:6px}.score-hand .card-wrap{flex-basis:64px;max-width:64px}
 .winner-medal{width:100px;height:100px}.winner-medal span{font-size:13px}.winner-medal strong{font-size:25px}
 .stats{padding-left:18px;padding-right:40px;gap:16px}.stat{gap:12px}.stat b{width:24px;height:24px;font-size:14px}.stat span{font-size:22px}
}
@media(max-width:760px){
 .tools{position:absolute;left:auto;right:0;top:calc(100vw * .5325 + 18px);bottom:auto;transform:none;flex-direction:column;gap:3px;width:29px;padding:6px 0;border-radius:12px 0 0 12px}
 .tools button{width:28px;height:32px;font-size:17px}
 .game-screen{padding-bottom:0}
 .scoreboard{padding-right:36px}
 .scoreboard::before{right:36px}
}

/* Three main markets, two centered side markets, and a five-chip viewport. */
.bet-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:18px 13px;padding:0 5px}
.market{grid-column:span 4;min-height:78px;padding:6px 0 5px}
.market:nth-child(4){grid-column:3/7;margin:0 -7px 0 -12px}
.market:nth-child(5){grid-column:7/11;margin:0 -12px 0 7px}
.market:nth-child(n+4){min-height:82px}
.market b{font-size:37px}.market:nth-child(n+4) b{font-size:35px}
.chip-row{gap:4px;margin-top:22px;min-width:0}
.chip-arrow{width:16px;flex:0 0 16px;font-size:28px;line-height:1}
.chip-arrow:disabled{opacity:.25}
.chips{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 32px)/5);gap:8px;justify-content:normal;align-items:center;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-padding-inline:6px;scrollbar-width:none;min-width:0;padding:7px 6px;margin:0}
.chips::-webkit-scrollbar{display:none}
.chip,.chip:nth-child(n){width:100%;height:auto;aspect-ratio:1;min-width:0;max-width:none;flex:none;border-width:clamp(3px,.38vw,6px);font-size:clamp(8px,.8vw,12px);scroll-snap-align:start;--chip-color:#156c38;background:radial-gradient(circle,var(--chip-color) 0 40%,#ffffff50 42%,#0007 58%,var(--chip-color) 62%)}
.chip.chip-tone-0{--chip-color:#686037}.chip.chip-tone-1{--chip-color:#623c8b}.chip.chip-tone-2{--chip-color:#155c30}.chip.chip-tone-3{--chip-color:#24556b}.chip.chip-tone-4{--chip-color:#bb2116}.chip.chip-tone-5{--chip-color:#3c3c3c}.chip.chip-tone-6{--chip-color:#b47c15}.chip.chip-tone-7{--chip-color:#80265e}
.chip.active{outline-offset:2px}
@media(min-width:761px) and (max-width:1050px){.market{min-height:65px}.market:nth-child(n+4){min-height:69px}.market b{font-size:31px}.market:nth-child(n+4) b{font-size:29px}.chips{gap:5px;grid-auto-columns:calc((100% - 20px)/5);padding-inline:4px}.chip,.chip:nth-child(n){font-size:8px;border-width:3px}}
@media(max-width:760px){.bet-grid{gap:16px 10px}.market{min-height:72px}.market:nth-child(n+4){min-height:76px}.market b{font-size:34px}.market:nth-child(n+4) b{font-size:32px}.chip-row{margin-top:19px}.chip,.chip:nth-child(n){font-size:9px;border-width:4px}.chips{gap:6px;grid-auto-columns:calc((100% - 24px)/5);padding-inline:5px}}
@media(max-width:360px){.chip,.chip:nth-child(n){font-size:8px;border-width:3px}.chips{gap:4px;grid-auto-columns:calc((100% - 16px)/5)}}

/* Reset the result display while a new round accepts bets. */
.scoreboard.results-hidden .score-hand,.scoreboard.results-hidden .winner-area{visibility:hidden;pointer-events:none}
@media(min-width:761px){
 .scoreboard{--stats-width:clamp(160px,19vw,285px);grid-template-columns:minmax(45px,8fr) minmax(0,24fr) minmax(110px,20fr) minmax(0,24fr) var(--stats-width)}
 .scoreboard::before{right:calc(var(--stats-width) + 16px)}
 .stats{padding:12px 48px 10px 40px;margin-left:12px;min-width:0;position:relative}
 .stat{flex-shrink:0;gap:22px}.stat b{flex-shrink:0}
}
@media(min-width:761px) and (max-width:1050px){
 .scoreboard{--stats-width:145px;grid-template-columns:40px minmax(0,1fr) 100px minmax(0,1fr) var(--stats-width)}
 .stats{padding-left:22px;padding-right:34px;margin-left:8px}.stat{gap:14px}
}

/* Bottom panel aligned to the supplied full-width reference. */
@media(min-width:761px){
 .scoreboard{--stats-width:clamp(190px,21.2vw,325px);padding:0 0 8px;grid-template-columns:minmax(80px,8.3fr) minmax(0,24fr) minmax(110px,20fr) minmax(0,24fr) var(--stats-width)}
 .scoreboard::before{inset:0 var(--stats-width) 8px 0;border-radius:6px}
 .road-panel{margin:14px 0 8px;padding:5px 10px;background-size:27px 26px;align-self:stretch}
 .stats{padding:17px 58px 13px 52px;margin:0;gap:17px;justify-content:center}
 .stat{gap:23px}.stat b{width:30px;height:30px;font-size:18px}.stat span{font-size:27px}
 .tools{bottom:46px;width:40px;padding:9px 0;border-radius:16px 0 0 16px}
 .tools button{width:39px;height:40px}
 .road-expanded .road-panel{inset:14px var(--stats-width) 8px 0}
}
@media(min-width:761px) and (max-width:1050px){
 .scoreboard{--stats-width:170px;grid-template-columns:75px minmax(0,1fr) 100px minmax(0,1fr) var(--stats-width)}
 .stats{padding-left:28px;padding-right:42px}.stat{gap:16px}.stat b{width:26px;height:26px;font-size:15px}.stat span{font-size:24px}
}
@media(max-width:760px){
 .scoreboard{padding-left:0;padding-right:34px}
 .scoreboard::before{left:0;right:34px;border-radius:5px}
 .road-panel{padding-left:10px}
}

/* Larger betting targets; chip carousel anchored above the bottom actions. */
.bet-grid .market{min-height:117px}
.bet-grid .market:nth-child(n+4){min-height:123px}
.chip-row{margin-top:auto;padding-top:24px}
.bet-actions{margin-top:18px;padding-top:0}
@media(min-width:761px){
 .game-screen{grid-template-rows:minmax(580px,69fr) minmax(263px,31fr);min-height:843px}
}
@media(min-width:761px) and (max-width:1050px){
 .bet-grid .market{min-height:98px}.bet-grid .market:nth-child(n+4){min-height:104px}
 .chip-row{padding-top:20px}
}
@media(max-width:760px){
 .bet-panel{min-height:550px}
 .bet-grid .market{min-height:108px}.bet-grid .market:nth-child(n+4){min-height:114px}
 .chip-row{margin-top:auto;padding-top:24px}
 .bet-actions{margin-top:18px;padding-top:0}
}

/* Anchor media to its headroom instead of cropping from the center. */
.dealer-poster{background-position:center top}
#dealerVideo{object-position:center top}
.bet-grid .market{justify-content:center}

/* Persistent betting ledger layer. */
.bet-history-dialog{width:min(1440px,96vw);max-width:96vw;max-height:88svh;padding:0;border:1px solid #9574a4;border-radius:14px;background:linear-gradient(135deg,#2b1736,#17121f);color:#f3edf8;box-shadow:0 24px 90px #0009;overflow:hidden}
.bet-history-dialog::backdrop{background:#08040ec9;backdrop-filter:blur(4px)}
.history-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px 25px 15px;border-bottom:1px solid #ffffff18}
.history-dialog-heading h2{margin:0;font-size:22px;letter-spacing:.5px}.history-dialog-heading p{font-size:11px;color:#b3a8c1;margin:7px 0 0;line-height:1.6}
#historyClose{background:#ffffff09;border:1px solid #ffffff25;border-radius:8px;width:36px;height:36px;flex:none;padding:0;font-size:25px;display:grid;place-items:center}
.history-summary{display:flex;justify-content:space-between;gap:15px;padding:15px 25px;font-size:12px;color:#b8adc5}.history-summary strong{color:#f2d59c;margin-left:9px;font-size:15px}
.bet-history-scroll{overflow:auto;max-height:calc(88svh - 200px);margin:0 20px;border:1px solid #ffffff1c;border-radius:8px;scrollbar-color:#715082 #20142b}
.bet-history-table{width:100%;min-width:1180px;border-collapse:separate;border-spacing:0;font-size:12px;line-height:1.5;white-space:nowrap;font-variant-numeric:tabular-nums}
.bet-history-table th,.bet-history-table td{padding:14px 11px;border-right:1px solid #ffffff0c;border-bottom:1px solid #ffffff10;text-align:center}
.bet-history-table thead th{position:sticky;top:0;z-index:1;background:#392448;color:#ede7f6;font-weight:700;font-size:12px}
.bet-history-table thead small{font-size:9px;font-weight:400;color:#bcb0ca}
.bet-history-table tbody th{font-weight:600;color:#c8b5dc;background:#ffffff02}
.bet-history-table tbody tr:nth-child(even){background:#ffffff03}.bet-history-table tbody tr:hover{background:#ffffff07}
.bet-history-table .history-amount{text-align:right}.bet-history-table .col-X,.bet-history-table .col-U{color:#ff868d}.bet-history-table .col-T{color:#92d39a}.bet-history-table .col-O,.bet-history-table .col-V{color:#7ec5ff}.bet-history-table .history-payout{color:#f7d488;font-weight:700}
.history-status{font-size:11px;padding:5px 7px;border-radius:4px;background:#ffffff08}.status-settled{color:#eed395}.status-cancelled{color:#a99ab4}.status-pending{color:#8cc9ea}.history-time{color:#bcafcb;font-size:10px}
.bet-history-table .history-empty{padding:55px 20px;color:#d5c9df;font-size:14px}.history-empty small{font-size:11px;color:#a99bb6;line-height:2.5}
.history-footnote{padding:0 25px 13px;margin-top:12px;color:#a799b3;font-size:10px!important;line-height:1.6}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:760px){.bet-history-dialog{width:96vw;max-height:90svh;border-radius:10px}.history-dialog-heading{padding:17px 15px 12px}.history-dialog-heading h2{font-size:18px}.history-dialog-heading p{font-size:10px}.history-summary{padding:13px 15px;font-size:10px;gap:8px}.history-summary strong{font-size:12px;margin-left:4px}.bet-history-scroll{margin:0 10px;max-height:calc(90svh - 200px)}.history-footnote{padding:0 15px 10px}.bet-history-table th,.bet-history-table td{padding:12px 10px}}

/* Mobile only: keep the full betting workflow inside the visible viewport. */
@media(max-width:760px){
 html,body{min-height:100%;margin:0}
 .game-screen{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(110px,25fr) minmax(98px,18fr) minmax(300px,57fr);height:100svh;min-height:0;padding:0;overflow:hidden}
 .video-panel{grid-column:1;grid-row:1;order:initial;aspect-ratio:auto;min-height:0;height:100%;width:100%}
 .scoreboard{grid-column:1;grid-row:2;order:initial;min-height:0;height:100%;padding:4px 33px 4px 4px;grid-template-columns:minmax(0,1fr) 66px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 20px;gap:0 4px;overflow:hidden}
 .scoreboard::before{inset:3px 33px 4px 0}
 .score-hand,.winner-area{min-height:0;padding:0;margin:0}
 .score-title{height:20px;margin:0 0 3px}
 .score-title b,.score-title strong{height:20px;min-width:20px;font-size:11px}
 .score-hand .cards{gap:3px;min-height:0;justify-content:center}
 .score-hand .card-wrap{flex-basis:clamp(25px,8vw,41px);max-width:clamp(25px,8vw,41px)}
 .score-subtitle{font-size:7px;margin:3px 0 0;line-height:1.1}
 .winner-medal{width:61px;height:60px}
 .winner-medal span{font-size:9px}.winner-medal strong{font-size:18px}
 .winner-area p{font-size:7px;line-height:1.1;margin:3px 0 0;padding:0 2px}
 .winner-area::before{width:82px}.winner-area::after{display:none}
 .road-panel{grid-row:2;margin:0;padding:0 6px;min-height:0;height:20px;align-self:center}
 .road{min-height:18px;gap:4px;align-items:center}.road-dot{width:16px;height:16px;font-size:10px}
 .bet-panel{grid-column:1;grid-row:3;order:initial;min-height:0;height:100%;display:grid;grid-template-rows:18px 24px minmax(90px,1fr) 60px 33px 14px;gap:6px;padding:8px 15px max(12px,env(safe-area-inset-bottom));overflow:hidden}
 .topbar{height:18px;min-height:0;margin:0;gap:7px;font-size:9px}
 .limits{font-size:7px}.logo{font-size:11px}.logo i{font-size:23px}
 .wallet{height:24px;min-height:0;margin:0;padding:0 14px;font-size:11px}
 .bet-grid{height:100%;min-height:0;grid-template-rows:repeat(2,minmax(0,1fr));gap:6px 9px;padding:0 3px}
 .bet-grid .market,.bet-grid .market:nth-child(n+4){min-height:0;height:100%;padding:2px 0;justify-content:center}
 .market b,.market:nth-child(n+4) b{font-size:25px;line-height:1}
 .market span{font-size:9px;line-height:1.15}.market small{font-size:9px;line-height:1.15}
 .chip-row{margin:0;padding:0;min-height:0;height:60px;gap:3px}
 .chips{height:60px;padding:5px;gap:6px;grid-auto-columns:calc((100% - 24px)/5)}
 .chip,.chip:nth-child(n){width:100%;max-width:50px;max-height:50px;justify-self:center;border-width:3px;font-size:8px}
 .chip-arrow{font-size:24px;width:15px;flex-basis:15px}
 .bet-actions{height:33px;min-height:0;margin:0;padding:0;gap:12px}
 .bet-actions button{height:33px;min-height:0;padding:5px 22px;font-size:12px}
 .notice{margin:0;min-height:0;font-size:9px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .connection{bottom:1px;right:8px;font-size:6px;line-height:8px}
 .tools{position:absolute;top:calc(25% + 8px);bottom:auto;right:0;left:auto;width:27px;padding:4px 0;border-radius:10px 0 0 10px;gap:1px}
 .tools button{width:26px;height:27px;font-size:16px}
 .countdown{width:47px;height:49px;font-size:34px;top:8px;right:10px;border-radius:7px}
 .sound{bottom:17px;font-size:17px}.video-status{font-size:7px;padding:3px 8px}
 .video-label{font-size:7px;top:6px;left:6px}
 .payout{min-height:54px;padding:9px 12px;gap:5px 10px}.payout-label{font-size:18px}.payout strong{font-size:24px}
}
@media(max-width:760px) and (max-height:650px){
 .game-screen{grid-template-rows:minmax(80px,22fr) minmax(87px,17fr) minmax(267px,61fr)}
 .scoreboard{grid-template-rows:minmax(0,1fr) 16px;padding-top:2px}
 .score-hand .card-wrap{flex-basis:27px;max-width:27px}.score-title{height:18px;margin-bottom:2px}.score-title b,.score-title strong{height:18px;font-size:10px;min-width:18px}
 .winner-medal{width:52px;height:51px}.winner-medal strong{font-size:16px}.winner-medal span{font-size:8px}
 .road-panel{height:16px}.road{min-height:16px}.road-dot{width:14px;height:14px;font-size:9px}
 .bet-panel{grid-template-rows:16px 22px minmax(80px,1fr) 49px 30px 12px;gap:5px;padding:6px 12px max(10px,env(safe-area-inset-bottom))}
 .topbar{height:16px}.wallet{height:22px}.bet-grid{gap:5px 8px}.market b,.market:nth-child(n+4) b{font-size:21px}
 .chip-row,.chips{height:49px}.chip,.chip:nth-child(n){max-width:40px;max-height:40px;font-size:7px}
 .bet-actions,.bet-actions button{height:30px}.bet-actions button{font-size:11px}.notice{font-size:8px;line-height:12px}
 .tools{top:calc(22% + 5px)}
}

/* One continuous light-gray grid across the entire results panel. */
.scoreboard::before{background-color:#d3d3d3;background-image:linear-gradient(rgba(102,114,125,.38) 1px,transparent 1px),linear-gradient(90deg,rgba(102,114,125,.38) 1px,transparent 1px);background-size:27px 26px;opacity:1}
.scoreboard .road-panel,.scoreboard .score-hand,.scoreboard .winner-area{background-image:none}

/* Align every result marker with the center of a 27 × 26 grid cell. */
@media(min-width:761px){
 .scoreboard .road-panel{display:grid;grid-template-columns:27px minmax(0,1fr);margin:0;padding:0;align-items:start;align-self:stretch}
 .road-label{display:grid;grid-template-columns:27px;grid-template-rows:repeat(2,26px);gap:0;margin:0;align-items:center;justify-items:center}
 .road-label span{width:21px;height:21px;line-height:1}
 .road{display:grid;grid-template-rows:repeat(6,26px);grid-auto-columns:27px;grid-auto-flow:column;gap:0;margin:0;padding:0;align-items:center;justify-items:center;align-content:start;justify-content:start;min-height:0}
 .road-dot{width:21px;height:21px;margin:0;line-height:1}
}
@media(max-width:760px){
 .scoreboard::before{background-position:left bottom}
 .scoreboard{grid-template-rows:minmax(0,1fr) 26px}
 .scoreboard .road-panel{height:26px;min-height:26px;margin:0 0 0 -4px;padding:0;align-self:end;display:block}
 .road{display:grid;grid-template-rows:26px;grid-auto-flow:column;grid-auto-columns:27px;justify-content:start;align-content:start;align-items:center;justify-items:center;gap:0;margin:0;padding:0;min-height:26px}
 .road-dot{width:18px;height:18px;margin:0;font-size:11px;line-height:1}
}
@media(max-width:760px) and (max-height:650px){
 .scoreboard{grid-template-rows:minmax(0,1fr) 26px}
 .score-hand .card-wrap{flex-basis:24px;max-width:24px}
 .score-subtitle{font-size:6px;margin-top:2px}
}
