/* Canonical Dawnflick hosted-app header.

   Structure and slot order are sealed by web-shared/app-shell-contract.json.
   The shared-origin runtime creates the entire DOM. Each hosted app provides
   only one host and current-app id. */

/* Fonts come from the host document (the unicode-range slices in fonts.css). Redeclaring the full 2MB variable font here would make every screen download that whole file on first visit. */

[data-sc-app-shell-host='dawnflick-app-shell'] {
  display: block;
  min-height: 56px;
  font-family: var(--sc-font-sans);
}
:host {
  display: block;
  min-height: 56px;
  width: 100%;
}
[data-sc-app-shell-host='dawnflick-app-shell'][data-sc-app-shell-state='error'] {
  display: grid;
  place-items: center;
  padding: var(--sc-space-4);
  border-bottom: 1px solid var(--sc-danger);
  background: var(--sc-background-inverse);
  color: var(--sc-danger-soft);
  font: 700 14px/1.4 var(--sc-font-sans);
}

.sc-app-header,
.sc-app-header *,
.sc-app-header *::before,
.sc-app-header *::after {
  box-sizing: border-box;
}

.sc-app-header {
  all: initial;
  display: block;
  font: 400 14px/1.5 var(--sc-font-sans);
  font-synthesis: none;
  font-kerning: normal;
  text-rendering: geometricPrecision;
}

.sc-app-header button,
.sc-app-header select {
  font-family: inherit;
}

/* The App Shell stylesheet is self-contained. Static consumers must not import a framework bundle just to size the
   official brand or expose accessible control labels. */
.sc-app-header .sc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sc-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--sc-space-2);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.sc-brand-mark {
  display: block;
  width: 26px;
  height: 26px;
  flex: none;
  object-fit: contain;
}
.sc-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.sc-brand-title {
  color: inherit;
  font: 750 15px/1.2 var(--sc-font-sans);
  letter-spacing: -0.015em;
}
.sc-brand-subtitle {
  overflow: hidden;
  color: var(--sc-foreground-subtle);
  font: 500 12px/1.3 var(--sc-font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sc-space-2);
  min-height: 32px;
  padding: 0 var(--sc-space-2);
  border: 1px solid transparent;
  border-radius: var(--sc-radius-sm);
  background: transparent;
  color: var(--sc-foreground-inverse);
  font: 600 13px/1.3 var(--sc-font-sans);
  cursor: pointer;
  transition:
    background 160ms var(--sc-ease-std),
    border-color 160ms var(--sc-ease-std),
    transform 120ms var(--sc-ease-std);
}
@media (hover: hover) {
  .sc-theme-toggle:hover {
    border-color: color-mix(
      in srgb,
      var(--sc-background-inverse) 84%,
      var(--sc-foreground-inverse) 16%
    );
    background: color-mix(
      in srgb,
      var(--sc-background-inverse) 90%,
      var(--sc-foreground-inverse) 10%
    );
  }
}
.sc-light .sc-theme-toggle,
:host-context(.sc-light) .sc-theme-toggle {
  border-color: transparent;
  background: transparent;
  color: var(--sc-foreground);
}
@media (hover: hover) {
  .sc-light .sc-theme-toggle:hover,
  :host-context(.sc-light) .sc-theme-toggle:hover { background: var(--sc-background-weak); }
}
.sc-theme-toggle:active { transform: translateY(1px); }
.sc-theme-toggle svg { flex: none; }
.sc-theme-toggle-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
}
.sc-app-shell-icon { display: block; flex: none; }
.sc-theme-toggle-label { display: inline; }
.sc-theme-toggle-label[hidden] { display: none; }

.sc-app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  max-width: 100vw;
  border-bottom: 1px solid var(--sc-border-on-dark);
  background: #161615;
  color: var(--sc-foreground-inverse);
}

.sc-app-header-primary {
  display: flex;
  align-items: center;
  gap: var(--sc-space-5);
  width: 100%;
  min-height: 56px;
  padding: 0 clamp(var(--sc-space-4), 2vw, var(--sc-space-6));
}

.sc-app-brand { flex: none; color: inherit; }

.sc-app-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  align-self: stretch;
  min-width: 0;
  margin-right: auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.sc-app-switcher::-webkit-scrollbar { display: none; }

