*{box-sizing:border-box} :root{--gold:#d9b85a;--gold2:#f3d989;--cream:#f7f0df;--muted:#87958d;--felt:#07543d;--felt2:#033b2c}html,body{margin:0;min-height:100%;background:radial-gradient(circle at 50% -10%,#26332e,#080c0a 45%,#020403);color:var(--cream);font-family:Arial,Helvetica,sans-serif}body{display:flex;justify-content:center}.app{width:min(1360px,100%);padding:14px 18px 30px}.topbar{height:70px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-bottom:1px solid #2a3530}.brand{display:flex;align-items:center;gap:12px}.brand-mark{width:40px;height:40px;border:1px solid #a8883e;border-radius:12px;display:grid;place-items:center;color:var(--gold2);font:700 25px Georgia,serif;background:linear-gradient(145deg,#18231e,#09110e);box-shadow:inset 0 0 18px #0007}.brand-name{font:800 19px Georgia,"Times New Roman",serif;letter-spacing:3px}.brand-sub{font-size:8px;color:#718078;letter-spacing:2px;margin-top:2px}.shoe-status{font-size:9px;letter-spacing:2px;color:#93a099}.live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#50d08c;box-shadow:0 0 12px #50d08c;margin-right:8px}.balance-panel{text-align:right}.balance-panel span{display:block;font-size:8px;color:#738078;letter-spacing:1.8px}.balance-panel strong{color:var(--gold2);font:700 21px Georgia,"Times New Roman",serif}.casino-table{position:relative;margin:22px auto 18px;min-height:820px;overflow:hidden;border-radius:44px;padding:50px 48px 32px;background:radial-gradient(ellipse at 50% 43%,#08704e,#07533d 48%,#033426 86%,#02271d);border:11px solid #151918;box-shadow:inset 0 0 0 2px #8d743c,inset 0 0 90px #00170f,0 30px 80px #000}.casino-table:before{content:"";position:absolute;inset:16px;border:1px solid #d4af3766;border-radius:31px;pointer-events:none}.casino-table:after{content:"";position:absolute;inset:0;opacity:.1;pointer-events:none;background:repeating-linear-gradient(25deg,transparent 0 3px,#fff1 4px,transparent 5px 9px),repeating-linear-gradient(-25deg,transparent 0 5px,#0004 6px,transparent 7px 12px)}.table-copy,.dealer-zone,.player-zone,.table-center-message,.action-bar,.insurance-bar,.chip-tray{position:relative;z-index:2}.table-copy{display:flex;justify-content:center;gap:26px;flex-wrap:wrap;color:var(--gold);font:600 10px Georgia,"Times New Roman",serif;letter-spacing:1.7px;text-align:center}.dealer-zone{max-width:1050px;margin:28px auto 0}.player-zone{max-width:1050px;margin:18px auto 0}.zone-title{display:flex;justify-content:space-between;padding:0 8px;color:#b1c0b5;font:600 10px Georgia,"Times New Roman",serif;letter-spacing:2px}.zone-title b{color:#f3e4b8;font:700 20px Georgia,"Times New Roman",serif}.card-row{min-height:160px;display:flex;justify-content:center;align-items:center;padding:12px;gap:0}.card-wrap{width:108px;height:151px;position:relative;perspective:900px;margin-left:-18px;z-index:1}.card-wrap:first-child{margin-left:0}.card-svg{width:100%;height:100%;filter:drop-shadow(0 11px 9px #0007);display:block}.card-enter{animation:deal .46s cubic-bezier(.16,.85,.2,1) both;animation-delay:var(--deal-delay,0ms);will-change:transform,opacity}@keyframes deal{0%{opacity:0;transform:translate(180px,-90px) rotate(12deg) scale(.72)}65%{opacity:1;transform:translate(-7px,3px) rotate(-1deg) scale(1.02)}100%{opacity:1;transform:none}}.card-flip{animation:flip .48s cubic-bezier(.2,.8,.2,1) both;transform-origin:center}@keyframes flip{0%{transform:rotateY(0)}50%{transform:rotateY(90deg)}100%{transform:rotateY(0)}}.table-center-message{text-align:center;height:52px}.round-chip{font-size:8px;color:#91a399;letter-spacing:1.5px}.status-message{font:800 20px Georgia,"Times New Roman",serif;color:var(--gold2);letter-spacing:2px;margin-top:4px;text-shadow:0 2px 18px #0007}.player-hands{display:flex;justify-content:center;gap:22px;min-height:170px}.player-hand{position:relative;min-width:270px;padding:2px 8px 0;border-radius:18px;transition:.2s}.player-hand.active-hand{background:linear-gradient(180deg,#ffffff0b,transparent);box-shadow:0 0 0 1px #d4af3740,inset 0 0 35px #001f15}.hand-head{height:25px;display:flex;align-items:center;justify-content:center;gap:12px;font:700 8px Georgia,"Times New Roman",serif;letter-spacing:1.7px;color:#9db0a5}.hand-head b{font-size:14px;color:#f4e5bd}.hand-head em{font-style:normal;color:var(--gold2);font-size:8px}.player-hand .card-row{min-height:145px}.player-hand .card-wrap{width:91px;height:127px}.bet-spot{position:absolute;right:4%;bottom:0;width:108px;height:108px;border:1px dashed #d4af3790;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#a7b6ad;font:600 9px Georgia,"Times New Roman",serif}.bet-spot b{color:var(--gold2);font-size:15px;margin-top:4px}.action-bar,.insurance-bar{display:flex;justify-content:center;gap:9px}.action,.deal-button,.clear-button,.insurance,.fairness button{border:1px solid #d4af3790;color:#f5ecd6;background:linear-gradient(#26352f,#101b17);height:44px;border-radius:24px;padding:0 23px;font:700 10px Georgia,"Times New Roman",serif;letter-spacing:1.5px;cursor:pointer;box-shadow:0 5px 15px #002118,inset 0 1px #fff2;transition:.18s}.action:hover:not(:disabled),.deal-button:hover:not(:disabled),.clear-button:hover:not(:disabled),.insurance:hover:not(:disabled),.fairness button:hover{transform:translateY(-2px);border-color:var(--gold2)}button:disabled{opacity:.28;cursor:not-allowed;transform:none!important}.insurance-bar{margin-top:9px}.insurance{height:36px;padding:0 18px;color:#18140a;background:linear-gradient(#e4ca6e,#a77d2b);border-color:#f0d989}.insurance.secondary{color:#efe7d4;background:linear-gradient(#2a3933,#121c18)}.chip-tray{display:flex;justify-content:center;align-items:center;gap:11px;margin-top:25px;flex-wrap:wrap}.chip{width:60px;height:60px;border-radius:50%;border:0;position:relative;cursor:pointer;color:#fff;font-weight:800;box-shadow:0 7px 13px #00170f,inset 0 0 0 5px #fff3,inset 0 0 0 8px #111;transition:.18s}.chip:before{content:"";position:absolute;inset:6px;border:2px dashed #fff;border-radius:50%;opacity:.75}.chip:hover{transform:translateY(-4px) rotate(4deg)}.chip span{position:relative;z-index:2;text-shadow:0 1px 3px #000}.c1{background:#e8e4d8;color:#111}.c5{background:#bd3140}.c25{background:#228b58}.c100{background:#315d9b}.c500{background:#754d91}.deal-button{height:53px;padding:0 31px;background:linear-gradient(#dfc76d,#a87c27);color:#16120a;border-color:#f0d989}.clear-button{height:39px;padding:0 18px}.info-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.info-grid>div{background:linear-gradient(145deg,#111a17,#0a100e);border:1px solid #26302c;border-radius:12px;padding:13px 16px}.info-grid span{display:block;color:#69756f;font-size:8px;letter-spacing:1.8px}.info-grid b{display:block;color:#e9dfc5;font:700 14px Georgia,"Times New Roman",serif;margin-top:4px}.fairness{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:12px;padding:12px 15px;border:1px solid #26302c;border-radius:12px;background:#09100d}.fairness b{display:block;font:700 9px Georgia,"Times New Roman",serif;color:var(--gold2);letter-spacing:1.4px}.fairness span{font-size:8px;color:#6f7d75}.fairness button{height:34px;padding:0 14px;flex:none}footer{text-align:center;color:#59645f;font-size:8px;letter-spacing:1.6px;margin-top:18px}@media(max-width:800px){.app{padding:8px 10px 24px}.topbar{height:62px;grid-template-columns:1fr auto}.shoe-status{display:none}.balance-panel strong{font-size:18px}.casino-table{margin-top:12px;border-width:7px;border-radius:26px;padding:34px 9px 20px;min-height:690px}.casino-table:before{inset:10px;border-radius:20px}.table-copy{gap:9px;font-size:7px}.dealer-zone{margin-top:20px}.card-row{min-height:115px;padding:6px}.card-wrap{width:72px;height:101px;margin-left:-23px}.player-hands{gap:5px;min-height:120px}.player-hand{min-width:0;flex:1;padding:0}.player-hand .card-wrap{width:60px;height:84px;margin-left:-19px}.player-hand .card-row{min-height:94px}.hand-head{height:21px;font-size:7px;gap:7px}.hand-head b{font-size:12px}.zone-title b{font-size:16px}.status-message{font-size:15px}.bet-spot{right:10px;width:72px;height:72px;font-size:7px}.bet-spot b{font-size:11px}.action-bar{gap:5px;position:sticky;bottom:7px}.action{flex:1;padding:0 5px;height:43px;font-size:8px;touch-action:manipulation}.insurance-bar{gap:5px}.insurance{flex:1;padding:0 5px;font-size:7px}.chip-tray{gap:7px;margin-top:15px}.chip{width:49px;height:49px}.deal-button{height:48px;padding:0 18px}.info-grid{grid-template-columns:repeat(2,1fr);gap:8px}.info-grid>div{padding:11px}.fairness{align-items:flex-start}.fairness span{display:block;max-width:240px;margin-top:3px}}@media(max-width:420px){.card-wrap{width:61px;height:85px;margin-left:-20px}.player-hand .card-wrap{width:53px;height:74px;margin-left:-17px}.casino-table{min-height:650px}.chip{width:44px;height:44px}.deal-button{padding:0 12px}.clear-button{display:none}.fairness button{display:none}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* Royal 21 v2: precise bet chips + right-side shoe */
.shoe-deck{position:absolute;right:4.5%;top:50%;transform:translateY(-50%);z-index:3;width:118px;text-align:center;pointer-events:none;filter:drop-shadow(0 15px 14px #0008)}
.deck-cards{position:relative;width:92px;height:128px;margin:0 auto 8px}.deck-cards span,.deck-cards img{position:absolute;inset:0;width:100%;height:100%;border-radius:9px}.deck-cards span{border:1px solid #c8a84e;background:#0b3e31}.deck-cards span:first-child{transform:translate(-7px,-7px) rotate(-3deg);opacity:.7}.deck-cards span:nth-child(2){transform:translate(-3px,-3px) rotate(-1.5deg);opacity:.86}.deck-cards img{z-index:2;box-shadow:0 10px 20px #0008}.shoe-deck b{display:block;color:#e8d38c;font:800 10px Georgia,serif;letter-spacing:2px}.shoe-deck small{display:block;color:#92a59b;font-size:8px;letter-spacing:1px;margin-top:3px}.dealing-now .deck-cards img{animation:deckPulse .55s ease-in-out infinite alternate}@keyframes deckPulse{to{transform:translateX(-2px) translateY(-2px) rotate(-1deg);filter:brightness(1.18)}}
.bet-spot{right:4.5%;bottom:8px;width:128px;height:128px;z-index:5}.bet-chips{height:54px;display:flex;justify-content:center;align-items:flex-end;gap:3px;max-width:112px;flex-wrap:wrap;overflow:hidden;margin:4px auto 2px}.bet-chip-stack{position:relative;width:23px;height:45px;display:flex;justify-content:center;align-items:flex-end}.chip-mini{position:absolute;bottom:calc(var(--i) * 4px);width:24px;height:24px;border-radius:50%;border:1px solid #fff8;box-shadow:0 2px 4px #0008,inset 0 0 0 2px #fff4,inset 0 0 0 4px #1118;font:800 7px Arial,sans-serif;display:grid;place-items:center;color:#fff;text-shadow:0 1px 2px #000}.chip-mini.c1{color:#111}.chip-more{position:absolute;bottom:-3px;right:-8px;background:#111d;border:1px solid #d9b85a;color:#f4df98;border-radius:9px;padding:1px 4px;font-size:7px}.action{height:52px;min-width:105px;padding:0 15px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.action strong{font:900 12px Arial,sans-serif;letter-spacing:1.4px}.action span{font:700 8px Arial,sans-serif;letter-spacing:1px;opacity:.8}.action.hit{background:linear-gradient(#2f9b71,#145b43);border-color:#63d4a8}.action.stand{background:linear-gradient(#b84b56,#6e2029);border-color:#e17c84}.action.double{background:linear-gradient(#b99135,#6d4b14);border-color:#efd07b}.action.split{background:linear-gradient(#596eaf,#293a70);border-color:#91a9ef}.action:hover:not(:disabled){filter:brightness(1.12)}
@media(max-width:800px){.casino-table{padding-right:70px}.shoe-deck{right:5px;width:58px}.deck-cards{width:50px;height:70px;margin-bottom:4px}.shoe-deck b{font-size:7px;letter-spacing:1px}.shoe-deck small{font-size:6px}.bet-spot{right:6px;width:74px;height:74px}.bet-chips{height:28px;max-width:64px;margin:1px auto}.bet-chip-stack{width:14px;height:25px}.chip-mini{width:14px;height:14px;font-size:4px;bottom:calc(var(--i) * 2px)}.chip-more{font-size:5px;right:-4px}.action{min-width:0;flex:1;height:49px;padding:0 3px}.action strong{font-size:10px}.action span{font-size:6px}.action-bar{padding-right:0}.player-zone{padding-right:0}}
@media(max-width:420px){.casino-table{padding-right:58px}.shoe-deck{right:3px}.bet-spot{right:4px;width:64px;height:64px}.bet-spot>b{font-size:9px}.chip-tray{padding-right:0}.action{height:46px}.action strong{font-size:9px}}

/* Royal 21 v3 — responsive controls, solid shoe, settings and celebratory feedback */
[hidden]{display:none!important}
.topbar{grid-template-columns:auto minmax(190px,1fr) auto;gap:16px;min-height:76px;height:auto;padding:8px 0 12px}
.brand{min-width:0}
.brand-name{font-size:clamp(16px,2vw,22px);white-space:nowrap}
.brand-sub{font-size:8px;white-space:nowrap}
.topbar-actions{display:flex;justify-content:center;align-items:center;gap:7px;min-width:0}
.icon-control{display:flex;align-items:center;justify-content:center;gap:6px;min-width:76px;min-height:38px;padding:6px 10px;border-radius:12px;border:1px solid #d7bd664a;background:linear-gradient(145deg,#1a2b24,#0a1510);color:#efdfa5;box-shadow:inset 0 1px #ffffff12,0 4px 12px #0003;cursor:pointer;transition:transform .18s,border-color .18s,background .18s}
.icon-control>span{font-size:19px;line-height:1}
.icon-control small{font-size:8px;font-weight:800;letter-spacing:1px;white-space:nowrap}
.icon-control:hover{transform:translateY(-1px);border-color:#e9cc70;background:linear-gradient(145deg,#263c30,#0e1a14)}
.balance-panel{white-space:nowrap}
.balance-panel span{font-size:8px}
.casino-table{overflow:hidden;isolation:isolate}
.table-copy,.dealer-zone,.player-zone,.table-center-message,.action-bar,.insurance-bar,.chip-tray{z-index:4}
.shoe-deck{position:absolute;right:2.5%;top:43%;transform:translateY(-50%);z-index:3;width:104px;text-align:center;pointer-events:none;filter:drop-shadow(0 13px 13px #0008)}
.deck-cards{position:relative;width:77px;height:108px;margin:0 auto 7px;overflow:visible}
.deck-back{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:fill;border-radius:8px;border:1px solid #e2ca79;box-shadow:0 8px 16px #00190f9c;opacity:1!important;background:#153966}
.deck-back-1{z-index:1;transform:translate(-10px,-7px) rotate(-5deg)}
.deck-back-2{z-index:2;transform:translate(-7px,-4px) rotate(-3deg)}
.deck-back-3{z-index:3;transform:translate(-3px,-1px) rotate(-1.2deg)}
.deck-back-4{z-index:4;transform:translate(0,0)}
.shoe-deck b{display:block;color:#f1d987;font:800 10px Georgia,serif;letter-spacing:2px;text-shadow:0 2px 5px #00150e}
.shoe-deck small{display:block;color:#e3d6a8;font-size:9px;letter-spacing:1px;margin-top:4px}
.dealing-now .deck-back-4{animation:shoeKick .34s ease-in-out infinite alternate;transform-origin:50% 90%}
@keyframes shoeKick{to{transform:translate(-3px,-5px) rotate(-2deg);filter:brightness(1.22)}}
@keyframes deal{0%{opacity:0;transform:translate(var(--deal-x,180px),var(--deal-y,-35px)) rotate(13deg) scale(.62);filter:brightness(1.3) drop-shadow(0 0 14px #ffe49c66)}68%{opacity:1;transform:translate(-5px,2px) rotate(-2deg) scale(1.045)}100%{opacity:1;transform:translate(0,0) rotate(0) scale(1);filter:drop-shadow(0 11px 9px #0007)}}
.card-enter{animation:deal .54s cubic-bezier(.15,.83,.24,1) both;animation-delay:var(--deal-delay,0ms);will-change:transform,opacity}
.player-zone{width:100%;max-width:none;margin-left:auto;margin-right:auto;min-width:0}
.player-hands{width:100%;max-width:none;justify-content:stretch;align-items:stretch;min-width:0}
.player-hand{width:100%;max-width:none;min-width:0;flex:1 1 100%;}
.player-hand .card-row{width:100%;max-width:none;overflow:visible}
.bet-spot{z-index:5}
.action-bar{width:100%;max-width:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.action{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:0 7px;height:52px;border-radius:25px}
.action strong{font-size:12px;line-height:1}
.action span{font-size:8px;line-height:1.1;letter-spacing:1px}
.hit{background:linear-gradient(150deg,#2ca67a,#0a6349);border-color:#79d6b5}
.stand{background:linear-gradient(150deg,#d15465,#7a2031);border-color:#f08a98}
.double{background:linear-gradient(150deg,#e1b84e,#8a5b16);border-color:#f6dc83;color:#231a07}
.split{background:linear-gradient(150deg,#477bc2,#203f79);border-color:#9bc5ff}
.insurance-bar{width:100%;max-width:none;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.insurance{min-width:0;white-space:normal;line-height:1.2}
.chip-tray{width:100%;max-width:none;gap:clamp(6px,1.2vw,12px)}
.info-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.info-grid>div{min-width:0}
.info-grid b{overflow-wrap:anywhere}
.celebration-layer{position:absolute;inset:0;z-index:7;overflow:hidden;pointer-events:none;opacity:0}
.celebration-layer.active{opacity:1}
.confetti-piece{position:absolute;top:-22px;width:7px;height:12px;border-radius:2px;background:hsl(var(--hue,45) 86% 65%);box-shadow:0 0 8px #ffe58a44;animation:confettiFall var(--duration,2.2s) cubic-bezier(.2,.65,.45,1) forwards;animation-delay:var(--delay,0ms);transform:rotate(var(--spin,0deg))}
@keyframes confettiFall{0%{transform:translate3d(0,-15px,0) rotate(0);opacity:0}9%{opacity:1}100%{transform:translate3d(var(--drift,20px),var(--fall,700px),0) rotate(650deg);opacity:0}}
.status-message.result-blackjack{color:#fff0a6;text-shadow:0 0 9px #ffd451,0 0 28px #e6ac35;animation:blackjackPulse .72s ease-in-out 3}
.status-message.result-win{color:#a7ffce;text-shadow:0 0 20px #2eea9d;animation:winGlow .9s ease-in-out 2}
.status-message.result-lose{color:#ffb2b8}
@keyframes blackjackPulse{0%,100%{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.08);filter:brightness(1.4)}}
@keyframes winGlow{0%,100%{transform:scale(1)}50%{transform:scale(1.045)}}
.player-hand.blackjack,.player-hand.win{animation:winningHand .8s ease-in-out 2;border-color:#e4ca72}
@keyframes winningHand{50%{box-shadow:0 0 24px #f4d77545,inset 0 0 26px #f4d77512}}
.settings-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}
.modal-scrim{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0;background:#020906d9;backdrop-filter:blur(8px);cursor:default}
.modal-card{position:relative;width:min(560px,100%);max-height:min(88dvh,840px);overflow:auto;border:1px solid #bda04c88;border-radius:22px;padding:20px;background:radial-gradient(ellipse at 50% 0,#20372b,#0a1510 58%);box-shadow:0 28px 100px #000c,inset 0 1px #fff1;overscroll-behavior:contain}
.modal-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:10px}
.modal-heading small{font-size:9px;letter-spacing:2px;color:#82938a}
.modal-heading h2{margin:5px 0 0;font:800 23px Georgia,serif;letter-spacing:2px;color:#f4dc91}
.modal-close{width:36px;height:36px;flex:none;border:1px solid #6d785f;border-radius:50%;background:#111e17;color:#f0ddaa;font-size:26px;line-height:1;cursor:pointer}
.setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 2px;border-bottom:1px solid #ffffff13;color:#e7e0ce;font-size:14px}
.setting-row select{min-width:140px;border:1px solid #8b7a4b;border-radius:10px;background:#0a1a12;color:#f4e8c3;padding:9px 12px;font:600 13px Arial,sans-serif}
.switch{position:relative;display:inline-flex;align-items:center;cursor:pointer}
.switch input{position:absolute;width:1px;height:1px;opacity:0}
.switch-track{width:47px;height:26px;background:#39453d;border:1px solid #69776c;border-radius:30px;position:relative;transition:background .2s}
.switch-track:after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;background:#f2ead2;border-radius:50%;transition:transform .2s}
.switch input:checked+.switch-track{background:#17845d;border-color:#5fd2a5}
.switch input:checked+.switch-track:after{transform:translateX(21px)}
.rules-panel{margin-top:17px;padding:14px;border:1px solid #d2b55635;border-radius:15px;background:#031c145e}
.rules-panel h3{margin:0 0 10px;color:#f1d88c;letter-spacing:1.7px;font:800 12px Georgia,serif}
.payout-row{display:flex;justify-content:space-between;gap:15px;padding:7px 0;border-bottom:1px solid #ffffff0e;color:#cdd6cb;font-size:12px}
.payout-row b{color:#f4df98;white-space:nowrap}
.rules-bullets{margin:12px 0;padding-left:18px;color:#aab9af;font-size:11px;line-height:1.55}
.rules-bullets li{padding:2px 0}
.rtp-note{margin:10px 0 6px;color:#8f9d93;font-size:10px;line-height:1.5}
.source-link{display:inline-block;color:#f1d88c;font-size:11px;text-decoration-thickness:1px;text-underline-offset:3px}
.settings-done{display:block;width:100%;margin-top:14px}
.pseudo-fullscreen{overflow:hidden}
.pseudo-fullscreen #app{height:100dvh;overflow:auto;padding-bottom:max(20px,env(safe-area-inset-bottom))}

@media(max-width:800px){
 .app{padding:8px 10px max(20px,env(safe-area-inset-bottom))}
 .topbar{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand balance" "actions actions";gap:8px 6px;padding:6px 0 10px;min-height:0}
 .brand{grid-area:brand;gap:8px}
 .brand-mark{width:35px;height:35px;border-radius:10px;font-size:22px}
 .brand-name{font-size:17px;letter-spacing:2px}
 .brand-sub{font-size:7px;letter-spacing:1.3px}
 .topbar-actions{grid-area:actions;justify-content:center;gap:9px}
 .icon-control{width: min(31vw,116px);min-width:84px;min-height:38px;padding:4px 8px;border-radius:10px;flex-direction:row}
 .icon-control>span{font-size:18px}
 .icon-control small{font-size:8px}
 .balance-panel{grid-area:balance}
 .balance-panel span{font-size:7px;letter-spacing:1px}
 .balance-panel strong{font-size:17px}
 .casino-table{margin-top:10px;border-width:7px;border-radius:24px;padding:29px 10px 19px;min-height:0}
 .casino-table:before{inset:9px;border-radius:17px}
 .table-copy{padding:0 68px 0 0;gap:7px 10px;font-size:7px;letter-spacing:1.1px;line-height:1.4}
 .dealer-zone{margin-top:19px;padding-right:0}
 .card-row{min-height:112px;padding:7px 0;gap:0}
 .card-wrap{width:clamp(58px,17vw,74px);height:calc(clamp(58px,17vw,74px)*1.4);margin-left:clamp(-22px,-5vw,-17px)}
 .card-wrap:first-child{margin-left:0}
 .zone-title{font-size:9px;padding:0 3px;letter-spacing:1.5px}
 .zone-title b{font-size:17px}
 .table-center-message{height:auto;min-height:53px;margin:0 0 5px;padding-right:55px}
 .status-message{font-size:clamp(14px,4vw,18px);letter-spacing:1.25px}
 .player-zone{margin-top:10px;padding:0;min-width:0}
 .player-hands{gap:6px;min-height:126px;min-width:0}
 .player-hand{min-width:0;flex:1 1 100%;padding:1px 0 2px;border-radius:15px}
 .hand-head{height:23px;font-size:7px;gap:7px;letter-spacing:1.4px}
 .hand-head b{font-size:13px}
 .player-hand .card-row{min-height:102px;padding:5px 0}
 .player-hand .card-wrap{width:clamp(49px,14.3vw,62px);height:calc(clamp(49px,14.3vw,62px)*1.4);margin-left:clamp(-19px,-4.5vw,-14px)}
 .player-hand .card-wrap:first-child{margin-left:0}
 .bet-spot{right:3px;bottom:2px;width:65px;height:65px;font-size:7px;background:#03402e8f;backdrop-filter:blur(2px)}
 .bet-spot b{font-size:10px}
 .bet-chips{height:24px;max-width:60px;gap:1px}
 .bet-chip-stack{width:13px;height:22px}
 .chip-mini{width:13px;height:13px;font-size:4px;bottom:calc(var(--i)*2px)}
 .chip-more{font-size:5px;right:-4px}
 .action-bar{gap:6px;margin-top:8px}
 .action{height:47px;padding:0 3px}
 .action strong{font-size:clamp(9px,2.7vw,11px);letter-spacing:1px}
 .action span{font-size:7px;letter-spacing:.8px}
 .insurance-bar{gap:6px;margin-top:8px}
 .insurance{height:40px;padding:0 5px;font-size:7px;letter-spacing:1px}
 .chip-tray{gap:clamp(5px,1.5vw,8px);margin-top:17px}
 .chip{width:clamp(39px,12vw,49px);height:clamp(39px,12vw,49px);flex:none}
 .chip span{font-size:clamp(11px,3.5vw,16px)}
 .deal-button{height:46px;padding:0 13px;font-size:9px}
 .clear-button{height:40px;padding:0 10px;font-size:8px}
 .shoe-deck{top:41%;right:8px;width:64px}
 .deck-cards{width:48px;height:67px;margin-bottom:5px}
 .deck-back-1{transform:translate(-6px,-5px) rotate(-5deg)}
 .deck-back-2{transform:translate(-4px,-3px) rotate(-3deg)}
 .deck-back-3{transform:translate(-2px,-1px) rotate(-1deg)}
 .deck-back-4{transform:none}
 .shoe-deck b{font-size:7px;letter-spacing:1px}
 .shoe-deck small{font-size:7px;margin-top:2px}
 .info-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .info-grid>div{padding:10px;border-radius:10px}
 .info-grid span{font-size:7px;letter-spacing:1.2px}
 .info-grid b{font-size:12px}
 .fairness{align-items:center;padding:11px;gap:8px}
 .fairness span{font-size:8px;line-height:1.4;max-width:none}
 .fairness button{height:34px;padding:0 10px;font-size:8px;white-space:nowrap}
 footer{font-size:7px;line-height:1.5;letter-spacing:1px;padding:0 8px}
}
@media(max-width:420px){
 .brand-name{font-size:15px;letter-spacing:1.6px}
 .brand-sub{display:none}
 .balance-panel strong{font-size:15px}
 .topbar-actions{gap:6px}
 .icon-control{width:31%;min-width:0;padding:4px 5px;gap:5px}
 .icon-control small{font-size:7px;letter-spacing:.7px}
 .casino-table{padding-left:8px;padding-right:8px}
 .table-copy{padding-right:57px;font-size:6px;gap:5px 8px}
 .shoe-deck{right:5px;width:54px}
 .deck-cards{width:40px;height:56px}
 .player-hands{min-height:117px}
 .player-hand .card-row{min-height:93px}
 .player-hand .card-wrap{width:clamp(45px,13vw,53px);height:calc(clamp(45px,13vw,53px)*1.4);margin-left:-15px}
 .bet-spot{width:59px;height:59px;right:2px}
 .bet-spot>span{font-size:6px}
 .bet-spot>b{font-size:9px}
 .chip-tray{gap:5px}
 .chip{width:39px;height:39px}
 .deal-button{padding:0 10px}
 .clear-button{display:inline-flex;align-items:center;justify-content:center;padding:0 7px}
 .fairness{align-items:flex-start;flex-direction:column}
 .fairness button{align-self:stretch}
 .modal-card{padding:15px;border-radius:18px}
 .modal-heading h2{font-size:20px}
}
@media(prefers-reduced-motion:reduce){.confetti-piece,.status-message.result-blackjack,.status-message.result-win,.player-hand.blackjack,.player-hand.win{animation:none!important}}

/* Royal 21 v4: smaller card artwork + cinematic lift-and-flight deal animation */
.card-wrap{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border-radius:7px;
  background:#fffdf7;
  box-shadow:0 9px 14px #00140f70;
}
.card-svg,.card-flight-back{
  position:absolute;
  inset:4%;
  display:block;
  width:92%;
  height:92%;
  object-fit:fill;
  border-radius:5px;
}
.card-svg{z-index:1;filter:none}
.card-flight-back{
  z-index:2;
  opacity:1;
  transform-origin:50% 50%;
  backface-visibility:hidden;
  box-shadow:0 2px 6px #00160d66;
}
.card-flight-face .card-svg{
  z-index:3;
  opacity:0;
  transform:rotateY(-90deg);
  transform-origin:50% 50%;
  backface-visibility:hidden;
  animation:flightFaceReveal .55s cubic-bezier(.19,.76,.22,1) both;
  animation-delay:calc(var(--deal-delay,0ms) + 85ms);
}
.card-flight-face .card-flight-back{
  animation:flightBackTurn .55s cubic-bezier(.19,.76,.22,1) both;
  animation-delay:calc(var(--deal-delay,0ms) + 85ms);
}
.card-enter{
  animation:dealFromShoe .66s cubic-bezier(.16,.83,.19,1) both;
  animation-delay:var(--deal-delay,0ms);
  will-change:transform,opacity;
}
@keyframes dealFromShoe{
  0%{opacity:0;transform:translate3d(var(--deal-x,180px),var(--deal-y,-80px),0) rotateZ(-9deg) scale(.52);filter:brightness(1.23) drop-shadow(0 8px 14px #0009)}
  11%{opacity:1;transform:translate3d(var(--deal-x,180px),calc(var(--deal-y,-80px) - 22px),0) rotateZ(-7deg) scale(.62);filter:brightness(1.18) drop-shadow(0 10px 12px #0008)}
  34%{opacity:1;transform:translate3d(var(--deal-arc-x,90px),var(--deal-arc-y,-70px),0) rotateZ(-8deg) scale(.79);filter:brightness(1.08) drop-shadow(0 12px 12px #0008)}
  73%{opacity:1;transform:translate3d(var(--deal-near-x,10px),var(--deal-near-y,0px),0) rotateZ(2deg) scale(1.035);filter:brightness(1.02) drop-shadow(0 12px 10px #0008)}
  88%{opacity:1;transform:translate3d(0,0,0) rotateZ(-.8deg) scale(.99)}
  100%{opacity:1;transform:translate3d(0,0,0) rotateZ(0) scale(1);filter:drop-shadow(0 9px 8px #0007)}
}
@keyframes flightBackTurn{
  0%,25%{opacity:1;transform:rotateY(0deg)}
  40%{opacity:.95;transform:rotateY(90deg)}
  100%{opacity:0;transform:rotateY(90deg)}
}
@keyframes flightFaceReveal{
  0%,25%{opacity:0;transform:rotateY(-90deg)}
  40%{opacity:1;transform:rotateY(0deg)}
  100%{opacity:1;transform:rotateY(0deg)}
}
.dealing-now .deck-back-4{
  animation:shoeLift .38s cubic-bezier(.33,.02,.65,1) infinite alternate;
  transform-origin:50% 92%;
  box-shadow:0 15px 24px #0006,0 0 16px #f6d97948;
}
.dealing-now .deck-cards{filter:drop-shadow(0 0 10px #e7c65c28)}
@keyframes shoeLift{
  from{transform:translate3d(0,0,0) rotateZ(0);filter:brightness(1)}
  to{transform:translate3d(-2px,-7px,0) rotateZ(-1.8deg);filter:brightness(1.18)}
}
@media(prefers-reduced-motion:reduce){
  .card-enter,.card-flight-back,.card-flight-face .card-svg,.dealing-now .deck-back-4{animation:none!important;will-change:auto}
  .card-enter{opacity:1!important;transform:none!important}
  .card-flight-back{display:none!important}
  .card-flight-face .card-svg{opacity:1!important;transform:none!important}
}

/* While a card is travelling, queue actions instead of replacing its animated node. */
.card-action-busy .action-bar button,.card-action-busy .insurance-bar button,.card-action-busy .chip-tray button,.card-action-busy #newRoundBtn{pointer-events:none;filter:saturate(.72)}



/* Card-only restoration: match STARA VERSION's full-size card artwork and native rounded border. */
.card-wrap{
  overflow:visible;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.card-svg,.card-flight-back{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:fill;
  border-radius:0;
}
.card-svg{z-index:1;filter:drop-shadow(0 11px 9px #0007)}
.card-flight-back{z-index:2;box-shadow:none;filter:drop-shadow(0 3px 4px #0007)}
.card-wrap::after{display:none!important}

/* v7: player total is already shown in each hand header; avoid duplicating it beside the shoe. */
.player-zone > .zone-title > #playerScore{display:none!important}


/* Royal 21 ambient casino backdrop: soft emerald aurora, fine deco lines, warm bokeh. */
html,body{background-color:#030906}
body{position:relative;isolation:isolate;overflow-x:hidden}
body::before,body::after{content:"";position:fixed;inset:-8%;pointer-events:none;z-index:0}
body::before{
  background:
    radial-gradient(ellipse at 13% 25%,rgba(22,145,98,.22) 0,rgba(22,145,98,.08) 17%,transparent 34%),
    radial-gradient(ellipse at 88% 28%,rgba(205,166,70,.13) 0,rgba(205,166,70,.035) 15%,transparent 28%),
    radial-gradient(ellipse at 72% 83%,rgba(10,113,78,.19) 0,transparent 32%),
    radial-gradient(ellipse at 40% 60%,rgba(9,50,37,.2) 0,transparent 42%),
    repeating-linear-gradient(128deg,transparent 0 108px,rgba(224,190,104,.025) 109px,transparent 111px 218px);
  filter:blur(2px);
  transform:translate3d(0,0,0);
  animation:royalAurora 26s ease-in-out infinite alternate;
}
body::after{
  inset:0;
  opacity:.62;
  background:
    radial-gradient(circle at 9% 17%,rgba(255,220,132,.55) 0 1px,transparent 2.8px),
    radial-gradient(circle at 22% 62%,rgba(62,219,156,.45) 0 1.2px,transparent 3px),
    radial-gradient(circle at 79% 14%,rgba(255,223,135,.50) 0 1px,transparent 3px),
    radial-gradient(circle at 91% 41%,rgba(66,205,150,.40) 0 1.2px,transparent 3.4px),
    radial-gradient(circle at 69% 78%,rgba(255,213,112,.35) 0 1px,transparent 2.8px),
    radial-gradient(circle at 35% 88%,rgba(65,219,158,.32) 0 1px,transparent 3px);
  animation:royalBokeh 19s ease-in-out infinite alternate;
}
.app{position:relative;z-index:1}
@keyframes royalAurora{0%{transform:translate3d(-.6%,.2%,0) scale(1)}50%{transform:translate3d(.35%,-.5%,0) scale(1.025)}100%{transform:translate3d(.8%,.35%,0) scale(1.045)}}
@keyframes royalBokeh{0%{transform:translate3d(0,0,0);opacity:.38}100%{transform:translate3d(0,-7px,0);opacity:.72}}
@media(prefers-reduced-motion:reduce){body::before,body::after{animation:none!important}}

/* Royal 21 Release polish — restrained lighting, tactile controls, readable states. */
:root{
  --surface-1:#0d1712;
  --surface-2:#07100c;
  --felt-top:#0b704e;
  --felt-mid:#07533d;
  --felt-deep:#022b20;
  --trim:#ad8e45;
  --room-light:rgba(43,166,120,.13);
}
body[data-theme="emerald"]{--gold:#d9b85a;--gold2:#f3d989;--cream:#f7f0df;--felt-top:#0a7250;--felt-mid:#07513c;--felt-deep:#022a1f;--trim:#b89a4e;--room-light:rgba(34,156,111,.13)}
body[data-theme="midnight"]{--gold:#b6c2c3;--gold2:#eef2ee;--cream:#ecf0eb;--felt-top:#202c2b;--felt-mid:#101918;--felt-deep:#070d0c;--trim:#87999b;--room-light:rgba(135,157,162,.12)}
body[data-theme="burgundy"]{--gold:#d4b16a;--gold2:#f0dba1;--cream:#f7eedf;--felt-top:#7a243a;--felt-mid:#511b2b;--felt-deep:#260d17;--trim:#b08b51;--room-light:rgba(175,55,82,.14)}
body[data-theme="sapphire"]{--gold:#a9c8dc;--gold2:#deefff;--cream:#eaf2f8;--felt-top:#145779;--felt-mid:#0b354f;--felt-deep:#061b2b;--trim:#769fb3;--room-light:rgba(54,147,204,.14)}
html{scroll-behavior:smooth;background:#030806}
body{background:radial-gradient(ellipse at 50% -15%,#1d2b25 0,#0b100d 43%,#030605 78%);font-kerning:normal;-webkit-font-smoothing:antialiased}
body::before{background:radial-gradient(ellipse at 16% 7%,var(--room-light) 0,transparent 36%),radial-gradient(ellipse at 84% 12%,rgba(205,166,83,.065) 0,transparent 30%),radial-gradient(ellipse at 50% 90%,rgba(0,0,0,.42) 0,transparent 55%),linear-gradient(112deg,transparent 15%,rgba(255,255,255,.012) 35%,transparent 48%,rgba(255,255,255,.01) 70%,transparent 85%);filter:blur(9px);opacity:.92;animation:royalAurora 38s ease-in-out infinite alternate}
body::after{opacity:.28;background:radial-gradient(ellipse at 9% 18%,rgba(244,218,151,.7) 0 1px,transparent 3px),radial-gradient(ellipse at 90% 17%,rgba(244,218,151,.48) 0 1px,transparent 3px),radial-gradient(ellipse at 78% 74%,rgba(90,215,167,.28) 0 1px,transparent 3px),radial-gradient(ellipse at 21% 81%,rgba(90,215,167,.22) 0 1px,transparent 3px)}
.app{isolation:isolate}
.topbar{border-bottom-color:#d5c07b22;box-shadow:0 1px #ffffff04}
.brand-mark{border-color:color-mix(in srgb,var(--trim),transparent 8%);background:linear-gradient(145deg,#1d2b24,#080e0b 78%);box-shadow:inset 0 1px #ffffff17,inset 0 -8px 20px #0007,0 0 0 4px #0002}
.brand-name{text-shadow:0 2px 9px #0009}
.balance-panel strong{text-shadow:0 0 22px color-mix(in srgb,var(--gold2),transparent 72%);font-variant-numeric:tabular-nums}
.casino-table{background:radial-gradient(ellipse at 48% 42%,var(--felt-top) 0%,var(--felt-mid) 51%,var(--felt-deep) 100%);border-color:#111714;box-shadow:inset 0 0 0 2px var(--trim),inset 0 0 0 5px #e2c76a12,inset 0 0 100px #00170f99,0 24px 70px #000b,0 0 45px var(--room-light)}
.casino-table:before{border-color:color-mix(in srgb,var(--gold),transparent 55%);box-shadow:inset 0 0 26px #0002}
.casino-table:after{opacity:.052;background:repeating-linear-gradient(24deg,transparent 0 4px,#fff1 5px,transparent 6px 12px),repeating-linear-gradient(-29deg,transparent 0 7px,#0004 8px,transparent 9px 16px)}
.table-copy{position:relative;padding-bottom:8px;gap:13px 22px;text-shadow:0 1px 7px #0009}
.table-copy span{position:relative;white-space:nowrap}
.table-copy span+span:before{content:"";display:inline-block;width:3px;height:3px;margin:0 17px 2px -4px;border-radius:50%;background:var(--gold);opacity:.7}
.table-fx{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:0;border-radius:inherit}
.casino-table[data-fx="blackjack"] .table-fx{animation:tableBlackjackFlash 2.25s ease-out both}
.casino-table[data-fx="win"] .table-fx,.casino-table[data-fx="bust"] .table-fx{animation:tableWinFlash 1.5s ease-out both}
.casino-table[data-fx="push"] .table-fx{animation:tablePushFlash .95s ease-out both}
.casino-table[data-fx="lose"] .table-fx{animation:tableLoseFlash .8s ease-out both}
@keyframes tableBlackjackFlash{0%{opacity:0;background:radial-gradient(ellipse at 50% 58%,rgba(255,220,109,.3),transparent 25%)}18%{opacity:1;background:radial-gradient(ellipse at 50% 58%,rgba(255,220,109,.18),transparent 52%)}100%{opacity:0;background:radial-gradient(ellipse at 50% 58%,rgba(255,220,109,.02),transparent 65%)}}
@keyframes tableWinFlash{0%{opacity:0;background:radial-gradient(ellipse at 50% 74%,rgba(78,255,178,.23),transparent 20%)}22%{opacity:1}100%{opacity:0;background:radial-gradient(ellipse at 50% 74%,rgba(78,255,178,.01),transparent 60%)}}
@keyframes tablePushFlash{0%,100%{opacity:0}25%{opacity:.7;background:radial-gradient(ellipse at 50% 50%,rgba(220,234,219,.13),transparent 48%)}}
@keyframes tableLoseFlash{0%,100%{opacity:0}24%{opacity:.45;background:radial-gradient(ellipse at 50% 74%,rgba(255,85,98,.12),transparent 52%)}}
.player-hand{border:1px solid transparent}
.player-hand.active-hand{background:linear-gradient(180deg,#ffffff0c,#ffffff02);box-shadow:0 0 0 1px color-mix(in srgb,var(--gold),transparent 66%),inset 0 0 34px #00170f4a}
.player-hand.lose{box-shadow:inset 0 0 30px #9e25301a;border-color:#d75b6630}
.player-hand.push{border-color:#e7e8d51f}
.status-message{position:relative;display:inline-block;max-width:100%;text-wrap:balance;text-shadow:0 2px 18px #0009}
.status-message.result-blackjack{color:#fff1b8;text-shadow:0 0 8px #ffd96d,0 0 28px #e6ac3544;animation:blackjackPulse .76s cubic-bezier(.33,0,.2,1) 2}
.status-message.result-win,.status-message.result-bust{color:#baffd7;text-shadow:0 0 18px #2eea9d8c;animation:winGlow .86s ease-in-out 2}
.status-message.result-bust{letter-spacing:1.3px}
.status-message.result-lose{color:#ffb8bc;text-shadow:0 0 13px #e14b5555}
.status-message.result-push{color:#dde7df;text-shadow:0 0 16px #ffffff24}
.player-hand.blackjack,.player-hand.win{animation:winningHand .9s ease-in-out 2;border-color:color-mix(in srgb,var(--gold),transparent 38%)}
.chip{position:relative;isolation:isolate;overflow:hidden;border:1px solid #ffffff40;box-shadow:0 8px 15px #00140e99,inset 0 2px 3px #ffffff64,inset 0 -5px 7px #0005;transition:transform .18s cubic-bezier(.2,.8,.2,1),filter .18s,box-shadow .18s}
.chip:before{inset:4px;border:0;background:repeating-conic-gradient(from 2deg,#ffffffd9 0deg 8deg,#ffffff24 8deg 15deg);mask:radial-gradient(circle,transparent 0 63%,#000 65% 100%);opacity:.88;filter:drop-shadow(0 1px 1px #0005)}
.chip:after{content:"";position:absolute;inset:12px;border:1px solid #ffffff91;border-radius:50%;box-shadow:inset 0 2px 5px #0003,0 1px 2px #ffffff22;pointer-events:none}
.chip span{font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #0008,0 0 1px #0008}
.c1{background:radial-gradient(circle at 36% 24%,#fffef3,#ddd8ca 68%,#aaa699)}
.c5{background:radial-gradient(circle at 36% 24%,#e95c69,#a61d30 68%,#66101e)}
.c25{background:radial-gradient(circle at 36% 24%,#39b77b,#14794a 68%,#06472d)}
.c100{background:radial-gradient(circle at 36% 24%,#5f91d7,#254c86 68%,#152a4e)}
.c500{background:radial-gradient(circle at 36% 24%,#a87ac4,#68417f 68%,#39214a)}
.chip:hover:not(:disabled){transform:translateY(-4px) scale(1.035);filter:brightness(1.1);box-shadow:0 13px 21px #00130ecc,inset 0 2px 4px #fff8,inset 0 -5px 7px #0005}
.chip:active:not(:disabled){transform:translateY(0) scale(.96)}
.chip.selected-chip:not(:disabled){outline:2px solid var(--gold2);outline-offset:4px;box-shadow:0 0 0 7px #dfc46b16,0 8px 15px #00140e99,inset 0 2px 3px #ffffff64,inset 0 -5px 7px #0005}
.bet-chip-stack{filter:drop-shadow(0 4px 4px #00170f65)}
.chip-mini{border:1px solid #ffffff77;box-shadow:inset 0 1px 2px #ffffff7a,inset 0 -2px 3px #0006;outline:1px solid #0005}
.bet-chip-stack .chip-mini:nth-child(n+2){animation:chipStackSettle .28s cubic-bezier(.18,.85,.2,1) both;animation-delay:calc(var(--i)*24ms)}
@keyframes chipStackSettle{0%{transform:translateY(-10px) scale(.88);filter:brightness(1.3)}72%{transform:translateY(1px) scale(1.02)}100%{transform:translateY(0) scale(1);filter:brightness(1)}}
.action{position:relative;isolation:isolate;overflow:hidden;border-width:1px;box-shadow:0 6px 15px #00190f9e,inset 0 1px 1px #ffffff51,inset 0 -3px 4px #0003;transition:transform .16s ease,filter .16s,border-color .16s,box-shadow .16s}
.action:before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(125deg,#ffffff22,transparent 40%,#00000008 80%);opacity:.8;pointer-events:none}
.action:hover:not(:disabled){filter:brightness(1.09);box-shadow:0 10px 21px #00170fb8,inset 0 1px 1px #ffffff67}
.action:active:not(:disabled){transform:translateY(1px) scale(.985)}
.deal-button{box-shadow:0 7px 16px #0006,inset 0 1px #fff8,inset 0 -3px 4px #78551c30}
.deal-button:active:not(:disabled){transform:translateY(1px) scale(.99)}
button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--gold2);outline-offset:3px}
.icon-control{backdrop-filter:blur(10px)}
.icon-control:hover:not(:disabled){box-shadow:0 8px 18px #0005,inset 0 1px #ffffff1a}
.bet-spot{background:radial-gradient(circle at 50% 45%,#013b2a70,#013b2a22);box-shadow:inset 0 0 20px #0002}
.shoe-deck{filter:drop-shadow(0 16px 18px #0009)}
.deck-cards img{border:1px solid #d9bf6c;box-shadow:0 10px 20px #0009,inset 0 1px #fff5}
.dealing-now .deck-cards{filter:drop-shadow(0 0 13px color-mix(in srgb,var(--gold2),transparent 66%))}
.card-enter{transform-style:preserve-3d;backface-visibility:visible}
@keyframes dealFromShoe{
  0%{opacity:0;transform:translate3d(var(--deal-x,180px),var(--deal-y,-80px),0) rotateX(17deg) rotateY(-18deg) rotateZ(-8deg) scale(.5);filter:brightness(1.26) drop-shadow(0 12px 18px #000b)}
  12%{opacity:1;transform:translate3d(var(--deal-x,180px),calc(var(--deal-y,-80px) - 18px),0) rotateX(12deg) rotateY(-11deg) rotateZ(-6deg) scale(.62);filter:brightness(1.19) drop-shadow(0 14px 15px #0009)}
  36%{opacity:1;transform:translate3d(var(--deal-arc-x,90px),var(--deal-arc-y,-70px),0) rotateX(7deg) rotateY(7deg) rotateZ(-4deg) scale(.8);filter:brightness(1.08) drop-shadow(0 15px 12px #0008)}
  72%{opacity:1;transform:translate3d(var(--deal-near-x,10px),var(--deal-near-y,0px),0) rotateX(1deg) rotateY(1deg) rotateZ(1.7deg) scale(1.035);filter:brightness(1.02) drop-shadow(0 12px 10px #0008)}
  88%{opacity:1;transform:translate3d(0,0,0) rotateX(0) rotateY(0) rotateZ(-.8deg) scale(.99)}
  100%{opacity:1;transform:translate3d(0,0,0) rotateX(0) rotateY(0) rotateZ(0) scale(1);filter:drop-shadow(0 9px 8px #0007)}
}
.card-flight-face .card-flight-back,.card-flight-face .card-svg{transform-style:preserve-3d}
.card-flight-face .card-flight-back{transform-origin:50% 50%;filter:drop-shadow(0 4px 7px #0008)}
.card-flight-face .card-svg{filter:drop-shadow(0 3px 5px #0004)}
.confetti-piece{width:4px;height:9px;border-radius:1px;box-shadow:0 0 7px hsl(var(--hue,45) 86% 65% / .24)}
.celebration-layer.active{mask-image:linear-gradient(to bottom,transparent,black 10%,black 86%,transparent)}
.settings-modal[hidden]{display:none!important}
.modal-open{overflow:hidden}
.modal-card{border-color:color-mix(in srgb,var(--gold),transparent 50%);background:radial-gradient(ellipse at 50% 0,color-mix(in srgb,var(--felt-mid),#16261e 60%),#09110d 60%);}
.range-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 12px}
.range-row output{color:var(--gold2);font-variant-numeric:tabular-nums;font-size:12px;min-width:38px;text-align:right}
.range-row input[type="range"]{grid-column:1/-1;width:100%;accent-color:var(--gold2);cursor:pointer}
.stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0 10px}
.stat-tile{display:flex;flex-direction:column;justify-content:space-between;gap:8px;min-height:88px;padding:14px;border:1px solid #ffffff12;border-radius:13px;background:linear-gradient(145deg,#17231b,#0a120e);box-shadow:inset 0 1px #ffffff08}
.stat-tile span{font-size:10px;letter-spacing:.8px;color:#9fac9f}
.stat-tile b{color:#f1e7cb;font:700 24px Georgia,serif;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.stat-tile.positive b{color:#9de9bd}
.stat-tile.negative b{color:#e7a6aa}
.stat-tile.gold b{color:var(--gold2)}
.stats-caption{font-size:11px;line-height:1.5;color:#89968d}
.stats-actions{display:flex;justify-content:space-between;gap:9px;margin-top:17px}
.stats-actions .deal-button,.stats-actions .clear-button{flex:1;height:43px;font-size:10px;padding:0 12px}
.fairness{gap:18px}
.fairness-copy{min-width:0;display:flex;flex-direction:column;gap:5px}
.fairness-actions{display:flex;align-items:center;gap:8px;flex:none}
.fairness-actions button{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}
body[data-theme="midnight"] .casino-table{box-shadow:inset 0 0 0 2px #87999b,inset 0 0 0 5px #dce7e712,inset 0 0 100px #000b,0 24px 70px #000b,0 0 42px rgba(133,158,166,.12)}
body[data-theme="burgundy"] .casino-table{box-shadow:inset 0 0 0 2px #b08b51,inset 0 0 0 5px #f7dca112,inset 0 0 100px #19040b88,0 24px 70px #000b,0 0 42px rgba(175,55,82,.14)}
body[data-theme="sapphire"] .casino-table{box-shadow:inset 0 0 0 2px #769fb3,inset 0 0 0 5px #d8efff12,inset 0 0 100px #00101e88,0 24px 70px #000b,0 0 42px rgba(54,147,204,.14)}
@media(max-width:800px){
  .fairness{align-items:flex-start}
  .fairness-actions{flex-direction:column;align-items:stretch}
  .fairness-actions button{min-width:112px;padding-inline:10px}
  .table-copy span+span:before{margin-right:8px;margin-left:-2px}
  .range-row{gap:7px 10px}
  .modal-card{max-height:min(88dvh,840px)}
}
@media(max-width:520px){
  .stats-grid{gap:7px}
  .stat-tile{min-height:76px;padding:10px}
  .stat-tile span{font-size:9px;line-height:1.35}
  .stat-tile b{font-size:21px}
  .stats-actions{flex-direction:column}
  .fairness-actions{width:100%}
  .fairness-actions button{min-width:0;width:100%}
  .fairness-copy{width:100%}
  .fairness{flex-direction:column}
}
@media(prefers-reduced-motion:reduce){
  body::before,body::after{animation:none!important}
  .casino-table[data-fx] .table-fx,.bet-chip-stack .chip-mini,.card-enter,.dealing-now .deck-back-4{animation:none!important}
  .chip,.action,.deal-button{transition:none!important}
}

/* A small, short-lived return of chips from the wager circle to the balance. */
.payout-layer{position:fixed;inset:0;z-index:600;pointer-events:none;overflow:hidden}
.payout-token{position:fixed;left:0;top:0;display:grid;place-items:center;width:clamp(22px,2.8vw,30px);height:clamp(22px,2.8vw,30px);border-radius:50%;border:1px solid #ffffff77;color:#fff;font:800 7px Arial,sans-serif;text-shadow:0 1px 2px #0008;box-shadow:0 5px 9px #0008,inset 0 1px 2px #ffffff99,inset 0 -3px 4px #0005;opacity:0;animation:payoutFlight .94s cubic-bezier(.17,.78,.17,1) both;animation-delay:var(--flight-delay,0ms);will-change:transform,opacity;}
.payout-token:before{content:"";position:absolute;inset:2px;border-radius:50%;background:repeating-conic-gradient(#ffffffc9 0deg 8deg,#ffffff17 8deg 16deg);mask:radial-gradient(circle,transparent 0 63%,#000 65% 100%);pointer-events:none}
.payout-token:after{content:"";position:absolute;inset:6px;border:1px solid #ffffff78;border-radius:50%;pointer-events:none}
@keyframes payoutFlight{0%{opacity:0;transform:translate3d(var(--start-x),var(--start-y),0) scale(.55) rotate(0deg);filter:brightness(1.3)}12%{opacity:1;transform:translate3d(var(--start-x),var(--start-y),0) scale(1) rotate(-8deg);filter:brightness(1.16)}52%{opacity:1;transform:translate3d(var(--mid-x),var(--mid-y),0) scale(.88) rotate(var(--flight-spin));filter:brightness(1.08)}86%{opacity:1;transform:translate3d(var(--end-x),var(--end-y),0) scale(.76) rotate(var(--flight-spin));filter:brightness(1.15)}100%{opacity:0;transform:translate3d(var(--end-x),var(--end-y),0) scale(.22) rotate(var(--flight-spin));filter:brightness(1.3)}}
@media(prefers-reduced-motion:reduce){.payout-token{animation:none!important;display:none!important}}

.card-collect-token{position:fixed;left:0;top:0;z-index:1;display:block;border-radius:7px;overflow:hidden;background:#fffdf7;box-shadow:0 8px 16px #0009;opacity:0;pointer-events:none;animation:collectCardToShoe .56s cubic-bezier(.55,.04,.82,.22) both;animation-delay:var(--collect-delay,0ms);will-change:transform,opacity}
.card-collect-token img{display:block;width:100%;height:100%;object-fit:fill}
@keyframes collectCardToShoe{0%{opacity:0;transform:translate3d(var(--start-x),var(--start-y),0) rotate(0) scale(1)}12%{opacity:1;transform:translate3d(var(--start-x),var(--start-y),0) rotate(var(--collect-rotation)) scale(1.015)}55%{opacity:.9;transform:translate3d(var(--mid-x),var(--mid-y),0) rotate(var(--collect-mid-rotation)) scale(.68)}100%{opacity:0;transform:translate3d(var(--end-x),var(--end-y),0) rotate(0) scale(.12)}}
@media(prefers-reduced-motion:reduce){.card-collect-token{display:none!important;animation:none!important}}
