:root{
  --bg:#050814;--panel:#0b1224;--panel2:#111a31;--panel3:#172342;--text:#f7f9ff;
  --muted:#8f9dbd;--blue:#287dff;--cyan:#52ddff;--purple:#8d5cff;--green:#45e68a;
  --red:#ff5578;--gold:#ffc85a;--border:rgba(137,169,255,.16);--side:232px;--chat:326px;--top:78px;
  --radius:22px;--shadow:0 28px 90px rgba(0,0,0,.38)
}
*{box-sizing:border-box}html{color-scheme:dark}body{margin:0;min-height:100vh;overflow-x:hidden;background:
radial-gradient(circle at 16% -8%,rgba(48,84,255,.22),transparent 32%),
radial-gradient(circle at 74% 0,rgba(38,210,255,.1),transparent 27%),var(--bg);color:var(--text);
font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,select{font:inherit}button{color:inherit}button,input,select{outline:none}button{cursor:pointer}.hidden{display:none!important}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
a{color:inherit;text-decoration:none}.eyebrow{margin:0;color:var(--cyan);font-size:11px;font-weight:900;letter-spacing:1.7px}
.tiny-copy,.input-help{color:var(--muted);font-size:11px;line-height:1.5}.centered{text-align:center}
.auth-overlay{position:fixed;inset:0;z-index:999;display:grid;place-items:center;padding:25px;background:
radial-gradient(circle at 25% 20%,rgba(40,125,255,.2),transparent 30%),
radial-gradient(circle at 78% 72%,rgba(141,92,255,.17),transparent 30%),#040712}
.auth-shell{width:min(1040px,96vw);min-height:610px;display:grid;grid-template-columns:1.1fr .9fr;overflow:hidden;border:1px solid var(--border);
border-radius:32px;background:#091021;box-shadow:var(--shadow),0 0 100px rgba(40,125,255,.13)}
.auth-art{position:relative;overflow:hidden;padding:55px;background:linear-gradient(145deg,#10295a,#0b142b 58%,#321d5e)}
.auth-grid{position:absolute;inset:0;background-image:linear-gradient(#ffffff08 1px,transparent 1px),linear-gradient(90deg,#ffffff08 1px,transparent 1px);background-size:32px 32px;mask-image:linear-gradient(#000,transparent 90%)}
.auth-pet{position:absolute;top:35%;left:50%;width:190px;height:190px;display:grid;place-items:center;border:1px solid #55dcff66;border-radius:56px;
background:linear-gradient(145deg,#2548a7,#6c3da8);box-shadow:0 0 100px #287dff66;transform:translate(-50%,-50%) rotate(-6deg);font-size:90px}
.auth-gem{position:absolute;filter:drop-shadow(0 0 18px #55dcff);animation:float 3.2s ease-in-out infinite}.gem-a{top:16%;right:13%;font-size:46px}.gem-b{top:53%;left:14%;font-size:34px;animation-delay:-1.1s}
.auth-art-copy{position:absolute;left:55px;right:55px;bottom:52px}.auth-art-copy h1{margin:11px 0 15px;font-size:52px;line-height:.98;letter-spacing:-3px}.auth-art-copy h1 span{background:linear-gradient(90deg,var(--cyan),#b0a0ff);-webkit-background-clip:text;background-clip:text;color:transparent}
.auth-art-copy>p:last-child{max-width:560px;color:#b8c5df;line-height:1.65}
.auth-card{display:grid;align-items:center;padding:50px;background:linear-gradient(160deg,#0d1529,#080d1c)}
.auth-step{display:none}.auth-step.active{display:block;animation:fadeUp .25s ease}.logo-lockup{display:flex;align-items:center;gap:10px;font-size:24px;font-weight:900;letter-spacing:-1px}.logo-lockup.large{margin-bottom:38px}.logo-lockup b{color:var(--cyan)}
.logo-gem{width:39px;height:39px;display:grid;place-items:center;border:1px solid #52ddff44;border-radius:13px;background:linear-gradient(145deg,#173c86,#4f3287);box-shadow:0 0 28px #287dff44}
.auth-kicker{margin:0;color:var(--purple);font-size:11px;font-weight:900;letter-spacing:1.5px}.auth-card h2{margin:8px 0 10px;font-size:34px;letter-spacing:-1.5px}.auth-copy{margin:0 0 25px;color:var(--muted);line-height:1.6}
.button{min-height:48px;display:inline-flex;align-items:center;justify-content:center;padding:0 20px;border:1px solid transparent;border-radius:15px;font-weight:900;cursor:pointer;transition:.18s}
.button:hover{transform:translateY(-1px);filter:brightness(1.07)}.button.primary{background:linear-gradient(135deg,var(--blue),#655dff);box-shadow:0 12px 30px #287dff33}
.button.secondary{border-color:var(--border);background:#ffffff09}.button.ghost{border-color:#52ddff2c;background:#52ddff0e}.button.success{background:linear-gradient(135deg,#25c96c,#65f3a5);color:#04160d}
.button.gold{background:linear-gradient(135deg,#e7a72e,var(--gold));color:#1b1204}.button.wide{width:100%;margin-top:10px}.safe-note{display:flex;align-items:center;gap:10px;margin-top:20px;padding:12px;border:1px solid #45e68a22;border-radius:14px;background:#45e68a0b;color:#aac9b7;font-size:11px}
.safe-note p{margin:0}.back-button{margin:0 0 28px;padding:0;border:0;background:none;color:var(--muted)}label{display:block;margin:14px 0 8px;color:#c8d3ed;font-size:12px;font-weight:800}
.text-field,.amount-input{min-height:50px;display:flex;align-items:center;border:1px solid var(--border);border-radius:14px;background:#03071388}.text-field>span,.amount-input>span{margin-left:14px;color:var(--cyan);font-weight:900}
.text-field input,.amount-input input{min-width:0;flex:1;height:48px;border:0;background:transparent;padding:0 11px;color:var(--text);font-weight:800}.amount-input button{height:34px;margin-right:6px;padding:0 10px;border:1px solid var(--border);border-radius:10px;background:#ffffff08}
.form-error{min-height:19px;margin:12px 0 0;color:#ff8ba2;font-size:12px}.linked-user{display:flex;align-items:center;gap:12px;margin:18px 0;padding:13px;border:1px solid var(--border);border-radius:16px;background:#ffffff07}
.linked-user>div:last-child{display:grid}.linked-user span{color:var(--muted);font-size:11px}.phrase-box{display:grid;gap:7px;margin:16px 0;padding:17px;border:1px solid #52ddff33;border-radius:17px;background:linear-gradient(135deg,#287dff18,#8d5cff12)}
.phrase-box>span{color:var(--muted);font-size:9px;font-weight:900;letter-spacing:1.3px}.phrase-box strong{font-size:18px;line-height:1.45}.mini-button{min-height:35px;padding:0 12px;border:1px solid var(--border);border-radius:11px;background:#ffffff08;font-size:11px;font-weight:800}
.avatar{width:46px;height:46px;display:grid;place-items:center;flex:none;border:1px solid #52ddff55;border-radius:15px;background:linear-gradient(145deg,#2868df,#854fe8);font-weight:900;background-size:cover;background-position:center}
.avatar.mini{width:39px;height:39px;border-radius:13px}.app{min-height:100vh}.topbar{position:fixed;inset:0 0 auto;z-index:60;height:var(--top);display:grid;grid-template-columns:var(--side) 1fr var(--chat);align-items:center;border-bottom:1px solid var(--border);background:#060a17df;backdrop-filter:blur(20px)}
.icon-button{width:42px;height:42px;border:1px solid var(--border);border-radius:13px;background:#ffffff08}.hamburger{position:absolute;left:18px}.hamburger i{display:block;width:18px;height:2px;margin:4px auto;border-radius:9px;background:#dce6ff}
.brand-button{width:max-content;display:flex;align-items:center;gap:10px;margin-left:72px;border:0;background:none;font-size:24px;font-weight:900;letter-spacing:-1px}.brand-button b{color:var(--cyan)}
.balance-chip{justify-self:center;min-width:235px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:0 12px;padding:10px 17px;border:1px solid var(--border);border-radius:17px;background:linear-gradient(135deg,#287dff22,#8d5cff13)}
.balance-chip>span{color:var(--muted);font-size:9px;font-weight:900;letter-spacing:1.5px}.balance-chip strong{font-size:22px}.balance-chip em{grid-column:2;grid-row:1/3;padding:7px 9px;border-radius:99px;background:#52ddff17;color:#b9eeff;font-size:10px;font-style:normal;font-weight:900}
.user-chip{justify-self:end;width:var(--chat);height:100%;display:flex;align-items:center;gap:11px;padding:0 22px;border:0;border-left:1px solid var(--border);background:none;text-align:left}.user-text{display:grid;flex:1}.user-text small{color:var(--green)}
.user-menu{position:fixed;z-index:100;top:68px;right:18px;width:215px;padding:11px;border:1px solid var(--border);border-radius:15px;background:#10182deF;box-shadow:var(--shadow)}.user-menu>div{display:grid;padding:9px}.user-menu span{color:var(--muted);font-size:11px}
.user-menu button{width:100%;padding:10px;border:0;border-radius:10px;background:transparent;text-align:left}.user-menu button:hover{background:#ffffff08}
.sidebar{position:fixed;inset:var(--top) auto 0 0;z-index:50;width:var(--side);display:flex;flex-direction:column;justify-content:space-between;padding:18px 13px;border-right:1px solid var(--border);background:#080d1dde;backdrop-filter:blur(18px);transition:.25s}
.nav-list{display:grid;gap:7px}.nav-heading{margin:18px 13px 5px;color:#586681;font-size:9px;font-weight:900;letter-spacing:1.5px}.nav-button{min-height:52px;display:grid;grid-template-columns:42px 1fr;align-items:center;border:1px solid transparent;border-radius:15px;background:transparent;color:var(--muted);text-align:left}
.nav-button span{text-align:center;font-size:18px}.nav-button b{font-size:13px}.nav-button:hover,.nav-button.active{border-color:#52ddff20;background:linear-gradient(90deg,#287dff30,#287dff07);color:var(--text)}
.sidebar-card{display:flex;align-items:center;gap:11px;padding:12px;border:1px solid var(--border);border-radius:17px;background:linear-gradient(135deg,#8d5cff1b,#52ddff0d)}.sidebar-pet{width:44px;height:44px;display:grid;place-items:center;flex:none;border-radius:14px;background:#ffffff0c;font-size:22px}.sidebar-card>div:last-child{display:grid}.sidebar-card span{color:var(--muted);font-size:10px}
.main{min-height:100vh;margin-left:var(--side);margin-right:var(--chat);padding:calc(var(--top) + 27px) 27px 50px;transition:.25s}.page{display:none;max-width:1180px;margin:auto}.page.active{display:block;animation:fadeUp .25s ease}
@keyframes fadeUp{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}@keyframes float{50%{transform:translateY(-13px) rotate(8deg)}}.hero{position:relative;min-height:312px;display:grid;grid-template-columns:1.2fr .8fr;overflow:hidden;padding:42px;border:1px solid #6699ff32;border-radius:30px;background:
radial-gradient(circle at 78% 50%,#52ddff1d,transparent 24%),linear-gradient(135deg,#193770,#0c1428 58%,#301c58);box-shadow:var(--shadow)}
.hero:after{content:"";position:absolute;inset:0;background-image:linear-gradient(#ffffff05 1px,transparent 1px),linear-gradient(90deg,#ffffff05 1px,transparent 1px);background-size:30px 30px;mask-image:linear-gradient(90deg,#000,transparent 85%);pointer-events:none}
.hero-copy{position:relative;z-index:2}.hero-copy h1{margin:13px 0 13px;font-size:clamp(42px,5vw,64px);line-height:.96;letter-spacing:-3.5px}.hero-copy h1 span{background:linear-gradient(90deg,var(--cyan),#9eafff,#cf9dff);-webkit-background-clip:text;background-clip:text;color:transparent}.hero-copy>p:not(.eyebrow){max-width:620px;color:#b5c2df;line-height:1.65}
.hero-actions{display:flex;gap:10px;margin-top:20px}.hero-visual{position:relative;z-index:1}.hero-pet{position:absolute;top:50%;left:52%;width:165px;height:165px;display:grid;place-items:center;border:1px solid #52ddff55;border-radius:50px;background:linear-gradient(145deg,#2547a5,#6a3aa4);box-shadow:0 0 95px #287dff55;transform:translate(-50%,-50%) rotate(-5deg);font-size:78px}
.float-gem,.float-coin{position:absolute;filter:drop-shadow(0 0 18px #52ddff);animation:float 3s ease-in-out infinite}.float-gem.one{top:19px;right:29px;font-size:43px}.float-gem.two{left:17px;bottom:12px;font-size:31px;animation-delay:-1.2s}.float-coin{right:4px;bottom:28px;font-size:39px;animation-delay:-.7s}
.section-header{display:flex;justify-content:space-between;align-items:end;margin:34px 0 16px}.section-header.compact{margin-top:28px}.section-header h2{margin:4px 0 0}.section-note{color:var(--muted);font-size:11px}.game-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.game-card{overflow:hidden;padding:0;border:1px solid var(--border);border-radius:23px;background:var(--panel);text-align:left}
.game-card:hover{transform:translateY(-2px);border-color:#52ddff44}.game-art{position:relative;height:150px;display:flex;align-items:center;justify-content:center;gap:28px;overflow:hidden;font-size:60px}.game-art:after{content:"";position:absolute;inset:0;background-image:linear-gradient(#ffffff07 1px,transparent 1px),linear-gradient(90deg,#ffffff07 1px,transparent 1px);background-size:27px 27px}
.mines-card .game-art{background:radial-gradient(circle at 20% 20%,#52ddff44,transparent 24%),linear-gradient(135deg,#10295a,#321d5c)}.blackjack-card .game-art{background:radial-gradient(circle at 70% 20%,#45e68a2b,transparent 24%),linear-gradient(135deg,#0c3c35,#152134)}.coinflip-card .game-art{background:radial-gradient(circle at 50% 40%,#ffc85a30,transparent 28%),linear-gradient(135deg,#4a2b0d,#221832)}
.coinflip-card .game-art span{width:75px;height:75px;display:grid;place-items:center;border:6px solid #ffd477;border-radius:50%;background:linear-gradient(145deg,#f2b540,#9d6314);color:#271704;font-size:28px;font-weight:1000;box-shadow:0 10px 25px #0006}
.game-info{min-height:79px;display:grid;grid-template-columns:1fr auto;align-items:center;padding:13px 16px}.game-info small{color:var(--cyan);font-size:8px;font-weight:900;letter-spacing:1px}.game-info h3,.game-info p{margin:2px 0}.game-info p{color:var(--muted);font-size:11px}.game-info i{width:37px;height:37px;display:grid;place-items:center;border-radius:12px;background:#287dff1c;color:var(--cyan);font-style:normal}
.home-lower-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px;margin-top:17px}.feature-panel{position:relative;min-height:175px;display:grid;grid-template-columns:auto 1fr;align-content:center;gap:16px;padding:24px;border:1px solid var(--border);border-radius:23px;background:#0d1427d9}.feature-icon{width:60px;height:60px;display:grid;place-items:center;border-radius:19px;background:#ffffff0b;font-size:29px}.feature-panel h3,.feature-panel p{margin:4px 0}.feature-panel>div:nth-child(2)>p:last-child{color:var(--muted);font-size:12px;line-height:1.5}.text-button{grid-column:2;width:max-content;padding:0;border:0;background:none;color:var(--cyan);font-size:11px;font-weight:900}
.activity-list{overflow:hidden;border:1px solid var(--border);border-radius:20px;background:#0d1427c9}.activity-row{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid #ffffff08}.activity-row:last-child{border-bottom:0}.activity-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:#ffffff0a}.activity-row h4,.activity-row p{margin:0}.activity-row p{color:var(--muted);font-size:10px}.activity-amount{font-weight:900}.activity-amount.positive{color:var(--green)}.activity-amount.negative{color:#ff829a}
.empty-state{display:grid;place-items:center;min-height:100px;color:var(--muted);font-size:12px}.page-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:22px}.page-heading h1{margin:4px 0;font-size:45px;letter-spacing:-2px}.page-heading>div:first-child>p:last-child{margin:0;color:var(--muted)}
.page-balance{min-width:185px;display:grid;padding:13px 17px;border:1px solid var(--border);border-radius:17px;background:#0d1427dc}.page-balance span,.page-balance small{color:var(--muted);font-size:10px}.page-balance strong{font-size:23px}
.control-panel,.game-panel,.info-panel{border:1px solid var(--border);border-radius:23px;background:#0d1427e8;box-shadow:var(--shadow)}.control-panel{padding:21px}select,.two-fields input{width:100%;height:49px;border:1px solid var(--border);border-radius:14px;background:#03071388;padding:0 13px;color:var(--text);font-weight:800}
.metric-list{display:grid;gap:10px;margin:20px 0}.metric-list div{display:flex;justify-content:space-between;padding-bottom:9px;border-bottom:1px solid #ffffff08}.metric-list span{color:var(--muted);font-size:11px}.game-message{min-height:19px;margin:13px 0 0;color:var(--muted);font-size:11px;text-align:center}
.mines-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:20px}.mines-panel{padding:19px}.game-panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;color:var(--muted);font-size:11px}.game-panel-head>div{display:flex;align-items:center;gap:8px;color:var(--text)}
.live-dot{width:9px;height:9px;display:inline-block;border-radius:50%;background:var(--green);box-shadow:0 0 14px #45e68acc}.mines-grid{display:grid;grid-template-columns:repeat(5,minmax(52px,1fr));gap:10px}.mine-tile{aspect-ratio:1;display:grid;place-items:center;border:1px solid #749cff22;border-radius:17px;background:linear-gradient(145deg,#1c2c52,#10192f);box-shadow:inset 0 1px #ffffff08,0 8px 20px #0003;font-size:clamp(25px,4vw,44px)}
.mine-tile:hover:not(:disabled){transform:translateY(-2px);border-color:#52ddff66}.mine-tile.safe{background:radial-gradient(circle,#52ddff33,transparent 62%),linear-gradient(145deg,#173c68,#101b36);border-color:#52ddff66;animation:pop .25s}.mine-tile.bomb{background:radial-gradient(circle,#ff55783b,transparent 62%),linear-gradient(145deg,#572139,#281321);border-color:#ff557888;animation:shake .35s}.mine-tile:disabled{cursor:default}
@keyframes pop{50%{transform:scale(1.08)}}@keyframes shake{25%,75%{transform:translateX(-4px)}50%{transform:translateX(4px)}}.blackjack-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px}.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}.action-grid button:last-child{grid-column:1/3}
.blackjack-table{position:relative;min-height:610px;display:grid;grid-template-rows:1fr 110px 1fr;overflow:hidden;padding:28px;border:1px solid #45e68a33;border-radius:30px;background:radial-gradient(ellipse at center,#165449 0,#0d302b 45%,#071c1b 100%);box-shadow:var(--shadow),inset 0 0 70px #0007}.blackjack-table:before{content:"";position:absolute;inset:18px;border:2px solid #dcb45455;border-radius:105px}
.table-glow{position:absolute;inset:0;background:radial-gradient(circle at 50% 50%,#45e68a18,transparent 55%)}.hand-block{position:relative;z-index:2;display:grid;align-content:center;justify-items:center}.hand-title{display:flex;gap:15px;align-items:center;margin-bottom:14px;color:#d8e9df;font-size:11px;font-weight:900;letter-spacing:1px}.hand-title strong{padding:5px 8px;border-radius:9px;background:#0006;color:var(--gold)}
.card-hand{display:flex;justify-content:center;min-height:128px}.playing-card{position:relative;width:86px;height:122px;display:grid;place-items:center;margin-left:-18px;border:1px solid #0003;border-radius:12px;background:#f7f4ed;color:#10131d;box-shadow:0 12px 25px #0007;transform:rotate(-2deg);font-size:35px;font-weight:1000}.playing-card:first-child{margin-left:0}.playing-card.red{color:#d52b46}.playing-card .rank{position:absolute;top:7px;left:8px;display:grid;font-size:17px;line-height:.85}.playing-card .suit{font-size:38px}.playing-card.card-back{background:linear-gradient(135deg,#17427d,#673c9a);color:#fff;border:5px solid #e8e8ff}.playing-card.placeholder{background:#ffffff12;color:#ffffff50;border:1px dashed #ffffff33}
.table-center{position:relative;z-index:2;display:grid;place-items:center}.blackjack-logo{display:grid;text-align:center;font-size:24px;font-weight:1000;letter-spacing:-1px;color:#ffffff80}.blackjack-logo span{color:#52ddff99}.blackjack-logo small{font-size:8px;letter-spacing:3px}
.coinflip-top{display:grid;grid-template-columns:330px minmax(0,1fr);gap:20px}.side-picker{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:5px 0 15px}.side-button{min-height:95px;display:grid;place-items:center;gap:3px;border:1px solid var(--border);border-radius:17px;background:#ffffff06}.side-button span{width:44px;height:44px;display:grid;place-items:center;border:4px solid #ffd475;border-radius:50%;background:linear-gradient(145deg,#efb33e,#9f6519);color:#2a1904;font-weight:1000}.side-button.active{border-color:#ffc85a88;background:#ffc85a0e;box-shadow:0 0 30px #ffc85a18}
.coin-stage{min-height:350px;display:grid;align-content:center;justify-items:center;border:1px solid var(--border);border-radius:25px;background:radial-gradient(circle,#ffc85a1f,transparent 40%),linear-gradient(135deg,#1e162c,#0d1427);box-shadow:var(--shadow);perspective:1000px}.big-coin{position:relative;width:155px;height:155px;transform-style:preserve-3d;transition:transform 1.3s cubic-bezier(.15,.75,.25,1)}.big-coin.flipping-heads{transform:rotateY(1800deg)}.big-coin.flipping-tails{transform:rotateY(1980deg)}.coin-face{position:absolute;inset:0;display:grid;place-items:center;border:11px solid #ffd77d;border-radius:50%;background:radial-gradient(circle at 35% 28%,#ffe6a0,#d89524 66%,#87510d);color:#392104;box-shadow:0 18px 40px #0008,inset 0 0 0 4px #9b6115;font-size:58px;font-weight:1000;backface-visibility:hidden}.coin-face.back{transform:rotateY(180deg)}.coin-stage p{margin:28px 0 3px;font-size:19px;font-weight:900}.coin-stage>span{color:var(--muted);font-size:11px}
.lobby-list{display:grid;gap:10px}.lobby-row{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:13px;padding:13px 15px;border:1px solid var(--border);border-radius:17px;background:#0d1427dc}.lobby-coin{width:46px;height:46px;display:grid;place-items:center;border:4px solid #ffd475;border-radius:50%;background:linear-gradient(145deg,#efb33e,#9f6519);color:#281703;font-weight:1000}.lobby-row h4,.lobby-row p{margin:0}.lobby-row p{color:var(--muted);font-size:10px}.lobby-bet{font-size:15px;font-weight:900}.lobby-actions{display:flex;gap:7px}.lobby-actions button{min-height:35px;padding:0 11px;border:1px solid var(--border);border-radius:10px;background:#ffffff08;font-size:10px;font-weight:900}.lobby-actions .bot{background:#8d5cff22;color:#d2c4ff}
.affiliate-hero{min-height:275px;display:grid;grid-template-columns:1.25fr .75fr;align-items:center;overflow:hidden;padding:35px;border:1px solid #8d5cff33;border-radius:27px;background:radial-gradient(circle at 80% 50%,#8d5cff2b,transparent 28%),linear-gradient(135deg,#161c39,#0d1428 65%,#2b184d);box-shadow:var(--shadow)}.affiliate-hero h2{margin:8px 0;font-size:38px;letter-spacing:-2px}.affiliate-hero p:not(.eyebrow){max-width:650px;color:var(--muted);line-height:1.6}.copy-row{display:grid;grid-template-columns:1fr auto;gap:9px;margin-top:20px}.copy-row input{min-width:0;border:1px solid var(--border);border-radius:14px;background:#050918aa;padding:0 13px;color:#c8d4ef}
.affiliate-art{position:relative;display:grid;place-items:center;font-size:100px;filter:drop-shadow(0 0 40px #8d5cff66)}.affiliate-art span{position:absolute;right:12%;bottom:5%;font-size:42px}.affiliate-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-top:17px}.affiliate-stats article{display:grid;grid-template-columns:auto 1fr;gap:0 10px;align-items:center;padding:17px;border:1px solid var(--border);border-radius:19px;background:#0d1427d5}.affiliate-stats article>span{grid-row:1/3;width:43px;height:43px;display:grid;place-items:center;border-radius:14px;background:#ffffff0a}.affiliate-stats p,.affiliate-stats strong{margin:0}.affiliate-stats p{color:var(--muted);font-size:10px}.affiliate-stats strong{font-size:20px}.info-panel{margin-top:18px;padding:25px}.info-panel h3{margin-top:0}.steps-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.steps-grid>div{padding:17px;border:1px solid #ffffff0b;border-radius:17px;background:#ffffff05}.steps-grid b{width:28px;height:28px;display:grid;place-items:center;margin-bottom:11px;border-radius:9px;background:#287dff26;color:var(--cyan)}.steps-grid strong{display:block}.steps-grid p{margin-bottom:0;color:var(--muted);font-size:11px;line-height:1.5}
.giveaway-layout{display:grid;grid-template-columns:330px minmax(0,1fr);gap:20px}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.giveaway-list{display:grid;gap:11px}.giveaway-card{position:relative;overflow:hidden;padding:17px;border:1px solid var(--border);border-radius:19px;background:linear-gradient(135deg,#111a31,#0c1326)}.giveaway-card:before{content:"🎁";position:absolute;right:18px;top:8px;font-size:55px;opacity:.13}.giveaway-card-head{display:flex;justify-content:space-between;gap:12px}.giveaway-card h3,.giveaway-card p{margin:0}.giveaway-card p{color:var(--muted);font-size:10px}.giveaway-badge{height:max-content;padding:5px 8px;border-radius:99px;background:#45e68a1c;color:#7bf2ae;font-size:9px;font-weight:900}.giveaway-badge.finished{background:#ffffff0c;color:var(--muted)}.giveaway-prize{display:flex;align-items:end;gap:7px;margin:17px 0}.giveaway-prize strong{font-size:27px}.giveaway-prize span{color:var(--cyan);font-size:11px;font-weight:900}.giveaway-footer{display:flex;justify-content:space-between;align-items:center;padding-top:11px;border-top:1px solid #ffffff0b}.giveaway-footer button{min-height:35px;padding:0 12px;border:0;border-radius:10px;background:linear-gradient(135deg,var(--blue),#655dff);font-size:10px;font-weight:900}
.chat-panel{position:fixed;inset:var(--top) 0 0 auto;z-index:45;width:var(--chat);display:grid;grid-template-rows:auto 1fr auto auto;border-left:1px solid var(--border);background:#080d1de5;backdrop-filter:blur(18px)}.chat-head{display:flex;justify-content:space-between;align-items:center;padding:18px 17px;border-bottom:1px solid var(--border)}.chat-head>div{display:flex;align-items:center;gap:8px}.chat-head>span{color:var(--muted);font-size:10px}
.chat-messages{overflow-y:auto;padding:15px}.chat-message{display:grid;grid-template-columns:37px 1fr;gap:10px;margin-bottom:17px}.chat-message .avatar{width:37px;height:37px;border-radius:12px;font-size:12px}.chat-meta{display:flex;justify-content:space-between}.chat-meta strong{font-size:11px}.chat-meta span{color:var(--muted);font-size:9px}.chat-message p{margin:3px 0 0;color:#c0c9df;font-size:11px;line-height:1.45;overflow-wrap:anywhere}.chat-form{display:grid;grid-template-columns:1fr 43px;gap:8px;padding:11px 13px 7px;border-top:1px solid var(--border)}.chat-form input{min-width:0;height:43px;border:1px solid var(--border);border-radius:13px;background:#03071399;padding:0 11px;color:var(--text)}.chat-form button{border:0;border-radius:13px;background:linear-gradient(135deg,var(--blue),#655dff)}.chat-foot{margin:0;padding:0 13px 11px;color:#5d6983;font-size:8px;text-align:center}
.toast{position:fixed;left:50%;bottom:25px;z-index:1100;max-width:min(90vw,450px);padding:12px 17px;border:1px solid var(--border);border-radius:14px;background:#121b32f4;box-shadow:var(--shadow);opacity:0;pointer-events:none;transform:translate(-50%,12px);transition:.23s}.toast.show{opacity:1;transform:translate(-50%,0)}
body.sidebar-collapsed{--side:76px}body.sidebar-collapsed .nav-button{grid-template-columns:1fr}body.sidebar-collapsed .nav-button b,body.sidebar-collapsed .nav-heading,body.sidebar-collapsed .sidebar-card>div:last-child,body.sidebar-collapsed .brand-button>span:last-child{display:none}body.sidebar-collapsed .sidebar-card{justify-content:center;padding:10px 0}
@media(max-width:1180px){:root{--chat:288px}.game-cards{grid-template-columns:1fr 1fr}.game-card:last-child{grid-column:1/3}.hero{grid-template-columns:1fr}.hero-visual{display:none}.affiliate-stats{grid-template-columns:1fr 1fr}.steps-grid{grid-template-columns:1fr 1fr}}
@media(max-width:920px){:root{--chat:0px;--side:76px}.topbar{grid-template-columns:76px 1fr auto}.brand-button>span:last-child,.nav-button b,.nav-heading,.sidebar-card>div:last-child,.user-text{display:none}.brand-button{margin-left:65px}.user-chip{width:auto;border-left:0;padding:0 13px}.main{margin-right:0}.chat-panel{position:static;width:auto;min-height:430px;margin-left:var(--side);border-top:1px solid var(--border);border-left:0}.chat-messages{max-height:290px}.mines-layout,.blackjack-layout,.coinflip-top,.giveaway-layout{grid-template-columns:1fr}.home-lower-grid{grid-template-columns:1fr}}
@media(max-width:650px){:root{--top:70px}.auth-overlay{padding:0}.auth-shell{width:100%;min-height:100vh;grid-template-columns:1fr;border:0;border-radius:0}.auth-art{display:none}.auth-card{padding:28px 23px}.topbar{grid-template-columns:62px 1fr 55px}.brand-button{display:none}.hamburger{left:10px}.balance-chip{min-width:0;width:min(65vw,230px);padding:8px 11px}.balance-chip em{display:none}.user-chip{padding:0 8px}.user-chip>span:last-child{display:none}.sidebar{width:230px;transform:translateX(-100%);box-shadow:var(--shadow)}body.mobile-menu-open .sidebar{transform:none}.sidebar .nav-button{grid-template-columns:42px 1fr}.sidebar .nav-button b,.sidebar .nav-heading,.sidebar .sidebar-card>div:last-child{display:initial}.main,.chat-panel{margin-left:0}.main{padding:calc(var(--top) + 17px) 13px 34px}.hero{min-height:0;padding:27px 21px}.hero-copy h1{font-size:41px}.hero-actions{flex-direction:column}.game-cards{grid-template-columns:1fr}.game-card:last-child{grid-column:auto}.page-heading{align-items:start;flex-direction:column}.page-balance{width:100%}.mines-grid{gap:6px}.mine-tile{border-radius:11px}.blackjack-table{min-height:560px;padding:16px}.playing-card{width:72px;height:103px}.affiliate-hero{grid-template-columns:1fr;padding:25px}.affiliate-art{display:none}.affiliate-stats,.steps-grid{grid-template-columns:1fr}.copy-row{grid-template-columns:1fr}.lobby-row{grid-template-columns:auto 1fr}.lobby-bet,.lobby-actions{grid-column:2}.two-fields{grid-template-columns:1fr 1fr}}


/* ======================= VERSION 3 ADDITIONS ======================= */

.avatar,
#link-avatar {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.game-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-card:last-child {
  grid-column: auto;
}

.hilo-card .game-art {
  background:
    radial-gradient(circle at 50% 40%, rgba(82, 221, 255, .24), transparent 30%),
    linear-gradient(135deg, #132f54, #15213d 52%, #2a1a50);
}

.hilo-card .game-art span:first-child,
.hilo-card .game-art span:last-child {
  color: var(--cyan);
  font-size: 52px;
  font-weight: 1000;
  filter: drop-shadow(0 0 16px rgba(82, 221, 255, .5));
}

.hilo-card .game-art span:nth-child(2) {
  color: #fff;
  font-size: 68px;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .42));
}

.coinflip-card .game-art span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  font-weight: 1000;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .42);
}

.coinflip-card .game-art .purple-token {
  border: 6px solid #c8a5ff;
  background: linear-gradient(145deg, #9d6cff, #5b2eaf);
}

.coinflip-card .game-art .green-token {
  border: 6px solid #9ff5bf;
  background: linear-gradient(145deg, #55e58d, #178a4a);
}

/* Blackjack result glow */
.blackjack-table.outcome-win .playing-card:not(.placeholder) {
  border-color: #71f6a9;
  box-shadow:
    0 0 0 2px rgba(69, 230, 138, .48),
    0 0 28px rgba(69, 230, 138, .72),
    0 12px 25px rgba(0, 0, 0, .66);
}

.blackjack-table.outcome-loss .playing-card:not(.placeholder) {
  border-color: #ff7892;
  box-shadow:
    0 0 0 2px rgba(255, 85, 120, .48),
    0 0 28px rgba(255, 85, 120, .72),
    0 12px 25px rgba(0, 0, 0, .66);
}

.blackjack-table.outcome-push .playing-card:not(.placeholder) {
  border-color: #ffd984;
  box-shadow:
    0 0 0 2px rgba(255, 200, 90, .38),
    0 0 22px rgba(255, 200, 90, .48),
    0 12px 25px rgba(0, 0, 0, .66);
}

/* Hilo */
.hilo-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
}

.hilo-panel {
  padding: 20px;
}

.hilo-table {
  min-height: 330px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border: 1px solid rgba(82, 221, 255, .16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 70% 50%, rgba(82, 221, 255, .14), transparent 28%),
    radial-gradient(circle at 30% 50%, rgba(141, 92, 255, .12), transparent 25%),
    linear-gradient(135deg, #0b1b34, #10172c 58%, #21163c);
}

.hilo-card-zone {
  display: grid;
  justify-items: center;
  gap: 13px;
}

.hilo-card-zone > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.hilo-card-zone.previous {
  opacity: .72;
}

.hilo-card-zone.current {
  transform: scale(1.08);
}

.hilo-playing-card {
  position: relative;
  width: 130px;
  height: 184px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .65);
  border-radius: 18px;
  background: #f7f4ed;
  color: #10131d;
  box-shadow: 0 20px 42px rgba(0, 0, 0, .5);
  font-size: 51px;
  font-weight: 1000;
  transition: .25s ease;
}

.hilo-playing-card.red {
  color: #d72d49;
}

.hilo-playing-card .rank {
  position: absolute;
  top: 11px;
  left: 12px;
  display: grid;
  font-size: 24px;
  line-height: .82;
}

.hilo-playing-card .rank small {
  font-size: 16px;
}

.hilo-playing-card .suit {
  font-size: 58px;
}

.hilo-playing-card.placeholder {
  border: 1px dashed rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .28);
}

.hilo-playing-card.card-back {
  border: 5px solid #e8e8ff;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .08) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .08) 75%),
    linear-gradient(135deg, #17427d, #673c9a);
  background-size: 22px 22px;
  color: #fff;
}

.hilo-playing-card.result-win {
  border-color: #71f6a9;
  box-shadow:
    0 0 0 3px rgba(69, 230, 138, .4),
    0 0 36px rgba(69, 230, 138, .7),
    0 20px 42px rgba(0, 0, 0, .5);
  animation: pop .28s ease;
}

.hilo-playing-card.result-loss {
  border-color: #ff7892;
  box-shadow:
    0 0 0 3px rgba(255, 85, 120, .4),
    0 0 36px rgba(255, 85, 120, .72),
    0 20px 42px rgba(0, 0, 0, .5);
  animation: shake .35s ease;
}

.hilo-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 15px;
}

.hilo-choice {
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(255, 255, 255, .045);
  transition: .18s ease;
}

.hilo-choice:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(82, 221, 255, .46);
}

.hilo-choice:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.hilo-choice .choice-arrow {
  color: var(--cyan);
  font-size: 27px;
  font-weight: 1000;
}

.hilo-choice strong {
  font-size: 14px;
}

.hilo-choice small {
  color: var(--muted);
  font-size: 9px;
}

.hilo-choice small b {
  color: #c8d8ff;
}

.hilo-choice em {
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

/* Purple and green coinflip */
.side-button.purple span,
.lobby-coin.purple {
  border-color: #caaaff;
  background: linear-gradient(145deg, #9e6cff, #582aa7);
  color: #fff;
}

.side-button.green span,
.lobby-coin.green {
  border-color: #a7f7c5;
  background: linear-gradient(145deg, #59e990, #178746);
  color: #fff;
}

.side-button.purple.active {
  border-color: rgba(168, 117, 255, .8);
  background: rgba(141, 92, 255, .13);
  box-shadow: 0 0 30px rgba(141, 92, 255, .2);
}

.side-button.green.active {
  border-color: rgba(69, 230, 138, .8);
  background: rgba(69, 230, 138, .11);
  box-shadow: 0 0 30px rgba(69, 230, 138, .18);
}

.coin-face.front {
  border-color: #d4b7ff;
  background: radial-gradient(circle at 35% 28%, #d7c2ff, #8c58e6 64%, #4f268f);
  color: #fff;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .5),
    inset 0 0 0 4px #5d2ba8;
}

.coin-face.back {
  border-color: #b0f8ca;
  background: radial-gradient(circle at 35% 28%, #b9f9d0, #44d680 64%, #14733b);
  color: #fff;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .5),
    inset 0 0 0 4px #16753c;
}

.big-coin.flipping-purple {
  transform: rotateY(1800deg);
}

.big-coin.flipping-green {
  transform: rotateY(1980deg);
}

/* Giveaway pinned above global chat */
.chat-panel {
  grid-template-rows: auto auto 1fr auto auto;
}

.chat-giveaway {
  margin: 11px 12px 0;
  padding: 13px;
  border: 1px solid rgba(141, 92, 255, .34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(82, 221, 255, .16), transparent 32%),
    linear-gradient(135deg, rgba(141, 92, 255, .18), rgba(40, 125, 255, .08));
  box-shadow: 0 0 30px rgba(141, 92, 255, .11);
}

.chat-giveaway-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.chat-giveaway-top span {
  color: #cfbdff;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: 1.1px;
}

.chat-giveaway-top b {
  color: var(--cyan);
  font-size: 9px;
}

.chat-giveaway > strong {
  display: block;
  font-size: 12px;
}

.chat-giveaway-prize {
  margin-top: 5px;
  color: var(--cyan);
  font-size: 21px;
  font-weight: 1000;
}

.chat-giveaway p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 9px;
}

.chat-giveaway button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  font-size: 10px;
  font-weight: 900;
}

.chat-giveaway button:disabled {
  opacity: .55;
  cursor: default;
}

@media (max-width: 1180px) {
  .game-card:last-child {
    grid-column: auto;
  }

  .hilo-layout {
    grid-template-columns: 285px minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .hilo-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .game-cards {
    grid-template-columns: 1fr;
  }

  .hilo-table {
    grid-template-columns: 1fr 1fr;
    min-height: 280px;
    padding: 18px 10px;
  }

  .hilo-playing-card {
    width: 95px;
    height: 137px;
  }

  .hilo-playing-card .suit {
    font-size: 44px;
  }

  .hilo-playing-card .rank {
    font-size: 19px;
  }

  .hilo-choices {
    grid-template-columns: 1fr;
  }
}


/* ======================= VERSION 4 MOTION + COLOR DICE ======================= */

html {
  scroll-behavior: smooth;
}

button,
.button,
.game-card,
.nav-button,
.mine-tile,
.color-choice,
.dice-join-swatch {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.click-ripple {
  position: absolute;
  z-index: 20;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .38);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: clickRipple .62s ease-out forwards;
}

@keyframes clickRipple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(16);
  }
}

.balance-pop {
  animation: balancePop .48s cubic-bezier(.2, .9, .25, 1.3);
}

@keyframes balancePop {
  45% {
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(82, 221, 255, .72);
    transform: scale(1.12);
  }
}

.ui-ready .hero,
.ui-ready .section-header,
.ui-ready .game-card,
.ui-ready .feature-panel,
.ui-ready .activity-list,
.ui-ready .page-heading,
.ui-ready .control-panel,
.ui-ready .game-panel,
.ui-ready .blackjack-table,
.ui-ready .affiliate-hero,
.ui-ready .affiliate-stats,
.ui-ready .info-panel,
.ui-ready .color-dice-stage {
  animation: panelEntrance .58s cubic-bezier(.2, .78, .2, 1) both;
}

.ui-ready .game-card:nth-child(2),
.ui-ready .feature-panel:nth-child(2) { animation-delay: 70ms; }
.ui-ready .game-card:nth-child(3) { animation-delay: 120ms; }
.ui-ready .game-card:nth-child(4) { animation-delay: 170ms; }
.ui-ready .game-card:nth-child(5) { animation-delay: 220ms; }

@keyframes panelEntrance {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.985);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.hero {
  background-size: 115% 115%;
  animation-name: panelEntrance, heroGradient !important;
  animation-duration: .58s, 10s !important;
  animation-timing-function: cubic-bezier(.2,.78,.2,1), ease-in-out !important;
  animation-iteration-count: 1, infinite !important;
  animation-fill-mode: both !important;
}

@keyframes heroGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-copy h1 span {
  background-size: 200% auto;
  animation: headingShine 5s linear infinite;
}

@keyframes headingShine {
  to { background-position: 200% center; }
}

.game-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.game-card {
  transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .28s, box-shadow .28s;
}

.game-card:hover {
  transform: translateY(-7px) scale(1.01);
  box-shadow: 0 24px 55px rgba(0, 0, 0, .34), 0 0 32px rgba(82, 221, 255, .08);
}

.game-card:hover .game-art > span {
  animation: gameIconFloat 1.4s ease-in-out infinite alternate;
}

.game-card:hover .game-art > span:nth-child(2) { animation-delay: -350ms; }
.game-card:hover .game-art > span:nth-child(3) { animation-delay: -650ms; }

@keyframes gameIconFloat {
  to { transform: translateY(-8px) rotate(5deg); }
}

.nav-button::after {
  content: "";
  position: absolute;
  inset: 7px auto 7px 0;
  width: 3px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(var(--cyan), var(--purple));
  box-shadow: 0 0 14px rgba(82, 221, 255, .75);
  opacity: 0;
  transform: scaleY(.3);
  transition: .23s;
}

.nav-button.active::after {
  opacity: 1;
  transform: scaleY(1);
}

/* Mines motion */
.mine-tile {
  transform-style: preserve-3d;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .2s;
}

.mine-tile.tile-arm {
  animation: tileArm .42s cubic-bezier(.2,.85,.25,1.3) var(--tile-delay, 0ms) both;
}

.mine-tile.tile-flip {
  animation: mineFlip .52s cubic-bezier(.2,.9,.2,1.25) both;
}

.mine-tile.bomb-reveal {
  animation: bombReveal .5s cubic-bezier(.2,.8,.2,1.2) var(--tile-delay, 0ms) both;
}

.mine-tile.tile-pending {
  pointer-events: none;
  animation: pendingTile .55s ease-in-out infinite alternate;
}

@keyframes tileArm {
  from { opacity: 0; transform: translateY(15px) scale(.72) rotateX(45deg); }
  to { opacity: 1; transform: none; }
}

@keyframes mineFlip {
  0% { transform: rotateY(0) scale(1); }
  45% { transform: rotateY(90deg) scale(.82); }
  70% { transform: rotateY(180deg) scale(1.12); }
  100% { transform: rotateY(360deg) scale(1); }
}

@keyframes bombReveal {
  0% { opacity: 0; transform: scale(.45) rotate(-18deg); }
  65% { opacity: 1; transform: scale(1.16) rotate(7deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes pendingTile {
  to {
    border-color: rgba(82, 221, 255, .75);
    box-shadow: 0 0 24px rgba(82, 221, 255, .28);
    transform: scale(.94);
  }
}

.mines-panel.mines-active {
  box-shadow: var(--shadow), 0 0 42px rgba(40, 125, 255, .12);
}

.mines-panel.mines-result-win {
  animation: minesWinPanel .75s ease;
}

.mines-panel.mines-result-loss {
  animation: minesLossPanel .55s ease;
}

@keyframes minesWinPanel {
  45% { box-shadow: var(--shadow), 0 0 60px rgba(69, 230, 138, .38); }
}

@keyframes minesLossPanel {
  25%, 75% { transform: translateX(-4px); }
  50% { transform: translateX(4px); box-shadow: var(--shadow), 0 0 50px rgba(255, 85, 120, .32); }
}

/* Blackjack dealing */
.playing-card {
  transform-origin: 50% 120%;
  transition: border-color .3s, box-shadow .3s, filter .3s;
}

.playing-card.deal-in {
  opacity: 0;
  animation: blackjackDeal .58s cubic-bezier(.18,.82,.2,1.15) var(--deal-delay, 0ms) forwards;
}

@keyframes blackjackDeal {
  0% {
    opacity: 0;
    transform: translate(150px, -90px) rotate(28deg) scale(.72);
    filter: blur(3px);
  }
  72% {
    opacity: 1;
    transform: translate(-5px, 2px) rotate(-5deg) scale(1.04);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: rotate(-2deg) scale(1);
  }
}

.blackjack-table.is-dealing .blackjack-logo {
  animation: dealerPulse .7s ease-in-out infinite alternate;
}

@keyframes dealerPulse {
  to { opacity: 1; text-shadow: 0 0 24px rgba(82, 221, 255, .5); transform: scale(1.04); }
}

.blackjack-table.outcome-win .playing-card:not(.placeholder) {
  animation: winningCardPulse 1.2s ease-in-out infinite alternate;
}

.blackjack-table.outcome-loss .playing-card:not(.placeholder) {
  animation: losingCardPulse .95s ease-in-out infinite alternate;
}

@keyframes winningCardPulse {
  to { transform: translateY(-4px) rotate(-2deg); filter: brightness(1.06); }
}

@keyframes losingCardPulse {
  to { filter: saturate(1.2) brightness(.92); }
}

/* Color Dice home card */
.color-dice-card .game-art {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 85, 120, .28), transparent 25%),
    radial-gradient(circle at 82% 22%, rgba(141, 92, 255, .3), transparent 24%),
    radial-gradient(circle at 55% 78%, rgba(69, 230, 138, .2), transparent 27%),
    linear-gradient(135deg, #28162f, #101a36 58%, #143346);
  display: grid;
  grid-template-columns: repeat(3, 43px);
  gap: 11px;
}

.mini-color-die {
  width: 43px;
  height: 43px;
  border: 3px solid rgba(255, 255, 255, .62);
  border-radius: 11px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .42), inset 0 0 15px rgba(255,255,255,.13);
}

.mini-color-die.red { background: #f04461; }
.mini-color-die.orange { background: #f28b30; }
.mini-color-die.yellow { background: #f4d54a; }
.mini-color-die.green { background: #39cf78; }
.mini-color-die.blue { background: #3c8ef5; }
.mini-color-die.purple { background: #985ee8; }

/* Color Dice page */
.color-dice-top {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 20px;
}

.color-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 16px;
}

.color-choice {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}

.color-choice:hover,
.color-choice.active {
  transform: translateY(-2px);
  color: #fff;
}

.color-choice i,
.score-color,
.dice-versus-icons i,
.dice-join-swatch {
  display: block;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .58);
  box-shadow: 0 0 18px color-mix(in srgb, currentColor 45%, transparent);
}

.color-choice i { width: 30px; height: 30px; }
.color-choice b { font-size: 10px; }

.color-choice[data-dice-color="red"] i,
.score-color.red,
.dice-versus-icons i.red,
.dice-join-swatch.red { background: #f04461; color: #f04461; }
.color-choice[data-dice-color="orange"] i,
.score-color.orange,
.dice-versus-icons i.orange,
.dice-join-swatch.orange { background: #f28b30; color: #f28b30; }
.color-choice[data-dice-color="yellow"] i,
.score-color.yellow,
.dice-versus-icons i.yellow,
.dice-join-swatch.yellow { background: #f4d54a; color: #f4d54a; }
.color-choice[data-dice-color="green"] i,
.score-color.green,
.dice-versus-icons i.green,
.dice-join-swatch.green { background: #39cf78; color: #39cf78; }
.color-choice[data-dice-color="blue"] i,
.score-color.blue,
.dice-versus-icons i.blue,
.dice-join-swatch.blue { background: #3c8ef5; color: #3c8ef5; }
.color-choice[data-dice-color="purple"] i,
.score-color.purple,
.dice-versus-icons i.purple,
.dice-join-swatch.purple { background: #985ee8; color: #985ee8; }
.score-color.waiting,
.dice-versus-icons i.waiting { background: rgba(255,255,255,.11); color: #6a7693; }

.color-choice.active {
  border-color: color-mix(in srgb, currentColor 70%, #fff 10%);
  background: rgba(255,255,255,.08);
  box-shadow: 0 0 26px rgba(82, 221, 255, .08);
}

.color-dice-stage {
  min-height: 390px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 27px;
  border: 1px solid var(--border);
  border-radius: 25px;
  background:
    radial-gradient(circle at 50% 50%, rgba(82, 221, 255, .12), transparent 35%),
    radial-gradient(circle at 20% 20%, rgba(255, 85, 120, .1), transparent 23%),
    radial-gradient(circle at 80% 80%, rgba(141, 92, 255, .14), transparent 26%),
    linear-gradient(135deg, #12182e, #0b1225);
  box-shadow: var(--shadow);
  perspective: 1000px;
}

.color-dice-scoreboard {
  width: min(100%, 510px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 25px;
}

.color-dice-scoreboard > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}

.color-dice-scoreboard em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.color-dice-scoreboard strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.color-dice-scoreboard b {
  font-size: 22px;
}

.score-color {
  width: 22px;
  height: 22px;
}

.color-dice-tray {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  gap: 15px;
  transform-style: preserve-3d;
}

.color-die {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 5px solid rgba(255,255,255,.68);
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(0,0,0,.46), inset 0 0 22px rgba(255,255,255,.18);
  transform-style: preserve-3d;
  font-size: 28px;
  color: rgba(255,255,255,.86);
  text-shadow: 0 2px 4px rgba(0,0,0,.35);
}

.color-die.red { background: linear-gradient(145deg,#ff7189,#c92746); }
.color-die.orange { background: linear-gradient(145deg,#ffae59,#cf6717); }
.color-die.yellow { background: linear-gradient(145deg,#ffec78,#d7af19); color:#6d5705; }
.color-die.green { background: linear-gradient(145deg,#6ff0a2,#1ba95b); }
.color-die.blue { background: linear-gradient(145deg,#68b4ff,#2671d7); }
.color-die.purple { background: linear-gradient(145deg,#c18cff,#7132c8); }

.color-dice-stage.is-rolling .color-die {
  animation: diceTumble .42s cubic-bezier(.2,.8,.2,1) infinite alternate;
  animation-delay: calc(var(--die-index, 0) * -45ms);
}

.color-die.dice-settle {
  animation: diceSettle .52s cubic-bezier(.2,.9,.2,1.25);
}

.color-dice-stage.tie-round {
  animation: tieStage .55s ease;
}

.color-dice-stage.roll-finished {
  animation: winnerStage .85s ease;
}

@keyframes diceTumble {
  from { transform: rotateX(-18deg) rotateY(20deg) translateY(3px) scale(.94); }
  to { transform: rotateX(22deg) rotateY(-28deg) translateY(-8px) scale(1.04); }
}

@keyframes diceSettle {
  0% { transform: scale(.75) rotate(18deg); }
  70% { transform: scale(1.13) rotate(-4deg); }
  100% { transform: scale(1); }
}

@keyframes tieStage {
  40% { box-shadow: var(--shadow), 0 0 50px rgba(255, 200, 90, .34); }
}

@keyframes winnerStage {
  45% { box-shadow: var(--shadow), 0 0 70px rgba(69, 230, 138, .38); transform: scale(1.012); }
}

.color-dice-stage > p {
  margin: 24px 0 4px;
  font-size: 20px;
  font-weight: 900;
}

.color-dice-stage > span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.color-dice-lobbies {
  display: grid;
  gap: 11px;
}

.color-dice-lobby {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto minmax(150px, auto);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(17,26,49,.96), rgba(10,16,32,.96));
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.color-dice-lobby:hover {
  transform: translateY(-2px);
  border-color: rgba(82,221,255,.34);
  box-shadow: 0 15px 35px rgba(0,0,0,.24);
}

.dice-versus-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dice-versus-icons i {
  width: 31px;
  height: 31px;
}

.dice-versus-icons b {
  color: var(--muted);
  font-size: 8px;
}

.color-dice-lobby-copy h4,
.color-dice-lobby-copy p,
.color-dice-lobby-copy small {
  display: block;
  margin: 0;
}

.color-dice-lobby-copy p,
.color-dice-lobby-copy small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.color-dice-lobby-copy small { color: #b8c7e9; }

.color-dice-lobby-bet {
  display: grid;
  justify-items: end;
}

.color-dice-lobby-bet span { font-size: 11px; }
.color-dice-lobby-bet strong { font-size: 17px; }

.color-dice-lobby-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.color-dice-lobby-actions button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  font-size: 9px;
  font-weight: 900;
}

.color-dice-lobby-actions .dice-bot-button {
  background: linear-gradient(135deg, rgba(141,92,255,.28), rgba(40,125,255,.18));
  color: #d8cbff;
}

.dice-join-wrap {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.dice-join-wrap > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.dice-join-colors {
  display: flex;
  gap: 5px;
}

.dice-join-swatch {
  width: 25px;
  height: 25px;
  padding: 0;
  transition: transform .18s, filter .18s;
}

.dice-join-swatch:hover {
  transform: translateY(-3px) scale(1.12);
  filter: brightness(1.12);
}

@media (max-width: 1180px) {
  .game-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .color-dice-top { grid-template-columns: 310px minmax(0, 1fr); }
}

@media (max-width: 920px) {
  .color-dice-top { grid-template-columns: 1fr; }
  .color-dice-lobby { grid-template-columns: auto 1fr auto; }
  .color-dice-lobby-actions,
  .dice-join-wrap { grid-column: 2 / 4; justify-content: end; }
}

@media (max-width: 650px) {
  .game-cards { grid-template-columns: 1fr; }
  .color-picker { grid-template-columns: repeat(2, 1fr); }
  .color-dice-stage { min-height: 360px; padding: 20px 10px; }
  .color-dice-tray { grid-template-columns: repeat(3, 58px); gap: 10px; }
  .color-die { width: 58px; height: 58px; border-width: 4px; border-radius: 14px; }
  .color-dice-scoreboard { gap: 7px; }
  .color-dice-scoreboard > div { grid-template-columns: auto 1fr; }
  .color-dice-scoreboard b { grid-column: 1 / 3; justify-self: center; }
  .color-dice-lobby { grid-template-columns: auto 1fr; }
  .color-dice-lobby-bet,
  .color-dice-lobby-actions,
  .dice-join-wrap { grid-column: 2; justify-items: start; justify-content: start; }
  .color-dice-lobby-bet { justify-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* PS99Dice v5 additions */
.brand-logo{width:108px;height:50px;object-fit:contain;filter:drop-shadow(0 0 12px #287dff77)}
.brand-logo-auth{width:190px;max-height:110px;object-fit:contain;margin-bottom:8px}.logo-lockup.large{height:auto}
.gem-icon{width:18px;height:18px;object-fit:contain;vertical-align:-4px;filter:drop-shadow(0 0 8px #52ddffaa)}
.amount-input .gem-icon{width:21px;height:21px}.page-balance .gem-icon{width:15px;height:15px}
.balance-chip{cursor:pointer}.balance-menu{position:fixed;z-index:110;top:68px;left:50%;width:260px;transform:translateX(-50%);padding:11px;border:1px solid var(--border);border-radius:16px;background:#10182df2;box-shadow:var(--shadow);backdrop-filter:blur(18px)}
.balance-menu-head{display:grid;gap:3px;padding:10px 11px 13px}.balance-menu-head span{color:var(--muted);font-size:10px}.balance-menu-head strong{font-size:24px}.balance-menu button{width:100%;display:grid;gap:2px;padding:11px;border:0;border-radius:11px;background:transparent;text-align:left;font-weight:800}.balance-menu button:hover{background:#fff8}.balance-menu button small{color:var(--muted);font-weight:500}
.hero-logo{position:absolute;inset:50% auto auto 50%;width:290px;max-width:100%;transform:translate(-50%,-50%);filter:drop-shadow(0 0 32px #287dff88)}
.wide-game-card{width:100%;min-height:175px;margin-bottom:20px}.penguin-card .game-art{background:radial-gradient(circle at 60% 40%,#52ddff33,transparent 35%),linear-gradient(135deg,#0c3972,#09172d)}
.lobby-view-stage{position:relative}.lobby-view-stage.hidden{display:none!important}.stage-close{position:absolute;top:14px;right:14px;z-index:8;width:36px;height:36px;border:1px solid var(--border);border-radius:12px;background:#050a17cc;color:#fff;font-size:24px}.stage-countdown{position:absolute;z-index:7;inset:0;display:grid;place-items:center;border-radius:25px;background:#050914dc;font-size:110px;font-weight:1000;text-shadow:0 0 40px #52ddff}.stage-countdown.count-pop{animation:countPop .65s ease}@keyframes countPop{0%{transform:scale(.55);opacity:0}55%{transform:scale(1.08);opacity:1}100%{transform:scale(1)}}
.chat-panel{grid-template-rows:auto auto 1fr auto auto}.chat-messages:empty{min-height:0}.chat-form{grid-template-columns:1fr;padding:10px 12px 8px}.chat-form input{width:100%}
.penguin-layout{display:grid;grid-template-columns:330px minmax(0,1fr);gap:18px}.difficulty-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:15px}.difficulty-picker button{height:42px;border:1px solid var(--border);border-radius:12px;background:#ffffff06;color:var(--muted);font-weight:900}.difficulty-picker button.active{border-color:#52ddff99;background:#52ddff15;color:#fff;box-shadow:0 0 20px #52ddff1f}.penguin-board-wrap{min-height:560px;padding:25px;border:1px solid var(--border);border-radius:25px;background:radial-gradient(circle at 50% 100%,#287dff2a,transparent 40%),linear-gradient(180deg,#091b36,#08101f);box-shadow:var(--shadow)}.penguin-board{display:grid;gap:8px;height:100%}.ice-row{min-height:37px;display:grid;grid-template-columns:35px 1fr;align-items:center;padding:0 14px;border:1px solid #8adfff20;border-radius:12px;background:linear-gradient(90deg,#7be7ff11,#fff5);transition:.25s}.ice-row span{color:#66809e;font-size:9px;font-weight:900}.ice-row i{text-align:center;font-style:normal;font-size:22px}.ice-row.safe{background:linear-gradient(90deg,#45e68a22,#52ddff18);border-color:#45e68a55;animation:iceSafe .45s ease}.ice-row.failed{background:#ff55781a;border-color:#ff557866;animation:iceFail .5s ease}@keyframes iceSafe{50%{transform:scale(1.02);box-shadow:0 0 35px #45e68a33}}@keyframes iceFail{35%{transform:translateX(-7px) rotate(-1deg)}70%{transform:translateX(7px) rotate(1deg)}}
@media(max-width:920px){.penguin-layout{grid-template-columns:1fr}.penguin-board-wrap{min-height:520px}}@media(max-width:650px){.balance-menu{left:50%;top:64px;width:min(92vw,260px)}.hero-logo{width:220px}.penguin-board-wrap{padding:14px}}

/* PS99Dice P2P lobby browser + centered viewer */
.p2p-lobby-list{display:grid;gap:8px;margin-top:10px}
.p2p-lobby-row{display:grid;grid-template-columns:220px minmax(210px,1.25fr) 190px 120px 180px;align-items:center;gap:16px;min-height:78px;padding:10px 14px;border:1px solid #2b3348;border-radius:8px;background:linear-gradient(90deg,#171b2b,#191d30 58%,#171b29);box-shadow:0 10px 28px #02040b2b;transition:transform .18s,border-color .18s,background .18s}
.p2p-lobby-row:hover{transform:translateY(-1px);border-color:#3a4c73;background:linear-gradient(90deg,#1a2033,#1c2237 58%,#191e30)}
.p2p-versus{display:flex;align-items:center;gap:14px}.p2p-versus>b{font-size:13px;color:#aeb7cb;font-weight:1000}
.p2p-avatar{position:relative;width:48px;height:48px;display:grid;place-items:center;border:1px solid #2c3f62;border-radius:50%;background:radial-gradient(circle at 35% 28%,#315488,#101728 70%);font-weight:1000;font-size:17px;box-shadow:inset 0 0 18px #52ddff15}
.p2p-avatar.waiting-avatar{background:#101522;border-color:#2a3144;color:#7d879d}
.side-dot{position:absolute;right:-4px;top:-4px;width:18px;height:18px;border:3px solid #151a29;border-radius:50%;box-shadow:0 0 10px currentColor}
.side-dot.purple,.dice-chip.purple{background:#985ee8;color:#985ee8}.side-dot.green,.dice-chip.green{background:#39cf78;color:#39cf78}.side-dot.red,.dice-chip.red{background:#f04461;color:#f04461}.side-dot.orange,.dice-chip.orange{background:#f28b30;color:#f28b30}.side-dot.yellow,.dice-chip.yellow{background:#f4d54a;color:#f4d54a}.side-dot.blue,.dice-chip.blue{background:#3c8ef5;color:#3c8ef5}.side-dot.waiting,.dice-chip.waiting{background:#4b556c;color:#4b556c}
.p2p-items{display:flex;align-items:center;gap:0}.coin-preview{width:46px;height:46px;display:grid;place-items:center;margin-left:-5px;border:3px solid #dfe8ff;border-radius:50%;font-size:15px;font-weight:1000;box-shadow:0 8px 18px #0006}.coin-preview:first-child{margin-left:0}.coin-preview.purple{background:linear-gradient(145deg,#b688ff,#6634bd)}.coin-preview.green{background:linear-gradient(145deg,#69efa0,#199052)}
.p2p-value{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px 7px}.p2p-value>span{grid-row:1 / 3}.p2p-value .gem-inline{width:22px;height:22px}.p2p-value strong{font-size:18px}.p2p-value small{color:#aab3c7;font-size:10px;font-weight:800}
.p2p-status{display:grid;place-items:center}.p2p-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}.p2p-actions button{min-width:72px;height:38px;padding:0 14px;border:1px solid #313a55;border-radius:8px;background:#282e46;color:#fff;font-size:10px;font-weight:1000}.p2p-actions .p2p-join{background:#087cf1;border-color:#188cff}.p2p-actions .p2p-bot{background:#252c43}.p2p-actions .p2p-view{background:#2a3048}
.dice-items{gap:5px}.dice-chip{width:39px;height:39px;display:block;border:3px solid #dfe8ff;border-radius:12px;box-shadow:0 8px 18px #0006,inset 0 0 12px #fff2}.dice-items em{width:34px;height:34px;display:grid;place-items:center;border:1px solid #37425e;border-radius:50%;background:#20273a;color:#c6d0e6;font-size:10px;font-style:normal;font-weight:1000}.dice-quick-join{display:flex;gap:4px}.dice-quick-join .dice-join-swatch{width:22px;height:22px;border-width:2px}

/* Centered P2P view overlay */
.lobby-view-stage:not(.hidden){position:fixed!important;z-index:220!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;width:min(660px,calc(100vw - 34px))!important;max-height:calc(100vh - 40px);overflow:auto;min-height:430px!important;box-shadow:0 36px 110px #000d,0 0 0 9999px #030610c7,0 0 70px #287dff2d!important;animation:p2pModalIn .22s ease}
@keyframes p2pModalIn{from{opacity:0;transform:translate(-50%,-46%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
.lobby-view-stage .stage-close{position:sticky;float:right;top:0;margin-bottom:-36px;z-index:15}

/* Horizontal Penguin Crossing */
.penguin-layout{grid-template-columns:320px minmax(0,1fr)}
.penguin-board-wrap{min-height:500px;padding:0;overflow:hidden;background:#07152a;border-color:#2a507a}
.penguin-board{position:relative;display:block;height:500px;overflow:hidden;background:linear-gradient(180deg,#07152a 0%,#0c3460 50%,#0a416d 51%,#0b2b4f 100%)}
.penguin-sky{position:absolute;inset:0 0 48% 0;background:radial-gradient(circle at 77% 22%,#85ddff28,transparent 22%),linear-gradient(180deg,#061126,#0a2e58)}
.penguin-sky:after{content:"";position:absolute;left:-4%;right:-4%;bottom:-3px;height:100px;background:linear-gradient(165deg,transparent 0 38%,#dff7ff 39% 57%,#98dff4 58% 65%,transparent 66%) 0 0/220px 100% repeat-x;opacity:.95}
.snow{position:absolute;width:6px;height:6px;border-radius:50%;background:#fff;box-shadow:83px 44px #fff,166px 18px #fff,249px 63px #fff,338px 26px #fff,450px 70px #fff,585px 31px #fff,713px 57px #fff,824px 22px #fff,948px 72px #fff}.snow-one{left:7%;top:18%;opacity:.65}.snow-two{left:14%;top:34%;transform:scale(.7);opacity:.45}.snow-three{left:2%;top:8%;transform:scale(.45);opacity:.35}
.penguin-water{position:absolute;left:0;right:0;bottom:0;height:48%;background:repeating-linear-gradient(174deg,#0b4f7d 0 8px,#0d5d8f 9px 15px,#0a4772 16px 25px);opacity:.88}
.penguin-track-line{position:absolute;z-index:3;left:4%;right:4%;top:58%;height:105px;display:grid;grid-template-columns:repeat(12,1fr);gap:8px;align-items:center;transform:translateY(-50%)}
.cross-step{position:relative;height:72px;display:grid;place-items:center;border:1px solid #b8ecff70;border-radius:17px 19px 15px 20px;background:linear-gradient(145deg,#eafcff,#8edbf0);color:#15324e;box-shadow:0 14px 18px #00101d70,inset 0 2px 0 #fff;transform:rotate(var(--tilt,0deg));transition:.28s ease}.cross-step:nth-child(3n){--tilt:2deg}.cross-step:nth-child(3n+1){--tilt:-2deg}.cross-step span{position:absolute;top:5px;left:8px;font-size:8px;font-weight:1000;opacity:.55}.cross-step b{font-size:11px}.cross-step i{position:absolute;right:7px;bottom:5px;font-style:normal;font-size:12px}.cross-step.safe{border-color:#76ffb2;box-shadow:0 0 25px #45e68a55,0 14px 18px #00101d70}.cross-step.failed{background:linear-gradient(145deg,#294661,#102239);border-color:#ff5578;color:#ff94a8;transform:translateY(20px) rotate(8deg);opacity:.75}.cross-step.next{animation:nextIce 1s ease-in-out infinite alternate}@keyframes nextIce{to{box-shadow:0 0 30px #52ddff88,0 14px 18px #00101d70;transform:translateY(-4px) rotate(var(--tilt,0deg))}}
.crossing-penguin{position:absolute;z-index:6;left:var(--penguin-x);top:58%;width:78px;height:96px;object-fit:contain;transform:translate(-50%,-92%);filter:drop-shadow(0 10px 9px #00101d99);transition:left .65s cubic-bezier(.2,.85,.2,1),transform .5s ease}.crossing-penguin.penguin-ready{animation:penguinBounce .85s ease-in-out infinite alternate}@keyframes penguinBounce{to{transform:translate(-50%,-98%) rotate(-3deg)}}.crossing-penguin.penguin-fell{animation:penguinFall .75s forwards}@keyframes penguinFall{to{transform:translate(-50%,25%) rotate(80deg);opacity:.35}}

@media(max-width:1150px){.p2p-lobby-row{grid-template-columns:180px minmax(160px,1fr) 160px 90px 150px}}
@media(max-width:920px){.p2p-lobby-row{grid-template-columns:1fr auto auto}.p2p-items{display:none}.p2p-status{display:none}.p2p-actions{grid-column:3}.penguin-layout{grid-template-columns:1fr}.penguin-board-wrap,.penguin-board{min-height:430px;height:430px}}
@media(max-width:650px){.p2p-lobby-row{grid-template-columns:1fr auto;gap:10px}.p2p-value{grid-column:1}.p2p-actions{grid-column:2;grid-row:1 / 3;max-width:94px}.p2p-actions button{min-width:82px}.p2p-versus{gap:9px}.p2p-avatar{width:42px;height:42px}.penguin-track-line{left:3%;right:3%;gap:3px}.cross-step{height:58px;border-radius:10px}.cross-step b{font-size:8px}.crossing-penguin{width:60px;height:78px}.lobby-view-stage:not(.hidden){min-height:390px!important}}

/* v7: supplied PS99 gem art everywhere */
.auth-gem img,
.float-gem img {
  width: 1em;
  height: 1em;
  object-fit: contain;
  display: block;
}
.game-gem-art {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px #52ddffaa);
}
.affiliate-art span img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.mine-tile .gem-icon {
  width: clamp(26px, 54%, 48px);
  height: clamp(26px, 54%, 48px);
  vertical-align: 0;
  filter: drop-shadow(0 0 11px #52ddffaa);
}
.card-back-gem {
  width: 54%;
  height: 54%;
  object-fit: contain;
  filter: drop-shadow(0 0 11px #52ddff99);
}
.giveaway-prize .gem-icon,
.chat-giveaway-prize .gem-icon,
.activity-icon .gem-icon {
  vertical-align: -4px;
}
.activity-icon .gem-icon { width: 22px; height: 22px; }

/* v7: low, wide Color Dice create bar */
.color-dice-top { display: block; }
.color-dice-toolbar {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(225px, .8fr) minmax(500px, 2fr) 160px;
  align-items: end;
  gap: 14px;
  padding: 15px 16px;
  margin-bottom: 18px;
}
.color-dice-toolbar-field { min-width: 0; }
.color-dice-toolbar-field > label { display: block; margin: 0 0 7px; }
.color-dice-toolbar .color-picker {
  grid-template-columns: repeat(6, minmax(60px, 1fr));
  gap: 7px;
  margin: 0;
}
.color-dice-toolbar .color-choice {
  min-height: 48px;
  grid-template-columns: auto 1fr;
  place-items: center start;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 11px;
}
.color-dice-toolbar .color-choice i { width: 20px; height: 20px; border-width: 2px; }
.color-dice-toolbar .color-choice b { font-size: 9px; }
.color-dice-toolbar #color-dice-create { height: 48px; margin: 0; }

/* v7: lobby avatars use real Roblox headshots when available */
.p2p-avatar { overflow: visible; }
.p2p-avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* v7: classic avatar / coin / avatar Coinflip viewer */
.coin-stage { padding: 38px 34px 28px; }
.coin-duel-stage {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 170px minmax(120px, 1fr);
  align-items: center;
  justify-items: center;
  gap: 24px;
}
.coin-stage-player {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.coin-player-avatar {
  width: 105px;
  height: 105px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #33466d;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #315488, #101728 70%);
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 34px #0008, inset 0 0 20px #52ddff14;
  font-size: 30px;
  font-weight: 1000;
}
.coin-stage-player strong {
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.coin-side-pill {
  padding: 5px 9px;
  border: 1px solid #ffffff20;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 1000;
  text-transform: uppercase;
}
.coin-side-pill.purple { background: #985ee826; color: #c9a9ff; border-color: #985ee855; }
.coin-side-pill.green { background: #39cf7824; color: #8ff0b3; border-color: #39cf7855; }
.coin-duel-stage .big-coin { width: 150px; height: 150px; }

/* v7: every modal close X is locked to the top-right corner */
.lobby-view-stage .stage-close,
.admin-modal > .stage-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  float: none !important;
  margin: 0 !important;
  z-index: 30 !important;
}

/* v7: global announcement */
.global-announcement {
  position: fixed;
  z-index: 1600;
  top: 82px;
  left: 50%;
  width: min(620px, calc(100vw - 34px));
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid #52ddff66;
  border-radius: 15px;
  background: linear-gradient(135deg, #111a31f5, #0a1125f5);
  box-shadow: 0 24px 70px #000b, 0 0 35px #52ddff22;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}
.global-announcement strong {
  padding: 6px 8px;
  border-radius: 8px;
  background: #287dff22;
  color: #75e6ff;
  font-size: 9px;
  letter-spacing: .08em;
}
.global-announcement span { font-size: 13px; font-weight: 800; }
.global-announcement.announcement-pop { animation: announcementPop .28s ease; }
@keyframes announcementPop {
  from { opacity: 0; transform: translate(-50%, -14px) scale(.97); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* v7: Admin panel */
.admin-panel {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #030610cf;
  backdrop-filter: blur(12px);
}
.admin-modal {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 28px;
  border: 1px solid #344463;
  border-radius: 23px;
  background: radial-gradient(circle at 85% 0, #287dff22, transparent 28%), linear-gradient(145deg, #11192d, #080f20);
  box-shadow: 0 40px 120px #000e, 0 0 60px #287dff1f;
}
.admin-heading { padding-right: 48px; margin-bottom: 18px; }
.admin-heading h2 { margin: 2px 0 6px; font-size: 34px; }
.admin-heading p:last-child { margin: 0; color: var(--muted); }
.admin-locked {
  padding: 30px;
  border: 1px solid #ff557844;
  border-radius: 18px;
  background: #ff55780b;
  text-align: center;
}
.admin-locked strong { display: block; margin-bottom: 7px; font-size: 20px; }
.admin-locked p { margin: 0; color: var(--muted); }
.admin-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.admin-card {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #ffffff05;
}
.admin-card h3 { margin: 0; }
.admin-card > p { margin: 0 0 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.admin-card label { margin: 2px 0 0; }
.admin-card > input,
.admin-two-fields input {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #070d1c;
  color: #fff;
  outline: 0;
}
.admin-card > input:focus,
.admin-two-fields input:focus { border-color: #52ddff77; box-shadow: 0 0 0 3px #52ddff12; }
.admin-two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.admin-two-fields > div { display: grid; gap: 7px; }
.admin-announcement-card { grid-column: 1 / -1; }
.admin-result { min-height: 17px; color: #9adfff !important; font-size: 10px !important; }

@media (max-width: 1080px) {
  .color-dice-toolbar { grid-template-columns: minmax(220px, .9fr) minmax(400px, 1.6fr); }
  .color-dice-toolbar #color-dice-create { grid-column: 1 / -1; width: 180px; justify-self: end; }
}

@media (max-width: 760px) {
  .color-dice-toolbar { grid-template-columns: 1fr; }
  .color-dice-toolbar .color-picker { grid-template-columns: repeat(3, 1fr); }
  .color-dice-toolbar #color-dice-create { grid-column: auto; width: 100%; justify-self: stretch; }
  .coin-duel-stage { grid-template-columns: 1fr 105px 1fr; gap: 10px; }
  .coin-player-avatar { width: 72px; height: 72px; }
  .coin-duel-stage .big-coin { width: 100px; height: 100px; }
  .coin-duel-stage .coin-face { border-width: 7px; font-size: 38px; }
  .admin-tools { grid-template-columns: 1fr; }
  .admin-announcement-card { grid-column: auto; }
}

@media (max-width: 480px) {
  .color-dice-toolbar .color-picker { grid-template-columns: repeat(2, 1fr); }
  .coin-stage { padding: 56px 12px 24px; }
  .coin-duel-stage { grid-template-columns: 1fr 82px 1fr; gap: 7px; }
  .coin-player-avatar { width: 60px; height: 60px; }
  .coin-duel-stage .big-coin { width: 78px; height: 78px; }
  .coin-duel-stage .coin-face { border-width: 5px; font-size: 30px; }
  .coin-stage-player strong { max-width: 92px; font-size: 11px; }
  .global-announcement { top: 74px; grid-template-columns: 1fr; gap: 5px; }
  .admin-panel { padding: 10px; }
  .admin-modal { padding: 22px 15px; max-height: calc(100vh - 20px); }
}

/* v8: plain inline gem icon, always before the amount */
.gem-icon {
  filter: none !important;
  flex: 0 0 auto;
}
.balance-chip {
  grid-template-columns: auto auto auto;
  justify-content: center;
  column-gap: 9px;
}
.balance-chip > span { grid-column: 1 / -1; text-align: center; }
.balance-chip .balance-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}
.balance-chip .balance-gem-icon { width: 24px; height: 24px; vertical-align: 0; }
.balance-chip em {
  grid-column: auto;
  grid-row: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 9px;
}
.activity-amount { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.activity-amount .gem-icon { width: 17px; height: 17px; vertical-align: 0; }
.giveaway-prize strong { display: inline-flex; align-items: center; gap: 7px; }
.giveaway-prize strong .gem-icon { width: 25px; height: 25px; vertical-align: 0; }

/* v8: compact Mines board so the full game fits on a normal screen */
.mines-layout {
  grid-template-columns: 300px minmax(0, 600px);
  justify-content: center;
  align-items: start;
  gap: 16px;
}
.mines-panel { padding: 14px; }
.mines-grid {
  width: min(100%, 560px);
  margin: 0 auto;
  grid-template-columns: repeat(5, minmax(46px, 1fr));
  gap: 7px;
}
.mine-tile { border-radius: 13px; }
.mines-panel .game-panel-head { margin-bottom: 10px; }

/* v8: P2P creation begins with a side/colour, then a fixed wager selector */
.p2p-choice-create {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(240px, .75fr) minmax(420px, 1.5fr);
  align-items: center;
  gap: 22px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, #111a2e, #0b1223);
  box-shadow: var(--shadow);
}
.p2p-choice-create h2 { margin: 2px 0 6px; }
.p2p-choice-create p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.side-picker-large { margin: 0; }
.side-picker-large .side-button {
  min-height: 78px;
  grid-template-columns: auto 1fr;
  place-items: center start;
  padding: 10px 18px;
}
.side-picker-large .side-button span { width: 49px; height: 49px; }
.side-picker-large .side-button b { font-size: 13px; }
.color-picker-create {
  grid-template-columns: repeat(6, minmax(62px, 1fr));
  gap: 8px;
  margin: 0;
}
.color-picker-create .color-choice {
  min-height: 65px;
  padding: 8px 6px;
}
.color-picker-create .color-choice i { width: 26px; height: 26px; }

.overlay-panel {
  position: fixed;
  z-index: 1550;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #030610cf;
  backdrop-filter: blur(12px);
}
.wager-modal,
.redeem-code-modal {
  position: relative;
  width: min(500px, 100%);
  display: grid;
  gap: 12px;
  padding: 27px;
  border: 1px solid #344463;
  border-radius: 22px;
  background: radial-gradient(circle at 85% 0, #287dff22, transparent 28%), linear-gradient(145deg, #11192d, #080f20);
  box-shadow: 0 40px 120px #000e, 0 0 60px #287dff1f;
}
.wager-modal > .stage-close,
.redeem-code-modal > .stage-close {
  position: absolute !important;
  top: 13px !important;
  right: 13px !important;
  left: auto !important;
  z-index: 10;
}
.wager-modal-head { padding-right: 40px; }
.wager-modal-head h2,
.redeem-code-modal h2 { margin: 2px 0 5px; }
.wager-modal-head p:last-child,
.redeem-code-modal > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.selected-choice-preview {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #ffffff05;
}
.selected-coin {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 5px solid #ffd475;
  border-radius: 50%;
  background: linear-gradient(145deg, #efb33e, #9f6519);
  color: #261500;
  font-weight: 1000;
}
.selected-coin.purple { box-shadow: 0 0 25px #985ee84d; }
.selected-coin.green { box-shadow: 0 0 25px #39cf784d; }
.selected-color {
  width: 42px;
  height: 42px;
  border: 4px solid #ffffff52;
  border-radius: 13px;
  box-shadow: inset 0 0 15px #fff2, 0 0 25px currentColor;
}
.selected-color.red{background:#f05268;color:#f05268}.selected-color.orange{background:#f59a3f;color:#f59a3f}.selected-color.yellow{background:#f5d648;color:#f5d648}.selected-color.green{background:#45cf7b;color:#45cf7b}.selected-color.blue{background:#4098ff;color:#4098ff}.selected-color.purple{background:#9c64eb;color:#9c64eb}
.wager-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.wager-presets button {
  height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff05;
  color: #fff;
  font-weight: 900;
}
.wager-presets button:hover,
.wager-presets button.active { border-color: #52ddff77; background: #52ddff12; }
.wager-presets .gem-icon { width: 20px; height: 20px; }
.redeem-code-modal input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #070d1c;
  color: #fff;
  font-weight: 900;
  letter-spacing: .04em;
  outline: 0;
}
.redeem-code-modal input:focus { border-color: #52ddff77; box-shadow: 0 0 0 3px #52ddff12; }

/* v8: Penguin sits over the centre of its iceberg instead of on the edge */
.crossing-penguin {
  transform: translate(-50%, -72%);
}
.crossing-penguin.penguin-ready { animation: penguinBounceCentered .85s ease-in-out infinite alternate; }
@keyframes penguinBounceCentered { to { transform: translate(-50%, -78%) rotate(-3deg); } }

@media (max-width: 1080px) {
  .p2p-choice-create { grid-template-columns: 1fr; }
  .color-picker-create { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .mines-layout { grid-template-columns: 1fr; }
  .mines-layout .control-panel { width: min(560px, 100%); justify-self: center; }
}
@media (max-width: 650px) {
  .balance-chip { grid-template-columns: auto auto; }
  .balance-chip em { display: none; }
  .p2p-choice-create { padding: 15px; gap: 14px; }
  .side-picker-large .side-button { min-height: 70px; padding: 8px 12px; }
  .color-picker-create { grid-template-columns: repeat(2, 1fr); }
  .wager-modal, .redeem-code-modal { padding: 24px 16px; }
  .wager-presets { grid-template-columns: repeat(2, 1fr); }
}
.gem-amount-inline { display: inline-flex; align-items: center; gap: 5px; }
.gem-amount-inline .gem-icon { width: 17px; height: 17px; vertical-align: 0; }


/* v9 regression fixes: compact balance + separate wallet, closable chat, clean Penguin ice, exact Blackjack result highlighting */
.topbar-balance-group {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
}
.balance-chip {
  min-width: 0 !important;
  width: auto !important;
  height: 42px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 12px !important;
  border-radius: 12px !important;
  cursor: default !important;
}
.balance-chip .balance-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px !important;
  line-height: 1;
}
.balance-chip .balance-gem-icon {
  width: 21px !important;
  height: 21px !important;
  object-fit: contain;
  filter: none !important;
}
.wallet-button,
.chat-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff08;
  transition: .18s ease;
}
.wallet-button:hover,
.chat-toggle:hover,
.chat-toggle.active { border-color: #52ddff66; background: #52ddff10; }
.wallet-button svg { width: 21px; height: 21px; fill: none; stroke: #dce6ff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-toggle { font-size: 17px; }
.balance-menu { top: 67px; }
.home-lower-grid.single-feature { grid-template-columns: 1fr; }

.chat-panel {
  grid-template-rows: auto 1fr auto auto !important;
  transition: transform .24s ease, opacity .2s ease;
}
.chat-head-actions { display: flex; align-items: center; gap: 9px; }
.chat-head-actions > span { color: var(--muted); font-size: 10px; }
#chat-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff08;
  color: #fff;
  font-size: 21px;
  line-height: 1;
}
body.chat-collapsed .chat-panel { transform: translateX(100%); opacity: 0; pointer-events: none; }
body.chat-collapsed .main { margin-right: 0; }

/* Remove the old artificial zig-zag ice/mountain strips entirely. */
.penguin-sky:after { content: none !important; display: none !important; }
.penguin-sky {
  background:
    radial-gradient(circle at 18% 18%, #ffffff10 0 2px, transparent 3px),
    radial-gradient(circle at 72% 24%, #ffffff14 0 2px, transparent 3px),
    linear-gradient(180deg, #07152d 0%, #0a2d55 100%) !important;
}
.penguin-track-line { z-index: 4; }
.crossing-penguin {
  top: 58% !important;
  width: 64px !important;
  height: 80px !important;
  transform: translate(-50%, -58%) !important;
  transform-origin: 50% 80%;
}
.crossing-penguin.penguin-ready { animation: penguinBounceCenteredV9 .85s ease-in-out infinite alternate !important; }
@keyframes penguinBounceCenteredV9 { to { transform: translate(-50%, -64%) rotate(-2deg); } }

/* Result cards remain visible and each hand gets the correct colour. */
.playing-card.result-win {
  border-color: #56f59a !important;
  box-shadow: 0 0 0 2px #45e68a88, 0 0 32px #45e68a88, 0 12px 25px #0007 !important;
  filter: brightness(1.05);
}
.playing-card.result-loss {
  border-color: #ff6f8d !important;
  box-shadow: 0 0 0 2px #ff557877, 0 0 30px #ff557866, 0 12px 25px #0007 !important;
  filter: saturate(1.05);
}
.playing-card.result-push {
  border-color: #ffd36c !important;
  box-shadow: 0 0 0 2px #ffc85a77, 0 0 30px #ffc85a66, 0 12px 25px #0007 !important;
}
.blackjack-table.outcome-win .playing-card:not(.placeholder),
.blackjack-table.outcome-loss .playing-card:not(.placeholder),
.blackjack-table.outcome-push .playing-card:not(.placeholder) {
  animation: none !important;
}

@media (max-width: 920px) {
  body.chat-collapsed .chat-panel { display: none; }
  .topbar-balance-group { gap: 6px; }
}
@media (max-width: 650px) {
  .topbar-balance-group { justify-self: center; gap: 5px; }
  .balance-chip { height: 38px; padding: 0 8px !important; }
  .balance-chip .balance-value { font-size: 13px !important; }
  .balance-chip .balance-gem-icon { width: 19px !important; height: 19px !important; }
  .wallet-button, .chat-toggle { width: 38px; height: 38px; }
}


/* v10 requested UI-only fixes */
.corner-chat-toggle {
  position: fixed !important;
  right: 18px;
  bottom: 18px;
  z-index: 130;
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 35px #0008;
}
body:not(.chat-collapsed) .corner-chat-toggle { right: calc(var(--chat) + 18px); }
@media (max-width: 920px) { body:not(.chat-collapsed) .corner-chat-toggle { right: 18px; bottom: 18px; } }

.user-giveaway-card {
  margin: 6px 0 8px;
  padding: 11px;
  border: 1px solid #52ddff33;
  border-radius: 12px;
  background: linear-gradient(135deg,#52ddff0d,#8d5cff12);
}
.user-menu .user-giveaway-card > strong { display:block; margin:4px 0 6px; font-size:12px; }
.user-giveaway-label { color:#7fe7ff !important; font-size:8px !important; font-weight:1000; letter-spacing:1px; }
.user-giveaway-card p { display:flex; align-items:center; gap:5px; margin:0 0 8px; color:var(--muted); font-size:9px; }
.user-giveaway-card .gem-icon { width:16px; height:16px; }
.user-menu .user-giveaway-card button { background:#287dff22; text-align:center; font-weight:900; }
.user-menu .user-giveaway-card button:disabled { opacity:.55; cursor:default; }

/* Penguin stands above/on top of the centre of the active iceberg. */
.crossing-penguin {
  top: 58% !important;
  transform: translate(-50%, -108%) !important;
  transform-origin: 50% 88%;
}
.crossing-penguin.penguin-ready { animation: penguinStandBounceV10 .8s ease-in-out infinite alternate !important; }
@keyframes penguinStandBounceV10 { to { transform: translate(-50%, -114%) rotate(-2deg); } }
.crossing-penguin.penguin-hopping {
  animation: penguinHopAcrossV10 .66s cubic-bezier(.2,.78,.2,1) both !important;
}
@keyframes penguinHopAcrossV10 {
  0% { left: var(--penguin-from-x); transform: translate(-50%,-108%) scale(1); }
  45% { transform: translate(-50%,-150%) scale(1.06) rotate(-5deg); }
  100% { left: var(--penguin-x); transform: translate(-50%,-108%) scale(1); }
}
.crossing-penguin.penguin-fell {
  animation: penguinFallV10 .8s ease-in forwards !important;
}
@keyframes penguinFallV10 {
  0% { left: var(--penguin-from-x); transform: translate(-50%,-108%) rotate(0); opacity:1; }
  40% { left: var(--penguin-x); transform: translate(-50%,-145%) rotate(8deg); opacity:1; }
  100% { left: var(--penguin-x); transform: translate(-50%,35%) rotate(85deg); opacity:.3; }
}

/* Keep result colors while allowing the Blackjack result pulse animation again. */
.blackjack-table.outcome-win .playing-card.result-win { animation: winningCardPulse 1.2s ease-in-out infinite alternate !important; }
.blackjack-table.outcome-loss .playing-card.result-loss { animation: losingCardPulse .95s ease-in-out infinite alternate !important; }
.blackjack-table.outcome-push .playing-card.result-push { animation: winningCardPulse 1.2s ease-in-out infinite alternate !important; }

/* Requested patch built directly on v10: rakeback, pinned giveaway, P2P winner glow, penguin start/fall. */
.claim-rakeback-big {
  min-height: 48px !important;
  border: 1px solid #52ddff55 !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, #287dff, #8d5cff) !important;
  color: #fff !important;
  text-align: center !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  box-shadow: 0 10px 28px #287dff28 !important;
}

.rakeback-claim-amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 1000;
}

.rakeback-claim-amount .gem-icon,
.chat-giveaway-prize .gem-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.chat-giveaway.hidden {
  display: none !important;
}

.chat-giveaway-prize {
  display: flex;
  align-items: center;
  gap: 7px;
}

#chat-giveaway-timer {
  min-width: 62px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.coin-stage-player,
.color-dice-scoreboard > div {
  position: relative;
  border-radius: 20px;
  transition: box-shadow .25s ease, transform .25s ease, background .25s ease;
}

.p2p-winner-profile-glow {
  animation: p2pWinnerProfileGlow 1.1s ease-in-out infinite alternate;
  background: radial-gradient(circle at 50% 45%, #45e68a1e, transparent 70%);
}

.p2p-winner-profile-glow .coin-player-avatar,
.p2p-winner-profile-glow .score-color {
  filter: drop-shadow(0 0 12px #45e68a) drop-shadow(0 0 24px #52ddff88);
}

@keyframes p2pWinnerProfileGlow {
  from {
    box-shadow: 0 0 0 1px #45e68a44, 0 0 20px #45e68a22;
    transform: scale(1);
  }
  to {
    box-shadow: 0 0 0 2px #7dffc288, 0 0 42px #45e68a66, inset 0 0 25px #45e68a13;
    transform: scale(1.025);
  }
}

/* Starts before iceberg one, hops onto the first iceberg, and falls into the sea on a failed hop. */
.crossing-penguin.penguin-fell {
  animation: penguinFallIntoSeaRequested .95s ease-in forwards !important;
}

@keyframes penguinFallIntoSeaRequested {
  0% {
    left: var(--penguin-from-x);
    transform: translate(-50%, -108%) rotate(0);
    opacity: 1;
  }
  42% {
    left: var(--penguin-x);
    transform: translate(-50%, -148%) rotate(8deg);
    opacity: 1;
  }
  68% {
    left: var(--penguin-x);
    transform: translate(-50%, -96%) rotate(22deg);
    opacity: 1;
  }
  100% {
    left: var(--penguin-x);
    transform: translate(-50%, 115%) rotate(92deg);
    opacity: .18;
    filter: drop-shadow(0 12px 10px #00101d55) blur(.4px);
  }
}



/* Requested-only patch: avatar-only winner glow, Color Dice headshots, and fixed rakeback card. */
.rakeback-claim-card {
  display: grid;
  gap: 8px;
  padding: 3px 3px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.balance-menu .rakeback-claim-card .claim-rakeback-big {
  width: 100%;
  min-height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 14px !important;
  text-align: center !important;
}
.balance-menu .rakeback-claim-card .rakeback-claim-amount {
  min-height: 30px;
  padding: 0 8px 2px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.color-dice-scoreboard > .color-dice-player-panel {
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
}
.dice-player-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
}
.dice-player-avatar {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #33466d;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #315488, #101728 70%);
  background-position: center;
  background-size: cover;
  box-shadow: 0 10px 24px #0007;
  font-size: 18px;
  font-weight: 1000;
}
.dice-player-avatar-wrap .score-color {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 15px;
  height: 15px;
  border: 2px solid #10182d;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16);
}

.p2p-winner-avatar-glow {
  animation: p2pWinnerAvatarOnlyGlow 1.05s ease-in-out infinite alternate !important;
  border-color: #74ffc2 !important;
}
@keyframes p2pWinnerAvatarOnlyGlow {
  from {
    box-shadow: 0 0 0 2px #45e68a66, 0 0 14px #45e68a66, 0 10px 24px #0007;
    filter: brightness(1.03);
    transform: scale(1);
  }
  to {
    box-shadow: 0 0 0 3px #a6ffdcaa, 0 0 30px #45e68acc, 0 0 48px #52ddff77, 0 10px 24px #0007;
    filter: brightness(1.12);
    transform: scale(1.055);
  }
}

/* Old panel-wide winner glow is intentionally disabled; only the avatar icon may glow. */
.p2p-winner-profile-glow {
  animation: none !important;
  background: inherit !important;
  box-shadow: none !important;
  transform: none;
}


/* Requested patch: balance-only currency icon + custom affiliate link editor. */
.balance-chip .balance-gem-icon {
  border-radius: 50%;
}
.affiliate-custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin-top: 10px;
}
.affiliate-custom-row input {
  min-width: 0;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #050918aa;
  padding: 0 13px;
  color: #c8d4ef;
}
.affiliate-custom-row input:disabled,
.affiliate-custom-row button:disabled {
  opacity: .55;
  cursor: not-allowed;
}
@media(max-width:650px) {
  .affiliate-custom-row { grid-template-columns: 1fr; }
}

/* ----------------------------- CASES ----------------------------- */
.new-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .08em;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  color: #031118;
  font-style: normal;
  vertical-align: middle;
}

.cases-card .game-art,
.cases-heading {
  background: radial-gradient(circle at top left, rgba(34,211,238,.24), transparent 38%), radial-gradient(circle at bottom right, rgba(168,85,247,.22), transparent 42%);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.case-card {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 26px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
  overflow: hidden;
}

.case-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.case-card h3 {
  margin: 4px 0 0;
  font-size: 26px;
}

.case-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(0,0,0,.22);
  font-weight: 800;
  white-space: nowrap;
}

.case-pet-stack {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 14px;
}

.case-stack-img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0,0,0,.35));
  margin-left: -18px;
}
.case-stack-img:first-child { margin-left: 0; }

.case-pet-fallback {
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  border-radius: 22px;
}

.case-odds-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}
.case-odds-list span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.055);
}

.case-open-stage {
  position: fixed;
  inset: 5vh max(16px, 8vw) auto;
  z-index: 80;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  padding: 26px;
  background: rgba(8, 11, 25, .96);
  box-shadow: 0 35px 120px rgba(0,0,0,.65);
  text-align: center;
}
.case-open-stage h2 { margin-top: 4px; }

.case-reel-window {
  position: relative;
  overflow: hidden;
  height: 180px;
  border-radius: 24px;
  margin: 20px 0;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(255,255,255,.05), rgba(0,0,0,.45));
}
.case-reel-track {
  display: flex;
  gap: 12px;
  align-items: stretch;
  height: 100%;
  padding: 16px;
  will-change: transform;
}
.case-reel-item {
  flex: 0 0 138px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 20px;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.08);
}
.case-reel-img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.35));
}
.case-reel-item b {
  font-size: 12px;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-reel-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(#fde68a, #f59e0b, #fde68a);
  box-shadow: 0 0 20px rgba(245,158,11,.8);
}
.case-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(34, 197, 94, .10);
  border: 1px solid rgba(34, 197, 94, .22);
}
.case-result-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}
.case-result span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.case-result strong { display: block; font-size: 28px; }
.case-result p { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0; }

.admin-case-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.admin-case-results,
.admin-case-items {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}
.admin-case-result,
.admin-case-selected {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 8px;
  background: rgba(255,255,255,.05);
  color: inherit;
  text-align: left;
}
.admin-case-result span,
.admin-case-selected div { display: grid; gap: 2px; min-width: 0; }
.admin-case-result small,
.admin-case-selected small { color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.case-admin-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.admin-case-selected {
  grid-template-columns: 52px minmax(120px, 1fr) 95px 76px auto;
}
.admin-case-selected input {
  min-width: 0;
}

@media (max-width: 760px) {
  .case-open-stage { inset: 4vh 10px auto; padding: 18px; }
  .admin-case-selected { grid-template-columns: 48px 1fr; }
  .admin-case-selected input,
  .admin-case-selected button { grid-column: span 2; }
}


/* Color Dice is a real page section, never a floating modal. */
#page-color-dice #color-dice-stage:not(.hidden){
  position:relative!important;
  z-index:1!important;
  left:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  transform:none!important;
  width:100%!important;
  max-height:none!important;
  overflow:visible!important;
  min-height:430px!important;
  margin:22px 0 28px!important;
  box-shadow:0 24px 70px #0007,0 0 70px #287dff1f!important;
  animation:none!important;
}
#page-color-dice #color-dice-stage .stage-close{
  position:absolute;
  float:none;
  top:14px;
  right:14px;
  margin:0;
}
@media(max-width:650px){
  #page-color-dice #color-dice-stage:not(.hidden){min-height:390px!important}
}

/* v11 cases showcase polish */
#page-cases { padding-bottom: 48px; }
#page-cases .cases-heading {
  min-height: 150px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  padding: 26px 28px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 12% 20%, rgba(34,211,238,.16), transparent 32%),
    radial-gradient(circle at 92% 82%, rgba(124,58,237,.18), transparent 34%),
    linear-gradient(145deg, rgba(17,24,45,.96), rgba(8,13,27,.96));
}
#page-cases .cases-heading::after {
  content: '✦';
  position: absolute;
  right: 34px;
  bottom: -34px;
  font-size: 150px;
  line-height: 1;
  color: rgba(255,255,255,.035);
  transform: rotate(12deg);
  pointer-events: none;
}
.cases-grid {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  align-items: stretch;
  gap: 16px;
  margin-top: 18px;
}
.cases-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed rgba(255,255,255,.11);
  border-radius: 22px;
  background: rgba(9,14,29,.72);
  color: var(--muted);
}
.cases-empty strong { color: #eaf1ff; font-size: 17px; }
.case-card {
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(20,28,49,.96), rgba(10,16,31,.98));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.case-card:hover {
  transform: translateY(-3px);
  border-color: rgba(66,211,255,.28);
  box-shadow: 0 24px 55px rgba(0,0,0,.3);
}
.case-card-topline,
.case-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.case-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(42,211,238,.09);
  border: 1px solid rgba(42,211,238,.15);
  color: #82e8f6;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.case-price {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.07);
  padding: 7px 10px;
  font-size: 12px;
}
.case-card-copy { margin: 17px 2px 10px; }
.case-card h3 { margin: 0; font-size: 22px; line-height: 1.15; }
.case-card-copy p {
  min-height: 38px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.case-showcase-art {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 14px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(110,76,255,.13), transparent 55%),
    rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.055);
}
.case-pet-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.case-pet-tile {
  min-width: 0;
  height: 88px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 15px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.055);
}
.case-pet-tile span {
  overflow: hidden;
  color: #eaf1ff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.case-stack-img {
  width: 60px;
  height: 60px;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,.34));
}
.case-more-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(7,11,23,.9);
  border: 1px solid rgba(255,255,255,.09);
  color: #aebbd6;
  font-size: 10px;
  font-weight: 900;
}
.case-card-footer {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}
.case-card-footer .button { min-width: 132px; }
.case-pet-fallback {
  color: #93a4c7;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.06);
}
body.case-stage-open { overflow: hidden; }
.case-open-stage {
  inset: 50% auto auto 50%;
  width: min(920px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  transform: translate(-50%, -50%);
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
  text-align: left;
  background: linear-gradient(180deg, rgba(14,20,37,.99), rgba(7,11,23,.99));
  box-shadow: 0 35px 120px rgba(0,0,0,.72), 0 0 0 9999px rgba(2,5,14,.7);
}
.case-open-stage h2 { margin: 3px 46px 0 0; font-size: 27px; }
.case-reel-window {
  height: auto;
  max-height: 450px;
  overflow: auto;
  margin: 20px 0 14px;
  padding: 10px;
  background: rgba(255,255,255,.018);
  border-radius: 18px;
}
.case-reel-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  height: auto;
  padding: 0;
  transform: none;
}
.case-reel-item {
  min-width: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: 68px minmax(0,1fr) auto;
  place-items: initial;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 15px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.065);
}
.case-reel-img { width: 68px; height: 68px; object-fit: contain; }
.case-reel-item div { min-width: 0; }
.case-reel-item b {
  display: block;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.case-reel-item small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.case-reel-item > span {
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(34,211,238,.08);
  color: #83e8f7;
  font-size: 10px;
  font-weight: 900;
}
.case-result {
  justify-content: flex-start;
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(53,211,153,.07);
}
.case-summary-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(53,211,153,.11);
  font-size: 20px;
}
.case-result strong { font-size: 18px; }
.case-result p { font-size: 11px; }
@media(max-width: 720px) {
  .cases-grid { grid-template-columns: 1fr; }
  #page-cases .cases-heading { padding: 22px; }
  .case-pet-grid, .case-reel-track { grid-template-columns: 1fr; }
  .case-open-stage { inset: 50% auto auto 50%; padding: 18px; }
  .case-reel-item { grid-template-columns: 60px minmax(0,1fr) auto; }
  .case-reel-img { width: 60px; height: 60px; }
}

/* v12 free case previews + rebuilt case builder */
.case-free-price,.case-free-badge{display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(53,211,153,.24);background:rgba(53,211,153,.1);color:#75efbd;font-weight:900;border-radius:999px}.case-free-price{padding:7px 10px;font-size:11px}.case-free-badge{padding:9px 13px;font-size:12px}.case-card-stats{display:flex;justify-content:space-between;gap:10px;margin-top:12px;padding:10px 2px 0;border-top:1px solid rgba(255,255,255,.055);color:#91a0bd;font-size:10px}.case-stage-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.case-stage-description{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.55}.case-preview-machine{position:relative;margin-top:18px;padding:14px 0;border-radius:20px;background:radial-gradient(circle at 50% 50%,rgba(105,76,255,.12),transparent 60%),rgba(255,255,255,.018);border:1px solid rgba(255,255,255,.065);overflow:hidden}.case-preview-machine:before,.case-preview-machine:after{content:"";position:absolute;top:0;bottom:0;width:60px;z-index:3;pointer-events:none}.case-preview-machine:before{left:0;background:linear-gradient(90deg,#0d1425,transparent)}.case-preview-machine:after{right:0;background:linear-gradient(-90deg,#0d1425,transparent)}.case-preview-pointer{position:absolute;left:50%;top:0;bottom:0;width:2px;background:linear-gradient(180deg,#ffd861,#ffb429);z-index:5;box-shadow:0 0 18px rgba(255,190,59,.65)}.case-preview-pointer:before{content:"";position:absolute;left:50%;top:0;transform:translateX(-50%);border-left:8px solid transparent;border-right:8px solid transparent;border-top:10px solid #ffd861}.case-preview-machine .case-reel-window{height:126px;max-height:none;overflow:hidden;margin:0;padding:9px 0;border-radius:0;background:transparent}.case-preview-machine .case-reel-track{display:flex;grid-template-columns:none;gap:10px;width:max-content;height:108px;padding:0 18px;will-change:transform}.case-preview-machine .case-reel-item{flex:0 0 142px;min-width:142px;min-height:108px;display:flex;flex-direction:column;justify-content:center;gap:5px;padding:9px;text-align:center}.case-preview-machine .case-reel-img{width:62px;height:62px;margin:auto}.case-preview-machine .case-reel-item b{font-size:10px;white-space:nowrap}.case-preview-machine .case-reel-item small{justify-content:center;margin:0;font-size:9px}.case-reel-idle{animation:caseIdle 18s linear infinite}.case-reel-spinning{animation:none!important}@keyframes caseIdle{to{transform:translateX(-304px)}}.case-stage-actions{display:flex;align-items:center;gap:14px;margin-top:14px}.case-stage-actions span{color:var(--muted);font-size:11px}.case-result{margin-top:13px}.case-contents{margin-top:18px;padding-top:17px;border-top:1px solid rgba(255,255,255,.065)}.case-contents-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:10px}.case-contents-head span,.case-contents-head small{color:var(--muted);font-size:10px}.case-contents-head strong{display:block;margin-top:3px}.case-contents-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.case-content-item{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:8px;padding:9px;border:1px solid rgba(255,255,255,.06);border-radius:13px;background:rgba(255,255,255,.03)}.case-content-img{width:48px;height:48px;object-fit:contain}.case-content-item div{min-width:0}.case-content-item b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.case-content-item small{display:block;margin-top:3px;color:var(--muted);font-size:9px}
.admin-case-card{grid-column:1/-1;padding:0!important;overflow:hidden}.admin-case-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:23px;background:linear-gradient(135deg,rgba(98,71,255,.12),rgba(30,211,231,.06));border-bottom:1px solid rgba(255,255,255,.07)}.admin-case-heading h3{margin:4px 0 5px;font-size:20px}.admin-case-heading p{margin:0}.case-builder-kicker{font-size:9px;font-weight:900;letter-spacing:.16em;color:#8deafa}.case-builder-safety{display:flex;flex-direction:column;align-items:center;min-width:100px;padding:12px 16px;border-radius:16px;background:rgba(53,211,153,.08);border:1px solid rgba(53,211,153,.16)}.case-builder-safety strong{font-size:23px;color:#72edba}.case-builder-safety span{font-size:9px;color:#9fb0ca}.case-builder-step{display:grid;grid-template-columns:36px minmax(0,1fr);gap:13px;padding:20px 23px;border-bottom:1px solid rgba(255,255,255,.06)}.case-step-number{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:rgba(86,70,255,.16);border:1px solid rgba(121,108,255,.22);font-weight:900;color:#b7afff}.case-step-body{min-width:0}.case-step-body h4{margin:3px 0 5px;font-size:14px}.case-step-body>p,.case-builder-row p{margin:0;color:var(--muted);font-size:10px}.case-builder-fields{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin-top:12px}.case-builder-fields label,.admin-case-selected label{display:grid;gap:6px;color:#95a5c1;font-size:9px;font-weight:800}.case-builder-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.case-source-pill{padding:6px 9px;border-radius:999px;background:rgba(35,211,238,.08);border:1px solid rgba(35,211,238,.15);color:#84e9f6;font-size:9px;font-weight:900}.admin-case-search-row{margin-top:12px;grid-template-columns:minmax(0,1fr) auto}.admin-case-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-height:315px;overflow:auto;gap:8px;margin-top:10px;padding:8px}.admin-case-result{position:relative;grid-template-columns:52px minmax(0,1fr) 24px;text-align:left}.admin-case-result>b{display:grid;place-items:center;width:22px;height:22px;border-radius:8px;background:rgba(82,71,255,.15);color:#c2bcff}.admin-case-result.is-selected{opacity:.55}.case-builder-summary{display:flex;flex-wrap:wrap;gap:8px;margin:11px 0}.case-builder-summary span{padding:7px 9px;border:1px solid rgba(255,255,255,.06);border-radius:10px;background:rgba(255,255,255,.025);font-size:9px;color:var(--muted)}.case-builder-summary b{color:#eaf1ff}.case-builder-summary b.is-warning{color:#ffca68}.admin-case-items{display:grid;gap:8px;max-height:420px;overflow:auto}.admin-case-selected{position:relative;grid-template-columns:minmax(210px,1.6fr) minmax(120px,.8fr) minmax(120px,.7fr) 34px;gap:9px;padding:10px}.admin-case-selected-main{display:grid!important;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:9px}.admin-case-selected-main small{margin-top:3px}.admin-case-selected input{width:100%;height:38px}.case-chance-input{position:relative}.case-chance-input b{position:absolute;right:11px;top:50%;transform:translateY(-50%);font-size:10px;color:var(--muted)}.case-chance-input input{padding-right:25px}.case-remove-button{align-self:end;width:34px;height:38px;border:1px solid rgba(255,104,130,.14);border-radius:10px;background:rgba(255,104,130,.07);color:#ff8ca0;font-size:18px;cursor:pointer}.admin-case-live-preview{min-height:140px;display:flex;align-items:center;justify-content:space-between;gap:15px;margin:12px 0;padding:16px;border:1px solid rgba(255,255,255,.07);border-radius:17px;background:radial-gradient(circle at 85% 50%,rgba(97,72,255,.15),transparent 45%),rgba(255,255,255,.025)}.admin-preview-copy{min-width:0}.admin-preview-copy h4{margin:10px 0 5px;font-size:18px}.admin-preview-copy p{max-width:390px;margin:0;color:var(--muted);font-size:10px}.admin-preview-pets{display:flex;align-items:center;justify-content:flex-end;min-width:220px}.admin-preview-img{width:70px;height:70px;object-fit:contain;margin-left:-18px;filter:drop-shadow(0 10px 14px rgba(0,0,0,.35))}.admin-preview-img:first-child{margin-left:0}.admin-preview-pets>b{display:grid;place-items:center;width:44px;height:44px;margin-left:-9px;border-radius:50%;background:#111a2d;border:1px solid rgba(255,255,255,.09);font-size:10px}.case-builder-preview-step{border-bottom:0}
@media(max-width:800px){.case-contents-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-case-results{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-case-selected{grid-template-columns:1fr 1fr}.admin-case-selected-main{grid-column:1/-1}.case-remove-button{position:absolute;right:8px;top:8px}.case-builder-fields{grid-template-columns:1fr}}
@media(max-width:560px){.case-stage-actions,.case-contents-head,.admin-case-heading,.case-builder-row,.admin-case-live-preview{align-items:stretch;flex-direction:column}.case-stage-actions .button{width:100%}.case-contents-grid,.admin-case-results{grid-template-columns:1fr}.case-builder-step{grid-template-columns:1fr;padding:17px}.case-step-number{display:none}.admin-case-selected{grid-template-columns:1fr}.admin-case-selected label{grid-column:1}.admin-preview-pets{justify-content:flex-start;min-width:0}.admin-preview-img{width:58px;height:58px}}

.case-image-wrap{display:inline-grid;place-items:center;position:relative}
.case-image-wrap>*{grid-area:1/1}
.case-pet-fallback{display:grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,rgba(93,74,255,.22),rgba(24,208,231,.18));border:1px solid rgba(255,255,255,.08);font-weight:900;color:#f2f5ff;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}


/* v15 case reel: true horizontal spin with fixed center landing line */
.case-preview-machine{
  isolation:isolate;
}
.case-preview-pointer{
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:2px;
  transform:translateX(-1px);
  z-index:8;
  pointer-events:none;
  border:0;
  border-radius:0;
  background:linear-gradient(180deg,#ffe180 0%,#ffbb32 48%,#ffe180 100%);
  box-shadow:0 0 8px rgba(255,196,53,.78),0 0 22px rgba(255,180,28,.38);
}
.case-preview-pointer:before,
.case-preview-pointer:after{
  content:"";
  position:absolute;
  left:50%;
  width:0;
  height:0;
  transform:translateX(-50%);
  filter:drop-shadow(0 0 6px rgba(255,195,48,.65));
}
.case-preview-pointer:before{
  top:0;
  border-left:8px solid transparent;
  border-right:8px solid transparent;
  border-top:10px solid #ffd35d;
}
.case-preview-pointer:after{
  bottom:0;
  border-left:8px solid transparent;
  border-right:8px solid transparent;
  border-bottom:10px solid #ffd35d;
}
.case-preview-machine .case-reel-track{
  transform:translate3d(0,0,0);
  backface-visibility:hidden;
  perspective:1000px;
}
.case-preview-machine .case-reel-item{
  backface-visibility:hidden;
  transform:translateZ(0);
  transition:filter .38s ease,opacity .38s ease,transform .28s ease,box-shadow .28s ease,border-color .28s ease;
}
.case-preview-machine.is-fast .case-reel-item{
  filter:blur(.65px) saturate(.92) brightness(.94);
  opacity:.96;
}
.case-preview-machine.is-slowing .case-reel-item{
  filter:blur(.15px) saturate(.98);
  opacity:1;
}
.case-preview-machine.is-spinning .case-preview-pointer{
  animation:caseCenterLineGlow .34s ease-in-out infinite alternate;
}
.case-preview-machine.has-landed .case-preview-pointer{
  animation:caseLandingFlash .68s ease-out 1;
}
.case-preview-machine .case-reel-item.is-winner{
  transform:translateY(-4px) scale(1.035);
  border-color:rgba(255,214,111,.78);
  box-shadow:0 15px 34px rgba(255,186,42,.24),inset 0 0 0 1px rgba(255,225,151,.24);
  filter:none;
  opacity:1;
}
.case-reel-idle{
  animation:none!important;
  transform:translate3d(0,0,0)!important;
}
.case-reel-spinning{
  animation:none!important;
}
@keyframes caseCenterLineGlow{
  from{box-shadow:0 0 6px rgba(255,196,53,.62),0 0 14px rgba(255,180,28,.25)}
  to{box-shadow:0 0 11px rgba(255,223,125,.96),0 0 29px rgba(255,180,28,.52)}
}
@keyframes caseLandingFlash{
  0%{box-shadow:0 0 8px rgba(255,196,53,.72),0 0 20px rgba(255,180,28,.32)}
  42%{box-shadow:0 0 16px rgba(255,241,183,1),0 0 44px rgba(255,185,36,.78)}
  100%{box-shadow:0 0 8px rgba(255,196,53,.78),0 0 22px rgba(255,180,28,.38)}
}

/* v16: the case reel uses Web Animations instead of CSS transitions. */
.case-preview-machine .case-reel-track{
  transition:none!important;
  transform:translate3d(0,0,0);
  will-change:transform;
}
.case-preview-machine.is-spinning .case-reel-window{
  box-shadow:inset 0 0 28px rgba(80,92,255,.08);
}
.case-preview-machine.is-fast .case-reel-item{
  filter:blur(.45px) saturate(.94) brightness(.96);
}
.case-preview-machine.is-slowing .case-reel-item{
  filter:none;
}

.case-free-price,.case-free-badge{gap:6px}.case-free-price .gem-icon,.case-free-badge .gem-icon{width:14px;height:14px}


/* v19 compact chest case gallery */
#page-cases{padding-bottom:72px;overflow:visible}
.cases-heading-actions{position:relative;z-index:2;display:flex;align-items:center;gap:10px}
.case-sort-control{display:flex;align-items:center;gap:8px;min-height:36px;padding:4px 6px 4px 11px;border:1px solid rgba(255,255,255,.1);border-radius:11px;background:rgba(8,13,28,.52);color:#95a7c8;font-size:10px;font-weight:800}
.case-sort-control select{height:28px;padding:0 28px 0 9px;border:0;border-radius:8px;background:rgba(255,255,255,.07);color:#eef3ff;font:inherit;cursor:pointer;outline:none}
.case-sort-control option{background:#11182a;color:#eef3ff}
#page-cases .cases-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;align-items:stretch;margin-top:18px;max-height:none!important;overflow:visible!important;padding:0!important}
#page-cases .case-card{appearance:none;width:100%;min-width:0;min-height:0;padding:16px 14px 15px;border:1px solid rgba(255,255,255,.085);border-radius:20px;background:linear-gradient(180deg,rgba(24,32,58,.97),rgba(10,15,29,.99));color:#eef3ff;text-align:center;cursor:pointer;box-shadow:0 16px 34px rgba(0,0,0,.22);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
#page-cases .case-card:hover{transform:translateY(-4px);border-color:hsl(var(--case-hue) 78% 63% / .38);box-shadow:0 20px 42px rgba(0,0,0,.32),0 0 30px hsl(var(--case-hue) 80% 50% / .1)}
#page-cases .case-card:focus-visible{outline:2px solid hsl(var(--case-hue) 85% 66%);outline-offset:3px}
#page-cases .case-card h3{height:42px;display:grid;place-items:center;margin:0 4px 7px;overflow:hidden;font-size:17px;line-height:1.2;text-overflow:ellipsis}
.case-chest-stage{position:relative;height:190px;display:grid;place-items:center;margin:0 -1px 12px;overflow:hidden;border-radius:17px;background:radial-gradient(circle at 50% 51%,hsl(var(--case-hue) 84% 58% / .23),transparent 45%),linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012));border:1px solid rgba(255,255,255,.055);isolation:isolate}
.case-chest-glow{position:absolute;inset:20% 16%;border-radius:50%;background:hsl(var(--case-hue) 85% 58% / .24);filter:blur(24px);z-index:-1}
.case-chest-image{position:absolute;width:91%;height:91%;object-fit:contain;filter:hue-rotate(var(--case-hue-shift)) saturate(1.32) brightness(1.03) drop-shadow(0 16px 16px rgba(0,0,0,.42));transform:translateY(3px);pointer-events:none}
.case-chest-pet{position:absolute;left:50%;top:48%;width:74px;height:74px;display:grid;place-items:center;transform:translate(-50%,-50%);z-index:2;filter:drop-shadow(0 7px 8px rgba(0,0,0,.5));pointer-events:none}
.case-chest-pet .case-image-wrap{width:100%;height:100%}
.case-chest-pet-img{width:74px;height:74px;object-fit:contain}
.case-card-price{height:46px;display:flex;align-items:center;justify-content:center;gap:8px;margin-top:2px;border:1px solid hsl(var(--case-hue) 75% 65% / .18);border-radius:12px;background:linear-gradient(180deg,hsl(var(--case-hue) 55% 56% / .17),rgba(255,255,255,.045));font-size:17px;color:#ffd36b}
.case-card-price .gem-icon{width:24px!important;height:24px!important;object-fit:contain;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.case-card-price strong{font-size:17px;letter-spacing:.01em}
.case-card-rewards{display:block;margin-top:9px;color:#8192b2;font-size:9px;font-weight:700}
.case-free-price,.case-free-badge,.case-reel-item small,.case-result p,.admin-case-selected small,.admin-case-result small{background:transparent!important}
.gem-icon{background:transparent!important;border:0!important;box-shadow:none!important}
body.cases-page-active{scrollbar-width:none}
body.cases-page-active::-webkit-scrollbar{width:0;height:0}
@media(max-width:820px){#page-cases .cases-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cases-heading-actions{align-items:stretch;flex-direction:column}.case-sort-control{justify-content:space-between}}
@media(max-width:510px){#page-cases .cases-grid{grid-template-columns:1fr}.case-chest-stage{height:210px}}

/* ======================= VERSION 20 UI ======================= */
.nav-button{grid-template-columns:1fr!important;padding:0 15px}.nav-button b{font-size:13px}.nav-button span{display:none!important}
body.sidebar-collapsed .nav-button{padding:0 8px;text-align:center}body.sidebar-collapsed .nav-button b{display:block;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.compact-game-heading{margin-bottom:14px}.compact-game-heading h1{margin-bottom:0}.p2p-choice-create{margin-top:0}.p2p-choice-create>div:first-child p:last-child{display:none}
.wager-range{margin:9px 0 0;color:#aebbd4;font-size:10px;line-height:1.45}.wager-range.hidden{display:none!important}
.p2p-actions .p2p-cancel,.p2p-cancel{background:#ff55781a!important;border-color:#ff557855!important;color:#ff9bad!important}
.p2p-status{display:flex!important;flex-direction:column;gap:3px;align-items:center;justify-content:center}.p2p-status small{font-size:9px;font-weight:900;color:#b8c5df}
.p2p-bet-breakdown{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;margin:18px 0 10px}.p2p-bet-entry{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;padding:12px 14px;border:1px solid #2a324a;border-radius:12px;background:#0c1222cc}.p2p-bet-entry.is-winner{border-color:#52ddff88;box-shadow:0 0 22px #52ddff1f}.p2p-bet-entry .p2p-bet-name{font-size:11px;font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p2p-bet-entry strong{display:inline-flex;align-items:center;gap:5px;justify-self:end;font-size:12px}.p2p-bet-entry strong .gem-icon{width:17px;height:17px}.p2p-bet-entry small{grid-column:1/-1;color:#8f9dbd;font-size:9px}
.coin-stage #coin-result-title,.color-dice-stage #color-dice-result-title{margin-top:8px}.coin-stage,.color-dice-stage{padding-bottom:22px!important}

.dice-spin-interlude{position:absolute;inset:0;z-index:12;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(circle,#0e3d80e8 0,#091226f4 56%,#050914fc 100%);backdrop-filter:blur(5px)}.dice-spin-interlude.hidden{display:none!important}.dice-spin-interlude img{width:150px;height:150px;object-fit:contain;filter:drop-shadow(0 0 30px #45c9ff);animation:diceSpinOrbit 3s cubic-bezier(.2,.72,.18,1) both}.dice-spin-interlude strong{margin-top:-5px;font-size:25px;letter-spacing:.04em;text-transform:uppercase;color:#9eeeff;text-shadow:0 0 20px #2ab9ff}.dice-spin-interlude span{margin-top:5px;color:#b9c8df;font-size:10px}.case-preview-machine.dice-spin-active .case-preview-pointer{opacity:.22}.case-reel-item[data-preview-item="__dice_spin__"]{border-color:#42cfff88!important;background:radial-gradient(circle at 50% 35%,#218be55c,#10192c 65%)!important;box-shadow:0 0 30px #2fc7ff29!important}.case-reel-item[data-preview-item="__dice_spin__"] .case-reel-img{filter:drop-shadow(0 0 14px #57dfff)}
@keyframes diceSpinOrbit{0%{transform:translateX(-180px) rotateX(0) rotateY(0) rotateZ(-35deg) scale(.45);opacity:0}18%{opacity:1}42%{transform:translateX(42px) translateY(-22px) rotateX(360deg) rotateY(540deg) rotateZ(160deg) scale(1.18)}72%{transform:translateX(-24px) translateY(8px) rotateX(720deg) rotateY(900deg) rotateZ(310deg) scale(.96)}100%{transform:translateX(0) translateY(0) rotateX(1080deg) rotateY(1260deg) rotateZ(360deg) scale(1);opacity:1}}

.admin-affiliate-card{grid-column:1/-1!important;display:grid;grid-template-columns:minmax(240px,.72fr) minmax(0,1.4fr);gap:20px}.admin-affiliate-controls{padding-right:20px;border-right:1px solid rgba(255,255,255,.07)}.admin-affiliate-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.button.danger{background:linear-gradient(135deg,#a72b4c,#ff5578)}.admin-affiliate-log{display:grid;gap:7px;max-height:300px;overflow:auto;margin-top:12px;padding-right:4px;scrollbar-width:none}.admin-affiliate-log::-webkit-scrollbar{display:none}.affiliate-log-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px;border:1px solid rgba(255,255,255,.06);border-radius:11px;background:rgba(255,255,255,.025)}.affiliate-log-row>div{display:grid}.affiliate-log-row small,.affiliate-log-row time{color:#8f9dbd;font-size:8px}.affiliate-log-row b{color:#62eaa2;font-size:11px}.affiliate-log-row time{white-space:nowrap}

@media(max-width:920px){.admin-affiliate-card{grid-template-columns:1fr}.admin-affiliate-controls{padding-right:0;padding-bottom:18px;border-right:0;border-bottom:1px solid rgba(255,255,255,.07)}}
@media(max-width:650px){.sidebar .nav-button{grid-template-columns:1fr!important;padding:0 15px}.p2p-bet-breakdown{grid-template-columns:1fr}.affiliate-log-row{grid-template-columns:1fr auto}.affiliate-log-row time{grid-column:1/-1}.dice-spin-interlude img{width:120px;height:120px}}

/* ----------------------------- v21 ----------------------------- */
.p2p-bot{border:1px solid rgba(84,214,255,.22);background:rgba(48,168,224,.11);color:#8deaff}
.dice-spin-card{border-color:rgba(61,203,255,.48)!important;background:radial-gradient(circle at 50% 32%,rgba(40,154,235,.34),rgba(14,23,43,.96) 68%)!important;box-shadow:inset 0 0 0 1px rgba(82,218,255,.08),0 0 24px rgba(42,185,255,.13)!important}
.dice-spin-card .case-image-wrap{filter:drop-shadow(0 0 14px rgba(72,213,255,.7))}
.dice-spin-content{border-color:rgba(60,201,255,.28)!important;background:linear-gradient(135deg,rgba(34,151,226,.12),rgba(255,255,255,.025))!important}
.dice-spin-source-hidden{visibility:hidden!important}
.dice-spin-focus-clone{position:fixed;z-index:10050;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;transform-origin:center;border:1px solid rgba(107,226,255,.42);border-radius:20px;background:radial-gradient(circle at 50% 35%,rgba(31,151,238,.48),rgba(4,10,24,.96) 70%);box-shadow:0 0 0 9999px rgba(2,5,15,.42),0 0 60px rgba(67,206,255,.5);will-change:transform,filter}
.dice-spin-focus-clone img{width:72%;height:72%;object-fit:contain}
.dice-spin-focus-clone strong{position:absolute;bottom:8%;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:#b6f4ff;text-shadow:0 0 14px #35c5ff}
.dice-spin-return-flash{animation:diceReturnFlash .45s ease}
@keyframes diceReturnFlash{50%{filter:drop-shadow(0 0 28px #63e2ff) brightness(1.35)}}

.battle-heading{background:linear-gradient(135deg,rgba(26,142,183,.17),rgba(82,55,184,.16));border:1px solid rgba(105,207,255,.12)}
.battle-heading-actions{display:flex;align-items:center;gap:10px}
.case-battle-lobbies{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.case-battle-lobby{position:relative;overflow:hidden;padding:16px;border:1px solid rgba(255,255,255,.075);border-radius:18px;background:linear-gradient(160deg,rgba(23,31,56,.98),rgba(8,13,26,.98));box-shadow:0 16px 34px rgba(0,0,0,.22)}
.case-battle-lobby:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 88% 8%,rgba(62,204,255,.08),transparent 38%)}
.case-battle-lobby.is-crazy{border-color:rgba(255,106,213,.2);background:linear-gradient(160deg,rgba(48,24,65,.98),rgba(11,11,27,.98))}
.battle-lobby-top,.battle-lobby-footer,.battle-picker-head,.battle-selected-head,.battle-builder-footer,.case-battle-stage-head,.case-battle-round-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.battle-lobby-top>div:first-child{display:grid;gap:3px}.battle-lobby-top span{font-size:9px;font-weight:900;letter-spacing:.13em;color:#68dcff}.case-battle-lobby.is-crazy .battle-lobby-top span{color:#ff8ae0}.battle-lobby-top strong{font-size:18px}.battle-lobby-top>div:last-child{display:flex;align-items:center;gap:6px;padding:7px 9px;border-radius:10px;background:rgba(255,255,255,.035);font-size:13px}.battle-lobby-top .gem-icon{width:17px;height:17px}
.battle-lobby-cases{display:flex;align-items:center;min-height:62px;margin:14px 0;padding:9px 10px;border:1px solid rgba(255,255,255,.055);border-radius:13px;background:rgba(255,255,255,.022)}.battle-lobby-cases>span{display:grid;place-items:center;width:48px;height:48px;margin-left:-10px;border-radius:12px;background:rgba(21,28,49,.92);border:1px solid rgba(255,255,255,.06)}.battle-lobby-cases>span:first-child{margin-left:0}.battle-lobby-case-img{width:42px;height:42px;object-fit:contain}.battle-lobby-cases>b{display:grid;place-items:center;width:38px;height:38px;margin-left:-8px;border-radius:50%;background:#111a2e;font-size:10px}
.battle-lobby-players{display:flex;align-items:center;gap:8px;overflow:hidden}.battle-seat{display:grid;place-items:center;gap:4px;min-width:58px}.battle-seat>span{display:grid;place-items:center;width:43px;height:43px;overflow:hidden;border-radius:50%;background:#11192b;border:2px solid rgba(255,255,255,.08);font-weight:900;color:#8190ad}.battle-seat>span img{width:100%;height:100%;object-fit:cover}.battle-seat small{max-width:64px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;color:#8f9db8}.battle-seat.team-0>span{border-color:#5ce6ff88}.battle-seat.team-1>span{border-color:#a680ff88}.battle-seat.team-2>span{border-color:#ffb65c88}.battle-seat.team-3>span{border-color:#ff75c888}
.battle-lobby-footer{margin-top:13px;padding-top:12px;border-top:1px solid rgba(255,255,255,.055)}.battle-lobby-footer>span{font-size:9px;color:#8c9ab5}.battle-lobby-footer>div{display:flex;gap:7px}.battle-action{height:34px;padding:0 12px;border-radius:10px;border:1px solid rgba(255,255,255,.08);font-size:9px;font-weight:900;cursor:pointer}.battle-action.primary{background:#5f65ff;color:white}.battle-action.secondary{background:rgba(78,210,255,.09);color:#8feaff}.battle-action.danger{background:rgba(255,85,117,.08);color:#ff8da2}

.battle-builder-overlay{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;padding:24px;background:rgba(3,7,17,.82);backdrop-filter:blur(10px)}.battle-builder-panel{position:relative;width:min(1050px,96vw);max-height:92vh;overflow:auto;padding:23px;border:1px solid rgba(255,255,255,.09);border-radius:22px;background:linear-gradient(160deg,#141c33,#090e1d 72%);box-shadow:0 30px 90px rgba(0,0,0,.55)}.battle-builder-head h2{margin:4px 0 17px}.battle-builder-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:14px}.battle-builder-grid>section{min-width:0;padding:15px;border:1px solid rgba(255,255,255,.06);border-radius:16px;background:rgba(255,255,255,.025)}.battle-field{display:grid;gap:7px;font-size:9px;color:#92a3c1}.battle-field select,.battle-picker-head select{height:42px;border:1px solid rgba(255,255,255,.08);border-radius:11px;background:#10182b;color:#f2f5ff;padding:0 11px}.battle-crazy-toggle{display:flex;align-items:center;gap:10px;margin-top:11px;padding:12px;border:1px solid rgba(255,113,218,.14);border-radius:13px;background:rgba(255,76,198,.055);cursor:pointer}.battle-crazy-toggle input{width:18px;height:18px}.battle-crazy-toggle span{display:grid;gap:3px}.battle-crazy-toggle b{font-size:11px}.battle-crazy-toggle small{font-size:9px;color:#9aabc6}.battle-selected-head,.battle-picker-head{margin:16px 0 9px}.battle-selected-head>div,.battle-picker-head>div{display:grid;gap:3px}.battle-selected-head span,.battle-picker-head span{font-size:9px;color:#8d9db8}.battle-selected-head strong,.battle-picker-head strong{font-size:13px}.battle-picker-head label{display:flex;align-items:center;gap:7px;font-size:9px;color:#8d9db8}.battle-picker-head select{height:34px}
.battle-selected-list{display:grid;gap:7px;max-height:330px;overflow:auto;scrollbar-width:none}.battle-selected-list::-webkit-scrollbar,.battle-case-picker::-webkit-scrollbar{display:none}.battle-selected-row{display:grid;grid-template-columns:28px minmax(0,1fr) 30px;align-items:center;gap:8px;padding:8px;border:1px solid rgba(255,255,255,.055);border-radius:11px;background:rgba(255,255,255,.025)}.battle-selected-row>span{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:rgba(93,99,255,.14);font-size:9px;font-weight:900}.battle-selected-row>div{min-width:0}.battle-selected-row strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.battle-selected-row small{display:flex;align-items:center;gap:4px;margin-top:3px;font-size:8px;color:#8fa0bc}.battle-selected-row small .gem-icon{width:12px;height:12px}.battle-selected-row button{width:28px;height:28px;border:0;border-radius:8px;background:rgba(255,87,120,.08);color:#ff8fa5;cursor:pointer}
.battle-case-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:450px;overflow:auto;scrollbar-width:none}.battle-picker-card{min-width:0;padding:10px;border:1px solid rgba(255,255,255,.055);border-radius:13px;background:rgba(255,255,255,.025);color:#eef3ff;text-align:left;cursor:pointer;transition:.16s ease}.battle-picker-card:hover{transform:translateY(-2px);border-color:rgba(92,214,255,.23);background:rgba(75,192,238,.055)}.battle-picker-card>div{position:relative;display:grid;place-items:center;height:75px}.battle-picker-img{width:68px;height:68px;object-fit:contain}.battle-picker-card>div>span{position:absolute;right:2px;top:2px;display:grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:9px;background:#5b62ff;font-size:10px;font-weight:900}.battle-picker-card>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.battle-picker-card>small{display:flex;align-items:center;gap:4px;margin-top:5px;font-size:9px;color:#9fb0cc}.battle-picker-card .gem-icon{width:13px;height:13px}.battle-builder-footer{margin-top:14px;padding:14px;border:1px solid rgba(255,255,255,.06);border-radius:15px;background:rgba(255,255,255,.025)}.battle-builder-footer>div{display:grid;gap:4px}.battle-builder-footer span{font-size:9px;color:#92a2bd}.battle-builder-footer strong{display:flex;align-items:center;gap:5px;font-size:18px}.battle-builder-footer .gem-icon{width:19px;height:19px}

.case-battle-stage{position:fixed;inset:0;z-index:9200;overflow:auto;padding:26px clamp(14px,3vw,46px) 40px;background:radial-gradient(circle at 50% 0,rgba(64,77,157,.24),transparent 42%),#080d1b;scrollbar-width:none}.case-battle-stage::-webkit-scrollbar{display:none}.case-battle-stage>.stage-close{position:fixed;right:20px;top:18px}.case-battle-stage-head{padding:9px 46px 17px 0;border-bottom:1px solid rgba(255,255,255,.07)}.case-battle-stage-head h2{margin:3px 0 0;font-size:28px}.battle-stage-meta{display:flex;gap:8px}.battle-stage-meta>span{display:flex;align-items:center;gap:5px;padding:8px 11px;border:1px solid rgba(255,255,255,.08);border-radius:11px;background:rgba(255,255,255,.035);font-size:10px;font-weight:900}.battle-stage-meta .gem-icon{width:15px;height:15px}.case-battle-round-head{margin:18px 0 12px}.case-battle-round-head>div:first-child{display:grid;gap:3px}.case-battle-round-head span{font-size:9px;color:#75dcff;text-transform:uppercase;letter-spacing:.12em}.case-battle-round-head strong{font-size:17px}.case-battle-round-head>div:last-child{font-size:11px;color:#9aa9c3}
.case-battle-columns{display:grid;grid-template-columns:repeat(var(--battle-columns),minmax(175px,1fr));gap:9px;min-width:max-content}.battle-player-column{width:min(250px,calc((100vw - 80px)/var(--battle-columns)));min-width:175px;overflow:hidden;border:1px solid rgba(255,255,255,.07);border-radius:17px;background:linear-gradient(180deg,rgba(23,31,58,.98),rgba(9,14,27,.99));transition:.25s ease}.battle-player-column header{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:8px;padding:10px;border-bottom:1px solid rgba(255,255,255,.055)}.battle-player-avatar{width:42px;height:42px;overflow:hidden;border-radius:50%;background:#111a2d;border:2px solid rgba(255,255,255,.1)}.battle-player-avatar img{width:100%;height:100%;object-fit:cover}.battle-player-avatar span{display:grid;place-items:center;width:100%;height:100%;font-weight:900}.battle-player-column header>div:nth-child(2){min-width:0}.battle-player-column header strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.battle-player-column header small{display:block;margin-top:3px;color:#8fa0bc;font-size:8px}.battle-player-column header>b{display:flex;align-items:center;gap:4px;font-size:9px}.battle-player-column header .gem-icon{width:13px;height:13px}.battle-player-column.team-0{border-top-color:#54dfff66}.battle-player-column.team-1{border-top-color:#a378ff66}.battle-player-column.team-2{border-top-color:#ffb05c66}.battle-player-column.team-3{border-top-color:#ff70c466}
.battle-reel-window{position:relative;height:330px;overflow:hidden;background:linear-gradient(180deg,rgba(8,12,26,.8),rgba(16,22,42,.9));box-shadow:inset 0 20px 35px rgba(0,0,0,.22),inset 0 -20px 35px rgba(0,0,0,.22)}.battle-reel-window:before,.battle-reel-window:after{content:"";position:absolute;left:0;right:0;height:65px;z-index:3;pointer-events:none}.battle-reel-window:before{top:0;background:linear-gradient(#080d1bdd,transparent)}.battle-reel-window:after{bottom:0;background:linear-gradient(transparent,#080d1bdd)}.battle-reel-track{display:flex;flex-direction:column;gap:10px;padding:9px;will-change:transform}.battle-reel-card{flex:0 0 102px;display:grid;grid-template-columns:68px minmax(0,1fr);align-items:center;gap:8px;padding:9px;border:1px solid rgba(255,255,255,.065);border-radius:14px;background:rgba(255,255,255,.035)}.battle-reel-card.is-winner{border-color:rgba(255,210,96,.7);box-shadow:0 0 26px rgba(255,190,58,.18),inset 0 0 0 1px rgba(255,225,136,.15)}.battle-reel-img{width:65px;height:65px;object-fit:contain}.battle-reel-card>div{min-width:0}.battle-reel-card b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}.battle-reel-card small{display:flex;align-items:center;gap:4px;margin-top:4px;font-size:8px;color:#91a1bd}.battle-reel-card small .gem-icon{width:12px;height:12px}.battle-reel-marker{position:absolute;left:7px;right:7px;top:50%;z-index:4;height:108px;transform:translateY(-50%);border-top:1px solid rgba(255,207,82,.75);border-bottom:1px solid rgba(255,207,82,.75);pointer-events:none}.battle-reel-marker:before,.battle-reel-marker:after{content:"";position:absolute;top:50%;transform:translateY(-50%);border-top:7px solid transparent;border-bottom:7px solid transparent}.battle-reel-marker:before{left:-1px;border-left:9px solid #ffd45e}.battle-reel-marker:after{right:-1px;border-right:9px solid #ffd45e}.battle-pull-history{display:flex;align-items:center;min-height:46px;gap:4px;padding:7px;overflow:hidden;border-top:1px solid rgba(255,255,255,.055)}.battle-pull-history>span{display:grid;place-items:center;min-width:31px;width:31px;height:31px;border-radius:8px;background:rgba(255,255,255,.035)}.battle-history-img{width:29px;height:29px;object-fit:contain}.battle-player-column.battle-winner-column{border-color:rgba(98,236,171,.48);box-shadow:0 0 35px rgba(60,226,148,.12)}
.case-battle-summary{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:18px;padding:18px;border:1px solid rgba(83,229,167,.22);border-radius:18px;background:linear-gradient(135deg,rgba(50,197,137,.11),rgba(87,94,255,.08))}.case-battle-summary span{font-size:9px;color:#75eaba;letter-spacing:.12em}.case-battle-summary h3{margin:4px 0 5px;font-size:23px}.case-battle-summary p{margin:0;color:#98a8c3;font-size:10px}.battle-summary-prize{display:grid;justify-items:end;gap:4px}.battle-summary-prize strong{display:flex;align-items:center;gap:6px;font-size:23px}.battle-summary-prize .gem-icon{width:22px;height:22px}

@media(max-width:1000px){.case-battle-lobbies{grid-template-columns:1fr}.battle-builder-grid{grid-template-columns:1fr}.case-battle-columns{overflow-x:auto;padding-bottom:8px;scrollbar-width:none}.case-battle-columns::-webkit-scrollbar{display:none}.battle-player-column{width:215px}}
@media(max-width:650px){.battle-heading-actions,.battle-lobby-footer,.case-battle-stage-head,.case-battle-summary{align-items:stretch;flex-direction:column}.battle-heading-actions .button{width:100%}.battle-builder-overlay{padding:8px}.battle-builder-panel{padding:17px}.battle-case-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.case-battle-stage{padding:18px 10px 30px}.battle-stage-meta{justify-content:flex-start}.battle-summary-prize{justify-items:start}.battle-player-column{min-width:190px;width:190px}.battle-reel-window{height:295px}}

/* ---------------------------- V22 UI ---------------------------- */
.dice-spin-flow{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 0 16px;padding:12px;border:1px solid rgba(83,214,255,.14);border-radius:15px;background:linear-gradient(135deg,rgba(35,185,237,.07),rgba(97,72,255,.06))}.dice-spin-flow>div{display:flex;align-items:center;gap:7px;color:#e9f6ff;font-size:10px;font-weight:900}.dice-spin-flow b{display:grid;place-items:center;width:23px;height:23px;border-radius:8px;background:rgba(71,204,255,.13);color:#79e4ff}.dice-spin-flow i{font-style:normal;color:#6f7f9d;font-size:15px}
.battle-home-art span:first-child,.upgrader-home-art span:first-child{display:grid;place-items:center;width:72px;height:72px;border-radius:22px;background:linear-gradient(145deg,#274c90,#6b4cf8);font-size:21px;font-weight:1000}.upgrader-home-art span:first-child{background:linear-gradient(145deg,#1bbd78,#67e988);font-size:35px}.upgrader-home-art span:last-child{color:#63e8ff}
.case-battle-lobbies{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.case-battle-lobby{min-height:245px;padding:15px}.battle-lobby-cases{min-height:78px}.battle-lobby-players{display:grid;grid-template-columns:repeat(auto-fit,minmax(55px,1fr));gap:6px}.battle-seat{min-width:0}.battle-lobby-footer>div{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.case-battle-stage{display:flex;flex-direction:column;align-items:stretch}.case-battle-stage-head,.case-battle-round-head,.battle-stage-controls,.case-battle-columns,.case-battle-summary{width:min(100%,1440px);margin-left:auto;margin-right:auto}.case-battle-columns{display:grid;grid-template-columns:repeat(var(--battle-columns),minmax(0,1fr));gap:8px;min-width:0;overflow:visible}.battle-player-column{width:auto;min-width:0;max-width:none}.battle-player-column header{grid-template-columns:42px minmax(0,1fr) auto}.battle-reel-window{height:330px}.battle-reel-card{min-height:102px}.battle-reel-img{width:64px;height:64px}.battle-pull-history{min-height:47px}
.battle-stage-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;padding:14px 16px;border:1px solid rgba(83,214,255,.12);border-radius:16px;background:rgba(17,25,47,.78)}.battle-stage-controls>div:first-child{display:grid;gap:3px}.battle-stage-controls span{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:#6edfff}.battle-stage-controls strong{font-size:13px}.battle-stage-controls>div:last-child{display:flex;gap:8px}
.battle-waiting-seat{min-height:330px}.battle-waiting-seat.is-empty{border-style:dashed;background:linear-gradient(180deg,rgba(20,29,52,.75),rgba(9,14,27,.78))}.battle-seat-ready,.battle-empty-seat-action{display:grid;place-items:center;align-content:center;gap:8px;min-height:245px;padding:18px;text-align:center}.battle-seat-ready>span{font-size:22px;font-weight:1000;color:#77e6b8}.battle-seat-ready small,.battle-seat-waiting-copy{max-width:150px;color:#8494b1;font-size:9px;line-height:1.5}.battle-empty-seat-action .button{min-width:110px}.battle-waiting-lineup{width:100%}.battle-waiting-lineup>span{display:block;margin-bottom:10px}.battle-waiting-lineup>div{display:flex;gap:8px;overflow-x:auto;padding-bottom:3px;scrollbar-width:none}.battle-waiting-lineup>div::-webkit-scrollbar{display:none}.battle-waiting-lineup article{position:relative;display:grid;grid-template-columns:24px 44px minmax(80px,1fr);align-items:center;gap:7px;min-width:180px;padding:8px;border:1px solid rgba(255,255,255,.065);border-radius:12px;background:rgba(255,255,255,.03)}.battle-waiting-lineup article>b{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:rgba(83,214,255,.1);font-size:9px}.battle-waiting-lineup article>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;font-weight:900}.battle-waiting-case-img{width:42px;height:42px;object-fit:contain}

.upgrader-heading{background:linear-gradient(130deg,rgba(28,191,118,.11),rgba(92,72,255,.09))}.upgrader-test-pill{padding:8px 12px;border:1px solid rgba(80,226,158,.18);border-radius:999px;background:rgba(80,226,158,.08);color:#74efb7;font-size:10px;font-weight:900}.upgrader-layout{display:grid;grid-template-columns:minmax(235px,.8fr) minmax(360px,1.25fr) minmax(225px,.72fr);gap:16px;align-items:stretch}.upgrader-controls,.upgrader-wheel-panel,.upgrader-payout-card{padding:20px;border:1px solid rgba(255,255,255,.07);border-radius:22px;background:linear-gradient(160deg,rgba(24,31,55,.98),rgba(10,15,29,.99));box-shadow:0 18px 40px rgba(0,0,0,.2)}.upgrader-controls{display:grid;align-content:start;gap:10px}.upgrader-controls>label{margin-top:3px;color:#9aa9c3;font-size:10px;font-weight:900}.upgrader-amount-input{grid-template-columns:auto minmax(0,1fr) auto auto}.upgrader-multiplier-input{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;height:52px;border:1px solid rgba(255,255,255,.07);border-radius:13px;background:rgba(255,255,255,.035)}.upgrader-multiplier-input span{display:grid;place-items:center;height:100%;border-right:1px solid rgba(255,255,255,.06);font-size:23px;font-weight:1000}.upgrader-multiplier-input input{height:100%;border:0;background:transparent;font-size:16px;font-weight:900}.upgrader-quick-multipliers{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.upgrader-quick-multipliers button,.upgrader-direction button{height:40px;border:1px solid rgba(255,255,255,.06);border-radius:11px;background:rgba(255,255,255,.035);color:#9ba9c4;font-size:10px;font-weight:900;cursor:pointer}.upgrader-quick-multipliers button:hover,.upgrader-direction button.active{border-color:rgba(86,230,153,.28);background:rgba(86,230,153,.1);color:#7cf0b8}.upgrader-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px}.upgrader-metrics>div{padding:12px;border:1px solid rgba(255,255,255,.055);border-radius:12px;background:rgba(255,255,255,.025)}.upgrader-metrics span{display:block;color:#8190aa;font-size:8px;text-transform:uppercase;letter-spacing:.1em}.upgrader-metrics strong{display:flex;align-items:center;gap:5px;margin-top:5px;font-size:15px}.upgrader-metrics .gem-icon{width:15px;height:15px}
.upgrader-wheel-panel{display:grid;justify-items:center;align-content:center;gap:15px;overflow:hidden}.upgrader-wheel-shell{position:relative;width:min(390px,72vw);aspect-ratio:1}.upgrader-wheel{position:absolute;inset:8px;border-radius:50%;background:conic-gradient(#22314f 0 var(--upgrade-start),#54e68e var(--upgrade-start) var(--upgrade-end),#22314f var(--upgrade-end) 100%);border:10px solid #17243f;box-shadow:0 0 0 2px rgba(255,255,255,.07),0 22px 45px rgba(0,0,0,.3),inset 0 0 40px rgba(0,0,0,.22)}.upgrader-wheel:before{content:"";position:absolute;inset:18px;border-radius:50%;background:radial-gradient(circle at 50% 35%,rgba(67,100,170,.17),transparent 55%),#10192c;border:1px solid rgba(255,255,255,.07)}.upgrader-wheel-inner{position:absolute;inset:31%;z-index:2;display:grid;place-items:center;align-content:center;border-radius:50%;background:rgba(12,18,34,.92);box-shadow:0 0 0 1px rgba(255,255,255,.06);text-align:center}.upgrader-wheel-inner span{font-size:9px;color:#96a6c2}.upgrader-wheel-inner strong{margin-top:3px;font-size:25px}.upgrader-wheel-inner small{margin-top:4px;color:#72e9ad;font-size:9px}.upgrader-pointer{position:absolute;z-index:5;left:50%;top:0;transform:translateX(-50%);width:0;height:0;border-left:15px solid transparent;border-right:15px solid transparent;border-top:34px solid #ff546d;filter:drop-shadow(0 5px 8px rgba(255,73,99,.35))}.upgrader-direction{display:grid;grid-template-columns:1fr 1fr;width:min(430px,100%);gap:7px}.upgrader-direction button{height:48px}.upgrader-wheel-panel>.button{width:min(430px,100%);height:52px}.upgrader-wheel-panel .game-message{min-height:20px}.upgrader-wheel-panel .game-message.win{color:#78edb4}.upgrader-wheel-panel .game-message.loss{color:#ff8da1}
.upgrader-payout-card{display:grid;justify-items:center;align-content:center;text-align:center}.upgrader-payout-card>span{color:#99a9c5;font-size:10px;text-transform:uppercase;letter-spacing:.1em}.upgrader-payout-card>strong{display:flex;align-items:center;gap:7px;margin-top:8px;font-size:24px}.upgrader-payout-card .gem-icon{width:23px;height:23px}.upgrader-gem-cube{display:grid;place-items:center;width:150px;height:150px;margin:30px 0;border-radius:34px;transform:rotate(8deg);background:linear-gradient(145deg,#0e56c7,#43d8ff);box-shadow:0 22px 45px rgba(0,95,255,.25),inset 0 0 0 4px rgba(255,255,255,.18);color:#c8f7ff;font-size:86px;text-shadow:0 0 20px #fff}.upgrader-payout-card small{max-width:180px;color:#8191ac;font-size:9px;line-height:1.55}

@media(max-width:1180px){.case-battle-lobbies{grid-template-columns:repeat(2,minmax(0,1fr))}.upgrader-layout{grid-template-columns:minmax(220px,.8fr) minmax(360px,1.2fr)}.upgrader-payout-card{grid-column:1/-1;grid-template-columns:1fr auto 1fr;gap:20px}.upgrader-gem-cube{width:100px;height:100px;margin:0;font-size:58px}}
@media(max-width:900px){.case-battle-columns{overflow-x:auto;grid-template-columns:repeat(var(--battle-columns),minmax(195px,215px));padding-bottom:8px;scrollbar-width:none}.case-battle-columns::-webkit-scrollbar{display:none}.upgrader-layout{grid-template-columns:1fr}.upgrader-payout-card{grid-column:auto;grid-template-columns:1fr}.upgrader-gem-cube{width:120px;height:120px;margin:18px 0}.case-battle-lobbies{grid-template-columns:1fr}}
@media(max-width:650px){.dice-spin-flow{gap:6px}.dice-spin-flow>div{display:grid;justify-items:center;text-align:center}.dice-spin-flow i{font-size:11px}.battle-stage-controls{align-items:stretch;flex-direction:column}.battle-stage-controls>div:last-child{display:grid;grid-template-columns:1fr 1fr}.upgrader-controls,.upgrader-wheel-panel,.upgrader-payout-card{padding:15px}.upgrader-wheel-shell{width:min(330px,86vw)}}


/* ---------------------------- V23 POLISH ---------------------------- */
.guest-auth-actions{justify-self:end;display:flex;align-items:center;gap:8px;margin-right:16px}.guest-auth-button,.guest-register-button{height:38px;padding:0 15px;border-radius:11px;font-size:10px;font-weight:900}.guest-auth-button{border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.035);color:#dbe5f8;cursor:pointer}.guest-register-button{min-width:92px}.auth-modal-open{overflow:hidden}.auth-overlay{background:rgba(4,7,16,.84);backdrop-filter:blur(14px)}
.upgrader-wheel-legend{position:absolute;left:50%;bottom:-31px;transform:translateX(-50%);display:flex;gap:14px;white-space:nowrap}.upgrader-wheel-legend span{display:flex;align-items:center;gap:6px;color:#8191ac;font-size:8px;font-weight:800}.upgrader-wheel-legend i{width:9px;height:9px;border-radius:50%;background:#54e68e}.upgrader-wheel-legend span:last-child i{background:#22314f;border:1px solid rgba(255,255,255,.08)}.upgrader-wheel.landed-win{box-shadow:0 0 0 2px rgba(84,230,142,.35),0 22px 50px rgba(33,209,125,.22),inset 0 0 40px rgba(0,0,0,.22)}.upgrader-wheel.landed-loss{box-shadow:0 0 0 2px rgba(255,90,112,.2),0 22px 45px rgba(0,0,0,.3),inset 0 0 40px rgba(0,0,0,.22)}

#page-case-battles .battle-heading{padding:22px 24px;border-radius:18px;background:linear-gradient(120deg,rgba(44,50,112,.42),rgba(19,29,60,.86));box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.case-battle-lobbies{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.case-battle-lobby{min-height:0;padding:0;border-radius:18px;background:linear-gradient(155deg,#161d35,#0a0f20 76%);box-shadow:0 18px 44px rgba(0,0,0,.28)}.case-battle-lobby.is-crazy{background:linear-gradient(155deg,#281934,#0d1021 76%)}.battle-lobby-top{padding:15px 16px;border-bottom:1px solid rgba(255,255,255,.06)}.battle-lobby-top>div:first-child{display:grid;gap:4px}.battle-lobby-top strong{font-size:16px}.battle-lobby-pool{display:grid!important;justify-items:end!important;gap:3px!important;padding:0!important;background:none!important}.battle-lobby-pool small{font-size:8px;color:#8291ac;text-transform:uppercase;letter-spacing:.1em}.battle-lobby-pool strong{display:flex;align-items:center;gap:5px;font-size:15px}.battle-lobby-showcase{display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);align-items:center;min-height:115px;padding:13px 16px}.battle-lobby-cases{display:flex;min-width:0;min-height:72px;margin:0;padding:8px;background:rgba(255,255,255,.025)}.battle-lobby-cases>span{position:relative;width:54px;height:54px;margin-left:-8px}.battle-lobby-cases>span>b{position:absolute;left:2px;top:2px;display:grid;place-items:center;width:17px;height:17px;border-radius:6px;background:#535dff;color:white;font-size:7px;z-index:2}.battle-lobby-cases>em{align-self:center;margin-left:5px;color:#9daac1;font-size:9px;font-style:normal;font-weight:900}.battle-lobby-case-img{width:46px;height:46px}.battle-lobby-versus{display:grid;place-items:center;width:34px;height:34px;margin:auto;border-radius:50%;background:linear-gradient(145deg,#4954ce,#7b59f0);box-shadow:0 8px 20px rgba(64,68,201,.28);font-size:9px;font-weight:1000}.battle-lobby-players{display:grid;grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:5px;overflow:visible}.battle-seat>span{width:40px;height:40px}.battle-lobby-footer{margin:0;padding:12px 16px;background:rgba(255,255,255,.018)}

.battle-builder-panel{width:min(1120px,96vw);background:linear-gradient(155deg,#171e38,#090e1c 78%)}.battle-case-picker{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.battle-picker-card{padding:11px;border-radius:15px;background:linear-gradient(180deg,rgba(30,39,70,.92),rgba(14,20,38,.95))}.battle-picker-card>div{height:92px}.battle-picker-img{width:82px;height:82px}.battle-picker-card>strong{font-size:11px}

.case-battle-stage{padding:20px clamp(10px,2vw,30px) 34px;background:radial-gradient(circle at 50% -10%,rgba(87,74,190,.23),transparent 44%),linear-gradient(180deg,#0b1021,#070b16)}.case-battle-stage-head,.case-battle-case-strip,.case-battle-round-head,.battle-stage-controls,.case-battle-columns,.case-battle-summary{width:min(100%,1260px);margin-left:auto;margin-right:auto}.case-battle-stage-head{padding:6px 50px 14px 0}.case-battle-stage-head h2{font-size:25px}.battle-stage-meta{flex-wrap:wrap;justify-content:flex-end}.battle-stage-meta>span{background:#151c33}.battle-stage-meta>span:last-child{border-color:rgba(255,210,97,.18);background:rgba(255,195,70,.07);color:#ffd674;font-size:12px}.battle-stage-meta .gem-icon{width:16px;height:16px}
.case-battle-case-strip{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;margin-top:12px;padding:10px 12px;border:1px solid rgba(255,255,255,.065);border-radius:15px;background:rgba(19,26,48,.78)}.battle-strip-summary{display:grid;justify-items:center;min-width:48px}.battle-strip-summary span{color:#8191ae;font-size:8px;text-transform:uppercase;letter-spacing:.1em}.battle-strip-summary strong{margin-top:3px;font-size:16px}.battle-strip-items{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none}.battle-strip-items::-webkit-scrollbar{display:none}.battle-strip-items article{position:relative;display:grid;grid-template-columns:43px minmax(76px,1fr);align-items:center;gap:7px;min-width:145px;padding:7px 9px;border:1px solid rgba(255,255,255,.055);border-radius:11px;background:rgba(255,255,255,.025);opacity:.55;transition:.2s ease}.battle-strip-items article.is-active{opacity:1;border-color:rgba(103,222,255,.32);background:rgba(72,187,237,.08);transform:translateY(-1px)}.battle-strip-items article>b{position:absolute;left:3px;top:3px;display:grid;place-items:center;width:17px;height:17px;border-radius:6px;background:#5961ff;font-size:7px}.battle-strip-img{width:42px;height:42px;object-fit:contain}.battle-strip-items article>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;font-weight:900}
.case-battle-round-head{margin:14px auto 9px;padding:0 4px}.case-battle-columns{display:grid;grid-template-columns:repeat(var(--battle-columns),minmax(0,1fr));gap:0;min-width:0;overflow:hidden;border:1px solid rgba(120,123,219,.25);border-radius:18px;background:#0d1224;box-shadow:0 24px 60px rgba(0,0,0,.35)}.battle-player-column{width:auto;min-width:0;border:0;border-left:1px solid rgba(109,113,213,.18);border-radius:0;background:transparent}.battle-player-column:first-child{border-left:0}.battle-reel-window{height:390px;background:radial-gradient(circle at 50% 50%,rgba(76,83,175,.08),transparent 55%),#0b1020}.battle-reel-window:before{background:linear-gradient(#0b1020,transparent)}.battle-reel-window:after{background:linear-gradient(transparent,#0b1020)}.battle-reel-track{padding:9px 13px}.battle-reel-card{grid-template-columns:82px minmax(0,1fr);min-height:112px;border-color:rgba(255,255,255,.045);background:rgba(255,255,255,.018)}.battle-reel-img{width:78px;height:78px}.battle-reel-marker{left:0;right:0;height:116px;border-color:rgba(255,194,68,.8)}.battle-player-footer{display:grid;grid-template-columns:45px minmax(0,1fr) auto;align-items:center;gap:9px;padding:11px 12px;border-top:1px solid rgba(255,255,255,.065);background:#161d35}.battle-player-footer>div:nth-child(2){min-width:0}.battle-player-footer strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.battle-player-footer small{display:block;margin-top:3px;color:#8e9eba;font-size:8px}.battle-player-footer>b{display:flex;align-items:center;gap:5px;padding:7px 9px;border-radius:9px;background:#0e1426;font-size:10px}.battle-player-footer .gem-icon{width:14px;height:14px}.battle-pull-history{min-height:48px;background:#11172b}.battle-player-column.battle-winner-column{box-shadow:inset 0 0 0 2px rgba(86,236,161,.45),0 0 36px rgba(65,226,150,.1)}
.battle-waiting-seat{min-height:280px;background:#11172a}.battle-waiting-seat.is-empty{background:linear-gradient(180deg,#12182c,#0c1121)}.battle-seat-ready{min-height:280px}.battle-seat-ready strong{font-size:13px}.battle-seat-ready .battle-player-avatar{width:58px;height:58px}.battle-stage-controls{margin-top:12px}.case-battle-summary{margin-top:14px}
.case-battle-countdown{position:fixed;inset:0;z-index:9300;display:grid;place-items:center;align-content:center;background:rgba(5,8,18,.64);backdrop-filter:blur(6px)}.case-battle-countdown span{color:#93a6c9;font-size:12px;text-transform:uppercase;letter-spacing:.16em}.case-battle-countdown strong{margin-top:6px;font-size:104px;line-height:1;color:#fff;text-shadow:0 0 40px rgba(107,102,255,.55)}.case-battle-countdown.tick strong{animation:battleCountTick .9s ease}@keyframes battleCountTick{0%{transform:scale(.55);opacity:.2}35%{transform:scale(1.12);opacity:1}100%{transform:scale(1);opacity:1}}

@media(max-width:1050px){.case-battle-lobbies{grid-template-columns:1fr}.battle-case-picker{grid-template-columns:repeat(3,minmax(0,1fr))}.battle-reel-window{height:340px}.battle-reel-card{grid-template-columns:65px minmax(0,1fr)}.battle-reel-img{width:62px;height:62px}}
@media(max-width:760px){.guest-auth-actions{margin-right:8px}.guest-auth-button{display:none}.case-battle-stage{padding:14px 8px 28px}.case-battle-case-strip{grid-template-columns:1fr}.battle-strip-summary{display:none}.case-battle-columns{overflow-x:auto;grid-template-columns:repeat(var(--battle-columns),minmax(205px,235px));border-radius:14px}.battle-player-column{min-width:205px}.battle-case-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.battle-lobby-showcase{grid-template-columns:1fr}.battle-lobby-versus{margin:8px auto}.battle-stage-meta{justify-content:flex-start}.battle-reel-window{height:320px}}

/* ======================= VERSION 24 POLISH ======================= */
.shutdown-overlay{position:fixed;inset:0;z-index:20000;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 50% 20%,rgba(69,103,255,.2),transparent 38%),#050815}
.shutdown-card{width:min(410px,94vw);padding:34px;border:1px solid rgba(132,158,255,.18);border-radius:26px;background:linear-gradient(160deg,#121a32,#090e1d);box-shadow:0 30px 90px rgba(0,0,0,.55);text-align:center}
.shutdown-card img{width:145px;max-height:80px;object-fit:contain}.shutdown-card h1{margin:12px 0 22px;font-size:30px}.shutdown-card input{width:100%;height:52px;border:1px solid var(--border);border-radius:14px;background:#070b18;padding:0 16px;color:var(--text);text-align:center;font-weight:900;letter-spacing:.12em}

/* Profile */
.profile-shell{display:grid;gap:16px}.profile-hero{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:24px;padding:28px;border:1px solid var(--border);border-radius:24px;background:linear-gradient(135deg,#151d35,#0b1122);box-shadow:var(--shadow)}
.profile-avatar{width:108px;height:108px;display:grid;place-items:center;border:3px solid #398cff;border-radius:50%;background:linear-gradient(145deg,#1a5dc9,#7749dc);background-size:cover;background-position:center;font-size:34px;font-weight:1000;box-shadow:0 0 34px rgba(47,128,255,.35)}
.profile-avatar.compact{width:84px;height:84px;margin:0 auto 12px;font-size:26px}.profile-identity{min-width:0}.profile-identity h1{margin:0 0 8px;font-size:30px}.profile-level{display:inline-flex;align-items:center;gap:8px;color:#b6c5e7}.profile-level img{width:30px;height:30px;object-fit:contain}.profile-progress{height:10px;margin-top:17px;overflow:hidden;border-radius:99px;background:#080d1c;box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}.profile-progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2d7fff,#55d9ff);transition:width .35s ease}.profile-identity>b{display:block;margin-top:8px;color:#8f9dbd;font-size:10px}
.profile-stats-grid,.profile-account-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.profile-account-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-stats-grid article,.profile-account-grid article{padding:21px;border:1px solid var(--border);border-radius:18px;background:#0d1428}.profile-stats-grid span,.profile-account-grid span{display:block;color:#8796b4;font-size:10px;text-transform:uppercase;letter-spacing:.1em}.profile-stats-grid strong,.profile-account-grid strong{display:flex;align-items:center;gap:7px;margin-top:9px;font-size:20px}.profile-stats-grid .gem-icon{width:20px;height:20px}
.player-profile-modal{position:relative;width:min(420px,94vw);padding:30px;border:1px solid var(--border);border-radius:24px;background:linear-gradient(160deg,#151d35,#090e1e);box-shadow:var(--shadow);text-align:center}.player-profile-modal h2{margin:7px 0 10px;font-size:25px}.player-profile-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:20px 0;text-align:left}.player-profile-stats>div{padding:13px;border:1px solid rgba(255,255,255,.06);border-radius:13px;background:rgba(255,255,255,.025)}.player-profile-stats span{display:block;color:#8998b5;font-size:9px;text-transform:uppercase}.player-profile-stats strong{display:flex;align-items:center;gap:5px;margin-top:5px;font-size:13px}

/* Chat levels and profiles */
.chat-profile-trigger{border:1px solid #52ddff55;cursor:pointer}.chat-name-button{display:inline-flex;align-items:center;gap:5px;padding:0;border:0;background:none;color:inherit}.chat-level-icon{width:19px;height:19px;object-fit:contain;filter:drop-shadow(0 0 5px rgba(89,205,255,.28))}.chat-message{cursor:default}.chat-message [data-profile-target],.chat-message .chat-profile-trigger,.chat-message .chat-name-button{cursor:pointer}

/* Giveaway carousel */
.chat-panel{grid-template-rows:auto auto 1fr auto}.chat-giveaway{position:relative}.chat-giveaway-nav{position:absolute;right:10px;top:43px;display:flex;align-items:center;gap:4px}.chat-giveaway-nav button{width:25px;height:25px;padding:0;border:1px solid rgba(255,255,255,.08);border-radius:8px;background:#ffffff08}.chat-giveaway-nav span{min-width:34px;color:#8e9db9;font-size:8px;text-align:center}.chat-giveaway-meta{display:flex;align-items:center;justify-content:space-between;margin:8px 0;color:#93a2be;font-size:9px}.chat-giveaway-meta span:last-child{padding:4px 7px;border-radius:99px;background:#58d99f14;color:#77e7b0;font-weight:900}

/* Admin controls */
.admin-site-settings-card{display:grid;align-content:start;gap:9px}.admin-setting-row{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:0 13px;border:1px solid rgba(255,255,255,.06);border-radius:13px;background:rgba(255,255,255,.025);font-size:12px;font-weight:850}.switch{margin:0}.switch input{position:absolute;opacity:0}.switch i{position:relative;display:block;width:48px;height:26px;border-radius:99px;background:#263149;transition:.2s}.switch i:after{content:"";position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:.2s}.switch input:checked+i{background:#32d788}.switch input:checked+i:after{transform:translateX(22px)}

/* Case Battle shell remains inside the normal site chrome */
.case-battle-stage{position:fixed!important;inset:var(--top) var(--chat) 0 var(--side)!important;z-index:55!important;padding:20px clamp(12px,2vw,28px) 34px!important;background:rgba(5,9,20,.96)!important;backdrop-filter:blur(14px);overflow:auto!important}
.case-battle-stage>.stage-close{position:absolute!important;right:18px!important;top:14px!important}.case-battle-stage-head,.case-battle-case-strip,.case-battle-round-head,.battle-stage-controls,.case-battle-columns,.case-battle-summary{width:min(100%,1180px)!important}
.case-battle-columns{max-width:1180px;min-height:0}.battle-player-column{min-width:0!important}.battle-reel-window{height:clamp(280px,42vh,390px)!important}.battle-seat-ready{min-height:250px!important}

/* Chest artwork in battle creator/lobby/strip */
.battle-case-chest,.battle-picker-chest,.battle-lobby-case-img,.battle-strip-img{position:relative;display:inline-grid;place-items:center;flex:none}.battle-case-chest-base{grid-area:1/1;width:100%;height:100%;object-fit:contain;filter:hue-rotate(var(--case-hue-shift,0deg)) drop-shadow(0 8px 12px rgba(0,0,0,.3))}.battle-case-chest>span,.battle-picker-chest>span,.battle-lobby-case-img>span,.battle-strip-img>span{grid-area:1/1;display:grid;place-items:center;z-index:2}.battle-case-chest-pet{width:42%;height:42%;object-fit:contain;filter:drop-shadow(0 3px 4px rgba(0,0,0,.7))}.battle-picker-chest{width:78px;height:64px}.battle-lobby-case-img{width:54px!important;height:54px!important}.battle-strip-img{width:48px;height:48px}.battle-picker-card>div{min-height:76px}.battle-picker-img{display:none}

/* Rare contents keep the real Huge artwork; Dice Spin only appears in active reels */
.case-content-item.dice-spin-content{border-color:rgba(84,213,255,.14);background:linear-gradient(135deg,rgba(42,99,173,.08),rgba(255,255,255,.025))}.case-content-item.dice-spin-content:after{content:"DICE SPIN";position:absolute;right:8px;top:7px;color:#6de2ff;font-size:6px;font-weight:1000;letter-spacing:.12em}.case-content-item{position:relative}

/* Upgrader always fits the available game area */
.upgrader-layout{width:100%;max-width:1120px;margin:0 auto;grid-template-columns:minmax(210px,260px) minmax(340px,500px) minmax(190px,250px);justify-content:center;align-items:stretch;gap:14px}.upgrader-controls,.upgrader-wheel-panel,.upgrader-payout-card{min-width:0}.upgrader-wheel-shell{width:clamp(300px,32vw,430px);max-width:100%;aspect-ratio:1}.upgrader-wheel{width:100%;height:100%}.upgrader-direction,.upgrader-wheel-panel>.button{width:min(100%,430px)}

/* Compact copy: preserve values and controls, remove nonessential helper prose */
.page-heading>div>p:not(.eyebrow),.game-info p,.section-note,.auth-art-copy>p:last-child,.safe-note,.wager-modal-head>p:not(.eyebrow),.case-stage-description{display:none!important}.game-message:empty{display:none}.admin-result:empty{display:none}

@media(max-width:1180px){.upgrader-layout{grid-template-columns:minmax(210px,260px) minmax(330px,1fr)}.upgrader-payout-card{grid-column:1/-1}.case-battle-stage{right:var(--chat)!important}}
@media(max-width:920px){.case-battle-stage{right:0!important}.upgrader-layout{grid-template-columns:1fr}.upgrader-wheel-shell{width:min(430px,84vw)}.profile-stats-grid{grid-template-columns:1fr 1fr}.profile-stats-grid article:last-child{grid-column:1/-1}}
@media(max-width:650px){.case-battle-stage{left:0!important;top:var(--top)!important}.profile-hero{grid-template-columns:1fr;text-align:center}.profile-avatar{margin:auto}.profile-stats-grid,.profile-account-grid{grid-template-columns:1fr}.profile-stats-grid article:last-child{grid-column:auto}.upgrader-wheel-shell{width:min(340px,88vw)}}
.battle-selected-row{grid-template-columns:26px 58px minmax(0,1fr) 30px!important}.battle-selected-chest{position:relative;display:inline-grid;place-items:center;width:54px;height:46px}.battle-selected-chest .battle-case-chest-base{grid-area:1/1}.battle-selected-chest>span{grid-area:1/1;display:grid;place-items:center;z-index:2}
.affiliate-hero p:not(.eyebrow),.info-panel>h3,.steps-grid{display:none!important}


/* ======================= VERSION 25 ADMIN / UPGRADER / CHAT FIXES ======================= */
#page-upgrader{container-type:inline-size}
.upgrader-layout{
  width:min(100%,920px)!important;
  max-width:920px!important;
  margin-inline:auto!important;
  display:grid!important;
  grid-template-columns:minmax(220px,270px) minmax(0,1fr)!important;
  align-items:stretch!important;
  gap:16px!important;
}
.upgrader-controls,.upgrader-wheel-panel,.upgrader-payout-card{min-width:0!important;width:100%!important}
.upgrader-wheel-panel{overflow:visible!important;padding-inline:clamp(14px,3cqi,24px)!important}
.upgrader-wheel-shell{width:min(100%,430px)!important;max-width:430px!important;min-width:0!important;aspect-ratio:1!important;margin-inline:auto!important}
.upgrader-wheel{inset:clamp(6px,1.4cqi,10px)!important;width:auto!important;height:auto!important}
.upgrader-direction,.upgrader-wheel-panel>.button{width:min(100%,430px)!important}
.upgrader-payout-card{
  grid-column:1/-1!important;
  min-height:150px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:24px!important;
}
.upgrader-payout-card>span,.upgrader-payout-card>strong,.upgrader-payout-card>small{justify-self:center!important}
.upgrader-gem-cube{width:96px!important;height:96px!important;margin:0!important;border-radius:24px!important;font-size:54px!important}
@container (max-width:720px){
  .upgrader-layout{grid-template-columns:1fr!important;max-width:560px!important}
  .upgrader-payout-card{grid-column:auto!important;grid-template-columns:1fr!important;gap:12px!important}
  .upgrader-gem-cube{width:110px!important;height:110px!important;margin:8px 0!important}
}
@container (max-width:430px){
  .upgrader-controls,.upgrader-wheel-panel,.upgrader-payout-card{padding:14px!important;border-radius:17px!important}
  .upgrader-wheel-shell{width:min(100%,340px)!important}
  .upgrader-quick-multipliers{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .upgrader-metrics{grid-template-columns:1fr!important}
}

.chat-message.chat-level-whale .chat-name-button strong{color:#55a7ff;text-shadow:0 0 10px rgba(61,149,255,.35)}
.chat-message.chat-level-whale .avatar{border-color:rgba(85,167,255,.75);box-shadow:0 0 14px rgba(61,149,255,.16)}
.chat-message.chat-level-whale .chat-level-icon{filter:drop-shadow(0 0 7px rgba(85,167,255,.65))}
.chat-message.chat-level-phoenix .chat-name-button strong{color:#ff626d;text-shadow:0 0 10px rgba(255,72,84,.34)}
.chat-message.chat-level-phoenix .avatar{border-color:rgba(255,98,109,.75);box-shadow:0 0 14px rgba(255,72,84,.16)}
.chat-message.chat-level-phoenix .chat-level-icon{filter:drop-shadow(0 0 7px rgba(255,98,109,.65))}
.chat-message.chat-level-emerald-dragon .chat-name-button strong{color:#49e89a;text-shadow:0 0 10px rgba(38,220,130,.36)}
.chat-message.chat-level-emerald-dragon .avatar{border-color:rgba(73,232,154,.78);box-shadow:0 0 14px rgba(38,220,130,.17)}
.chat-message.chat-level-emerald-dragon .chat-level-icon{filter:drop-shadow(0 0 7px rgba(73,232,154,.68))}
.upgrader-amount-input{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr) 42px 52px!important;
  width:100%!important;
  overflow:hidden!important;
}
.upgrader-amount-input>span{display:grid!important;place-items:center!important;margin:0!important}
.upgrader-amount-input input{width:100%!important;min-width:0!important;padding-inline:8px!important}
.upgrader-amount-input button{width:auto!important;min-width:0!important;margin:0 4px 0 0!important;padding:0 5px!important}
.upgrader-quick-multipliers{width:100%!important;min-width:0!important}
.upgrader-quick-multipliers button{min-width:0!important;padding-inline:4px!important}
.upgrader-metrics>div{min-width:0!important;overflow:hidden!important}
.upgrader-metrics strong{min-width:0!important;font-size:clamp(12px,1.15cqi,15px)!important;white-space:nowrap!important}
.chat-message.chat-level-whale p{color:#b9d9ff}
.chat-message.chat-level-phoenix p{color:#ffd0d3}
.chat-message.chat-level-emerald-dragon p{color:#bff6d9}


/* Version 26 admin reliability and Upgrader polish */
.button.is-loading{cursor:wait;opacity:.82;pointer-events:none}
.upgrader-heading{
  position:relative;overflow:hidden;align-items:center!important;
  padding:18px 22px;margin-bottom:18px!important;
  border:1px solid rgba(113,238,181,.16);border-radius:24px;
  background:
    radial-gradient(circle at 86% 18%,rgba(90,236,164,.18),transparent 30%),
    radial-gradient(circle at 8% 120%,rgba(65,117,255,.18),transparent 38%),
    linear-gradient(135deg,rgba(21,31,52,.98),rgba(10,16,31,.98))!important;
  box-shadow:0 18px 42px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.04)
}
.upgrader-heading:after{content:"";position:absolute;right:-38px;top:-62px;width:170px;height:170px;border:1px solid rgba(113,238,181,.11);border-radius:50%;box-shadow:0 0 0 26px rgba(113,238,181,.025),0 0 0 52px rgba(113,238,181,.018);pointer-events:none}
.upgrader-heading-main{display:flex;align-items:center;gap:14px;position:relative;z-index:1}
.upgrader-heading-main h1{margin:2px 0 0!important;font-size:clamp(30px,3.2vw,43px)!important;letter-spacing:-1.5px!important}
.upgrader-heading-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:18px;background:linear-gradient(145deg,#42e493,#18a96d);box-shadow:0 12px 26px rgba(31,211,132,.24),inset 0 1px 0 rgba(255,255,255,.22);font-size:30px;font-weight:1000;color:#061b12}
.upgrader-heading-modes{position:relative;z-index:1;display:flex;align-items:center;gap:9px;padding:9px 13px;border:1px solid rgba(255,255,255,.07);border-radius:999px;background:rgba(5,11,22,.5);color:#8fa2c1;font-size:9px;font-weight:1000;letter-spacing:.08em}
.upgrader-heading-modes i{width:5px;height:5px;border-radius:50%;background:#51e69a;box-shadow:0 0 10px rgba(81,230,154,.7)}
.upgrader-controls,.upgrader-wheel-panel,.upgrader-payout-card{border-radius:24px!important}
.upgrader-wheel-panel{background:radial-gradient(circle at 50% 38%,rgba(49,92,166,.16),transparent 50%),linear-gradient(160deg,rgba(22,30,52,.98),rgba(8,14,27,.99))!important}
.upgrader-wheel-shell{filter:drop-shadow(0 20px 28px rgba(0,0,0,.2))}
.upgrader-wheel-legend{display:none!important}
@media(max-width:650px){.upgrader-heading{padding:15px!important;border-radius:19px!important}.upgrader-heading-modes{display:none}.upgrader-heading-icon{width:46px;height:46px;border-radius:15px}.upgrader-heading-main h1{font-size:31px!important}}

/* v30 game artwork, fairness, and tax dashboard */
.game-card .game-art.game-art-image{padding:0;overflow:hidden;display:block;background:#07101f}
.game-card .game-art.game-art-image img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;transition:transform .35s ease,filter .35s ease}
.game-card:hover .game-art.game-art-image img{transform:scale(1.035);filter:saturate(1.08) brightness(1.05)}
.wide-game-card .game-art.game-art-image{min-height:240px}
.wide-game-card .game-art.game-art-image img{height:100%;min-height:240px}
.fairness-heading{background:linear-gradient(120deg,rgba(31,209,232,.09),rgba(96,72,255,.12));border:1px solid rgba(100,221,239,.12);border-radius:22px;padding:24px}
.fairness-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}
.fairness-card{min-height:170px;padding:18px;border:1px solid rgba(255,255,255,.07);border-radius:18px;background:linear-gradient(145deg,rgba(18,27,49,.96),rgba(9,15,29,.98));box-shadow:0 16px 34px rgba(0,0,0,.18)}
.fairness-card>span{display:block;color:#68e9fa;font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.fairness-card>strong{display:block;margin:12px 0 8px;font-size:18px;line-height:1.2;color:#f5f8ff}
.fairness-card p{margin:0;color:#92a1bd;font-size:11px;line-height:1.6}
.fairness-commitment-card{grid-column:span 2}
.fairness-commitment-card>strong{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;overflow-wrap:anywhere;color:#a9f5ff}
.fairness-commitment-card>div{display:grid;grid-template-columns:130px minmax(0,1fr);gap:10px;align-items:start;margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.06)}
.fairness-commitment-card small{color:#7e8ca7}
.fairness-commitment-card code{white-space:normal;overflow-wrap:anywhere;color:#ccd7eb;font-size:10px}
.admin-tax-card{display:flex;flex-direction:column;gap:14px}
.admin-tax-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
.admin-tax-heading h3{margin:0 0 4px}.admin-tax-heading p{margin:0;color:var(--muted);font-size:10px}
.admin-tax-heading>span{display:grid;place-items:center;width:58px;height:58px;border-radius:18px;background:rgba(60,224,183,.1);border:1px solid rgba(60,224,183,.2);color:#6ff1c7;font-size:20px;font-weight:950}
.admin-tax-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.admin-tax-stats>div{display:grid;gap:8px;padding:15px;border:1px solid rgba(255,255,255,.065);border-radius:15px;background:rgba(255,255,255,.025)}
.admin-tax-stats small{color:#8e9db8;font-size:9px;text-transform:uppercase;letter-spacing:.1em}.admin-tax-stats strong{font-size:22px}.admin-tax-stats em{font-style:normal;color:#6ff1c7;font-size:9px;font-weight:800}
@media(max-width:1000px){.fairness-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.fairness-grid{grid-template-columns:1fr}.fairness-commitment-card{grid-column:auto}.fairness-card{min-height:auto}.admin-tax-stats{grid-template-columns:1fr}}
.admin-tax-actions{display:flex;flex-wrap:wrap;gap:7px}


/* v31 terms, consent, and community polish */
.auth-terms-consent{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:start;gap:10px;margin:14px 0 18px;padding:13px 14px;border:1px solid rgba(255,255,255,.075);border-radius:13px;background:rgba(255,255,255,.025);color:#a9b7ce;font-size:11px;line-height:1.5}.auth-terms-consent input{width:17px;height:17px;margin:1px 0 0;accent-color:#4b8dff}.auth-terms-consent a{color:#67e5ff;font-weight:850;text-decoration:none}.auth-terms-consent a:hover{text-decoration:underline}.nav-list a.nav-button{text-decoration:none;cursor:pointer}.terms-shell{width:min(100%,1120px);margin:0 auto}.terms-hero{padding:34px 36px;border:1px solid rgba(91,206,255,.18);border-radius:24px;background:radial-gradient(circle at 90% 0,rgba(75,76,255,.18),transparent 40%),linear-gradient(135deg,#0c1830,#0a1021);box-shadow:0 24px 55px rgba(0,0,0,.23)}.terms-hero h1{margin:8px 0 10px;font-size:40px;letter-spacing:-1.5px}.terms-hero>p:last-child{max-width:680px;margin:0;color:#94a5c1;line-height:1.65}.terms-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.terms-grid article{display:grid;grid-template-columns:38px minmax(0,1fr);gap:13px;padding:21px;border:1px solid rgba(255,255,255,.065);border-radius:17px;background:#0b1326}.terms-grid article>span{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:rgba(56,206,242,.09);border:1px solid rgba(56,206,242,.15);color:#68e6ff;font-size:10px;font-weight:950}.terms-grid h2{margin:2px 0 8px;font-size:15px}.terms-grid p,.terms-disclaimer p{margin:0;color:#96a5bf;font-size:11px;line-height:1.7}.terms-disclaimer{margin-top:14px;padding:25px;border:1px solid rgba(117,100,255,.18);border-radius:19px;background:linear-gradient(135deg,rgba(92,74,255,.1),rgba(30,194,226,.05))}.terms-disclaimer h2{margin:0 0 8px;font-size:18px}.terms-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.fairness-grid-compact{grid-template-columns:minmax(0,1.5fr) minmax(260px,.8fr)}.fairness-explainer-card{min-height:210px}.fairness-explainer-card strong{font-size:20px}.fairness-explainer-card p{margin-top:13px;line-height:1.65}@media(max-width:760px){.terms-grid,.fairness-grid-compact{grid-template-columns:1fr}.terms-hero{padding:26px 22px}.terms-hero h1{font-size:32px}.terms-grid article{grid-template-columns:32px minmax(0,1fr);padding:17px}.terms-grid article>span{width:30px;height:30px}.terms-actions{flex-direction:column}.terms-actions .button{width:100%}}


/* v32 final game-shell and clean-status pass */
.auth-shell{position:relative}.auth-close-button{position:absolute;right:18px;top:18px;z-index:20;width:38px;height:38px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:#0a1020;color:#fff;font-size:24px;cursor:pointer}.brand-logo-auth{width:min(320px,82%)!important;max-height:130px!important}.auth-pet{display:grid!important;place-items:center!important}.auth-pet img{width:min(240px,45vw);height:min(240px,45vw);object-fit:contain;filter:drop-shadow(0 28px 42px rgba(26,185,255,.32))}
.game-title-heading{--game-title-art:none;position:relative;display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:112px;padding:22px 24px 22px 118px!important;overflow:hidden;border:1px solid rgba(111,174,255,.24)!important;border-radius:24px!important;background:linear-gradient(115deg,rgba(29,44,83,.98),rgba(12,25,44,.96) 62%,rgba(21,74,72,.88))!important;box-shadow:0 16px 44px rgba(0,0,0,.25)}
.game-title-heading:before{content:"";position:absolute;left:22px;top:50%;width:72px;height:72px;transform:translateY(-50%);border-radius:20px;background-image:var(--game-title-art);background-size:cover;background-position:center;box-shadow:0 10px 25px rgba(0,0,0,.3)}
.game-title-heading:after{content:"";position:absolute;right:-35px;top:-80px;width:250px;height:250px;border-radius:50%;border:1px solid rgba(82,224,194,.08);box-shadow:0 0 0 45px rgba(82,224,194,.025),0 0 0 90px rgba(82,224,194,.018);pointer-events:none}
.game-title-heading>div,.game-title-heading>button{position:relative;z-index:2}.game-title-heading h1{margin:3px 0 0!important;font-size:clamp(32px,4vw,48px)!important}.game-title-heading .eyebrow{margin:0!important}.game-guide-button{position:relative;z-index:3;padding:10px 16px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(7,14,28,.65);color:#dce8ff;font-weight:900;cursor:pointer}.game-guide-button:hover{border-color:#54e7ff88;color:#54e7ff}
#page-mines{--game-title-art:url('/assets/game-art/mines.jpg?v=45.0.0')}#page-blackjack{--game-title-art:url('/assets/game-art/blackjack.jpg?v=45.0.0')}#page-hilo{--game-title-art:url('/assets/game-art/hilo.jpg?v=45.0.0')}#page-coinflip{--game-title-art:url('/assets/game-art/coinflip.jpg?v=45.0.0')}#page-color-dice{--game-title-art:url('/assets/game-art/color-dice.jpg?v=45.0.0')}#page-penguin{--game-title-art:url('/assets/game-art/penguin.jpg?v=45.0.0')}#page-cases{--game-title-art:url('/assets/game-art/cases.jpg?v=45.0.0')}#page-case-battles{--game-title-art:url('/assets/game-art/case-battles.jpg?v=45.0.0')}#page-upgrader{--game-title-art:url('/assets/game-art/upgrader.jpg?v=45.0.0')}
.cases-heading-actions,.battle-heading-actions,.upgrader-heading-actions{display:flex;align-items:center;gap:10px;position:relative;z-index:3}.upgrader-heading-main{display:block!important}.upgrader-heading-icon{display:none!important}
.game-guide-modal{position:relative;width:min(560px,92vw);max-height:84vh;overflow:auto;padding:28px;border:1px solid rgba(255,255,255,.1);border-radius:22px;background:linear-gradient(145deg,#18213d,#090e1d);box-shadow:0 28px 80px rgba(0,0,0,.5)}.game-guide-modal h2{margin:7px 0 18px;font-size:28px}.game-guide-content{display:grid;gap:10px}.game-guide-content article{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:12px;padding:14px;border:1px solid rgba(255,255,255,.065);border-radius:14px;background:rgba(255,255,255,.025)}.game-guide-content article b{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#5264ff22;color:#90eaff}.game-guide-content article span{font-size:12px;line-height:1.5;color:#c5d1e7}
.game-message,#case-preview-status,.case-stage-description{display:none!important}
.p2p-bet-entry{grid-template-columns:1fr auto!important}.p2p-bet-entry small,.p2p-status{display:none!important}.p2p-value small{display:none!important}.coin-stage #coin-result-copy,.color-dice-stage #color-dice-result-copy{display:none!important}
.color-dice-duel-stage{display:grid;grid-template-columns:minmax(150px,1fr) minmax(320px,1.5fr) minmax(150px,1fr);align-items:center;gap:20px;margin-top:18px}.color-dice-center{display:grid;place-items:center}.color-dice-duel-stage .color-dice-tray{width:100%;margin:0}.color-dice-player-panel{min-height:190px}.color-dice-player-panel>b{font-size:28px}
.dice-spin-flow{display:none!important}.case-result p,.case-result span{display:none!important}.case-result{justify-content:center!important;text-align:center}.case-result>div strong{font-size:20px}
.battle-lobby-pool{display:none!important}.battle-lobby-top{grid-template-columns:1fr!important}.battle-stage-meta #case-battle-stage-pool{display:inline-flex;align-items:center;gap:5px}.battle-stage-meta #case-battle-stage-pool.hidden{display:none!important}.battle-summary-prize{min-width:150px}.battle-lobby-footer>span{color:#90a0bd}
.upgrader-layout{display:grid!important;grid-template-columns:minmax(230px,.75fr) minmax(360px,1.3fr) minmax(230px,.75fr)!important;align-items:stretch!important;gap:18px!important}.upgrader-controls{grid-column:1}.upgrader-wheel-panel{grid-column:2}.upgrader-payout-card{grid-column:3!important;grid-row:1!important;align-self:stretch}.upgrader-heading-actions{display:flex}.upgrader-heading-modes{position:static!important}
.admin-games-card{grid-column:1/-1}.admin-games-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:13px}.admin-game-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px;border:1px solid rgba(255,255,255,.07);border-radius:13px;background:#10172a;color:#dce7f8;cursor:pointer}.admin-game-toggle b{font-size:9px;text-transform:uppercase;letter-spacing:.08em}.admin-game-toggle.is-enabled b{color:#63e9ad}.admin-game-toggle.is-disabled{border-color:rgba(255,94,122,.16);background:rgba(255,94,122,.045)}.admin-game-toggle.is-disabled b{color:#ff8097}
@media(max-width:1000px){.upgrader-layout{grid-template-columns:1fr 1.25fr!important}.upgrader-controls{grid-column:1}.upgrader-wheel-panel{grid-column:2}.upgrader-payout-card{grid-column:1/-1!important;grid-row:auto!important}.color-dice-duel-stage{grid-template-columns:1fr 1.4fr 1fr}}
@media(max-width:720px){.game-title-heading{min-height:94px;padding:16px 14px 16px 88px!important;border-radius:18px!important}.game-title-heading:before{left:14px;width:58px;height:58px;border-radius:16px}.game-title-heading h1{font-size:29px!important}.game-guide-button{padding:8px 10px;font-size:10px}.cases-heading-actions,.battle-heading-actions,.upgrader-heading-actions{flex-wrap:wrap;justify-content:flex-end}.upgrader-heading-modes{display:none!important}.upgrader-layout{grid-template-columns:1fr!important}.upgrader-controls,.upgrader-wheel-panel,.upgrader-payout-card{grid-column:1!important;grid-row:auto!important}.color-dice-duel-stage{grid-template-columns:1fr}.color-dice-center{order:2}.color-dice-player-panel{min-height:120px}.admin-games-grid{grid-template-columns:1fr 1fr}.auth-close-button{right:10px;top:10px}}

.game-disabled{opacity:.42!important;filter:grayscale(.55)!important}.game-disabled:after{content:'OFFLINE';position:absolute;right:10px;top:10px;padding:4px 7px;border-radius:8px;background:#ff607522;color:#ff91a1;font-size:8px;font-weight:900;letter-spacing:.08em}.nav-button.game-disabled:after{position:static;margin-left:auto}


/* ======================= VERSION 33 AFFILIATE / STAFF / UPGRADER POLISH ======================= */
.staff-hidden{display:none!important}
.case-builder-fields-single{grid-template-columns:1fr!important}
#affiliate-heading-copy,#affiliate-reward-copy{display:block!important}
#affiliate-heading-copy strong,#affiliate-reward-copy strong{color:#76efb8;font-weight:1000}
.admin-announcement-card select{width:100%;height:48px;padding:0 13px;border:1px solid var(--border);border-radius:13px;background:#0b1224;color:var(--text);font-weight:800}
.global-announcement.announcement-from-user strong{color:#9ac7ff}
.auth-pet{font-size:clamp(86px,10vw,132px)!important;line-height:1!important}
.auth-pet img{display:none!important}

#page-upgrader{container-type:inline-size}
#page-upgrader .upgrader-layout{
  width:min(100%,1180px)!important;
  max-width:1180px!important;
  margin-inline:auto!important;
  display:grid!important;
  grid-template-columns:minmax(220px,260px) minmax(320px,1fr) minmax(220px,280px)!important;
  gap:16px!important;
  align-items:stretch!important;
}
#page-upgrader .upgrader-controls{grid-column:1!important;grid-row:1!important}
#page-upgrader .upgrader-wheel-panel{grid-column:2!important;grid-row:1!important;min-width:0!important;overflow:hidden!important}
#page-upgrader .upgrader-payout-card{
  grid-column:3!important;
  grid-row:1!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  text-align:center!important;
  padding:24px 18px!important;
}
#page-upgrader .upgrader-payout-card>span{display:block!important;max-width:100%;font-size:10px!important}
#page-upgrader .upgrader-payout-card>strong{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  max-width:100%!important;
  margin:0!important;
  font-size:clamp(22px,2.2cqi,34px)!important;
  line-height:1.08!important;
  overflow-wrap:anywhere!important;
  white-space:normal!important;
}
#page-upgrader .upgrader-wheel-shell{width:clamp(280px,38cqi,420px)!important;max-width:100%!important}
#page-upgrader .upgrader-payout-visual{
  width:clamp(96px,12cqi,150px);
  aspect-ratio:1;
  display:grid;
  place-items:center;
  margin-top:18px;
  border-radius:32px;
  transform:rotate(7deg);
  background:linear-gradient(145deg,#0f5ed1,#48d9ff);
  box-shadow:0 22px 45px rgba(0,95,255,.25),inset 0 0 0 4px rgba(255,255,255,.18);
}
#page-upgrader .upgrader-payout-visual img{width:62%;height:62%;object-fit:contain;filter:drop-shadow(0 10px 18px rgba(0,0,0,.25))}
@container (max-width:900px){
  #page-upgrader .upgrader-layout{grid-template-columns:minmax(210px,260px) minmax(300px,1fr)!important;max-width:760px!important}
  #page-upgrader .upgrader-payout-card{grid-column:1/-1!important;grid-row:2!important;min-height:210px!important}
  #page-upgrader .upgrader-wheel-shell{width:min(100%,400px)!important}
}
@container (max-width:620px){
  #page-upgrader .upgrader-layout{grid-template-columns:1fr!important;max-width:520px!important}
  #page-upgrader .upgrader-controls,#page-upgrader .upgrader-wheel-panel,#page-upgrader .upgrader-payout-card{grid-column:1!important;grid-row:auto!important}
  #page-upgrader .upgrader-wheel-shell{width:min(100%,350px)!important}
  #page-upgrader .upgrader-payout-card{min-height:190px!important}
}


/* Version 34 wallet inventory */
.inventory-overlay{z-index:1700;padding:22px;background:rgba(3,6,16,.82);backdrop-filter:blur(16px)}
.inventory-modal{position:relative;width:min(1180px,96vw);height:min(760px,90vh);display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:16px;padding:24px;border:1px solid #2c4268;border-radius:24px;background:radial-gradient(circle at 90% 0,#287dff1d,transparent 28%),linear-gradient(155deg,#11182b,#090f20 68%);box-shadow:0 45px 140px #000d,0 0 60px #287dff16;overflow:hidden}
.inventory-header{display:flex;align-items:end;justify-content:space-between;gap:20px;padding-right:48px}.inventory-header h2{margin:2px 0 0;font-size:32px}.inventory-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.inventory-summary>span{height:38px;display:flex;align-items:center;gap:7px;padding:0 12px;border:1px solid #2c3b5a;border-radius:11px;background:#ffffff08;color:#aab8d2;font-size:11px;font-weight:900}.inventory-summary strong{color:#fff;font-size:15px}
.inventory-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 220px;gap:12px}.inventory-search{height:46px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:9px;padding:0 14px;border:1px solid #2f80ff;border-radius:13px;background:#101629;box-shadow:0 0 0 1px #2f80ff25}.inventory-search>span{color:#48b5ff;font-size:25px;line-height:1}.inventory-search input,.inventory-toolbar select{width:100%;height:44px;border:0;background:transparent;color:#fff;outline:0;font:inherit;font-size:12px;font-weight:800}.inventory-toolbar select{padding:0 13px;border:1px solid #2a3450;border-radius:11px;background:#1b2237;color:#fff}
.inventory-grid{min-height:0;display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));align-content:start;gap:12px;padding:2px 4px 22px 2px;overflow:auto;scrollbar-width:none}.inventory-grid::-webkit-scrollbar{display:none}.inventory-card{position:relative;min-width:0;display:grid;grid-template-rows:minmax(126px,1fr) auto;gap:8px;padding:10px;border:1px solid #2a3859;border-radius:14px;background:linear-gradient(160deg,#1a2136,#12182a);box-shadow:inset 0 1px 0 #ffffff08;transition:.18s ease}.inventory-card:hover{transform:translateY(-2px);border-color:#3d68a8;box-shadow:0 14px 28px #0006,inset 0 1px 0 #ffffff0d}.inventory-card-image,.inventory-image-fallback{width:100%;height:126px;display:grid;place-items:center;object-fit:contain;border-radius:10px;background:radial-gradient(circle,#27456955,transparent 65%)}.inventory-image-fallback{font-size:42px;font-weight:1000;color:#89a4cb}.inventory-quantity{position:absolute;z-index:2;top:8px;right:8px;min-width:29px;height:25px;display:grid;place-items:center;padding:0 7px;border:2px solid #1b2235;border-radius:999px;background:#04070e;color:#fff;font-size:10px;font-weight:1000}.inventory-gems-card{order:-1;border-color:#27aeea66;background:radial-gradient(circle at 50% 32%,#34c9ff20,transparent 42%),linear-gradient(160deg,#17263e,#11192d)}.inventory-gems-card .inventory-quantity{background:#0a6e9c;border-color:#123b59}.inventory-card-copy{min-width:0;display:grid;gap:5px}.inventory-card-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.inventory-card-copy span{display:flex;align-items:center;gap:5px;color:#37a9ff;font-size:12px;font-weight:1000}.inventory-card-copy .gem-icon{width:15px;height:15px}.inventory-empty{grid-column:1/-1;min-height:220px;display:grid;place-items:center;align-content:center;gap:12px;color:#8392ae}.inventory-search-empty{min-height:150px}.inventory-spinner{width:28px;height:28px;border:3px solid #ffffff18;border-top-color:#36aaff;border-radius:50%;animation:inventorySpin .8s linear infinite}@keyframes inventorySpin{to{transform:rotate(360deg)}}
@media(max-width:960px){.inventory-grid{grid-template-columns:repeat(4,minmax(135px,1fr))}.inventory-modal{width:min(94vw,850px)}}
@media(max-width:700px){.inventory-overlay{padding:8px}.inventory-modal{width:100%;height:94vh;padding:17px;border-radius:19px}.inventory-header{align-items:start;flex-direction:column;gap:10px}.inventory-header h2{font-size:27px}.inventory-summary{padding-right:35px}.inventory-toolbar{grid-template-columns:1fr}.inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.inventory-card{grid-template-rows:110px auto}.inventory-card-image,.inventory-image-fallback{height:110px}}

/* Version 36 inventory compact modal + PEND-ready wallet */
.inventory-overlay{display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(3,6,16,.72)}
.inventory-modal{width:min(860px,94vw)!important;height:min(620px,88vh)!important;max-height:88vh!important;padding:18px!important;border-radius:20px!important;gap:12px!important}
.inventory-close{position:absolute;right:14px;top:14px;z-index:5;height:38px;display:inline-flex;align-items:center;gap:8px;padding:0 14px;border:1px solid rgba(98,130,183,.45);border-radius:999px;background:#10182b;color:#fff;font-weight:1000;cursor:pointer;box-shadow:0 10px 28px #0008}
.inventory-close:hover{border-color:#43a9ff;background:#14213b;transform:translateY(-1px)}
.inventory-close span{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#9fb2d6}
.inventory-header{padding-right:118px!important;align-items:center!important}.inventory-header h2{font-size:28px!important}.inventory-summary>span{height:34px!important}
.inventory-toolbar{grid-template-columns:minmax(220px,1fr) 190px!important}.inventory-search{height:42px!important}.inventory-toolbar select{height:42px!important}
.inventory-grid{grid-template-columns:repeat(4,minmax(132px,1fr))!important;gap:10px!important;padding-bottom:14px!important}
.inventory-card{grid-template-rows:96px auto!important;padding:9px!important;border-radius:13px!important}.inventory-card-image,.inventory-image-fallback{height:96px!important}.inventory-card-copy strong{font-size:11px!important}.inventory-card-copy span{font-size:11px!important}.inventory-quantity{height:23px;min-width:27px;font-size:9px}
@media(max-width:760px){.inventory-modal{width:96vw!important;height:86vh!important;padding:14px!important}.inventory-header{align-items:start!important;gap:8px!important;padding-right:88px!important}.inventory-header h2{font-size:23px!important}.inventory-toolbar{grid-template-columns:1fr!important}.inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.inventory-card{grid-template-rows:82px auto!important}.inventory-card-image,.inventory-image-fallback{height:82px!important}.inventory-close span{display:none}}
@media(max-width:500px){.inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.inventory-modal{height:90vh!important}.inventory-summary>span{height:31px!important;padding:0 9px!important}.inventory-header{padding-right:52px!important}.inventory-close{width:38px;padding:0;justify-content:center}}


/* Version 36: truly viewport-centred compact inventory */
body.inventory-open{overflow:hidden}
.inventory-overlay{position:fixed!important;inset:0!important;z-index:5000!important;display:grid!important;place-items:center!important;padding:16px!important;background:rgba(2,5,14,.82)!important;backdrop-filter:blur(14px)!important}
.inventory-overlay.hidden{display:none!important}
.inventory-modal{position:relative!important;width:min(1000px,calc(100vw - 32px))!important;height:min(620px,calc(100vh - 32px))!important;max-width:1000px!important;max-height:620px!important;display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:12px!important;margin:0!important;padding:18px!important;overflow:hidden!important;border:1px solid #2d4268!important;border-radius:20px!important;background:radial-gradient(circle at 90% 0,#287dff20,transparent 30%),linear-gradient(155deg,#12192c,#090f20 70%)!important;box-shadow:0 38px 120px #000e,0 0 50px #287dff1c!important}
.inventory-close{position:absolute!important;top:12px!important;right:12px!important;z-index:10!important;width:42px!important;height:42px!important;display:grid!important;place-items:center!important;padding:0!important;border:1px solid #3a4c70!important;border-radius:12px!important;background:#0b1222!important;color:#fff!important;font-size:27px!important;font-weight:500!important;line-height:1!important;cursor:pointer!important;box-shadow:0 10px 26px #0009!important}
.inventory-close:hover{border-color:#3ea8ff!important;background:#14213a!important;transform:translateY(-1px)!important}
.inventory-header{min-width:0!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;padding:0 50px 0 2px!important}
.inventory-header h2{margin:1px 0 0!important;font-size:27px!important;letter-spacing:-.7px!important}.inventory-header .eyebrow{margin:0!important;font-size:9px!important}
.inventory-summary{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important}.inventory-summary>span{height:34px!important;display:flex!important;align-items:center!important;gap:6px!important;padding:0 11px!important;border:1px solid #2b3957!important;border-radius:10px!important;background:#ffffff08!important;color:#9fafca!important;font-size:10px!important;font-weight:900!important}.inventory-summary strong{font-size:13px!important;color:#fff!important}
.inventory-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) 200px!important;gap:10px!important}.inventory-search{height:43px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:8px!important;padding:0 13px!important;border:1px solid #2788ff!important;border-radius:12px!important;background:#10172a!important;box-shadow:0 0 0 1px #2788ff20!important}.inventory-search>span{font-size:22px!important;color:#43b4ff!important}.inventory-search input,.inventory-toolbar select{height:41px!important;min-width:0!important;border:0!important;outline:0!important;background:transparent!important;color:#fff!important;font:inherit!important;font-size:12px!important;font-weight:800!important}.inventory-toolbar select{padding:0 12px!important;border:1px solid #2b3652!important;border-radius:11px!important;background:#1b2237!important}
.inventory-grid{min-height:0!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;align-content:start!important;gap:10px!important;padding:2px 4px 18px 2px!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;scrollbar-width:none!important}.inventory-grid::-webkit-scrollbar{display:none!important}
.inventory-card{position:relative!important;min-width:0!important;display:grid!important;grid-template-rows:112px auto!important;gap:7px!important;padding:9px!important;border:1px solid #2a3859!important;border-radius:13px!important;background:linear-gradient(160deg,#1a2136,#12182a)!important;box-shadow:inset 0 1px 0 #ffffff08!important}.inventory-card:hover{transform:translateY(-2px)!important;border-color:#3d68a8!important;box-shadow:0 14px 28px #0006,inset 0 1px 0 #ffffff0d!important}.inventory-card-image,.inventory-image-fallback{width:100%!important;height:112px!important;display:grid!important;place-items:center!important;object-fit:contain!important;border-radius:10px!important;background:radial-gradient(circle,#27456955,transparent 66%)!important}.inventory-image-fallback{font-size:38px!important;font-weight:1000!important;color:#89a4cb!important}.inventory-quantity{position:absolute!important;z-index:2!important;top:7px!important;right:7px!important;min-width:27px!important;height:23px!important;display:grid!important;place-items:center!important;padding:0 6px!important;border:2px solid #1b2235!important;border-radius:999px!important;background:#04070e!important;color:#fff!important;font-size:9px!important;font-weight:1000!important}.inventory-gems-card{order:-1!important;border-color:#27aeea66!important;background:radial-gradient(circle at 50% 32%,#34c9ff20,transparent 42%),linear-gradient(160deg,#17263e,#11192d)!important}.inventory-gems-card .inventory-quantity{background:#0a6e9c!important;border-color:#123b59!important}.inventory-card-copy{min-width:0!important;display:grid!important;gap:4px!important}.inventory-card-copy strong{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:11px!important}.inventory-card-copy span{display:flex!important;align-items:center!important;gap:4px!important;color:#37a9ff!important;font-size:11px!important;font-weight:1000!important}.inventory-card-copy .gem-icon{width:14px!important;height:14px!important}
@media(max-width:850px){.inventory-modal{width:min(760px,calc(100vw - 20px))!important;height:min(650px,calc(100vh - 20px))!important}.inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:650px){.inventory-overlay{padding:7px!important}.inventory-modal{width:calc(100vw - 14px)!important;height:calc(100vh - 14px)!important;padding:14px!important;border-radius:17px!important}.inventory-header{align-items:flex-start!important;flex-direction:column!important;padding-right:47px!important;gap:7px!important}.inventory-header h2{font-size:23px!important}.inventory-summary{justify-content:flex-start!important}.inventory-toolbar{grid-template-columns:1fr!important}.inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.inventory-card{grid-template-rows:91px auto!important}.inventory-card-image,.inventory-image-fallback{height:91px!important}}
@media(max-width:440px){.inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.inventory-summary>span{height:31px!important;padding:0 8px!important}}


/* ======================= VERSION 38 P2P INVENTORY WAGERS ======================= */
.p2p-asset-modal{width:min(900px,94vw)!important;height:min(760px,92vh);grid-template-rows:auto auto auto auto minmax(0,1fr) auto!important;gap:12px!important;padding:22px!important;overflow:hidden!important}
.p2p-asset-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-right:46px}.p2p-stake-summary{display:grid;justify-items:end;gap:5px}.p2p-stake-summary span{color:var(--muted);font-size:10px;font-weight:800}.p2p-stake-summary strong{display:flex;align-items:center;gap:6px;font-size:21px}.p2p-choice-and-range{display:grid;grid-template-columns:minmax(150px,220px) 1fr;align-items:center;gap:12px}.p2p-choice-and-range .selected-choice-preview{min-height:58px}.p2p-choice-and-range .wager-range{display:flex;align-items:center;justify-content:center;gap:6px;min-height:45px;margin:0;padding:8px 12px;border:1px solid #2c3b59;border-radius:13px;background:#0b1223;font-weight:950}.p2p-rule-badges{display:flex;flex-wrap:wrap;gap:6px}.p2p-rule-badges span{padding:7px 10px;border:1px solid #315079;border-radius:999px;background:#11203a;color:#8fc8ff;font-size:9px;font-weight:900;text-transform:uppercase}.p2p-create-rules{display:flex;flex-wrap:wrap;gap:10px 18px;padding:10px 12px;border:1px solid #243451;border-radius:14px;background:#0b1222}.p2p-create-rules .form-check{margin:0}.p2p-asset-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}.p2p-asset-toolbar .inventory-search{min-width:0}.p2p-gem-editor{display:grid;grid-template-columns:auto minmax(180px,1fr) auto;align-items:center;gap:10px;padding:10px 12px;border:1px solid #2b78a35c;border-radius:14px;background:linear-gradient(135deg,#0c2034,#0b1426)}.p2p-gem-editor>label{font-size:10px;font-weight:900;text-transform:uppercase;color:#71cfff}.p2p-gem-editor .amount-input{margin:0}.p2p-gem-presets{display:flex;gap:6px}.p2p-gem-presets button{height:38px;padding:0 10px;border:1px solid #2c4b6d;border-radius:10px;background:#111c31;color:#d7e9ff;font-weight:900;cursor:pointer}.p2p-asset-grid{min-height:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-content:start;gap:10px;padding:2px 3px 16px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}.p2p-asset-grid::-webkit-scrollbar{display:none}.p2p-asset-card{position:relative;min-width:0;display:grid;grid-template-rows:94px auto auto;gap:6px;padding:9px;border:1px solid #283753;border-radius:14px;background:linear-gradient(160deg,#192137,#11182a);cursor:pointer;transition:.16s ease}.p2p-asset-card:hover{transform:translateY(-2px);border-color:#456c9e}.p2p-asset-card.is-selected{border-color:#45d5ff;box-shadow:inset 0 0 0 1px #45d5ff66,0 10px 25px #0005;background:linear-gradient(160deg,#17304a,#111a30)}.p2p-asset-card>img,.p2p-asset-card>.p2p-asset-image,.p2p-asset-card .inventory-image-fallback{width:100%;height:94px;object-fit:contain;border-radius:10px;background:radial-gradient(circle,#27456955,transparent 67%)}.p2p-asset-card>div:not(.p2p-quantity-controls){min-width:0;display:grid;gap:4px}.p2p-asset-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.p2p-asset-card>div>span{display:flex;align-items:center;gap:4px;color:#42b8ff;font-size:10px;font-weight:950}.p2p-asset-card>small{position:absolute;left:8px;top:8px;padding:4px 6px;border-radius:999px;background:#07101dcc;color:#9db8d8;font-size:7px;font-weight:1000;text-transform:uppercase}.p2p-asset-owned{position:absolute;right:8px;top:8px;z-index:2;padding:4px 7px;border:1px solid #2c4567;border-radius:999px;background:#050911e8;color:#fff;font-size:8px;font-weight:1000}.p2p-gem-card{border-color:#177db866;background:radial-gradient(circle at 50% 35%,#28c6ff22,transparent 45%),linear-gradient(160deg,#162942,#10192d)}.p2p-quantity-controls{display:grid!important;grid-template-columns:28px 1fr 28px;align-items:center;gap:4px}.p2p-quantity-controls button{height:26px;border:1px solid #314767;border-radius:8px;background:#091223;color:#fff;font-weight:1000;cursor:pointer}.p2p-quantity-controls b{text-align:center;font-size:10px}.p2p-assets-empty{grid-column:1/-1;min-height:180px;display:grid;place-items:center;align-content:center;gap:10px;color:#8292ad}.p2p-lobby-stakes{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;align-items:center!important;gap:8px!important;min-width:240px}.p2p-lobby-stakes>span{font-size:8px;font-weight:1000;color:#667994}.p2p-lobby-stakes em{font-size:9px;color:#71829e}.p2p-stake-preview{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px}.p2p-stake-token{position:relative;display:inline-flex;align-items:center;gap:3px;min-height:30px;padding:4px 7px;border:1px solid #2b3c5a;border-radius:10px;background:#0a1120}.p2p-stake-token b{font-size:8px}.p2p-stake-gems .gem-icon{width:17px;height:17px}.p2p-stake-pet{padding:3px}.p2p-stake-image,.p2p-stake-pet .inventory-image-fallback{width:27px;height:27px;object-fit:contain;background:transparent}.p2p-stake-more{font-size:8px;color:#8aa0bd;font-weight:900}.p2p-bet-entry>div{display:grid;justify-items:end;gap:5px}.p2p-bet-entry>div>strong{display:flex;align-items:center;gap:4px}
@media(max-width:760px){.p2p-asset-modal{width:96vw!important;height:92vh;padding:14px!important}.p2p-asset-head{gap:8px}.p2p-stake-summary strong{font-size:17px}.p2p-choice-and-range{grid-template-columns:1fr}.p2p-create-rules{gap:8px}.p2p-asset-toolbar{grid-template-columns:1fr 1fr}.p2p-asset-toolbar .inventory-search{grid-column:1/-1}.p2p-gem-editor{grid-template-columns:1fr}.p2p-gem-presets{justify-content:stretch}.p2p-gem-presets button{flex:1}.p2p-asset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.p2p-lobby-stakes{min-width:180px}.p2p-asset-card{grid-template-rows:78px auto auto}.p2p-asset-card>img,.p2p-asset-card>.p2p-asset-image,.p2p-asset-card .inventory-image-fallback{height:78px}}
@media(max-width:480px){.p2p-asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.p2p-asset-head{display:grid}.p2p-stake-summary{justify-items:start}.p2p-lobby-stakes{grid-template-columns:1fr!important}.p2p-lobby-stakes>span{display:none}.p2p-create-rules{display:grid}.p2p-asset-card{grid-template-rows:72px auto auto}.p2p-asset-card>img,.p2p-asset-card>.p2p-asset-image,.p2p-asset-card .inventory-image-fallback{height:72px}}

/* Version 39: compact stacked inventory previews and safer modal layers */
.p2p-stake-preview.p2p-stake-stack{
  display:flex!important;
  align-items:center;
  justify-content:flex-start;
  gap:0!important;
  min-height:46px;
  padding-left:4px;
  overflow:visible;
}
.p2p-stack-icon,.p2p-stack-more{
  position:relative;
  flex:0 0 46px;
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  margin-left:-10px;
  overflow:hidden;
  border:3px solid #192238;
  border-radius:50%;
  background:#0d1527;
  box-shadow:0 5px 14px #0008;
  color:#dbe8ff;
  font-size:8px;
  font-weight:1000;
  text-align:center;
}
.p2p-stack-icon:first-child{margin-left:0}
.p2p-stack-icon img{width:100%;height:100%;object-fit:contain;padding:2px;background:radial-gradient(circle,#243858 0,#101827 72%)}
.p2p-stack-gem img{object-fit:contain;padding:6px;background:radial-gradient(circle,#23c8ff55,transparent 68%)}
.p2p-stack-none{padding:3px;background:#111a2d;color:#8e9bb2;line-height:1.05}
.p2p-stack-more{z-index:8;margin-left:-10px;background:#172138;color:#e8f1ff;font-size:13px}
.p2p-lobby-stakes .p2p-stake-stack{justify-content:center}
.p2p-bet-entry .p2p-stake-stack{justify-content:flex-end}
.p2p-quantity-controls button:disabled{
  cursor:not-allowed!important;
  opacity:.3;
  filter:saturate(.25);
  transform:none!important;
}
.p2p-winner-panel-glow{
  border-color:#75f5b5!important;
  background:radial-gradient(circle at 50% 28%,rgba(96,255,175,.24),rgba(21,32,55,.94) 66%)!important;
  box-shadow:0 0 0 2px rgba(108,255,185,.45),0 0 42px rgba(70,255,165,.55),inset 0 0 34px rgba(60,255,154,.16)!important;
  animation:p2pWinnerPanelPulse 1.15s ease-in-out infinite alternate;
}
@keyframes p2pWinnerPanelPulse{from{filter:brightness(1)}to{filter:brightness(1.18)}}
.color-dice-view-actions{
  width:min(100%,560px);
  display:grid;
  justify-items:center;
  gap:9px;
  margin:12px auto 0;
  padding:11px 14px;
  border:1px solid #2c3d5d;
  border-radius:14px;
  background:#0a1222e8;
}
.color-dice-view-actions.hidden{display:none!important}
.color-dice-view-actions>strong{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#aebbd3}
.color-dice-view-colors{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.color-dice-view-colors .dice-join-swatch{width:36px;height:36px;border:3px solid #121b2d;box-shadow:0 5px 14px #0007}
.overlay-panel:not(.hidden){z-index:10000!important}
#p2p-wager-modal:not(.hidden),#inventory-panel:not(.hidden){overflow:auto!important;padding:12px!important}
.p2p-asset-modal{max-height:calc(100vh - 24px)!important;overflow:hidden!important}
.p2p-asset-grid{overscroll-behavior:contain}
body.inventory-open{overflow:hidden}
@media(max-width:650px){
  .p2p-stack-icon,.p2p-stack-more{flex-basis:38px;width:38px;height:38px;margin-left:-8px;border-width:2px}
  .p2p-stack-more{font-size:11px}
  .p2p-bet-entry .p2p-stake-stack{justify-content:flex-start}
  .color-dice-view-actions{padding:9px}
}


/* Version 41: winner circle only, Coinflip-style Color Dice controls, and auth mode links. */
.auth-mode-switch{
  margin:13px 0 0;
  color:#8fa0bc;
  font-size:11px;
  text-align:center;
}
.auth-mode-switch button{
  padding:0;
  border:0;
  background:transparent;
  color:#69e8ff;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:3px;
}
.auth-mode-switch button:hover{color:#a7f5ff}

/* The result glow belongs to the large circular Roblox avatar only. */
.p2p-winner-panel-glow{
  animation:none!important;
  border-color:inherit!important;
  background:inherit!important;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
}
.coin-player-avatar.p2p-winner-avatar-glow,
.dice-player-avatar.p2p-winner-avatar-glow{
  position:relative;
  z-index:4;
  border-color:#89ffd0!important;
  outline:3px solid rgba(110,255,194,.34);
  outline-offset:4px;
  animation:p2pWinnerMainCircleGlow .9s ease-in-out infinite alternate!important;
}
@keyframes p2pWinnerMainCircleGlow{
  from{
    box-shadow:0 0 0 3px rgba(76,255,171,.42),0 0 18px rgba(76,255,171,.62),0 10px 24px rgba(0,0,0,.45);
    filter:brightness(1.04) saturate(1.05);
    transform:scale(1);
  }
  to{
    box-shadow:0 0 0 5px rgba(162,255,220,.72),0 0 34px rgba(65,255,166,.95),0 0 58px rgba(72,214,255,.58),0 10px 24px rgba(0,0,0,.45);
    filter:brightness(1.18) saturate(1.18);
    transform:scale(1.065);
  }
}

/* Keep Join and View beside each other, matching Coinflip lobby controls. */
#color-dice-lobbies .p2p-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}
#color-dice-lobbies .p2p-join,
#color-dice-lobbies .p2p-view{min-width:72px}


/* Color Dice uses the same large main profile circles as Coinflip. */
.color-dice-player-panel .dice-player-avatar-wrap{
  width:105px;
  height:105px;
}
.color-dice-player-panel .dice-player-avatar{
  width:105px;
  height:105px;
  font-size:30px;
}
.color-dice-player-panel .dice-player-avatar-wrap .score-color{
  right:2px;
  bottom:2px;
  width:22px;
  height:22px;
  border-width:3px;
}
@media(max-width:720px){
  .color-dice-player-panel .dice-player-avatar-wrap,
  .color-dice-player-panel .dice-player-avatar{width:72px;height:72px}
  .color-dice-player-panel .dice-player-avatar{font-size:23px}
  .color-dice-player-panel .dice-player-avatar-wrap .score-color{width:18px;height:18px}
}
@media(max-width:480px){
  .color-dice-player-panel .dice-player-avatar-wrap,
  .color-dice-player-panel .dice-player-avatar{width:60px;height:60px}
  .color-dice-player-panel .dice-player-avatar{font-size:20px}
}

/* v41: Color Dice uses the same view overlay behavior as Coinflip. */
#page-color-dice #color-dice-stage.lobby-view-stage:not(.hidden){
  position:fixed!important;
  z-index:260!important;
  left:50%!important;
  top:50%!important;
  right:auto!important;
  bottom:auto!important;
  transform:translate(-50%,-50%)!important;
  width:min(780px,calc(100vw - 28px))!important;
  max-height:calc(100vh - 32px)!important;
  min-height:0!important;
  margin:0!important;
  padding:28px 26px 24px!important;
  overflow:auto!important;
  overscroll-behavior:contain;
  border-radius:24px!important;
  box-shadow:0 32px 100px #000d,0 0 0 9999px rgba(3,6,16,.82),0 0 58px rgba(40,125,255,.22)!important;
  animation:p2pModalIn .22s ease!important;
}
#page-color-dice #color-dice-stage.lobby-view-stage .stage-close{
  position:sticky!important;
  float:right!important;
  top:0!important;
  right:0!important;
  margin:0 0 -36px!important;
  z-index:30!important;
}
#page-color-dice #color-dice-stage .color-dice-duel-stage{
  width:100%;
  margin-top:8px;
}

/* Finished lobby result markers: winner green, loser red. */
.p2p-avatar.p2p-lobby-winner{
  border-color:#58f5a3!important;
  box-shadow:0 0 0 2px rgba(88,245,163,.25),0 0 18px rgba(69,230,138,.58),inset 0 0 18px rgba(82,221,255,.08)!important;
}
.p2p-avatar.p2p-lobby-loser{
  border-color:#ff5877!important;
  box-shadow:0 0 0 2px rgba(255,88,119,.2),0 0 16px rgba(255,68,102,.48),inset 0 0 18px rgba(255,68,102,.05)!important;
}
.side-dot.result-win{
  background:#45e68a!important;
  color:#45e68a!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.2),0 0 14px #45e68acc!important;
}
.side-dot.result-loss{
  background:#ff4668!important;
  color:#ff4668!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.16),0 0 13px #ff4668bb!important;
}

@media(max-width:720px){
  #page-color-dice #color-dice-stage.lobby-view-stage:not(.hidden){
    width:calc(100vw - 18px)!important;
    max-height:calc(100vh - 18px)!important;
    padding:20px 14px 18px!important;
  }
}


/* Version 43: delayed lobby results, centered Color Dice board, and fixed corner close button. */
.p2p-versus{
  min-width:0;
}
.p2p-lobby-vs{
  min-width:30px;
  text-align:center;
  color:#aeb7cb;
  font-size:12px;
  font-weight:1000;
}
.p2p-lobby-result-countdown{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  flex:0 0 34px;
  border:1px solid #425273;
  border-radius:50%;
  background:#121a2d;
  color:#eef8ff;
  box-shadow:0 0 18px rgba(82,221,255,.2),inset 0 0 14px rgba(82,221,255,.08);
  font-size:14px;
  font-weight:1000;
  font-variant-numeric:tabular-nums;
}
.p2p-lobby-result-coin{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  flex:0 0 38px;
  border:3px solid rgba(235,239,255,.72);
  border-radius:50%;
  color:#fff;
  box-shadow:0 8px 18px rgba(0,0,0,.45),0 0 18px currentColor;
  font-size:13px;
  font-weight:1000;
}
.p2p-lobby-result-coin.purple{background:linear-gradient(145deg,#b688ff,#6634bd);color:#c6a5ff}
.p2p-lobby-result-coin.green{background:linear-gradient(145deg,#69efa0,#199052);color:#78f7aa}
.p2p-lobby-result-die{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  flex:0 0 38px;
  border:3px solid rgba(235,239,255,.72);
  border-radius:11px;
  box-shadow:0 8px 18px rgba(0,0,0,.45),0 0 17px currentColor;
}
.p2p-lobby-result-die i{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.78);box-shadow:inset 0 1px 2px rgba(0,0,0,.25)}
.p2p-lobby-result-die.red{background:#d83b57;color:#f04461}
.p2p-lobby-result-die.orange{background:#d97526;color:#f28b30}
.p2p-lobby-result-die.yellow{background:#d3b62f;color:#f4d54a}
.p2p-lobby-result-die.green{background:#28ad63;color:#39cf78}
.p2p-lobby-result-die.blue{background:#3079d4;color:#3c8ef5}
.p2p-lobby-result-die.purple{background:#7a48c8;color:#985ee8}
.p2p-lobby-result-die.waiting{background:#20283a;color:#68748d}

/* The six dice stay in the true middle column between both large player circles. */
#page-color-dice #color-dice-stage .color-dice-duel-stage{
  display:grid!important;
  grid-template-columns:minmax(130px,1fr) minmax(270px,330px) minmax(130px,1fr)!important;
  align-items:center!important;
  justify-items:center!important;
  gap:20px!important;
  width:100%!important;
  margin:12px 0 0!important;
}
#page-color-dice #color-dice-stage #dice-player-one-panel{grid-column:1}
#page-color-dice #color-dice-stage .color-dice-center{grid-column:2;grid-row:1;width:100%;display:grid;place-items:center}
#page-color-dice #color-dice-stage #dice-player-two-panel{grid-column:3}
#page-color-dice #color-dice-stage .color-dice-tray{grid-template-columns:repeat(3,minmax(58px,76px));justify-content:center;width:100%;gap:12px}

/* Always keep the Color Dice X in the actual top-right corner. */
#page-color-dice #color-dice-stage.lobby-view-stage .stage-close{
  position:absolute!important;
  top:12px!important;
  right:12px!important;
  left:auto!important;
  float:none!important;
  margin:0!important;
  z-index:40!important;
}

@media(max-width:720px){
  #page-color-dice #color-dice-stage .color-dice-duel-stage{
    grid-template-columns:minmax(72px,1fr) minmax(155px,1.45fr) minmax(72px,1fr)!important;
    gap:8px!important;
  }
  #page-color-dice #color-dice-stage .color-dice-tray{grid-template-columns:repeat(3,minmax(42px,58px));gap:7px}
  #page-color-dice #color-dice-stage .color-die{width:58px;height:58px;border-width:4px;border-radius:14px;font-size:21px}
}
@media(max-width:480px){
  #page-color-dice #color-dice-stage .color-dice-duel-stage{
    grid-template-columns:minmax(58px,.8fr) minmax(132px,1.4fr) minmax(58px,.8fr)!important;
    gap:5px!important;
  }
  #page-color-dice #color-dice-stage .color-dice-tray{grid-template-columns:repeat(3,minmax(36px,48px));gap:5px}
  #page-color-dice #color-dice-stage .color-die{width:48px;height:48px;border-width:3px;border-radius:12px;font-size:18px}
}

/* v44: OneDrive-safe admin/mobile, owner identity, and case-battle scaling */
.username-display{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:100%}
.owner-name-wrap{position:relative;overflow:visible!important}
.owner-crown-badge{width:20px;height:20px;flex:0 0 auto;object-fit:contain;filter:drop-shadow(0 0 7px rgba(255,119,224,.55))}
.owner-rainbow-name{display:inline-block!important;color:transparent!important;background:linear-gradient(90deg,#ff4ca8,#ff9a55,#ffe66f,#59ef9b,#50cfff,#9c6cff,#ff4ca8);background-size:350% 100%;-webkit-background-clip:text;background-clip:text;animation:ownerRainbowShift 4s linear infinite;font-weight:1000!important;text-shadow:none!important}
@keyframes ownerRainbowShift{to{background-position:350% 0}}
.profile-hero .owner-crown-badge,.player-profile-card .owner-crown-badge{width:34px;height:34px}
.chat-name-button .owner-rainbow-name{font-weight:1000!important}.owner-chat-crown{width:18px!important;height:18px!important;filter:drop-shadow(0 0 5px rgba(255,126,220,.5))}
.p2p-bet-name .owner-crown-badge,.coin-stage-player .owner-crown-badge{width:17px;height:17px}
.battle-player-footer .owner-crown-badge,.battle-seat .owner-crown-badge,.battle-seat-ready .owner-crown-badge{width:16px;height:16px}

.admin-modal{display:flex;flex-direction:column;overflow:hidden}
.admin-heading{flex:0 0 auto}
.admin-body{display:grid;grid-template-columns:170px minmax(0,1fr);gap:14px;min-height:0;flex:1}
.admin-side-menu{position:sticky;top:0;align-self:start;display:flex;flex-direction:column;gap:7px;max-height:100%;overflow-y:auto;padding:6px 7px 6px 0;scrollbar-width:thin}
.admin-side-menu button{min-height:40px;padding:9px 11px;border:1px solid rgba(255,255,255,.07);border-radius:11px;background:#0b1325;color:#9faecc;text-align:left;font:inherit;font-size:10px;font-weight:900;cursor:pointer;white-space:nowrap}
.admin-side-menu button:hover,.admin-side-menu button.active{border-color:rgba(82,221,255,.38);background:rgba(48,133,255,.12);color:#fff}
.admin-side-menu.announcement-only button:not([data-admin-scroll="admin-announcement-form"]){display:none}
.admin-tools{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:5px;scroll-padding-top:8px}
.admin-tools>.admin-card{scroll-margin-top:8px}
.admin-feature-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.admin-feature-toggle{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:52px;padding:11px 13px;border:1px solid rgba(255,255,255,.08);border-radius:13px;background:#0a1121;color:#fff;cursor:pointer}
.admin-feature-toggle span{font-weight:900}.admin-feature-toggle b{font-size:9px;text-transform:uppercase;letter-spacing:.06em}
.admin-feature-toggle.is-enabled{border-color:rgba(65,229,150,.34);background:rgba(65,229,150,.08)}.admin-feature-toggle.is-enabled b{color:#64e9a5}
.admin-feature-toggle.is-disabled{border-color:rgba(255,89,120,.3);background:rgba(255,89,120,.07)}.admin-feature-toggle.is-disabled b{color:#ff8ca2}

/* Case battle views fit small screens without overlapping the site chrome. */
.battle-builder-overlay,.case-battle-stage{overscroll-behavior:contain}
.battle-builder-panel{scrollbar-gutter:stable}
.case-battle-stage>.stage-close,.battle-builder-panel>.stage-close{z-index:5}

@media(max-width:760px){
  .admin-panel{padding:6px;place-items:stretch}
  .admin-modal{width:100%;height:calc(100dvh - 12px);max-height:none;padding:15px 11px;border-radius:17px}
  .admin-heading{margin-bottom:10px;padding-right:42px}.admin-heading h2{font-size:25px}
  .admin-body{display:flex;flex-direction:column;gap:8px}
  .admin-side-menu{position:relative;top:auto;display:flex;flex-direction:row;flex:0 0 auto;width:100%;max-height:none;overflow-x:auto;overflow-y:hidden;padding:0 0 6px;scroll-snap-type:x proximity}
  .admin-side-menu button{flex:0 0 auto;min-height:36px;padding:8px 10px;scroll-snap-align:start}
  .admin-tools{grid-template-columns:1fr;gap:10px;padding-right:2px}
  .admin-card{padding:13px;border-radius:14px}.admin-two-fields,.admin-feature-grid{grid-template-columns:1fr}
  .admin-case-card{padding:11px}.case-builder-step{grid-template-columns:26px minmax(0,1fr);gap:8px;padding:11px 0}.case-step-number{width:25px;height:25px}
  .admin-case-search-row{grid-template-columns:1fr}.admin-case-search-row .button{width:100%}
  .admin-case-results,.admin-case-items{max-height:42dvh;overflow:auto}

  .battle-builder-overlay{padding:0;align-items:stretch}
  .battle-builder-panel{width:100%;height:calc(100dvh - var(--top,0px));max-height:none;margin-top:var(--top,0px);padding:52px 10px 12px;border-radius:0;overflow:auto}
  .battle-builder-panel>.stage-close{position:fixed;top:calc(var(--top,0px) + 9px);right:9px}
  .battle-builder-grid{grid-template-columns:1fr;gap:9px}.battle-builder-grid>section{padding:11px}
  .battle-selected-list{max-height:25dvh}.battle-case-picker{grid-template-columns:repeat(2,minmax(0,1fr));max-height:44dvh;gap:7px}
  .battle-picker-card{padding:8px}.battle-picker-card>div{height:66px}.battle-picker-img{width:62px;height:62px}
  .battle-builder-footer{position:sticky;bottom:-1px;z-index:4;margin:10px -2px 0;padding:10px;background:rgba(12,18,34,.97);backdrop-filter:blur(8px)}
  .case-battle-stage{inset:var(--top) 0 0 0!important;padding:48px 7px 18px!important}
  .case-battle-stage>.stage-close{position:fixed!important;top:calc(var(--top) + 8px)!important;right:8px!important}
  .case-battle-stage-head{padding:0 0 10px!important;gap:8px}.case-battle-stage-head h2{font-size:20px!important}
  .case-battle-columns{display:flex!important;gap:7px!important;overflow-x:auto!important;scroll-snap-type:x mandatory;padding-bottom:7px}
  .battle-player-column{flex:0 0 min(82vw,235px)!important;min-width:0!important;scroll-snap-align:center}
  .battle-reel-window{height:285px!important}.battle-reel-card{grid-template-columns:60px minmax(0,1fr)!important;min-height:88px!important}.battle-reel-img{width:56px!important;height:56px!important}
  .case-battle-case-strip{padding:8px!important}.battle-strip-items article{min-width:128px!important;grid-template-columns:36px minmax(68px,1fr)!important}.battle-strip-img{width:35px!important;height:35px!important}
}

@media(max-width:420px){
  .battle-case-picker{grid-template-columns:1fr 1fr}.battle-picker-card>strong{font-size:9px}
  .battle-player-column{flex-basis:min(88vw,225px)!important}
  .owner-crown-badge{width:17px;height:17px}
}


/* ======================= VERSION 45 TRADE + ADMIN RESTORE ======================= */
.inventory-header{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:14px!important;
  padding-right:50px!important;
}
.inventory-title-block{justify-self:start;min-width:0}
.inventory-summary{justify-self:end!important;justify-content:flex-end!important}
.inventory-trade-button{
  justify-self:center;
  min-width:150px;
  height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:0 15px;
  border:1px solid #338fff;
  border-radius:13px;
  background:linear-gradient(145deg,#18315c,#11203d);
  color:#fff;
  font:inherit;
  cursor:pointer;
  box-shadow:inset 0 1px 0 #ffffff12,0 9px 25px #0005;
}
.inventory-trade-button:hover{transform:translateY(-1px);border-color:#5eb4ff;background:linear-gradient(145deg,#20437c,#14294d)}
.inventory-trade-button>span:last-child{display:grid;text-align:left;line-height:1.05}
.inventory-trade-button b{font-size:12px}.inventory-trade-button small{margin-top:3px;color:#8fb4e8;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.inventory-trade-icon{width:27px;height:27px;display:grid;place-items:center;border:1px solid #5db3ff;border-radius:9px;background:#1678e8;color:#fff;font-size:12px;font-weight:1000;transform:rotate(8deg)}
.trade-overlay{z-index:1850;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(3,6,16,.84);backdrop-filter:blur(15px)}
.trade-modal{position:relative;width:min(650px,calc(100vw - 24px));display:grid;gap:15px;padding:25px;border:1px solid #293857;border-radius:19px;background:linear-gradient(155deg,#151a2b,#0b1020 76%);box-shadow:0 35px 110px #000d}
.trade-heading{padding-right:44px}.trade-heading h2{margin:2px 0 7px;font-size:26px}.trade-heading p:last-child{margin:0;color:#8794ad;font-size:12px}
.trade-tabs{display:grid;grid-template-columns:1fr;gap:8px}.trade-tabs button{height:46px;border:1px solid #3c8eff;border-radius:10px;background:#193363;color:#fff;font:inherit;font-size:13px;font-weight:1000}
.trade-user-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 16px;border:1px solid #222b42;border-radius:12px;background:#0d1221}
.trade-user-details{min-width:0;display:flex;align-items:center;gap:13px}.trade-user-details>div:nth-child(2){display:grid;gap:3px}.trade-user-details strong{font-size:15px}.trade-user-details small{color:#77849d;font-size:9px;font-weight:900;text-transform:uppercase}
.trade-roblox-avatar{position:relative;width:48px;height:48px;display:grid;place-items:center;flex:0 0 auto;border:2px solid #273b60;border-radius:50%;background:radial-gradient(circle at 35% 28%,#3774bd,#13213a 68%);color:#fff;font-size:19px;font-weight:1000}
.trade-roblox-avatar i{position:absolute;right:-4px;top:-4px;width:18px;height:18px;display:grid;place-items:center;border:2px solid #0d1221;border-radius:6px;background:#1579ec;color:#fff;font-style:normal;font-size:8px;transform:rotate(8deg)}
.trade-online-dot{width:15px;height:15px;flex:0 0 auto;border:3px solid #15203a;border-radius:50%;background:#3485ff;box-shadow:0 0 0 3px #3485ff2b}
.trade-join-button{min-width:98px;height:48px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:14px!important}
.trade-warning{margin:0;color:#748198;font-size:9px;text-align:center}.trade-warning strong{color:#a8bbda}
.admin-jump-highlight{animation:adminJumpGlow .9s ease}
@keyframes adminJumpGlow{0%,100%{box-shadow:inherit}40%{box-shadow:0 0 0 2px #3ca7ff88,0 0 28px #348bff30}}
#admin-case-form{order:0}
@media(max-width:650px){
  .inventory-header{grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;padding-right:45px!important;gap:8px 10px!important}
  .inventory-title-block{grid-column:1;grid-row:1}
  .inventory-summary{grid-column:2;grid-row:1;align-self:start!important}
  .inventory-trade-button{grid-column:1/3;grid-row:2;justify-self:center;width:min(230px,100%);height:42px}
  .trade-modal{padding:18px 13px}.trade-user-card{gap:10px;padding:13px 11px}.trade-join-button{min-width:78px}.trade-online-dot{display:none}
}
@media(max-width:420px){
  .trade-user-card{align-items:stretch;flex-direction:column}.trade-join-button{width:100%}
  .inventory-summary{gap:5px!important}.inventory-summary>span{padding:0 6px!important;font-size:9px!important}.inventory-summary strong{font-size:12px!important}
}


/* ================= VERSION 46 SAFE UI PATCH ================= */
.trade-user-details{gap:14px}
.trade-roblox-avatar-image{width:54px;height:54px;flex:0 0 auto;border:1px solid #314361;border-radius:12px;background:#111827;object-fit:cover}
.trade-online-dot,.trade-roblox-avatar{display:none!important}
.sidebar .nav-button{grid-template-columns:36px minmax(0,1fr)!important;gap:8px;padding:7px 10px!important}
.sidebar .nav-button .nav-emoji{width:32px;height:32px;display:grid!important;place-items:center;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.035);font-size:17px;line-height:1}
body.sidebar-collapsed .sidebar .nav-button{grid-template-columns:1fr!important;padding:7px!important}
body.sidebar-collapsed .sidebar .nav-button .nav-emoji{margin:auto}
body.sidebar-collapsed .sidebar .nav-button b{display:none!important}
.admin-case-showcase-card{grid-column:1/-1}
.case-showcase-fields{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:11px;margin-top:15px}
.case-showcase-fields label{display:grid;gap:7px;color:#95a5c1;font-size:10px;font-weight:850}
.case-showcase-fields input,.case-showcase-fields textarea{width:100%}
.case-showcase-wide{grid-column:1/-1}
.case-showcase-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}
.case-showcase-preview{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:15px;min-height:128px;margin-top:14px;padding:16px;border:1px solid rgba(255,255,255,.08);border-radius:17px;background:radial-gradient(circle at 88% 50%,rgba(102,72,255,.15),transparent 42%),rgba(255,255,255,.025)}
.case-showcase-icon{width:66px;height:66px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.1);border-radius:18px;background:#10182a;font-size:34px}
.case-showcase-copy{min-width:0}.case-showcase-copy>span{color:#7ee8ff;font-size:8px;font-weight:950;letter-spacing:.14em}.case-showcase-copy h4{margin:5px 0 6px;font-size:18px}.case-showcase-copy p{margin:0;color:#91a0ba;font-size:10px;line-height:1.5}
.case-showcase-pets{display:flex;align-items:center;justify-content:flex-end;min-width:170px}.case-showcase-pets span,.case-showcase-pets b{width:44px;height:44px;display:grid;place-items:center;margin-left:-10px;border:2px solid #0b1120;border-radius:50%;background:#17233b;color:#fff;font-size:11px;font-weight:950}.case-showcase-pets span:first-child{margin-left:0}.case-showcase-pets b{background:#212c43}.case-showcase-pets em{color:#7787a3;font-size:10px}
@media(max-width:650px){.trade-user-card{align-items:center!important;flex-direction:row!important}.trade-user-details{min-width:0}.trade-roblox-avatar-image{width:48px;height:48px}.case-showcase-fields{grid-template-columns:1fr}.case-showcase-wide{grid-column:auto}.case-showcase-preview{grid-template-columns:56px minmax(0,1fr);padding:13px}.case-showcase-icon{width:52px;height:52px;font-size:27px}.case-showcase-pets{grid-column:1/-1;justify-content:flex-start;min-width:0;padding-left:7px}.case-showcase-actions .button{flex:1 1 130px}}

.trade-roblox-avatar-image.is-fallback{object-fit:contain;padding:7px;background:#0b1220}


/* Cases, Case Battles, and sidebar home logo */
.nav-home-logo{width:28px;height:28px;display:grid;place-items:center;flex:0 0 28px;overflow:hidden;border-radius:8px;background:rgba(255,255,255,.04)}
.nav-home-logo img{width:26px;height:26px;object-fit:contain;display:block}
.battle-fee-note{margin:6px 0 0;color:var(--muted);font-size:10px}
@media(max-width:720px){.nav-home-logo{width:25px;height:25px;flex-basis:25px}.nav-home-logo img{width:23px;height:23px}}


/* ======================= VERSION 48 GAME HEADING EMOJIS + ADMIN CASE CREATOR ======================= */
.game-title-heading:before{
  background-image:none!important;
  background:linear-gradient(145deg,rgba(72,91,166,.34),rgba(19,33,67,.92))!important;
  border:1px solid rgba(126,181,255,.16);
}
.game-title-heading::marker{content:""}
.game-title-heading[data-game-icon]:not([data-game-icon=""]){isolation:isolate}
.game-title-heading[data-game-icon]:not([data-game-icon=""]):before{
  content:attr(data-game-icon)!important;
  display:grid!important;
  place-items:center!important;
  color:#fff;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
  font-size:35px;
  line-height:1;
  text-shadow:0 8px 18px rgba(0,0,0,.38);
}
#admin-case-form{order:-100}
#admin-case-form.admin-jump-highlight{box-shadow:0 0 0 2px rgba(82,221,255,.44),0 18px 48px rgba(0,0,0,.25)}
@media(max-width:720px){
  .game-title-heading[data-game-icon]:not([data-game-icon=""]):before{font-size:29px}
}

/* Separate owner-only Case Creator panel. */
.case-creator-modal{width:min(980px,100%)}
.case-creator-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:5px}
.case-creator-scroll>.admin-case-card{width:100%}
@media(max-width:760px){.case-creator-scroll{padding-right:2px}}


/* v48 owner-requested account and giveaway additions */
.penguin-name-wrap{display:inline-flex!important;align-items:center;gap:5px}
.penguin-name-icon{display:inline-block;line-height:1;filter:drop-shadow(0 0 5px rgba(255,255,255,.2))}
.penguin-white-name{color:#fff!important;font-weight:900!important;text-shadow:0 0 8px rgba(255,255,255,.2)!important}
.admin-reset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:5px 0 14px}
.admin-reset-grid .form-check{min-width:0}
#admin-giveaway-prize-type{width:100%;border:1px solid #28324b;border-radius:11px;background:#0a1020;color:#eef5ff;padding:11px 12px}
#admin-giveaway-item-fields{display:grid;gap:8px}
#admin-giveaway-item-fields.hidden,#admin-giveaway-gems-fields.hidden{display:none!important}
.chat-giveaway-prize .giveaway-item-icon{width:34px;height:34px;object-fit:contain;border-radius:7px}
@media(max-width:560px){.admin-reset-grid{grid-template-columns:1fr}}

.inventory-action-row{justify-self:center;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.inventory-card{cursor:pointer}.inventory-quantity-controls,.inventory-gem-stepper{display:grid;grid-template-columns:28px 1fr 28px;align-items:center;gap:4px;margin-top:2px}.inventory-gem-stepper{grid-template-columns:40px 1fr 40px;gap:6px;margin-top:0}.inventory-quantity-controls button,.inventory-gem-stepper button{height:26px;border:1px solid #314767;border-radius:8px;background:#091223;color:#fff;font-weight:1000;cursor:pointer}.inventory-gem-stepper button{height:40px;border-radius:11px}.inventory-quantity-controls button:disabled,.inventory-gem-stepper button:disabled{opacity:.45;cursor:not-allowed}.inventory-quantity-controls b,.inventory-gem-stepper b{display:grid;justify-items:center;line-height:1;font-size:12px;color:#fff}.inventory-quantity-controls b small,.inventory-gem-stepper b small{margin-top:2px;font-size:9px;color:#8fb7e3;font-weight:900}.inventory-card.is-selected .inventory-quantity-controls{pointer-events:auto}
.inventory-eat-button{border-color:#d29d32;background:linear-gradient(145deg,#4a3511,#2d2008)}
.inventory-eat-button:hover{border-color:#ffd36b;background:linear-gradient(145deg,#6c4b17,#382808)}
.inventory-action-icon{width:27px;height:27px;display:grid;place-items:center;border:1px solid rgba(255,217,127,.45);border-radius:9px;background:rgba(255,196,72,.18);font-size:14px}
.inventory-card.is-selected{border-color:#ffd36b!important;box-shadow:inset 0 0 0 1px rgba(255,211,107,.45),0 14px 28px #0006!important;background:linear-gradient(160deg,#282016,#171106)!important}
.balance-inventory-copy{padding:9px 12px;color:#9ab1d3;font-size:11px;font-weight:800;border-top:1px solid rgba(255,255,255,.06);border-bottom:1px solid rgba(255,255,255,.05);background:rgba(255,255,255,.025)}
.balance-inventory-copy strong{color:#fff}
@media(max-width:760px){.inventory-action-row{justify-self:stretch;width:100%}.inventory-trade-button,.inventory-eat-button{flex:1 1 0}}

.inventory-eat-menu{display:grid;grid-template-columns:minmax(0,1fr) 180px auto;align-items:center;gap:12px;margin:12px 0 14px;padding:12px 14px;border:1px solid rgba(255,211,107,.28);border-radius:16px;background:linear-gradient(180deg,rgba(255,209,102,.08),rgba(255,179,71,.04))}
.inventory-eat-menu-copy{display:grid;gap:4px;min-width:0}.inventory-eat-menu-copy strong{font-size:13px;color:#fff}.inventory-eat-menu-copy small{color:#c4d7f2;font-size:10px;font-weight:800;letter-spacing:.03em;text-transform:uppercase}
.inventory-eat-gems-wrap{display:grid;gap:5px}.inventory-eat-gems-wrap span{font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:#ffd98d}
.inventory-eat-gems-box{display:grid;grid-template-columns:minmax(0,1fr) 36px;align-items:stretch;min-height:42px;border:1px solid #314767;border-radius:12px;background:#091223;overflow:hidden}
.inventory-eat-gems-box input{width:100%;border:0;outline:none;background:transparent;color:#fff;font-size:14px;font-weight:900;padding:0 12px;min-width:0}
.inventory-eat-gems-box input::placeholder{color:#7e98bd;opacity:1}
.inventory-eat-gems-arrows{display:grid;grid-template-rows:1fr 1fr;border-left:1px solid #314767}
.inventory-eat-gems-arrows button{border:0;background:#0d1830;color:#fff;font-weight:1000;cursor:pointer;padding:0;line-height:1}
.inventory-eat-gems-arrows button + button{border-top:1px solid #314767}
.inventory-eat-gems-arrows button:disabled{opacity:.45;cursor:not-allowed}
.inventory-eat-gems-wrap b{display:grid;justify-items:end;line-height:1;font-size:12px;color:#fff}.inventory-eat-gems-wrap b small{margin-top:2px;font-size:9px;color:#8fb7e3;font-weight:900}
.inventory-eat-menu .inventory-eat-button{width:168px;height:44px;justify-self:end}
@media(max-width:760px){.inventory-eat-menu{grid-template-columns:1fr;align-items:stretch}.inventory-eat-menu .inventory-eat-button{width:100%;justify-self:stretch}}


.inventory-action-row{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.inventory-number-controls{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;gap:6px;align-items:center;margin-top:10px}
.inventory-number-controls > b{grid-column:1 / -1;display:grid;justify-items:center;line-height:1;font-size:12px;color:#fff}
.inventory-number-controls > b small{margin-top:2px;font-size:9px;color:#8fb7e3;font-weight:900}
.inventory-number-controls button{width:36px;height:36px;border-radius:10px;border:1px solid #314767;background:#0d1830;color:#fff;font-size:18px;font-weight:1000;cursor:pointer}
.inventory-number-controls button:disabled{opacity:.45;cursor:not-allowed}
.inventory-number-box{min-width:0}
.inventory-number-box input{width:100%;height:36px;border:1px solid #314767;border-radius:10px;background:#091223;color:#fff;font-size:14px;font-weight:900;padding:0 10px;outline:none;text-align:center}
.inventory-number-box input::placeholder{color:#7e98bd;opacity:1}


/* Compact abuse-report control for global chat. */
.chat-report-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  opacity: .55;
  padding: 0 2px;
}
.chat-report-button:hover,
.chat-report-button:focus-visible { opacity: 1; text-decoration: underline; }
.chat-report-button:disabled { cursor: default; opacity: .45; }


.admin-chat-reports { display: grid; gap: 10px; }
.admin-chat-report { border: 1px solid rgba(255,255,255,.09); border-radius: 12px; padding: 12px; background: rgba(255,255,255,.025); }
.admin-chat-report > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.admin-chat-report small { opacity: .62; }
.admin-chat-report p { margin: 8px 0 10px; overflow-wrap: anywhere; }
.admin-chat-report-actions { display: flex; flex-wrap: wrap; gap: 8px; }


/* Direct global-chat moderation control */
.admin-inline-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(130px, .55fr) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0 18px;
}
.admin-inline-form label {
  display: none;
}
.admin-inline-form input,
.admin-inline-form select {
  width: 100%;
}
@media (max-width: 720px) {
  .admin-inline-form { grid-template-columns: 1fr; }
}
\n\n/* Live viewer count and compact global-chat message metadata. */
.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.chat-name-button {
  min-width: 0;
  flex: 1 1 auto;
}
.chat-name-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-meta-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.chat-meta-actions > span {
  color: var(--muted);
  font-size: 9px;
}
.chat-meta-actions .chat-report-button {
  margin: 0;
  padding: 0 2px;
  line-height: 1;
}
.penguin-chat-icon {
  width: 19px;
  height: 19px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.28));
}
.chat-name-button .penguin-white-name {
  color: #fff;
  text-shadow: 0 0 5px rgba(255,255,255,.25), 0 0 10px rgba(85,200,255,.18);
}
#online-count {
  min-width: 58px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .chat-meta { gap: 5px; }
  .chat-meta-actions { gap: 4px; }
  .chat-meta-actions > span,
  .chat-meta-actions .chat-report-button { font-size: 8px; }
  #online-count { font-size: 9px; }
}


/* v49.2.4 responsive fit and scroll corrections. */
html,body{max-width:100%;}
body{min-width:0;}
img,svg,canvas{max-width:100%;}
button,input,select{max-width:100%;}

/* The navigation must remain usable on short laptop and mobile viewports. */
.sidebar{overflow:hidden!important;}
.sidebar>.nav-list,.sidebar nav,.nav-list{
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  padding-bottom:10px;
}
.sidebar>.nav-list::-webkit-scrollbar,.sidebar nav::-webkit-scrollbar,.nav-list::-webkit-scrollbar{width:5px;}
.sidebar>.nav-list::-webkit-scrollbar-thumb,.sidebar nav::-webkit-scrollbar-thumb,.nav-list::-webkit-scrollbar-thumb{background:#ffffff20;border-radius:99px;}

/* Long lobby/case lists scroll instead of hiding lower features. */
#coinflip-lobbies,#color-dice-lobbies,#case-battle-lobbies,.case-battle-lobbies,.lobby-list,.p2p-lobby-list{
  max-height:min(58vh,680px);
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding-right:4px;
}

/* Asset/gem selection modal: no overlay collisions and always scrollable. */
#p2p-wager-modal:not(.hidden){
  display:flex!important;
  align-items:center;
  justify-content:center;
  overflow:auto!important;
  overscroll-behavior:contain;
}
.p2p-asset-modal{
  width:min(900px,calc(100vw - 24px))!important;
  height:min(760px,calc(100dvh - 24px))!important;
  max-height:calc(100dvh - 24px)!important;
  min-height:0!important;
}
.p2p-choice-and-range,.p2p-gem-editor,.p2p-asset-toolbar,.p2p-asset-footer{
  min-width:0!important;
}
.p2p-gem-editor .amount-input,.p2p-gem-editor input{min-width:0!important;width:100%!important;}
.p2p-asset-grid{
  min-height:120px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:thin!important;
  padding-bottom:24px!important;
}
.p2p-asset-grid::-webkit-scrollbar{display:block!important;width:6px!important;}
.p2p-asset-grid::-webkit-scrollbar-thumb{background:#ffffff22;border-radius:99px;}

/* Color selection wraps and scales, including purple, with chat open. */
.color-picker-create{
  width:100%!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:clamp(6px,1vw,11px)!important;
}
.color-picker-create .color-choice{
  min-width:0!important;
  width:100%!important;
  padding-inline:clamp(5px,1vw,12px)!important;
}
.color-picker-create .color-choice b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.color-dice-choice-create{min-width:0!important;overflow:hidden!important;}

/* Spectating expands immediately when the right-side chat is closed. */
body.chat-collapsed .case-battle-stage{right:0!important;}
.case-battle-stage{max-width:none!important;}
.case-battle-columns{width:100%!important;}

/* Hilo keeps a stable footprint after a loss so odds stay in view. */
.hilo-layout{align-items:stretch!important;min-width:0!important;}
.hilo-panel,.hilo-table,.hilo-choices{min-width:0!important;}
.hilo-choices{min-height:118px;}
.hilo-choice:disabled{opacity:.62;cursor:default;}

/* The small roll/result number beneath the Upgrader chance is intentionally hidden. */
#upgrader-wheel-roll{display:none!important;}
.upgrader-wheel-inner{gap:2px!important;}

/* Fluid desktop scaling before the mobile layout takes over. */
.main{min-width:0!important;padding-left:clamp(12px,2.2vw,27px)!important;padding-right:clamp(12px,2.2vw,27px)!important;}
.page{width:100%!important;min-width:0!important;}
.control-panel,.game-panel,.p2p-choice-create,.case-battle-stage,.upgrader-layout{min-width:0!important;}

@media(max-width:1180px){
  .color-picker-create{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .p2p-choice-create{grid-template-columns:minmax(150px,.65fr) minmax(0,1.35fr)!important;}
}
@media(max-width:920px){
  .sidebar{overflow-y:auto!important;}
  .main{padding-top:calc(var(--top) + 16px)!important;padding-bottom:32px!important;}
  .p2p-choice-create{grid-template-columns:1fr!important;}
  .color-picker-create{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .hilo-layout{grid-template-columns:1fr!important;}
  .hilo-panel{order:-1;}
  .case-battle-stage{right:0!important;}
}
@media(max-width:650px){
  :root{--top:68px;}
  .main{margin-left:0!important;padding-inline:10px!important;}
  .sidebar{width:min(286px,88vw)!important;transform:translateX(-100%);transition:transform .22s ease;}
  body:not(.sidebar-collapsed) .sidebar{transform:translateX(0);box-shadow:20px 0 60px #0009;}
  body.sidebar-collapsed .sidebar{transform:translateX(-100%);}
  .color-picker-create{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .p2p-asset-modal{width:calc(100vw - 12px)!important;height:calc(100dvh - 12px)!important;max-height:calc(100dvh - 12px)!important;padding:12px!important;}
  .p2p-gem-editor{padding:8px!important;}
  .p2p-gem-presets{flex-wrap:wrap!important;}
  .hilo-table{gap:8px!important;}
  .hilo-playing-card{transform:scale(.9);transform-origin:center;}
  .hilo-choices{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;}
  .hilo-choice{padding:10px 5px!important;min-width:0!important;}
  .hilo-choice strong{font-size:11px!important;}
  .hilo-choice small,.hilo-choice em{font-size:8px!important;}
  #coinflip-lobbies,#color-dice-lobbies,#case-battle-lobbies,.case-battle-lobbies,.lobby-list,.p2p-lobby-list{max-height:none;}
}
@media(max-width:390px){
  .color-picker-create{grid-template-columns:1fr 1fr!important;gap:6px!important;}
  .color-picker-create .color-choice{min-height:58px!important;}
  .p2p-asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .hilo-playing-card{transform:scale(.82);}
}


/* Upgrader multiplier typing and validation. */
.upgrader-multiplier-input:has(input.invalid){border-color:rgba(255,92,116,.72);box-shadow:0 0 0 3px rgba(255,92,116,.10)}
.upgrader-multiplier-input input.invalid{color:#ff8296}
.upgrader-multiplier-help{display:block;margin-top:-4px;color:#8e9bb2;font-size:9px;font-weight:800}
.upgrader-controls #upgrader-roll:disabled{cursor:not-allowed;opacity:.48;filter:saturate(.55)}


/* ================= VERSION 49.2.6 REMAINING UI FIXES ================= */
/* Reliable sidebar icons when collapsed. */
.nav-home-icon{font-size:16px!important}
body.sidebar-collapsed .sidebar .nav-home-icon{display:grid!important;margin:auto!important;visibility:visible!important;opacity:1!important}

/* Mines bomb selector supports every whole number from 1 through 24. */
.mines-bomb-control{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:8px;align-items:center}
.mines-bomb-control input{width:100%;min-width:0;text-align:center;font-weight:900}
.mines-bomb-control button{height:42px;border:1px solid rgba(255,255,255,.09);border-radius:11px;background:rgba(255,255,255,.045);color:#fff;font-size:20px;font-weight:900;cursor:pointer}
.mines-bomb-control button:hover{background:rgba(255,255,255,.085)}
.mines-bomb-control button:disabled{opacity:.45;cursor:not-allowed}
.field-help,.blackjack-rule-note{display:block;margin:7px 0 0;color:var(--muted);font-size:10px;line-height:1.45}
.blackjack-rule-note{padding:10px 11px;border:1px solid rgba(255,255,255,.06);border-radius:10px;background:rgba(255,255,255,.025)}

/* devastcooki's Cooki role aura in names and global chat. */
.cooki-name-wrap{display:inline-flex!important;align-items:center;gap:5px}
.cooki-name-icon,.cooki-chat-icon{display:inline-grid!important;place-items:center;width:19px;height:19px;flex:0 0 19px;font-size:16px;line-height:1;filter:drop-shadow(0 0 5px rgba(255,177,72,.7))}
.cooki-aura-name{color:#ffd08a!important;font-weight:1000!important;text-shadow:0 0 4px rgba(255,190,92,.95),0 0 10px rgba(255,137,40,.75),0 0 18px rgba(255,92,25,.42)!important;animation:cookiAuraPulse 1.9s ease-in-out infinite}
@keyframes cookiAuraPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.22)}}

/* Keep all six Color Dice choices inside their panel, especially purple. */
.color-dice-choice-create{overflow:visible!important;width:100%!important;max-width:100%!important}
.color-picker-create{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-width:100%!important;overflow:visible!important}
.color-picker-create .color-choice{box-sizing:border-box!important;min-width:0!important;max-width:100%!important;overflow:hidden!important}
body:not(.chat-collapsed) .color-picker-create{grid-template-columns:repeat(2,minmax(0,1fr))!important}

/* Gem selector scales without overlaying modal controls. */
.p2p-asset-modal{display:flex!important;flex-direction:column!important;overflow:hidden!important}
.p2p-asset-modal>*{min-width:0!important;max-width:100%!important}
.p2p-gem-editor{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;overflow:visible!important}
.p2p-gem-editor.hidden{display:none!important}
.p2p-gem-editor .amount-input{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto auto!important;width:100%!important}
.p2p-gem-editor .amount-input input{width:100%!important;min-width:0!important}
.p2p-asset-grid{flex:1 1 auto!important;max-height:none!important;overscroll-behavior:contain!important}

@media(max-width:720px){
  .color-picker-create,body:not(.chat-collapsed) .color-picker-create{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .mines-bomb-control{grid-template-columns:38px minmax(0,1fr) 38px}
}
@media(max-width:390px){
  .color-picker-create,body:not(.chat-collapsed) .color-picker-create{grid-template-columns:1fr!important}
  .p2p-gem-editor .amount-input{grid-template-columns:auto minmax(0,1fr)!important}
  .p2p-gem-editor .amount-input button{grid-row:2;width:100%!important}
}


/* ================= VERSION 49.2.6c FINAL SIDEBAR + COOKIE ROLE FIX ================= */
/* Desktop close means fully closed, not a narrow icon rail. */
@media (min-width:651px){
  body.sidebar-collapsed{--side:0px!important;}
  body.sidebar-collapsed .sidebar{
    transform:translateX(-105%)!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    border-right:0!important;
  }
  body.sidebar-collapsed .main{margin-left:0!important;}
}

/* ================= VERSION 49.2.6d MOBILE MENU + DEVICE FIT ================= */
@media (max-width:650px){
  html,body{width:100%;max-width:100%;overflow-x:hidden!important}
  body{--side:0px!important}
  .topbar{z-index:120!important;width:100%!important;max-width:100vw!important}
  #menu-toggle,.hamburger{position:fixed!important;left:10px!important;top:12px!important;z-index:141!important;display:grid!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
  .sidebar{
    position:fixed!important;
    inset:var(--top) auto 0 0!important;
    z-index:140!important;
    width:min(286px,88vw)!important;
    max-width:88vw!important;
    height:calc(100dvh - var(--top))!important;
    padding:12px 10px max(18px,env(safe-area-inset-bottom))!important;
    transform:translate3d(-105%,0,0)!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    transition:transform .22s ease,opacity .18s ease,visibility 0s linear .22s!important;
  }
  body.mobile-menu-open .sidebar{
    transform:translate3d(0,0,0)!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    box-shadow:20px 0 60px rgba(0,0,0,.72)!important;
    transition:transform .22s ease,opacity .18s ease!important;
  }
  body.mobile-menu-open::after{
    content:"";
    position:fixed;
    inset:var(--top) 0 0 0;
    z-index:130;
    background:rgba(2,6,18,.62);
    backdrop-filter:blur(2px);
  }
  .sidebar .nav-list,.sidebar nav{display:grid!important;min-height:min-content!important;overflow:visible!important}
  .sidebar .nav-button{width:100%!important;min-height:48px!important;grid-template-columns:38px minmax(0,1fr)!important;padding:6px 9px!important;pointer-events:auto!important;touch-action:manipulation}
  .sidebar .nav-button .nav-emoji{display:grid!important}
  .sidebar .nav-button b,.sidebar .nav-heading,.sidebar .sidebar-card>div:last-child{display:block!important}
  .main,.chat-panel{margin-left:0!important;width:100%!important;max-width:100vw!important}
  .main{padding:calc(var(--top) + 12px) clamp(8px,3vw,14px) max(28px,env(safe-area-inset-bottom))!important;overflow-x:hidden!important}
  .page,.panel,.control-panel,.game-panel,.modal,.modal-card,.auth-card{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .page-heading{width:100%!important;min-width:0!important}
  input,select,textarea,button{max-width:100%;box-sizing:border-box}
  img,canvas,svg{max-width:100%}
  .amount-input{width:100%!important;min-width:0!important}
  .amount-input input{min-width:0!important;width:100%!important}
  .mines-layout,.blackjack-layout,.hilo-layout,.penguin-layout,.coinflip-top,.giveaway-layout,.upgrader-layout,.p2p-choice-create{grid-template-columns:minmax(0,1fr)!important;width:100%!important}
  .game-cards,.home-lower-grid,.affiliate-stats,.steps-grid{grid-template-columns:minmax(0,1fr)!important}
  .case-battle-stage,.case-battle-view,.blackjack-table,.penguin-board-wrap{width:100%!important;max-width:100%!important;min-width:0!important}
  .case-battle-columns{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .chat-panel{position:relative!important;inset:auto!important;height:auto!important;min-height:360px!important}
}

@media (max-width:430px){
  :root{--top:64px!important}
  .topbar{grid-template-columns:52px minmax(0,1fr) 46px!important;padding-inline:6px!important}
  #menu-toggle,.hamburger{left:7px!important;top:9px!important}
  .balance-chip{width:100%!important;max-width:210px!important;min-width:0!important}
  .main{padding-inline:7px!important}
  .hero,.control-panel,.game-panel,.blackjack-table,.penguin-board-wrap,.upgrader-controls,.upgrader-wheel-panel,.upgrader-payout-card{padding:12px!important;border-radius:16px!important}
  .page-heading h1,.hero-copy h1{font-size:clamp(25px,9vw,36px)!important}
  .two-fields,.action-grid,.upgrader-metrics{grid-template-columns:minmax(0,1fr)!important}
  .action-grid button:last-child{grid-column:auto!important}
  .difficulty-picker,.hilo-choices{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .playing-card{width:clamp(54px,18vw,68px)!important;height:auto!important;aspect-ratio: .7!important}
}


/* v49.2.8 responsive battle, centered topbar and VIP Club role */
.topbar{position:relative;grid-template-columns:auto auto 1fr auto;}
.topbar-balance-group{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;justify-self:auto!important;margin:0!important;z-index:4;}
.guest-auth-actions{margin-left:auto!important;margin-right:clamp(4px,1.5vw,16px)!important;min-width:0;}
.guest-auth-actions>*{flex:0 1 auto;}
.vip-club-badge{display:inline-flex;align-items:center;gap:7px;width:max-content;margin-top:8px;padding:7px 11px;border:1px solid rgba(255,225,66,.42);border-radius:999px;background:linear-gradient(135deg,rgba(255,231,66,.18),rgba(255,170,0,.12));color:#ffe83f;box-shadow:0 0 18px rgba(255,213,34,.18);font-size:10px;font-weight:1000;text-transform:uppercase;letter-spacing:.07em;}
.vip-club-badge.hidden{display:none!important}.vip-club-badge span{font-size:15px;filter:drop-shadow(0 0 6px rgba(255,221,44,.55))}.player-profile-modal .vip-club-badge{margin-left:auto;margin-right:auto}.admin-vip-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.case-battle-columns.is-3v3{display:flex!important;flex-direction:column!important;gap:10px!important;overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important;}
.battle-team-row{border:1px solid rgba(120,123,219,.25);border-radius:18px;overflow:hidden;background:#0d1224;box-shadow:0 18px 44px rgba(0,0,0,.25)}
.battle-team-row-label{padding:8px 12px;background:rgba(255,255,255,.035);font-size:10px;font-weight:1000;text-transform:uppercase;letter-spacing:.08em}.battle-team-row.team-0 .battle-team-row-label{color:#70e7ff}.battle-team-row.team-1 .battle-team-row-label{color:#c4a5ff}
.battle-team-row-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0}.battle-team-row-grid .battle-player-column{border-left:1px solid rgba(109,113,213,.18)}.battle-team-row-grid .battle-player-column:first-child{border-left:0}
@media(max-width:900px){.battle-team-row-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.case-battle-columns.is-3v3{overflow:visible!important}.battle-team-row-grid .battle-reel-window{height:clamp(230px,36vh,320px)!important}.battle-team-row-grid .battle-reel-card{grid-template-columns:56px minmax(0,1fr)!important;min-height:88px!important}.battle-team-row-grid .battle-reel-img{width:52px!important;height:52px!important}}
@media(max-width:620px){
  .topbar{grid-template-columns:auto 1fr auto!important;padding-left:8px!important;padding-right:8px!important}
  .brand-button{display:none!important}
  .topbar-balance-group{left:50%!important;max-width:42vw!important}.balance-chip{max-width:30vw!important}.balance-value{font-size:clamp(9px,3vw,12px)!important}.wallet-button{width:32px!important;height:32px!important}
  .guest-auth-actions{gap:4px!important;margin-right:0!important}.guest-auth-button,.guest-register-button{height:34px!important;padding:0 9px!important;font-size:8px!important}.guest-register-button{min-width:0!important}
  .battle-heading{align-items:flex-start!important}.battle-heading-actions{width:100%;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.battle-heading-actions button{min-width:0!important;padding-left:6px!important;padding-right:6px!important;font-size:8px!important}
  .battle-team-row-grid{grid-template-columns:repeat(3,minmax(0,1fr));overflow:hidden}.battle-team-row-grid .battle-player-footer{grid-template-columns:30px minmax(0,1fr)!important;padding:7px!important}.battle-team-row-grid .battle-player-footer>b{grid-column:1/-1;justify-self:stretch;justify-content:center}.battle-team-row-grid .battle-player-avatar{width:30px!important;height:30px!important}.battle-team-row-grid .battle-reel-window{height:240px!important}.battle-team-row-grid .battle-reel-track{padding:6px!important}.battle-team-row-grid .battle-reel-card{display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;min-height:92px!important;padding:6px!important}.battle-team-row-grid .battle-reel-img{width:46px!important;height:46px!important}.battle-team-row-grid .battle-reel-card small{font-size:7px!important}.battle-team-row-grid .battle-reel-card b{font-size:8px!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.battle-team-row-grid .battle-seat-ready{min-height:190px!important;padding:10px 5px!important}.battle-team-row-grid .battle-seat-ready .button{font-size:8px!important;padding:8px 5px!important}
  .admin-vip-actions{grid-template-columns:1fr}
}
@media(max-width:390px){.topbar-balance-group{max-width:38vw!important}.balance-chip{max-width:26vw!important}.guest-register-button{padding:0 7px!important}.battle-heading-actions{grid-template-columns:1fr 1fr}.battle-heading-actions #open-case-battle-builder{grid-column:1/-1}.battle-team-row-grid .battle-reel-window{height:210px!important}}

/* ================= VERSION 49.2.9 STABLE MOBILE CASE BATTLES ================= */
/* Keep the battle DOM flat so animation, joining and bot seat controls work. */
.case-battle-columns.is-3v3{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:9px!important;
  width:100%!important;
  max-width:1180px!important;
  overflow:visible!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.case-battle-columns.is-3v3>.battle-player-column{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  border:1px solid rgba(118,122,218,.2)!important;
  border-radius:15px!important;
  overflow:hidden!important;
}
.case-battle-columns.is-3v3>.team-0{box-shadow:inset 0 2px 0 rgba(78,220,255,.35)}
.case-battle-columns.is-3v3>.team-1{box-shadow:inset 0 2px 0 rgba(189,135,255,.4)}

@media(max-width:760px){
  .case-battle-stage{
    padding:46px 6px max(18px,env(safe-area-inset-bottom))!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  .case-battle-stage-head,.case-battle-round-head,.battle-stage-controls,.case-battle-summary{
    width:100%!important;
    min-width:0!important;
  }
  .case-battle-columns.is-3v3{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
    padding:0!important;
    overflow:visible!important;
    scroll-snap-type:none!important;
  }
  .case-battle-columns.is-3v3>.battle-player-column{
    flex:none!important;
    min-width:0!important;
    width:auto!important;
    border-radius:10px!important;
  }
  .case-battle-columns.is-3v3 .battle-reel-window{height:clamp(185px,29vh,240px)!important}
  .case-battle-columns.is-3v3 .battle-reel-track{padding:4px!important;gap:5px!important}
  .case-battle-columns.is-3v3 .battle-reel-card{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:76px!important;
    padding:5px 3px!important;
    text-align:center!important;
  }
  .case-battle-columns.is-3v3 .battle-reel-img{width:38px!important;height:38px!important}
  .case-battle-columns.is-3v3 .battle-reel-card b{width:100%;font-size:7px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .case-battle-columns.is-3v3 .battle-reel-card small{font-size:6px!important}
  .case-battle-columns.is-3v3 .battle-player-footer{
    display:grid!important;
    grid-template-columns:24px minmax(0,1fr)!important;
    gap:4px!important;
    padding:6px 4px!important;
  }
  .case-battle-columns.is-3v3 .battle-player-avatar{width:24px!important;height:24px!important}
  .case-battle-columns.is-3v3 .battle-player-footer strong{font-size:7px!important}
  .case-battle-columns.is-3v3 .battle-player-footer small{font-size:6px!important}
  .case-battle-columns.is-3v3 .battle-player-footer>b{
    grid-column:1/-1!important;
    width:100%!important;
    justify-content:center!important;
    padding:5px 2px!important;
    font-size:7px!important;
  }
  .case-battle-columns.is-3v3 .battle-seat-ready{
    min-height:145px!important;
    padding:8px 3px!important;
  }
  .case-battle-columns.is-3v3 .battle-seat-ready .battle-player-avatar{width:34px!important;height:34px!important}
  .case-battle-columns.is-3v3 .battle-seat-ready strong{max-width:100%;font-size:8px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .case-battle-columns.is-3v3 .battle-seat-ready small,.case-battle-columns.is-3v3 .battle-seat-ready span{font-size:6px!important}
  .case-battle-columns.is-3v3 .battle-seat-ready .button{width:100%!important;padding:7px 2px!important;font-size:7px!important}
}

@media(max-width:390px){
  .case-battle-columns.is-3v3{gap:3px!important}
  .case-battle-columns.is-3v3 .battle-reel-window{height:175px!important}
  .case-battle-columns.is-3v3 .battle-reel-img{width:32px!important;height:32px!important}
  .case-battle-columns.is-3v3 .battle-player-footer{grid-template-columns:20px minmax(0,1fr)!important;padding:4px 2px!important}
  .case-battle-columns.is-3v3 .battle-player-avatar{width:20px!important;height:20px!important}
  .case-battle-columns.is-3v3 .battle-seat-ready{min-height:132px!important}
}


/* v49.3.0 unified sign-in, right-side account controls and aligned VIP badge */
.topbar{grid-template-columns:auto auto minmax(0,1fr) auto!important;}
.guest-auth-actions,.user-chip{grid-column:4!important;justify-self:end!important;margin-left:auto!important;margin-right:clamp(8px,1.6vw,22px)!important;}
.user-chip{width:auto!important;min-width:0!important;border-left:0!important;padding-inline:12px!important;}
.user-menu{right:12px!important;left:auto!important;}
.guest-signin-button{height:38px;padding:0 18px;border-radius:11px;font-size:10px;font-weight:1000;white-space:nowrap;}
.profile-role-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:4px;}
.profile-role-row.centered{justify-content:center;}
.profile-role-row .vip-club-badge{margin-top:0!important;align-self:center;}
.profile-role-row .profile-level{margin:0;}
@media(max-width:650px){
  .topbar{grid-template-columns:52px minmax(0,1fr) auto!important;}
  .guest-auth-actions,.user-chip{grid-column:3!important;margin-right:2px!important;}
  .guest-signin-button{height:34px;padding:0 10px;font-size:8px;}
  .user-chip{padding-inline:6px!important;max-width:42vw;}
  .profile-role-row{justify-content:center;gap:7px;}
}

/* v49.3.1 final scrolling, centred topbar, full-screen mobile chat and case management */
.topbar{
  position:fixed!important;
  top:0!important;
  right:0!important;
  bottom:auto!important;
  left:0!important;
  transform:none!important;
  overflow:visible!important;
}
.topbar-balance-group{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  grid-column:auto!important;
  justify-self:auto!important;
  margin:0!important;
  transform:translate(-50%,-50%)!important;
  z-index:3!important;
}
.guest-auth-actions,.user-chip{
  position:absolute!important;
  right:clamp(8px,1.6vw,22px)!important;
  top:50%!important;
  grid-column:auto!important;
  margin:0!important;
  transform:translateY(-50%)!important;
  z-index:4!important;
}
.hamburger{z-index:5!important}
.main{min-width:0!important}

.case-battle-stage{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
.case-battle-stage > *{min-width:0!important}
.case-battle-columns{min-width:0!important;max-width:100%!important}

.admin-existing-cases-card{margin-top:18px;overflow:hidden}
.admin-existing-cases{display:grid;gap:8px;padding:16px;max-height:360px;overflow:auto}
.admin-existing-case{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border:1px solid var(--border);border-radius:13px;background:#ffffff06}
.admin-existing-case-copy{display:flex;align-items:center;gap:10px;min-width:0}
.admin-existing-case-copy>div{display:grid;gap:3px;min-width:0}
.admin-existing-case-copy strong,.admin-existing-case-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-existing-case-copy small{color:var(--muted)}
.admin-delete-case{flex:0 0 auto;background:#ff496814!important;border-color:#ff49684d!important;color:#ff8ea2!important}

@media(max-width:920px){
  .chat-panel{
    position:fixed!important;
    inset:var(--top) 0 0 0!important;
    z-index:500!important;
    width:100vw!important;
    height:calc(100dvh - var(--top))!important;
    min-height:0!important;
    margin:0!important;
    border:0!important;
    transform:none!important;
    opacity:1!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto auto!important;
  }
  body.chat-collapsed .chat-panel{display:none!important}
  .chat-messages{max-height:none!important;min-height:0!important;overflow-y:auto!important}
  .case-battle-stage{padding-bottom:max(24px,env(safe-area-inset-bottom))!important}
}

@media(max-width:650px){
  .topbar-balance-group{max-width:52vw!important;gap:4px!important}
  .balance-chip{max-width:34vw!important}
  .balance-value span{max-width:24vw;overflow:hidden;text-overflow:ellipsis}
  .guest-auth-actions,.user-chip{right:5px!important;max-width:31vw!important}
  .case-battle-stage{inset:0!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;padding:52px 8px 18px!important}
  .case-battle-stage-head,.battle-stage-controls,.case-battle-round-head,.battle-summary{min-width:0!important;max-width:100%!important}
  .case-battle-columns.is-3v3{grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;overflow:visible!important}
  .admin-existing-case{align-items:stretch;flex-direction:column}
  .admin-delete-case{width:100%}
}

/* v49.3.2 — make the featured Huge properly fill the case-card chest artwork. */
.case-chest-pet{
  top:52%;
  width:clamp(96px,38%,118px);
  height:clamp(96px,38%,118px);
}
.case-chest-pet .case-image-wrap{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
}
.case-chest-pet-img,
.case-chest-pet .inventory-image-fallback{
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  object-fit:contain;
  transform:scale(1.08);
  transform-origin:center;
}
@media(max-width:510px){
  .case-chest-pet{
    top:52%;
    width:126px;
    height:126px;
  }
  .case-chest-pet-img,
  .case-chest-pet .inventory-image-fallback{
    transform:scale(1.06);
  }
}
@media(max-width:360px){
  .case-chest-pet{
    width:112px;
    height:112px;
  }
}

/* v49.3.3 — compact, scrollable Case Battle reels and responsive 3v3 layout. */
.case-battle-columns{
  width:100%!important;
  max-width:none!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin!important;
  overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
.case-battle-columns.is-3v3{
  grid-template-columns:repeat(6,minmax(150px,1fr))!important;
  min-width:900px!important;
}
.case-battle-columns.is-3v3>.battle-player-column{
  grid-column:auto!important;
  grid-row:auto!important;
}
.battle-reel-window{
  height:164px!important;
}
.battle-reel-track{
  gap:5px!important;
  padding:5px!important;
}
.battle-reel-card{
  flex:0 0 48px!important;
  min-height:48px!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  gap:6px!important;
  padding:5px 7px!important;
  border-radius:9px!important;
}
.battle-reel-img{
  width:36px!important;
  height:36px!important;
}
.battle-reel-marker{
  height:52px!important;
  left:4px!important;
  right:4px!important;
}
.battle-reel-card b{font-size:8px!important}
.battle-reel-card small{margin-top:2px!important;font-size:7px!important}
.battle-player-footer{padding:7px!important}
.battle-pull-history{
  min-height:40px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin!important;
}

@media(max-width:760px){
  .case-battle-columns.is-3v3{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:repeat(2,auto)!important;
    min-width:0!important;
    width:100%!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
    gap:4px!important;
  }
  .case-battle-columns.is-3v3>.battle-player-column{
    min-width:0!important;
    width:auto!important;
  }
  .case-battle-columns.is-3v3 .battle-reel-window{height:150px!important}
  .case-battle-columns.is-3v3 .battle-reel-card{
    grid-template-columns:30px minmax(0,1fr)!important;
    min-height:44px!important;
    flex-basis:44px!important;
    padding:4px!important;
  }
  .case-battle-columns.is-3v3 .battle-reel-img{width:29px!important;height:29px!important}
  .case-battle-columns.is-3v3 .battle-reel-marker{height:47px!important}
}

/* Admin per-game recorded profit/loss. */
.admin-profit-grid{display:grid;gap:7px;margin-top:12px}
.admin-profit-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:#ffffff06}
.admin-profit-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-profit-row span{font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.admin-profit-row b{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}
.admin-profit-row.is-profit span,.admin-profit-row.is-profit b{color:#66eba8}
.admin-profit-row.is-loss span,.admin-profit-row.is-loss b{color:#ff8498}
.admin-profit-row .gem-icon{width:14px;height:14px}
@media(max-width:430px){
  .admin-profit-row{grid-template-columns:minmax(0,1fr) auto;gap:5px 8px}
  .admin-profit-row b{grid-column:1/-1;justify-content:flex-start}
}

/* v49.3.4 final regression fixes: Color Dice overflow, Mines scrolling, old Case Battle row. */
#page-color-dice,
#color-dice-stage,
.color-dice-stage,
.color-dice-scoreboard,
.color-dice-top {
  max-width: 100% !important;
  overflow-x: hidden !important;
}
#color-dice-stage:not(.hidden) {
  overflow-y: auto !important;
  scrollbar-width: none;
}
#color-dice-stage:not(.hidden)::-webkit-scrollbar { display: none; }

#page-mines {
  min-height: 0 !important;
  overflow: visible !important;
}
#page-mines .mines-panel {
  min-height: 0 !important;
  max-width: 100% !important;
}

/* Always keep the original single-row Case Battle player order. */
.case-battle-columns,
.case-battle-columns.is-3v3 {
  display: grid !important;
  grid-template-columns: repeat(var(--battle-columns, 2), minmax(180px, 1fr)) !important;
  grid-auto-flow: column !important;
  width: 100% !important;
  min-width: max-content !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.case-battle-columns > .battle-player-column,
.case-battle-columns.is-3v3 > .battle-player-column {
  min-width: 180px !important;
  width: auto !important;
  scroll-snap-align: start;
}

@media (max-width: 700px) {
  html, body { overflow-y: auto !important; }
  #page-mines.active,
  #page-mines.page.active {
    display: block !important;
    height: auto !important;
    min-height: calc(100dvh - var(--top)) !important;
    overflow-y: visible !important;
    padding-bottom: max(32px, env(safe-area-inset-bottom)) !important;
  }
  #page-mines .mines-layout,
  #page-mines .mines-panel {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  #page-mines .mines-grid {
    flex: 0 0 auto !important;
  }

  /* Old one-line battle layout, only made compact enough for phones. */
  .case-battle-stage {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    touch-action: pan-y !important;
  }
  .case-battle-columns,
  .case-battle-columns.is-3v3 {
    grid-template-columns: repeat(var(--battle-columns, 2), minmax(112px, 112px)) !important;
    min-width: max-content !important;
    gap: 4px !important;
    overflow-x: auto !important;
    touch-action: pan-x pan-y !important;
  }
  .case-battle-columns > .battle-player-column,
  .case-battle-columns.is-3v3 > .battle-player-column {
    min-width: 112px !important;
    max-width: 112px !important;
  }
  .case-battle-columns .battle-reel-window { height: 150px !important; }
  .case-battle-columns .battle-reel-track { padding: 4px !important; gap: 4px !important; }
  .case-battle-columns .battle-reel-card {
    min-height: 48px !important;
    grid-template-columns: 31px minmax(0,1fr) !important;
    padding: 4px !important;
    gap: 4px !important;
  }
  .case-battle-columns .battle-reel-img { width: 29px !important; height: 29px !important; }
  .case-battle-columns .battle-reel-card b { font-size: 7px !important; }
  .case-battle-columns .battle-reel-card small { font-size: 6px !important; }
  .case-battle-columns .battle-player-footer {
    grid-template-columns: 24px minmax(0,1fr) !important;
    padding: 5px 3px !important;
    gap: 3px !important;
  }
  .case-battle-columns .battle-player-avatar { width: 24px !important; height: 24px !important; }
  .case-battle-columns .battle-player-footer strong { font-size: 7px !important; }
  .case-battle-columns .battle-player-footer small { font-size: 6px !important; }
  .case-battle-columns .battle-player-footer > b {
    grid-column: 1 / -1 !important;
    font-size: 7px !important;
    justify-self: center !important;
  }
}

/* v49.4.4: preserve the original Case Battle design; only improve narrow-screen access. */
@media (max-width:760px){
  .case-battle-stage{max-height:100dvh;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  .case-battle-summary{scroll-margin-bottom:24px}
}


/* v49.4.6 — clean responsive Case Battles, original modes only */
.battle-case-picker{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;max-height:520px!important;padding:2px!important}
.battle-picker-card.case-card{position:relative;appearance:none;width:100%;min-width:0;padding:14px!important;border:1px solid rgba(255,255,255,.085)!important;border-radius:18px!important;background:linear-gradient(180deg,rgba(24,32,58,.97),rgba(10,15,29,.99))!important;color:#eef3ff!important;text-align:center!important;box-shadow:0 12px 28px rgba(0,0,0,.2)!important}
.battle-picker-card.case-card h3{height:38px;display:grid;place-items:center;margin:0 4px 7px;overflow:hidden;font-size:14px;line-height:1.15;text-overflow:ellipsis}
.battle-picker-card.case-card .case-chest-stage{height:150px;margin:0 0 10px!important}
.battle-picker-card.case-card .case-chest-image{width:92%;height:92%}
.battle-picker-card.case-card .case-chest-pet,.battle-picker-card.case-card .case-chest-pet-img{width:62px;height:62px}
.battle-picker-card.case-card .case-card-price{height:40px;font-size:14px}
.battle-picker-card.case-card .case-card-price strong{font-size:14px}
.battle-picker-card.case-card .case-card-price .gem-icon{width:19px!important;height:19px!important}
.battle-picker-count{position:absolute;right:8px;top:8px;z-index:4;display:grid;place-items:center;min-width:28px;height:28px;padding:0 7px;border-radius:10px;background:#5b62ff;color:#fff;font-size:11px;font-weight:1000;box-shadow:0 6px 14px rgba(51,58,220,.35)}

.case-battle-columns,.case-battle-columns.is-3v3{display:grid!important;grid-template-columns:repeat(var(--battle-columns),minmax(0,1fr))!important;gap:10px!important;width:min(100%,1440px)!important;max-width:100%!important;overflow:visible!important}
.case-battle-columns>.battle-player-column{min-width:0!important;width:auto!important;max-width:none!important}
.battle-player-column{overflow:hidden!important}
.battle-reel-window{min-width:0!important}
.battle-pull-history{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;overflow:visible!important;height:auto!important;min-height:48px!important;padding:7px!important}
.battle-pull-history img{width:100%!important;max-width:44px!important;height:44px!important;object-fit:contain!important;margin:auto!important}

@media(max-width:1180px){
  .battle-case-picker{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .case-battle-columns{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
  .battle-case-picker{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .case-battle-stage{overflow-y:auto!important;overflow-x:hidden!important}
  .case-battle-columns{grid-template-columns:1fr!important;gap:12px!important;overflow:visible!important;padding-bottom:18px!important;scroll-snap-type:none!important}
  .case-battle-columns>.battle-player-column{width:100%!important;max-width:100%!important;flex:none!important}
  .battle-player-column .battle-reel-window{height:245px!important}
  .battle-pull-history{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}
@media(max-width:480px){
  .battle-case-picker{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .battle-picker-card.case-card{padding:9px!important}
  .battle-picker-card.case-card .case-chest-stage{height:112px}
  .battle-picker-card.case-card .case-chest-pet,.battle-picker-card.case-card .case-chest-pet-img{width:48px;height:48px}
  .battle-pull-history{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}


/* v49.4.7 — square Case Battle picker cards; case pull rows show price | chance */
.battle-picker-card.case-card{
  aspect-ratio:1 / 1!important;
  min-height:0!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto auto!important;
  align-content:stretch!important;
}
.battle-picker-card.case-card .case-chest-stage{
  height:auto!important;
  min-height:0!important;
  aspect-ratio:1 / 1!important;
  width:100%!important;
  align-self:center!important;
  margin:0 auto 8px!important;
}
.battle-picker-card.case-card .case-card-price{
  min-height:38px!important;
  height:auto!important;
}
.case-content-item small{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  white-space:nowrap!important;
}
.case-content-item small .gem-icon{
  width:13px!important;
  height:13px!important;
}
@media(max-width:480px){
  .battle-picker-card.case-card{aspect-ratio:1 / 1!important}
  .battle-picker-card.case-card .case-chest-stage{height:auto!important;aspect-ratio:1 / 1!important}
}

/* v49.4.8 — Case Battle picker mirrors the normal Cases card proportions. */
.battle-picker-card.case-card{
  aspect-ratio:auto!important;
  display:block!important;
  min-height:0!important;
  padding:16px 14px 15px!important;
  border-radius:20px!important;
}
.battle-picker-card.case-card h3{
  height:auto!important;
  min-height:38px!important;
  display:grid!important;
  place-items:center!important;
  margin:0 4px 8px!important;
  font-size:15px!important;
}
.battle-picker-card.case-card .case-chest-stage{
  width:100%!important;
  height:190px!important;
  aspect-ratio:auto!important;
  margin:0 -1px 12px!important;
  border-radius:17px!important;
}
.battle-picker-card.case-card .case-chest-image{
  width:92%!important;
  height:92%!important;
}
.battle-picker-card.case-card .case-chest-pet,
.battle-picker-card.case-card .case-chest-pet-img{
  width:74px!important;
  height:74px!important;
}
.battle-picker-card.case-card .case-card-price{
  height:46px!important;
  min-height:46px!important;
  margin-top:2px!important;
  font-size:17px!important;
}
.battle-picker-card.case-card .case-card-price strong{font-size:17px!important}
.battle-picker-card.case-card .case-card-price .gem-icon{width:24px!important;height:24px!important}
@media(max-width:760px){
  .battle-picker-card.case-card .case-chest-stage{height:165px!important}
  .battle-picker-card.case-card .case-chest-pet,
  .battle-picker-card.case-card .case-chest-pet-img{width:64px!important;height:64px!important}
}
@media(max-width:480px){
  .battle-picker-card.case-card{aspect-ratio:auto!important;padding:12px 10px!important}
  .battle-picker-card.case-card .case-chest-stage{height:145px!important;aspect-ratio:auto!important}
}


/* v49.5.0 — restore the original compact Case Battle picker sizing.
   Only the featured pet artwork is nudged down slightly. */
.battle-builder-grid{
  grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)!important;
}
.battle-case-picker{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  max-height:450px!important;
  overflow:auto!important;
  padding:0!important;
  align-items:stretch!important;
  scrollbar-width:none;
}
.battle-case-picker::-webkit-scrollbar{display:none}
.battle-picker-card.case-card{
  appearance:none!important;
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  display:block!important;
  padding:10px!important;
  border:1px solid rgba(255,255,255,.055)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.025)!important;
  color:#eef3ff!important;
  text-align:left!important;
  cursor:pointer!important;
  box-shadow:none!important;
  transition:.16s ease!important;
}
.battle-picker-card.case-card:hover{
  transform:translateY(-2px)!important;
  border-color:rgba(92,214,255,.23)!important;
  background:rgba(75,192,238,.055)!important;
}
.battle-picker-card.case-card h3{
  height:auto!important;
  min-height:0!important;
  display:block!important;
  margin:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:10px!important;
  line-height:1.2!important;
  text-align:left!important;
}
.battle-picker-card.case-card .case-chest-stage{
  position:relative!important;
  width:100%!important;
  height:92px!important;
  min-height:92px!important;
  aspect-ratio:auto!important;
  display:grid!important;
  place-items:center!important;
  margin:0 0 6px!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
.battle-picker-card.case-card .case-chest-image{
  width:82px!important;
  height:82px!important;
  object-fit:contain!important;
}
.battle-picker-card.case-card .case-chest-pet,
.battle-picker-card.case-card .case-chest-pet-img{
  width:46px!important;
  height:46px!important;
  object-fit:contain!important;
  transform:translateY(7px)!important;
}
.battle-picker-card.case-card .case-card-price{
  height:auto!important;
  min-height:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:4px!important;
  margin:5px 0 0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  font-size:9px!important;
  color:#9fb0cc!important;
}
.battle-picker-card.case-card .case-card-price strong{font-size:9px!important}
.battle-picker-card.case-card .case-card-price .gem-icon{width:13px!important;height:13px!important}
.battle-picker-card.case-card .case-card-rewards{display:none!important}
.battle-picker-count{
  right:2px!important;
  top:2px!important;
  z-index:8!important;
  min-width:24px!important;
  height:24px!important;
  padding:0 6px!important;
  border-radius:9px!important;
  font-size:10px!important;
}
@media(max-width:900px){
  .battle-builder-grid{grid-template-columns:1fr!important}
  .battle-case-picker{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:650px){
  .battle-case-picker{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:390px){
  .battle-case-picker{grid-template-columns:1fr 1fr!important;gap:7px!important}
  .battle-picker-card.case-card{padding:8px!important}
  .battle-picker-card.case-card .case-chest-stage{height:82px!important;min-height:82px!important}
  .battle-picker-card.case-card .case-chest-image{width:72px!important;height:72px!important}
  .battle-picker-card.case-card .case-chest-pet,
  .battle-picker-card.case-card .case-chest-pet-img{width:40px!important;height:40px!important;transform:translateY(6px)!important}
}

/* v49.5.1 — Case Battle picker: centre only the featured pet artwork.
   Keep the compact card/chest layout unchanged and remove inherited tile styling. */
.battle-picker-card.case-card .case-chest-pet{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  right:auto!important;
  bottom:auto!important;
  width:46px!important;
  height:46px!important;
  min-width:0!important;
  min-height:0!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
  overflow:visible!important;
  transform:translate(-50%,-38%)!important;
  z-index:3!important;
}
.battle-picker-card.case-card .case-chest-pet .case-image-wrap{
  width:46px!important;
  height:46px!important;
  min-width:0!important;
  min-height:0!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.battle-picker-card.case-card .case-chest-pet-img{
  position:static!important;
  width:46px!important;
  height:46px!important;
  max-width:46px!important;
  max-height:46px!important;
  display:block!important;
  object-fit:contain!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
}
@media(max-width:390px){
  .battle-picker-card.case-card .case-chest-pet{
    width:40px!important;
    height:40px!important;
    transform:translate(-50%,-38%)!important;
  }
  .battle-picker-card.case-card .case-chest-pet .case-image-wrap,
  .battle-picker-card.case-card .case-chest-pet-img{
    width:40px!important;
    height:40px!important;
    max-width:40px!important;
    max-height:40px!important;
  }
}
