/* The picker shows each station's own artwork in every room. */
#open-room-themes {margin-bottom:14px;padding:9px 14px}
#themes-dialog {width:min(440px,calc(100% - 24px));box-sizing:border-box}
#theme-options {border:0;padding:0;margin:16px 0;display:grid;gap:8px}
#theme-options label {
  display:grid;grid-template-columns:56px 1fr auto;gap:14px;align-items:center;
  padding:6px 14px 6px 8px;margin:0;min-width:0;cursor:pointer;text-align:left;
  color:#f6f7ff;background:#141c20;border:1px solid #415259;border-radius:8px;font-weight:650;
}
#theme-options label[data-choice="new-wave"] {background:linear-gradient(115deg,#080911,#171b43);border-color:#545fc0}
#theme-options label[data-choice="gang-station"] {background:linear-gradient(115deg,#211021,#32203d);border-color:#8657a1}
#theme-options label[data-choice="smokology"] {
  background:linear-gradient(110deg,#503719,#30251b 65%);border-color:#e69c1b;color:#feed58;
}
#theme-options label:has(:checked) {outline:2px solid var(--accent);outline-offset:-2px}
#theme-options img {display:block;width:56px;height:56px;object-fit:contain}
#theme-options input {width:18px;height:18px;margin:0;accent-color:var(--accent)}
#theme-status:empty {display:none}
#video-status button {pointer-events:auto}
#art-stage #video-status:has(button:not([hidden])) {pointer-events:auto}

body[data-room-theme="new-wave"] {
  --bg:#090b17;--panel:#12162a;--line:#363e69;--muted:#abb6d6;--accent:#99afff;
  --brand-main:#647aff;--brand-secondary:#a5c4ff;--brand-edge:#4659ec;--brand-rgb:108 135 255;
  --brand-control:#192447;--brand-hover:#273868;--brand-ink:#080c1a;
}
body[data-room-theme="gang-station"] {
  --bg:#170d20;--panel:#26162e;--line:#63416e;--muted:#d0b4d5;--accent:#67e6df;
  --brand-main:#ff446a;--brand-secondary:#4ee1d6;--brand-edge:#b874eb;--brand-rgb:205 135 255;
  --brand-control:#33203e;--brand-hover:#50305c;--brand-ink:#190b1a;
}
body[data-room-theme="smokology"] {
  --bg:#15120f;--panel:#262018;--line:#5e4b30;--muted:#d3c4af;--accent:#feed58;
  --brand-main:#f5b732;--brand-secondary:#86bc6a;--brand-edge:#b9822a;--brand-rgb:255 220 83;
  --brand-control:#34291b;--brand-hover:#513c20;--brand-ink:#19150e;
}
body[data-room-theme="smokology"] .brand img {width:clamp(48px,7vw,78px);height:auto}
body[data-room-theme] {
  --white:#f8f7ff;--purple:var(--brand-edge);
  color:var(--white);background:var(--bg);accent-color:var(--accent);
}
body[data-room-theme] .ambient {background:none}
body[data-room-theme] .brand img {filter:none;object-fit:contain}
body[data-room-theme] .brand small {color:var(--muted)}
body[data-room-theme] .topbar {
  background:linear-gradient(105deg,var(--panel),var(--bg) 64%,var(--brand-control));
  border-color:var(--line);border-bottom-color:var(--brand-edge);
}
body[data-room-theme="smokology"]:not(.song-wars) .queue-tabs button[aria-selected=true] {
  background:var(--accent);color:var(--brand-ink);border-color:var(--accent);
}
/* Buttons inherit these variables. Song Wars and other red actions keep
   their own control colors. Glows continue to use the original animation. */