.sc-app-switcher-link {
  display: inline-flex;
  flex: none;
  align-items: center;
  position: relative;
  gap: var(--sc-space-2);
  min-height: 32px;
  margin-block: auto;
  padding: 0 10px;
  border-radius: var(--sc-radius-sm);
  color: #b8b4aa;
  font: 600 13px/1.3 var(--sc-font-sans);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms var(--sc-ease-std), background 160ms var(--sc-ease-std);
}

.sc-app-switcher-link:hover {
  color: var(--sc-foreground-inverse);
  background: color-mix(in srgb, var(--sc-foreground-inverse) 8%, transparent);
}

.sc-app-switcher-link[aria-current="page"] {
  color: var(--sc-foreground-inverse);
  background: color-mix(in srgb, var(--sc-foreground-inverse) 12%, transparent);
}

.sc-app-switcher-link svg { flex: none; }

/* Set by the runtime only when the app menu does not fit (fitApps): first tighter, then icons only except the
   current app. The hidden names stay as tooltips and accessible names. */
.sc-app-header--dense .sc-app-switcher { gap: 2px; }
.sc-app-header--dense .sc-app-switcher-link { padding-inline: var(--sc-space-2); font-size: 13px; }
.sc-app-header--icons .sc-app-switcher-link:not([aria-current="page"]) { gap: 0; padding-inline: 10px; }
.sc-app-header--icons .sc-app-switcher-link:not([aria-current="page"]) .sc-app-switcher-label { display: none; }

.sc-app-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sc-space-2);
  flex: none;
}

/* Apps may put a small, route-specific status beside the global controls.
   The shared header still owns the position and all other header markup. */
.sc-app-context-status-slot { display: contents; }

.sc-app-visitor {
  display: inline-flex;
  align-items: center;
  gap: var(--sc-space-2);
  min-height: 32px;
  max-width: min(220px, 28vw);
  padding: 0 var(--sc-space-2) 0 4px;
  overflow: hidden;
  border: 1px solid var(--sc-border-on-dark);
  border-radius: var(--sc-radius-sm);
  background: transparent;
  color: var(--sc-foreground-inverse);
  font: 600 13px/1.3 var(--sc-font-sans);
  white-space: nowrap;
}
.sc-app-visitor-link {
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 160ms var(--sc-ease-std),
    background 160ms var(--sc-ease-std),
    transform 120ms var(--sc-ease-std);
}
@media (hover: hover) {
  .sc-app-visitor-link:hover {
    border-color: color-mix(
      in srgb,
      var(--sc-background-inverse) 84%,
      var(--sc-foreground-inverse) 16%
    );
    background: color-mix(
      in srgb,
      var(--sc-background-inverse) 90%,
      var(--sc-foreground-inverse) 10%
    );
  }
}
.sc-app-visitor-link:focus-visible {
  outline: var(--sc-focus-ring-width) solid currentColor;
  outline-offset: var(--sc-focus-ring-offset);
}
.sc-app-visitor-link:active { transform: translateY(1px); }

.sc-app-visitor-label { overflow: hidden; text-overflow: ellipsis; }
.sc-app-profile-avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: var(--sc-radius-full);
  background: color-mix(in srgb, var(--sc-foreground-inverse) 14%, transparent);
  color: var(--sc-foreground-inverse);
}
.sc-app-profile-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sc-app-profile-avatar svg { flex: none; }
.sc-app-profile-avatar-initial {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: #403f3a;
  color: var(--sc-foreground-inverse);
  font: 700 11px/1 var(--sc-font-sans);
}
.sc-app-visitor-region { position: relative; display: inline-flex; flex: none; }
/* The class rules below set display, so the hidden attribute needs the same
   weight to keep the presentation that is not in use out of the layout. */
.sc-app-visitor[hidden],
.sc-app-visitor-menu[hidden] { display: none; }

.sc-app-visitor-account {
  appearance: none;
  cursor: pointer;
  transition:
    border-color 160ms var(--sc-ease-std),
    background 160ms var(--sc-ease-std),
    transform 120ms var(--sc-ease-std);
}
@media (hover: hover) {
  .sc-app-visitor-account:hover {
    border-color: color-mix(
      in srgb,
      var(--sc-background-inverse) 84%,
      var(--sc-foreground-inverse) 16%
    );
    background: color-mix(
      in srgb,
      var(--sc-background-inverse) 90%,
      var(--sc-foreground-inverse) 10%
    );
  }
}
.sc-app-visitor-account:focus-visible {
  outline: var(--sc-focus-ring-width) solid currentColor;
  outline-offset: var(--sc-focus-ring-offset);
}
.sc-app-visitor-account:active { transform: translateY(1px); }

