/* November review: compact olive/lime shell and consistent connected cards. */
body.restored-ui-active .topbar .top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  order: initial;
}
body.restored-ui-active .topbar .early-badge {
  position: static;
  transform: none;
  flex: none;
  font-size: 10px;
  letter-spacing: 1px;
}
body.restored-ui-active .topbar .topbar-mission-menu {
  order: initial;
  margin-left: 0;
}
body.restored-ui-active .topbar .restored-surface .topbar-missions {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  min-height: 34px;
  font-size: 10px;
  line-height: 1.2;
  background: transparent;
  border: 1px solid var(--website-line-74-88-57-1, #4a5839);
  border-radius: 6px;
}
body.restored-ui-active .topbar .topbar-missions #topbar-mission-count {
  font-size: 10px;
  margin: 0;
}
body.restored-ui-active .topbar .mission-chevron {
  display: none;
}
body:not(.sidebar-collapsed) #restored-ui .dashboard-sidebar .brand img {
  width: 126px;
  height: auto;
  margin: auto;
  transform: none;
}
#restored-ui .dashboard-sidebar nav a.active {
  color: var(--website-ink-214-245-157-1, #d6f59d);
  background: var(--website-surface-42-50-31-1, #2a321f);
  box-shadow: none;
  border-color: transparent;
}
#restored-ui .dashboard-sidebar nav a.active:before {
  background: none;
  animation: none;
}
#restored-ui .dashboard-sidebar nav a.active:after {
  color: var(--website-ink-214-245-157-1, #d6f59d);
}
body.restored-ui-active .breadcrumb strong {
  white-space: nowrap;
}
/* Both ranking summaries use a single horizontal row on desktop. */
@media (min-width: 901px) {
  body.restored-ui-active .your-ranking-card {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 1fr);
    gap: 8px 20px;
    padding: 16px 18px;
  }
  body.restored-ui-active .your-ranking-heading {
    grid-column: 1/-1;
    margin: 0;
  }
  body.restored-ui-active .your-ranking-identity {
    gap: 14px;
  }
  body.restored-ui-active .your-ranking-person {
    gap: 12px;
  }
  body.restored-ui-active .your-ranking-stats {
    margin: 0;
    padding: 5px 0 5px 18px;
    border: 0;
    border-left: 1px solid var(--website-line-72-86-58-1, #48563a);
    align-items: center;
  }
  body.restored-ui-active .your-ranking-stats dd {
    font-size: 24px;
  }
  body.restored-ui-active .your-ranking-person > .avatar-frame.frame-collection {
    --collection-size: 64px;
  }
}
/* Shared equipped coin: the original live coin renderer and animated frame, centered. */
body.restored-ui-active .review-equipped-coin {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px 12px;
  margin: 16px 0 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--website-line-62-74-50-1, #3e4a32);
  border-radius: 12px;
  background: var(--website-surface-22-29-18-1, #161d12);
}
body.restored-ui-active .review-equipped-coin > .eyebrow {
  align-self: flex-start;
  font: 500 9px var(--body);
  letter-spacing: 1.6px;
  color: var(--website-ink-164-178-146-1, #a4b292);
}
body.restored-ui-active .review-equipped-coin h3 {
  font: 600 22px/1.25 var(--display);
  letter-spacing: -0.5px;
  grid-area: auto;
  align-self: center;
  margin: 14px 0 2px;
  color: var(--website-ink-237-242-230-1, #edf2e6);
  text-transform: none;
}
body.restored-ui-active .review-equipped-coin .review-coin-stage > .profile-showcase-coin {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 !important;
  padding: 0;
  flex: none;
  transform: none;
  translate: none;
}
body.restored-ui-active .review-equipped-coin .profile-showcase-coin > .coin {
  width: 100%;
  height: 100%;
}
body.restored-ui-active .review-equipped-coin .coin-frame-layer {
  z-index: 2;
}
/* The Shop profile is the live frame preview. */
body.restored-ui-active #shop-frames-pane {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
body.restored-ui-active #shop-frames-pane .shop-preview {
  display: block;
  position: static;
  min-width: 0;
  align-self: start;
  grid-row: 1;
}
body.restored-ui-active #shop-frames-pane .preview-label {
  margin: 10px 0 16px;
  gap: 12px;
}
body.restored-ui-active #preview-status {
  scroll-margin-top: 85px;
  text-align: right;
}
body.restored-ui-active #shop-frames-pane #preview-actions:not([hidden]) {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
}
body.restored-ui-active #shop-frames-pane #preview-actions > button {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
}
body.restored-ui-active #shop-frames-pane #preview-actions[hidden],
body.restored-ui-active #shop-frames-pane #equip-preview[hidden] {
  display: none;
}
body.restored-ui-active #shop-grid .shop-item:has([data-preview-item][aria-pressed='true']) {
  border-color: var(--website-line-168-200-130-1, #a8c882);
}
body.restored-ui-active #shop-profile-preview {
  max-height: none;
  overflow: visible;
}
@media (min-width: 1100px) {
  body.restored-ui-active #shop-frames-pane {
    grid-template-columns: minmax(0, 1fr) clamp(465px, 38vw, 660px);
  }
  body.restored-ui-active #shop-frames-pane .shop-preview {
    grid-column: 2;
    position: sticky;
    top: 18px;
  }
  body.restored-ui-active #shop-frames-pane .shop-preview:has(.profile-badge-overflow:not([hidden])) {
    position: static;
  }
}
@media (min-width: 1100px) and (max-width: 1440px) {
  body.restored-ui-active #shop-frames-pane .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
body.restored-ui-active .friends-page {
  font-family: var(--body);
  --line: var(--website-line-59-70-49-1, #3b4631);
  --accent: var(--website-accent-213-245-155-1, #d5f59b);
}
body.restored-ui-active .friends-page .community-heading {
  margin: 0 0 24px;
}
body.restored-ui-active .friends-page .community-heading h1 {
  font: 500 36px/1.2 var(--display);
  letter-spacing: -1.1px;
  margin: 0 0 12px;
}
body.restored-ui-active .friends-page .community-heading p {
  font-size: 12px;
  color: var(--website-ink-170-182-157-1, #aab69d);
}
body.restored-ui-active .friends-page .community-panel {
  padding: 18px;
  border-radius: 10px;
  background: var(--website-surface-29-34-26-1, #1d221a);
  border: 1px solid var(--website-line-57-68-46-1, #39442e);
  box-shadow: none;
}
body.restored-ui-active .friends-page .community-tabs {
  padding-bottom: 12px;
  gap: 5px;
}
body.restored-ui-active .friends-page .community-tabs button {
  padding: 8px 10px;
  min-height: 34px;
  font: 500 11px var(--body);
  border: 1px solid transparent;
  border-radius: 6px;
}
body.restored-ui-active .friends-page .community-tabs button[aria-pressed='true'] {
  background: var(--website-surface-43-52-34-1, #2b3422);
  border-color: var(--website-line-83-101-61-1, #53653d);
  color: var(--website-ink-222-244-184-1, #def4b8);
  box-shadow: none;
}
body.restored-ui-active .friends-empty {
  padding: 32px 12px;
  min-height: 150px;
  justify-content: center;
}
body.restored-ui-active .friends-empty-symbol,
body.restored-ui-active .friends-username {
  display: none;
}
body.restored-ui-active .friends-empty h2 {
  font: 500 16px var(--display);
  margin: 0 0 10px;
}
body.restored-ui-active .friends-empty p {
  font-size: 11px;
  line-height: 1.5;
  margin: 0 0 16px;
}
body.restored-ui-active .friends-page .friends-discovery {
  margin-top: 16px;
}
body.restored-ui-active .friends-page .friends-search-heading {
  margin-bottom: 16px;
}
body.restored-ui-active .friends-search-heading .eyebrow,
body.restored-ui-active .friends-search-heading > svg {
  display: none;
}
body.restored-ui-active .friends-search-heading h2 {
  font: 500 20px var(--display);
  margin: 0;
}
body.restored-ui-active .friends-page :is(.friends-search-row button, .social-row-actions button) {
  min-height: 34px;
  padding: 8px 14px;
  font: 500 11px var(--body);
  color: var(--website-ink-212-231-183-1, #d4e7b7);
  border-color: var(--website-line-82-100-61-1, #52643d);
  border-radius: 5px;
  background: var(--website-surface-36-45-29-1, #242d1d);
}
body.restored-ui-active .friends-search-row button[type='submit'] {
  background: var(--website-surface-213-245-155-1, #d5f59b);
  color: var(--website-ink-27-36-18-1, #1b2412);
  border-color: var(--website-line-201-232-148-1, #c9e894);
}
body.restored-ui-active .friends-page .social-player-row {
  padding: 14px 0;
  min-height: 74px;
}
body.restored-ui-active .friends-page .friends-search-input input {
  padding: 10px 12px;
  min-height: 36px;
  font-size: 12px;
}
body.restored-ui-active .friends-page .social-identity {
  gap: 12px;
}
body.restored-ui-active .friends-page .social-player-row .avatar-slot {
  width: 56px;
  height: 52px;
  flex: 0 0 56px;
}
body.restored-ui-active .friends-page .social-player-row .avatar-slot > .social-avatar {
  width: 36px;
  height: 36px;
  font-size: 15px;
}
body.restored-ui-active .friends-page .social-player-row .avatar-slot.has-frame > .social-avatar {
  width: 24px;
  height: 24px;
  font-size: 13px;
}
/* Matched cards share header, current streak and history baselines. */
body.restored-ui-active.battle-page {
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
}
body.restored-ui-active.battle-page > .workspace {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}
body.restored-ui-active.battle-page main {
  display: block;
  height: auto;
  overflow: visible;
  min-height: 0;
  padding-bottom: 24px;
}
body.restored-ui-active.battle-page #view-battle {
  height: auto;
  min-height: 0;
}
body.restored-ui-active.battle-page .arena-layout {
  height: auto;
  min-height: 0;
}
body.restored-ui-active.battle-page .arena-card {
  height: auto;
  min-height: 0;
  gap: 18px;
  padding: 20px 22px 18px;
  background: var(--website-surface-29-34-26-1, #1d221a);
}
body.restored-ui-active.battle-page #view-battle .duel-coin-stage {
  --duel-coin-lift: clamp(8px, 1vw, 16px);
  --duel-coin-gap: clamp(10px, 2.4vw, 38px);
  width: min(100%, 1040px);
  margin: 4px auto;
  min-height: clamp(220px, 19vw, 294px);
  flex: none;
  gap: var(--duel-coin-gap);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr) minmax(0, 1fr);
}
body.restored-ui-active.battle-page #view-battle .duel-coin-stage::before {
  content: none;
}
body.restored-ui-active.battle-page #view-battle .duel-coin-stage > div {
  width: 100%;
  min-width: 0;
  inset-block-start: calc(-1 * var(--duel-coin-lift));
}
body.restored-ui-active.battle-page #view-battle .duel-coin > .mint-render {
  left: calc(50% + var(--coin-center-x, 0px));
  top: calc(50% + var(--coin-center-y, 0px));
  transform: translate(-50%, -50%);
}
.duel-coin-beams {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.duel-coin-beams::before,
.duel-coin-beams::after {
  content: '';
  position: absolute;
  top: calc(50% - var(--duel-coin-lift));
  left: 50%;
  /* The side column is one of 3.06 equal grid units after the two gaps. */
  width: calc(50% - (100% - 2 * var(--duel-coin-gap)) / 6.12);
  height: 3px;
  margin-top: -1.5px;
  transform-origin: left center;
  background:
    linear-gradient(
        90deg,
        transparent,
        var(--website-surface-174-215-107-0_4, #aed76b66) 44%,
        var(--website-surface-229-255-180-1, #e5ffb4) 78%,
        transparent
      ) -45%
      center / 28% 100% no-repeat,
    linear-gradient(
        90deg,
        var(--website-surface-177-212-129-0_4, #b1d48166),
        var(--website-surface-138-164-85-0_25882352941176473, #8aa45542)
      )
      center / 100% 1px no-repeat;
  filter: drop-shadow(0 0 4px #b3e57988);
}
.duel-coin-beams::before {
  transform: scaleX(-1);
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.player-reduced-motion) .duel-coin-beams::before,
  body:not(.player-reduced-motion) .duel-coin-beams::after {
    animation: duel-coin-pulse 2.6s linear infinite;
    animation-delay: var(--duel-pulse-delay, 0ms);
  }
}
@keyframes duel-coin-pulse {
  from {
    background-position:
      -45% center,
      center;
  }
  72%,
  to {
    background-position:
      145% center,
      center;
  }
}
body.restored-ui-active.battle-page #view-battle .personal-coin-slot .duel-coin {
  width: min(72%, 232px);
}
body.restored-ui-active.battle-page #view-battle .central-duel-coin {
  width: min(95%, 292px);
}
body.restored-ui-active.battle-page .duel-player-row {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
  gap: 0;
}
body.restored-ui-active.battle-page .duel-player {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 58px;
  grid-template-rows: 80px auto auto;
  align-items: center;
  gap: 0 10px;
  padding: 12px 14px;
  height: 100%;
  box-sizing: border-box;
  min-width: 0;
  background: var(--website-surface-28-35-22-1, #1c2316);
  border-color: var(--website-line-69-86-52-1, #455634);
}
body.restored-ui-active.battle-page .duel-player > .avatar-frame {
  --collection-size: 76px;
  grid-area: 1/1;
  justify-self: center;
  align-self: center;
}
body.restored-ui-active.battle-page .duel-player > .avatar-frame:not(.frame-collection) {
  width: 44px;
  height: 44px;
}
body.restored-ui-active.battle-page .duel-player-name {
  grid-area: 1/2;
  min-width: 0;
  padding: 0;
}
body.restored-ui-active.battle-page .duel-player-name h2 {
  margin: 0;
  font-size: 14px;
  min-width: 0;
}
body.restored-ui-active.battle-page .duel-player-score {
  grid-area: 1/3;
  align-self: center;
}
body.restored-ui-active.battle-page .duel-player-score > strong {
  font: 500 34px var(--display);
  color: var(--website-ink-210-243-148-1, #d2f394);
}
body.restored-ui-active.battle-page .duel-player-current {
  grid-area: 2/1/3/4;
  align-self: stretch;
  min-height: 35px;
  padding-top: 10px;
  border-top: 1px solid var(--website-line-59-71-46-1, #3b472e);
}
body.restored-ui-active.battle-page .duel-player .pvp-flip-record {
  grid-area: 3/1/4/4;
  margin-top: 8px;
  align-self: end;
}
body.restored-ui-active.battle-page .duel-vs {
  align-self: center;
  justify-self: center;
  color: var(--website-ink-151-170-130-1, #97aa82);
}
body.restored-ui-active.battle-page .arena-message {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  min-height: 0;
  padding: 0;
  margin: 0;
}
body.restored-ui-active.battle-page .arena-actions {
  display: flex;
  gap: 8px;
  flex-direction: row;
  margin-top: 20px;
  align-items: stretch;
}
body.restored-ui-active.battle-page .duel-choice-row {
  flex: 1;
  gap: 8px;
}
body.restored-ui-active.battle-page .arena-actions > .flip-button {
  flex: 1;
  min-height: 46px;
  padding: 12px 16px;
  font-size: 13px;
  margin: 0;
}
body.restored-ui-active.battle-page .duel-choice-row > button {
  flex: 1;
  min-height: 46px;
  padding: 12px 10px;
  font-size: 13px;
  border-radius: 6px;
}
body.restored-ui-active.battle-page .arena-meta {
  margin-top: 0;
  min-height: 28px;
}
body.restored-ui-active.battle-page .page-footer {
  position: static;
  inset: auto;
  display: flex;
  clear: both;
  flex: none;
  margin-top: 24px;
  padding: 16px 0;
  transform: none;
}
body.restored-ui-active #view-battles > .pvp-lobby-resume h2 {
  font-size: 16px;
}
.saved-match-result {
  text-align: center;
  padding: 16px 4px;
  color: var(--website-ink-230-239-218-1, #e6efda);
}
.saved-match-result h2 {
  font: 500 36px var(--display);
  margin: 12px 0;
}
.saved-match-result > strong {
  display: block;
  font: 500 48px var(--display);
  color: var(--website-ink-212-237-170-1, #d4edaa);
  margin: 20px 0;
}
.saved-match-result > strong span {
  color: var(--website-ink-130-147-108-1, #82936c);
}
.saved-match-result time {
  font-size: 12px;
  color: var(--website-ink-166-181-152-1, #a6b598);
}
/* Product descriptions are removed, including their reserved minimum heights. */
#view-shop .shop-item-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}
#view-shop .shop-item-content h2 {
  margin: 12px 0 18px;
}
#view-shop .shop-item-content > .shop-item-actions {
  margin-top: 0;
}
/* Short, nonblocking announcement; no additional gameplay delay or sound. */
.sudden-entry {
  position: fixed;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  isolation: isolate;
  z-index: 150;
  pointer-events: none;
  text-align: center;
  width: min(490px, calc(100vw - 32px));
  padding: 30px 20px;
  box-sizing: border-box;
  border: 1px solid #bda05c;
  border-radius: 18px;
  background: radial-gradient(ellipse at center, #53432d, var(--website-surface-30-37-25-1, #1e2519) 75%);
  box-shadow:
    0 14px 70px var(--website-shade-0-0-0-0_6, #0009),
    0 0 40px #bf8e3b33;
  color: #ffe3ab;
  animation: sudden-entry-in 0.22s ease-out both;
}
.sudden-entry > svg {
  width: 40px;
  height: 40px;
  display: block;
  margin: 0 auto 12px;
  fill: none;
  stroke: #f3cc83;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.sudden-entry > span {
  font-size: 10px;
  letter-spacing: 3px;
  color: #c6b893;
}
.sudden-entry > strong {
  display: block;
  font: 700 clamp(27px, 6vw, 42px) / 1.1 var(--display);
  letter-spacing: -1px;
  margin: 7px 0 12px;
}
.sudden-entry > p {
  font: 400 13px var(--body);
  margin: 0;
  color: #d4c7aa;
}
.sudden-entry-orbit {
  position: absolute;
  inset: 9px;
  border: 1px solid #caa76840;
  border-radius: 12px;
  z-index: -1;
}
@keyframes sudden-entry-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (max-width: 1000px) {
  body.restored-ui-active.battle-page .duel-player {
    grid-template-columns: 60px minmax(0, 1fr) 46px;
    gap: 0 7px;
    padding-inline: 10px;
  }
  body.restored-ui-active.battle-page .duel-player > .avatar-frame {
    --collection-size: 60px;
  }
  body.restored-ui-active.battle-page .duel-player-score > strong {
    font-size: 28px;
  }
}
@media (max-width: 760px) {
  body.restored-ui-active .friends-page .community-heading h1 {
    font-size: 30px;
  }
  body.restored-ui-active .friends-page .community-panel {
    padding: 16px;
  }
  body.restored-ui-active .friends-page .community-tabs button {
    padding-inline: 8px;
  }
  body.restored-ui-active.battle-page #view-battle .duel-coin-stage {
    --duel-coin-gap: 8px;
    min-height: 148px;
  }
  body.restored-ui-active.battle-page #view-battle .personal-coin-slot .duel-coin {
    width: min(72%, 92px);
  }
  body.restored-ui-active.battle-page #view-battle .central-duel-coin {
    width: min(94%, 130px);
  }
  body.restored-ui-active.battle-page .arena-card {
    padding: 0;
    gap: 12px;
  }
  body.restored-ui-active.battle-page .duel-player {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: 60px 28px auto auto;
    gap: 0 6px;
    padding: 9px 8px;
  }
  body.restored-ui-active.battle-page .duel-player > .avatar-frame {
    --collection-size: 54px;
  }
  body.restored-ui-active.battle-page .duel-player-name {
    grid-area: 2/1/3/3;
    align-self: start;
  }
  body.restored-ui-active.battle-page .duel-player-name h2 {
    font-size: 11px;
  }
  body.restored-ui-active.battle-page .duel-player-score {
    grid-area: 1/2;
    justify-self: end;
  }
  body.restored-ui-active.battle-page .duel-player-current {
    grid-area: 3/1/4/3;
    font-size: 10px;
    min-height: 30px;
  }
  body.restored-ui-active.battle-page .duel-player .pvp-flip-record {
    grid-area: 4/1/5/3;
  }
  body.restored-ui-active.battle-page .arena-actions {
    flex-direction: column;
    margin-top: 10px;
  }
  body.restored-ui-active.battle-page .duel-choice-row > button,
  body.restored-ui-active.battle-page .arena-actions > .flip-button {
    min-height: 48px;
    font-size: 14px;
  }
  body.restored-ui-active.battle-page .page-footer {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sudden-entry {
    animation: none;
  }
}
.player-reduced-motion .sudden-entry {
  animation: none;
}

/* Reserve the entire wing silhouette so its native canvas cannot cover the copy. */
body.restored-ui-active .review-equipped-coin > .eyebrow {
  align-self: flex-start !important;
  grid-area: auto !important;
}
body.restored-ui-active .review-equipped-coin > h3 {
  align-self: center !important;
  grid-area: auto !important;
  font-size: 22px !important;
  margin: 14px 0 2px !important;
}
body.restored-ui-active .review-equipped-coin > .review-coin-stage {
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  aspect-ratio: 1;
  flex: none;
  margin: 8px auto 0;
  position: relative;
}
body.restored-ui-active .review-coin-stage > .profile-showcase-coin {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 !important;
}
body.restored-ui-active .review-coin-stage[data-framed='true'] > .profile-showcase-coin {
  width: 60%;
}
body.restored-ui-active
  .review-coin-stage[data-framed='false']
  > .profile-showcase-coin[data-physical-preview='original'] {
  width: 85%;
}

body.restored-ui-active .friends-page .friends-empty button {
  background: var(--website-surface-40-51-30-1, #28331e);
  border-color: var(--website-line-82-100-61-1, #52643d);
  color: var(--website-ink-216-236-183-1, #d8ecb7);
}

body.restored-ui-active .review-equipped-coin .coin-frame-layer canvas {
  width: 100% !important;
  height: 100% !important;
}

/* The clicked profile supplies the layout for every full profile surface. */
body.restored-ui-active {
  --ranked-card-body: var(--body);
  --ranked-card-display: var(--display);
}
body.restored-ui-active .ranked-profile-card {
  --body: var(--ranked-card-body);
  --display: var(--ranked-card-display);
  container: ranked-profile / inline-size;
  width: 100%;
  min-width: 0;
  margin: 0;
  font: 14px / normal var(--body);
}
body.restored-ui-active .ranked-profile-card .profile-banner {
  height: clamp(82px, 17cqw, 124px);
}
.ranked-profile-card.profile-style-default .banner-sage {
  background: linear-gradient(
    120deg,
    var(--website-surface-86-102-57-1, #566639),
    var(--website-surface-154-166-108-1, #9aa66c)
  );
}
.ranked-profile-card.profile-style-default .banner-violet {
  background: linear-gradient(125deg, #534268, #b29bce);
}
.ranked-profile-card.profile-style-default .banner-ocean {
  background: linear-gradient(125deg, #244f66, #8ac5d3);
}
.ranked-profile-card.profile-style-default .banner-ember {
  background: linear-gradient(125deg, #673e2d, #d59674);
}
.ranked-profile-card.profile-style-default .banner-slate {
  background: linear-gradient(125deg, #36404a, #9fb2c2);
}
.ranked-profile-card.profile-style-default .banner-rose {
  background: linear-gradient(125deg, #653c52, #d1a0b8);
}
body.restored-ui-active .ranked-profile-card .profile-card-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(12px, 3cqw, 24px);
  padding: 0 clamp(14px, 3cqw, 24px) clamp(14px, 3cqw, 24px);
}
.ranked-profile-details {
  min-width: 0;
}
body.restored-ui-active .ranked-profile-card .profile-avatar-row {
  --profile-avatar-art: clamp(142px, 30cqw, 224px);
  display: grid;
  justify-items: start;
  align-items: end;
  gap: 0 8px;
  min-height: 0;
  margin: calc(-1 * var(--profile-avatar-art) * var(--profile-avatar-anchor, 0.5)) 0 4px;
}
body.restored-ui-active .ranked-profile-card .profile-avatar-row > .frame-collection.large-frame {
  --collection-size: var(--profile-avatar-art);
}
.ranked-profile-card .profile-avatar-row > .avatar-frame:not(.frame-collection) {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  width: var(--profile-avatar-art);
  height: var(--profile-avatar-art);
}
.ranked-profile-card .profile-avatar-row > .avatar-frame:not(.frame-collection) > .avatar {
  width: 69%;
  height: auto;
  aspect-ratio: 1;
  font-size: clamp(30px, 7cqw, 54px);
}
body.restored-ui-active .ranked-profile-card h2 {
  margin: 0 0 4px;
  line-height: 1.2;
}
body.restored-ui-active .ranked-profile-card h2 .styled-name {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
}
.ranked-profile-card h2 .styled-name .nickname {
  white-space: normal;
  overflow-wrap: anywhere;
}
body.restored-ui-active .ranked-profile-card .profile-about {
  min-height: 0;
  margin: 10px 0 12px;
}
body.restored-ui-active .ranked-profile-card .profile-card-stats {
  padding-top: 12px;
}
body.restored-ui-active .ranked-profile-card .profile-badge-collection {
  margin: 10px 0 0;
}
body.restored-ui-active .ranked-profile-card .profile-badge-collection > header {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
body.restored-ui-active .ranked-profile-card .profile-badge-collection > header > span {
  font: inherit;
}
body.restored-ui-active .ranked-profile-card .profile-badge-overflow {
  max-height: none;
  overflow: visible;
}
body.restored-ui-active .ranked-profile-card .review-equipped-coin {
  margin: 0;
}
body.restored-ui-active .ranked-profile-card .review-equipped-coin > .review-coin-stage {
  width: min(100%, 340px);
  margin-block: auto;
}
body.restored-ui-active .ranked-profile-card .review-equipped-coin h3 {
  overflow-wrap: anywhere;
}
body.restored-ui-active .ranked-profile-card .ranked-profile-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-self: end;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 0;
}
.ranked-profile-card .ranked-profile-actions button {
  padding: 8px 10px;
  min-height: 34px;
  max-width: 100%;
  border: 1px solid var(--profile-line);
  border-radius: 5px;
  background: var(--profile-panel);
  color: var(--profile-accent);
  font: 500 11px var(--body);
  white-space: nowrap;
}
.ranked-profile-card .ranked-profile-actions button:hover {
  border-color: var(--profile-accent);
}
@container ranked-profile (min-width: 750px) {
  body.restored-ui-active
    .ranked-profile-card
    .profile-avatar-row:is(
      :has(.ranked-profile-actions),
      :where(#studio-preview-panel *, [data-draft-profile-preview] *)
    ) {
    --profile-avatar-art: clamp(142px, 22cqw, 176px);
    grid-template-columns: minmax(0, 1fr) max-content;
  }
}
.restored-profile-sample {
  margin: 0;
  font-size: 11px;
  color: var(--profile-muted);
}
body.restored-ui-active .ranked-profile-card.profile-border-hologram::after {
  inset: 5px;
  border: 1px solid #c5b6ef99;
  border-radius: 8px;
}
@container ranked-profile (min-width: 430px) {
  body.restored-ui-active .ranked-profile-card .profile-card-content {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: stretch;
  }
  body.restored-ui-active .ranked-profile-card .review-equipped-coin {
    margin-top: 12px;
  }
}
@container ranked-profile (max-width: 429px) {
  body.restored-ui-active .ranked-profile-card .review-equipped-coin > .review-coin-stage {
    width: min(100%, 238px);
  }
}

/* Anchor the upload to the circular opening. The frame remains free to extend beyond it. */
body.restored-ui-active .avatar-frame > .avatar {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
}
body.restored-ui-active .avatar-frame > .avatar > .avatar-image,
body.restored-ui-active .social-avatar > .avatar-face {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  clip-path: circle(50%);
}

.leader-rank-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
}
.leader-rank-mark > svg {
  position: absolute;
  inset-inline-end: calc(100% + 5px);
  width: 14px;
  height: 14px;
  color: #e9ce80;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.leader-podium .podium-position > svg {
  width: 21px;
  height: 19px;
  flex: none;
}
@media (max-width: 700px) {
  .leader-rank-mark:has(> svg) {
    display: inline-grid;
    vertical-align: middle;
  }
  .leader-rank-mark > svg {
    position: absolute;
    inset-inline-end: calc(100% + 5px);
    width: 10px;
    height: 10px;
  }
  body.restored-ui-active
    :is(#view-rankings, #modal)
    :is(#leaderboard-body, #pvp-board-body)
    .leader-rank-mark:has(> svg)
    > .leader-rank-number {
    min-width: 29px;
    min-height: 28px;
    font-size: 17px;
    letter-spacing: 0.3px;
  }
  .leader-podium .podium-position > svg {
    width: 17px;
    height: 16px;
  }
}

.play-page #mini-leaders .mini-leader.you {
  border-color: var(--website-line-147-181-102-1, #93b566);
  background: linear-gradient(
    110deg,
    var(--website-surface-52-68-42-1, #34442a),
    var(--website-surface-37-46-32-1, #252e20) 82%
  );
  box-shadow:
    inset 0 0 12px var(--website-shade-211-245-154-0_09411764705882353, #d3f59a18),
    0 0 9px var(--website-shade-181-238-114-0_1568627450980392, #b5ee7228);
}
@media (min-width: 951px), (min-width: 701px) and (min-height: 501px) {
  .play-page.ranked-mode #game-title:has(.heat-score) {
    margin-top: 11px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  body.ranked-mode:not(.player-reduced-motion)
    :is(#game-title, #current-streak, #mobile-streak)
    .heat-score:not(.streak-landing)
    .streak-flame {
    animation: ranked-flame-idle 2s ease-in-out infinite alternate;
  }
  body:not(.player-reduced-motion) :is(#game-title, #mobile-streak) .game-streak-chip {
    animation: ranked-heat-idle 2.8s ease-in-out infinite alternate;
  }
  body.ranked-mode:not(.player-reduced-motion) #flip-history .streak-live .slot-ember {
    animation: ranked-ember-idle 2.3s ease-in-out infinite alternate;
  }
  body.ranked-mode:not(.player-reduced-motion) #flip-history .streak-live:nth-child(even) .slot-ember {
    animation-delay: -0.8s;
  }
  .play-page:not(.player-reduced-motion) #mini-leaders .mini-leader.you.rank-climb-gained:not(.rank-climb-settled) {
    animation: ranked-row-rise 0.8s ease-out both;
  }
}
@keyframes ranked-flame-idle {
  from {
    transform: scale(0.9, 1.02) rotate(-5deg);
    opacity: 0.82;
  }
  to {
    transform: scale(1.08, 0.9) rotate(5deg);
    opacity: 1;
  }
}
@keyframes ranked-heat-idle {
  from {
    box-shadow:
      inset 0 0 8px rgba(var(--heat-rgb), 0.06),
      0 0 9px rgba(var(--heat-rgb), 0.12);
  }
  to {
    box-shadow:
      inset 0 0 12px rgba(var(--heat-rgb), 0.16),
      0 0 18px rgba(var(--heat-rgb), 0.26);
  }
}
@keyframes ranked-ember-idle {
  from {
    opacity: 0.38;
    translate: 0 1px;
  }
  to {
    opacity: 1;
    translate: 0 -2px;
  }
}
@keyframes ranked-row-rise {
  from {
    transform: translateY(10px);
  }
  36% {
    box-shadow:
      inset 0 0 18px var(--website-shade-228-255-174-0_4392156862745098, #e4ffae70),
      0 0 16px var(--website-shade-199-255-112-0_4196078431372549, #c7ff706b);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) {
    --battle-bottom: calc(var(--mobile-bottom, 74px) + 12px);
  }
  body.restored-ui-active #shop-frames-pane .shop-preview {
    display: none;
  }
  body.restored-ui-active.play-page.ranked-mode .mobile-run-meta > span {
    font-size: 10px;
    line-height: 14px;
  }
  body.restored-ui-active.play-page.ranked-mode .mobile-run-meta b {
    font-size: 14px;
    line-height: 16px;
  }

  @container (max-width:660px) {
    body.restored-ui-active #pvp-podium .podium-seat {
      grid-template-columns: minmax(0, 1fr) minmax(clamp(62px, 22%, 96px), max-content);
      gap: 8px;
    }
    body.restored-ui-active #pvp-podium .podium-plinth {
      box-sizing: border-box;
      min-height: clamp(84px, 30cqi, 108px);
      margin: 0;
      padding: 8px 6px;
      gap: 4px;
      border-radius: 10px;
    }
    body.restored-ui-active #pvp-podium .podium-score {
      font-size: clamp(11px, 4.5cqi, 16px);
    }
    body.restored-ui-active #pvp-podium .podium-metric {
      font-size: clamp(5px, 2cqi, 8px);
      letter-spacing: 0.045em;
      white-space: nowrap;
    }
  }

  body.restored-ui-active.battle-page:not(.pvp-ending):has(.arena-card) {
    height: auto;
    min-height: var(--mobile-visible-height, 100dvh);
    overflow-y: auto;
  }
  body.restored-ui-active.battle-page:not(.pvp-ending):has(.arena-card)
    :is(.workspace, main, #view-battle, .arena-layout) {
    height: auto;
  }
  body.restored-ui-active.battle-page:not(.pvp-ending):has(.arena-card) main {
    padding: 7px 12px 10px;
  }
  body.restored-ui-active.battle-page:not(.pvp-ending) #view-battle .arena-card {
    --coin-stage-min: clamp(200px, 57vw, 252px);
    height: auto;
    min-height: calc(var(--mobile-visible-height, 100dvh) - var(--mobile-top) - var(--mobile-bottom) - 17px) !important;
    grid-template-rows: auto minmax(var(--coin-stage-min), 1fr) auto auto auto;
    background: transparent;
  }
  body.restored-ui-active.battle-page #view-battle .duel-coin-stage {
    --duel-coin-lift: 5px;
    --duel-coin-gap: 4px;
    width: 100%;
    min-height: 0;
    height: 100%;
    margin: 0;
    container-type: size;
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1.12fr) minmax(0, 1fr);
  }
  .duel-coin-beams::before,
  .duel-coin-beams::after {
    /* The run reaches the side-column center. The rise spans both row centers. */
    --beam-run: calc(25cqw + 5px);
    --beam-rise: calc(50cqh + 2px);
    --beam-angle: atan2(var(--beam-rise), var(--beam-run));
    top: calc(26.415cqh - 1.06px - var(--duel-coin-lift));
    width: hypot(var(--beam-run), var(--beam-rise));
  }
  .duel-coin-beams::before {
    transform: scaleX(-1) rotate(var(--beam-angle));
  }
  .duel-coin-beams::after {
    transform: rotate(var(--beam-angle));
  }
  body.restored-ui-active.battle-page #view-battle .shared-coin-slot {
    display: grid;
    place-items: center;
    grid-area: 1/1/2/-1;
    height: 100%;
  }
  body.restored-ui-active.battle-page #view-battle .personal-coin-slot {
    display: grid;
    place-items: center;
    grid-area: 2/1;
    height: 100%;
  }
  body.restored-ui-active.battle-page #view-battle .personal-coin-slot:last-child {
    grid-column: 3;
  }
  body.restored-ui-active.battle-page #view-battle .central-duel-coin {
    width: min(clamp(112px, 34vw, 154px), 46cqh);
    height: auto;
    aspect-ratio: 1;
  }
  body.restored-ui-active.battle-page #view-battle .personal-coin-slot .duel-coin {
    width: min(clamp(88px, 27vw, 128px), 39cqh, 76%);
    height: auto;
    aspect-ratio: 1;
  }
  body.restored-ui-active.battle-page #view-battle .shared-result {
    bottom: 0;
  }
  body.restored-ui-active.battle-page #view-battle .duel-player-row {
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
    gap: 4px;
  }
  body.restored-ui-active.battle-page #view-battle .arena-actions {
    margin-top: 0;
  }
  body.restored-ui-active.battle-page #view-battle .arena-actions :is(.duel-choice-row > button, .flip-button) {
    min-height: 44px !important;
  }
}

@media (max-width: 700px) and (min-height: 591px) {
  body.restored-ui-active.play-page.ranked-mode .mobile-game-summary {
    grid-template-rows: 12px 38px 13px 33px;
  }
  body.restored-ui-active.play-page .rank-climb-mobile:not([hidden]) {
    margin-top: 4px;
  }
}

/* Each beam travels outward from the gap between the two players. */
body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] {
  --duel-coin-lift: 0px;
  --duel-countdown-clearance: clamp(40px, 5vw, 64px);
  width: 100%;
  min-height: clamp(242px, 30vw, 438px);
  container-type: inline-size;
  gap: 32px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
}
[data-individual-results] .duel-coin-beams::before,
[data-individual-results] .duel-coin-beams::after {
  top: calc(50% - var(--duel-coin-lift));
  width: calc(25% + 8px - var(--duel-countdown-clearance));
  height: 8px;
  margin-top: -4px;
  background:
    linear-gradient(
        90deg,
        transparent 5%,
        var(--website-surface-188-230-138-1, #bce68a) 49%,
        var(--website-surface-242-255-214-1, #f2ffd6) 79%,
        transparent
      ) -80%
      center / 40% 3px no-repeat,
    linear-gradient(
        90deg,
        transparent,
        var(--website-surface-201-249-143-0_788235294117647, #c9f98fc9) 70%,
        transparent
      ) -80%
      center / 40% 8px no-repeat,
    linear-gradient(
        90deg,
        var(--website-surface-169-205-106-0_6, #a9cd6a99),
        var(--website-surface-134-162-84-0_4, #86a25466)
      )
      center / 100% 1px no-repeat;
  filter: drop-shadow(0 0 5px #bbf487ae);
}
[data-individual-results] .duel-coin-beams::before {
  left: calc(50% - var(--duel-countdown-clearance));
  transform: scaleX(-1);
}
[data-individual-results] .duel-coin-beams::after {
  left: calc(50% + var(--duel-countdown-clearance));
  transform: none;
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.player-reduced-motion) [data-individual-results] .duel-coin-beams::before,
  body:not(.player-reduced-motion) [data-individual-results] .duel-coin-beams::after {
    animation: individual-duel-pulse 1.85s cubic-bezier(0.32, 0.05, 0.52, 1) infinite;
    animation-delay: var(--duel-pulse-delay, 0ms);
  }
}
@keyframes individual-duel-pulse {
  from {
    background-position:
      -80% center,
      -80% center,
      center;
  }
  76%,
  to {
    background-position:
      175% center,
      175% center,
      center;
  }
}
body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] .duel-coin {
  width: min(232px, 22cqw, 15.5vw);
  height: auto;
  aspect-ratio: 1;
}
/* The countdown stands alone; only its numeral carries the heartbeat. */
.pvp-round-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--website-ink-216-246-163-1, #d8f6a3);
  white-space: nowrap;
  pointer-events: none;
}
body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] > .pvp-round-timer {
  position: absolute;
  inset-block-start: 50%;
  left: 50%;
  width: auto;
  z-index: 3;
  transform: translate(-50%, -50%);
}
.pvp-round-timer[hidden] {
  display: none;
}
.pvp-round-timer time {
  display: block;
  min-width: 2ch;
  font-family: var(--display);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
  text-shadow: 0 0 22px var(--website-shade-198-245-140-0_19607843137254902, #c6f58c32);
  transform-origin: center;
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
}
.pvp-round-timer[data-expiring] {
  color: #ffdaa0;
}
.pvp-round-timer[data-expiring] time {
  text-shadow: 0 0 26px #f3b45f65;
}
.ledger-row.ledger-individual {
  grid-template-columns: 30px repeat(2, minmax(0, 1fr));
}
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active.battle-page:not(.pvp-ending) #view-battle .arena-card:has([data-individual-results]) {
    --coin-stage-min: clamp(155px, 43vw, 216px);
  }
  body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] {
    min-height: 0;
    container-type: size;
    gap: 20px;
    --duel-countdown-clearance: clamp(28px, 8vw, 38px);
  }
  [data-individual-results] .duel-coin-beams::before,
  [data-individual-results] .duel-coin-beams::after {
    width: calc(25% + 5px - var(--duel-countdown-clearance));
  }
  .pvp-round-timer time {
    font-size: clamp(32px, 9vw, 44px);
  }
  body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] .personal-coin-slot {
    grid-area: 1 / 1;
  }
  body.restored-ui-active.battle-page
    #view-battle
    .duel-coin-stage[data-individual-results]
    .personal-coin-slot:last-child {
    grid-column: 2;
  }
  body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] .duel-coin {
    width: min(132px, 24cqw, 51cqh);
  }
}

body.battle-page #view-battle .pvp-round-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  position: relative;
  z-index: 1;
}
body.battle-page #view-battle .pvp-round-header .round-status {
  grid-column: 2;
  color: var(--website-ink-237-245-223-1, #edf5df);
  font-size: clamp(17px, 1.6vw, 25px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.07em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
body.battle-page #view-battle .pvp-round-header .round-status.sudden-status {
  color: #ffd4a0;
}
body.battle-page #view-battle .pvp-round-header .pvp-round-tools {
  grid-column: 3;
  justify-self: end;
}

/* Active matches and results share the viewport between the navigation and preview controls. */
body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) {
  --battle-bottom: 70px;
  height: var(--mobile-visible-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}
body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) > .workspace {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) main {
  flex: 1;
  height: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px 24px var(--battle-bottom);
}
body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) main > .page-footer {
  display: none;
}
body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) #view-battle {
  flex: 1;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results]) .arena-heading {
  margin: 0 0 10px;
  flex: none;
}
body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results]) .arena-heading h1 {
  font-size: clamp(22px, 3.2vh, 36px);
  margin: 4px 0 0;
}
body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results]) .arena-layout {
  flex: 1;
  height: 0;
  min-height: 0;
}
body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results])
  #view-battle
  .arena-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  height: 100%;
  min-height: 0 !important;
  gap: 10px;
  padding: 14px 18px;
}
body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results])
  #view-battle
  .duel-coin-stage[data-individual-results] {
  height: 100%;
  min-height: 0;
  margin: 0;
  container-type: size;
}
body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results])
  #view-battle
  .duel-coin-stage
  .duel-coin {
  width: calc(min(252px, 23cqw, 68cqh) * 0.95);
}
body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results]) .arena-actions {
  margin: 0;
}
body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results]) .arena-meta {
  min-height: 24px;
}
/* The restored sidebar shares the same saved appearance as Profile Studio. */
#restored-ui .sidebar-profile .profile-avatar > .avatar-frame {
  --collection-size: 74.88px;
  position: relative;
  display: grid;
  place-items: center;
  width: 51.84px;
  height: 51.84px;
  flex: none;
}
#restored-ui .sidebar-profile .profile-avatar {
  width: 51.84px;
  height: 51.84px;
  flex-shrink: 0;
}
#restored-ui .sidebar-profile .profile-avatar > .avatar-frame > .avatar {
  width: 51.84px;
  height: 51.84px;
  font-size: 23px;
}
#restored-ui .sidebar-profile .profile-avatar > .avatar-frame.frame-collection > .avatar {
  width: 37.44px;
  height: 37.44px;
  font-size: 18.72px;
}
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) {
    --battle-bottom: calc(var(--mobile-bottom, 74px) + 62px);
  }
  body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) main {
    padding: 6px 12px var(--battle-bottom);
  }
  body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results]) .arena-heading {
    display: none;
  }
  body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results])
    #view-battle
    .arena-card {
    padding: 8px;
    gap: 8px;
  }
  body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results])
    #view-battle
    .duel-coin-stage
    .duel-coin {
    width: calc(min(144px, 22cqw, 58cqh) * 0.95);
  }
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) > .workspace {
    height: calc(var(--mobile-visible-height, 100dvh) - var(--mobile-top));
  }
  body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) main {
    height: 0;
  }
}