body[data-room-theme]:not(.song-wars) .topbar {
  --nav-bg:var(--brand-control);--nav-border:var(--brand-edge);--nav-text:var(--white);
  --nav-hover:var(--brand-hover);--nav-highlight:var(--accent);--nav-glow:var(--brand-rgb);
}
body[data-room-theme]:not(.song-wars) :is(.player-card,#radio-sidebar,#visual-toolbar) {
  --control-bg:var(--brand-control);--control-border:var(--brand-edge);--control-text:var(--white);
  --control-hover:var(--brand-hover);--control-fill:var(--brand-main);--control-fill-text:var(--brand-ink);
  --control-fill-hover:var(--brand-secondary);
}
body[data-room-theme] :is(.player-card,.queue-card,.room-card,.queue-footer,.lobby-room,.wars-arena,
  #wars-leaderboard,#wars-bracket,#chance-panel,dialog,#avatar-dialog,#shop-page,#visual-toolbar,
  #shop-grid article,#sound-list article,#sound-form,#shop-manager,.shop-code-form) {
  background:var(--panel);color:var(--white);border-color:var(--line);
}
body[data-room-theme] :is(#shop-page,.avatar-stage,.wars-contender,.bracket-card,.customize-tabs,
  .wardrobe-editor .shop-item,#shop-grid img,#room-dialog .dialog-head,#quality-control:not([hidden])) {
  background-color:var(--bg);border-color:var(--line);
}
body[data-room-theme] :is(.wars-arena,.wars-contender,#chance-panel) {border-top-color:var(--brand-edge)}
body[data-room-theme] :is(.eyebrow,.source-tag,.tag,.signal,.time-row,#quality-current,
  #library-panel summary,.shop-card-body small,.shop-card-body summary,#sound-list small,.wars-crown) {color:var(--accent)}
body[data-room-theme] :is(#shop-status,#library-status,.queue-subtitle,.input-help,.shop-card-body p,#wars-rules) {color:var(--muted)}
body[data-room-theme] :is(dialog select,dialog textarea,dialog input:not([type=radio],[type=checkbox],[type=range]),
  .search-box input,#library-panel input) {background:var(--bg);color:var(--white);border-color:var(--line)}
body[data-room-theme] #library-panel :is(#library-tools,#library-rows,#library-manage) button,
body[data-room-theme] :is(#shop-page button,#wardrobe-dept button,.customize-tabs button,
  .room-card #room-settings,#open-room-themes,.lobby-room button) {
  background:var(--brand-control);color:var(--white);border-color:var(--brand-edge);
}
body[data-room-theme] :is(#library-nav button,#wardrobe-dept button,.customize-tabs button,#shop-page button)[aria-pressed=true],
body[data-room-theme]:not(.song-wars) :is(dialog,.lobby-room) .primary {
  background:var(--accent);color:var(--brand-ink);border-color:var(--accent);
}
body[data-room-theme] #art-stage {
  --light-a:var(--brand-main);--light-b:var(--brand-secondary);
  background:radial-gradient(ellipse at 50% 22%,var(--brand-hover),var(--panel) 51%,var(--bg) 90%)!important;
}
body[data-room-theme] :is(#header-xp,#avatar-progress) {accent-color:var(--accent)}
body[data-room-theme] #header-xp::-webkit-progress-value {background:var(--accent)}
body[data-room-theme] .avatar-stage {
  background:radial-gradient(ellipse at 50% 42%,var(--brand-hover),var(--bg) 82%);border-color:var(--line);
}
body[data-room-theme] :is(.volume-label,.time-row span:nth-child(2),#header-coins) {color:var(--brand-secondary)}
body[data-room-theme] .volume-label input {accent-color:var(--brand-secondary)}
body[data-room-theme] .seek-slider::-webkit-slider-runnable-track {background:linear-gradient(to right,var(--accent) var(--played),var(--line) var(--played))}
body[data-room-theme] .seek-slider::-webkit-slider-thumb {background:var(--brand-main);border-color:var(--accent)}
body[data-room-theme] .seek-slider::-moz-range-progress {background:var(--accent)}
body[data-room-theme] .seek-slider::-moz-range-thumb {background:var(--brand-main);border-color:var(--accent)}
body[data-room-theme] .queue-item .queue-art {background:var(--brand-control);color:var(--accent);border-color:var(--line)}
body[data-room-theme]:not(.song-wars) .player-tools .collection-controls button:not(.remove-saved),
body[data-room-theme]:not(.song-wars) .shop-preview {background:var(--brand-control);color:var(--white);border-color:var(--brand-edge)}
body[data-room-theme]:not(.song-wars) :is(#automix,.collection-controls button:not(.remove-saved),.shop-preview)[aria-pressed=true] {
  background:var(--accent);color:var(--brand-ink);border-color:var(--accent);
}
body.song-wars[data-room-theme] :is(.customize-tabs button,.category-tile,#wardrobe-dept button)[aria-pressed=true] {
  background:#ff445c;color:#122025;
}
body[data-room-theme] :focus-visible {outline-color:var(--brand-secondary)}
body[data-room-theme="smokology"] {--white:#fff5dd}
body[data-room-theme="smokology"] .topbar {
  background:linear-gradient(110deg,#ffe999 0%,#ffda55 27%,#f5b732 62%,#eaa02c 100%);color:var(--brand-ink);border-color:#bf7b0f;
}
body[data-room-theme="smokology"] .topbar :is(.brand,.brand small,.header-balances strong,#header-coins,.header-progression small) {
  color:var(--brand-ink);
}
body[data-room-theme="smokology"] #header-xp::-webkit-progress-value {background:#448f64}
body[data-room-theme="smokology"] #header-xp::-moz-progress-bar {background:#448f64}
body[data-room-theme="smokology"] {
  --smokology-stage:radial-gradient(ellipse at 48% 12%,#ac782e 0%,#745019 43%,#382918 77%,#201a13 100%);
}
body[data-room-theme="smokology"] #art-stage {background:var(--smokology-stage)!important;--light-b:#fbd54e}
body[data-room-theme="smokology"] .avatar-stage {background:var(--smokology-stage)}
