/* Only the control room follows the visitor's palette. The photographed set,
   its instruments and its projected displays keep their physical lighting. */
@layer office-appearance {
  @media screen {
    html[data-dw-phase] {
      background-color:var(--ds-ground)!important;
      color-scheme:light;
    }
    html:is([data-dw-phase=dusk],[data-dw-phase=night]):not(.dw-contrast) {color-scheme:dark!important;}
    html.dw-contrast {color-scheme:light!important;}

    /* Fullscreen is a dark viewing surface even during daylight. */
    .viewer:fullscreen {
      --ds-ground:#15241f; --ds-surface:#21383b; --ds-raised:#294247; --ds-field:#172d30;
      --ds-ink:#f3ecdf; --ds-muted:#c9d8d0; --ds-link:#f4d395; --ds-focus:#ffe19c;
      --ds-edge:#8fa69d; --ds-button:#c2e3c6; --ds-button-ink:#13382d;
      background-color:var(--ds-ground)!important;color-scheme:dark!important;
    }

    :is(html[data-dw-toned],html.dw-contrast,.viewer:fullscreen) {
      --text:var(--ds-ink)!important; --sub:var(--ds-muted)!important;
      --panel:var(--ds-surface)!important; --line:var(--ds-edge)!important; --gold:var(--ds-link)!important;
      color:var(--ds-ink)!important;

      & .handheld-office {
        --paper:var(--ds-ground)!important; --surface:var(--ds-surface)!important; --ink:var(--ds-ink)!important;
        --muted:var(--ds-muted)!important; --pine:var(--ds-link)!important; --edge:var(--ds-edge)!important;
        --sand:var(--ds-raised)!important;
      }
      & :is(.viewer,aside,.bottom>section,.transport,.settings,.camera-selector,#cameras,#radio-controls,#atlas-controls,#scanner-history,#workday,#gallery-switcher,#gallery-summary,#memory-caption,#lounge-program,#device-inspection,.mobile-sheet-head,#mobile-sheet,#mobile-dock) {
        background-color:var(--ds-surface)!important;color:var(--ds-ink)!important;border-color:var(--ds-edge)!important;
      }
      & :is(#lounge-program,#device-inspection) :is(h2,h3,.tv-description,.device-power) {color:var(--ds-ink)!important;}
      & :is(#lounge-program,#device-inspection) :is(figcaption,.tv-kind,.device-stamp) {color:var(--ds-muted)!important;}
      & :is(#lounge-program,#device-inspection) :is(button,select) {
        background:var(--ds-field)!important;color:var(--ds-ink)!important;border-color:var(--ds-edge)!important;
      }
      & #lounge-program .tv-link {background:var(--ds-button)!important;color:var(--ds-button-ink)!important;}
      & :is(.owner-status,.camera-bar,#daily-counts div,.gallery-detail-prints figure,.scanner-inspection) {
        background:var(--ds-raised)!important;color:var(--ds-ink)!important;border-color:var(--ds-edge)!important;
      }
      & :is(.heading h1,.mobile-room-name strong,.mobile-sheet-content strong,.mobile-sheet-content dt) {color:var(--ds-ink)!important;}
      & :is(.source-status,.weather-readout,.season,.identity i,.workday-caption span,#archive-stamp,#board-text .board-stage-totals,.sound-status,.mobile-mail-stamp) {color:var(--ds-muted)!important;}
      & :is(.weather-readout a,#atlas-links a,#radio-controls a,.mobile-sheet-content a) {color:var(--ds-link)!important;}
      & :is(.buttons button,.camera-bar button,.switch,select,#cameras button,.sound-options button,#atlas-reset,#tour-toggle,#gallery-switcher button,#office-walls a,#office-walls button,.mobile-actions button,.mobile-tour,#mobile-rooms [data-room],#mobile-dock button,#mobile-sheet button) {
        background-color:var(--ds-field)!important;color:var(--ds-ink)!important;border-color:var(--ds-edge)!important;
      }
      & :is(.buttons,.camera-bar,.switch,#cameras,.sound-options,#gallery-switcher,#office-walls,.mobile-actions) [aria-pressed=true],
      & :is(#tour-toggle,.mobile-tour)[aria-pressed=true], & #mobile-dock [aria-current=page] {
        background-color:var(--ds-button)!important;color:var(--ds-button-ink)!important;
      }
      & #cameras button b {color:inherit!important;}
      & #mobile-rooms [data-room][aria-pressed=true] {background-color:var(--ds-raised)!important;border-color:var(--ds-link)!important;}
      & :is(button,select,a,summary,input):focus-visible {outline-color:var(--ds-focus)!important;}
    }
    /* A transparent handheld viewer sits on the page canvas. */
    html[data-dw-toned] .handheld-office .viewer:not(:fullscreen) {background:transparent!important;}
  }
}
