:root {
  --dm-shell-sidebar: 270px;
  --dm-shell-bg: #1e1f22;
  --dm-shell-sidebar-bg: #111214;
  --dm-shell-border: rgba(255, 255, 255, 0.09);
}

html,
body {
  min-height: 100%;
  max-width: 100%;
}

body.dm-app-shell {
  box-sizing: border-box;
  overflow-x: hidden;
  min-height: 100vh;
  padding-top: 0 !important;
  background:
    radial-gradient(
      circle at 76% 12%,
      color-mix(in srgb, var(--dm-accent) 13%, transparent),
      transparent 34%
    ),
    radial-gradient(
      circle at 34% 100%,
      color-mix(in srgb, var(--dm-accent-2) 8%, transparent),
      transparent 38%
    ),
    var(--dm-shell-bg);
  background-attachment: fixed;
}

body.dm-app-shell *,
body.dm-app-shell *::before,
body.dm-app-shell *::after {
  box-sizing: border-box;
}

body.dm-shell-pending::before,
body.dm-shell-pending::after {
  position: fixed;
  z-index: 9998;
  pointer-events: none;
}

body.dm-shell-pending::before {
  content: "";
  inset: 0;
  background: #111214;
}

body.dm-shell-pending::after {
  content: "Loading…";
  top: 50%;
  left: 50%;
  z-index: 9999;
  color: #8993a5;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
}

body.dm-app-shell #siteHeader {
  display: none !important;
}

body.dm-app-shell .profile-settings-shell {
  display: grid;
  grid-template-columns: var(--dm-shell-sidebar) minmax(0, 1fr);
  gap: 0;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background:
    linear-gradient(
      to right,
      var(--dm-shell-sidebar-bg) 0,
      var(--dm-shell-sidebar-bg) var(--dm-shell-sidebar),
      transparent var(--dm-shell-sidebar),
      transparent 100%
    );
}

body.dm-app-shell .profile-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  box-sizing: border-box;
  width: var(--dm-shell-sidebar);
  height: 100vh;
  padding: 24px 14px 28px;
  overflow-y: auto;
  background: var(--dm-shell-sidebar-bg);
  border-right: 1px solid var(--dm-shell-border);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.16) transparent;
}

body.dm-app-shell .profile-settings-main {
  box-sizing: border-box;
  width: 100%;
  max-width: 1080px;
  min-width: 0;
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 56px 40px 72px;
}

.dm-signed-out-actions {
  display: flex;
  margin-top: 16px;
}

.dm-sidebar-profile {
  margin: 0 4px 24px;
  padding: 0 4px 22px;
  border-bottom: 1px solid var(--dm-shell-border);
}

.dm-sidebar-profile__identity {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.dm-sidebar-profile__avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 2px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--dm-accent), var(--dm-accent-2));
}

.dm-sidebar-profile__avatar {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 13px;
  object-fit: cover;
  background: #191b20;
}

