/* Images are artwork; CSS positions controls and ensures touch and text legibility. */
#home.screen--home[data-home-background]{background-image:linear-gradient(180deg,#06140d22,#050d0a44),var(--casinoir-home-background)!important}
#home .home-background-open{position:absolute;z-index:9;left:max(10px,var(--safe-inline,0px));bottom:64px;min-width:88px;min-height:36px;padding:6px 9px;border:1px solid #c0a36a;border-radius:8px;background:#0b241dec;color:#ffedc0;font:700 11px/1.2 system-ui;touch-action:manipulation;cursor:pointer}
#homeBackgroundModal{position:fixed;inset:0;z-index:27500;display:grid;place-items:center;box-sizing:border-box;padding:max(8px,env(safe-area-inset-top)) max(10px,var(--safe-inline,0px),env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,var(--safe-inline,0px),env(safe-area-inset-left));background:#020b08f2;color:#fbedd1;opacity:1;visibility:visible;pointer-events:auto}
#homeBackgroundModal[hidden]{display:none!important;pointer-events:none}
.home-background-panel{display:flex;flex-direction:column;width:min(1060px,100%);height:min(690px,100%);min-height:0;box-sizing:border-box;padding:10px 12px;border:1px solid #b99d5a;border-radius:12px;background:#0b251dea;box-shadow:0 10px 32px #0009}
.home-background-panel>header{display:flex;align-items:center;gap:12px;flex:0 0 auto}.home-background-panel>header>div{flex:1;min-width:0}.home-background-panel header small{font-size:10px;letter-spacing:.12em;color:#c9b27c}.home-background-panel h2{margin:2px 0;color:#fff0cc;font:700 22px/1.2 system-ui}.home-background-balance{white-space:nowrap;border:1px solid #8daee0;border-radius:7px;background:#172d50;padding:7px 10px;font-size:12px;color:#c5d9ff}.home-background-balance strong{font-size:15px;color:#fff}
#homeBackgroundClose{width:42px;height:42px;min-width:42px;border:1px solid #c6aa6b;border-radius:50%;background:#102d21;color:#fff1cc;font-size:24px;cursor:pointer}
.home-background-intro{margin:6px 0;color:#c5d4bd;font-size:12px;line-height:1.4}
.home-background-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:3px}
.home-background-card{display:flex;flex-direction:column;gap:6px;min-width:0;min-height:0;padding:7px;border:1px solid #788d62;border-radius:9px;background:#102f22}.home-background-card img{display:block;width:100%;height:min(29vh,150px);min-height:60px;object-fit:cover;border-radius:6px;background:#1a2e23}.home-background-card h3{font-size:13px;line-height:1.3;margin:0;color:#f9e2ac}.home-background-card p{flex:1;margin:0;font-size:11px;line-height:1.4;color:#c4d3b6}.home-background-card button,.home-background-panel footer button{min-height:36px;border:1px solid #c6ad6c;border-radius:7px;background:#4d6840;color:#fff2cf;padding:6px;font:700 11px/1.25 system-ui;cursor:pointer}.home-background-card button:disabled{opacity:.62;cursor:default}
.home-background-panel>footer{display:flex;align-items:center;gap:10px;flex:0 0 auto;margin-top:7px}.home-background-panel>footer p{flex:1;margin:0;color:#f4d399;font-size:11px;line-height:1.3}.home-background-panel>footer button{min-width:90px}
.home-background-card .home-background-preview-button{background:#183e37;border-color:#8cb4a5;color:#effff2}
.home-background-preview{position:absolute;inset:0;z-index:1;display:grid;place-items:center;padding:max(8px,env(safe-area-inset-top)) max(10px,var(--safe-inline,0px),env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,var(--safe-inline,0px),env(safe-area-inset-left));background:#010906f5;box-sizing:border-box}
.home-background-preview[hidden]{display:none!important;pointer-events:none}
.home-background-preview-panel{display:flex;flex-direction:column;width:min(960px,100%);height:min(690px,100%);min-height:0;gap:6px;box-sizing:border-box;padding:8px;border:1px solid #b99d5a;border-radius:12px;background:#0b251d}
.home-background-preview-panel header,.home-background-preview-panel footer{display:flex;align-items:center;gap:10px;flex:none}.home-background-preview-panel header div,.home-background-preview-panel footer p{flex:1;min-width:0}.home-background-preview-panel header small{font-size:10px;letter-spacing:.12em;color:#c9b27c}.home-background-preview-panel h2{margin:2px 0;font:700 18px/1.2 system-ui;color:#fff0cc}.home-background-preview-panel footer p{margin:0;font-size:11px;line-height:1.3;color:#d7e7d3}
.home-background-preview-panel button{min-height:36px;padding:5px 12px;border:1px solid #c6ad6c;border-radius:7px;background:#294d39;color:#fff2cf;font:700 12px/1.2 system-ui;cursor:pointer}#homeBackgroundPreviewClose{width:38px;height:38px;padding:0;border-radius:50%;font-size:23px}
.home-background-preview-image{position:relative;flex:1;min-height:0;overflow:hidden;border-radius:7px;background:#06150f}.home-background-preview-image img{display:block;width:100%;height:100%;object-fit:contain}.home-background-preview-image span{position:absolute;top:7px;left:7px;padding:4px 8px;border-radius:5px;background:#06150edc;color:#fff2cf;font:700 11px system-ui}
#homeBackgroundModal button:focus-visible,#homeBackgroundOpen:focus-visible{outline:2px solid #ffe39f;outline-offset:2px}
@media(max-width:760px) and (orientation:landscape){#home .home-background-open{min-height:32px;min-width:75px;font-size:10px;bottom:59px}.home-background-panel{padding:6px 8px}.home-background-panel h2{font-size:16px}.home-background-panel header small{font-size:8px}.home-background-intro{margin:3px 0;font-size:10px}.home-background-card{padding:4px;gap:3px}.home-background-card h3{font-size:10px}.home-background-card p{font-size:9px}.home-background-card img{height:24vh;min-height:45px}.home-background-card button{min-height:30px;font-size:9px}.home-background-panel footer{margin-top:3px}.home-background-panel footer button{min-height:30px}#homeBackgroundClose{width:34px;height:34px;min-width:34px}}
