/* Layout boundaries between the preserved game and restored owner components. */
#restored-ui .player-settings.ps-reading-policy .ps-scroll {
  padding: 0;
  scroll-padding-block-start: 60px;
}
.ps-reading-policy :is(.ps-page-heading, .ps-bottom) {
  display: none;
}
.ps-policy-nav {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  border-bottom: 1px solid var(--ps-line);
  background: var(--ps-bg);
}
.ps-policy-switcher,
.ps-policy-document {
  width: min(100% - 2 * clamp(16px, 4vw, 44px), 704px);
  margin-inline: auto;
}
.ps-policy-switcher {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
}
.ps-policy-switcher button {
  position: relative;
  min-height: 48px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--ps-muted);
  font: 600 0.875rem/1.25 var(--body);
  cursor: pointer;
}
.ps-policy-switcher button:is(:hover, [aria-current='page']) {
  color: var(--ps-text);
}
.ps-policy-switcher button[aria-current='page']::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--ps-accent);
}
.ps-policy-switcher button:focus-visible,
.ps-policy-document summary:focus-visible {
  outline: 2px solid var(--ps-accent);
  outline-offset: -3px;
  border-radius: 4px;
}
.ps-policy-document {
  padding-block: clamp(24px, 4vw, 48px) 48px;
  color: var(--ps-text);
  font-size: 0.9375rem;
  line-height: 1.72;
  overflow-wrap: anywhere;
}
.ps-policy-document .intro {
  margin-block-end: 24px;
}
.ps-policy-document .intro .eyebrow {
  display: none;
}
.ps-policy-document h2 {
  margin: 0;
  font: 600 clamp(1.75rem, 4vw, 2.5rem) / 1.15 var(--display);
  letter-spacing: -0.03em;
}
.ps-policy-document h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  line-height: 1.4;
}
.ps-policy-document p {
  margin: 8px 0 0;
}
.ps-policy-document .intro p,
.ps-policy-document .date,
.ps-policy-document .notice p {
  color: var(--ps-muted);
}
.ps-policy-document .date {
  display: block;
  margin-block-start: 12px;
  font-size: 0.8125rem;
}
.ps-policy-document .notice {
  padding: 10px 16px;
  border-inline-start: 2px solid var(--ps-line);
  background: var(--ps-panel);
  font-size: 0.8125rem;
}
.ps-policy-document .notice p {
  margin-block-start: 2px;
}
.ps-policy-outline {
  margin: 20px 0 24px;
  border-block: 1px solid var(--ps-line);
}
.ps-policy-outline summary {
  padding: 10px 3px;
  color: var(--ps-text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.ps-policy-outline .contents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 6px 18px;
  padding-block: 0 14px;
  font-size: 0.875rem;
}
.ps-policy-document :is(.contents, article) a {
  color: var(--ps-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ps-policy-document article section {
  padding-block: 20px;
  scroll-margin-block-start: 8px;
}
.ps-policy-document article section + section {
  border-block-start: 1px solid var(--ps-line);
}
.ps-policy-document article section:first-child {
  padding-block-start: 0;
}
#restored-ui .player-settings.ps-public-policies[open] {
  grid-template-columns: minmax(0, 1fr);
  width: min(760px, calc(100vw - 28px));
  height: min(780px, calc(100dvh - 32px));
}
#restored-ui .ps-public-policies :is(.ps-rail, .ps-sections-toggle, .ps-breadcrumb-root) {
  display: none;
}

@media (min-width: 701px) and (min-height: 501px), (min-width: 951px) {
  #restored-ui .player-settings:not(.ps-public-policies, .ps-public-appearance, .dedicated-coin-studio)[open] {
    width: min(1240px, calc(100vw - 52px));
    height: min(880px, calc(100dvh - 52px));
    grid-template-columns: 252px minmax(0, 1fr);
  }
  #restored-ui .player-settings .ps-rail {
    padding-inline: 15px;
  }
  #restored-ui .player-settings .ps-brand {
    margin-bottom: 16px;
  }
  #restored-ui .player-settings .ps-identity {
    padding-bottom: 16px;
  }
  #restored-ui .player-settings .ps-nav-group {
    margin-bottom: 8px;
  }
  #restored-ui .player-settings .ps-rail nav button {
    min-height: 36px;
    font-size: 12px;
  }
  #restored-ui .player-settings .ps-rail nav [data-ps-page='experience'] {
    gap: 5px;
    padding-inline: 8px;
  }
  #restored-ui .player-settings [data-ps-page='experience'] .ps-nav-text {
    white-space: nowrap;
  }
}

#restored-ui .player-settings .ps-rail nav button {
  border-radius: 6px;
}
#restored-ui .player-settings .ps-nav-group > summary {
  font-size: 12px;
}
#restored-ui .player-settings .ps-nav-children {
  border-color: var(--ps-line);
}
#restored-ui .player-settings .ps-nav-chevron {
  width: 6px;
  height: 6px;
  margin-inline: 8px 2px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  color: var(--ps-muted);
  transform: rotate(-45deg);
}
#restored-ui .player-settings details[open] > summary > .ps-nav-chevron {
  transform: translateY(-2px) rotate(45deg);
}
#restored-ui .player-settings .ps-rail nav .website-theme-beta {
  flex: none;
  font-size: 9px;
  line-height: 1.25;
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  html body.restored-ui-active #restored-ui .player-settings.ps-public-policies[open] {
    height: min(780px, calc(var(--review-popup-height, 100dvh) - 32px)) !important;
  }
}