html:has(body.restored-ui-active.battle-page #view-battle :is([data-individual-results], .pvp-result)) {
  overflow: hidden;
}
body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) {
  padding-bottom: 0;
}

body.restored-ui-active.battle-page.pvp-ending #view-battle:has(> .pvp-result) {
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}
body.restored-ui-active.battle-page.pvp-ending #view-battle > .pvp-result {
  flex: none;
}
body.battle-page #view-battle .pvp-result-scoreline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  text-align: center;
}
body.battle-page #view-battle .pvp-result-scoreline > span {
  text-align: right;
}
body.battle-page #view-battle .pvp-result-scoreline > small {
  text-align: left;
  white-space: normal;
}
body.battle-page #view-battle .pvp-result-scoreline > strong {
  display: inline-grid;
  grid-template-columns: 2ch auto 2ch;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}

:is(#game-title, #mobile-streak) .game-streak-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.13em;
  isolation: isolate;
  overflow: hidden;
  vertical-align: middle;
  padding: 0.19em 0.34em 0.22em;
  border: 1px solid rgba(var(--heat-rgb, 255, 180, 83), 0.55);
  border-radius: 7px;
  background: linear-gradient(
    120deg,
    rgba(var(--heat-rgb, 255, 180, 83), 0.15),
    rgba(var(--heat-rgb, 255, 180, 83), 0.06)
  );
  box-shadow:
    inset 0 0 9px rgba(var(--heat-rgb, 255, 180, 83), 0.15),
    0 0 13px rgba(var(--heat-rgb, 255, 180, 83), 0.22);
}
:is(#game-title, #mobile-streak) .game-streak-chip::before {
  content: '';
  position: absolute;
  inset: -60% -20%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse,
    rgba(var(--heat-rgb, 255, 180, 83), 0.32),
    rgba(var(--heat-rgb, 255, 180, 83), 0.12) 35%,
    transparent 68%
  );
  transform: translateX(-100%) skewX(-18deg);
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.player-reduced-motion) :is(#game-title, #mobile-streak) .game-streak-chip::before {
    animation: streak-chip-wave 2.22s ease-in-out infinite;
  }
}
@keyframes streak-chip-wave {
  0%,
  8% {
    transform: translateX(-100%) skewX(-18deg);
  }
  73%,
  100% {
    transform: translateX(100%) skewX(-18deg);
  }
}

