#games-home,#game-room{padding-bottom:clamp(36px,6vw,84px)}
.gh-showcase{display:grid;grid-template-columns:2.25fr 1fr;gap:14px}
.gh-lead,.gh-side a,.gh-card{position:relative;isolation:isolate;overflow:hidden;display:block;border:1px solid #ffffff1b;border-radius:16px;background-color:#1d1724}
.gh-lead{min-height:clamp(240px,24vw,330px);display:flex;align-items:flex-end;background:linear-gradient(90deg,#100a1ce8,#150d2177 43%,transparent 74%),url(art/games/battle.webp) center/cover}
.gh-lead>div{padding:clamp(22px,3vw,42px);max-width:77%}.gh-overline,.gh-side span{font-size:13px;font-weight:650;color:#dfc4ff}
.gh-lead h2{font:800 clamp(42px,5.6vw,80px)/.98 Barlow,Inter,sans-serif;letter-spacing:-.035em;margin:9px 0;color:#fff}
.gh-lead p{font-size:clamp(14px,1.25vw,17px);color:#e6deec;line-height:1.4}
.gh-start,.gh-primary{background:#c3a6ff;color:#1c1029;font-weight:750}
.gh-start{display:inline-block;padding:11px 17px;border-radius:9px;margin-top:18px;font-size:14px}
.gh-side{display:grid;grid-template-rows:1fr 1fr;gap:14px}.gh-side a{display:flex;flex-direction:column;justify-content:center;padding:18px 23px}
.gh-side strong{font:750 clamp(26px,3.1vw,43px)/1.05 Barlow,Inter,sans-serif;letter-spacing:-.025em;position:relative;z-index:1;margin-top:4px}
.gh-side span{position:relative;z-index:1}.gh-up{background:radial-gradient(ellipse at 88% 74%,#874780 0,#3a203c 49%,#211b28 84%)}
.gh-up img{position:absolute;right:-3%;height:140%;width:58%;object-fit:contain;transform:rotate(14deg);filter:drop-shadow(0 12px 8px #100619b3)}
.gh-mine{background:linear-gradient(90deg,#081c1eeb,#0b1a1c59 65%,transparent),url(art/games/mines-stars.webp) center/cover}.gh-mine span{color:#a7f0d9}
.gh-library{margin-top:32px}.gh-library-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.gh-library h2{font-size:clamp(23px,2.1vw,32px);letter-spacing:-.045em}
#games-filters{display:flex;gap:4px;flex-wrap:wrap}#games-filters button{font-size:14px;color:#bab2c5;border-radius:8px;padding:9px 12px}
#games-filters button[aria-pressed=true]{background:#302637;color:#ede1ff}#games-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.gh-card{border-radius:13px;aspect-ratio:1.33;color:white;transition:border-color .2s,transform .2s}
.gh-card img{width:100%;height:100%;object-fit:cover;transition:transform .35s;display:block}
.gh-card>div{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:13px 14px;background:linear-gradient(0deg,#0c0914f7,#0c091499 23%,transparent 65%)}
.gh-card small{color:#dfd6e8;font-size:12px}.gh-card strong{font:750 clamp(18px,1.6vw,25px)/1.05 Barlow,Inter,sans-serif;letter-spacing:-.02em;margin-top:3px}
@media(hover:hover){.gh-card:hover,.gh-side a:hover,.gh-lead:hover{border-color:#ba9cce}.gh-card:hover img{transform:scale(1.055)}.gh-button:hover:not(:disabled){filter:brightness(1.14)}}
.page-heading.gh-room-head {display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:clamp(4px,1vw,12px);margin:clamp(10px,2vw,26px) 0 clamp(12px,2vw,20px)}
.gh-room-head h1 {min-width:0;overflow-wrap:anywhere}
.gh-room-head .gh-back {display:grid;place-items:center;width:44px;height:44px;margin:0;border-radius:50%;color:#d6b9f7}
.gh-back i {display:flex}
.gh-back .ico {width:24px;height:24px;stroke-width:2.2}
.gh-back:focus-visible {outline:2px solid currentColor;outline-offset:1px}
@media(hover:hover){.gh-back:hover {background:#2d2536;color:#f2e9ff}}
@media(prefers-reduced-motion:no-preference){.gh-back .ico {transition:transform .16s ease-out}.gh-back:active .ico {transform:translateX(-2px)}}
#game-variants{display:flex;flex-wrap:wrap;gap:5px;margin:-4px 0 12px}#game-variants a{display:grid;place-items:center;min-height:40px;padding:6px 14px;border-radius:8px;color:#c3b5cd;background:#211b29;font-size:14px}#game-variants [aria-current]{color:#e2caff;background:#3e304d}
.gh-room-head{margin:3px 0 18px;gap:12px}.gh-room-head h1:focus{outline:none}.gh-machine{border:1px solid #55435f;border-radius:20px;overflow:hidden;background:#1b1722}
#game-scene{position:relative;isolation:isolate;min-height:295px;overflow:hidden;background:radial-gradient(ellipse at 50% 22%,#34253e,#211b2b 58%,#17141e);color:#f4efff}
.gh-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:16px clamp(12px,3vw,35px);border-top:1px solid #ffffff19}
#game-status{flex:1 1 190px;line-height:1.45;font-size:15px;font-weight:600;color:#e2d9ea;overflow-wrap:anywhere}.gh-complete #game-status{color:#e9d3ff}
#game-controls{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;max-width:100%}
.gh-button{min-height:44px;padding:8px 15px;border:1px solid #57475f;border-radius:9px;background:#302736;color:#eee6f5;font-weight:600;font-size:14px}
.gh-button.gh-primary{background:#bea1f9;color:#170c26;border-color:#ccafff;font-weight:750}.gh-button:disabled{opacity:.4;cursor:default}.gh-button[aria-pressed=true]{border-color:#cda9ff;box-shadow:inset 0 0 0 1px #bc98e9}
@media(max-width:1050px){#games-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){#games-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.gh-library-head{align-items:flex-start;flex-direction:column}.gh-showcase,.gh-side{gap:9px}}
@media(max-width:650px){.top nav #games-link{display:flex;font-size:14px}.top nav #upgrade-link{display:flex;font-size:0;gap:0;min-width:34px;justify-content:center}.top nav #upgrade-link i{display:block}.gh-showcase{grid-template-columns:1fr}.gh-lead{min-height:215px}.gh-side{grid-template-columns:1fr 1fr;grid-template-rows:1fr}.gh-side a{min-height:84px;padding:12px 14px;border-radius:12px}.gh-side strong{font-size:24px}.gh-up img{opacity:.85}.gh-library{margin-top:24px}#games-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.gh-card{aspect-ratio:1.38}.gh-card>div{padding:10px}.gh-lead>div{max-width:84%}#games-filters{gap:1px}#games-filters button{padding:9px 7px;font-size:13px;min-height:42px}.gh-library-head{gap:6px}.gh-footer{display:block;padding:12px}.gh-footer #game-controls{justify-content:flex-start;margin-top:9px}.gh-room-head{margin-top:0}.gh-room-head h1{font-size:clamp(27px,7.5vw,35px)}.gh-back{margin-top:4px}.gh-machine{border-radius:14px}#game-scene{min-height:230px}}
@media(max-width:370px){.top-inner{gap:5px}.top nav{gap:0}.top .demo-suffix{display:none}.top nav #upgrade-link{min-width:29px}.gh-side a{padding:10px}.gh-card strong{font-size:17px}}
.gh-card img[src$="/battle.webp"],.gh-card img[src$="/cases.webp"],.gh-card img[src$="/mines-stars.webp"],.gh-card img[src$="/tower.webp"],.gh-card img[src$="/dice.webp"],.gh-card img[src$="/double.webp"]{object-position:72% center}
@media(max-width:650px){.top-inner{gap:4px}.top nav{gap:0}.top nav #history,.top nav #upgrade-link{width:36px;min-width:36px;padding:0;justify-content:center}.top nav #games-link{gap:4px}.top-tools{gap:4px}.top .demo-suffix{display:none}.top .demo{gap:4px}.top .icon-button{width:36px;min-width:36px}}
@media(max-width:359px){.top .brand{font-size:23px}.top .brand img{width:21px}.top nav #games-link i{display:none}.top .demo{font-size:11px}.top nav #history,.top nav #upgrade-link{width:32px;min-width:32px}}

/* Room controls and navigation follow the playable scene on both form factors. */
.gh-lead{background-image:linear-gradient(90deg,#130f1def,#170f208a 44%,transparent 82%),url(art/battle-theatre.webp);background-position:center}
.gh-card:has(img[src$="/cases.webp"]) img{content:url(art/edition-arsenal.webp);object-position:center}
.gh-card:has(img[src$="/battle.webp"]) img{content:url(art/battle-mobile.webp);object-position:center}
#game-room .gh-machine{overflow:clip;border-radius:15px;background:#16151b;border-color:#3a3541}
#game-room .gh-footer{background:#19181f;border-color:#39343e}
#game-controls .gh-primary{min-width:150px;padding:12px 20px;background:#c8a8ff;color:#1d1429}
#game-controls:empty{display:none}
.gh-more{margin:26px 0 0}.gh-more>div{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.gh-more h2{font-size:21px;letter-spacing:-.03em}.gh-more>div a{color:#cebadf;font-size:14px}
#game-related{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}#game-related a{position:relative;isolation:isolate;display:flex;align-items:flex-end;min-width:0;min-height:100px;padding:12px 15px;overflow:hidden;border-radius:10px;border:1px solid #39333f;background:#18151c}#game-related img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 42%;z-index:-2}#game-related a::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,#100b16eb,transparent 90%)}#game-related strong{font-size:18px;line-height:1.1;letter-spacing:-.03em}
@media(max-width:650px){
 .gh-room-head{margin:0 0 10px}.gh-room-head h1{font-size:30px}.gh-back{margin:0;min-height:36px}.gh-more{margin:21px 0 0}.gh-more h2{font-size:19px}#game-related{gap:6px}#game-related a{min-height:69px;padding:8px}#game-related strong{font-size:14px}
 #game-room .gh-footer:has(#game-controls:not(:empty)){position:sticky;bottom:0;z-index:4;padding:10px max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
 .gh-footer #game-controls{gap:6px}.gh-footer #game-controls:not(:empty){margin-top:7px}.gh-footer #game-controls:has(>:only-child) .gh-primary{width:100%}
 #game-controls .gh-button{flex:1 1 auto;min-width:0;padding:9px 12px}#game-room .gh-footer #game-status{font-size:14px}
}
.gh-replay-link{font-size:13px;color:#dfc7ff;text-decoration:underline;text-underline-offset:3px}.entry:has(.gh-replay-link){flex-wrap:wrap}
.gh-lead{min-height:clamp(235px,26vw,350px);background-color:#14121a;background-image:linear-gradient(90deg,#111019bf,transparent 68%),url(art/upgrade-showcase.webp);background-position:center}
.gh-side .gh-case,.gh-side .gh-mine{justify-content:flex-end;isolation:isolate;padding:18px 22px}
.gh-side .gh-case{background:linear-gradient(90deg,#191324cf,#17111b26 55%,transparent),url(art/edition-neon.webp) 65% 52%/cover}
.gh-side .gh-mine{background:linear-gradient(90deg,#0a181be0,#0b171a26 65%,transparent),url(art/games/mines-stars.webp) 73% center/cover}
.gh-side strong{font-style:italic;font-size:clamp(26px,3.3vw,46px);text-shadow:0 2px 15px #08060a88}
#games-filters button:last-child{margin-left:7px;border-left:1px solid #54495b;border-radius:0 8px 8px 0}
.phase-crate-canvas{display:block;width:100%;height:100%;position:absolute;inset:0;z-index:1}
.phase-crate-glow{position:absolute;inset:7% 18% 25%;z-index:2;pointer-events:none;mix-blend-mode:screen;background:radial-gradient(ellipse at 50% 80%,color-mix(in srgb,var(--edition,#c5a0ff) 70%,transparent),transparent 47%);opacity:0}
@media(max-width:650px){.gh-lead{min-height:224px;background-position:64% center}.gh-lead>div{max-width:74%;padding:20px 16px}.gh-lead h2{font-size:42px}.gh-lead p{max-width:195px}.gh-side .gh-case,.gh-side .gh-mine{min-height:103px;padding:11px}.gh-side strong{font-size:25px}#games-filters button:last-child{margin-left:2px}}
#game-room:not(.gh-complete) .gh-more{display:none}
.pc-opening.crate-loaded::before{content:"";position:absolute;left:16%;right:16%;bottom:9%;height:14%;border-radius:50%;background:radial-gradient(ellipse,#09080bd9,transparent 70%)}