.sc-app-visitor-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--sc-space-2));
  right: 0;
  min-width: 180px;
  padding: var(--sc-space-1);
  border: 1px solid color-mix(
    in srgb,
    var(--sc-background-inverse) 84%,
    var(--sc-foreground-inverse) 16%
  );
  border-radius: var(--sc-radius-sm);
  background: var(--sc-card-alt);
  box-shadow: var(--sc-shadow-lg);
}

.sc-app-visitor-menu-item {
  display: flex;
  align-items: center;
  gap: var(--sc-space-2);
  width: 100%;
  min-height: 40px;
  padding: 0 var(--sc-space-3);
  border: 0;
  border-radius: var(--sc-radius-sm);
  background: transparent;
  color: var(--sc-foreground-inverse);
  font: 700 14px/1.4 var(--sc-font-sans);
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  transition: background 160ms var(--sc-ease-std);
}
.sc-app-visitor-menu-item svg { flex: none; }
@media (hover: hover) {
  .sc-app-visitor-menu-item:hover {
    background: color-mix(in srgb, var(--sc-foreground-inverse) 10%, transparent);
  }
}
.sc-app-visitor-menu-item:focus-visible {
  outline: var(--sc-focus-ring-width) solid currentColor;
  outline-offset: calc(var(--sc-focus-ring-offset) * -1);
}
.sc-app-visitor-menu-item:disabled { cursor: default; opacity: .6; }

.sc-app-header[data-sc-identity-state="loading"] .sc-app-visitor { opacity: .72; }
.sc-app-header[data-sc-identity-state="error"] .sc-app-visitor { border-style: dashed; }

.sc-locale-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 var(--sc-space-2);
  border: 1px solid transparent;
  border-radius: var(--sc-radius-sm);
  background: transparent;
  color: var(--sc-foreground-inverse);
  cursor: pointer;
}

.sc-locale-switcher:hover {
  background: color-mix(
    in srgb,
    var(--sc-background-inverse) 90%,
    var(--sc-foreground-inverse) 10%
  );
}
.sc-locale-switcher:focus-within {
  outline: var(--sc-focus-ring-width) solid currentColor;
  outline-offset: var(--sc-focus-ring-offset);
}
.sc-locale-switcher-icon { display: grid; place-items: center; flex: none; color: currentColor; }
.sc-locale-switcher-icon svg { display: block; }
.sc-locale-switcher-abbr { font: 600 12px/1.3 var(--sc-font-sans); letter-spacing: .04em; }
.sc-locale-switcher-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  font: 400 14px/1.4 var(--sc-font-sans);
}
.sc-locale-switcher-select:focus { outline: none; }
.sc-locale-switcher-select option {
  color: var(--sc-foreground-inverse);
  background: var(--sc-background-inverse);
}

/* The common header owns the slot; the slotted navigation itself remains a
   light-DOM extension so a service's local route styles cannot pierce the
   primary header boundary. */
.sc-app-local-nav-slot { display: block; }
.sc-app-local-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 0 clamp(var(--sc-space-4), 2vw, var(--sc-space-6));
  overflow-x: auto;
  border-top: 1px solid var(--sc-border-on-dark);
  scrollbar-width: none;
}
.sc-app-local-nav[hidden] { display: none; }
.sc-app-local-nav::-webkit-scrollbar { display: none; }

/* Local navigation link shape is decided here and nowhere else. No app redefines it.
   Keep the height, padding, font, and transition identical to
   .sc-app-switcher-link: the two rows sit stacked, and a difference reads as a
   defect. The same gate compares the two rules and fails if either moves alone.
   Accept both activation forms, [aria-current="page"] and .is-active: the apps
   run different routers, and the shared row does not get to pick one. */
.sc-app-local-nav > nav {
  display: flex;
  align-items: center;
  gap: var(--sc-space-1);
  min-width: 0;
}
.sc-app-local-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--sc-space-2);
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--sc-radius-sm);
  color: #b8b4aa;
  font: 600 13px/1.3 var(--sc-font-sans);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms var(--sc-ease-std), background 160ms var(--sc-ease-std);
}
.sc-app-local-nav a:hover {
  color: var(--sc-foreground-inverse);
  background: color-mix(in srgb, var(--sc-foreground-inverse) 8%, transparent);
}
.sc-app-local-nav a[aria-current="page"],
.sc-app-local-nav a.is-active {
  color: var(--sc-foreground-inverse);
  background: color-mix(in srgb, var(--sc-foreground-inverse) 12%, transparent);
}
.sc-app-local-nav a svg { flex: none; }