:is(#game-title, #mobile-streak) .game-streak-chip {
  translate: 0 10%;
}
:is(#game-title, #mobile-streak) .game-streak-chip .heat-score {
  gap: 0.25em;
}
.streak-count-caption {
  color: var(--heat-bright);
  font-size: 0.72em;
  font-weight: 750;
  letter-spacing: 0.045em;
}
:is(#game-title, #mobile-streak) .game-streak-chip .heat-number {
  display: inline-block;
  font-weight: 600;
}
:is(#game-title, #mobile-streak) .game-streak-chip .heat-number b {
  font-weight: 750;
}
.game-streak-chip[data-heat='spark'] {
  --count-scale: 1.04;
  --count-tilt: 0deg;
  --count-lift: -0.5px;
  --count-period: 2s;
  --count-glow: 6px;
}
.game-streak-chip[data-heat='fire'] {
  --count-scale: 1.08;
  --count-tilt: -2deg;
  --count-lift: -1px;
  --count-period: 1.7s;
  --count-glow: 9px;
}
.game-streak-chip[data-heat='blaze'] {
  --count-scale: 1.15;
  --count-tilt: -4deg;
  --count-lift: -1.5px;
  --count-period: 1.35s;
  --count-glow: 13px;
}
.game-streak-chip[data-heat='legend'] {
  --count-scale: 1.22;
  --count-tilt: -6deg;
  --count-lift: -2px;
  --count-period: 1.05s;
  --count-glow: 18px;
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.player-reduced-motion) :is(#game-title, #mobile-streak) .game-streak-chip .heat-number {
    transform-origin: center bottom;
    animation: streak-count-beat var(--count-period) ease-in-out infinite;
  }
}
@keyframes streak-count-beat {
  0%,
  65%,
  100% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 4px rgba(var(--heat-rgb), 0.24);
  }
  30% {
    transform: translateY(var(--count-lift)) rotate(var(--count-tilt)) scale(var(--count-scale));
    text-shadow: 0 0 var(--count-glow) rgba(var(--heat-rgb), 0.8);
  }
  46% {
    transform: rotate(calc(var(--count-tilt) * -0.4));
  }
}

