.cx-app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background:
    linear-gradient(180deg, rgba(16, 20, 18, 0.96), rgba(16, 20, 18, 0.88)),
    rgba(16, 20, 18, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(237, 242, 235, 0.1);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  overflow: visible;
}

.cx-app-header,
.cx-app-header *,
.cx-app-header *::before,
.cx-app-header *::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

.cx-app-header :is(
  .cx-app-header__mark,
  .cx-app-header__guest-link,
  .cx-app-header__launcher,
  .cx-app-header__mobile-user-toggle,
  .cx-app-header__user,
  .cx-app-header__logout,
  .cx-app-drawer,
  .cx-user-menu
) {
  border-radius: 0 !important;
  clip-path: none !important;
}

.cx-app-header::after {
  display: none;
}

.cx-app-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
}

.cx-app-header__mark {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #3ad6ff, #8c5cff);
  color: #fff9f4;
  font-family: "Sora", "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  border-radius: 18px;
}

.cx-app-header__mark--wide {
  font-size: 0.84rem;
  letter-spacing: 0.06em;
}

.cx-app-header__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cx-app-header__copy strong {
  display: block;
  margin: 0;
  font-family: "Sora", "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.02;
  text-transform: uppercase;
  white-space: nowrap;
}

.cx-app-header__copy small {
  display: block;
  margin: 0;
  color: #9eaca2;
  font-size: 0.84rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.cx-app-header__side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.cx-app-header__session {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.cx-app-header__guest-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
}

.cx-app-header__panel-wrap {
  position: relative;
  flex: 0 0 auto;
}

.cx-app-header__launcher,
.cx-app-header__mobile-user-toggle,
.cx-app-header__user,
.cx-app-header__logout {
  min-height: 50px;
}

.cx-app-header__guest-link,
.cx-app-header__guest-link:visited {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(237, 242, 235, 0.12);
  color: #edf2eb;
  text-decoration: none;
  font-family: "Sora", "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 999px !important;
}

.cx-app-header__guest-link--ghost {
  background: rgba(20, 25, 23, 0.84);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cx-app-header__guest-link--primary {
  border-color: rgba(58, 214, 255, 0.24);
  background: linear-gradient(135deg, #3ad6ff 0%, #8c5cff 100%);
  color: #fff9f4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.cx-app-header__guest-link:hover,
.cx-app-header__guest-link:focus-visible {
  border-color: rgba(58, 214, 255, 0.22);
  transform: translateY(-1px);
}

.cx-app-header__launcher,
.cx-app-header__mobile-user-toggle {
  width: 50px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(237, 242, 235, 0.12);
  background: rgba(20, 25, 23, 0.84);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  border-radius: 16px !important;
}

.cx-app-header__launcher:hover,
.cx-app-header__launcher:focus-visible,
.cx-app-header__mobile-user-toggle:hover,
.cx-app-header__mobile-user-toggle:focus-visible,
.cx-app-header__panel-wrap.is-open > .cx-app-header__launcher,
.cx-app-header__panel-wrap.is-open > .cx-app-header__mobile-user-toggle {
  border-color: rgba(58, 214, 255, 0.22);
  background: rgba(24, 30, 27, 0.94);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cx-app-header__launcher-grid {
  width: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.cx-app-header__launcher-grid span {
  width: 4px;
  height: 4px;
  background: #edf2eb;
  opacity: 0.92;
}

.cx-app-header__mobile-user-toggle {
  display: none;
}

.cx-app-header__mobile-user-toggle svg,
.cx-app-header__logout-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: #edf2eb;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cx-theme-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  padding: 14px;
  border: 1px solid rgba(132, 173, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 16, 30, 0.98), rgba(7, 11, 21, 0.98)),
    rgba(5, 8, 19, 0.98);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  z-index: 230;
}

.cx-theme-menu--dock {
  width: max-content;
  min-width: 0;
  padding: 8px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.cx-theme-menu__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.cx-theme-menu__title {
  display: grid;
  gap: 4px;
}

.cx-theme-menu__title strong {
  margin: 0;
  color: #f2f6ff;
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cx-theme-menu__title span {
  color: #91a3c9;
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0.05em;
}

.cx-theme-menu__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cx-theme-menu__options--compact {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cx-theme-menu__option {
  width: 100%;
  min-height: 84px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid rgba(132, 173, 255, 0.14);
  background: rgba(14, 22, 40, 0.94);
  color: #f2f6ff;
  text-align: left;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.cx-theme-menu__option--icon {
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  padding: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.cx-theme-menu__option strong {
  display: block;
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.86rem;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cx-theme-menu__option span {
  display: block;
  margin: 0;
  color: #91a3c9;
  font-size: 0.76rem;
  line-height: 1.2;
}

.cx-theme-menu__option-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.cx-theme-menu__icon {
  width: 100%;
  height: 100%;
  display: inline-grid;
  place-items: center;
}

.cx-theme-menu__icon svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: #f2f6ff;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cx-theme-menu__option--icon .cx-theme-menu__icon {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.cx-theme-menu__option--icon .cx-theme-menu__icon svg {
  width: 20px;
  height: 20px;
}

.cx-theme-menu__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cx-theme-menu__option:hover,
.cx-theme-menu__option:focus-visible {
  border-color: rgba(132, 173, 255, 0.3);
  background: rgba(20, 31, 55, 0.98);
}

.cx-theme-menu__option.is-active {
  border-color: rgba(108, 226, 255, 0.52);
  background:
    linear-gradient(135deg, rgba(102, 223, 255, 0.12), rgba(255, 92, 185, 0.08)),
    rgba(20, 31, 55, 0.98);
  box-shadow: inset 0 0 0 1px rgba(108, 226, 255, 0.12);
}

.cx-app-drawer {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(520px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid rgba(132, 173, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 16, 30, 0.98), rgba(7, 11, 21, 0.98)),
    rgba(5, 8, 19, 0.98);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  z-index: 200;
}

.cx-app-drawer__topbar,
.cx-user-menu__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.cx-app-drawer__title,
.cx-user-menu__summary {
  display: grid;
  gap: 4px;
}

.cx-app-drawer__title strong,
.cx-user-menu__summary strong {
  margin: 0;
  color: #f2f6ff;
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cx-app-drawer__title span,
.cx-user-menu__summary span {
  color: #91a3c9;
  font-size: 0.8rem;
  line-height: 1.35;
  letter-spacing: 0.05em;
}

.cx-app-drawer__close {
  width: 40px;
  min-height: 40px;
  border: 1px solid rgba(132, 173, 255, 0.16);
  background: rgba(16, 25, 42, 0.7);
  color: #e8eefc;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.cx-app-drawer__close:hover,
.cx-app-drawer__close:focus-visible {
  background: rgba(21, 33, 56, 0.94);
  border-color: rgba(132, 173, 255, 0.32);
}

.cx-app-drawer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cx-app-drawer__tile {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 14px 12px;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(132, 173, 255, 0.14);
  background: linear-gradient(180deg, rgba(14, 23, 41, 0.96), rgba(10, 17, 30, 0.98));
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.cx-app-drawer__tile:hover,
.cx-app-drawer__tile:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(132, 173, 255, 0.34);
  background: linear-gradient(180deg, rgba(18, 29, 52, 0.98), rgba(12, 19, 35, 1));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.cx-app-drawer__tile.is-active {
  border-color: rgba(108, 226, 255, 0.52);
  background:
    linear-gradient(135deg, rgba(102, 223, 255, 0.12), rgba(255, 92, 185, 0.08)),
    linear-gradient(180deg, rgba(18, 29, 52, 0.98), rgba(12, 19, 35, 1));
  box-shadow: inset 0 0 0 1px rgba(108, 226, 255, 0.12);
}

.cx-app-drawer__tile-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(102, 223, 255, 0.18), rgba(255, 92, 185, 0.18));
  border: 1px solid rgba(132, 173, 255, 0.14);
}

.cx-app-drawer__tile-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  stroke: #e8eefc;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cx-app-drawer__tile-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.cx-app-drawer__tile-copy strong {
  display: block;
  margin: 0;
  color: #f2f6ff;
  font-size: 0.88rem;
  line-height: 1.18;
  font-weight: 700;
}

.cx-app-drawer__tile-copy small {
  display: block;
  margin: 0;
  color: #8ea3cb;
  font-size: 0.76rem;
  line-height: 1.18;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cx-app-header__user {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  min-width: 172px;
  max-width: 100%;
  background: rgba(16, 25, 42, 0.74);
  border: 1px solid rgba(132, 173, 255, 0.16);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #f2f6ff;
  text-align: left;
  cursor: pointer;
}

.cx-app-header__user:hover,
.cx-app-header__user:focus-visible,
.cx-app-header__panel-wrap.is-open > .cx-app-header__user {
  border-color: rgba(132, 173, 255, 0.34);
  background: rgba(21, 33, 56, 0.92);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cx-app-header__user-copy {
  min-width: 0;
}

.cx-app-header__user-copy strong {
  display: block;
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.96rem;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cx-app-header__user-copy span {
  display: block;
  margin: 0;
  font-size: 0.78rem;
  color: #95a5c8;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cx-user-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  padding: 14px;
  border: 1px solid rgba(132, 173, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 16, 30, 0.98), rgba(7, 11, 21, 0.98)),
    rgba(5, 8, 19, 0.98);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  z-index: 220;
}

.cx-user-menu__link {
  width: 100%;
  display: block;
  padding: 13px 14px;
  border: 1px solid rgba(132, 173, 255, 0.14);
  background: rgba(14, 22, 40, 0.94);
  color: #f2f6ff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.cx-user-menu__link + .cx-user-menu__link {
  margin-top: 10px;
}

.cx-user-menu__link strong,
.cx-user-menu__link small {
  display: block;
}

.cx-user-menu__link strong {
  margin: 0;
  color: #f2f6ff;
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cx-user-menu__link small {
  margin-top: 5px;
  color: #91a3c9;
  font-size: 0.73rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: none;
}

.cx-user-menu__section {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.cx-user-menu__label {
  color: #91a3c9;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cx-theme-menu__options--mobile {
  grid-template-columns: 1fr;
}

.cx-user-menu__link:hover,
.cx-user-menu__link:focus-visible {
  background: rgba(20, 31, 55, 0.98);
  border-color: rgba(132, 173, 255, 0.3);
}

.cx-user-menu__link--logout {
  color: #fff4f5;
  background: linear-gradient(135deg, rgba(239, 110, 125, 0.22), rgba(235, 141, 103, 0.24));
}

.cx-user-menu__close {
  width: 40px;
  min-height: 40px;
  border: 1px solid rgba(132, 173, 255, 0.16);
  background: rgba(16, 25, 42, 0.7);
  color: #e8eefc;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.cx-user-menu__close:hover,
.cx-user-menu__close:focus-visible {
  background: rgba(21, 33, 56, 0.94);
  border-color: rgba(132, 173, 255, 0.32);
}

.cx-app-header__logout {
  min-width: 0;
  padding: 0 18px;
  border: 0;
  color: #fff7f8;
  background: linear-gradient(135deg, #ef6e7d 0%, #eb8d67 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.cx-app-header__logout:hover,
.cx-app-header__logout:focus-visible {
  background: linear-gradient(135deg, #f27c87 0%, #ee9a72 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 22px rgba(239, 110, 125, 0.18);
  transform: translateY(-1px);
}

.cx-app-header__logout-icon {
  display: none;
}

.cx-theme-dock {
  position: fixed;
  left: max(18px, env(safe-area-inset-left, 0px) + 18px);
  bottom: max(18px, env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 10020;
}

.cx-theme-dock,
.cx-theme-menu,
.cx-theme-menu--dock {
  display: none !important;
}

.cx-theme-dock__trigger {
  width: 48px;
  min-height: 48px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(132, 173, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 16, 30, 0.96), rgba(7, 11, 21, 0.96)),
    rgba(5, 8, 19, 0.98);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.cx-theme-dock__trigger:hover,
.cx-theme-dock__trigger:focus-visible,
.cx-app-header__panel-wrap.is-open > .cx-theme-dock__trigger {
  border-color: rgba(132, 173, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(15, 24, 44, 0.98), rgba(10, 17, 31, 0.98)),
    rgba(5, 8, 19, 1);
}

.cx-theme-dock__trigger-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: #f2f6ff;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cx-theme-menu--dock {
  position: absolute;
  top: auto;
  right: auto;
  bottom: calc(100% + 10px);
  left: 0;
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 36px);
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(10, 16, 30, 0.98), rgba(7, 11, 21, 0.98)),
    rgba(5, 8, 19, 0.98);
  border: 1px solid rgba(132, 173, 255, 0.16);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (max-width: 1024px) {
  .cx-app-header__copy strong {
    font-size: 0.98rem;
  }

  .cx-app-header__copy small {
    font-size: 0.78rem;
  }

  .cx-app-drawer {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    padding: max(18px, env(safe-area-inset-top, 0px) + 18px) 18px max(18px, env(safe-area-inset-bottom, 0px) + 18px);
    overflow-y: auto;
    clip-path: none;
    z-index: 9999;
  }

  .cx-app-drawer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cx-app-header__user--desktop {
    display: none;
  }

  .cx-app-header__mobile-user-toggle {
    display: inline-grid;
  }

  .cx-user-menu {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 86px);
    right: 16px;
    width: min(320px, calc(100vw - 32px));
    z-index: 10000;
  }

  .cx-app-header__guest-actions {
    gap: 8px;
  }

  .cx-app-header__logout {
    width: 50px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  }

  .cx-app-header__logout-icon {
    display: inline-grid;
    place-items: center;
  }

  .cx-app-header__logout-text {
    display: none;
  }
}

@media (max-width: 760px) {
  .cx-app-header {
    padding: 16px;
    min-height: auto;
    height: auto;
    gap: 14px;
  }

  .cx-app-header__brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .cx-app-header__side {
    flex: 0 0 auto;
  }

  .cx-app-header__session {
    gap: 10px;
  }

  .cx-app-header__guest-actions {
    width: 100%;
    justify-content: stretch;
  }

  .cx-app-header__guest-link {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 12px;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
  }

  .cx-app-header__copy strong {
    font-size: 0.9rem;
  }

  .cx-app-header__copy small {
    font-size: 0.74rem;
  }

  .cx-app-drawer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .cx-app-header {
    padding: 14px 16px;
  }

  .cx-app-header__mark {
    width: 54px;
    height: 54px;
  }

  .cx-app-header__mark--wide {
    font-size: 0.76rem;
    letter-spacing: 0.04em;
  }

  .cx-app-header__brand {
    gap: 12px;
  }

  .cx-theme-dock {
    left: max(14px, env(safe-area-inset-left, 0px) + 14px);
    bottom: max(14px, env(safe-area-inset-bottom, 0px) + 14px);
  }

  .cx-theme-menu--dock {
    width: max-content;
    max-width: calc(100vw - 28px);
  }
}

/* 20260417 premium shell pass */
.cx-app-header {
  background:
    linear-gradient(180deg, rgba(11, 13, 15, 0.96), rgba(11, 13, 15, 0.88)),
    rgba(11, 13, 15, 0.92);
  border-bottom-color: rgba(245, 241, 232, 0.12);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.24);
}

.cx-app-header__mark {
  background: linear-gradient(135deg, #3ad6ff, #8c5cff);
  border-radius: 0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 16px 28px rgba(0, 0, 0, 0.16);
}

.cx-app-header__copy strong,
.cx-theme-menu__title strong,
.cx-app-drawer__title strong,
.cx-user-menu__summary strong,
.cx-user-menu__link strong {
  color: #f5f1e8;
  font-family: "Sora", "Instrument Sans", "Segoe UI", system-ui, sans-serif;
}

.cx-app-header__copy small,
.cx-theme-menu__title span,
.cx-app-drawer__title span,
.cx-user-menu__summary span,
.cx-user-menu__link small,
.cx-theme-menu__option span,
.cx-app-drawer__tile-copy small,
.cx-app-header__user-copy span {
  color: rgba(214, 208, 197, 0.72);
}

.cx-app-header__guest-link,
.cx-app-header__guest-link:visited,
.cx-app-header__launcher,
.cx-app-header__mobile-user-toggle,
.cx-app-header__user,
.cx-app-header__logout,
.cx-theme-dock__trigger,
.cx-theme-menu,
.cx-theme-menu--dock,
.cx-theme-menu__option,
.cx-app-drawer,
.cx-app-drawer__close,
.cx-app-drawer__tile,
.cx-user-menu,
.cx-user-menu__link,
.cx-user-menu__close {
  clip-path: none !important;
  border-radius: 0 !important;
}

.cx-app-header__guest-link,
.cx-app-header__guest-link:visited,
.cx-app-header__launcher,
.cx-app-header__mobile-user-toggle,
.cx-app-header__user,
.cx-theme-dock__trigger {
  border-color: rgba(245, 241, 232, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    rgba(21, 24, 27, 0.88);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cx-app-header__guest-link,
.cx-app-header__guest-link:visited,
.cx-app-header__user,
.cx-user-menu__link,
.cx-app-drawer__tile,
.cx-theme-menu__option {
  color: #f5f1e8;
}

.cx-app-header__guest-link--primary {
  border-color: rgba(58, 214, 255, 0.28);
  background: linear-gradient(135deg, #3ad6ff, #8c5cff);
}

.cx-app-header__guest-link:hover,
.cx-app-header__guest-link:focus-visible,
.cx-app-header__launcher:hover,
.cx-app-header__launcher:focus-visible,
.cx-app-header__mobile-user-toggle:hover,
.cx-app-header__mobile-user-toggle:focus-visible,
.cx-app-header__panel-wrap.is-open > .cx-app-header__launcher,
.cx-app-header__panel-wrap.is-open > .cx-app-header__mobile-user-toggle,
.cx-app-header__user:hover,
.cx-app-header__user:focus-visible,
.cx-app-header__panel-wrap.is-open > .cx-app-header__user,
.cx-theme-dock__trigger:hover,
.cx-theme-dock__trigger:focus-visible,
.cx-app-header__panel-wrap.is-open > .cx-theme-dock__trigger {
  border-color: rgba(58, 214, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 28%),
    rgba(26, 30, 33, 0.96);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cx-app-header__launcher-grid span,
.cx-app-header__mobile-user-toggle svg,
.cx-app-header__logout-icon svg,
.cx-theme-dock__trigger-icon svg,
.cx-theme-menu__icon svg,
.cx-app-drawer__tile-icon svg {
  stroke: #f5f1e8;
  background: transparent;
}

.cx-app-header__launcher-grid span {
  background: #f5f1e8;
}

.cx-theme-menu,
.cx-theme-menu--dock,
.cx-app-drawer,
.cx-user-menu {
  border-color: rgba(245, 241, 232, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 26%),
    rgba(13, 15, 18, 0.98);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cx-theme-menu__option,
.cx-app-drawer__tile,
.cx-user-menu__link,
.cx-app-drawer__close,
.cx-user-menu__close {
  border-color: rgba(245, 241, 232, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 26%),
    rgba(21, 24, 27, 0.94);
}

.cx-theme-menu__option:hover,
.cx-theme-menu__option:focus-visible,
.cx-app-drawer__tile:hover,
.cx-app-drawer__tile:focus-visible,
.cx-user-menu__link:hover,
.cx-user-menu__link:focus-visible,
.cx-app-drawer__close:hover,
.cx-app-drawer__close:focus-visible,
.cx-user-menu__close:hover,
.cx-user-menu__close:focus-visible {
  border-color: rgba(58, 214, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 26%),
    rgba(25, 29, 32, 0.98);
}

.cx-theme-menu__option.is-active,
.cx-app-drawer__tile.is-active {
  border-color: rgba(140, 92, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(58, 214, 255, 0.12), rgba(140, 92, 255, 0.1)),
    rgba(25, 29, 32, 0.98);
  box-shadow: inset 0 0 0 1px rgba(140, 92, 255, 0.08);
}

.cx-app-drawer__tile-icon,
.cx-theme-menu__icon {
  border-color: rgba(245, 241, 232, 0.1);
  background: linear-gradient(135deg, rgba(58, 214, 255, 0.16), rgba(140, 92, 255, 0.16));
}

.cx-app-header__logout {
  background: linear-gradient(135deg, #e06b58, #b84452);
}

.cx-app-header__logout:hover,
.cx-app-header__logout:focus-visible {
  background: linear-gradient(135deg, #e87a65, #c74d5d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 24px rgba(176, 68, 82, 0.22);
}

html[data-cx-theme="light"] .cx-app-header {
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(250, 244, 234, 0.92)),
    rgba(255, 250, 243, 0.96);
  border-bottom-color: rgba(25, 24, 22, 0.12);
  box-shadow: 0 16px 36px rgba(77, 59, 38, 0.08);
}

html[data-cx-theme="light"] .cx-app-header__copy strong,
html[data-cx-theme="light"] .cx-theme-menu__title strong,
html[data-cx-theme="light"] .cx-app-drawer__title strong,
html[data-cx-theme="light"] .cx-user-menu__summary strong,
html[data-cx-theme="light"] .cx-user-menu__link strong,
html[data-cx-theme="light"] .cx-app-header__user-copy strong,
html[data-cx-theme="light"] .cx-app-drawer__tile-copy strong {
  color: #191816;
}

html[data-cx-theme="light"] .cx-app-header__copy small,
html[data-cx-theme="light"] .cx-theme-menu__title span,
html[data-cx-theme="light"] .cx-app-drawer__title span,
html[data-cx-theme="light"] .cx-user-menu__summary span,
html[data-cx-theme="light"] .cx-user-menu__link small,
html[data-cx-theme="light"] .cx-theme-menu__option span,
html[data-cx-theme="light"] .cx-app-drawer__tile-copy small,
html[data-cx-theme="light"] .cx-app-header__user-copy span {
  color: rgba(71, 67, 61, 0.72);
}

html[data-cx-theme="light"] .cx-app-header__guest-link,
html[data-cx-theme="light"] .cx-app-header__guest-link:visited,
html[data-cx-theme="light"] .cx-app-header__launcher,
html[data-cx-theme="light"] .cx-app-header__mobile-user-toggle,
html[data-cx-theme="light"] .cx-app-header__user,
html[data-cx-theme="light"] .cx-theme-dock__trigger,
html[data-cx-theme="light"] .cx-theme-menu,
html[data-cx-theme="light"] .cx-theme-menu--dock,
html[data-cx-theme="light"] .cx-app-drawer,
html[data-cx-theme="light"] .cx-user-menu,
html[data-cx-theme="light"] .cx-theme-menu__option,
html[data-cx-theme="light"] .cx-app-drawer__tile,
html[data-cx-theme="light"] .cx-user-menu__link,
html[data-cx-theme="light"] .cx-app-drawer__close,
html[data-cx-theme="light"] .cx-user-menu__close {
  color: #191816;
  border-color: rgba(25, 24, 22, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 26%),
    rgba(255, 250, 243, 0.98);
  box-shadow:
    0 16px 32px rgba(77, 59, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

html[data-cx-theme="light"] .cx-theme-menu__option:hover,
html[data-cx-theme="light"] .cx-theme-menu__option:focus-visible,
html[data-cx-theme="light"] .cx-app-drawer__tile:hover,
html[data-cx-theme="light"] .cx-app-drawer__tile:focus-visible,
html[data-cx-theme="light"] .cx-user-menu__link:hover,
html[data-cx-theme="light"] .cx-user-menu__link:focus-visible,
html[data-cx-theme="light"] .cx-app-drawer__close:hover,
html[data-cx-theme="light"] .cx-user-menu__close:hover,
html[data-cx-theme="light"] .cx-app-header__guest-link:hover,
html[data-cx-theme="light"] .cx-app-header__guest-link:focus-visible,
html[data-cx-theme="light"] .cx-app-header__launcher:hover,
html[data-cx-theme="light"] .cx-app-header__launcher:focus-visible,
html[data-cx-theme="light"] .cx-app-header__mobile-user-toggle:hover,
html[data-cx-theme="light"] .cx-app-header__mobile-user-toggle:focus-visible,
html[data-cx-theme="light"] .cx-app-header__user:hover,
html[data-cx-theme="light"] .cx-app-header__user:focus-visible,
html[data-cx-theme="light"] .cx-theme-dock__trigger:hover,
html[data-cx-theme="light"] .cx-theme-dock__trigger:focus-visible {
  border-color: rgba(188, 97, 55, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent 26%),
    rgba(255, 247, 239, 0.98);
}

html[data-cx-theme="light"] .cx-app-header__launcher-grid span {
  background: #191816;
}

html[data-cx-theme="light"] .cx-app-header__mobile-user-toggle svg,
html[data-cx-theme="light"] .cx-app-header__logout-icon svg,
html[data-cx-theme="light"] .cx-theme-dock__trigger-icon svg,
html[data-cx-theme="light"] .cx-theme-menu__icon svg,
html[data-cx-theme="light"] .cx-app-drawer__tile-icon svg {
  stroke: #191816;
}

/* 20260417 director cut */
.cx-app-header {
  position: sticky;
  top: 0;
  background:
    linear-gradient(180deg, rgba(7, 8, 11, 0.96), rgba(7, 8, 11, 0.86)),
    rgba(7, 8, 11, 0.9);
  border-bottom-color: rgba(244, 236, 223, 0.12);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cx-app-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(58, 214, 255, 0.92), rgba(140, 92, 255, 0.92), transparent 78%);
  opacity: 0.78;
  pointer-events: none;
}

.cx-app-header__mark {
  background: linear-gradient(135deg, #3ad6ff, #8c5cff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 18px 34px rgba(0, 0, 0, 0.18);
}

.cx-app-header__guest-link,
.cx-app-header__guest-link:visited,
.cx-app-header__launcher,
.cx-app-header__mobile-user-toggle,
.cx-app-header__user,
.cx-app-header__logout,
.cx-theme-dock__trigger {
  border-color: rgba(244, 236, 223, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    rgba(16, 19, 24, 0.84);
}

.cx-app-header__guest-link--primary {
  background: linear-gradient(135deg, #3ad6ff, #8c5cff);
  border-color: rgba(58, 214, 255, 0.26);
}

.cx-app-header__guest-link:hover,
.cx-app-header__guest-link:focus-visible,
.cx-app-header__launcher:hover,
.cx-app-header__launcher:focus-visible,
.cx-app-header__mobile-user-toggle:hover,
.cx-app-header__mobile-user-toggle:focus-visible,
.cx-app-header__user:hover,
.cx-app-header__user:focus-visible,
.cx-theme-dock__trigger:hover,
.cx-theme-dock__trigger:focus-visible {
  border-color: rgba(58, 214, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 28%),
    rgba(19, 23, 29, 0.98);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cx-theme-menu,
.cx-theme-menu--dock,
.cx-app-drawer,
.cx-user-menu {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 24%),
    rgba(9, 12, 16, 0.98);
  border-color: rgba(244, 236, 223, 0.12);
  box-shadow:
    0 32px 84px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cx-theme-menu__option:hover,
.cx-theme-menu__option:focus-visible,
.cx-app-drawer__tile:hover,
.cx-app-drawer__tile:focus-visible,
.cx-user-menu__link:hover,
.cx-user-menu__link:focus-visible {
  background:
    linear-gradient(135deg, rgba(58, 214, 255, 0.12), rgba(140, 92, 255, 0.08)),
    rgba(18, 22, 28, 0.98);
}

html[data-cx-theme="light"] .cx-app-header {
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.94), rgba(255, 250, 244, 0.86)),
    rgba(255, 250, 244, 0.9);
  border-bottom-color: rgba(20, 20, 18, 0.12);
  box-shadow:
    0 20px 54px rgba(73, 44, 23, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

html[data-cx-theme="light"] .cx-app-header::after {
  background: linear-gradient(90deg, rgba(23, 127, 166, 0.9), rgba(109, 79, 227, 0.78), transparent 78%);
}

html[data-cx-theme="light"] .cx-app-header__mark {
  background: linear-gradient(135deg, #177fa6, #6d4fe3);
}

html[data-cx-theme="light"] .cx-app-header__guest-link,
html[data-cx-theme="light"] .cx-app-header__guest-link:visited,
html[data-cx-theme="light"] .cx-app-header__launcher,
html[data-cx-theme="light"] .cx-app-header__mobile-user-toggle,
html[data-cx-theme="light"] .cx-app-header__user,
html[data-cx-theme="light"] .cx-app-header__logout,
html[data-cx-theme="light"] .cx-theme-dock__trigger {
  border-color: rgba(20, 20, 18, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent 28%),
    rgba(255, 248, 239, 0.92);
  box-shadow:
    0 14px 30px rgba(73, 44, 23, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

html[data-cx-theme="light"] .cx-app-header__guest-link--primary {
  background: linear-gradient(135deg, #177fa6, #6d4fe3);
  border-color: rgba(23, 127, 166, 0.24);
}

html[data-cx-theme="light"] .cx-theme-menu,
html[data-cx-theme="light"] .cx-theme-menu--dock,
html[data-cx-theme="light"] .cx-app-drawer,
html[data-cx-theme="light"] .cx-user-menu {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), transparent 24%),
    rgba(255, 250, 244, 0.98);
  border-color: rgba(20, 20, 18, 0.12);
  box-shadow:
    0 26px 64px rgba(73, 44, 23, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}
