/* v8325 — server-selected premium palette on every DChan screen.
   Color/surface-only layer: no layout, roles, interaction, images or navigation changes.
   Applies only after an actual Super Admin selection; "off" retains current UI. */
html[data-super-global-theme="navy"],body[data-super-global-theme="navy"]{
  --sg-bg:#061525;--sg-page:#0a2038;--sg-card:#102b46;--sg-card2:#193958;
  --sg-card3:#214568;--sg-input:#0a223b;--sg-nav:#091e34;
  --sg-line:rgba(111,177,227,.43);--sg-edge:rgba(138,202,248,.72);
  --sg-accent:#93d6ff;--sg-accent2:#3b9bcf;--sg-muted:#bdd1e4;
  --sg-shine:rgba(166,223,255,.12);
}
html[data-super-global-theme="royal"],body[data-super-global-theme="royal"]{
  --sg-bg:#0a1423;--sg-page:#131f30;--sg-card:#1c2d42;--sg-card2:#263447;
  --sg-card3:#303d50;--sg-input:#101e31;--sg-nav:#101b2a;
  --sg-line:rgba(203,164,95,.43);--sg-edge:rgba(241,207,139,.79);
  --sg-accent:#f2cc80;--sg-accent2:#bb904b;--sg-muted:#d2c6ac;
  --sg-shine:rgba(254,221,151,.14);
}
html[data-super-global-theme="obsidian"],body[data-super-global-theme="obsidian"]{
  --sg-bg:#05090e;--sg-page:#0b1119;--sg-card:#171d25;--sg-card2:#202733;
  --sg-card3:#2b333c;--sg-input:#0e151d;--sg-nav:#080e16;
  --sg-line:rgba(194,160,105,.37);--sg-edge:rgba(230,190,115,.75);
  --sg-accent:#e9c783;--sg-accent2:#ba985a;--sg-muted:#cbc3b4;
  --sg-shine:rgba(245,211,146,.12);
}
html[data-super-global-theme="emerald"],body[data-super-global-theme="emerald"]{
  --sg-bg:#071b20;--sg-page:#0b272a;--sg-card:#143439;--sg-card2:#194349;
  --sg-card3:#20545a;--sg-input:#0d2930;--sg-nav:#0b262a;
  --sg-line:rgba(96,184,160,.42);--sg-edge:rgba(150,232,203,.72);
  --sg-accent:#a8eed2;--sg-accent2:#51b59a;--sg-muted:#b5d7cd;
  --sg-shine:rgba(159,246,210,.10);
}
html[data-super-global-theme="amethyst"],body[data-super-global-theme="amethyst"]{
  --sg-bg:#100e22;--sg-page:#1d1836;--sg-card:#282244;--sg-card2:#362b57;
  --sg-card3:#443466;--sg-input:#211a3a;--sg-nav:#19142e;
  --sg-line:rgba(176,136,225,.46);--sg-edge:rgba(219,186,255,.76);
  --sg-accent:#e1c4ff;--sg-accent2:#a57dde;--sg-muted:#cbbbdf;
  --sg-shine:rgba(221,191,255,.13);
}
/* Existing global Appearance controls remain selectable; this is a premium
   site-wide override applied after them, not a replacement for their state. */
