#restored-ui .ps-sections-toggle,
body.restored-ui-active #view-play #sound-button {
  display: none;
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active #view-play #sound-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--website-line-67-83-54-1, #435336);
    border-radius: 10px;
    background: var(--website-surface-32-40-27-1, #20281b);
    color: var(--website-ink-169-186-156-1, #a9ba9c);
  }
  body.restored-ui-active #view-play #sound-button[aria-pressed='true'] {
    background: var(--website-surface-53-68-42-1, #35442a);
    border-color: var(--website-line-114-137-88-1, #728958);
    color: var(--website-ink-220-246-182-1, #dcf6b6);
  }
  body.restored-ui-active #view-play #sound-button svg {
    width: 19px;
    height: 19px;
  }
  body.restored-ui-active #view-play #sound-button .mute-slash {
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    transform: translate(-50%, -50%) rotate(-55deg);
    border-radius: 1px;
    background: currentColor;
    box-shadow: 0 0 0 1px var(--website-shade-32-40-27-1, #20281b);
    font-size: 0;
    text-shadow: none;
    pointer-events: none;
  }
  body.restored-ui-active.battle-page #view-battle .pvp-sound {
    min-width: 44px;
    min-height: 44px;
    white-space: nowrap;
  }

  html body.restored-ui-active #restored-ui .player-settings[open] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) !important;
  }
  #restored-ui .player-settings .ps-main {
    display: contents;
  }
  #restored-ui .player-settings .ps-top {
    order: 0;
    gap: 8px;
    height: 60px;
    padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right));
  }
  #restored-ui .player-settings .ps-breadcrumb {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.2;
  }
  #restored-ui .player-settings .ps-breadcrumb i {
    margin-inline: 3px;
  }
  #restored-ui .player-settings #ps-close {
    position: static;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }
  #restored-ui .ps-sections-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 44px;
    padding: 0 9px;
    border: 1px solid var(--website-line-69-89-64-1, #455940);
    border-radius: 8px;
    background: var(--website-surface-31-46-34-1, #1f2e22);
    color: var(--website-ink-209-232-191-1, #d1e8bf);
    font: inherit;
    font-size: 13px;
  }
  #restored-ui .ps-sections-toggle svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
  }
  #restored-ui .ps-sections-toggle[aria-expanded='true'] svg {
    rotate: 180deg;
  }
  #restored-ui .player-settings .ps-rail {
    display: none;
  }
  #restored-ui .player-settings.ps-mobile-sections .ps-rail {
    display: flex;
    flex-direction: column;
    order: 1;
    flex: 1 1 auto;
    min-height: 0;
    gap: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 14px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
    border: 0;
  }
  #restored-ui .player-settings.ps-mobile-sections .ps-scroll {
    display: none;
  }
  #restored-ui .player-settings .ps-brand,
  #restored-ui .player-settings .ps-nav-highlight {
    display: none;
  }
  #restored-ui .player-settings .ps-identity {
    display: flex;
    flex-shrink: 0;
    padding: 4px 8px;
  }
  #restored-ui .player-settings .ps-rail nav {
    flex: none;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    overflow: visible;
  }
  #restored-ui .player-settings .ps-nav-group {
    margin: 0;
  }
  #restored-ui .player-settings .ps-nav-group summary,
  #restored-ui .player-settings .ps-rail nav button {
    min-height: 44px;
    font-size: 14px;
    white-space: normal;
  }
  #restored-ui .player-settings .ps-nav-group summary {
    align-content: center;
  }
  #restored-ui .player-settings .ps-rail nav button[aria-pressed='true'] {
    background: #2c432a;
    box-shadow: inset 3px 0 var(--website-shade-201-236-154-1, #c9ec9a);
  }
  #restored-ui .player-settings .ps-rail-bottom {
    display: block;
    flex-shrink: 0;
    padding: 0 8px;
  }
  #restored-ui .player-settings #ps-logout {
    min-height: 44px;
    padding: 0 12px;
    font-size: 14px;
  }
  #restored-ui .player-settings .ps-scroll {
    order: 2;
    flex: 1 1 auto;
    padding: 20px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
    overflow-x: hidden;
  }
  #restored-ui .player-settings .ps-bottom {
    order: 3;
    min-height: 36px;
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  }
  #restored-ui .player-settings .ps-bottom > span:last-child {
    display: none;
  }
  #restored-ui .player-settings #ps-profile-banner {
    height: 76px;
  }
  #restored-ui .player-settings .ps-public-profile {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 14px;
  }
  #restored-ui .player-settings #ps-public-avatar {
    flex: 0 0 70px;
    width: 70px;
  }
  #restored-ui .player-settings .ps-public-copy {
    flex: 1 1 130px;
  }
  #restored-ui .player-settings #ps-public-edit {
    min-height: 44px;
    margin-left: auto;
  }
  #restored-ui .player-settings .ps-stats > div {
    min-width: 0;
    padding: 10px;
  }

  body.restored-ui-active .mobile-nav > :is(a, button) {
    min-height: 46px;
  }
  body.restored-ui-active .mobile-header :is(.topbar-missions, #mobile-help, #mobile-profile) {
    min-width: 44px;
    min-height: 44px;
  }
  body.restored-ui-active .mobile-menu-grid > :is(a, button) {
    min-height: 48px;
  }
  body.restored-ui-active #view-play .game-mode button {
    min-height: 38px;
  }
  body.restored-ui-active #view-play .game-actions :is(button, .flip-button) {
    min-height: 44px;
  }
  body.restored-ui-active #view-play :is(.rank-climb-mobile, .coin-skin-line a) {
    text-underline-offset: 3px;
  }

  html:has(body.restored-ui-active dialog[open], #missions-dropdown:popover-open) {
    overflow: hidden;
  }
  /* Keep mobile dialogs floating; only their contents may scroll on short screens. */
  html body.restored-ui-active dialog[open]:not(#mobile-menu, .restored-player-inspection),
  html body.restored-ui-active #missions-dropdown:popover-open {
    box-sizing: border-box;
    position: fixed !important;
    inset: auto !important;
    top: calc(var(--review-popup-top, 0px) + var(--review-popup-height, 100dvh) / 2) !important;
    left: 50% !important;
    width: min(var(--mobile-dialog-width, 560px), calc(100% - 28px)) !important;
    max-width: calc(100% - 28px) !important;
    height: auto !important;
    max-height: calc(var(--review-popup-height, 100dvh) - 32px) !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    translate: none !important;
    border: 1px solid var(--website-line-70-84-56-1, #465438) !important;
    border-radius: 20px !important;
    overscroll-behavior: contain;
    overflow-x: hidden;
    overflow-y: auto;
  }
  html body.restored-ui-active dialog[open]:not(#mobile-menu, .restored-player-inspection) {
    padding: 16px !important;
  }
  html body.restored-ui-active dialog[open]:not(.restored-player-inspection):has(> .dialog-close-control) {
    padding-top: 56px !important;
  }
  html body.restored-ui-active dialog[open]:has(#community-profile-form) {
    padding-top: 16px !important;
  }
  html
    body.restored-ui-active
    #restored-ui
    :is(.player-settings, .profile-studio-dialog:has(> #community-profile-form))[open] {
    height: var(--review-settings-height, min(820px, calc(var(--review-popup-height, 100dvh) - 32px))) !important;
    overflow: hidden;
  }
  html body.restored-ui-active #restored-ui .player-settings[open] {
    padding: 0 !important;
  }
  body.restored-ui-active dialog[open] > .dialog-close-control,
  body.restored-ui-active dialog[open] #mobile-menu-close,
  body.restored-ui-active dialog[open] .modal-top #modal-close,
  body.restored-ui-active #missions-dropdown .dialog-close-control {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  body.restored-ui-active dialog[open] > .dialog-close-control {
    position: absolute;
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    z-index: 5;
  }
  body.restored-ui-active #mobile-menu[open] .mobile-menu-heading {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--website-surface-28-34-24-1, #1c2218);
  }
  body.restored-ui-active #modal[open]:not(:has(.shop-cosmetic-preview, .pvp-rankings-modal)) > .modal-top {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--surface, var(--website-surface-32-38-27-1, #20261b));
  }
  body.restored-ui-active #modal[open]:has(.shop-cosmetic-preview) {
    width: min(560px, calc(100% - 20px));
    max-height: calc(var(--review-popup-height, 100dvh) - max(12px, env(safe-area-inset-top)));
  }
  body.restored-ui-active #modal[open]:has(.shop-profile-preview-dialog) .profile-frame-focus {
    width: min(100%, calc(var(--review-popup-height, 100dvh) - 172px), 330px);
  }
  body.restored-ui-active #missions-dropdown:popover-open {
    display: block;
    background: var(--website-surface-28-36-24-1, #1c2418);
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  body.restored-ui-active #missions-dropdown:popover-open .missions-dialog {
    position: relative;
    width: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 16px;
    overflow: visible;
    border: 0;
    border-radius: 20px;
  }
  body.restored-ui-active #missions-dropdown .missions-dialog-heading {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--website-surface-28-36-24-1, #1c2418);
  }
  #restored-ui [data-mobile-editor] > header {
    padding: 5px 48px 8px 0;
    margin: 0;
  }
  #restored-ui [data-mobile-editor] > header h2 {
    margin: 2px 0 0;
    font-size: clamp(19px, 5vw, 24px);
  }
  #restored-ui [data-mobile-editor] > header > p {
    display: none;
  }
  /* Keep the gallery between the title and the form actions. */
  #restored-ui [data-mobile-editor] .studio-layout {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: auto;
  }
  #restored-ui [data-mobile-editor] .studio-editor {
    width: 100%;
  }
  #restored-ui [data-mobile-editor] .studio-tabs {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 10px;
    padding: 4px;
    border: 1px solid var(--website-line-70-85-54-1, #465536);
    border-radius: 9px;
    background: var(--website-surface-25-31-21-1, #191f15);
  }
  #restored-ui [data-mobile-editor] .studio-tabs button {
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 4px 3px;
    border-radius: 6px;
    font-size: 12px;
  }
  #restored-ui [data-mobile-editor] .studio-tabs button[aria-pressed='true'] {
    background: var(--website-surface-64-83-50-1, #405332);
    color: var(--website-ink-233-255-199-1, #e9ffc7);
  }
  #restored-ui [data-mobile-editor]:not([data-mobile-editor='details']) .mobile-editor-details,
  #restored-ui [data-mobile-editor='details'] :is(.studio-gallery-heading, #studio-items),
  #restored-ui [data-mobile-editor] #studio-preview-panel,
  #restored-ui [data-mobile-editor] #studio-preview-jump {
    display: none;
  }
  #restored-ui .restored-player-inspection[open] {
    inset: var(--review-popup-top, 0px) 0 auto;
    top: calc(var(--review-popup-top, 0px) + var(--review-popup-height, 100dvh) / 2);
    width: min(430px, calc(100% - 24px));
    max-height: calc(var(--review-popup-height, 100dvh) - 24px);
    margin: 0 auto;
    transform: translateY(-50%);
  }
  #restored-ui .restored-player-inspection .restored-profile-scroll {
    max-height: calc(var(--review-popup-height, 100dvh) - 24px);
  }
  #restored-ui .restored-player-inspection > .dialog-close-control {
    top: 5px;
    right: 6px;
  }
  #restored-ui .restored-profile-detail > .ranked-profile-card {
    --mobile-profile-banner: clamp(84px, 26cqw, 104px);
  }
  #restored-ui .restored-profile-detail > .ranked-profile-card > .profile-banner {
    height: var(--mobile-profile-banner);
  }
  #restored-ui .restored-profile-detail .ranked-profile-card > .profile-card-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 0 13px 13px;
  }
  #restored-ui .restored-profile-detail .ranked-profile-card .profile-avatar-row {
    /* Reference mobile proportion (32cqw), enlarged by 10%. */
    --profile-avatar-art: clamp(110px, 35.2cqw, 154px);
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    margin-top: calc(-1 * var(--profile-avatar-art) * var(--profile-avatar-anchor, 0.5));
    margin-bottom: 7px;
  }
  #restored-ui .restored-profile-detail .profile-avatar-row:has(> .avatar-frame:not(.frame-collection)) {
    --profile-avatar-art: clamp(68px, 20.9cqw, 92px);
  }
  #restored-ui .restored-profile-detail .ranked-profile-actions {
    grid-column: 2;
    min-width: 0;
    flex-wrap: wrap;
    align-self: end;
    margin: 0 0 2px;
  }
  #restored-ui .restored-profile-detail .ranked-profile-actions > button {
    padding: 6px 8px;
    min-height: 36px;
    white-space: normal;
  }
  #restored-ui .restored-profile-detail .ranked-profile-details > h2 {
    font-size: 21px;
  }
  #restored-ui .restored-profile-detail .ranked-profile-details > h2 .styled-name {
    gap: 2px 5px;
    padding: 2px 4px;
  }
  #restored-ui .restored-profile-detail .ranked-profile-details > .profile-about {
    margin: 6px 0 8px;
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  #restored-ui .restored-profile-detail .ranked-profile-details > .profile-card-stats {
    padding-top: 7px;
  }
  #restored-ui .restored-profile-detail .profile-card-stats strong {
    font-size: 21px;
    line-height: 1;
  }
  #restored-ui .restored-profile-detail .ranked-profile-card .trophy-section {
    margin-top: 8px;
  }
  #restored-ui .restored-profile-detail .trophy-case {
    padding: 4px 0 6px;
  }
  #restored-ui .restored-profile-detail .trophy-section > header {
    min-height: 22px;
    margin-bottom: 4px;
  }
  #restored-ui .restored-profile-detail .trophy-award {
    min-height: 32px;
  }
  #restored-ui .restored-profile-detail .trophy-icon {
    width: 23px;
    height: 23px;
  }
  #restored-ui .restored-profile-detail .trophy-badge-grid {
    gap: 4px;
  }
  #restored-ui .restored-profile-detail .trophy-badge-slot .name-badge {
    padding: 3px 2px;
    font-size: 8px;
  }
  #restored-ui .restored-profile-detail .ranked-profile-card .review-equipped-coin {
    padding: 7px 9px 5px;
  }
  #restored-ui .restored-profile-detail .review-equipped-coin > h3 {
    margin: 3px 0 0 !important;
    font-size: 17px !important;
  }
  #restored-ui .restored-profile-detail .review-equipped-coin > .review-coin-stage {
    width: min(100%, clamp(118px, 22dvh, 187px));
    margin: 0 auto;
  }
  @media (max-height: 680px) {
    #restored-ui .restored-profile-detail .ranked-profile-card > .profile-card-content {
      gap: 7px;
      padding-inline: 10px;
      padding-bottom: 9px;
    }
    #restored-ui .restored-profile-detail .ranked-profile-card .profile-avatar-row {
      margin-bottom: 4px;
    }
    #restored-ui .restored-profile-detail .ranked-profile-details > .profile-about {
      margin-block: 4px;
    }
    #restored-ui .restored-profile-detail .ranked-profile-card .trophy-section {
      margin-top: 5px;
    }
    #restored-ui .restored-profile-detail .review-equipped-coin > .review-coin-stage {
      width: min(100%, clamp(87px, 18dvh, 122px));
    }
  }
  @media (max-height: 580px) {
    #restored-ui .restored-profile-detail .ranked-profile-details > h2 {
      font-size: 18px;
    }
    #restored-ui .restored-profile-detail .ranked-profile-details > .profile-card-stats {
      padding-top: 5px;
    }
    #restored-ui .restored-profile-detail .profile-card-stats strong {
      font-size: 18px;
    }
    #restored-ui .restored-profile-detail .profile-card-stats span {
      margin-top: 4px;
    }
    #restored-ui .restored-profile-detail .ranked-profile-card .trophy-section {
      margin-top: 4px;
    }
    #restored-ui .restored-profile-detail .trophy-case {
      padding: 2px 0 3px;
    }
    #restored-ui .restored-profile-detail .trophy-section > header {
      min-height: 18px;
      margin-bottom: 3px;
    }
    #restored-ui .restored-profile-detail .trophy-award {
      min-height: 27px;
    }
    #restored-ui .restored-profile-detail .trophy-badge-slot .name-badge {
      padding-block: 2px;
    }
    #restored-ui .restored-profile-detail .ranked-profile-card .review-equipped-coin {
      padding-block: 5px 3px;
    }
    #restored-ui .restored-profile-detail .review-equipped-coin > h3 {
      font-size: 15px !important;
    }
    #restored-ui .restored-profile-detail .review-equipped-coin > .review-coin-stage {
      width: min(100%, 90px);
    }
  }
  #restored-ui [data-mobile-editor] .studio-fields {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 11px;
  }
  #restored-ui [data-mobile-editor] .studio-fields :is(input, select, textarea) {
    min-height: 44px;
    font-size: 16px;
  }
  #restored-ui [data-mobile-editor] .studio-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #restored-ui [data-mobile-editor] .studio-badge-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #restored-ui [data-mobile-editor] .studio-save {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
    gap: 6px;
    padding: 7px 0 0;
    margin-top: 7px;
  }
  #restored-ui [data-mobile-editor] .studio-save > button {
    width: 100%;
    min-height: 44px;
  }
  #restored-ui [data-mobile-editor] .studio-footer-note {
    grid-column: 1/-1;
    min-height: 16px;
    margin: 0;
    padding: 0;
  }
  #restored-ui [data-mobile-editor] .studio-footer-note [role='status'] {
    font-size: 11px;
  }

  /* Content-sized informational dialogs keep their actions in view on phones. */
  body.restored-ui-active #modal[open]:not(:has(.shop-cosmetic-preview, .pvp-rankings-modal)) > .modal-top {
    margin-bottom: 16px;
  }
  body.restored-ui-active #modal-content > p {
    margin-block: 10px;
  }
  body.restored-ui-active #modal-content > .modal-secondary {
    display: inline-flex;
    margin-top: 8px;
  }
  body.restored-ui-active #modal .achievement-detail > .achievement-medal {
    width: 70px;
    height: 76px;
    margin: 4px auto 12px;
  }
  body.restored-ui-active #modal .achievement-detail h2 {
    font-size: 24px;
    margin-block: 8px;
  }
  body.restored-ui-active #modal .achievement-detail p {
    font-size: 12px;
    line-height: 1.5;
  }
  body.restored-ui-active #modal .achievement-detail-progress {
    margin-block: 12px;
  }
  body.restored-ui-active #modal .achievement-reward-list {
    padding: 12px;
    margin-block: 12px;
  }

  body.restored-ui-active :is(#view-rankings, #view-battles) :is(.leaderboard-controls, .pvp-board-controls) {
    gap: 7px;
  }
  body.restored-ui-active :is(#view-rankings, #view-battles, #modal .pvp-rankings-modal) .segmented > button {
    min-height: 41px;
    font-size: 11px;
  }
  /* Keep the header, filters and period label above the scrolling standings. */
  html body.restored-ui-active #modal[open]:has(.pvp-rankings-modal) {
    height: min(800px, calc(var(--review-popup-height, 100dvh) - 32px)) !important;
    overflow: hidden;
  }
  body.restored-ui-active #modal .pvp-rankings-modal .pvp-rankings-scroll {
    border: 0;
    border-radius: 0;
  }
  body.restored-ui-active
    #modal
    #pvp-board-body
    > tr:is([data-rank='1'], [data-rank='2'], [data-rank='3'])
    .leader-rank-number {
    width: 29px;
    min-height: 28px;
    font-size: 17px;
    letter-spacing: 0.3px;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
  }
  body.restored-ui-active table[data-mobile-standings] > colgroup {
    display: none;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] :is(th, td) {
    padding: 8px 3px;
    text-align: center;
    border-bottom: 1px solid var(--website-line-131-152-107-0_3137254901960784, #83986b50);
    vertical-align: middle;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] th {
    white-space: normal;
    font-size: 9px;
    line-height: 1.3;
    background: var(--website-surface-26-30-23-1, #1a1e17);
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] :is(th, td):nth-child(2) {
    text-align: left;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] :is(th, td):nth-child(5) {
    display: none;
  }
  body.restored-ui-active table[data-mobile-standings] th:nth-child(1) {
    width: 11%;
  }
  body.restored-ui-active table[data-mobile-standings] th:nth-child(2) {
    width: 57%;
  }
  body.restored-ui-active table[data-mobile-standings] th:nth-child(3) {
    width: 16%;
  }
  body.restored-ui-active table[data-mobile-standings] th:nth-child(4) {
    width: 16%;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] td:nth-child(3) {
    font-size: 19px;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] .table-name {
    width: 100%;
    min-width: 0;
    min-height: 64px;
    gap: 5px;
    padding: 0;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] .table-name > .avatar-frame {
    --collection-size: clamp(37px, 12.8vw, 58px);
    display: inline-grid;
    width: var(--collection-size);
    height: var(--collection-size);
    flex: 0 0 var(--collection-size);
  }
  body.restored-ui-active
    :is(#view-rankings, #modal)
    table[data-mobile-standings]
    .table-name
    > .avatar-frame:has(> [data-frame-surface='standing']) {
    --frame-render-size: calc(var(--collection-size) * 0.9);
    width: var(--frame-render-size);
    height: var(--frame-render-size);
    flex-basis: var(--frame-render-size);
  }
  body.restored-ui-active table[data-mobile-standings] .trophy-standing-name {
    flex: 1;
  }
  body.restored-ui-active table[data-mobile-standings] .trophy-standing-title .nickname {
    white-space: nowrap;
  }
  body.restored-ui-active table[data-mobile-standings] .trophy-standing-title .styled-name {
    flex: 1;
  }
  body.restored-ui-active table[data-mobile-standings] .trophy-standing-badges {
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
  }
  body.restored-ui-active table[data-mobile-standings] .trophy-standing-badges .name-badge {
    min-width: 0;
    font-size: 7px;
  }
  body.restored-ui-active table[data-mobile-standings] .table-name > small {
    display: none;
  }
  body.restored-ui-active :is(#view-shop, #view-achievements) .section-heading h1,
  body.restored-ui-active :is(#view-friends, #view-guilds, #view-chat) h1 {
    font-size: clamp(24px, 7vw, 32px);
    line-height: 1.12;
  }
  body.restored-ui-active #view-shop .shop-tabs {
    width: 100%;
  }
  body.restored-ui-active #view-shop .shop-tabs button {
    min-height: 43px;
  }
  body.restored-ui-active #view-shop .shop-item-actions :is(button, a) {
    min-height: 44px;
  }
  body.restored-ui-active #view-friends :is(.community-tabs button, .friends-search-row button) {
    min-height: 44px;
  }
  body.restored-ui-active #view-friends input,
  body.restored-ui-active #view-chat textarea,
  body.restored-ui-active .chat-composer textarea {
    font-size: 16px;
  }
  body.restored-ui-active :is(#view-chat, .restored-surface) .chat-composer button {
    min-height: 44px;
  }
  body.restored-ui-active #view-achievements :is(button, select) {
    min-height: 44px;
  }
  body.restored-ui-active #dashboard-membership .ps-plan-card :is(a, button) {
    min-height: 44px;
  }
}

