/* Preferences alter only the room surface, never card/table geometry. */
body {--table-room:#814126 url('./fork-casino-carpet.png') center/620px 620px repeat;--lobby-room:#493221 url('./fork-casino-lounge.png') center/cover no-repeat;}
body[data-table-background=wood] {--table-room:#60412d url('./fork-walnut-floor.svg') center/900px 600px repeat;}
body[data-lobby-background=wood] {--lobby-room:#60412d url('./fork-walnut-floor.svg') center/900px 600px repeat;}
body[data-table-background=plain] {--table-room:#34463d;}
body[data-lobby-background=plain] {--lobby-room:#34463d;}
body[data-table-background=emerald] {--table-room:radial-gradient(ellipse at 50% 30%,#44755a,#244538);}
body[data-lobby-background=emerald] {--lobby-room:radial-gradient(ellipse at 50% 30%,#44755a,#244538);}
body[data-table-background=midnight] {--table-room:radial-gradient(ellipse at 50% 30%,#395675,#1c2d49);}
body[data-lobby-background=midnight] {--lobby-room:radial-gradient(ellipse at 50% 30%,#395675,#1c2d49);}
body[data-table-background=slate] {--table-room:repeating-linear-gradient(120deg,#657172 0 1px,#525f61 1px 48px);}
body[data-lobby-background=slate] {--lobby-room:repeating-linear-gradient(120deg,#657172 0 1px,#525f61 1px 48px);}
body[data-table-background=plum] {--table-room:radial-gradient(ellipse at 50% 30%,#795367,#442d46);}
body[data-lobby-background=plum] {--lobby-room:radial-gradient(ellipse at 50% 30%,#795367,#442d46);}
body[data-table-background=sandstone] {--table-room:linear-gradient(125deg,#b49d75,#8c7556);}
body[data-lobby-background=sandstone] {--lobby-room:linear-gradient(125deg,#b49d75,#8c7556);}
body[data-table-background] #view-table .table-area {background:var(--table-room)!important;}
body[data-lobby-background] #view-desktop .desk-canvas,body[data-lobby-background] #view-lobby {background:var(--lobby-room)!important;}
.poker-background-dialog {max-width:710px;}
.poker-background-dialog fieldset {border:1px solid #66724d;border-radius:10px;margin:18px 0;padding:12px;}
.poker-background-dialog legend {padding:0 8px;color:#e2c997;font-weight:600;}
.poker-background-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.poker-background-dialog .poker-background-choice {position:relative;display:grid;gap:6px;margin:0;text-align:center;cursor:pointer;font-size:12px;}
.poker-background-choice input {position:absolute;opacity:0;width:1px;height:1px;margin:0;}
.poker-background-swatch {display:block;height:62px;border:2px solid #ffffff25;border-radius:8px;background:#34463d;}
.poker-background-choice input:checked + .poker-background-swatch {border-color:#efd18b;box-shadow:0 0 0 2px #efd18b60;}
.poker-background-choice input:focus-visible + .poker-background-swatch {outline:3px solid #fff;outline-offset:3px;}
.poker-background-swatch[data-style=casino][data-part=table] {background:url('./fork-casino-carpet.png') center/120px;}
.poker-background-swatch[data-style=casino][data-part=lobby] {background:url('./fork-casino-lounge.png') center/cover;}
.poker-background-swatch[data-style=wood] {background:url('./fork-walnut-floor.svg') center/180px;}
.poker-background-swatch[data-style=emerald] {background:linear-gradient(120deg,#44755a,#244538);}
.poker-background-swatch[data-style=midnight] {background:linear-gradient(120deg,#395675,#1c2d49);}
.poker-background-swatch[data-style=slate] {background:repeating-linear-gradient(120deg,#657172 0 1px,#525f61 1px 20px);}
.poker-background-swatch[data-style=plum] {background:linear-gradient(120deg,#795367,#442d46);}
.poker-background-swatch[data-style=sandstone] {background:linear-gradient(120deg,#b49d75,#8c7556);}
@media(max-width:480px){.poker-background-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
.poker-background-dialog.poker-background-table-only {max-width:590px;}
.poker-background-actions {display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.poker-background-dialog .poker-background-reset {background:transparent;color:#d9e4d6;border:1px solid #82927b;}

/*976: additive, account-backed background choice.*/
body[data-table-background=blackgold]{--table-room:#141413 url('./fork-black-gold999.png') center/cover no-repeat;}
body[data-lobby-background=blackgold]{--lobby-room:#141413 url('./fork-black-gold999.png') center/cover no-repeat;}
.poker-background-swatch[data-style=blackgold]{background:#141413 url('./fork-black-gold999.png') center/cover no-repeat;}

/*1015: additional room artwork; existing choices and defaults are preserved.*/
body[data-table-background="emerald-art-deco"]{--table-room:#182b23 url('./poker-room-emerald-art-deco-20261008.png') center/cover no-repeat;}
body[data-lobby-background="emerald-art-deco"]{--lobby-room:#182b23 url('./poker-room-emerald-art-deco-20261008.png') center/cover no-repeat;}
.poker-background-swatch[data-style="emerald-art-deco"]{background:#182b23 url('./poker-room-emerald-art-deco-20261008.png') center/cover no-repeat;}
body[data-table-background="midnight-penthouse"]{--table-room:#131c2c url('./poker-room-midnight-penthouse-20261008.png') center/cover no-repeat;}
body[data-lobby-background="midnight-penthouse"]{--lobby-room:#131c2c url('./poker-room-midnight-penthouse-20261008.png') center/cover no-repeat;}
.poker-background-swatch[data-style="midnight-penthouse"]{background:#131c2c url('./poker-room-midnight-penthouse-20261008.png') center/cover no-repeat;}
body[data-table-background="burgundy-grand-salon"]{--table-room:#321c1d url('./poker-room-burgundy-grand-salon-20261008.png') center/cover no-repeat;}
body[data-lobby-background="burgundy-grand-salon"]{--lobby-room:#321c1d url('./poker-room-burgundy-grand-salon-20261008.png') center/cover no-repeat;}
.poker-background-swatch[data-style="burgundy-grand-salon"]{background:#321c1d url('./poker-room-burgundy-grand-salon-20261008.png') center/cover no-repeat;}

/*1020: recolor the felt pixels inside the existing table art; no layout change.*/
body[data-usa-client][data-table-felt]:not([data-table-felt=green]) #view-table #tableOval:before{filter:url('#pokerFeltTint')!important}
.poker-background-swatch[data-part=felt][data-style=green]{background:radial-gradient(ellipse,#078154,#004a30)}
.poker-background-swatch[data-part=felt][data-style=red]{background:radial-gradient(ellipse,#b52b47,#5c0c20)}
.poker-background-swatch[data-part=felt][data-style=blue]{background:radial-gradient(ellipse,#346aaf,#132b60)}
.poker-background-swatch[data-part=felt][data-style=teal]{background:radial-gradient(ellipse,#087d88,#00434c)}
.poker-background-swatch[data-part=felt][data-style=purple]{background:radial-gradient(ellipse,#804995,#452452)}
.poker-background-swatch[data-part=felt][data-style=burgundy]{background:radial-gradient(ellipse,#7a3643,#3f1720)}
.poker-background-swatch[data-part=felt][data-style=charcoal]{background:radial-gradient(ellipse,#4a4a4a,#212121)}