.sc-light .sc-app-header,
:host-context(.sc-light) .sc-app-header {
  border-color: var(--sc-border);
  background: var(--sc-background);
  color: var(--sc-foreground);
}
.sc-light .sc-app-switcher-link,
:host-context(.sc-light) .sc-app-switcher-link { color: var(--sc-foreground-weak); }
.sc-light .sc-app-switcher-link:hover,
.sc-light .sc-app-switcher-link[aria-current="page"],
:host-context(.sc-light) .sc-app-switcher-link:hover,
:host-context(.sc-light) .sc-app-switcher-link[aria-current="page"] {
  color: var(--sc-foreground);
  background: var(--sc-background-weak);
}
.sc-light .sc-app-visitor,
.sc-light .sc-locale-switcher,
:host-context(.sc-light) .sc-app-visitor,
:host-context(.sc-light) .sc-locale-switcher {
  border-color: var(--sc-border);
  background: var(--sc-background);
  color: var(--sc-foreground);
}
.sc-light .sc-app-profile-avatar,
:host-context(.sc-light) .sc-app-profile-avatar {
  background: var(--sc-background-weak);
  color: var(--sc-foreground);
}
.sc-light .sc-app-visitor-link:hover,
:host-context(.sc-light) .sc-app-visitor-link:hover { background: var(--sc-background-weak); }
.sc-light .sc-app-visitor-account,
:host-context(.sc-light) .sc-app-visitor-account {
  border-color: var(--sc-border);
  background: var(--sc-background);
  color: var(--sc-foreground);
}
.sc-light .sc-app-visitor-account:hover,
:host-context(.sc-light) .sc-app-visitor-account:hover { background: var(--sc-background-weak); }
.sc-light .sc-app-visitor-menu,
:host-context(.sc-light) .sc-app-visitor-menu {
  border-color: var(--sc-border);
  background: var(--sc-background);
}
.sc-light .sc-app-visitor-menu-item,
:host-context(.sc-light) .sc-app-visitor-menu-item { color: var(--sc-foreground); }
.sc-light .sc-app-visitor-menu-item:hover,
:host-context(.sc-light) .sc-app-visitor-menu-item:hover { background: var(--sc-background-weak); }
.sc-light .sc-locale-switcher:hover,
:host-context(.sc-light) .sc-locale-switcher:hover { background: var(--sc-background-weak); }
.sc-light .sc-locale-switcher-select option,
:host-context(.sc-light) .sc-locale-switcher-select option {
  color: var(--sc-foreground);
  background: var(--sc-background);
}
.sc-light .sc-app-local-nav,
:host-context(.sc-light) .sc-app-local-nav { border-color: var(--sc-border); }
.sc-light .sc-app-local-nav a,
:host-context(.sc-light) .sc-app-local-nav a { color: var(--sc-foreground-weak); }
.sc-light .sc-app-local-nav a:hover,
.sc-light .sc-app-local-nav a[aria-current="page"],
.sc-light .sc-app-local-nav a.is-active,
:host-context(.sc-light) .sc-app-local-nav a:hover,
:host-context(.sc-light) .sc-app-local-nav a[aria-current="page"],
:host-context(.sc-light) .sc-app-local-nav a.is-active {
  color: var(--sc-foreground);
  background: var(--sc-background-weak);
}

@media (min-width: 981px) and (max-width: 1200px) {
  .sc-app-switcher { gap: 2px; }
  .sc-app-switcher-link { padding-inline: var(--sc-space-2); font-size: 13px; }
}

@media (max-width: 980px) {
  .sc-app-header-primary { flex-wrap: wrap; }
  .sc-app-switcher {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: var(--sc-space-1);
    scrollbar-width: none;
  }
  .sc-app-switcher::-webkit-scrollbar { display: none; }
  .sc-app-tools { margin-left: auto; }
}

