/* TZ420 Candidate 3: global containment + responsive layout hardening */
html{overflow-x:hidden;scroll-behavior:smooth}body{overflow-x:hidden;min-width:0}img,svg,canvas,video{max-width:100%;height:auto}button,a,input,select,textarea{max-width:100%}pre,code{white-space:pre-wrap;overflow-wrap:anywhere}.top>*{min-width:0}.top{min-height:72px;height:auto;gap:14px;flex-wrap:wrap}.container,.platform-shell,.retro-wrap,.admin-main{min-width:0}.panel,.casino-stage,.v174-panel,.v174-glass,.info-panel,.game-card,.quick-card,.cabinet,.arcade-machine{min-width:0;max-width:100%}.panel:not(.hidden){isolation:isolate}.hidden{display:none!important}
/* Home is a panel application, not one giant document. JS enhances this; no-JS still reads normally. */
.tz-home .home-nav{display:flex;gap:6px;align-items:center;overflow-x:auto;max-width:min(56vw,720px);scrollbar-width:thin}.tz-home .home-nav a{white-space:nowrap;padding:9px 11px;border-radius:10px}.tz-home .home-nav a[aria-current="page"]{background:#142438;color:#70f6aa}.home-viewbar{display:flex;gap:8px;overflow-x:auto;margin:0 auto 18px;padding:4px 0;scrollbar-width:thin}.home-viewbar button{white-space:nowrap}.home-panel-hidden{display:none!important}.home-section{scroll-margin-top:95px}.quick-grid,.game-directory,.help-grid,.split-section{align-items:stretch}.game-card,.quick-card,.info-panel{overflow:hidden}.game-card p,.quick-card small,.info-panel p,.help-grid p{overflow-wrap:anywhere}
/* Game page: one game is the stage; navigation and help never bleed into it. */
.game-title{align-items:center}.game-switcher{position:relative;z-index:5;margin:0 0 12px;padding:8px;border:1px solid #24324a;border-radius:16px;background:#080d16;overscroll-behavior-inline:contain}.game-switcher a{flex:0 0 auto}.game-help{position:relative;z-index:4;overflow:hidden;margin-bottom:14px}.game-help[open]{background:#0b121e}.game-help p{max-width:78ch}.casino-stage{contain:layout paint;overflow:hidden}.controls,.blackjack-actions,.bet-packages,.horse-picks,.lotto-packages,.roulette-packages,.choice-row,.chips{min-width:0}.controls>*{min-width:0}.playing-card{flex:0 0 auto}.v169-machine-nav{overflow-x:auto;overscroll-behavior-inline:contain}.v169-machine-tab{min-width:170px}.v169-machine-body>*{min-width:0}.v169-reels{min-width:0}.v169-feature-overlay{z-index:40}
/* Arcade overlays behave as panels, not content leaking through the page. */
.arcade-overlay{position:fixed!important;inset:0!important;z-index:200!important;overflow:auto!important;padding:clamp(12px,3vw,32px)!important;background:#02050be8!important;overscroll-behavior:contain}.arcade-overlay.hidden{display:none!important}.arcade-machine,.prize-counter{width:min(980px,100%)!important;margin:0 auto!important;max-height:none!important;overflow:visible!important}.machine-controls{display:flex;flex-wrap:wrap;gap:10px}.machine-controls button{min-width:48px;min-height:44px}.cabinet-grid{grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr))!important}.cabinet{overflow:hidden}.cab-screen{overflow:hidden}
/* Admin: workspace owns its scrolling; nav cannot sit on top of forms. */
.admin-shell{min-width:0}.admin-nav{overflow:auto;overscroll-behavior:contain}.admin-main{overflow:hidden}.admin-page{min-width:0}.v174-dashboard-grid>*{min-width:0}.v174-action,.platform-server{min-width:0;overflow:hidden}.v174-action strong,.v174-action small,.platform-server *{overflow-wrap:anywhere}.v174-table-wrap{max-width:100%;overflow:auto}.admin-main input,.admin-main select,.admin-main textarea{min-width:0;width:100%}
@media(max-width:900px){.top{padding:10px 16px}.container{width:min(100% - 24px,1180px);margin-top:16px}.game-title{align-items:flex-start;flex-direction:column}.game-switcher{margin-inline:-2px}.roulette-layout{grid-template-columns:1fr!important}.v169-machine-body{grid-template-columns:1fr!important}.v169-side{display:none}.admin-shell{display:block!important}.admin-nav{position:relative!important;width:100%!important;max-height:none!important;display:flex!important;gap:6px!important;padding:10px!important;overflow-x:auto!important}.admin-nav .nav-brand,.admin-nav .nav-group-label{display:none!important}.admin-nav .nav-group{display:flex!important;gap:6px!important;flex:0 0 auto!important}.admin-nav a{white-space:nowrap!important}.admin-main{margin:0!important;width:100%!important;padding:14px!important}.platform-server{grid-template-columns:1fr 1fr!important;gap:10px!important}}
@media(max-width:620px){.top{align-items:flex-start}.brand{font-size:18px}.top-wallet{width:100%;display:flex;justify-content:center;overflow:hidden}.tz-home .home-nav{display:flex!important;order:3;max-width:100%;width:100%}.tz-home .top-actions{margin-left:auto}.home-hero{gap:10px}.hero-copy,.info-panel,.casino-stage{padding:18px!important}.quick-grid,.game-directory,.help-grid,.split-section{grid-template-columns:1fr!important}.game-card{min-height:0!important}.game-art{height:92px}.section-count{white-space:normal}.game-switcher{border-radius:12px}.game-switcher a{padding:10px 12px}.game-help summary{min-height:44px;display:flex;align-items:center}.casino-stage{border-radius:18px}.dice-arena{gap:10px!important;margin:28px auto 18px!important}.die{width:64px!important;height:64px!important}.felt-table{padding:20px 10px!important;border-width:8px!important}.playing-card{width:58px!important;height:84px!important;padding:6px!important}.blackjack-actions{display:flex!important;flex-wrap:wrap!important;gap:7px!important}.blackjack-actions button{flex:1 1 92px}.wheel-wrap{width:min(280px,78vw)!important}.horse-picks,.bet-packages,.lotto-packages,.roulette-packages{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.chips{display:flex!important;overflow-x:auto!important;justify-content:flex-start!important;padding-bottom:4px}.chips button{flex:0 0 auto}.v169-controls{display:grid!important;grid-template-columns:1fr!important}.v169-spin{width:100%!important}.v169-machine-tab{min-width:150px!important}.retro-top{flex-wrap:wrap!important}.retro-bal{order:3;width:100%;justify-content:center}.arcade-economy,.progress-grid{grid-template-columns:1fr!important}.machine-hud{grid-template-columns:repeat(2,1fr)!important}.platform-shell{width:min(100% - 24px,1180px)!important}.v174-dashboard-grid{display:block!important}.v174-dashboard-grid>*{margin-bottom:12px}.platform-server{grid-template-columns:1fr!important}.bank-balances,.bank-buttons{grid-template-columns:1fr!important}}
