body.candy-party {margin:0;min-height:100vh;min-height:100dvh;background:#260d08}
.candy-party::before {display:none}
body.candy-party main {
  width:min(100%,560px);padding:0;margin:0 auto;position:relative;
  flex:1;display:flex;flex-direction:column;
}
.candy-party #room {position:relative}
.in-room.candy-party #room #machine {
  --controls-y:78%;--hud-inset:max(4px,env(safe-area-inset-bottom));
  container-type:size;position:relative;width:100%;height:100vh;height:100dvh;min-height:460px;
  isolation:isolate;margin:0;border:0;border-radius:0;box-shadow:none;
  background:#35130d var(--candy-table,none) center / 100% 100% no-repeat;
  color:#fff2b8;
}
.candy-party #machine :is(#candyTools,.machine-head,.room-grid,.console,.control,.stake) {display:contents}
.candy-party :is(.marquee-copy,#roundFeature,#minus,#plus,.stake-label,#status:empty),
.candy-party .machine-head::before,.candy-party .machine-head::after,.candy-party #play::before {display:none}
.candy-party #candyLevel {position:absolute;top:0;left:23%;width:54%;height:13.1%;object-fit:fill;pointer-events:none}
.candy-party #candyMeter {
  position:absolute;left:.4%;top:14.8%;width:23.7%;height:11.8%;
  background:center / contain no-repeat;aspect-ratio:172/151;
  color:#ffdc54;font:bold clamp(15px,5cqw,32px)/1 system-ui;text-shadow:0 2px 2px #461506;
  display:grid;place-items:center;z-index:2;pointer-events:none;
}
.candy-party #candyCount {position:absolute;top:28%;left:73%;transform:translate(-50%,-50%)}
.candy-party #candyBonus {position:absolute;top:17%;left:25%;width:51%;text-align:center;font-weight:750;color:#ffe177;text-shadow:0 1px 2px #351000}
.candy-party #machine .cabinet {
  position:absolute;top:48%;left:50%;transform:translate(-50%,-50%);width:min(80cqw,54cqh);height:auto;aspect-ratio:1;
  max-width:none;padding:0;border:0;border-radius:0;background:none;box-shadow:none;
}
.candy-party #stage {width:100%;height:100%;aspect-ratio:1;gap:1%;padding:0;background:none;border:0;box-shadow:none;border-radius:0}
.candy-party .reel {background:none;border-radius:0}
.candy-party #machine .tile::before {display:none}
.candy-party #machine .tile img {width:98%;height:98%;object-fit:contain;filter:drop-shadow(0 2px 2px #210b0a90)}
.candy-party #machine .tile.win img {filter:drop-shadow(0 0 5px #fff47c)}
.candy-party #machine :is(#candyAuto,#stakeLevel,#play) {
  position:absolute;display:block;margin:0;padding:0;min-width:0;min-height:44px;height:10%;
  background:transparent center / 100% 100% no-repeat;border:0;box-shadow:none;border-radius:0;touch-action:manipulation;
}
.candy-party #machine :is(#candyAuto,#stakeLevel,#play):active:not(:disabled) {filter:brightness(1.18);transform:scale(.98)}
.candy-party #machine button:focus-visible {outline:2px solid #ffe78a;outline-offset:2px}
.candy-party #machine #stakeLevel {left:5%;top:var(--controls-y);width:27.5%;background-image:var(--candy-stake,none)}
.candy-party #machine #play {left:33.6%;top:var(--controls-y);width:30%;background-image:var(--candy-start,none)}
.candy-party #machine #candyAuto {right:4%;top:var(--controls-y);width:31.5%;background-image:var(--candy-auto,none)}
.candy-party #machine #candyAuto[data-running] {background-image:var(--candy-stop,none)}
.candy-party #play .play-label,.candy-party #stakeLevel > * {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
.candy-party #enableAudio {z-index:5;right:12px;top:12%;bottom:auto}
.candy-party .candy-readout,.candy-party #machine .award,.in-room.candy-party #gameFooter #walletButton {
  box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0;
  border:1px solid #aa8457;border-radius:5px;background:linear-gradient(#21100e,#45200c 66%,#271208);
  color:#ffe58b;padding:0 2%;font:700 clamp(12px,3.7vw,20px)/1.1 system-ui;font-variant-numeric:tabular-nums;
}
.candy-party .candy-readout span,.candy-party #machine .award small {color:#f4c854;white-space:nowrap;font:inherit}
.candy-party .candy-readout b {overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.candy-party #candyBetInfo,.candy-party #machine .award {
  position:absolute;bottom:calc(var(--hud-inset) + max(44px,4.65%));height:4.7%;min-height:25px;left:1.4%;width:47.7%;
}
.candy-party #machine .award {left:auto;right:1.4%;width:48.5%;margin:0}
.candy-party #award {font:inherit;color:#fff0b1}
.candy-party #candyRoundInfo {position:absolute;left:calc(1.4% + 43px);bottom:var(--hud-inset);height:4.5%;min-height:38px;width:calc(47.7% - 43px)}
.candy-party #candySerial {direction:rtl;text-align:left}
.in-room.candy-party #gameFooter {
  position:absolute;inset:auto 1.4% max(4px,env(safe-area-inset-bottom));height:4.5%;min-height:38px;margin:0;padding:0;
  pointer-events:none;
}
.in-room.candy-party #gameFooter :is(#audioButton,#walletButton) {pointer-events:auto}
.in-room.candy-party #gameFooter #walletButton {height:100%;width:50%;max-width:50%;padding:0 2%;min-height:38px;gap:3px}
.candy-party #walletButton svg {flex-shrink:0;width:18px}
.in-room.candy-party #gameFooter #balance {font:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.in-room.candy-party #gameBackSlot {left:max(6px,env(safe-area-inset-left));top:max(5px,env(safe-area-inset-top))}
.candy-party #candyRules {position:absolute;right:max(6px,env(safe-area-inset-right));top:max(5px,env(safe-area-inset-top));z-index:3}
.in-room.candy-party #gameBackSlot #roomBack,.candy-party #candyRules,.in-room.candy-party #gameFooter #audioButton {
  width:44px;height:44px;padding:0;display:grid;place-items:center;min-width:0;border-radius:12px;
  color:#fff4d8;border:2px solid #9c8476;background:linear-gradient(#75645b,#2b211d 55%,#190e0c);
  box-shadow:inset 0 1px 3px #f9eee988,0 2px 3px #25100b;
}
.in-room.candy-party #gameFooter #audioButton {width:39px;height:100%;min-height:38px;border-radius:6px}
@media (orientation:landscape) {
  body.candy-party main {width:min(100%,max(640px,140dvh))}
  .in-room.candy-party #room #machine {min-height:310px;--controls-y:72%;background-image:var(--candy-table-wide,none)}
  .candy-party #candyLevel {left:38%;width:24%;height:11%;top:0}
  .candy-party #candyMeter {left:4%;top:35%;width:16%;height:21%}
  .candy-party #machine .cabinet {top:40%;width:min(44cqw,54cqh)}
  .candy-party #candyBonus {left:73%;width:24%;top:22%}
  .candy-party #machine :is(#stakeLevel,#play,#candyAuto) {height:12%;background-size:contain}
  .candy-party #candyBetInfo,.candy-party #machine .award {left:24%;width:20%;bottom:var(--hud-inset);height:8%;min-height:38px}
  .candy-party #machine .award {left:44%;right:auto;width:20%}
  .candy-party #candyRoundInfo {width:calc(21.6% - 40px);left:calc(1.4% + 40px)}
  .in-room.candy-party #gameFooter #walletButton {width:34%}
}
@media (max-height:650px) and (orientation:portrait) {
  .in-room.candy-party #room #machine {--controls-y:73%}
}
.candy-sequel #candyLevel {object-fit:contain}
.candy-sequel #candyCount {left:75%;top:23%}
.candy-sequel #machine .tile.win::after {
  content:"";position:absolute;inset:0;pointer-events:none;
  background:url("/art/candy-party-2/burst.webp") left center / 900% 100% no-repeat;
  animation:candy-sequel-burst .43s steps(8,end) forwards;
}
@keyframes candy-sequel-burst {to{background-position:right center}}
@media (orientation:portrait) {
  .candy-sequel #candyLevel {top:max(0px,env(safe-area-inset-top));left:19%;width:62%;height:9.7%}
  .candy-sequel #candyMeter {top:15.5%;left:2.8%;width:16%;height:9%}
  .candy-sequel #machine .cabinet {width:min(73cqw,54cqh)}
  .candy-sequel #machine :is(#stakeLevel,#play,#candyAuto) {background-size:contain}
}
@media (prefers-reduced-motion:reduce) {
  .candy-sequel #machine .tile.win::after {display:none}
}

.gem-table #candyLevel {left:33%;top:.75%;width:34%;height:3.8%;object-fit:contain}
.gem-table #candyMeter {left:2%;top:12%;width:11%;height:8%;background-position:50% 0;background-size:auto 64%}
.gem-table #candyCount {left:50%;top:86%;color:#fff3ba}
.gem-table #machine .cabinet {width:min(69cqw,55cqh);top:47%}
@media (orientation:landscape) {
  .gem-table #candyLevel {left:42%;width:18%;top:1%;height:4%}
  .gem-table #candyMeter {left:23%;top:26%;width:9%;height:13%}
  .gem-table #machine .cabinet {left:53%;width:min(41cqw,56cqh);top:40%}
}