@media (max-width: 720px) {
  .sc-app-header { position: relative; }
  .sc-app-header-primary { padding: var(--sc-space-3) var(--sc-space-4); }
  .sc-brand-subtitle,
  .sc-theme-toggle-label { display: none; }
  /* A phone is narrower than the whole tool row: it wraps to a second line instead of pushing the page sideways. */
  .sc-app-header-primary { max-width: 100%; box-sizing: border-box; }
  .sc-app-tools { gap: var(--sc-space-1); flex-wrap: wrap; justify-content: flex-end; min-width: 0; max-width: 100%; }
  .sc-app-visitor { max-width: 132px; padding-inline: var(--sc-space-2); }
  .sc-app-visitor-menu { min-width: 160px; }
  .sc-app-switcher-link { padding-inline: var(--sc-space-3); }
  .sc-app-local-nav { padding-inline: var(--sc-space-4); }
}

@media (max-width: 800px), (max-width: 900px) and (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  :host { min-height: 56px; }
  :host-context(body.quick-mobile-game) { display: none; }
  .sc-app-header[data-sc-compact-header] { position: relative; }
  .sc-app-header[data-sc-compact-header] .sc-app-header-primary {
    flex-wrap: nowrap;
    gap: 4px;
    min-height: 55px;
    padding: 5px max(6px, env(safe-area-inset-right)) 5px max(6px, env(safe-area-inset-left));
  }
  .sc-app-header[data-sc-compact-header] .sc-app-brand,
  .sc-app-header[data-sc-compact-header] .sc-app-visitor {
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
  }
  .sc-app-header[data-sc-compact-header] .sc-app-brand .sc-brand-mark { width: 32px; height: 32px; }
  .sc-app-header[data-sc-compact-header] .sc-app-brand .sc-brand-copy,
  .sc-app-header[data-sc-compact-header] .sc-app-visitor .sc-app-visitor-label,
  .sc-app-header[data-sc-compact-header] .sc-app-visitor-account { position: relative; overflow: visible; }
  .sc-app-header[data-sc-compact-header] .sc-app-visitor-account .sc-app-profile-avatar { width: 32px; height: 32px; }
  .sc-app-header[data-sc-compact-header] .sc-app-visitor-region:has([data-pc-health="warning"]) .sc-app-visitor-account::after,
  .sc-app-header[data-sc-compact-header] .sc-app-visitor-region:has([data-pc-health="action"]) .sc-app-visitor-account::after {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c9a24c;
    content: '';
  }
  .sc-app-header[data-sc-compact-header] .sc-app-visitor-region:has([data-pc-health="action"]) .sc-app-visitor-account::after { background: #e2665c; }
  .sc-app-header[data-sc-compact-header] .sc-app-switcher {
    order: 0;
    flex: 1 1 0;
    width: auto;
    margin: 0;
    padding: 0;
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .sc-app-header[data-sc-compact-header] .sc-app-switcher > .sc-app-switcher-link {
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
  }
  .sc-app-header[data-sc-compact-header] .sc-app-switcher-label { display: none; }
  .sc-app-header[data-sc-compact-header] .sc-app-tools { flex-wrap: nowrap; margin: 0; }
  .sc-app-header[data-sc-compact-header] .sc-app-visitor-menu {
    width: min(284px, calc(100vw - 12px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    min-width: 0;
    max-height: calc(100dvh - 64px - env(safe-area-inset-bottom));
    overflow: auto;
    overscroll-behavior: contain;
  }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-account-name {
    padding: 8px 12px;
    overflow-wrap: anywhere;
    font-weight: 700;
  }
  .sc-app-header[data-sc-compact-header] .sc-app-visitor-menu .sc-app-visitor-menu-item { min-height: 44px; }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools { display: grid; }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools[hidden] { display: none; }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools .sc-aist-wrap:not([hidden]),
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools .sc-notify-wrap:not([hidden]) { display: flex; }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools :is(.sc-settings-gear, .sc-theme-toggle, .sc-locale-switcher,
    .sc-aist-button, .sc-notify-button):not([hidden]) {
    display: flex;
    justify-content: flex-start;
    gap: var(--sc-space-2);
    width: 100%;
    height: auto;
    min-height: 44px;
    padding: 6px 12px;
    border: 0;
    border-radius: var(--sc-radius-sm);
    background: transparent;
    color: inherit;
    font: 700 14px/1.4 var(--sc-font-sans);
    text-align: left;
    text-decoration: none;
  }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools .sc-theme-toggle-label { display: inline; }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools :is(.sc-settings-gear, .sc-aist-button, .sc-notify-button)::after { content: attr(aria-label); }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools .sc-locale-switcher::after { content: attr(data-sc-mobile-label); }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools .sc-locale-switcher-abbr { order: 1; margin-left: auto; }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools :is(.sc-aist-button, .sc-notify-button):not([hidden]) { padding-right: 34px; }
  .sc-app-header[data-sc-compact-header] .sc-app-mobile-tools :is(.sc-aist-badge, .sc-notify-badge) { top: 12px; right: 8px; }
  .sc-app-header[data-sc-compact-header] :is(.sc-aist-close, .sc-aist-tab, .sc-notify-close, .sc-notify-mark-all) { min-width: 44px; min-height: 44px; }
}

.sc-app-switcher-link[hidden] { display: none; }

/* Dawnflick global navigation: the current app is marked by weight and a 2px amber rule under it. */
.sc-app-header .sc-app-switcher-link[aria-current="page"] {
  background: transparent;
  color: var(--sc-foreground-inverse);
}
.sc-app-header .sc-app-switcher-link[aria-current="page"]::after {
  position: absolute;
  right: 10px;
  bottom: -12px;
  left: 10px;
  height: 2px;
  border-radius: 2px;
  background: #f6b142;
  content: '';
}
.sc-app-header .sc-app-switcher-link[aria-current="page"] svg { color: currentColor; }
.sc-app-header :is(.sc-app-switcher-link, .sc-theme-toggle, .sc-app-local-nav a):focus-visible {
  outline: var(--sc-focus-ring-width) solid #ffcd73;
  outline-offset: 1px;
}

:host-context(.sc-light) .sc-app-header,
.sc-light .sc-app-header { background: #fcfbf8; }
:host-context(.sc-light) .sc-app-header .sc-app-switcher-link[aria-current="page"],
.sc-light .sc-app-header .sc-app-switcher-link[aria-current="page"] {
  background: transparent;
  color: var(--sc-foreground);
}
:host-context(.sc-light) .sc-app-header .sc-app-switcher-link[aria-current="page"]::after,
.sc-light .sc-app-header .sc-app-switcher-link[aria-current="page"]::after { background: #e99b1f; }
:host-context(.sc-light) .sc-app-header :is(.sc-app-switcher-link, .sc-theme-toggle, .sc-app-local-nav a):focus-visible,
.sc-light .sc-app-header :is(.sc-app-switcher-link, .sc-theme-toggle, .sc-app-local-nav a):focus-visible { outline-color: #8a5604; }
:host-context(.sc-light) .sc-app-header .sc-app-profile-avatar-initial,
.sc-light .sc-app-header .sc-app-profile-avatar-initial { background: #dedad0; color: #1b1a17; }
:host-context(.sc-light) .sc-app-header .sc-app-visitor,
.sc-light .sc-app-header .sc-app-visitor { border-color: #dedad0; background: transparent; }
@media (max-width: 800px) {
  .sc-app-header .sc-app-switcher-link[aria-current="page"]::after { bottom: -6px; }
}

/* Header tool buttons (settings, notifications, bug report, AI status) come from side modules with their own sheets.
   One size and one shape for all of them is decided here; the higher specificity wins over the module sheets. */
.sc-app-header .sc-app-tools :is(.sc-settings-gear, .sc-notify-button, .sc-aist-button) {
  width: 32px;
  height: 32px;
  border-color: transparent;
  border-radius: var(--sc-radius-sm);
  background: transparent;
  color: #b8b4aa;
}
@media (hover: hover) {
  .sc-app-header .sc-app-tools :is(.sc-settings-gear, .sc-notify-button, .sc-aist-button, .sc-theme-toggle, .sc-locale-switcher):hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.06);
    color: var(--sc-foreground-inverse);
  }
  :host-context(.sc-light) .sc-app-header .sc-app-tools :is(.sc-settings-gear, .sc-notify-button, .sc-aist-button, .sc-theme-toggle, .sc-locale-switcher):hover,
  .sc-light .sc-app-header .sc-app-tools :is(.sc-settings-gear, .sc-notify-button, .sc-aist-button, .sc-theme-toggle, .sc-locale-switcher):hover {
    background: rgba(27, 26, 23, 0.05);
    color: var(--sc-foreground);
  }
}
.sc-app-header .sc-app-tools .sc-settings-gear[aria-current="page"] {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sc-foreground-inverse);
}
:host-context(.sc-light) .sc-app-header .sc-app-tools :is(.sc-settings-gear, .sc-notify-button, .sc-aist-button),
.sc-light .sc-app-header .sc-app-tools :is(.sc-settings-gear, .sc-notify-button, .sc-aist-button) {
  border-color: transparent;
  background: transparent;
  color: #57544c;
}
:host-context(.sc-light) .sc-app-header .sc-app-tools .sc-settings-gear[aria-current="page"],
.sc-light .sc-app-header .sc-app-tools .sc-settings-gear[aria-current="page"] { background: #ece9e2; color: #1b1a17; }
.sc-app-header .sc-app-tools :is(.sc-settings-gear, .sc-notify-button, .sc-aist-button):focus-visible {
  outline: var(--sc-focus-ring-width) solid #ffcd73;
  outline-offset: 1px;
}
.sc-app-header .sc-app-more-button { min-height: 32px; padding: 0 10px; border-radius: var(--sc-radius-sm); font: 600 13px/1.3 var(--sc-font-sans); color: #b8b4aa; }
.sc-app-header .sc-app-tools { gap: 2px; }
.sc-app-header .sc-app-tools > .sc-app-visitor-region { margin-left: var(--sc-space-2); }
:host-context(.sc-light) .sc-app-header .sc-locale-switcher,
.sc-light .sc-app-header .sc-locale-switcher { border-color: transparent; background: transparent; }

/* ---------------------------------------------------------------------------------------------------------------
   Studio header, customer edition (2026-11-18). The apps are one rounded track in the middle of the bar, in the
   order a customer works: Art → Create → Templates → Ad networks → Guide. The current app is a filled pill (paper on
   charcoal, charcoal on paper) with an amber icon; there is no underline. The brand is the sunrise mark + wordmark.
   --------------------------------------------------------------------------------------------------------------- */
.sc-app-header { background: #121211; border-bottom-color: #26251f; }
.sc-app-header .sc-app-header-primary { min-height: 60px; gap: var(--sc-space-4); }
.sc-app-header .sc-app-brand .sc-brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.sc-app-header .sc-app-brand .sc-brand-title { font-size: 16px; font-weight: 750; letter-spacing: -0.02em; }

.sc-app-header .sc-app-switcher {
  align-self: center;
  gap: 2px;
  margin-inline: auto;
  padding: 4px;
  border: 1px solid #2c2b26;
  border-radius: 999px;
  background: #1b1a18;
}
.sc-app-header .sc-app-switcher-link {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #a9a59b;
  font: 650 13px/1.2 var(--sc-font-sans);
}
.sc-app-header .sc-app-switcher-link svg { width: 17px; height: 17px; }
.sc-app-header .sc-app-switcher-link:hover { background: #26251f; color: #f2f0ea; }
.sc-app-header .sc-app-switcher-link[aria-current="page"] { background: #f2f0ea; color: #171715; }
.sc-app-header .sc-app-switcher-link[aria-current="page"] svg { color: #b86e00; }
.sc-app-header .sc-app-switcher-link[aria-current="page"]::after { content: none; }
.sc-app-header .sc-app-switcher-link:focus-visible { outline-offset: 2px; }

:host-context(.sc-light) .sc-app-header,
.sc-light .sc-app-header { background: #fbfaf7; border-bottom-color: #e4e0d6; }
:host-context(.sc-light) .sc-app-header .sc-app-switcher,
.sc-light .sc-app-header .sc-app-switcher { border-color: #e4e0d6; background: #f2efe8; }
:host-context(.sc-light) .sc-app-header .sc-app-switcher-link,
.sc-light .sc-app-header .sc-app-switcher-link { color: #5b574e; }
:host-context(.sc-light) .sc-app-header .sc-app-switcher-link:hover,
.sc-light .sc-app-header .sc-app-switcher-link:hover { background: #e7e3da; color: #171715; }
:host-context(.sc-light) .sc-app-header .sc-app-switcher-link[aria-current="page"],
.sc-light .sc-app-header .sc-app-switcher-link[aria-current="page"] { background: #171715; color: #f2f0ea; }
:host-context(.sc-light) .sc-app-header .sc-app-switcher-link[aria-current="page"] svg,
.sc-light .sc-app-header .sc-app-switcher-link[aria-current="page"] svg { color: #f6b142; }

/* Narrow and compact headers keep the track but let it scroll sideways at full width. */
@media (max-width: 800px) {
  .sc-app-header .sc-app-switcher { margin-inline: 0; max-width: 100%; }
  .sc-app-header .sc-app-switcher-link { padding-inline: 12px; }
}
.df-workspace { position: relative; flex: 0 0 auto; color: #fff; }
.df-workspace-trigger {
  display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none;
  max-width: 180px; min-height: 36px; padding: 3px 8px 3px 4px; border: 1px solid #595959;
  color: #fff; background: #171717; border-radius: 8px;
  font-size: 12px; font-weight: 650;
}
.df-workspace-trigger::-webkit-details-marker { display: none; }
.df-workspace-trigger:hover,.df-workspace[open] > .df-workspace-trigger { background: #333; border-color: #939393; }
.df-workspace-trigger:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.df-workspace-mark {
  display: grid; place-items: center; flex: none; width: 25px; height: 25px; overflow: hidden;
  border-radius: 5px; color: #111; background: #fff; font-weight: 800;
}
.df-workspace-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.df-workspace-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-workspace-chevron { opacity: .7; }
.df-workspace-menu,.df-workspace-feedback {
  position: absolute; z-index: 100; inset-inline-end: 0; top: calc(100% + 8px);
  min-width: 220px; max-width: min(320px, 90vw);
  padding: 8px; border: 1px solid #b8b8b8; border-radius: 10px;
  color: #161616; background: #fff; box-shadow: 0 12px 36px #0004;
}
.df-workspace-feedback { top: calc(100% + 245px); margin: 0; font-size: 12px; }
.df-workspace-feedback:empty,.df-workspace-preview[hidden],.df-workspace-preview img[hidden] { display: none; }
.df-workspace-caption { margin: 3px 8px 7px; font-size: 11px; font-weight: 700; opacity: .68; }
.df-workspace-menu button,.df-workspace-dialog button {
  color: inherit; background: transparent; border: 0; border-radius: 7px;
  padding: 9px; text-align: start; font: inherit; cursor: pointer;
}
.df-workspace-menu button { display: block; width: 100%; white-space: normal; overflow-wrap: anywhere; }
.df-workspace-options { max-height: 260px; overflow: auto; padding-bottom: 5px; margin-bottom: 5px; border-bottom: 1px solid #ddd; }
.df-workspace-menu button:hover,.df-workspace-dialog button:hover,.df-workspace-menu [aria-current] { background: color-mix(in srgb, currentColor 11%, transparent); }
.df-workspace-menu [aria-current],.df-workspace-menu [aria-current]:hover { color: #fff; background: #171717; font-weight: 700; }
.df-workspace-dialog {
  width: min(440px, calc(100% - 28px)); max-height: calc(100dvh - 32px); padding: 22px;
  color: var(--sc-foreground, #eee); background: var(--sc-background, #1b1b20);
  border: 1px solid var(--sc-border, #38363d); border-radius: 16px;
  box-shadow: 0 20px 56px #0006;
}
.df-workspace-dialog::backdrop { background: #0009; }
.df-workspace-dialog h2 { margin: 0 0 4px; font-size: 21px; }
.df-workspace-form { display: grid; gap: 11px; }
.df-workspace-field { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.df-workspace-field :is(input,select) {
  min-width: 0; max-width: 60%; padding: 5px; border: 1px solid var(--sc-border, #38363d);
  color: inherit; background: transparent; border-radius: 6px; font: inherit;
}
.df-workspace-field input[type="color"] { width: 36px; padding: 2px; }
.df-workspace-field input[type="file"] { font-size: 11px; }
.df-workspace-field select option { color: var(--sc-foreground, #eee); background: var(--sc-background, #1b1b20); }
.df-workspace-colors,.df-workspace-actions { display: flex; justify-content: space-between; gap: 10px; }
.df-workspace-actions { justify-content: flex-end; }
.df-workspace-dialog .df-workspace-primary { background: #f6b142; color: #271a06; font-weight: 750; }
.df-workspace-dialog button:disabled { opacity: .55; cursor: default; }
.df-workspace-preview { min-height: 110px; padding: 14px; display: grid; place-content: center; justify-items: center; gap: 10px; color: #fff; border-radius: 9px; }
.df-workspace-preview img { width: 44px; height: 44px; border-radius: 10px; }
.df-workspace-preview i { width: 110px; max-width: 60vw; height: 5px; border-radius: 5px; }
.df-workspace-error { margin: 0; color: var(--sc-danger, #d55); font-size: 12px; }
@media (max-width: 720px) {
  .df-workspace-name,.df-workspace-chevron { display: none; }
  .df-workspace-trigger { padding: 3px; }
}