.dm-sidebar-profile__name {
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-sidebar-profile__membership {
  margin-top: 3px;
  overflow: hidden;
  color: #8b95a7;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-sidebar-profile__accounts {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.dm-account-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.dm-account-row__label {
  color: #737d90;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dm-account-icons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dm-account-icon {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px;
  background: rgba(255,255,255,.045);
  color: #626a78;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  opacity: .55;
}

.dm-account-icon.is-linked {
  opacity: 1;
  color: #fff;
  border-color: color-mix(in srgb, var(--platform-color) 60%, white 12%);
  background: color-mix(in srgb, var(--platform-color) 24%, #18191d);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--platform-color) 15%, transparent);
}

.dm-account-icon[data-platform="twitch"] { --platform-color: #9146ff; }
.dm-account-icon[data-platform="discord"] { --platform-color: #5865f2; }
.dm-account-icon[data-platform="youtube"] { --platform-color: #ff0033; }
.dm-account-icon[data-platform="kick"] { --platform-color: #53fc18; }

.dm-account-icon img {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .62;
}

.dm-account-icon.is-linked img {
  filter: none;
  opacity: 1;
}

.dm-sidebar-error {
  padding: 14px;
  border: 1px solid rgba(255,107,107,.24);
  border-radius: 8px;
  background: rgba(255,107,107,.08);
  color: #ffdede;
  font-size: 12px;
  line-height: 1.5;
}

.dm-sidebar-signout {
  flex: 1 1 auto;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 7px;
  background: rgba(255,255,255,.035);
  color: #bbc3cf;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.dm-sidebar-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 16px;
}

.dm-sidebar-notifications {
  position: relative;
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 7px;
  background: rgba(255,255,255,.035);
  color: #d9ddea;
  text-decoration: none;
  font-size: 16px;
}

.dm-sidebar-notifications:hover {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.075);
}

.dm-sidebar-notifications__dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid #17181c;
  border-radius: 50%;
  background: #ff4d4d;
}

.dm-sidebar-signout:hover {
  border-color: rgba(255,107,107,.35);
  background: rgba(255,107,107,.09);
  color: #ffdede;
}

.dm-sidebar-section {
  margin: 4px 0;
}

body.dm-app-shell .profile-sidebar-title.dm-sidebar-section__toggle {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8b95a7;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

body.dm-app-shell .dm-sidebar-section__toggle:hover,
body.dm-app-shell .dm-sidebar-section__toggle:focus-visible {
  background: rgba(255,255,255,.06);
  color: #d5d9e2;
  outline: none;
}

.dm-sidebar-section__chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform .16s ease;
}

.dm-sidebar-section.is-open .dm-sidebar-section__chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.dm-sidebar-section__links {
  padding: 1px 0 5px;
}

.dm-sidebar-section__links[hidden] {
  display: none;
}

body.dm-app-shell .profile-side-link {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 650;
}

body.dm-app-shell .profile-side-link:hover {
  transform: none;
  background: rgba(255,255,255,.06);
}

body.dm-app-shell .profile-side-link::before {
  display: none;
}

body.dm-app-shell .profile-side-link.active {
  background: color-mix(in srgb, var(--dm-accent) 20%, #2b2d31);
  box-shadow: inset 3px 0 0 var(--dm-accent);
}

.dm-shell-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: #111214;
  opacity: 1;
  transition: opacity .2s ease;
}

.dm-shell-ready .dm-shell-loading {
  opacity: 0;
  pointer-events: none;
}

.dm-shell-loading__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: #8993a5;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dm-shell-loading__inner img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  animation: dm-spin 4s linear infinite;
  filter: drop-shadow(0 0 12px rgba(0,0,0,.7));
}

.dm-shell-loading__dots::after {
  content: "";
  animation: dm-dots 2s steps(4, end) infinite;
}

.dm-app-footer {
  width: 100%;
  margin-left: 0;
}

.dm-app-footer .dm-footer {
  margin-top: 0;
}

.dm-mobile-sidebar-toggle,
.dm-mobile-sidebar-backdrop {
  display: none;
}

@media (max-width: 760px) {
  :root { --dm-shell-sidebar: min(86vw, 330px); }

  body.dm-app-shell .profile-settings-shell {
    display: block;
    background: transparent;
  }

  body.dm-app-shell .profile-sidebar {
    display: block;
    position: fixed;
    z-index: 10020;
    top: 0;
    left: 0;
    box-sizing: border-box;
    width: var(--dm-shell-sidebar);
    height: 100dvh;
    max-height: 100dvh;
    padding: 76px 20px 18px;
    overflow-y: auto;
    border-right: 1px solid var(--dm-shell-border);
    border-bottom: 0;
    box-shadow: 18px 0 50px rgba(0, 0, 0, .38);
    transform: translateX(-105%);
    transition: transform .22s ease;
    overscroll-behavior: contain;
  }

  body.dm-app-shell.dm-sidebar-open {
    overflow: hidden;
  }

  body.dm-app-shell.dm-sidebar-open .profile-sidebar {
    transform: translateX(0);
  }

  .dm-mobile-sidebar-toggle {
    position: fixed;
    z-index: 10030;
    top: max(14px, env(safe-area-inset-top));
    left: 14px;
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    background: color-mix(in srgb, var(--dm-shell-sidebar-bg) 92%, transparent);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    backdrop-filter: blur(12px);
    cursor: pointer;
  }

  body.dm-app-shell.dm-sidebar-available .dm-mobile-sidebar-toggle {
    display: grid;
  }

  .dm-mobile-sidebar-toggle__icon {
    display: grid;
    width: 20px;
    gap: 4px;
  }

  .dm-mobile-sidebar-toggle__icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
  }

  body.dm-app-shell.dm-sidebar-open .dm-mobile-sidebar-toggle__icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.dm-app-shell.dm-sidebar-open .dm-mobile-sidebar-toggle__icon span:nth-child(2) {
    opacity: 0;
  }

  body.dm-app-shell.dm-sidebar-open .dm-mobile-sidebar-toggle__icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .dm-mobile-sidebar-backdrop {
    position: fixed;
    z-index: 10010;
    inset: 0;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(4, 5, 8, .68);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }

  body.dm-app-shell.dm-sidebar-open .dm-mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.dm-app-shell .profile-settings-main {
    padding: 76px 20px 52px;
  }

  .dm-sidebar-profile {
    margin-bottom: 12px;
  }

  @media (prefers-reduced-motion: reduce) {
    body.dm-app-shell .profile-sidebar,
    .dm-mobile-sidebar-backdrop,
    .dm-mobile-sidebar-toggle__icon span {
      transition: none;
    }
  }

}
