*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:#030006;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;overflow:hidden;-webkit-user-select:none;user-select:none}button{font:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.app{position:relative;width:min(100vw,470px);height:100dvh;min-height:640px;margin:auto;overflow:hidden;background:radial-gradient(circle at 50% 20%,#2d0d48 0%,#090012 42%,#030006 75%,#000 100%);isolation:isolate}.machine-wrap{position:absolute;left:0;top:0;width:100%;aspect-ratio:397/701;z-index:1}.machine-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;filter:saturate(1.08) contrast(1.03) drop-shadow(0 0 24px rgba(255,96,0,.22));z-index:1}
.ring-shell{position:absolute;left:14.61%;top:12.98%;width:71.03%;height:43.65%;z-index:5}.ring-art{display:none}.ring-hitlights{position:absolute;inset:0;z-index:8;pointer-events:none}.lamp{position:absolute;border:2px solid transparent;border-radius:5px;box-shadow:none;transition:filter .04s,box-shadow .04s,border-color .04s;pointer-events:none}.lamp.active{border-color:#fff9b2;box-shadow:0 0 5px 2px #fff,0 0 12px 5px #ffd92d,0 0 21px 9px #ff4b00;filter:brightness(1.34) saturate(1.2)}.lamp.bonusLit{border-color:#7cf7ff;box-shadow:0 0 6px 2px #fff,0 0 14px 6px #23dfff,0 0 24px 10px #a72fff}.lamp.door{border-radius:10px}.lamp.door.active{border-color:#fff2a0;box-shadow:0 0 6px 2px #fff,0 0 15px 6px #ffb800,0 0 28px 10px #ff2d55;filter:brightness(1.25)}
.rabbit-origin-mask{position:absolute;left:18.32%;top:31.50%;width:9.05%;height:5.87%;z-index:11;border-radius:3px;background:linear-gradient(100deg,#fbf6db,#fffdef 50%,#f4eed6);opacity:0;pointer-events:none}.bonus-rabbit{position:absolute;inset:0;width:100%;height:100%;z-index:12;opacity:0;pointer-events:none;transform:none;filter:none;}
.center-bonus{position:absolute;left:31.3%;top:24.5%;width:37.6%;height:23.7%;z-index:7;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.jackpot-row{height:22%;display:flex;align-items:center;justify-content:center}.jackpot-row b{font-family:ui-monospace,Menlo,monospace;font-size:clamp(12px,4.2vw,21px);color:#ff3030;text-shadow:0 0 7px #f00}.mary-ring{position:relative;width:72%;aspect-ratio:1;border-radius:50%;opacity:0;pointer-events:none;transition:opacity .18s;filter:drop-shadow(0 0 8px #ffb51c)}.mary-ring.active{opacity:1}.mary{position:absolute;left:50%;top:50%;width:19%;aspect-ratio:1;margin:-9.5%;display:grid;place-items:center;border-radius:50%;font-size:clamp(7px,2.05vw,11px);background:rgba(20,4,18,.18);border:1px solid rgba(255,224,105,.34);transform:rotate(calc(var(--i)*30deg)) translateY(-220%) rotate(calc(var(--i)*-30deg));box-shadow:inset 0 0 5px rgba(255,180,0,.18);transition:filter .055s,box-shadow .055s,transform .055s,opacity .055s}.mary span{filter:drop-shadow(0 0 2px #000)}.mary.big{font-size:clamp(8px,2.35vw,13px)}.mary.small{width:16%;margin:-8%;opacity:.78;font-size:clamp(6px,1.7vw,9px)}.mary.mary{border-color:rgba(255,91,214,.55)}.mary.on{opacity:1;filter:brightness(1.85) saturate(1.35);box-shadow:0 0 6px 2px #fff,0 0 15px 6px #ffd21e,0 0 24px 10px #ff5a00}.mary.landed{transform:rotate(calc(var(--i)*30deg)) translateY(-220%) rotate(calc(var(--i)*-30deg)) scale(1.18);box-shadow:0 0 7px 3px #fff,0 0 18px 8px #ffe13b,0 0 30px 12px #ff3b8f}.result-panel{position:absolute;left:-18%;right:-18%;bottom:-28%;text-align:center;pointer-events:none}.result-panel strong{display:block;font-size:9px;color:#fff4bd;text-shadow:0 0 5px #ff7a00}.result-panel small{display:block;font-size:6px;color:#d5b7e7}.result-panel i{font-style:normal;color:#79f7ff}.machine-data{position:absolute;left:31.4%;top:41.8%;width:37.4%;height:3.6%;display:grid;grid-template-columns:repeat(3,1fr);gap:5%;z-index:12;pointer-events:none}.machine-data b{display:grid;place-items:center;font-family:ui-monospace,Menlo,monospace;font-size:clamp(8px,2.6vw,13px);line-height:1;color:#ff3b3b;text-shadow:0 0 6px #f00;background:#180003b8;border-radius:2px}
.bet-hotspots{position:absolute;inset:0;z-index:18;pointer-events:none}.bet{position:absolute;border:0;background:transparent;padding:0;cursor:pointer;pointer-events:auto;border-radius:8px}.bet::after{content:"";position:absolute;inset:2px;border-radius:7px;border:2px solid transparent;transition:.12s}.bet.selected::after{border-color:#7cf7ff;box-shadow:0 0 5px #fff,0 0 12px #00dfff,inset 0 0 8px #00dfff55}.bet .bet-badge{position:absolute;right:2px;top:1px;bottom:auto;min-width:10px;height:11px;padding:0 2px;border-radius:2px;background:#170a05da;border:0;color:#fff3ba;font:700 8px/11px ui-monospace,Menlo,monospace;text-align:center;text-shadow:0 1px 1px #000;pointer-events:none;box-shadow:none;}
.bet:active{filter:brightness(1.35)}
.physical-controls{position:absolute;inset:0;z-index:20;pointer-events:none}.machine-hotspot{position:absolute;border:0;background:transparent;color:transparent;padding:0;pointer-events:auto;border-radius:50%}.machine-hotspot:active{box-shadow:0 0 0 2px #fff7a5,0 0 14px #ffbf27;background:#fff2a522}.machine-hotspot:nth-child(1){left:14.609572%;top:63.338088%;width:10.831234%;height:4.136947%}.machine-hotspot:nth-child(2){left:26.700252%;top:63.338088%;width:10.831234%;height:4.136947%}.machine-hotspot:nth-child(3){left:38.790932%;top:63.338088%;width:10.831234%;height:4.136947%}.machine-hotspot:nth-child(4){left:50.881612%;top:63.338088%;width:10.831234%;height:4.136947%}.machine-hotspot:nth-child(5){left:62.972292%;top:63.338088%;width:10.831234%;height:4.136947%}.machine-hotspot:nth-child(6){left:75.062972%;top:63.338088%;width:10.831234%;height:4.136947%}.select-all-hotspot{position:absolute;left:74.559194%;top:68.188302%;width:15.617128%;height:4.564907%;z-index:21;border:0;background:transparent;border-radius:7px;color:transparent}.select-all-hotspot.selected{box-shadow:0 0 0 2px #fff7a5,0 0 14px #00eaff,inset 0 0 10px #00eaff55}.select-all-hotspot:active{background:#fff2a51f}
.hud-top{position:absolute;inset:0;z-index:35;pointer-events:none}.glass-btn{position:absolute;top:max(8px,env(safe-area-inset-top));width:34px;height:34px;border:1px solid #ffd85e;border-radius:50%;background:#09030cb8;color:#fff0aa;box-shadow:0 0 9px #bd2cff66;font-size:20px;pointer-events:auto}.glass-btn:first-child{left:8px}.glass-btn:last-child{right:8px}.hud-brand{display:none}.score-strip{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none}
.gamble-inline{position:absolute;left:18%;right:18%;bottom:17%;height:10.5%;z-index:30;border:1px solid #d19b35;border-radius:12px;background:linear-gradient(180deg,#160928f2,#07040cf7);box-shadow:0 0 12px #7424df66,inset 0 0 10px #fff1;padding:6px 8px;opacity:0;pointer-events:none;transition:.18s}.gamble-inline.show{opacity:1;pointer-events:auto;box-shadow:0 0 14px #ff9c1d99,inset 0 0 12px #fff2}.gamble-head{display:flex;align-items:center;gap:6px;height:34%}.gamble-head span{color:#ffe05c;font-weight:900}.gamble-head b{font-family:ui-monospace,Menlo,monospace;color:#ff4c4c;font-size:16px}.gamble-head em{margin-left:auto;font-style:normal;font-size:9px;color:#d4c3e7}.gamble-actions{height:66%;display:grid;grid-template-columns:1fr 38px 1fr .8fr;gap:5px;align-items:center}.gamble-actions button{height:31px;border:1px solid #ffca55;border-radius:8px;background:linear-gradient(#542a7a,#210a36);color:#fff1a4;font-weight:800;font-size:10px}.gamble-actions .gold{background:linear-gradient(#ffb829,#8e3900)}.dice{height:34px;display:grid;place-items:center;border-radius:8px;background:#05030a;border:1px solid #ffca55;color:#ff4444;font-size:20px;font-weight:900}
.drawer{position:absolute;right:0;top:0;bottom:0;width:78%;z-index:60;padding:max(14px,env(safe-area-inset-top)) 14px 20px;background:linear-gradient(180deg,#170925f8,#07040cfb);border-left:1px solid #d4a340;box-shadow:-12px 0 30px #000b;transform:translateX(104%);transition:.22s ease}.drawer.show{transform:none}.drawer-mask{position:absolute;inset:0;z-index:55;background:#0008;opacity:0;pointer-events:none;transition:.2s}.drawer-mask.show{opacity:1;pointer-events:auto}.drawer-head{display:flex;align-items:center;justify-content:space-between;color:#ffe168;font-size:20px}.drawer-head button{border:0;background:transparent;color:#fff;font-size:30px}.bonus-status{margin:18px 0;padding:13px;border:1px solid #9c6b2a;border-radius:12px;background:#110719}.bonus-status>*{display:block}.bonus-status small{color:#a998c0}.bonus-status b{color:#ffe25c;font-size:18px;margin:4px 0}.bonus-status span{font-size:10px;color:#d9c6ed;line-height:1.7}.drawer-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.drawer-grid button{min-height:44px;border:1px solid #8059a7;border-radius:10px;background:#170d25;color:#fff}.api-status{margin-top:18px;font-size:10px;color:#8bdff0;line-height:1.6}.overlay{position:absolute;inset:0;z-index:80;background:#030007d9;display:grid;place-items:center;opacity:0;pointer-events:none;transition:.16s}.overlay.show{opacity:1;pointer-events:auto}.overlay.mary-mode{background:transparent;pointer-events:none;place-items:end center;padding-bottom:23%}.overlay.mary-mode .bonus-modal{width:58%;padding:5px 8px 7px;border:1px solid rgba(255,212,76,.55);border-radius:10px;background:rgba(15,3,20,.24);box-shadow:0 0 12px rgba(255,123,27,.28);backdrop-filter:blur(1px)}.overlay.mary-mode .bonus-modal h2{font-size:13px;margin:0}.overlay.mary-mode .bonus-modal p{font-size:9px;margin:2px 0;color:#fff3c4}.overlay.mary-mode .bonus-grid{display:none}.overlay.mary-mode .bonus-modal>strong{font-size:18px;margin-top:1px;text-shadow:0 0 7px #f33}.bonus-modal{width:78%;border:2px solid #ffd44c;border-radius:20px;padding:20px;text-align:center;background:radial-gradient(circle at 50% 0,#6f1733,#16051e 58%,#07030c);box-shadow:0 0 24px #ff7b1b,0 0 55px #e625d055}.bonus-modal h2{margin:0;color:#ffe45b;font-size:28px}.bonus-modal p{color:#f3c9ff}.bonus-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;min-height:48px}.bonus-grid i{width:38px;height:38px;display:grid;place-items:center;border:1px solid #a46e30;border-radius:8px;background:#180b20;font-style:normal}.bonus-grid i.on{box-shadow:0 0 12px #fff,0 0 22px #ffbf27;filter:brightness(1.5)}.bonus-modal>strong{display:block;margin-top:12px;font-size:32px;color:#ff4747}.coins{position:absolute;inset:0;z-index:90;pointer-events:none;overflow:hidden}.coins i{position:absolute;top:-30px;width:20px;height:20px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff8a5 0 8%,#ffd229 12% 44%,#bd6c00 48% 70%,#ffe35b 72%);border:1px solid #fff1a3;box-shadow:0 0 8px #ffb500;animation:coinFall 1.25s cubic-bezier(.2,.65,.45,1) forwards}@keyframes coinFall{to{transform:translateY(105vh) rotate(720deg)}}.toast{position:absolute;left:50%;bottom:12%;z-index:100;transform:translate(-50%,10px);padding:8px 14px;border-radius:18px;background:#08030de8;border:1px solid #ffcf5c;color:#fff1b0;font-size:12px;opacity:0;transition:.15s;white-space:nowrap}.toast.show{opacity:1;transform:translate(-50%,0)}.loader{position:absolute;inset:0;z-index:120;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(circle,#2d0c43,#050008 68%);transition:.35s}.loader.hide{opacity:0;pointer-events:none}.loader img{width:72%;max-height:82%;object-fit:contain;filter:drop-shadow(0 0 22px #ff7c20)}.loader b{margin-top:8px;color:#ffe063;text-shadow:0 0 9px #ff6200}.layout-locate{outline:2px solid #7cf7ff!important;outline-offset:2px!important;box-shadow:0 0 0 2px #fff8,0 0 18px #00dfff!important}
@media(min-width:500px){.app{border-left:1px solid #42224e;border-right:1px solid #42224e}}

/* Keep dynamic score digits in the original printed windows, never on the running track. */
.center-bonus .jackpot-row{position:absolute;left:8.535%;top:22.42%;width:84.41%;height:19.27%;background:#160004;border-radius:3px;box-shadow:inset 0 0 5px #440600}
.jackpot-row b{width:100%;text-align:center;line-height:1;font:700 clamp(15px,6vw,24px)/1 ui-monospace,Menlo,monospace;letter-spacing:1px}
.machine-data{left:30.731738%;top:43.081312%;width:39.294710%;height:2.567760%;display:flex;justify-content:space-between;gap:0}
.machine-data b{width:28.85%;height:100%;background:#140004;line-height:1;border-radius:1px;font-size:clamp(7px,2.5vw,11px)}
.result-panel{visibility:hidden}


/* V5.8 — user supplied final machine 515x644. Only layout/number-window corrections. */
.machine-wrap{left:0;top:0;width:100%;height:auto;aspect-ratio:515/644}
.machine-art{width:100%;height:100%;object-fit:fill}

/* Outer running-light frame on the supplied machine. */
.ring-shell{left:24.66%;top:13.66%;width:50.68%;height:41.46%}

/* Do not print any dynamic number on the running-light cells. */
.ring-shell .lamp{font-size:0;color:transparent}

/* Central BONUS number window: opaque mask covers any baked/old digits first. */
.center-bonus{left:39.03%;top:27.95%;width:21.94%;height:22.20%}
.center-bonus .jackpot-row{
  left:3.5%;top:5.2%;width:93%;height:20.5%;
  background:#050006;
  border:1px solid rgba(255,181,49,.28);
  border-radius:2px;
  box-shadow:inset 0 0 7px #000,0 0 3px rgba(255,122,0,.28)
}
.jackpot-row b{
  font:800 clamp(18px,7.2vw,31px)/1 ui-monospace,Menlo,monospace;
  color:#ff2d2d;
  letter-spacing:2px;
  text-shadow:0 0 3px #fff2,0 0 7px #f00,0 0 12px #f00
}

/* Bottom three original score windows: cover baked digits, then draw live digits larger. */
.machine-data{
  left:38.83%;top:45.25%;width:31.84%;height:3.88%;
  display:flex;justify-content:space-between;gap:4.0%;z-index:14
}
.machine-data b{
  width:30.4%;height:100%;
  display:grid;place-items:center;
  background:#050006;
  border-radius:1px;
  color:#ff2929;
  font:800 clamp(9px,3.35vw,15px)/1 ui-monospace,Menlo,monospace;
  letter-spacing:.4px;
  text-shadow:0 0 3px #fff2,0 0 6px #f00,0 0 10px #f00;
  box-shadow:inset 0 0 5px #000
}

/* New physical control row. Transparent hit areas only; no duplicate drawn buttons. */
.machine-hotspot:nth-child(1){left:23.5%;top:63.10%;width:8.2%;height:4.7%}
.machine-hotspot:nth-child(2){left:34.2%;top:63.10%;width:8.2%;height:4.7%}
.machine-hotspot:nth-child(3){left:44.7%;top:63.10%;width:8.2%;height:4.7%}
.machine-hotspot:nth-child(4){left:55.1%;top:63.10%;width:8.2%;height:4.7%}
.machine-hotspot:nth-child(5){left:65.7%;top:63.10%;width:8.2%;height:4.7%}
.machine-hotspot:nth-child(6){left:76.2%;top:63.10%;width:8.2%;height:4.7%}

/* Betting keys on the new machine. */
.select-all-hotspot{left:78.8%;top:68.75%;width:13.1%;height:5.3%}
/* Bet amount is small and only in the top-right corner of each betting key. */
.bet .bet-badge{
  right:1px;top:1px;min-width:10px;height:10px;padding:0 2px;
  font:800 7px/10px ui-monospace,Menlo,monospace;
  color:#fff2b3;background:rgba(20,4,0,.84);
  border-radius:2px;text-shadow:0 1px 1px #000
}

/* V5.11 final pass */
.machine-wrap{left:50%;top:52%;width:min(100%,515px);height:auto;aspect-ratio:515/644;transform:translate(-50%,-50%);transform-origin:50% 50%}
.machine-art{object-fit:contain}.rabbit-origin-mask{display:none!important;opacity:0!important;background:transparent!important;border:0!important;box-shadow:none!important}.bonus-rabbit{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:515/644;object-fit:contain}
.physical-controls{z-index:24}.machine-hotspot{overflow:visible;border-radius:0;color:inherit;background:transparent}.machine-hotspot .physical-control-art{position:absolute;left:50%;top:50%;width:118%;height:170%;transform:translate(-50%,-50%);object-fit:contain;pointer-events:none;filter:drop-shadow(0 1px 1px #0008)}.machine-hotspot:active .physical-control-art{transform:translate(-50%,-48%) scale(.96);filter:brightness(1.15) drop-shadow(0 0 5px #ffd84f)}
.bet .bet-icon-anchor .bet-badge{left:66.6666667%;top:0;width:33.3333333%;height:33.3333333%;display:flex;align-items:flex-start;justify-content:flex-end;padding:0 1px 0 0;background:rgba(16,5,0,.72);border-radius:2px;color:#fff8d5;font-size:var(--stake-font,6px);line-height:1;text-shadow:0 1px 1px #000}
.player-hud{position:absolute;top:max(8px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);min-width:172px;max-width:64%;height:38px;display:flex;align-items:center;gap:7px;padding:4px 10px 4px 5px;border:1px solid rgba(255,216,94,.72);border-radius:20px;background:rgba(9,3,12,.78);box-shadow:0 0 9px #bd2cff55;pointer-events:none}.player-avatar{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#4b1b62;border:1px solid #ffd85e;color:#fff4bf;font-size:12px;font-weight:900;overflow:hidden}.player-avatar img{width:100%;height:100%;object-fit:cover}.player-meta{min-width:0;display:flex;flex-direction:column;line-height:1.1}.player-meta>b{font-size:11px;color:#fff2b0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-meta small{font-size:7px;color:#d8c7e2;white-space:nowrap}.player-meta i,.player-meta em{font-style:normal;color:#fff}@media (max-aspect-ratio:3/5){.machine-wrap{top:54%}}

/* V5.11 transparent-margin crop geometry: content itself is untouched. */
.machine-wrap{aspect-ratio:361/642}
.ring-shell{left:15.51%;top:13.39%;width:72.30%;height:41.59%}
.bonus-rabbit{aspect-ratio:361/642}


/* V5.12 — six physical control buttons: smaller, geometrically centered, never overlap.
   Click/hotspot geometry remains unchanged. */
.machine-hotspot .physical-control-art{
  left:50%;
  top:50%;
  width:86%;
  height:128%;
  transform:translate(-50%,-50%);
  object-fit:contain;
  object-position:center;
  pointer-events:none;
}
.machine-hotspot:active .physical-control-art{
  transform:translate(-50%,-48%) scale(.96);
}
