:root{color-scheme:dark;--bg:#000;--panel:#262626;--red:#f34542;--yellow:#fff700;--muted:#8c8c8c;--button:#363636;--win:#7aff7a;--text:#fff}*{box-sizing:border-box}body,html{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Avenir Next,Segoe UI,sans-serif;overflow-x:hidden}button,input{font:inherit;color:inherit;touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed}.stage{min-height:100vh;display:grid;place-items:center;padding:24px 16px;overflow-x:hidden}.mobile-bar{display:none}.game{width:min(1170px,100%);min-height:650px;display:grid;grid-template-columns:350px minmax(0,1fr);grid-gap:20px;gap:20px;position:relative;min-width:0}.panel{background:var(--panel);border-radius:10px;height:610px;padding:16px 10px;display:flex;flex-direction:column;gap:20px;overflow:auto}.amount,.auto-block,.field,.pair,.panel-top,.segment{width:100%}.panel-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.balance{width:80px;height:40px;border-radius:10px;background:#000;padding:6px 10px;display:flex;flex-direction:column;justify-content:center;gap:2px}.balance span{font-size:10px;line-height:1.2}.balance strong{font-size:12px;font-weight:800;line-height:1.2}.segment{height:32px;background:#000;border-radius:100px;padding:4px;display:flex}.segment.mode{width:154px;height:40px}.segment button{flex:1 1;border:0;background:transparent;border-radius:100px;font-size:12px;font-weight:800}.segment button.active{background:var(--red)}.fields{gap:5px}.field,.fields{display:flex;flex-direction:column}.field{gap:6px}.amount.on{border-width:2px}.auto-block label,.field label{font-size:12px;font-weight:800}.amount,.text-input{height:32px;background:#000;border:1px solid var(--red);border-radius:10px;display:flex;align-items:center;padding:0 8px;gap:4px}.amount input,.grow,.text-input input{flex:1 1;min-width:0;height:100%;outline:none}.amount input,.grow,.inf,.max,.text-input input{border:0;background:transparent;font-size:12px;font-weight:800}.inf,.max{padding:0}.inf{width:28px;height:22px;border-radius:100px}.inf.on{color:#111;background:var(--yellow)}.pair{display:flex;gap:10px}.bet,.choice,.ghost{height:32px;border-radius:100px;font-size:12px;font-weight:800}.ghost{flex:1 1;background:transparent;border:1px solid var(--yellow);color:#fff}.ghost.quiet{border-color:transparent;background:var(--button);color:var(--muted)}.ghost.quiet:disabled{opacity:1}.bet{width:100%;border:0;background:var(--button);color:var(--muted);flex:none}.bet-stack{flex-direction:column;gap:8px}.bet-row,.bet-stack{display:flex;width:100%}.bet-row{align-items:center;gap:10px}.bet-row .bet{margin-top:0;flex:1 1;width:auto}.notice{margin:0;color:var(--red);font-size:12px;line-height:1.3}.expand{display:none;width:32px;height:32px;flex:none;padding:0;border-radius:10px;border:1px solid var(--red);background:#000;place-items:center}.expand img{display:block;width:16px;height:16px}.expand.open img{transform:rotate(180deg)}.advanced-row{justify-content:space-between;gap:8px;min-height:20px;font-size:12px;font-weight:800}.advanced-row,.switch{display:flex;align-items:center}.switch{box-sizing:border-box;width:36px;height:20px;flex:none;padding:1px;border:1px solid #fff;border-radius:15px;background:transparent}.switch span{width:16px;height:16px;border-radius:15px;background:#fff}.switch.on{background:var(--red)}.switch.on span{margin-left:auto}.fields>.ghost{flex:none;width:100%}.bet.ready{background:var(--yellow);color:#111}.bet.stop{background:var(--red);color:#fff}.choice{flex:1 1;border:0;background:#000;border-radius:100px}.choice.on{background:var(--red)}.auto-block{display:flex;flex-direction:column;gap:6px}.choice-row,.stop-row{display:flex;gap:8px;align-items:center}.pct,.stop-row .text-input{flex:1 1}.pct input,.stop-row input{width:100%}.board-wrap{min-height:610px;min-width:0;padding:26px 22px 0;display:flex;flex-direction:column;justify-content:space-between;gap:12px;position:relative}.grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-gap:8px;gap:8px;width:min(664px,100%);margin:0 auto}.tile{width:100%;aspect-ratio:1;height:auto;border:0;border-radius:10px;background:var(--panel);color:#fff;font-size:24px;font-weight:800;position:relative;padding:0}.tile:hover:not(:disabled){background:#333}.tile.selected,.tile.selected:hover:not(:disabled){background:var(--red)}.tile.miss,.tile.miss:hover:not(:disabled){background:#000;color:var(--red);border:1px solid var(--panel)}.tile.won,.tile.won:hover:not(:disabled){background:#000;border:2px solid var(--win);box-shadow:inset 0 0 18px rgba(0,255,0,.28)}.tile .gem{width:50px;height:50px;object-fit:contain;pointer-events:none}.tile .num{position:absolute;inset:0;display:grid;place-items:center;text-shadow:0 1px 2px rgba(0,0,0,.65)}.tools{position:absolute;top:0;right:0;display:flex;flex-direction:column;gap:10px}.tool{width:34px;height:34px;border-radius:10px;background:#000;border:1px solid var(--red);display:grid;place-items:center;padding:0}.tool.off{border-color:#363636;opacity:.55}.tool img{display:block}.payout{--count:2;display:flex;flex-direction:column;gap:8px;width:min(664px,100%);margin:0 auto;min-width:0;max-width:100%}.payout-empty{height:60px}.hint{min-height:60px;border-radius:10px;background:var(--panel);display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;font-weight:800}.payout-row{display:flex;align-items:stretch;gap:8px;width:100%;min-width:0;overflow:hidden}.gemcount,.payout-row.hits,.pill{height:60px;border-radius:10px;background:var(--panel)}.gemcount,.pill{flex:1 1;min-width:0;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 4px;overflow:hidden;font-size:12px;font-weight:800;line-height:1;white-space:nowrap;color:#fff}.payout-row.hits .gemcount{height:100%;border-radius:0;background:transparent;gap:6px}.payout-row.hits .gemcount:first-child{border-radius:10px 0 0 10px}.payout-row.hits .gemcount:last-child{border-radius:0 10px 10px 0}.gemcount.on,.pill.on{background:var(--red)}.gemcount img{width:24px;height:24px;flex:0 0 auto;object-fit:contain}.win{position:absolute;left:50%;top:46%;transform:translate(-50%,-50%);width:min(200px,calc(100% - 24px));height:105px;display:flex;flex-direction:column;padding:0;border-radius:6px;border:3px solid #b4b4b4;overflow:hidden;background:#000;z-index:3}.win.under{border-color:#b4b4b4}.win.even{border-color:#ff774a}.win.over{border-color:#00ff00}.win-mult{flex:1 1;display:grid;place-items:center;margin:0;color:#000;font-size:27px;font-weight:800;line-height:1.2}.win.under .win-mult{background:#b4b4b4}.win.even .win-mult{background:#ff774a}.win.over .win-mult{background:#00ff00}.win-foot{flex:1 1;display:flex;align-items:center;justify-content:center;gap:15px;background:#000;color:#fff;font-size:18px;font-weight:800}.win-hits{display:inline-flex;align-items:center;gap:6px}.win-hits img{width:24px;height:24px;object-fit:contain}.modal-back{position:fixed;inset:0;background:rgba(0,0,0,.62);display:grid;place-items:center;z-index:5;padding:16px}.modal{width:min(420px,100%);max-height:calc(100vh - 32px);overflow:auto;background:#1a1a1a;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:12px}.modal-head{justify-content:space-between}.modal h2,.modal-head{display:flex;align-items:center}.modal h2{margin:0;gap:8px;font-size:16px}.modal-x{width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:#fff;font-size:22px;line-height:1}.fair-tabs{display:flex;justify-content:center;gap:22px}.fair-tabs button{height:auto;padding:2px 0 6px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--muted);font-size:14px;font-weight:700}.fair-tabs button.active{color:#fff;border-bottom-color:#fff}.modal label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800}.modal input{height:40px;width:100%;border-radius:8px;border:0;background:#000;padding:0 12px;font-size:13px}.copy-field,.inline-field,.nonce-step{display:flex;align-items:center;min-width:0;background:#000;border-radius:8px}.copy-field{position:relative}.copy-field input,.inline-field input{width:auto;flex:1 1;min-width:0;background:transparent}.copy-field button,.nonce-step button{width:36px;height:40px;flex:none;border:0;background:transparent;color:#fff}.copied{position:absolute;right:40px;top:50%;transform:translateY(-50%);background:#1f8f3a;color:#fff;border-radius:6px;padding:2px 8px;font-size:12px;font-weight:700}.inline-field{gap:8px;padding-right:4px;background:transparent}.inline-field input{background:#000}.modal .change{height:40px;flex:none;border:0;border-radius:8px;background:var(--yellow);color:#111;padding:0 14px;font-size:13px;font-weight:800}.modal .change:disabled{opacity:.45}.modal .rotate{height:40px;border:0;border-radius:8px;background:#2a2a2a;font-weight:800}.modal .rotate:disabled{opacity:.55}.nonce-step span{flex:1 1;text-align:center;font-size:14px;font-weight:700}.verify-board,.verify-empty{border:2px solid var(--red);border-radius:10px}.verify-empty{min-height:148px;display:grid;place-items:center;padding:16px;text-align:center;font-size:14px;font-weight:700}.verify-board{display:grid;grid-template-columns:repeat(8,1fr);grid-gap:4px;gap:4px;padding:8px;background:#111}.vcell{position:relative;aspect-ratio:1;display:grid;place-items:center;border-radius:4px;background:#1c1c1c;font-size:11px;font-weight:800}.vcell.drawn{background:#063}.vcell img{position:absolute;width:86%;height:86%;object-fit:contain}.vcell span{position:relative}.modal .verify-note{margin:0;color:var(--muted);font-size:12px;line-height:1.4}@media (max-width:900px){.stage{padding:0;align-items:start}.game{min-height:0;grid-template-columns:1fr;gap:12px;padding:12px 12px 24px}.mobile-bar{display:block;position:absolute;top:12px;left:12px;z-index:2}.panel .balance{display:none}.board-wrap{order:0;min-height:0;padding:60px 0 0}.panel{order:1;height:auto;overflow:visible;gap:10px}.panel-top{display:contents}.panel>.bet-stack{order:1}.panel>.bet-row{order:1;margin-top:0}.panel>.pair{order:2}.panel>.fields{order:3}.panel .mode{order:4;width:100%;height:32px}.expand{display:grid}.game.panel-open .grid,.game.panel-open .payout{display:none}.game.panel-open .board-wrap{min-height:0;height:48px;padding:0}.fields{display:grid;grid-template-columns:1fr 1fr;grid-gap:10px;gap:10px}.fields>*{grid-column:1/-1}.amount,.field,.fields>*,.text-input{min-width:0}.fields:has(.count-field) .amount-field{grid-column:1;grid-row:1}.fields:has(.count-field) .count-field{grid-column:2;grid-row:1}.fields:has(.count-field) .keypad{grid-row:2}.fields:has(.count-field) .risk-field{grid-row:3}.keypad{display:grid;grid-column:1/-1;grid-template-columns:repeat(12,1fr);grid-gap:6px;gap:6px}.keypad .key{display:grid;place-items:center;grid-column:span 2;height:44px;border:0;border-radius:8px;background:#fff;color:#111;font-size:18px;font-weight:800}.keypad .key svg{width:22px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}.keypad .key.wide{grid-column:span 3;font-size:15px}.keypad .key:disabled{opacity:.35}.grid{width:100%}.grid,.payout{gap:4px}.hint,.payout-empty{min-height:30px;height:30px}.payout-row{gap:4px}.payout-row.hits{height:30px}.gemcount,.pill{height:30px;gap:1px;padding:0;font-size:clamp(7px,calc(36px / var(--count)),11px);border-radius:8px}.gemcount img{width:clamp(8px,calc(48px / var(--count)),24px);height:clamp(8px,calc(48px / var(--count)),24px)}.payout{container-type:inline-size}.payout.scroll{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}.payout.scroll::-webkit-scrollbar{display:none}.payout.scroll .payout-row{width:max-content;min-width:100%;overflow:visible}.payout.scroll .gemcount,.payout.scroll .pill{flex-grow:0;flex-shrink:0;flex-basis:calc((100cqi - 36px) / 5);width:calc((100cqi - 36px) / 5);min-width:calc((100cqi - 36px) / 5)}.amount input,.grow,.text-input input,.tile{font-size:16px}.tile .gem{width:70%;height:70%}.tools{top:12px;right:12px;flex-direction:row}}@media (prefers-reduced-motion:reduce){.tile{transition:none}}