/* Backgrounds sit behind the existing table, cards and controls at every viewport size. */
body[data-table-background]:not([data-table-background="standard"]) .arena-screen,
body[data-table-background]:not([data-table-background="standard"]):not(.tutorial-table) .arena-screen.night-table{
 background-color:#090d1e;background-image:var(--table-background-image);background-size:cover;background-repeat:no-repeat;background-position:var(--table-background-position);
}
body[data-table-background]:not([data-table-background="standard"]) .flat-backdrop{
 background:linear-gradient(180deg,#090d1e15,#090d1e20 40%,#090d1e99),var(--table-background-image) var(--table-background-position)/cover no-repeat;
}
body[data-table-background]:not([data-table-background="standard"])[data-page="play"] .game-layout{
 background:#090d1e var(--table-background-image) var(--table-background-position)/cover no-repeat;border-radius:12px;
}
.table-background-settings{--background-border:#485474;--background-pink:#ff82cb;margin:20px 0}
.table-background-settings h2{font-size:20px;margin:5px 0 8px}
.table-background-picker{--background-border:#485474;--background-pink:#ff82cb;min-width:0}
.table-background-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}
.table-background-option{position:relative;display:block;min-width:0;padding:0;overflow:hidden;text-align:left;color:#eff1ff;background:#11182c;border:1px solid var(--background-border);border-radius:9px;cursor:pointer}
.table-background-option[aria-pressed="true"]{border-color:var(--background-pink);box-shadow:0 0 0 1px var(--background-pink)}
.table-background-option img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.table-background-option>span{display:block;padding:10px 11px;font-weight:700;font-size:13px}
.table-background-option small{display:block;font-size:11px;font-weight:400;color:#b6c3dc;margin-top:3px}
.table-background-option:disabled{opacity:.65;cursor:wait}
.table-background-preview{margin:0;overflow:hidden;border-radius:10px;background:#0c1427;border:1px solid var(--background-border)}
.table-background-preview>img{display:block;width:100%;height:auto;aspect-ratio:1672/941;object-fit:cover}
.table-background-preview figcaption{padding:11px 14px;color:#eef1ff}
.table-background-preview strong{display:block;font-size:15px}
.table-background-preview figcaption span{display:block;font-size:12px;color:#b6c3dc;line-height:1.7;margin-top:3px}
.table-background-selection{font-size:12px;color:#aaddf1;margin:12px 0;line-height:1.7}
.table-background-actions{display:flex;gap:10px;flex-wrap:wrap}
.table-background-actions .btn{min-height:44px}
.table-background-picker>.hint{font-size:12px;line-height:1.8;margin-top:12px}
.night-background-button{white-space:nowrap}
@media(max-width:650px){.table-background-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.table-background-option>span{font-size:12px}.table-background-actions .btn{width:100%}.table-background-settings{padding:17px}}
@media(max-width:900px){.night-header .night-background-button{display:none!important}}
@media(max-height:500px) and (orientation:landscape){#modal .table-background-preview{display:none}.table-background-options{grid-template-columns:repeat(4,minmax(0,1fr))}.table-background-option img{max-height:70px}}