body.restored-ui-active #desktop-sidebar {
  display: none !important;
}
body.restored-ui-active {
  --rail-duration: 300ms;
  --rail-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --restored-sidebar: 224px;
}
body.restored-ui-active.sidebar-collapsed {
  --restored-sidebar: 80px;
}
body.restored-ui-active > .workspace {
  margin-left: var(--restored-sidebar);
  transition: margin-left var(--rail-duration) var(--rail-ease);
}
#restored-ui .dashboard-sidebar {
  z-index: 25;
}
body.battle-page #restored-ui .dashboard-sidebar {
  contain: paint;
}
body:not(.sidebar-collapsed) #restored-ui #dashboard-sidebar nav :is(a, button:where(.reward-inbox-nav)) > span {
  font-size: 1.1em;
  font-weight: 550;
}
#restored-ui .sidebar-user-bar {
  margin-top: 12px;
}
.sidebar-collapsed #restored-ui .sidebar-user-bar {
  margin-top: auto;
}
/* Route-specific game styles must not resize the shared sidebar promotion. */
#restored-ui #dashboard-sidebar .restored-membership-promo {
  margin-top: auto;
  flex-shrink: 0;
  padding: 13px 12px;
  border: 1px solid var(--website-line-69-81-58-1, #45513a);
  border-radius: 10px;
  background: var(--website-surface-211-245-154-0_027450980392156862, #d3f59a07);
  font:
    15px/24px Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}
#restored-ui #dashboard-sidebar .restored-membership-promo > span {
  display: none;
}
#restored-ui #dashboard-sidebar .restored-membership-promo h3 {
  color: var(--text, var(--website-ink-240-240-222-1, #f0f0de));
  font:
    500 22px/1.15 Inter,
    system-ui,
    sans-serif;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
}
#restored-ui #dashboard-sidebar .restored-membership-promo p {
  color: var(--muted, var(--website-ink-166-173-153-1, #a6ad99));
  font: inherit;
  font-size: 10px;
  line-height: 15px;
  text-wrap: wrap;
  margin: 0 0 8px;
}
#restored-ui #dashboard-sidebar .restored-membership-promo a {
  color: var(--lime, var(--website-ink-211-245-154-1, #d3f59a));
  font: inherit;
  font-size: 11px;
  line-height: 17.6px;
  text-decoration: none;
}
#restored-ui #dashboard-sidebar .restored-membership-promo a:hover {
  text-decoration: underline;
}
#restored-ui #dashboard-sidebar .restored-membership-promo small {
  display: block;
  color: var(--muted, var(--website-ink-166-173-153-1, #a6ad99));
  font: inherit;
  font-size: 8px;
  line-height: 12px;
  letter-spacing: 0.7px;
  margin-top: 10px;
}
body.sidebar-collapsed #restored-ui #dashboard-sidebar .restored-membership-promo {
  display: none;
}
#restored-ui #dashboard-sidebar .sidebar-saved-coins {
  text-align: center;
  padding: 9px 10px;
}
#restored-ui #dashboard-sidebar .sidebar-saved-coins canvas:not([hidden]) {
  display: block;
  width: 100%;
  height: 136px;
}
#restored-ui #dashboard-sidebar .sidebar-saved-coins p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 18px;
  font-weight: 750;
  color: color-mix(
    in srgb,
    var(--rail-coin-color, var(--website-ink-201-219-167-1, #c9dba7)) 60%,
    var(--website-ink-255-255-255-1, #fff)
  );
  text-shadow: 0 2px 2px var(--website-shade-0-0-0-0_9333333333333333, #000e);
}
#restored-ui .sidebar-footer {
  margin-top: 12px;
}
#restored-content {
  min-width: 0;
}
.restored-surface > .restored-state {
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: none;
}
body[data-restored-route='membership'] #view-membership,
body[data-restored-route='friends'] #view-friends,
body[data-restored-route='guilds'] #view-guilds,
body[data-restored-route='chat'] #view-chat,
body[data-restored-route='stats'] #view-play {
  display: none !important;
}
body:not([data-restored-route='membership']):not([data-restored-route='friends']):not(
    [data-restored-route='guilds']
  ):not([data-restored-route='chat']):not([data-restored-route='stats'])
  #restored-content {
  display: none;
}
.restored-surface {
  font:
    14px/1.5 Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--text, var(--website-ink-238-241-228-1, #eef1e4));
  --rail-duration: 300ms;
  --rail-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
body.restored-ui-active .topbar {
  position: relative;
  z-index: 30;
  gap: 16px;
  height: 48px;
  flex-shrink: 0;
}
#restored-ui .dashboard-sidebar .sidebar-label {
  margin: 16px 10px 18px;
}
@media (max-height: 740px) {
  #restored-ui .dashboard-sidebar .sidebar-label {
    margin-top: 10px;
    margin-bottom: 12px;
  }
}
@media (max-height: 650px) {
  #restored-ui .dashboard-sidebar .sidebar-label {
    margin-bottom: 7px;
  }
}
body.restored-ui-active .topbar .early-badge {
  position: static;
  transform: none;
  flex: none;
  font-size: 10px;
  letter-spacing: 1px;
}
body.restored-ui-active .mobile-header-actions > .daily-mobile-button {
  display: none;
}
.topbar-missions .mission-trigger-icon {
  display: none;
}
body.restored-ui-active .topbar > .top-actions > .topbar-missions,
body.restored-ui-active .topbar > .top-actions > .daily-missions-topbar {
  display: none !important;
}
body.restored-ui-active .topbar .topbar-mission-menu {
  position: relative;
  margin-left: 0;
  flex: none;
  z-index: 15;
  order: initial;
}
body.restored-ui-active .topbar > .top-actions {
  order: initial;
  margin-left: auto;
}
body.restored-ui-active #sidebar-toggle.restored-toggle {
  display: grid;
  place-items: center;
  position: static;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 7px;
  border: 1px solid var(--website-line-59-71-48-1, #3b4730);
  border-radius: 8px;
  background: var(--website-surface-25-32-21-1, #192015);
  color: var(--website-ink-170-185-152-1, #aab998);
  transition:
    background-color 160ms,
    border-color 160ms,
    box-shadow 160ms;
}
#sidebar-toggle.restored-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#sidebar-toggle.restored-toggle:hover {
  background: var(--website-surface-42-53-32-1, #2a3520);
  border-color: var(--website-line-128-154-84-1, #809a54);
  box-shadow: 0 0 0 3px var(--website-shade-183-215-126-0_047058823529411764, #b7d77e0c);
  color: var(--website-ink-220-242-181-1, #dcf2b5);
}
#sidebar-toggle.restored-toggle .toggle-chevron {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--rail-duration) var(--rail-ease);
}
.sidebar-collapsed #sidebar-toggle.restored-toggle .toggle-chevron {
  transform: rotate(180deg);
}
body.restored-ui-active .your-ranking-person {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
  max-width: 100%;
  text-align: left;
}
body.restored-ui-active :is(.your-ranking-person, .ranked-row-player, .social-identity) .styled-name {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.25;
}
body.restored-ui-active .styled-name .nickname {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
}
body.restored-ui-active .styled-name .display-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap !important;
  flex: 0 0 auto;
}
body.restored-ui-active .your-ranking-person .styled-name:after {
  position: static;
  flex: 0 0 auto;
}
body.restored-ui-active .your-ranking-person :is(.name-badge, .ranked-name-badge) {
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
}
.restored-surface .social-identity strong,
.restored-surface .styled-name > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.restored-surface .styled-name {
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
}
.restored-surface .ranked-name-badge {
  flex: 0 0 auto;
  white-space: nowrap;
}
.restored-surface #user-stats-page[hidden] {
  display: none;
}
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active > .workspace {
    margin-left: 0;
    overflow-x: clip;
  }
  #restored-ui .dashboard-sidebar {
    display: none;
  }
  body.restored-ui-active #sidebar-toggle.restored-toggle {
    display: none;
  }
  body.restored-ui-active .topbar {
    display: none;
  }
  body.restored-ui-active .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .mobile-header .topbar-mission-menu {
    flex: none;
  }
  .mobile-header .topbar-missions {
    display: grid;
    grid-template-rows: 20px 12px;
    place-content: center;
    justify-items: center;
    gap: 2px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--website-ink-213-245-155-1, #d5f59b);
  }
  .mobile-header .topbar-missions :is(.mission-trigger-label, .mission-chevron) {
    display: none;
  }
  .mobile-header .topbar-missions .mission-trigger-icon {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-header #topbar-mission-count {
    margin: 0;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--website-surface-53-67-40-1, #354328);
    color: var(--website-ink-213-245-155-1, #d5f59b);
    font-size: 9px;
    line-height: 12px;
    font-variant-numeric: tabular-nums;
  }
  .mobile-header .missions-dropdown {
    right: 16px;
    top: calc(100% + 6px);
    width: min(390px, calc(100vw - 32px));
  }
  .restored-surface .player-settings {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.restored-ui-active > .workspace,
  #sidebar-toggle.restored-toggle .toggle-chevron {
    transition: none;
  }
}
.player-reduced-motion #sidebar-toggle.restored-toggle .toggle-chevron {
  transition: none !important;
}