:is(#game-title, #mobile-streak) .streak-chip-broken {
  --heat-rgb: 255, 88, 93;
  display: inline-grid;
  overflow: visible;
  color: #ffc1c2;
  font-weight: 750;
  animation: none;
}
:is(#game-title, #mobile-streak) .streak-chip-broken::before {
  display: none;
}
.streak-break-half {
  grid-area: 1 / 1;
  white-space: nowrap;
}
.streak-break-bottom {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.player-reduced-motion) :is(#game-title, #mobile-streak) .streak-chip-broken {
    animation: streak-break-shell 820ms ease-out both;
  }
  body:not(.player-reduced-motion) .streak-break-top {
    clip-path: polygon(0 0, 100% 0, 100% 49%, 76% 39%, 57% 56%, 42% 42%, 23% 54%, 0 46%);
    animation: streak-break-upper 820ms ease-out both;
  }
  body:not(.player-reduced-motion) .streak-break-bottom {
    display: block;
    clip-path: polygon(0 46%, 23% 54%, 42% 42%, 57% 56%, 76% 39%, 100% 49%, 100% 100%, 0 100%);
    animation: streak-break-lower 820ms ease-out both;
  }
}
@keyframes streak-break-shell {
  0% {
    opacity: 1;
    box-shadow: 0 0 17px #ff585d80;
  }
  63% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    box-shadow: 0 0 2px #ff585d00;
  }
}
@keyframes streak-break-upper {
  0%,
  12% {
    transform: none;
  }
  70%,
  100% {
    transform: translate(-4px, -5px) rotate(-4deg);
  }
}
@keyframes streak-break-lower {
  0%,
  12% {
    transform: none;
  }
  70%,
  100% {
    transform: translate(5px, 7px) rotate(5deg);
  }
}

