/* 2026-10-08 experience changes; settlement math remains v7. */
.game{--brand-height:calc(57px + env(safe-area-inset-top,0px));--road-height:64px;--notice-height:0px}
.statusbar{padding-top:calc(7px + env(safe-area-inset-top,0px));height:var(--brand-height)}
.game::before,.scene-labels{top:calc(var(--brand-height) + var(--notice-height) + var(--road-height))}
.game:has(.fake-scene)::after{top:calc(var(--brand-height) + var(--notice-height) + var(--road-height))}


.road-panel{display:block;margin-top:calc(var(--brand-height) + var(--notice-height));height:var(--road-height);padding:5px 10px;border-bottom:1px solid #c5ad87;z-index:35;flex:none}
.road-heading{margin-bottom:3px}.road-heading>span:first-child{font-size:9px}.road-heading #road-stats{display:none}
.road-grid-button{display:block;width:100%;padding:0;background:transparent;text-align:left}
.road{height:39px;display:flex;gap:5px;background:none;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;grid-template-rows:none}
.history-chip{position:relative;flex:0 0 40px;max-width:none;min-width:40px;border-radius:6px;gap:0}.history-chip b{font-size:15px;line-height:17px}.history-chip small{font-size:7px;line-height:11px}.history-chip.fake{background:#ffe270;color:#714408;border:2px solid #b58728}.streak-badge{position:absolute;right:0;top:0;font-size:6px;font-style:normal;background:#fff7d8;color:#544733;border-radius:3px;padding:1px 2px}.history-chip:has(.streak-badge) b{padding-left:3px;align-self:flex-start}
.road-large{height:auto;display:grid;grid-template-columns:repeat(6,1fr);max-height:320px;overflow:auto}.road-large .history-chip{min-width:0}
.stage{min-height:120px}.controls{margin:0 8px;padding:3px 6px calc(15px + env(safe-area-inset-bottom,0px));z-index:50;flex:none}
.stake-heading{margin:0;font-size:9px}.funds-row{height:32px;grid-template-columns:44px 1fr 44px;gap:6px}.funds-row .bet-button{display:flex;justify-content:center;padding:3px}.funds-row .bet-button strong{font-size:18px}.stake-edge{font-size:10px}
.chip-bar{display:flex;gap:5px;overflow-x:auto;scrollbar-width:thin;padding:7px 1px 4px;width:100%;position:relative;z-index:51}
.chip-bar button{flex:0 0 44px;min-height:34px;padding:3px 5px;border-radius:18px;border:2px solid #927959;background:#f9e8c8;color:#604c34;font-size:11px;font-weight:bold}
.chip-bar button.active{border-color:#1c6548;background:#287b56;color:#fff;box-shadow:0 0 0 2px #fff3c4 inset}.chip-bar button:disabled{opacity:.4}.chip-bar button.active:disabled{opacity:.7}
.bet-heading{min-height:24px;padding:2px 0}.bet-heading #prompt{font-size:9px}#prompt.bet-confirmed{padding:3px 6px;font-size:9px}
.choice .return-preview{display:block;font-size:10px;line-height:1.1;font-weight:900;color:white;margin-top:3px}.choice .return-preview span,.choice .return-preview strong{display:block}.choice .return-preview span{font-size:8px}.choice .return-preview strong{font-size:14px}.side-choices .choice .return-preview span{font-size:7px}.side-choices .choice .return-preview strong{font-size:11px}.side-choices #fake .return-preview span,.side-choices #fake .return-preview strong{display:inline;margin:0 2px}.choice.fake .return-preview{color:#453111}
.choice.low-return{filter:saturate(.85)}.choice.low-return.selected{filter:none}.choice.low-return .payout{font-size:8px;padding:2px 4px;background:transparent;opacity:.7}.choice.odds-pending .payout,.choice.odds-pending .return-preview{opacity:.4}
.live-choices>.choice{height:116px;min-height:116px}.side-choices{height:116px}.choice-icon{font-size:29px;line-height:27px;height:27px}


.seed-box{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap!important;overflow-x:auto;overflow-wrap:normal!important;word-break:normal!important;user-select:all;max-width:100%;font-size:12px;padding:12px;background:#e9e5d8;border-radius:6px}
.play-diagram{width:100%;height:auto}.play-diagram text{font-family:Arial,sans-serif;fill:#3d5b43;text-anchor:middle;font-size:11px}.play-diagram .diagram-number{font-size:29px;font-weight:bold}.detailed-rules{margin:16px 0;border:1px solid #c0c9ac;border-radius:8px;padding:12px}.detailed-rules summary{font-weight:bold;cursor:pointer}
.sync-overlay{position:absolute;inset:calc(var(--brand-height) + var(--notice-height)) 0 0;background:#f5e8cba6;backdrop-filter:blur(2px);z-index:80;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#304e3e;pointer-events:all}.sync-overlay[hidden]{display:none}.sync-overlay b{font-size:19px}.sync-overlay span{font-size:12px}
.lcd strong{font-variant-numeric:tabular-nums;letter-spacing:3px}
@media(max-height:650px){.game{--road-height:59px;--notice-height:0px}.road-panel{padding:4px 8px}.road{height:35px}.controls{padding-bottom:calc(7px + env(safe-area-inset-bottom,0px))}.live-choices>.choice{height:97px;min-height:97px}.side-choices{height:97px}.choice b{font-size:13px}.choice-icon{height:22px;line-height:21px;font-size:24px}.chip-bar{padding:5px 0 3px}.chip-bar button{min-height:30px;flex-basis:40px;font-size:10px}.bet-heading{min-height:23px}.stage{min-height:100px}.scene-labels .comparison{top:31%;width:38%;left:-5%}.scene-labels .comparison .monitor-screen strong{font-size:28px}.machine{height:52%;max-width:66%}.customer{width:37%}.machine .lcd strong,.machine-timer #countdown{font-size:27px}}
@media(max-width:350px){.statusbar .game-logo{width:76px}.statusbar{gap:4px;padding-left:6px;padding-right:6px}.wallet{padding:4px}.wallet b{font-size:11px}.wallet::before{display:none}.header-table #table-wins{font-size:7px}.choice .return-preview strong{font-size:12px}.side-choices .choice .return-preview strong{font-size:9px}.side-choices .choice b{font-size:9px}.bet-heading #prompt{font-size:8px}}
.chip-bar{display:grid;grid-template-columns:repeat(var(--chip-count,9),minmax(0,1fr));gap:3px;overflow:visible}.chip-bar button{min-width:0;padding:3px 0;font-size:10px;min-height:34px;white-space:nowrap}.chip-bar::-webkit-scrollbar{height:3px}
@media(max-width:350px){.chip-bar button{font-size:9px}}
/* Explicit confirmation: a persistent tick and a high-contrast selected border. */
.live-choices .choice{position:relative;overflow:visible}
.live-choices.has-bet .choice:not(.selected):not(.pending-choice){opacity:1}
.live-choices .choice.selected,.live-choices .choice.selected:disabled{opacity:1;outline:3px solid #fff9dc;outline-offset:1px;border-color:#193e30;box-shadow:0 0 0 5px #193e30,inset 0 2px #fff7,0 6px #293d32;z-index:2}
.live-choices .choice.selected::after,.live-choices .choice.pending-choice::after{content:'✓';position:absolute;right:-5px;top:-8px;width:22px;height:22px;display:grid;place-items:center;border:2px solid #fff9dc;border-radius:50%;background:#173e2d;color:white;font:900 16px/1 Arial;box-shadow:0 2px 3px #0005;z-index:3}
.live-choices .choice.pending-choice{opacity:1;outline:3px dashed #fff9dc;outline-offset:1px;z-index:3}
.live-choices .choice.pending-choice::after{content:'…';background:#725225}
#prompt.bet-confirmed{font-size:12px;font-weight:900;letter-spacing:.15px;padding:5px 10px;background:#173e2d;color:#fff9dc;border:2px solid #fff4bd;box-shadow:0 1px 3px #0004;min-width:75%;text-align:center}
.chip-bar button.active{position:relative;border-color:#173e2d;background:#173e2d;box-shadow:0 0 0 2px #fff3c4 inset;font-weight:900;display:flex;align-items:center;justify-content:center;gap:2px}
.chip-bar button.active::before{content:'✓';font-size:9px;font-weight:900}
@media(max-width:350px){.bet-heading #prompt.bet-confirmed{font-size:11px}.live-choices .choice.selected::after,.live-choices .choice.pending-choice::after{width:19px;height:19px;font-size:14px;right:-4px;top:-7px}.chip-bar button.active::before{font-size:8px}}

/* Keep compact side-option returns inside their buttons on narrow screens. */
.side-choices .choice .return-preview span,.side-choices .choice .return-preview strong{display:inline;font-size:9px;margin:0 2px}
.live-choices .choice:disabled{opacity:1;cursor:default}
#prompt.bet-confirmed{font-size:10px;line-height:1.35;max-width:100%;min-width:0}
@media(max-width:350px){.bet-heading #prompt.bet-confirmed{font-size:9px}}

/* Locked options keep readable returns, with a distinct disabled treatment. */
.live-choices .choice:disabled:not(.selected){filter:grayscale(.7) saturate(.35);border-style:dashed;box-shadow:inset 0 0 0 1px #4a494b66;cursor:not-allowed}
.result.pending{color:#3e6072;background:#fff1cb}
.result[hidden]{display:none}
.stage.advancing .result{visibility:hidden}

/* Readable total return throughout FAKE, above the existing action layers. */
.fake-return{position:absolute;top:calc(var(--brand-height) + var(--notice-height) + var(--road-height) + 3px);left:50%;translate:-50% 0;z-index:70;max-width:calc(100% - 16px);padding:4px 10px;border:2px solid #365a42;border-radius:8px;background:#fff4d9;color:#244e34;box-shadow:0 2px 5px #0004;font-size:12px;font-weight:900;line-height:16px;text-align:center;pointer-events:none;font-variant-numeric:tabular-nums;white-space:nowrap}
.fake-return[hidden]{display:none}.fake-return.lose{color:#814c36;border-color:#956b4e}
@media(max-width:350px){.fake-return{font-size:10px;padding:3px 7px;line-height:14px}}

/* Keep disabled chips opaque so desk artwork cannot show through the label. */
.chip-bar button:disabled{opacity:1;filter:grayscale(.7);background:#eee2ca;color:#807567;border-color:#b4a48e;border-style:dashed}
.chip-bar button.active:disabled{opacity:1;background:#435448;color:#fff8df}
@media(max-width:350px){}


/* v9: information stays in the scene's own bounds, independently of illustration scale. */
.game{--notice-height:0px}
.stage{min-height:210px;flex:1;overflow:hidden}
.stage .scene-labels{inset:0;z-index:22}
.stage .machine{width:280px;height:245px;max-width:none;aspect-ratio:auto;left:60%;bottom:16px;transform:none}
.stage .machine .lcd,.stage .machine .machine-timer{left:18%;top:21%;width:64%;height:82px;min-height:82px;padding:5px 8px;border:3px solid #75859d;border-radius:9px;background:#29374b;box-shadow:inset 0 0 0 2px #182639}
.stage .machine .lcd strong,.stage .machine-timer #countdown{font-size:52px;line-height:54px;flex-shrink:0;letter-spacing:2px}
.stage .machine-label{font-size:9px;line-height:13px;letter-spacing:.2px;flex-shrink:0;white-space:nowrap}
.stage .machine-timer #round-label{font-size:12px}
.stage .lcd .meter,.stage .lcd .meter-caption{display:none}
.stage .scene-labels .comparison{left:5px;top:auto;bottom:42px;width:31%;height:auto;aspect-ratio:1.18;transform:none;min-height:0}
.stage .scene-labels .comparison .monitor-screen strong{font-size:38px;line-height:40px}
.controls{background:linear-gradient(#eed3a8f5,#e8c995);border-radius:12px 12px 0 0;padding:5px 6px calc(12px + env(safe-area-inset-bottom,0px));isolation:isolate;z-index:50}
.chip-bar{z-index:2;background:#eed3a8;border-radius:20px}
.live-choices .choice[aria-disabled=true]:not(.selected){filter:grayscale(.7) saturate(.35);border-style:dashed;box-shadow:inset 0 0 0 1px #4a494b66;cursor:default}
#odd,#even{touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.result{bottom:5px;padding:5px 14px;font-size:21px}.result small{font-size:12px}
@media(max-height:720px){
 .stage{min-height:200px}.stage .machine{width:250px;height:220px;bottom:10px}
 .stage .customer{height:52%;width:auto;max-height:180px;top:1%}.stage .queue{max-height:95px}
 .controls{padding-top:3px;padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
 .live-choices>.choice{height:104px;min-height:104px}.side-choices{height:104px}
 .stage .scene-labels .comparison{bottom:32px;width:31%}
 .stage .machine .lcd strong,.stage .machine-timer #countdown{font-size:48px;line-height:50px}
}
@media(max-width:350px){
 .stage .machine{width:225px;height:205px;left:59%;bottom:12px}
 .stage .machine .lcd,.stage .machine .machine-timer{left:17%;width:66%;height:80px;min-height:80px}
 .stage .machine .lcd strong,.stage .machine-timer #countdown{font-size:48px;line-height:50px}
 .stage .machine-label{font-size:8px}.stage .scene-labels .comparison{left:2px;width:32%;bottom:32px}
 .stage .scene-labels .comparison .monitor-screen strong{font-size:34px;line-height:36px}
}
.stage .scene-labels .comparison .monitor-screen{top:17%;height:54%;gap:1px;overflow:visible}
.stage .scene-labels .comparison .monitor-screen>span{font-size:6px;line-height:8px;flex-shrink:0}
.stage .scene-labels .comparison .monitor-screen strong{flex-shrink:0}
/* 58px glyphs retain at least 40px of visible numeral height on the smallest layout. */
.stage .machine .lcd,.stage .machine .machine-timer{height:94px;min-height:94px}
.stage .machine .lcd strong{font-size:58px;line-height:60px}
.stage .machine.alarm .lcd strong{font-size:34px;line-height:60px}

/* v9 configurable chips and table limits. */
.stake-heading{display:flex;align-items:center;justify-content:space-between;line-height:13px;min-height:13px;gap:6px}
input.bet-button{display:block;width:100%;min-width:0;text-align:center;appearance:textfield;-moz-appearance:textfield;box-sizing:border-box;font:800 19px/1.1 system-ui;outline-offset:2px}
input.bet-button::-webkit-inner-spin-button,input.bet-button::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* v10: two readable displays fill the desk without touching the chip rail. */
.stage .machine{left:67%;width:min(260px,65vw)}
.stage .scene-labels .comparison{left:0;bottom:36px;width:43%;aspect-ratio:1.18}
.stage .scene-labels .comparison .monitor-screen{top:16%;height:56%;gap:2px}
.stage .scene-labels .comparison .monitor-screen>span{font-size:8px;line-height:10px;letter-spacing:0;white-space:nowrap}
.stage .scene-labels .comparison .monitor-screen strong{font-size:60px;line-height:62px;letter-spacing:0}
@media(max-width:390px){
 .stage .scene-labels .comparison .monitor-screen strong{font-size:52px;line-height:54px}
 .stage .scene-labels .comparison .monitor-screen>span{font-size:7px;line-height:9px}
}
@media(max-width:350px){
 .stage .scene-labels .comparison{bottom:30px}
 .stage .scene-labels .comparison .monitor-screen strong{font-size:46px;line-height:48px}
 .stage .machine .lcd,.stage .machine .machine-timer{left:18%;width:64%}
}
/* On wide, short screens leave the painted 1–100 sign above the monitor. */
@media(min-width:391px) and (max-height:720px){.stage .scene-labels .comparison{bottom:6px}}


/* Scene depth follows the painted countertop rather than the stage height. */
.customer-depth{position:absolute;inset:0;z-index:10;pointer-events:none;clip-path:inset(0 0 max(0px,calc(100% - var(--counter-y))) 0)}
.stage .customer{top:var(--counter-y);bottom:auto;width:min(44%,190px);height:auto;max-height:none;translate:-50% -77%}
.stage.fake-scene #customer{visibility:hidden}
.stage .fake-target-plane{clip-path:inset(0 0 max(0px,calc(100% - var(--counter-y))) 0)}
@media(max-height:720px){.stage .customer{top:1%;bottom:auto;height:52%;max-height:180px;width:auto;translate:-50% 0}}

/* Menu stays attached to the top-right control, inside the game viewport. */
.panel-dismiss{position:absolute;inset:var(--brand-height) 0 0;z-index:89;background:transparent}
.game-panel{position:absolute;z-index:90;top:calc(var(--brand-height) + 5px);right:8px;width:min(360px,calc(100% - 16px));max-height:calc(100% - var(--brand-height) - 16px);display:flex;flex-direction:column;overflow:hidden;padding:14px;background:#fff4dc;color:#354837;border:2px solid #907857;border-radius:10px;box-shadow:0 5px 16px #3a302b4d;outline:none}
.game-panel[hidden],.panel-dismiss[hidden]{display:none}
.game-panel.menu-root{width:min(260px,calc(100% - 16px))}
.game-panel .modal-heading{flex:none;gap:8px;margin:0 0 10px;padding-bottom:10px;border-bottom:1px solid #d9c49e}
.game-panel .modal-heading>div{flex:1;min-width:0}
.game-panel .modal-heading small{display:none}
.game-panel .modal-heading h2{font-size:18px;letter-spacing:0;margin:0}
.game-panel .modal-heading button,.game-panel .menu-home{width:32px;height:32px;flex:none;display:grid;place-items:center;padding:0;border-radius:7px;background:#e6d4af;color:#43533c;box-shadow:none}
.game-panel .modal-heading button[hidden],.game-panel .menu-home[hidden]{display:none}
.game-panel #menu-back{font-size:30px}
.game-panel #modal-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:thin}
.game-panel .settings-row{min-height:42px;margin:0;padding:7px 0;font-size:12px;border-bottom:1px solid #e6d8ba}
.game-panel .settings-row button{min-width:44px;min-height:28px;padding:5px 8px;border-radius:6px;background:#dce6bf;color:#325338;font-size:11px}
.game-panel .menu-links{gap:0;margin-top:8px}
.game-panel .menu-links button{min-height:40px;margin:0;padding:9px 4px;background:transparent;border:0;border-radius:0;border-bottom:1px solid #e6d8ba;box-shadow:none;font-size:12px;color:#3c4e38}
.game-panel .menu-links button:hover{background:#eedfba}
.game-panel .menu-links button:last-child{border-bottom:0}
.game-panel #modal-body .fine-print{font-size:10px;line-height:1.4;margin:0 0 5px;color:#7e735f}
.game-panel :focus-visible{outline:2px solid #326148;outline-offset:2px}
#settings[aria-expanded=true]{background:#e8d7ae;color:#344737;border-color:#806e52}
@media(max-height:650px){.game-panel{padding:10px}.game-panel .modal-heading{margin-bottom:6px;padding-bottom:6px}.game-panel .menu-links button{min-height:37px}.game-panel .settings-row{min-height:38px}}