#restored-ui #ps-public-avatar > .avatar-slot.has-frame {
  scale: 1.08;
}

/* Keep the original Profile Editor badge tile layout; only update its rarity colors. */
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='bronze'] {
  border-color: #956548;
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='bronze'] .ranked-name-badge {
  color: #e7ad7c;
  border-color: #956548;
  background: linear-gradient(145deg, #30231b, var(--website-surface-33-29-24-1, #211d18));
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='silver'] {
  border-color: #778c9c;
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='silver'] .ranked-name-badge {
  color: #c9d9e6;
  border-color: #778c9c;
  background: linear-gradient(145deg, #26313a, var(--website-surface-27-34-39-1, #1b2227));
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='gold'] {
  border-color: #a7863e;
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='gold'] .ranked-name-badge {
  color: #f0ce75;
  border-color: #a7863e;
  background: linear-gradient(145deg, #382f1b, var(--website-surface-36-33-23-1, #242117));
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='prism'] {
  border-color: #c7a4e5;
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='prism'] .ranked-name-badge {
  color: var(--website-ink-217-255-241-1, #d9fff1);
  border-color: #9be8d1;
  background: linear-gradient(115deg, #254039, #332643, #422532, #41391f);
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='gold'] {
  box-shadow:
    inset 0 0 0 1px #d8aa4a55,
    0 0 12px #d8aa4a22;
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='gold'] .ranked-name-badge {
  border-style: double;
  border-width: 3px;
  box-shadow: 0 0 9px #eac36b33;
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='prism'] {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--website-surface-28-33-25-1, #1c2119), var(--website-surface-28-33-25-1, #1c2119)) padding-box,
    linear-gradient(120deg, #9ce9d3, #beb4f6, #f0b0d1, #f4d991, #9ce9d3) border-box;
  background-size:
    100% 100%,
    220% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='prism'] {
    animation: profile-prism-wave 2s ease-in-out infinite alternate;
  }
}
@keyframes profile-prism-wave {
  to {
    background-position:
      0 0,
      100% 0;
  }
}

/* Inherited master dialog caps must not compress the original editor. */
.restored-surface dialog {
  max-width: calc(100vw - 28px);
}
.restored-surface .community-dialog.profile-studio-dialog {
  width: min(1100px, calc(100vw - 48px));
  max-width: calc(100vw - 28px);
}
/* The profile-studio heading is an accessibility focus target, not selectable copy. */
.restored-surface .profile-studio-dialog .profile-studio > header h2 {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.restored-surface .profile-studio-dialog .profile-studio > header h2:focus {
  outline: none;
}
.restored-surface .missions-dialog .mission-detail {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 8px;
  padding: 15px 13px;
  border: 1px solid var(--website-line-65-76-54-1, #414c36);
  border-radius: 13px;
  background: var(--website-surface-28-36-26-1, #1c241a);
  margin: 10px 0;
  min-height: 104px;
}
.restored-surface .missions-dialog .mission-detail.complete {
  border-color: var(--website-line-117-140-83-1, #758c53);
  background: var(--website-surface-43-54-32-1, #2b3620);
}
.restored-surface .missions-dialog .mission-detail .daily-mission-icon {
  grid-column: 1;
  grid-row: 1 / span 4;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--website-line-91-107-69-1, #5b6b45);
  border-radius: 50%;
  color: var(--website-ink-212-249-155-1, #d4f99b);
  font-size: 19px;
}
.restored-surface .missions-dialog .mission-detail > div {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.restored-surface .missions-dialog .mission-detail h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 5px;
}
.restored-surface .missions-dialog .mission-detail p {
  margin: 0;
  color: var(--website-ink-173-185-159-1, #adb99f);
  font-size: 12px;
  line-height: 1.45;
}
.restored-surface .missions-dialog .mission-detail > strong {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  color: var(--website-ink-212-249-155-1, #d4f99b);
  font-size: 11px;
  white-space: nowrap;
}
.restored-surface .missions-dialog .mission-detail progress {
  grid-column: 2 / 4;
  grid-row: 2;
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 99px;
  background: var(--website-surface-56-67-47-1, #38432f);
  color: var(--website-ink-200-238-145-1, #c8ee91);
}
.restored-surface .missions-dialog .mission-detail progress::-webkit-progress-bar {
  border-radius: 99px;
  background: var(--website-surface-56-67-47-1, #38432f);
}
.restored-surface .missions-dialog .mission-detail progress::-webkit-progress-value {
  border-radius: 99px;
  background: var(--website-surface-200-238-145-1, #c8ee91);
}
.restored-surface .missions-dialog .mission-detail progress::-moz-progress-bar {
  border-radius: 99px;
  background: var(--website-surface-200-238-145-1, #c8ee91);
}
.restored-surface .missions-dialog .mission-detail .daily-mission-reward {
  grid-column: 2 / 4;
  grid-row: 3;
  color: var(--website-ink-198-233-146-1, #c6e992);
  font-size: 11px;
  line-height: 1.3;
}
.restored-surface .missions-dialog .mission-detail button {
  grid-column: 2 / 4;
  justify-self: start;
  margin: 0;
  font-size: 11px;
  min-height: 34px;
  padding: 8px 11px;
}
body.restored-ui-active .topbar-mission-menu .missions-dialog {
  box-sizing: border-box;
  width: 100%;
  max-height: min(650px, calc(100dvh - 110px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px;
  border: 0;
  border-radius: 14px;
  background: var(--website-surface-28-36-24-1, #1c2418);
  color: var(--website-ink-233-237-225-1, #e9ede1);
}
body.restored-ui-active .missions-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
}
body.restored-ui-active .missions-brandline {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--website-ink-200-237-145-1, #c8ed91);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.3px;
}
body.restored-ui-active .missions-brandline span {
  font-size: 16px;
}
body.restored-ui-active .missions-dialog-heading .dialog-close-control {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--website-line-82-99-66-1, #526342);
  border-radius: 50%;
  background: transparent;
  color: var(--website-ink-227-234-217-1, #e3ead9);
}
body.restored-ui-active .missions-dialog .missions-progress-label {
  display: block;
  margin: 0 0 5px;
  color: var(--website-ink-168-179-148-1, #a8b394);
  font-size: 9px;
  letter-spacing: 1.7px;
}
body.restored-ui-active .missions-dialog .missions-progress-label span {
  color: inherit;
}
body.restored-ui-active .missions-dialog h2 {
  margin: 0 0 12px;
  font-size: clamp(25px, 4vw, 29px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--website-ink-240-241-232-1, #f0f1e8);
}
body.restored-ui-active .missions-dialog > p {
  margin: 0 0 18px;
  color: var(--website-ink-170-181-159-1, #aab59f);
  font-size: 12px;
  line-height: 1.55;
}
body.restored-ui-active .topbar-mission-menu .daily-desktop-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 128px;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 8px 13px;
  font:
    500 11px/1 Inter,
    system-ui,
    sans-serif;
  color: var(--website-ink-217-227-203-1, #d9e3cb);
  background: transparent;
  border: 2px solid var(--website-line-82-94-69-1, #525e45);
  border-radius: 6px;
  box-shadow: 0 0 5px var(--website-shade-198-237-148-0_1411764705882353, #c6ed9424);
  white-space: nowrap;
}
body.restored-ui-active .topbar-mission-menu .daily-desktop-button small {
  margin: 0;
  color: var(--website-ink-212-249-155-1, #d4f99b);
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
}
body.restored-ui-active .topbar-mission-menu .topbar-missions {
  box-sizing: border-box;
  min-width: 128px;
  min-height: 34px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--website-ink-228-236-220-1, #e4ecdc);
  border-color: var(--website-line-82-99-63-1, #52633f);
  background: var(--website-surface-27-34-24-1, #1b2218);
  justify-content: center;
}
@media (min-width: 701px) {
  body.restored-ui-active .topbar-mission-menu .topbar-missions {
    box-sizing: border-box;
    min-width: 128px;
    min-height: 34px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--website-ink-228-236-220-1, #e4ecdc);
    border-color: var(--website-line-82-99-63-1, #52633f);
    background: var(--website-surface-27-34-24-1, #1b2218);
    justify-content: center;
  }
  body.restored-ui-active .topbar-mission-menu #topbar-mission-count {
    margin-left: 0;
    color: var(--website-ink-212-249-155-1, #d4f99b);
    font-size: 9px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
}
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active .topbar-mission-menu .daily-mobile-button {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr 12px;
    justify-items: center;
    gap: 0;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 4px 0;
    border: 1px solid var(--website-line-82-94-69-1, #525e45);
    border-radius: 6px;
    background: var(--website-surface-27-34-24-1, #1b2218);
    color: var(--website-ink-212-249-155-1, #d4f99b);
    font-size: 19px;
    line-height: 1;
  }
  body.restored-ui-active .topbar-mission-menu .daily-mobile-button > [data-priority-icon] {
    grid-area: 1/1;
    align-self: center;
    position: static;
    inset: auto;
    transform: none;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 20px;
  }
  body.restored-ui-active .topbar-mission-menu .daily-mobile-button .mission-button-label {
    display: none;
  }
  body.restored-ui-active .topbar-mission-menu .daily-mobile-button > [data-daily-badge] {
    grid-area: 2/1;
    align-self: end;
    justify-self: center;
    position: static;
    inset: auto;
    transform: none;
    translate: none;
    margin: 0;
    padding: 0 4px;
    border-radius: 4px;
    background: var(--website-surface-53-67-42-1, #35432a);
    color: var(--website-ink-212-249-155-1, #d4f99b);
    font-size: 10px;
    font-weight: 650;
    line-height: 12px;
    font-variant-numeric: tabular-nums;
    text-align: center;
  }
}
body.restored-ui-active :is(.your-ranking-person, .ranked-row-player, .social-identity) .styled-name {
  flex-direction: row !important;
  align-items: center;
}
body.restored-ui-active :is(#ranked-your-ranking, #pvp-your-ranking):empty {
  display: none;
}
.restored-surface .ps-comparison :is(th, td) {
  letter-spacing: normal;
  text-transform: none;
}
.restored-surface .ps-comparison tbody th {
  font-size: 13px;
  color: inherit;
}
#restored-ui .sidebar-label ~ nav .achievement-notice {
  position: absolute;
  left: auto;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.sidebar-collapsed #restored-ui .sidebar-label ~ nav .achievement-notice {
  right: 5px;
  top: 4px;
  transform: none;
}
.restored-surface .main-membership .ps-plan-card {
  height: 100%;
}

html[data-backend-locked] #restored-ui {
  visibility: hidden;
}

@media (min-width: 701px) and (max-width: 850px) and (min-height: 501px) {
  #restored-ui .dashboard-sidebar {
    position: fixed;
    width: var(--restored-sidebar);
    overflow: auto;
  }
  #restored-ui .dashboard-sidebar nav {
    display: grid;
    overflow: visible;
  }
  #restored-ui .dashboard-sidebar nav :is(a, button:where(.reward-inbox-nav)) span {
    display: inline;
  }
  .sidebar-collapsed #restored-ui .dashboard-sidebar nav :is(a, button:where(.reward-inbox-nav)) span {
    display: none;
  }
}

.restored-surface .ps-art-slots:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.restored-surface .ps-art-slots label {
  display: grid;
  gap: 6px;
}
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  html:has(body.restored-ui-active) {
    scroll-padding-block: 72px 82px;
    overflow-x: clip;
  }
  #restored-content :is(button, a, input, textarea) {
    scroll-margin-block: 12px;
  }
  .restored-surface .ps-art-slots:not([hidden]) {
    grid-template-columns: 1fr;
  }
}

/* Keep the right rail's spare height below the rows. */
.play-page #mini-leaders > .mini-leader,
.play-page #mini-leaders > .mini-leader.you {
  flex: 0 0 auto;
  min-height: 44px;
  margin-top: 0;
}
@media (max-width: 700px) {
  .play-page #mini-leaders > .mini-leader {
    min-height: 32px;
  }
}

/* The master lays out the avatar and coin in shared media and caption rows. */
.leader-podium {
  container-type: inline-size;
}
.leader-podium .podium-display {
  position: relative;
}
.leader-podium .podium-position b {
  white-space: nowrap;
}
.leader-podium .podium-position sup {
  font-size: 0.68em;
  vertical-align: super;
}
.leader-podium .podium-position svg {
  width: 1.15em;
  height: 1.15em;
}
.leader-podium .podium-vacant .podium-display {
  grid-template-columns: minmax(0, 1fr);
}
.leader-podium .podium-vacancy {
  display: grid;
  grid-template-rows: var(--podium-media) auto auto;
  justify-items: center;
  align-items: center;
  min-height: calc(var(--podium-media) + 32px);
  color: var(--website-ink-186-200-173-1, #bac8ad);
  font-size: 13px;
}
.leader-podium .podium-vacancy-icon {
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--medal-line) 32%, transparent);
  border-radius: 50%;
  color: var(--medal-line);
  background: color-mix(in srgb, var(--medal-top) 15%, transparent);
}
.leader-podium .podium-vacancy-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.leader-podium .podium-vacancy small {
  font-size: 11px;
  color: var(--muted);
}
@container (max-width:660px) {
  .leader-podium .podium-stage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .leader-podium .podium-seat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(64px, 21%, 92px);
    align-items: center;
    gap: 6px;
    --podium-avatar: 100px;
    --podium-media: 112px;
    --podium-coin: 76px;
    --pair-width: 240px;
  }
  .leader-podium .podium-place-1 {
    order: 1;
  }
  .leader-podium .podium-place-2 {
    order: 2;
  }
  .leader-podium .podium-place-3 {
    order: 3;
  }
  .leader-podium .podium-display {
    padding-block: 3px;
  }
  .leader-podium .podium-display:has(.coin-frame-equipped) {
    --podium-coin: 72px;
  }
  .leader-podium .podium-place-1 .podium-display:has(.coin-frame-equipped) {
    --podium-coin: 76px;
  }
  .leader-podium .podium-name,
  .leader-podium .podium-name .styled-name {
    max-width: 100%;
  }
  .leader-podium .podium-vacancy {
    grid-template-rows: 62px auto auto;
    min-height: 0;
    gap: 4px;
    padding-block: 8px;
  }
  .leader-podium .podium-vacancy-icon {
    width: 48px;
  }
  .leader-podium .podium-vacancy-icon svg {
    width: 22px;
    height: 22px;
  }
  .leader-podium .podium-plinth {
    border-radius: 8px;
    height: auto;
    min-height: 68px;
    padding: 6px 2px;
  }
  .leader-podium .podium-score {
    font-size: clamp(12px, 5cqi, 20px);
    white-space: nowrap;
  }
}

/* Profile cosmetics stay inside one shell; the X stays visible while details scroll. */
#restored-ui {
  --player-profile-width: 790px;
}
#restored-ui .restored-player-inspection {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  width: min(var(--player-profile-width), calc(100vw - 28px));
  max-width: none;
  max-height: calc(100dvh - 36px);
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 16px;
}
.restored-player-inspection > .dialog-close-control {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: var(--website-surface-28-37-27-0_9372549019607843, #1c251bef);
}
.restored-profile-scroll {
  max-height: calc(100dvh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
}
.restored-player-inspection .restored-profile-status {
  padding: 22px 54px 22px 22px;
  margin: 0;
}
#restored-ui .restored-player-inspection .profile-banner > span:first-child {
  right: 64px;
}
@media (min-width: 1000px) {
  #restored-ui .profile-studio-dialog {
    width: min(1320px, calc(100vw - 40px));
    max-width: none;
  }
  #restored-ui .profile-studio-dialog .studio-layout {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.94fr);
  }
}

#dashboard-sidebar nav[data-nav-glide] {
  position: relative;
}
[data-nav-glide] {
  isolation: isolate;
}
.ranked-nav-highlight {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: -1;
  border-radius: 7px;
  pointer-events: none;
}
#dashboard-sidebar .ranked-nav-highlight {
  background: var(--website-surface-42-50-31-1, #2a321f);
}
#restored-ui #dashboard-sidebar nav[data-nav-glide] .active,
body .mobile-nav[data-nav-glide] .active {
  background: transparent;
}
.mobile-nav .ranked-nav-highlight {
  border-radius: 14px;
  background: var(--website-surface-211-245-154-0_050980392156862744, #d3f59a0d);
}
body .mobile-nav[data-nav-glide] .active::before {
  content: none;
}
.mobile-nav .ranked-nav-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(50% - 9px);
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
}

@media (prefers-reduced-motion: no-preference) {
  body:not(.player-reduced-motion) .ranked-nav-highlight {
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  body.restored-ui-active:not(.player-reduced-motion) dialog:modal {
    animation: ranked-dialog-enter 180ms cubic-bezier(0.2, 0.75, 0.3, 1) both;
  }
  body.restored-ui-active:not(.player-reduced-motion) dialog:modal::backdrop {
    animation: ranked-section-enter 150ms ease-out both;
  }
}
@keyframes ranked-section-enter {
  from {
    opacity: 0.78;
  }
  to {
    opacity: 1;
  }
}
@keyframes ranked-dialog-enter {
  from {
    opacity: 0;
    translate: 0 6px;
  }
  to {
    opacity: 1;
    translate: none;
  }
}

.restored-surface .profile-studio-dialog .studio-badge-gallery .ranked-name-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 7px;
}
.restored-surface .profile-studio-dialog .studio-badge-gallery .profile-badge-emblem {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='gold'] .ranked-name-badge,
.name-badge.achievement-badge.rarity-epic {
  border: 3px double #efc86b;
  background: linear-gradient(135deg, #60471d, #2e2415);
  color: #ffebaf;
  box-shadow: 0 0 8px #f5bd4550;
}
.restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='prism'] .ranked-name-badge,
.name-badge.achievement-badge.rarity-legendary {
  border: 1px solid transparent;
  color: var(--website-ink-255-255-255-1, #fff);
  background:
    linear-gradient(112deg, #285c53, #524269, #704453, #65522c, #285c53) padding-box,
    linear-gradient(112deg, #8ffbd6, #c4b1ff, #ffaac5, #ffe18e, #8ffbd6) border-box;
  background-size: 210% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .restored-surface .profile-studio-dialog .studio-badge-gallery button[data-rarity='prism'] .ranked-name-badge,
  .name-badge.achievement-badge.rarity-legendary {
    animation: worn-prism-wave 1.7s ease-in-out infinite alternate;
  }
}
@keyframes worn-prism-wave {
  to {
    background-position: 100% 0;
  }
}

#restored-ui .player-settings #ps-public-edit {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ps-line);
  border-radius: 10px;
  background: var(--ps-panel);
  color: var(--ps-text);
  font: 600 0.8125rem/1.2 var(--body);
  white-space: nowrap;
}

#restored-ui .player-settings #ps-public-edit:is(:hover, :focus-visible) {
  border-color: var(--ps-accent);
}

.ps-finish-coin {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.restored-surface :is(.main-membership, .player-settings) .ps-plan-options .ps-product-with-header {
  --product-padding: 22px;
  padding: 0 var(--product-padding) var(--product-padding);
  background: var(--website-surface-27-32-24-1, #1b2018);
}
.ps-product-with-header::before {
  content: none;
}
.ps-product-with-header .ps-product-header {
  height: 126px;
  flex: none;
  margin: 0 calc(-1 * var(--product-padding)) 22px;
}
.ps-product-with-header.ps-product-studio {
  border-color: #4e475c;
}
.ps-product-header .member-no-ads {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 79px;
  aspect-ratio: 1;
  border: 4px solid #fa745d;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 22%, #54423a, var(--website-surface-35-29-27-1, #231d1b) 72%);
  color: #fff4e9;
  font: 800 25px/1 var(--body);
  letter-spacing: -1px;
  transform: rotate(-9deg);
  box-shadow:
    3px 5px 0 #803c32,
    0 10px 26px var(--website-shade-0-0-0-0_4666666666666667, #0007),
    inset 0 0 0 1px #ffab9870;
}
.ps-product-header .member-no-ads::after {
  content: '';
  position: absolute;
  inset-inline: -2px;
  top: 50%;
  height: 5px;
  border-radius: 4px;
  transform: translateY(-50%) rotate(-40deg);
  background: #fa745d;
  box-shadow: 0 1px 2px #371c19;
}
.ps-product-header .member-mini-badge {
  top: 79px;
  padding: 5px 8px;
  border-color: #c5a25b;
  background: #3d321b;
  color: #ffe3a1;
  font-size: 11px;
  letter-spacing: 0.25px;
}
.ps-product-header .member-studio-token {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 79px;
  aspect-ratio: 1;
  border: 3px solid #d9c5ef;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 24%, #f0e2ff, #ab8dcc 66%, #654879);
  box-shadow:
    inset 0 0 0 2px #654879,
    inset 0 0 0 4px #d9c5ef,
    0 4px 0 #654879,
    0 8px 16px var(--website-shade-0-0-0-0_4666666666666667, #0007);
}
.ps-product-header .member-studio-photo {
  position: relative;
  width: 35px;
  height: 27px;
  overflow: hidden;
  border: 2px solid #f3e6ff;
  border-radius: 4px;
  background: linear-gradient(#503a76, #a775b3);
  box-shadow: 0 1px 3px #36224e70;
}
.ps-product-header .member-studio-photo::before {
  content: '';
  position: absolute;
  inset: 6px 5px auto auto;
  width: 6px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffdb8f;
}
.ps-product-header .member-studio-photo::after {
  content: '';
  position: absolute;
  inset: 9px 0 0;
  clip-path: polygon(0 80%, 30% 4%, 56% 62%, 74% 28%, 100% 78%, 100% 100%, 0 100%);
  background: var(--website-surface-224-233-180-1, #e0e9b4);
}
.ps-product-header .member-mint-gif {
  position: absolute;
  top: 79px;
  left: calc(50% + 23px);
  z-index: 2;
  transform: rotate(7deg);
  padding: 5px 8px;
  border: 1px solid #bea1e9;
  border-radius: 5px;
  background: #392c4a;
  color: #e9d8ff;
  font: 700 10px/1 var(--body);
  letter-spacing: 1px;
}
.ps-product-benefits .ps-inline-membership-badge {
  margin-inline-start: 6px;
  vertical-align: middle;
}
.ps-inline-membership-badge.badge-vip {
  border-color: #c5a25b;
  background: #3d321b;
  color: #ffe3a1;
  box-shadow:
    0 0 6px #e4bd6655,
    inset 0 0 3px #f4d28332;
}
.ps-inline-membership-badge.badge-coinsmith {
  border: 1px solid #ad8ccc;
  background: #392b49;
  color: #eddbff;
  box-shadow:
    0 0 6px #bb91e957,
    inset 0 0 3px #dbb6ff32;
}

/* Edit profile overview and category pickers. */
#restored-ui .community-dialog.profile-studio-dialog:has([data-profile-workspace])[open] {
  --studio-bg: var(--website-surface-23-30-22-1, var(--website-surface-23-28-22-1, #171c16));
  --studio-panel: var(--website-surface-26-34-24-1, var(--website-surface-26-36-28-1, #1a241c));
  --studio-header: var(--website-surface-26-34-24-1, var(--website-surface-28-38-30-1, #1c261e));
  --studio-line: var(--website-line-69-71-78-1, var(--website-line-58-71-55-1, #3a4737));
  --studio-text: var(--website-ink-240-241-232-1, var(--website-ink-240-241-232-1, #f0f1e8));
  --studio-muted: var(--website-ink-180-195-161-1, var(--website-ink-180-195-161-1, #b4c3a1));
  --studio-accent: var(--website-ink-218-242-169-1, var(--website-accent-197-214-172-1, #c5d6ac));
  width: min(940px, calc(100vw - 32px));
  height: min(760px, calc(var(--review-popup-height, 100dvh) - 36px));
  max-height: calc(var(--review-popup-height, 100dvh) - 36px);
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  background: var(--studio-bg);
  color: var(--studio-text);
}

#restored-ui [data-profile-workspace] {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  margin: 0;
}
#restored-ui [data-profile-workspace] [hidden],
#restored-ui .profile-studio-dialog:has([data-profile-workspace]) > .community-close[hidden] {
  display: none !important;
}
#restored-ui [data-profile-workspace] > .studio-workspace-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 59px;
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid var(--studio-line);
  background: var(--studio-header);
}
#restored-ui #studio-workspace-title {
  grid-area: 1 / 2;
  margin: 0;
  font: 600 23px/1.2 var(--display);
  letter-spacing: -0.45px;
  text-align: center;
}
#restored-ui [data-profile-workspace='overview'] #studio-workspace-title {
  grid-column: 1 / 3;
  padding-inline-start: 6px;
  text-align: start;
}
#restored-ui .profile-studio-dialog:has([data-profile-workspace]) > .community-close {
  position: absolute;
  inset: 7px 10px auto auto;
  width: 44px;
  height: 44px;
  z-index: 5;
}
#restored-ui .studio-workspace-back,
#restored-ui .studio-card-pencil {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--studio-line);
  border-radius: 50%;
  background: var(--studio-bg);
  color: var(--studio-text);
  cursor: pointer;
}
#restored-ui .studio-workspace-back {
  grid-area: 1 / 1;
}
/* Standalone header icons keep the full 44px tap targets. */
html body #restored-ui .profile-studio-dialog:has([data-profile-workspace]) > .community-close,
#restored-ui .studio-workspace-back {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
html body #restored-ui .profile-studio-dialog:has([data-profile-workspace]) > .community-close:focus-visible,
#restored-ui .studio-workspace-back:focus-visible {
  outline: 2px solid var(--studio-accent);
  outline-offset: -2px;
}
#restored-ui :is(.studio-workspace-back, .studio-card-pencil) svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#restored-ui .studio-workspace-scroll {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#restored-ui .studio-workspace-look {
  position: sticky;
  top: 0;
  min-width: 0;
}
#restored-ui .studio-workspace-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  border-radius: 14px;
}
#restored-ui .studio-workspace-card > .social-banner {
  height: 80px;
  position: relative;
  border-radius: 13px 13px 0 0;
}
#restored-ui .studio-look-identity {
  position: relative;
  z-index: 2;
  padding: 0 13px 9px;
}
#restored-ui .studio-look-portrait {
  position: relative;
  width: 84px;
  margin-top: -42px;
  margin-bottom: 5px;
}
#restored-ui .studio-look-avatar > .avatar-slot.large {
  width: 84px;
  height: 84px;
}
#restored-ui .studio-look-avatar .avatar-slot.large.has-frame > .social-avatar {
  width: 50%;
  height: 50%;
  font-size: 18px;
}
#restored-ui .studio-look-avatar .avatar-slot.large:not(.has-frame) > .social-avatar {
  width: 64px;
  height: 64px;
  font-size: 21px;
}
#restored-ui .studio-card-pencil {
  position: absolute;
  z-index: 2;
  width: 36px;
  height: 36px;
}
#restored-ui .social-banner > .studio-card-pencil {
  inset: 9px 9px auto auto;
}
#restored-ui .studio-look-portrait > .studio-card-pencil {
  inset: auto -6px -1px auto;
}
#restored-ui [data-profile-workspace]:not([data-profile-workspace='overview']) .studio-card-pencil {
  display: none;
}
#restored-ui .studio-look-name {
  margin: 0;
  font: 650 18px/1.3 var(--display);
  overflow-wrap: anywhere;
}
#restored-ui .studio-look-name .styled-name {
  white-space: normal;
  flex-wrap: wrap;
}
#restored-ui .studio-look-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
#restored-ui .studio-look-bio {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  opacity: 0.8;
}
#restored-ui [data-profile-workspace]:not([data-profile-workspace='overview']) #studio-preview-jump {
  visibility: hidden;
}

#restored-ui .studio-workspace-controls {
  min-width: 0;
}
#restored-ui .studio-workspace-overview {
  display: grid;
  gap: 15px;
}
#restored-ui .studio-workspace-group {
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 13px;
  background: var(--studio-panel);
}
#restored-ui :is(.studio-workspace-group, .studio-picker-group) > h3 {
  margin: 0;
  padding: 12px 14px 8px;
  color: var(--studio-accent);
  font: 600 13px var(--display);
}
#restored-ui .studio-picker-group > h3 {
  padding-inline: 0;
}
#restored-ui .studio-workspace-fields {
  display: grid;
  gap: 12px;
  padding: 6px 14px 12px;
}
#restored-ui :is(.studio-workspace-fields, .studio-workspace-avatar-tools) label {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--studio-muted);
  font-size: 13px;
}
#restored-ui [data-profile-workspace] :is(input:not([type='file']), textarea, select) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: var(--studio-bg);
  color: var(--studio-text);
  font: inherit;
  font-size: 16px;
}
#restored-ui [data-profile-workspace] textarea {
  resize: vertical;
}
#restored-ui .studio-workspace-count {
  position: absolute;
  inset: 0 0 auto auto;
  font-size: 11px;
}
#restored-ui .studio-workspace-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 8px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-top: 1px solid var(--studio-line);
  border-radius: 0;
  background: transparent;
  color: var(--studio-text);
  font: inherit;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
}
#restored-ui .studio-row-value {
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--studio-muted);
  font-size: 12px;
}
#restored-ui .studio-workspace-row i {
  width: 6px;
  height: 6px;
  rotate: -45deg;
  border-right: 1px solid var(--studio-accent);
  border-bottom: 1px solid var(--studio-accent);
}
#restored-ui .studio-workspace-row:hover {
  background: color-mix(in srgb, var(--studio-panel) 90%, var(--studio-accent));
}

#restored-ui .studio-workspace-picker > p,
#restored-ui .studio-workspace-avatar-tools > small {
  margin: 0 0 10px;
  color: var(--studio-muted);
  font-size: 13px;
}
#restored-ui .studio-workspace-avatar-tools > small {
  display: block;
  margin: 6px 0;
}
#restored-ui :is(.studio-workspace-tools, .studio-workspace-inline) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
#restored-ui .studio-workspace-tools input {
  flex: 1 1 120px;
}
#restored-ui
  [data-profile-workspace]
  :is(.studio-workspace-inline button, .studio-workspace-tools a, #studio-preview-jump) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: var(--studio-panel);
  color: var(--studio-accent);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
#restored-ui [data-profile-workspace] :is(button, input, textarea, select, a):focus-visible {
  outline: 2px solid var(--studio-accent);
  outline-offset: -2px;
}
#restored-ui [data-profile-workspace] :is(.studio-gallery, .avatar-library-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
#restored-ui [data-profile-workspace] .studio-gallery .studio-art {
  height: clamp(96px, 13vw, 130px);
}
#restored-ui [data-profile-workspace] .studio-gallery .studio-coin-art canvas {
  width: 100%;
  height: 100%;
}
#restored-ui [data-profile-workspace] .studio-item[aria-pressed='true'] {
  border-color: var(--studio-accent);
}
#restored-ui [data-profile-workspace] .studio-appearance-art .appearance-mini {
  width: 85%;
  height: 80%;
  min-height: 0;
  padding: 0;
  border-radius: 9px;
}
#restored-ui .studio-theme-swatch {
  display: grid;
  grid-template-rows: 40% 1fr;
  background: var(--profile-bg, var(--studio-panel));
  color: var(--profile-accent, var(--studio-accent));
  border-color: var(--profile-line, var(--studio-line));
}
#restored-ui .studio-swatch-header {
  background: var(--profile-line, var(--studio-line));
}
#restored-ui .studio-swatch-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}
#restored-ui .studio-swatch-identity span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.66;
}
#restored-ui .studio-swatch-identity i {
  width: 38%;
  height: 4px;
  border-radius: 4px;
  background: currentColor;
}
#restored-ui .studio-effect-swatch.effect-aurora {
  background: linear-gradient(135deg, #3b7c62, #463a68);
}
#restored-ui .studio-effect-swatch .profile-effect-art {
  opacity: 1;
}

