.autobet-mode-switch{flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin-bottom:14px;border-radius:22px;background:#020617}
.autobet-mode-switch button,.autobet-rule button{border:0;background:transparent;color:var(--muted,#94a3b8);font:600 12px var(--font-main,sans-serif);cursor:pointer;transition:background .15s,color .15s}
.autobet-mode-switch button{padding:10px 8px;border-radius:18px}
.autobet-mode-switch button[aria-pressed=true],.autobet-rule button[aria-pressed=true]{background:#334155;color:#f8fafc}
.autobet-mode-switch button:disabled,.autobet-panel :disabled{cursor:default;opacity:.55}
.autobet-panel,.autobet-advanced{display:flex;flex-direction:column;gap:8px;min-width:0}
.autobet-label{display:block;margin-bottom:5px;color:var(--muted,#94a3b8);font:500 12px var(--font-main,sans-serif)}
.autobet-panel .autobet-input{box-sizing:border-box;width:100%;min-width:0;min-height:36px;padding:8px 10px;border:1px solid #343d59;border-radius:8px;background:#020617;color:#f8fafc;font:600 12px var(--font-main,sans-serif);font-variant-numeric:tabular-nums;color-scheme:dark}
.autobet-panel input::placeholder{color:#94a3b8;opacity:1}
#autoCount:placeholder-shown{font-size:18px;padding-top:5px;padding-bottom:5px}
.autobet-advanced-toggle{display:flex;align-items:center;justify-content:space-between;padding:4px 0;border:0;background:transparent;color:var(--soft,#e2e8f0);font:600 12px var(--font-main,sans-serif);cursor:pointer}
.autobet-switch{width:30px;height:18px;padding:3px;box-sizing:border-box;border-radius:12px;background:#475569}
.autobet-switch::after{content:"";display:block;width:12px;height:12px;border-radius:50%;background:#f8fafc;transition:transform .15s}
[aria-checked=true] .autobet-switch{background:#16a34a}
[aria-checked=true] .autobet-switch::after{transform:translateX(12px)}
.autobet-advanced{padding-top:10px;border-top:1px solid #273449}
.autobet-rule{display:grid;grid-template-columns:auto auto minmax(52px,1fr);gap:3px;padding:3px;background:#020617;border:1px solid #343d59;border-radius:8px}
.autobet-rule button{padding:6px;border-radius:5px;font-size:11px;white-space:nowrap}
.autobet-unit{position:relative;min-width:0}
.autobet-unit input{padding-right:42px!important}
.autobet-rule input{border:0!important;border-radius:4px!important;padding:6px 20px 6px 6px!important;min-height:30px!important}
.autobet-unit span{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;font-size:11px;color:#94a3b8}
.autobet-rule .autobet-unit span{right:6px}
.autobet-unit input::-webkit-inner-spin-button{-webkit-appearance:none}
.autobet-unit input{appearance:textfield;-moz-appearance:textfield}
.autobet-status,.autobet-note{color:var(--muted,#94a3b8);font:500 11px/1.5 var(--font-main,sans-serif);font-variant-numeric:tabular-nums;padding:8px 10px;border:1px solid #273449;border-radius:8px;background:#0b1323}
.autobet-status{margin-bottom:8px}
.autobet-status:empty{display:none}
.autobet-scene{position:relative}
.autobet-result{position:absolute;top:12px;right:12px;z-index:10;padding:8px 12px;border:1px solid #275c3c;border-radius:8px;background:#091b17eb;color:#a7f3c0;font:700 12px var(--font-main,sans-serif);font-variant-numeric:tabular-nums;pointer-events:none}
.autobet-result[data-result=loss]{background:#261219eb;border-color:#69353f;color:#fca5a5}
.autobet-result[data-result=push]{background:#251e10eb;border-color:#66522a;color:#fde68a}
.autobet-footer{flex:0 0 auto;padding-top:10px;background:inherit}
.autobet-start{display:block;width:100%;min-height:42px;margin:0;padding:11px 12px;border:0;border-radius:8px;background:#1fff20;color:#062007;font:800 13px var(--font-main,sans-serif);cursor:pointer}
.autobet-start:hover{filter:brightness(1.06)}
.autobet-start:disabled{cursor:default;opacity:.6}
.autobet-layout [hidden]{display:none!important}
/* Keep the scene independent of the controls' content in both bet modes. */
#gameRoot .autobet-layout{grid-template-rows:minmax(0,1fr);min-height:0!important;overflow:hidden}
#gameRoot .autobet-left{display:flex;flex-direction:column;min-height:0;height:100%;overflow:hidden}
#gameRoot .autobet-scroll{display:flex;flex-direction:column;flex:1 1 0;height:auto;min-height:0;overflow-y:auto;padding-right:3px;overscroll-behavior:contain}
#gameRoot .autobet-left + div{min-height:0;overflow:hidden}
.is-autobet .autobet-manual-only{display:none!important}
.is-autobet .autobet-scene-manual-only{visibility:hidden;pointer-events:none}
.autobet-mode-switch button:focus-visible,.autobet-panel button:focus-visible,.autobet-start:focus-visible,.autobet-notice-close:focus-visible{outline:2px solid #94a3b8;outline-offset:2px}
.is-autobet .roulette-wheel-disc{transition:transform .25s ease-out}
.is-autobet .roulette-wheel-pocket{transition:none}
.is-autobet .baccarat-card-img-wrap{animation:none!important}
.is-autobet .plinko-slot.is-auto-result{outline:2px solid #e2e8f0;outline-offset:2px;filter:brightness(1.2)}
.is-autobet .baccarat-hand{position:relative}
.is-autobet .baccarat-player-hand::before,.is-autobet .baccarat-banker-hand::before{position:absolute;bottom:calc(100% + 14px);font:600 12px var(--font-main,sans-serif);color:#94a3b8}
.is-autobet .baccarat-player-hand::before{content:"Player"}
.is-autobet .baccarat-banker-hand::before{content:"Banker"}
.autobet-notice{box-sizing:border-box;position:fixed;inset:0;width:min(360px,calc(100vw - 32px));margin:auto;padding:24px;border:1px solid #334155;border-radius:16px;background:#111b2d;color:#e2e8f0;box-shadow:0 20px 65px #0006;font-family:var(--font-main,sans-serif)}
.autobet-notice::backdrop{background:#02061766}
.autobet-notice h2{font-size:17px;line-height:1.3;margin:12px 0 8px;font-weight:700}
.autobet-notice p{font-size:12px;line-height:1.65;color:#aab8cc;margin:0 0 18px}
.autobet-notice-icon{display:grid;place-items:center;width:32px;height:32px;background:#1fff2014;color:#81ed8b;border-radius:10px;font-size:25px;line-height:1}
.autobet-notice-close{position:absolute;right:12px;top:10px;border:0;background:transparent;color:#94a3b8;padding:4px 8px;font-size:22px;cursor:pointer}
@media(max-width:960px){
  /* Bet actions stay above the independently scrolling mobile controls. */
  #gameRoot .autobet-mobile-bet{flex:0 0 auto;width:100%;margin:0 0 10px}
  #gameRoot .autobet-left > :is(.autobet-footer,.mines-auto-footer,.chicken-auto-footer){flex:0 0 auto;padding:0 0 10px}
  #gameRoot .autobet-scroll > *{flex-shrink:0}
  #gameRoot #diceMsg{flex:0 0 auto;min-height:30px;line-height:1.4;white-space:normal}
  #gameRoot #diceMsg:empty{display:none}
  #gameRoot .blackjack-action-btn{aspect-ratio:auto;min-height:72px}
  #gameRoot .autobet-layout{grid-template-rows:minmax(300px,55%) minmax(240px,1fr)}
  .autobet-layout .roulette-table-shell{grid-template-rows:24px minmax(0,1fr);gap:4px}
  .autobet-layout .roulette-wheel{display:none}
  .autobet-layout .roulette-wheel-zone{padding:0}
  .autobet-layout .roulette-result-pill{position:static;transform:none;flex-direction:row;align-items:center;gap:8px}
  .autobet-layout .roulette-board-zone{padding-bottom:28px}
  .autobet-layout .roulette-board-wrap{--roulette-cell:28px;align-self:center}
  .autobet-layout .roulette-chip-badge{width:26px;height:26px}
  .autobet-layout .roulette-table-actions{bottom:0}
  .autobet-layout .plinko-board{min-height:0;padding:30px 6px 4px;gap:6px}
  .autobet-layout .plinko-pins{height:auto;min-height:0;flex:1}
  .autobet-layout .plinko-pin{width:8px;height:8px}
  .autobet-layout .plinko-slots-row{gap:2px;flex:0 0 auto}
  .autobet-layout .plinko-slot{font-size:8px;min-height:24px;border-radius:4px}
  .autobet-layout .blackjack-deck,.autobet-layout .baccarat-deck,.autobet-layout .poker-deck,.autobet-layout .hilo-deck,.autobet-layout .rps-deck{display:none}
  .autobet-layout .blackjack-felt-text,.autobet-layout .baccarat-felt-text{display:none}
  .autobet-layout .blackjack-zone,.autobet-layout .blackjack-hand{gap:4px}
  .autobet-layout .blackjack-dealer-zone{top:8px}
  .autobet-layout .blackjack-player-zone{bottom:8px}
  .autobet-layout .blackjack-total-box{min-width:38px;min-height:24px;padding:3px 8px;font-size:18px;border-radius:8px}
  .autobet-layout .blackjack-cards{min-height:0;padding:0}
  .autobet-layout .blackjack-card-img-wrap{width:44px}
  .autobet-layout .baccarat-play-area{inset:12px 8px;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);gap:6px}
  .autobet-layout .baccarat-hand{gap:8px}
  .autobet-layout .baccarat-total-box{min-width:44px;min-height:30px;padding:4px 10px;font-size:22px}
  .autobet-layout .rps-choice-grid{grid-template-columns:repeat(3,minmax(0,100px));justify-content:center}
}
@media(prefers-reduced-motion:reduce){.autobet-switch::after,.is-autobet .roulette-wheel-disc{transition:none}}