/* Animated Noto Fire. The inline flame is used when motion is reduced. */
.streak-fire-icon {
  display: inline-grid;
  place-items: center;
  width: 1em;
  height: 1em;
  flex: none;
  position: relative;
}
.streak-fire-icon > .streak-flame {
  width: 0.68em;
  height: 0.85em;
}
.streak-fire-stack {
  display: inline-flex;
  align-items: center;
  flex: none;
  font-size: clamp(7px, 1.04vw, 13px);
  gap: 0;
}
.streak-fire-stack > [data-streak-level] {
  display: inline-flex;
}
.streak-fire-stack > [data-streak-level] + [data-streak-level] {
  margin-inline-start: -0.08em;
}
[data-streak-level='1'] {
  --heat-rgb: 239, 147, 91;
  --heat-bright: #ffd8ac;
  --heat: rgb(239, 147, 91);
  --flame-hue: -19deg;
  --flame-bright: 0.9;
  --flame-scale: 1.06;
  --count-scale: 1.022;
  --count-tilt: 0deg;
  --count-lift: -0.25px;
  --count-period: 2.15s;
  --count-glow: 5px;
}
[data-streak-level='2'] {
  --heat-rgb: 255, 161, 92;
  --heat-bright: #ffdfad;
  --heat: rgb(255, 161, 92);
  --flame-hue: -15deg;
  --flame-bright: 0.935;
  --flame-scale: 1.081;
  --count-scale: 1.043;
  --count-tilt: -0.64deg;
  --count-lift: -0.46px;
  --count-period: 2.03s;
  --count-glow: 6.4px;
}
[data-streak-level='3'] {
  --heat-rgb: 255, 136, 66;
  --heat-bright: #ffd59b;
  --heat: rgb(255, 136, 66);
  --flame-hue: -23deg;
  --flame-bright: 0.97;
  --flame-scale: 1.102;
  --count-scale: 1.064;
  --count-tilt: -1.28deg;
  --count-lift: -0.67px;
  --count-period: 1.91s;
  --count-glow: 7.8px;
}
[data-streak-level='4'] {
  --heat-rgb: 255, 147, 56;
  --heat-bright: #ffdc9f;
  --heat: rgb(255, 147, 56);
  --flame-hue: -17deg;
  --flame-bright: 1.005;
  --flame-scale: 1.123;
  --count-scale: 1.085;
  --count-tilt: -1.92deg;
  --count-lift: -0.88px;
  --count-period: 1.79s;
  --count-glow: 9.2px;
}
[data-streak-level='5'] {
  --heat-rgb: 255, 166, 48;
  --heat-bright: #ffe2a4;
  --heat: rgb(255, 166, 48);
  --flame-hue: -11deg;
  --flame-bright: 1.04;
  --flame-scale: 1.144;
  --count-scale: 1.106;
  --count-tilt: -2.56deg;
  --count-lift: -1.09px;
  --count-period: 1.67s;
  --count-glow: 10.6px;
}
[data-streak-level='6'] {
  --heat-rgb: 255, 179, 51;
  --heat-bright: #ffe7ac;
  --heat: rgb(255, 179, 51);
  --flame-hue: -6deg;
  --flame-bright: 1.075;
  --flame-scale: 1.165;
  --count-scale: 1.127;
  --count-tilt: -3.2deg;
  --count-lift: -1.3px;
  --count-period: 1.55s;
  --count-glow: 12px;
}
[data-streak-level='7'] {
  --heat-rgb: 255, 191, 62;
  --heat-bright: #ffedb4;
  --heat: rgb(255, 191, 62);
  --flame-hue: 0deg;
  --flame-bright: 1.11;
  --flame-scale: 1.186;
  --count-scale: 1.148;
  --count-tilt: -3.84deg;
  --count-lift: -1.51px;
  --count-period: 1.43s;
  --count-glow: 13.399999999999999px;
}
[data-streak-level='8'] {
  --heat-rgb: 255, 202, 74;
  --heat-bright: #fff1bc;
  --heat: rgb(255, 202, 74);
  --flame-hue: 5deg;
  --flame-bright: 1.145;
  --flame-scale: 1.207;
  --count-scale: 1.169;
  --count-tilt: -4.48deg;
  --count-lift: -1.72px;
  --count-period: 1.31s;
  --count-glow: 14.799999999999999px;
}
[data-streak-level='9'] {
  --heat-rgb: 255, 211, 100;
  --heat-bright: #fff5cc;
  --heat: rgb(255, 211, 100);
  --flame-hue: 10deg;
  --flame-bright: 1.18;
  --flame-scale: 1.228;
  --count-scale: 1.19;
  --count-tilt: -5.12deg;
  --count-lift: -1.93px;
  --count-period: 1.19s;
  --count-glow: 16.2px;
}
[data-streak-level='10'] {
  --heat-rgb: 255, 225, 147;
  --heat-bright: var(--website-surface-255-249-222-1, #fff9de);
  --heat: rgb(255, 225, 147);
  --flame-hue: 13deg;
  --flame-bright: 1.215;
  --flame-scale: 1.249;
  --count-scale: 1.211;
  --count-tilt: -5.76deg;
  --count-lift: -2.14px;
  --count-period: 1.07s;
  --count-glow: 17.6px;
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.player-reduced-motion) .streak-fire-icon::before {
    content: '';
    position: absolute;
    inset: -13%;
    background: url('/media/streak-fire.webp') center/contain no-repeat;
    filter: hue-rotate(var(--flame-hue, 0deg)) brightness(var(--flame-bright, 1))
      drop-shadow(0 0 0.18em rgba(var(--heat-rgb), 0.4));
    scale: var(--flame-scale, 1);
  }
  body:not(.player-reduced-motion) .streak-fire-icon > .streak-flame {
    visibility: hidden;
  }
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.play-page .mobile-game-summary:has(.game-streak-chip) {
    grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
  }
  body.play-page #mobile-play-note[hidden] {
    display: none;
  }
  body.play-page .mobile-game-summary:has(#mobile-play-note[hidden]) {
    grid-template-rows: auto minmax(30px, auto);
  }
  #mobile-streak .game-streak-chip {
    font-size: clamp(15px, 5vw, 22px);
    line-height: 1.1;
    white-space: nowrap;
    translate: none;
    padding: 0.25em 0.48em;
  }
  #mobile-streak .heat-score,
  #mobile-streak .streak-count-caption {
    white-space: nowrap;
    line-height: 1.1;
  }
  body.restored-ui-active.play-page #game-card .coin-stage .coin-wrap:has(#coin) {
    translate: 0 30%;
  }
}