#restored-ui .studio-save-announcement:not([data-notice]) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#restored-ui .studio-save-announcement[data-notice] {
  flex: none;
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px solid var(--studio-line);
  color: var(--studio-text);
  font-size: 13px;
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  html
    body.restored-ui-active
    #restored-ui
    .community-dialog.profile-studio-dialog:has([data-profile-workspace])[open] {
    width: min(520px, calc(100vw - 18px));
    height: min(760px, calc(var(--review-popup-height, 100dvh) - 18px)) !important;
    max-height: calc(var(--review-popup-height, 100dvh) - 18px);
  }
  #restored-ui #studio-workspace-title {
    font-size: 20px;
  }
  #restored-ui .studio-workspace-scroll {
    display: block;
    padding: 11px;
    scrollbar-gutter: auto;
  }
  #restored-ui .studio-workspace-look {
    position: relative;
    margin-bottom: 12px;
  }
}

/* Profile edit actions share the same pencil and tap target. */
html body button.profile-edit-button:is([data-community='edit-profile'], #full-profile-edit, #mobile-menu-profile) {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 50%;
  background: var(--profile-panel, var(--website-surface-23-30-22-1, var(--website-surface-23-28-22-1, #171c16)));
  color: var(--profile-accent, var(--website-ink-218-242-169-1, var(--website-ink-218-242-169-1, #daf2a9)));
}
html body button.profile-edit-button:is(#full-profile-edit, #mobile-menu-profile) {
  display: grid;
  margin-inline: auto;
}
button.profile-edit-button > svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html
  body
  button.profile-edit-button:is([data-community='edit-profile'], #full-profile-edit, #mobile-menu-profile):hover {
  border-color: currentColor;
}
button.profile-edit-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
#ps-coin,
#ps-coin:active {
  cursor: auto;
  touch-action: auto;
}

body.restored-ui-active .topbar-mission-menu .missions-dialog {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.missions-dialog-heading {
  flex: none;
}
.missions-dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.restored-surface .missions-dialog .mission-detail:has(.mission-claim-button) .daily-mission-reward {
  grid-column: 2;
  align-self: center;
}
.restored-surface .missions-dialog .mission-detail .mission-claim-button {
  grid-column: 3;
  grid-row: 3;
  justify-self: end;
  min-width: 64px;
}
.mission-claim-all,
.daily-missions-modal [data-mission-claim='all'] {
  width: 100%;
  min-height: 42px;
}
.mission-claim-all[hidden],
.achievement-notice[hidden],
#mobile-menu-logout[hidden] {
  display: none !important;
}
.missions-claim-status:empty {
  display: none;
}
.missions-claim-status {
  margin: 8px 0 0;
  font-size: 12px;
}
.topbar-mission-menu [data-mission-ready] {
  position: relative;
}
.topbar-mission-menu [data-mission-ready]::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime, var(--website-surface-200-238-145-1, #c8ee91));
  box-shadow: 0 0 7px var(--website-shade-200-238-145-0_5019607843137255, #c8ee9180);
}

body.restored-ui-active #mobile-menu[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#mobile-menu > :is(.mobile-menu-heading, .mobile-sheet-handle) {
  flex: none;
}
#mobile-menu .mobile-menu-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
#mobile-menu a[href='#achievements'] {
  position: relative;
}
#mobile-menu .achievement-notice {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: none;
  border-radius: 50%;
  background: var(--lime, var(--website-surface-200-238-145-1, #c8ee91));
  color: var(--website-ink-32-38-25-1, #202619);
  font-size: 11px;
  font-weight: 800;
}
body.restored-ui-active #mobile-menu-logout {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  justify-content: center;
  color: #ffc1b8;
  border-color: #86534f;
  background: #382321;
}
body.restored-ui-active #mobile-menu-logout:is(:hover, :focus-visible) {
  border-color: #ffc1b8;
  background: #492a28;
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active #missions-dropdown:popover-open .missions-dialog {
    max-height: min(650px, calc(var(--review-popup-height, 100dvh) - 64px));
    overflow: hidden;
  }
  body.restored-ui-active #missions-dropdown .mission-claim-button {
    min-height: 40px;
  }
}

/* Match the banner picker composition used by Sunset Glow. */
#restored-ui .studio-art > .social-banner.banner-crescent {
  background:
    radial-gradient(ellipse at 78% 67%, #b09ad95c, transparent 56%),
    linear-gradient(144deg, #263650 0%, #475478 49%, #897da5 100%);
}
#restored-ui .studio-art > .social-banner.banner-crescent::before {
  top: 50%;
  right: 9%;
  height: 38%;
  background: linear-gradient(145deg, #fff2dc, #e7e1ff 67%, #c5c2ed);
}
#restored-ui .studio-art > .social-banner.banner-crescent::after {
  inset: auto;
  top: -84%;
  right: 39%;
  width: 133%;
  height: 146%;
  transform: rotate(-35deg);
  border-color: #efeaff39;
}
#restored-ui .studio-art > .social-banner.banner-crescent > span:first-child {
  display: block;
  top: 53%;
  right: 24%;
  bottom: auto;
  z-index: 1;
  font-size: 23px;
  line-height: 1;
  color: #f0e7fe;
  opacity: 0.86;
}
