/* Background-only tokens: never change typography, controls or message text colors. */
[data-chat-background] {
    --chat-wallpaper-base: var(--space-canvas);
    --chat-wallpaper: var(--wallpaper);
    --chat-wallpaper-size: var(--wallpaper-size);
    --chat-wallpaper-repeat: repeat;
    --chat-wallpaper-position:center;
    --wallpaper-line: color-mix(in srgb, var(--space-muted) 10%, transparent);
}
[data-chat-background="porcelain"] { --chat-wallpaper-base:#f6f7f8;--chat-wallpaper:none;--chat-wallpaper-size:cover;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="porcelain"], :root[data-theme="dark"] [data-chat-background="porcelain"] { --chat-wallpaper-base:#191e25; }
[data-chat-background="chalk"] { --chat-wallpaper-base:#f3f1ed;--chat-wallpaper:none;--chat-wallpaper-size:cover;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="chalk"], :root[data-theme="dark"] [data-chat-background="chalk"] { --chat-wallpaper-base:#21211f; }
[data-chat-background="sand"] { --chat-wallpaper-base:#f2ebe1;--chat-wallpaper:none;--chat-wallpaper-size:cover;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="sand"], :root[data-theme="dark"] [data-chat-background="sand"] { --chat-wallpaper-base:#29241f; }
[data-chat-background="mist"] { --chat-wallpaper-base:#edf3f5;--chat-wallpaper:none;--chat-wallpaper-size:cover;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="mist"], :root[data-theme="dark"] [data-chat-background="mist"] { --chat-wallpaper-base:#19242b; }
[data-chat-background="linen"] { --chat-wallpaper-base:#f1eee8;--chat-wallpaper:repeating-linear-gradient(0deg,transparent 0 3px,var(--wallpaper-line) 3px 4px), repeating-linear-gradient(90deg,transparent 0 5px,var(--wallpaper-line) 5px 6px);--chat-wallpaper-size:6px 4px;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="linen"], :root[data-theme="dark"] [data-chat-background="linen"] { --chat-wallpaper-base:#24221f; }
[data-chat-background="paper"] { --chat-wallpaper-base:#f5f2ec;--chat-wallpaper:radial-gradient(ellipse at 20% 50%,#9d947a0b,transparent 65%),repeating-linear-gradient(3deg,transparent 0 4px,var(--wallpaper-line) 4.5px 5px,transparent 5.5px 12px);--chat-wallpaper-size:cover;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="paper"], :root[data-theme="dark"] [data-chat-background="paper"] { --chat-wallpaper-base:#23211e; }
[data-chat-background="stipple"] { --chat-wallpaper-base:#f0f2f4;--chat-wallpaper:radial-gradient(circle,var(--wallpaper-line) 1px,transparent 1.4px);--chat-wallpaper-size:16px 16px;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="stipple"], :root[data-theme="dark"] [data-chat-background="stipple"] { --chat-wallpaper-base:#1b222b; }
[data-chat-background="graph"] { --chat-wallpaper-base:#edf1f3;--chat-wallpaper:linear-gradient(var(--wallpaper-line) 1px,transparent 1px),linear-gradient(90deg,var(--wallpaper-line) 1px,transparent 1px);--chat-wallpaper-size:32px 32px;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="graph"], :root[data-theme="dark"] [data-chat-background="graph"] { --chat-wallpaper-base:#1a242c; }
[data-chat-background="woven"] { --chat-wallpaper-base:#eeefea;--chat-wallpaper:repeating-linear-gradient(45deg,transparent 0 3px,var(--wallpaper-line) 3px 4px),repeating-linear-gradient(-45deg,transparent 0 3px,var(--wallpaper-line) 3px 4px);--chat-wallpaper-size:8px 8px;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="woven"], :root[data-theme="dark"] [data-chat-background="woven"] { --chat-wallpaper-base:#20251f; }
[data-chat-background="herringbone"] { --chat-wallpaper-base:#f0eeea;--chat-wallpaper:url('../wallpapers/herringbone.svg');--chat-wallpaper-size:80px 60px;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="herringbone"], :root[data-theme="dark"] [data-chat-background="herringbone"] { --chat-wallpaper-base:#24221f; }
[data-chat-background="terrazzo"] { --chat-wallpaper-base:#efede9;--chat-wallpaper:url('../wallpapers/terrazzo.svg');--chat-wallpaper-size:120px 120px;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="terrazzo"], :root[data-theme="dark"] [data-chat-background="terrazzo"] { --chat-wallpaper-base:#24221f; }
[data-chat-background="lines"] { --chat-wallpaper-base:#eff2f4;--chat-wallpaper:repeating-linear-gradient(0deg,transparent 0 31px,var(--wallpaper-line) 31px 32px);--chat-wallpaper-size:32px 32px;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="lines"], :root[data-theme="dark"] [data-chat-background="lines"] { --chat-wallpaper-base:#1b232a; }
[data-chat-background="alpine"] { --chat-wallpaper-base:#eaf0f0;--chat-wallpaper:url('../wallpapers/alpine.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="alpine"], :root[data-theme="dark"] [data-chat-background="alpine"] { --chat-wallpaper-base:#17242a; }
[data-chat-background="dunes"] { --chat-wallpaper-base:#f1eae0;--chat-wallpaper:url('../wallpapers/dunes.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="dunes"], :root[data-theme="dark"] [data-chat-background="dunes"] { --chat-wallpaper-base:#27231f; }
[data-chat-background="tide"] { --chat-wallpaper-base:#e9f0f3;--chat-wallpaper:url('../wallpapers/tide.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="tide"], :root[data-theme="dark"] [data-chat-background="tide"] { --chat-wallpaper-base:#15242e; }
[data-chat-background="grove"] { --chat-wallpaper-base:#eaf0e8;--chat-wallpaper:url('../wallpapers/grove.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="grove"], :root[data-theme="dark"] [data-chat-background="grove"] { --chat-wallpaper-base:#1a251c; }
[data-chat-background="meadow"] { --chat-wallpaper-base:#eff1e7;--chat-wallpaper:url('../wallpapers/meadow.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="meadow"], :root[data-theme="dark"] [data-chat-background="meadow"] { --chat-wallpaper-base:#22261c; }
[data-chat-background="moonrise"] { --chat-wallpaper-base:#eceef4;--chat-wallpaper:url('../wallpapers/moonrise.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="moonrise"], :root[data-theme="dark"] [data-chat-background="moonrise"] { --chat-wallpaper-base:#1b202e; }
[data-chat-background="arc"] { --chat-wallpaper-base:#eef0f4;--chat-wallpaper:url('../wallpapers/arc.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="arc"], :root[data-theme="dark"] [data-chat-background="arc"] { --chat-wallpaper-base:#1c2330; }
[data-chat-background="contour"] { --chat-wallpaper-base:#eaf0f0;--chat-wallpaper:url('../wallpapers/contour.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="contour"], :root[data-theme="dark"] [data-chat-background="contour"] { --chat-wallpaper-base:#1b2528; }
[data-chat-background="ribbon"] { --chat-wallpaper-base:#f1eef3;--chat-wallpaper:url('../wallpapers/ribbon.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="ribbon"], :root[data-theme="dark"] [data-chat-background="ribbon"] { --chat-wallpaper-base:#25212c; }
[data-chat-background="mosaic"] { --chat-wallpaper-base:#eff0ee;--chat-wallpaper:url('../wallpapers/mosaic.svg');--chat-wallpaper-size:160px 160px;--chat-wallpaper-repeat:repeat; }
:root[data-theme="dark"][data-chat-background="mosaic"], :root[data-theme="dark"] [data-chat-background="mosaic"] { --chat-wallpaper-base:#202522; }
[data-chat-background="orbit"] { --chat-wallpaper-base:#edf0f4;--chat-wallpaper:url('../wallpapers/orbit.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="orbit"], :root[data-theme="dark"] [data-chat-background="orbit"] { --chat-wallpaper-base:#1a232f; }
[data-chat-background="fold"] { --chat-wallpaper-base:#edf0f3;--chat-wallpaper:url('../wallpapers/fold.svg');--chat-wallpaper-size:cover;--chat-wallpaper-repeat:no-repeat; }
:root[data-theme="dark"][data-chat-background="fold"], :root[data-theme="dark"] [data-chat-background="fold"] { --chat-wallpaper-base:#1a242e; }

/* Thumbnails show the entire scenic composition rather than an arbitrary crop. */
.background-swatch { --chat-wallpaper-size:cover; }
.background-swatch[data-chat-background="linen"] { --chat-wallpaper-size:6px 4px; }
.background-swatch[data-chat-background="paper"] { --chat-wallpaper-size:cover; }
.background-swatch[data-chat-background="stipple"] { --chat-wallpaper-size:16px 16px; }
.background-swatch[data-chat-background="graph"] { --chat-wallpaper-size:32px 32px; }
.background-swatch[data-chat-background="woven"] { --chat-wallpaper-size:8px 8px; }
.background-swatch[data-chat-background="lines"] { --chat-wallpaper-size:32px 32px; }
.background-swatch[data-chat-background="herringbone"] { --chat-wallpaper-size:80px 60px; }
.background-swatch[data-chat-background="terrazzo"] { --chat-wallpaper-size:120px 120px; }
.background-swatch[data-chat-background="mosaic"] { --chat-wallpaper-size:160px 160px; }

[data-chat-background="moonrise"] { --chat-wallpaper-position:78% center; }