@media (min-width: 951px), (min-width: 701px) and (min-height: 501px) {
  body.restored-ui-active.play-page #view-play .game-card > .game-controls {
    translate: -10% 0;
  }
}

/* Labels follow their individual coin without shifting either coin on reveal. */
.pvp-coin-result-anchor {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
}
.pvp-coin-outcome {
  position: absolute;
  inset-block-start: calc(100% + 5px);
  inset-inline: 0;
  text-align: center;
  color: var(--ink, var(--website-ink-232-238-220-1, #e8eedc));
  font-size: clamp(12px, 2vw, 17px);
  line-height: 1.2;
  pointer-events: none;
}

/* PvP match presentation */
#view-battle .duel-coin-stage[data-individual-results] {
  isolation: isolate;
  border: 1px solid var(--website-line-100-118-74-0_3333333333333333, #64764a55);
  border-radius: 18px;
  background:
    radial-gradient(
      ellipse at 25% 58%,
      var(--website-surface-171-187-107-0_10980392156862745, #abbb6b1c),
      transparent 46%
    ),
    radial-gradient(ellipse at 75% 58%, #8d9cc41c, transparent 46%),
    linear-gradient(165deg, var(--website-surface-35-41-31-1, #23291f), var(--website-surface-20-24-18-1, #141812) 70%);
  box-shadow:
    inset 0 1px var(--website-shade-217-236-170-0_07058823529411765, #d9ecaa12),
    inset 0 -18px 38px var(--website-shade-7-10-8-0_3333333333333333, #070a0855);
}
#view-battle .pvp-coin-result-anchor {
  isolation: isolate;
  padding-bottom: 25px;
}
#view-battle .pvp-coin-result-anchor::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: auto 19% 21px;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--website-surface-10-13-9-0_6274509803921569, #0a0d09a0), transparent 70%);
  pointer-events: none;
}
#view-battle .pvp-coin-outcome {
  inset-block-start: auto;
  inset-block-end: 0;
  inset-inline: auto;
  justify-self: center;
  padding: 3px 10px;
  border: 1px solid var(--website-line-179-194-147-0_3215686274509804, #b3c29352);
  border-radius: 999px;
  background: var(--website-surface-23-29-21-0_9333333333333333, #171d15ee);
  color: var(--website-ink-240-243-232-1, #f0f3e8);
  font-size: 12px;
}
#view-battle .pvp-coin-outcome[data-hit='true'] {
  border-color: var(--website-line-169-210-120-0_5411764705882353, #a9d2788a);
  background: var(--website-surface-40-55-34-1, #283722);
  color: var(--website-ink-222-247-185-1, #def7b9);
}
#view-battle .pvp-coin-outcome[data-hit='false'] {
  border-color: #c785786f;
  color: #f4c8be;
}
body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] > .pvp-round-timer {
  inset-block-start: 8px;
  transform: translateX(-50%);
  padding: 3px 10px;
  border: 1px solid var(--website-line-141-157-98-0_36470588235294116, #8d9d625d);
  border-radius: 999px;
  background: var(--website-surface-24-31-21-0_9333333333333333, #181f15ee);
  box-shadow: 0 2px 12px var(--website-shade-8-10-7-0_6666666666666666, #080a07aa);
}
#view-battle .pvp-round-timer time {
  font-size: clamp(18px, 5vw, 25px);
  line-height: 1.05;
}
#view-battle .pvp-flip-indicator span:last-child {
  font-size: 10px;
  line-height: 1.15;
}
#view-battle .pvp-flip-indicator br {
  display: none;
}
#view-battle .pvp-player-caption {
  display: block;
  margin-bottom: 2px;
  color: var(--website-ink-171-183-152-1, #abb798);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#view-battle .duel-call-placeholder {
  visibility: hidden;
}
body.restored-ui-active.battle-page #view-battle .duel-player-name .styled-name,
body.restored-ui-active.battle-page #view-battle .pvp-result-identity .styled-name {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-width: 0;
  max-width: 100%;
}
body.restored-ui-active.battle-page #view-battle :is(.duel-player-name, .pvp-result-identity) .nickname {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.restored-ui-active.battle-page #view-battle :is(.duel-player-name, .pvp-result-identity) .display-badges {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: wrap !important;
  max-width: 100%;
}
#view-battle .pvp-result-identity > div,
#view-battle .pvp-result-identity strong {
  min-width: 0;
}
#view-battle .pvp-result-player {
  position: relative;
  min-width: 0;
  background: linear-gradient(
    145deg,
    var(--website-surface-39-51-34-1, #273322),
    var(--website-surface-21-27-21-1, #151b15) 72%
  );
  box-shadow:
    inset 0 1px var(--website-shade-222-221-178-0_09019607843137255, #deddb217),
    0 7px 16px var(--website-shade-10-12-8-0_3764705882352941, #0a0c0860);
}
#view-battle .pvp-result-winner {
  background:
    radial-gradient(
      ellipse at 50% 20%,
      var(--website-surface-169-193-110-0_2196078431372549, #a9c16e38),
      transparent 65%
    ),
    var(--website-surface-27-37-23-1, #1b2517);
  border-color: var(--website-line-184-213-134-1, #b8d586);
}
#view-battle .pvp-result-player-tag {
  justify-self: start;
  color: var(--website-ink-197-212-180-1, #c5d4b4);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#view-battle .pvp-result-winner .pvp-result-player-tag {
  color: var(--website-ink-225-245-183-1, #e1f5b7);
  font-weight: 700;
}
#view-battle button[data-round-wait='true']:disabled {
  opacity: 1;
  border: 1px solid var(--website-line-151-174-114-0_4392156862745098, #97ae7270);
  background: var(--website-surface-43-56-35-1, #2b3823);
  color: var(--website-ink-237-246-221-1, #edf6dd);
}
#view-battle .duel-choice-row button[aria-pressed='true'] {
  background: var(--website-surface-48-63-37-1, #303f25);
  color: var(--website-ink-217-246-179-1, #d9f6b3);
  border-color: var(--website-line-166-199-125-1, #a6c77d);
}
#view-battles .pvp-entry {
  box-shadow:
    inset 0 1px var(--website-shade-217-236-170-0_14901960784313725, #d9ecaa26),
    0 7px 22px var(--website-shade-0-0-0-0_2, #0003);
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active.battle-page:has(#view-battle :is([data-individual-results], .pvp-result)) {
    --battle-bottom: calc(var(--mobile-bottom, 74px) + 12px);
  }
  body.restored-ui-active.battle-page:not(.pvp-ending) #view-battle:has([data-individual-results]) {
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results]) .arena-layout {
    height: auto;
    flex: 1 0 auto;
  }
  body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results])
    #view-battle
    .arena-card {
    height: auto;
    min-height: 100% !important;
    grid-template-rows: auto minmax(clamp(152px, 30dvh, 285px), 1fr) auto auto auto;
    padding: 0;
  }
  #view-battle .duel-coin-stage[data-individual-results] {
    --pvp-mobile-coin-size: min(140px, 25cqw, 51cqh);
  }
  body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results])
    #view-battle
    .duel-coin-stage
    .duel-coin {
    width: var(--pvp-mobile-coin-size);
  }
  #view-battle [data-individual-results] .pvp-coin-result-anchor {
    /* Both coin faces sit on the same line, independent of their frame. */
    translate: var(--pvp-wing-inset, 0px)
      clamp(0px, calc((100cqh - var(--pvp-mobile-coin-size) - 25px) / 2 - 4px), 20cqh);
  }
  #view-battle
    [data-individual-results]
    .personal-coin-slot:not(:last-child)
    .pvp-coin-result-anchor:has(.duel-coin:is([data-coin-frame='angel'], [data-coin-frame='demon'])) {
    --pvp-wing-inset: 5px;
  }
  #view-battle
    [data-individual-results]
    .personal-coin-slot:last-child
    .pvp-coin-result-anchor:has(.duel-coin:is([data-coin-frame='angel'], [data-coin-frame='demon'])) {
    --pvp-wing-inset: -5px;
  }
  body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] > .pvp-round-timer {
    inset-block-start: 14px;
  }
  body.restored-ui-active.battle-page:has(#mobile-help[aria-pressed='true'])
    #view-battle
    .duel-coin-stage[data-individual-results]
    > .pvp-round-timer {
    inset-block-start: calc(8px + 20cqh);
    transform: translateX(-50%) scale(1.2);
    transform-origin: center top;
  }
  body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] > .pvp-flip-indicator,
  body.restored-ui-active.battle-page:has(#mobile-help[aria-pressed='true'])
    #view-battle
    .duel-coin-stage[data-individual-results]
    > .pvp-flip-indicator {
    inset-block-start: 6px;
    gap: 2px;
    transform: translateX(-50%);
    transform-origin: center top;
  }
  body.restored-ui-active.battle-page:has(#mobile-help[aria-pressed='true'])
    #view-battle
    .duel-coin-stage[data-individual-results]
    > .pvp-flip-indicator {
    inset-block-start: 20cqh;
  }
  body.restored-ui-active.battle-page #view-battle .duel-player {
    grid-template-rows: minmax(40px, auto) minmax(40px, auto) auto auto;
    padding: 8px;
  }
  #view-battle .duel-player-name h2 {
    margin: 0;
  }
  body.restored-ui-active.battle-page #view-battle .duel-player-current {
    display: grid;
    gap: 1px;
    justify-content: start;
  }
  #view-battle .duel-player-current .duel-call {
    overflow-wrap: anywhere;
  }
  #view-battle .arena-actions .duel-choice-row button,
  #view-battle .arena-actions > .flip-button,
  #view-battle .pvp-result-actions > :is(a, button) {
    min-height: 44px;
  }
  body.restored-ui-active.battle-page #view-battle .pvp-result-player {
    grid-template-rows: auto auto minmax(38px, auto) auto 1fr;
    align-items: start;
  }
  #view-battle .pvp-result-identity {
    align-items: start;
  }
  #view-battle .pvp-result-players .pvp-flip-record {
    align-self: start;
  }
  #view-battle .pvp-result-hero h1 {
    font-size: clamp(33px, 10vw, 54px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  body:not(.player-reduced-motion) #view-battle .pvp-coin-outcome {
    animation: pvp-outcome-in 200ms cubic-bezier(0.2, 0.75, 0.3, 1) both;
  }
  body:not(.player-reduced-motion) #view-battle [data-round-state='result'] .pvp-coin-result-anchor::before {
    animation: pvp-landing-shadow 260ms ease-out both;
  }
}
@keyframes pvp-outcome-in {
  from {
    opacity: 0;
    translate: 0 4px;
    scale: 0.94;
  }
  to {
    opacity: 1;
    translate: none;
    scale: 1;
  }
}
@keyframes pvp-landing-shadow {
  from {
    opacity: 0.45;
    scale: 0.78 1;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

/* Match timer and flat Original coin artwork. */
body.restored-ui-active.battle-page #view-battle [data-individual-results] > .pvp-round-timer[data-pvp-round-timer] {
  --pvp-timer-ink: var(--website-ink-204-233-150-1, #cce996);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background:
    linear-gradient(var(--website-surface-23-30-22-1, #171e16), var(--website-surface-23-30-22-1, #171e16)) padding-box,
    conic-gradient(
        var(--pvp-timer-ink) calc(var(--pvp-time-left, 1) * 1turn),
        var(--website-surface-57-71-48-1, #394730) 0
      )
      border-box;
  color: var(--pvp-timer-ink);
  box-shadow: none;
}
body.restored-ui-active.battle-page #view-battle [data-individual-results] > [data-pvp-round-timer][data-expiring] {
  --pvp-timer-ink: #efd08c;
}
#view-battle [data-pvp-round-timer] time {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}
body.restored-ui-active.battle-page #view-battle [data-individual-results] > .pvp-flip-indicator {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  width: 100px;
  min-width: 0;
  height: 44px;
  min-height: 0;
  padding: 2px 4px;
  border-radius: 13px;
  transform: translateX(-50%);
  box-shadow: none;
}
#view-battle .pvp-flip-indicator span:last-child {
  font-size: 9px;
  white-space: nowrap;
}
.pvp-flat-coin {
  position: relative;
  width: 24px;
  height: 24px;
  flex: none;
  transform-style: preserve-3d;
}
.pvp-flat-coin img {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.pvp-flat-coin img:last-child {
  transform: rotateY(180deg);
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.player-reduced-motion) .pvp-flat-coin {
    animation: pvp-flat-coin-flip 0.62s linear infinite;
  }
}
@keyframes pvp-flat-coin-flip {
  to {
    transform: rotateY(1turn);
  }
}

/* The play and arena buttons share the same tactile feedback. */
body.restored-ui-active :is(#flip-button, #view-battle [data-social-action='battle-flip']) {
  box-shadow:
    0 4px 0 var(--website-shade-114-142-72-1, #728e48),
    inset 0 1px 0 var(--website-shade-241-255-197-0_47843137254901963, #f1ffc57a);
  touch-action: manipulation;
  transition:
    translate 90ms ease-out,
    box-shadow 90ms ease-out;
}
body.restored-ui-active :is(#flip-button, #view-battle [data-social-action='battle-flip']):active:not(:disabled) {
  translate: 0 4px;
  box-shadow:
    0 0 0 var(--website-shade-114-142-72-1, #728e48),
    inset 0 1px 0 var(--website-shade-241-255-197-0_47843137254901963, #f1ffc57a);
}
body.restored-ui-active :is(#flip-button, #view-battle [data-social-action='battle-flip']):disabled {
  box-shadow: 0 2px 0 var(--website-shade-86-102-61-1, #56663d);
}
body.restored-ui-active
  :is(#view-play [data-choice], #view-battle [data-battle-choice], #view-battle [data-guild-vote]) {
  background: var(--website-surface-36-44-32-1, #242c20);
  border-color: var(--website-line-75-88-61-1, #4b583d);
  color: var(--website-ink-216-226-205-1, #d8e2cd);
  box-shadow: 0 2px 0 var(--website-shade-16-20-14-1, #10140e);
  touch-action: manipulation;
}
body.restored-ui-active
  :is(
    #view-play [data-choice],
    #view-battle [data-battle-choice],
    #view-battle [data-guild-vote]
  )[aria-pressed='true'] {
  background: var(--website-surface-51-69-38-1, #334526);
  border-color: var(--website-line-168-204-121-1, #a8cc79);
  color: var(--website-ink-228-250-201-1, #e4fac9);
  box-shadow:
    0 2px 0 var(--website-shade-22-32-19-1, #162013),
    inset 0 1px var(--website-shade-217-249-171-0_18823529411764706, #d9f9ab30);
}
body.restored-ui-active :is([data-choice], [data-battle-choice], [data-guild-vote]):active:not(:disabled) {
  translate: 0 2px;
  box-shadow: none;
}
.flip-choice-icon {
  display: inline-block;
  vertical-align: -0.24em;
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.56;
}
[aria-pressed='true'] > .flip-choice-icon {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  body.restored-ui-active :is(#flip-button, #view-battle [data-social-action='battle-flip']) {
    transition: none;
  }
}

@media (min-width: 951px), (min-width: 701px) and (min-height: 501px) {
  body.restored-ui-active.battle-page #view-battle .duel-coin-stage[data-individual-results] > .pvp-round-timer {
    inset-block-start: 50%;
    transform: translate(-50%, -50%);
  }
  body.restored-ui-active.battle-page #view-battle [data-individual-results] > .pvp-round-timer[data-pvp-round-timer] {
    box-sizing: border-box;
    width: 67.2px;
    height: 67.2px;
    border-width: 3.6px;
  }
  #view-battle [data-pvp-round-timer] time {
    font-size: 30px;
  }

  body.restored-ui-active.battle-page:not(.pvp-ending):has(#view-battle [data-individual-results])
    #view-battle
    .duel-coin-stage
    .duel-coin:is([data-coin-frame='angel'], [data-coin-frame='demon']) {
    width: min(252px, 23cqw, 54cqh);
  }
  #view-battle [data-individual-results] .personal-coin-slot:last-child {
    --pvp-coin-inset: -5%;
  }
  #view-battle [data-individual-results] .pvp-coin-result-anchor {
    translate: var(--pvp-coin-inset, 5%) min(24px, 7cqh);
  }
  body.restored-ui-active.battle-page #view-battle :is(.duel-player-name, .pvp-result-identity) .styled-name {
    display: inline-flex;
    width: fit-content;
    align-items: center;
  }
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.restored-ui-active.battle-page #view-battle .duel-player-name {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 2px;
    height: auto;
  }
  #view-battle .duel-player-name .pvp-player-caption {
    margin: 0;
  }
  body.restored-ui-active.battle-page #view-battle .duel-player-name .styled-name {
    display: inline-flex;
    align-items: center;
    column-gap: 4px;
  }
  body.restored-ui-active.battle-page #view-battle :is(.duel-player-name, .pvp-result-identity) .badge-vip {
    flex: none;
    white-space: nowrap;
  }
  body.restored-ui-active.battle-page #view-battle :is(.duel-player-name, .pvp-result-identity) .achievement-badge {
    display: none;
  }
  body.restored-ui-active.battle-page
    #view-battle
    :is(.duel-player-name, .pvp-result-identity)
    .display-badges:not(:has(.badge-vip)) {
    display: none;
  }
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.play-page #view-play .coin-caption a {
    text-shadow: 0 0 7px var(--website-shade-211-245-154-0_32, rgba(211, 245, 154, 0.32));
  }
}

/* Restart at the settled position after each toss or drag. */
@media (prefers-reduced-motion: no-preference) {
  body.play-page.mint-v2:not(.player-reduced-motion)
    #view-play
    .game-card:not(:has(#flip-button:disabled))
    .coin-wrap:has(> #coin):not(.coin-grabbed, .coin-manual-toss) {
    animation: play-coin-drift 5.6s ease-in-out infinite;
  }
  body.play-page:not(.player-reduced-motion) #view-play .game-card[data-flip-pending] .coin-wrap:has(> #coin) {
    animation: play-coin-lift 160ms ease-out both;
  }
}

@keyframes play-coin-lift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

@keyframes play-coin-drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Paint the halo across the flip panel so the coin stage cannot clip its falloff. */
body.play-page #view-play .game-card {
  --coin-glow-x: 30%;
  --coin-glow-y: 48%;
  --coin-glow-width: 36%;
  --coin-glow-height: 52%;
  background-image: radial-gradient(
    ellipse var(--coin-glow-width) var(--coin-glow-height) at var(--coin-glow-x) var(--coin-glow-y),
    var(--website-surface-174-190-120-0_16470588235294117, #aebe782a),
    var(--website-surface-174-190-120-0_11372549019607843, #aebe781d) 37%,
    var(--website-surface-174-190-120-0_047058823529411764, #aebe780c) 63%,
    var(--website-surface-174-190-120-0, #aebe7800) 90%
  );
}

@media (max-width: 700px) {
  body.play-page #view-play .game-card {
    --coin-glow-x: 50%;
    --coin-glow-y: 48%;
    --coin-glow-width: 55%;
    --coin-glow-height: 37%;
  }
}

@media (max-width: 950px) and (max-height: 500px) {
  body.play-page #view-play .game-card {
    --coin-glow-x: 26%;
    --coin-glow-y: 56%;
    --coin-glow-width: 30%;
    --coin-glow-height: 46%;
  }
}

#view-battle .pvp-opponent-profile {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  text-align: left;
}
#view-battle .pvp-opponent-profile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 5px;
}
