.background-editor{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(240px,1fr);gap:28px;align-items:start}
.background-settings h3{margin:6px 0 10px}.background-settings .intro{max-width:800px;line-height:1.7}.background-settings .fine{line-height:1.7}
.background-palette{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.background-swatch{padding:5px;border:2px solid transparent;border-radius:12px;min-width:0;text-align:center;font-size:12px;line-height:1.4}
.background-swatch>span:last-child{display:block;margin-top:7px;overflow-wrap:anywhere}.background-swatch.selected{border-color:#526e54;background:#edf2e6}.background-swatch:focus-visible{outline-offset:0}
.background-swatch-art{display:grid;place-items:center;aspect-ratio:1.35;border-radius:9px;font-size:23px;color:#20392e;box-shadow:inset 0 0 0 1px #18352e20}
.room-pattern{position:relative;isolation:isolate;overflow:hidden;background-color:var(--room-color,#244b3d)}
.room-pattern::before,.room-pattern::after{content:'';position:absolute;border:1px solid #e4e0b65c;border-radius:50%;inset:17% 7%;pointer-events:none;z-index:-1;background:#244b3d0c}
.room-pattern::after{inset:9% 12%;border-color:#244b3d38;background:transparent}
.background-preview-panel{position:sticky;top:20px;min-width:0}.background-preview{aspect-ratio:1.35;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:22px 10px;color:#20392e;text-align:center;gap:14px;background-image:var(--room-image,none);background-size:cover;background-position:center}
.background-preview[data-background-mode="default"]{color:#f3e6c6}.background-preview[data-background-mode="image"]{color:#fff6df;background-image:linear-gradient(#102d2860,#102d2860),var(--room-image)}
.background-preview>span,.background-preview>strong{font-size:13px;line-height:1.5}.background-sample-cards{display:flex;gap:5px;align-items:center;justify-content:center;background:#fffdf1;padding:12px;border-radius:8px;color:#20352c;font:700 25px Georgia;box-shadow:0 4px 12px #1d332c25}.background-sample-cards span{font-size:19px}.background-sample-cards b{color:#a94b3c}
.background-upload{border-top:1px solid #dce1d3;margin-top:24px;padding-top:20px}.background-upload-label{display:block;font-weight:600;margin:10px 0}.background-upload input{display:block;width:100%;font-size:13px;padding:10px;border:1px dashed #9bab91;border-radius:9px;background:#f5f7ef}.background-upload input::file-selector-button{border:0;border-radius:5px;padding:9px;background:#e5ebdb;color:#294b3b;font:inherit;cursor:pointer;margin-right:10px}
.background-buttons{display:grid;gap:10px}.background-buttons button{white-space:normal;min-height:46px}.background-feedback{font-size:13px;min-height:3em;line-height:1.6;color:#335c3e}.background-feedback.error{color:#99482f}
/* The same oval table pattern is retained on every Morandi color. */
body[data-background-page="home"]:not([data-background-mode="default"]) #app{position:relative;isolation:isolate;background:var(--room-color);min-height:calc(100dvh - 100px)}
body[data-background-page="home"][data-background-mode="color"] #app::before,body[data-background-page="home"][data-background-mode="color"] #app::after{content:'';position:absolute;inset:7% 5%;border:1px solid #f2e6ba90;border-radius:50%;z-index:-1;pointer-events:none;background:#244b3d0a}
body[data-background-page="home"][data-background-mode="color"] #app::after{inset:3% 10%;border-color:#244b3d40;background:transparent}
body[data-background-page="home"][data-background-mode="image"] #app{background-image:linear-gradient(#f8f6ef66,#f8f6ef66),var(--room-image);background-size:cover;background-position:center;background-attachment:fixed}
body[data-background-page="home"][data-background-mode="image"] .workspace-head,body[data-background-page="home"][data-background-mode="image"] .play-mode-choices-title{background:#fffdf0e8;padding:12px;border-radius:12px}
body[data-background-page="home"]:not([data-background-mode="default"]) .landlord-setup{background:#fffdf1e8;border-radius:12px;padding:16px}
body[data-background-page="game"]:not([data-background-mode="default"]) .game-board{background-color:var(--room-color);background-image:var(--room-image,none);background-size:cover;background-position:center}
body[data-background-page="game"][data-background-mode="color"] .game-board::before{background:#244b3d0a;border-color:#f1e3b080}
body[data-background-page="game"][data-background-mode="image"] .game-board{background-image:linear-gradient(#102d288c,#102d288c),var(--room-image)}
body[data-background-page="game"][data-background-mode="image"] .game-board::before{background:transparent}
body[data-background-page="game"][data-background-mode="color"] .landlord-table::before{background:#244b3d0a;border-color:#244b3d40}
body[data-background-page="game"][data-background-mode="color"] .game-board{color:var(--reader-light,#263c30);--reader-color:var(--reader-light,#263c30)}
body[data-background-page="game"][data-background-mode="color"] .game-board :is(.game-head button,.round-status,.selection-status,.deal-intro,.deal-ready,.deal-totals,.round-opponent,.round-opponent small,.seat-play p,.seat-play small,.last-play-label,.table-turn-label,.role-badge,.human-table-seat small,.table-kitty,.table-kitty .fine,.seat-kitty,.your-hand-header,.game-actions .secondary,.deal-position,.trick-area p,.trick-area h2,.deal-totals strong){color:var(--reader-light,#263c30)}
body[data-background-page="game"][data-background-mode="color"] .game-board :is(.round-opponent,.seat-play,.round-score){background:#ffffef50;border-color:#28473e55;color:var(--reader-light,#263c30)}
body[data-background-page="game"][data-background-mode="color"] .game-board .round-score strong{color:var(--reader-light,#263c30)}
body[data-background-page="game"][data-background-mode="color"] .game-board :is(.level-trump>span,.deal-stack strong,.deal-empty,.your-hand-header>span){color:var(--reader-light,#263c30)}
body[data-background-page="game"][data-background-mode="color"] .dealt-player-hand{background:#ffffef25;border-color:#28473e40}
@media(max-width:1050px){.background-editor{grid-template-columns:1fr}.background-preview-panel{position:static;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 20px}.background-preview-panel>h3{grid-column:1/-1}.background-preview-panel .background-preview{grid-row:2/5;max-width:420px}.background-buttons{align-self:start}.background-palette{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:540px){.background-palette{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.background-editor{gap:18px}.background-preview-panel{display:block}.background-preview{margin-bottom:14px}.background-swatch{font-size:11px}.background-settings .intro{font-size:13px}}