html body[data-super-global-theme]{
  --dgt-bg:var(--sg-bg);--dgt-page:var(--sg-page);
  --dgt-card:var(--sg-card);--dgt-card2:var(--sg-card2);
  --dgt-card3:var(--sg-card3);--dgt-input:var(--sg-input);
  --dgt-nav:var(--sg-nav);--dgt-line:var(--sg-line);
  --dgt-line-strong:var(--sg-edge);--dgt-accent:var(--sg-accent);
  --dgt-accent2:var(--sg-accent2);--dgt-muted:var(--sg-muted);
  --theme-card:var(--sg-card);--theme-card-2:var(--sg-card2);
  --theme-card-3:var(--sg-card3);--theme-line:var(--sg-line);
  --theme-line-strong:var(--sg-edge);
  --dchan-premium-surface:var(--sg-card);
  --dchan-premium-raised:var(--sg-card2);
  --dchan-premium-line:var(--sg-edge);
  --dchan-premium-accent:var(--sg-accent);
  --dchan-premium-focus:var(--sg-accent);
  background-color:var(--sg-bg)!important;
  color:#f5f8ff;
}
/* Canvas, home sections, admin and modal cards inherit matched palette. */
html body[data-super-global-theme] :is(
  .app-shell,.page,.page.active,.wrap,.shell,.cs-shell
){background-color:var(--sg-page)!important;}
html body[data-super-global-theme]:not([data-theme="facets"]) .app-shell{
  background-image:none!important;
}
html body[data-super-global-theme] :is(
  .panel,.card,.cp-section,.cp-photo-card:not([class*="cp-vip-theme-"]),
  .cs-row,.cs-card,.settings-list-group,.channel-card,.upload-card,
  .schedule-card,.schedule-item,.seo-result-card,.playlist-card,
  .release-card,.stat-card,.gi-section,.gi-list-item,
  .dchan-compact-choice-v7922,.dchan-latest-release-card-v7929
){
  background-color:var(--sg-card)!important;
  border-color:var(--sg-line)!important;
  box-shadow:inset 0 1px 0 var(--sg-shine),0 12px 30px rgba(0,0,0,.28)!important;
}
html body[data-super-global-theme] :is(
  .bottom-nav,.dchan-modern-nav,.cp-role-workspace-v8274,
  .cp-account-menu-v8124,.cs-nav,.dchan-home-theme-menu-v8024
){
  background-color:var(--sg-nav)!important;border-color:var(--sg-line)!important;
}
html body[data-super-global-theme] :is(
  input:not([type="color"]),select,textarea
){
  background-color:var(--sg-input)!important;
  border-color:var(--sg-line)!important;color:#f9fcff!important;
}
html body[data-super-global-theme] :is(
  .panel-heading h2,.settings-list-group h3,.cp-head h2
){color:#f9fbff!important;}
html body[data-super-global-theme] :is(
  .panel-heading p,.small,.muted,.settings-list-row span
){color:var(--sg-muted)!important;}
html body[data-super-global-theme] :is(
  button,a,select,input,textarea
):focus-visible{
  outline:3px solid var(--sg-accent)!important;outline-offset:2px!important;
}
html body[data-super-global-theme] :is(
  .cp-account-menu-v8124 > a,.cp-account-menu-v8124 > button,
  .settings-list-link,.theme-choice.active,.nav-button.active
){
  border-color:var(--sg-edge)!important;
}
/* Subtle metallic finish without changing icon colors, danger indicators or
   active controls. Admin selectors remain functional and retain current layout. */
html body[data-super-global-theme] :is(
  .cp-role-workspace-v8274 .cp-account-menu-v8124 > .cp-super-room-theme-v8323,
  .cp-role-workspace-v8274 .cp-account-menu-v8124 > .cp-super-customize-v8294
){
  background:linear-gradient(135deg,var(--sg-card2),var(--sg-page))!important;
  border-color:var(--sg-edge)!important;
}
html body[data-super-global-theme] :is(
  .cp-super-room-theme-v8323 > strong,.cp-super-customize-v8294 > strong
){color:var(--sg-accent)!important;}
/* Preserve existing Staff Room message/composer layout and Super Admin
   permissions, but adopt the same global premium palette for every member. */
html body[data-super-global-theme] .dc-staff-chat-v8277,
html body[data-super-global-theme] .dc-staff-chat-v8277[data-super-theme-v8322]{
  --sat-bg:linear-gradient(155deg,var(--sg-bg),var(--sg-page));
  --sat-header:linear-gradient(115deg,var(--sg-card2),var(--sg-page));
  --sat-side:var(--sg-card);--sat-log:var(--sg-bg);
  --sat-form:var(--sg-card2);--sat-panel:var(--sg-card);
  --sat-edge:var(--sg-edge);--sat-accent:var(--sg-accent);
  background:var(--sat-bg)!important;border-color:var(--sg-edge)!important;
}
html body[data-super-global-theme] .dc-staff-chat-v8277 .dc-staff-chat-header-v8277{
  background:var(--sat-header)!important;border-bottom-color:var(--sg-edge)!important;
}
html body[data-super-global-theme] .dc-staff-chat-v8277 .dc-staff-chat-log-v8277{
  background:var(--sg-bg)!important;
}
html body[data-super-global-theme] .dc-staff-chat-v8277 .dc-staff-chat-roster-v8278,
html body[data-super-global-theme] .dc-staff-chat-v8277 .dc-staff-chat-info-v8277{
  background:var(--sg-card)!important;
}
html body[data-super-global-theme] .dc-staff-chat-v8277 .dc-staff-chat-form-v8277{
  background:var(--sg-card2)!important;
}
html body[data-super-global-theme] .dc-staff-chat-v8277 .dc-staff-chat-invite-panel-v8282{
  background:var(--sg-card)!important;border-color:var(--sg-edge)!important;
}
@media(prefers-reduced-motion:no-preference){
  html body[data-super-global-theme] :is(.panel,.card,.page,.nav-button){
    transition:background-color .18s ease,border-color .18s ease!important;
  }
}

/* v8326 — profile hero is a distinct gradient/image surface. Style its chrome
   explicitly, without touching cover artwork, avatar pixels, name or badges. */
html body[data-super-global-theme] .cp-photo-card:not([class*="cp-vip-theme-"]){
  background:linear-gradient(155deg,var(--sg-card2) 0%,var(--sg-card) 52%,var(--sg-page) 100%)!important;
  border-color:var(--sg-edge)!important;
  box-shadow:inset 0 1px 0 var(--sg-shine),0 18px 42px rgba(0,0,0,.35)!important;
}
html body[data-super-global-theme] .cp-photo-card:not([class*="cp-vip-theme-"])::before{
  background:linear-gradient(120deg,var(--sg-card3),var(--sg-card2))!important;
  border-bottom-color:var(--sg-edge)!important;
}
html body[data-super-global-theme] .cp-photo-card:not([class*="cp-vip-theme-"]) > .cp-cover-v8253{
  background:linear-gradient(120deg,var(--sg-card3),var(--sg-card2))!important;
  border-bottom-color:var(--sg-edge)!important;
}
/* Existing cover image rules remain untouched; only the fallback surface changes. */
html body[data-super-global-theme] .cp-photo-card:not([class*="cp-vip-theme-"]) .cp-avatar-row-v8257 > .cp-photo-frame,
html body[data-super-global-theme] .cp-photo-card:not([class*="cp-vip-theme-"]) .cp-profile-photo-and-name-v8082 .cp-photo-frame{
  border-color:var(--sg-accent)!important;
  box-shadow:0 0 0 5px var(--sg-shine),0 0 25px var(--sg-line),0 13px 32px rgba(0,0,0,.42)!important;
}
html body[data-super-global-theme] .cp-role-hub-v8274 .cp-role-tile-v8274,
html body[data-super-global-theme] .cp-role-hub-v8274 .cp-role-tile-v8274[data-action],
html body[data-super-global-theme] .cp-role-hub-v8274 .cp-role-command-v8305{
  background:linear-gradient(130deg,var(--sg-card2),var(--sg-card))!important;
  border-color:var(--sg-line)!important;
  box-shadow:inset 0 1px 0 var(--sg-shine),0 7px 18px rgba(0,0,0,.16)!important;
}
html body[data-super-global-theme] .cp-role-hub-v8274 .cp-role-command-v8305{
  background:linear-gradient(115deg,var(--sg-card3),var(--sg-card2))!important;
  border-color:var(--sg-edge)!important;
}
html body[data-super-global-theme] .cp-role-hub-v8274 .cp-role-tile-v8274 .cp-role-copy-v8274 small{
  color:var(--sg-muted)!important;
}
html body[data-super-global-theme] .cp-role-workspace-v8274{
  background:linear-gradient(160deg,var(--sg-card2),var(--sg-card))!important;
  border-color:var(--sg-line)!important;
}
/* User-chosen username colors, role badges, photo actions, warning/danger
   buttons, cover images and avatar dimensions are intentionally not restyled. */