.restored-player-inspection[data-draft-profile-preview] [data-trophy-edit],
.restored-ui-active #studio-preview-panel [data-trophy-edit],
.restored-ui-active #shop-profile-preview [data-trophy-edit] {
  display: none;
}

/* The same identity layout serves Ranked, PvP Full Rankings, and both personal cards. */
body.restored-ui-active .rankings-identity {
  flex: 0 1 auto;
  max-width: 100%;
}
body.restored-ui-active .rankings-identity .trophy-standing-title > .styled-name {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  width: fit-content;
  min-height: 23px;
  justify-content: flex-start;
  gap: 4px;
}
body.restored-ui-active .rankings-identity .styled-name:has(.standings-membership)::after {
  display: none;
}
body.restored-ui-active .rankings-identity .nickname {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.restored-ui-active .rankings-identity .standings-membership {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
body.restored-ui-active .rankings-identity .standings-membership > .standings-membership-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.restored-ui-active .rankings-identity .standings-membership-mark > :is(img, .vip-emblem) {
  width: 100%;
  height: 100%;
}
body.restored-ui-active .rankings-identity .vip-emblem {
  position: relative;
  transform-style: preserve-3d;
  animation: standings-vip-flip 4s ease-in-out infinite;
}
.rankings-identity .vip-emblem > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}
.rankings-identity .vip-emblem > img:last-child {
  transform: rotateY(180deg);
}
@keyframes standings-vip-flip {
  0%,
  42.5% {
    transform: rotateY(0);
  }
  50%,
  92.5% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.restored-ui-active .rankings-identity .vip-emblem {
    animation: none;
  }
}
body.restored-ui-active.player-reduced-motion .rankings-identity .vip-emblem {
  animation: none;
}
body.restored-ui-active .rankings-identity .trophy-standing-badges {
  display: grid;
  justify-items: start;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
body.restored-ui-active .rankings-identity .ranking-badge-pair {
  display: flex;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
}
body.restored-ui-active .rankings-identity .ranking-badge-pair > .name-badge {
  flex: 0 1 auto;
  min-width: 0;
}
body.restored-ui-active :is(#ranked-your-ranking, #pvp-your-ranking) .your-ranking-person {
  flex: 1;
  width: auto;
  margin-inline-end: 0;
  gap: clamp(12px, 4vw, 22px);
  scale: none;
}
body.restored-ui-active :is(#ranked-your-ranking, #pvp-your-ranking) .your-ranking-person > .avatar-frame {
  --collection-size: 72px;
  flex-shrink: 0;
}
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] th:first-child {
    width: 32px;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] th:nth-child(2) {
    width: auto;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] th:is(:nth-child(3), :nth-child(4)) {
    width: clamp(32px, 10vw, 44px);
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] .table-name {
    min-height: 70px;
    gap: 6px;
  }
  body.restored-ui-active .rankings-identity .trophy-standing-title .styled-name {
    flex: 0 1 auto;
  }
  body.restored-ui-active .rankings-identity .ranking-badge-pair > .name-badge {
    font-size: 8px;
  }
  body.restored-ui-active :is(#ranked-your-ranking, #pvp-your-ranking) .your-ranking-person > .avatar-frame {
    --collection-size: clamp(37px, 12.8vw, 58px);
    width: var(--collection-size);
    height: var(--collection-size);
  }
}
@media (max-width: 400px) {
  body.restored-ui-active .your-ranking-identity {
    gap: 6px;
  }
  body.restored-ui-active .your-ranking-position {
    min-width: 37px;
  }
}
@media (max-width: 355px) {
  body.restored-ui-active .rankings-identity .ranking-badge-pair > .name-badge {
    font-size: 7px;
    padding-inline-end: 3px;
  }
  body.restored-ui-active .rankings-identity .profile-badge-emblem {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }
  body.restored-ui-active :is(#view-rankings, #modal) table[data-mobile-standings] .table-name > .avatar-frame {
    --collection-size: 35px;
    --frame-render-size: 35px;
  }
}
