@import url("./trophy-milestones.css");
@import url("./trophy-game-metadata.css");
#trophy-profile {
  --guide-line: color-mix(in srgb, var(--theme-ink) 20%, transparent);
}
#trophy-profile [hidden] {
  display: none !important;
}
#profile-sync-dialog {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 1.5rem;
  border: 1px solid var(--guide-line);
  border-radius: 0.75rem;
  background: var(--theme-surface, var(--theme-paper));
  color: var(--theme-ink);
}
#profile-sync-dialog::backdrop {
  background: #0009;
}
#profile-sync-dialog button {
  min-height: 44px;
  margin-block: 0.25rem;
}
#profile-sync-dialog > button {
  margin-right: 0.5rem;
}
#profile-sync-dialog h2 {
  margin: 0;
  font-size: 1.4rem;
}
#manage-sync {
  min-height: 44px;
  font-size: 0.8rem;
}
.trophy-game-guides {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.profile-player-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.profile-player-identity > img {
  width: clamp(3.5rem, 12vw, 4.5rem);
  height: auto;
  border-radius: 50%;
  flex-shrink: 0;
}
.profile-player-identity > div {
  min-width: 0;
}
.profile-player-identity h1 {
  overflow-wrap: anywhere;
}
#profile-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
#profile-heading .profile-player-identity {
  margin-bottom: 0;
}
#profile-heading .renown-status {
  flex-basis: 100%;
}
#trophy-profile:not(.is-game-detail) #profile-score {
  flex-basis: 100%;
  min-width: 0;
}
#trophy-profile:not(.is-game-detail) #profile-score:empty {
  display: none;
}
#trophy-profile:not(.is-game-detail) #profile-score .renown-about-link {
  margin-left: 0;
}
#trophy-profile:not(.is-game-detail) .profile-tools {
  border-top: 0;
  margin-top: 0;
  padding-block: 0 0.5rem;
}
#trophy-profile:not(.is-game-detail) .profile-tools:not(:has(> :not([hidden]))) {
  display: none;
}
#trophy-profile:not(.is-game-detail) #profile-summary:has(.trophy-psn-profile) {
  border-bottom: 1px solid var(--guide-line);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}
#profile-summary .trophy-sync-controls {
  margin: 0.25rem 0 0;
  gap: 0.25rem;
}
#profile-summary .trophy-sync-controls > p {
  flex-basis: 100%;
  min-width: 0;
}
#trophy-profile .trophy-psn-identity > div {
  min-width: 0;
}
#trophy-profile .trophy-psn-identity:has(.trophy-sync-controls) {
  align-items: flex-start;
  min-width: 0;
}
#trophy-profile:not(.is-game-detail) .profile-tools .trophy-sync-controls {
  flex: 1;
  justify-content: flex-end;
  gap: 0.25rem 1rem;
}
#trophy-profile:not(.is-game-detail) #psn-sync-status {
  color: var(--theme-muted);
  font-size: 0.8rem;
}
.profile-renown-details {
  max-width: 24rem;
  text-align: left;
}
@media (max-width: 599px) {
  #trophy-profile:not(.is-game-detail) .profile-tools .trophy-sync-controls {
    justify-content: flex-start;
  }
}
@media (min-width: 800px) {
  #profile-heading .renown-headline {
    justify-content: flex-end;
    text-align: right;
    max-width: 24rem;
  }
}
.trophy-game-row .trophy-achievement-emblem {
  flex-basis: 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
}
.trophy-game-row .trophy-achievement {
  gap: 0.5rem;
}
.trophy-game-row .trophy-achievement-title {
  font-size: 0.85rem;
}
.trophy-game-row .trophy-achievement-center .guide-trophy-mark {
  width: 2rem;
  height: 2rem;
}
.trophy-game-row .trophy-achievement-center > strong {
  font-size: 0.9rem;
}
.is-game-detail #profile-heading,
.is-game-detail #profile-summary {
  display: none;
}
#trophy-profile .trophy-psn-profile {
  align-items: flex-start;
  gap: 0.75rem 1.5rem;
  margin: 0;
  padding-block: 0 0.65rem;
  border: 0;
}
#trophy-profile .trophy-psn-identity {
  flex-basis: 13rem;
}
#trophy-profile .trophy-psn-identity h2 {
  font-size: 0.95rem;
}
#trophy-profile .trophy-psn-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
#trophy-profile .trophy-psn-totals dt {
  padding-left: 1.5rem;
}
#trophy-profile .trophy-psn-totals .guide-trophy-mark {
  width: 1.15rem;
  height: 1.15rem;
}
#trophy-profile .trophy-psn-totals dd {
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}
.profile-renown {
  margin: 0;
}
.profile-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  border-block: 1px solid var(--guide-line);
  margin-block: 0.5rem 1rem;
  padding-block: 1rem 0.5rem;
}
.renown-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}
.renown-label {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}
.renown-headline-value {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--theme-accent);
}
.renown-headline-value > svg {
  width: clamp(2rem, 5vw, 3rem);
  height: auto;
  flex-shrink: 0;
}
.renown-headline-value > strong {
  color: var(--theme-accent);
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}
.renown-status {
  color: var(--theme-muted);
  font-size: 0.8rem;
}
.renown-completion {
  color: var(--theme-accent);
  margin: 0 0 1rem;
  font-size: 0.85rem;
}
.renown-completion span {
  color: var(--theme-muted);
  font-size: 0.75rem;
}
.profile-renown > summary,
.sid-game-score > summary {
  color: var(--theme-muted);
  font-size: 0.85rem;
}
#profile-score:empty {
  display: none;
}
#profile-score:has(details[open]),
.profile-tools .trophy-sync-controls:has(details[open]),
.profile-tools .trophy-sync-controls:has(#psn-sync-status:not([hidden])) {
  flex-basis: 100%;
}
.profile-tools .trophy-sync-controls,
.profile-tools .sid-game-score {
  margin: 0;
}
.profile-game-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
#game-trophies {
  scroll-margin-top: 1rem;
}
.profile-renown summary,
.sid-game-score summary,
.profile-sync-options summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
}
.profile-renown summary strong {
  color: var(--theme-accent);
  font-size: 1.2rem;
}
.profile-renown summary span {
  margin-left: 0.5rem;
}
.profile-renown p {
  max-width: 65ch;
  font-size: 0.9rem;
}
.profile-sync-options {
  margin: 0;
}
.profile-sync-options summary {
  color: var(--theme-muted);
  font-size: 0.85rem;
}
.profile-sync-options[open] {
  flex-basis: 100%;
}
.profile-sync-options button {
  margin: 0.5rem 0.5rem 0.5rem 0;
}
.trophy-library-heading .guide-kicker {
  margin: 0.75rem 0 0;
}
.profile-return {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.profile-empty {
  padding-block: 1rem;
}
.trophy-game-activity {
  grid-column: 2;
  font-size: 0.75rem;
  color: var(--theme-muted);
  margin: 0;
}
.profile-trophy-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.profile-trophy-filters label {
  display: grid;
  gap: 0.35rem;
  flex: 1 1 15rem;
  min-width: 0;
}
.profile-trophy-filters input,
.profile-trophy-filters select {
  width: 100%;
  min-width: 0;
}
#trophy-profile .guide-visibility {
  margin-top: 1rem;
}
#trophy-profile .guide-filter-help {
  gap: 0.25rem;
}
.trophy-game-row h3 a,
.trophy-game-row .guide-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.trophy-library-title h2 {
  margin-block: 0.5rem 1rem;
}
#profile-content > section {
  margin-block: 0.75rem;
}
@media (max-width: 359px) {
  #trophy-profile .trophy-psn-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
  }
  #trophy-profile .trophy-psn-totals dt {
    padding-left: 0;
    justify-content: center;
  }
  #trophy-profile .trophy-psn-totals dd {
    justify-content: center;
  }
}
.sid-game-score {
  margin-block: 1rem 1.5rem;
}
.renown-breakdown {
  max-width: 34rem;
  margin-block: 1.25rem;
}
.renown-part {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  margin-block: 1rem;
}
.renown-history {
  list-style: none;
  max-width: 34rem;
  padding: 0;
}
.renown-history li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.75rem;
  padding-block: 0.5rem;
}
.renown-history strong {
  font-variant-numeric: tabular-nums;
}
.renown-history small {
  grid-column: 1 / -1;
  color: var(--theme-muted);
}
.renown-part dt {
  font-size: 0.9rem;
  color: var(--theme-muted);
}
.renown-part dd {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.renown-part-track {
  grid-column: 1 / -1;
  height: 0.35rem;
  background: var(--guide-line);
  border-radius: 1rem;
  overflow: hidden;
}
.renown-part-track > span {
  display: block;
  height: 100%;
  background: var(--theme-accent);
}
.renown-part[data-part="addons"] .renown-part-track > span {
  background: light-dark(#356e9a, #8abfea);
}
.renown-part[data-part="completion"] .renown-part-track > span {
  background: light-dark(#80601f, #e8cd87);
}
.trophy-profile-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
}
.trophy-profile-metrics .trophy-earned-rate,
.trophy-profile-metrics .trophy-earned-rate p,
.trophy-sid-metric {
  margin-block: 0.5rem;
}
.trophy-sid-metric {
  color: var(--theme-accent);
  font-size: 0.85rem;
}
.trophy-sid-metric strong {
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}
#trophy-profile .trophy-library-heading h1 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 400;
  line-height: 1.05;
  margin-block: 0.35rem 0.75rem;
}
.trophy-sync-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-block: 0.5rem 1rem;
}
.trophy-sync-controls p {
  flex: 1;
  min-width: 12rem;
  margin: 0;
  font-size: 0.9rem;
}
.trophy-library-title {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
}
#trophy-profile .trophy-library-title h2,
#trophy-profile .trophy-game-detail h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}
.trophy-library-filters {
  display: block;
}
.trophy-library-filters label {
  display: grid;
  gap: 0.5rem;
}
.trophy-library-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  grid-column: 1 / -1;
}
.trophy-library-filters input,
.trophy-library-filters select {
  width: 100%;
  min-width: 0;
}
.trophy-game-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  align-items: center;
  padding-block: 1rem;
  border-top: 1px solid var(--guide-line);
}
.trophy-game-row > img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  border-radius: 0.3rem;
}
.trophy-game-achievements {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.library-renown {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  border-radius: 0.3rem;
}
.library-renown:hover .renown-reward strong {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.library-renown .renown-reward strong {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
}
.library-renown .renown-reward svg {
  width: 1.6rem;
  height: 2rem;
}
.trophy-game-achievements > .trophy-game-progress {
  flex: 1 1 10rem;
  min-width: 0;
}
.renown-about-link {
  font-size: 0.8rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}
.trophy-game-row h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.trophy-game-row h3 a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
.trophy-game-row .guide-kicker {
  margin: 0;
}
.trophy-game-progress {
  grid-column: 2;
  display: grid;
  gap: 0.3rem;
}
.trophy-game-progress span,
.trophy-library-note,
#game-count {
  font-size: 0.85rem;
  color: var(--theme-muted);
}
.trophy-game-progress trophy-completion-track {
  max-width: 15rem;
}
.trophy-achievement {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.trophy-achievement-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}
.trophy-achievement-title {
  color: var(--achievement-ink);
  font-size: 1rem;
  line-height: 1.35;
}
.trophy-achievement-copy > span {
  font-size: 0.8rem;
}
.trophy-game-placeholder {
  font-size: 2rem;
  text-align: center;
}
#trophy-profile .trophy-profile-group {
  border-top: 1px solid var(--guide-line);
  margin: 0;
  padding: 0;
}
.trophy-game-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-block: 0.75rem 1rem;
}
.trophy-game-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1 1 24rem;
  min-width: 0;
}
.trophy-game-identity > img {
  width: clamp(4rem, 12vw, 6rem);
  height: auto;
  border-radius: 0.35rem;
}
.trophy-game-identity > div {
  min-width: 0;
}
.trophy-game-heading > .trophy-game-progress {
  flex: 0 1 18rem;
}
.trophy-game-heading .trophy-achievement-emblem {
  flex-basis: 6rem;
  width: 6rem;
  height: 6rem;
}
.trophy-game-heading .trophy-achievement-center .guide-trophy-mark {
  width: 3.25rem;
  height: 3.25rem;
}
.trophy-game-heading .trophy-achievement-title {
  font-size: 1.15rem;
}
#trophy-profile .trophy-game-heading h1 {
  margin: 0.35rem 0 0;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.trophy-game-heading .guide-kicker {
  margin: 0;
}
#profile-filter-status:empty {
  display: none;
}
#trophy-profile .trophy-profile-group > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1rem;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
  list-style: none;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
  min-height: 64px;
  padding: 0.65rem 0.5rem;
  margin: 0;
  box-sizing: border-box;
}
.trophy-profile-group > summary::-webkit-details-marker {
  display: none;
}
.trophy-profile-group > summary::after {
  margin: 0;
}
#trophy-profile summary::after {
  mask-image: url("./chevron-down.svg");
}
#trophy-profile select {
  background-image: url("./chevron-down.svg");
}
.trophy-profile-group > summary:hover {
  background: color-mix(in srgb, var(--theme-ink) 5%, transparent);
}
.trophy-profile-group > summary:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: -2px;
}
.trophy-group-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.trophy-group-progress {
  display: grid;
  gap: 0.15rem;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.trophy-group-count {
  font-size: 0.9rem;
}
.trophy-group-state {
  color: var(--theme-muted);
  font-size: 0.75rem;
}
.trophy-group-trophies {
  padding-inline: 0.5rem;
}
.trophy-profile-trophy {
  padding-block: 1rem;
  border-top: 1px solid var(--guide-line);
}
.trophy-profile-trophy > :is(.guide-trophy-description, .trophy-earned-date) {
  margin-left: 3.4rem;
}
.trophy-profile-trophy > .guide-trophy-description {
  margin-bottom: 0.65rem;
}
.trophy-earned-date {
  display: block;
  margin-top: 0.5rem;
  color: var(--theme-muted);
  font-size: 0.75rem;
}
@media (max-width: 699px) {
  .trophy-profile-trophy > :is(.guide-trophy-description, .trophy-earned-date) {
    margin-left: 0;
  }
}
@media (min-width: 650px) {
  .trophy-game-row {
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.35rem 1.25rem;
  }
  .trophy-game-row > img {
    width: 5rem;
    height: 5rem;
  }
  .trophy-game-progress {
    grid-column: auto;
  }
}
@media (min-width: 1000px) {
  .trophy-game-row {
    grid-template-columns: 5rem minmax(0, 1fr) minmax(27rem, 0.9fr);
  }
  .trophy-game-achievements {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-columns: 9rem 16rem;
    justify-content: end;
  }
  .trophy-game-achievements > .library-renown {
    justify-self: stretch;
  }
  .library-renown .renown-reward {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr);
    width: 100%;
    text-align: left;
  }
  .trophy-game-achievements > .trophy-game-progress:not(.trophy-achievement) {
    justify-items: end;
  }
  .trophy-game-achievements > .trophy-achievement {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }
  .trophy-game-achievements .trophy-achievement-copy {
    text-align: right;
  }
}
.library-filter-options {
  margin-top: 0.5rem;
}
.library-filter-options > summary {
  min-height: 44px;
  cursor: pointer;
  align-content: center;
}
#library-filter-summary {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--theme-muted);
  margin-left: 0.5rem;
}
.library-filter-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  padding-block: 0.5rem;
}
.library-filter-fields label {
  display: grid;
  gap: 0.35rem;
}
.library-filter-fields select {
  width: 100%;
}
.is-game-detail > .guide-link {
  display: none;
}
#next-unlocks {
  margin-block: 1.5rem 2rem;
}
#next-unlocks h2 {
  margin: 0;
}
#next-unlocks ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.unlock-picks > li {
  border-block-end: 1px solid var(--guide-line);
}
.unlock-picks summary {
  display: grid;
  grid-template-columns: 1.875rem minmax(0, 1fr) minmax(3.5rem, 5rem) 0.65rem;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.5rem;
  padding: 0.55rem 0;
  cursor: pointer;
  list-style: none;
}
.unlock-picks summary::-webkit-details-marker {
  display: none;
}
.unlock-picks summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-inline-end: 1.5px solid;
  border-block-end: 1.5px solid;
  transform: rotate(45deg);
}
.unlock-picks details[open] > summary::after {
  transform: rotate(225deg);
}
.unlock-title,
.unlock-count {
  display: grid;
  gap: 0.15rem;
  overflow-wrap: anywhere;
}
.unlock-title small {
  color: var(--theme-muted);
}
.unlock-count {
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.unlock-count progress {
  width: 100%;
  height: 0.25rem;
  accent-color: var(--theme-accent);
}
.unlock-requirement {
  padding: 0 0 0.6rem 2.575rem;
}
.unlock-requirement p {
  margin: 0 0 0.25rem;
}
#next-unlocks .guide-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.875rem;
}
.unlock-requirement a {
  margin-inline-end: 0.8rem;
}
#next-unlocks button.guide-link {
  padding: 0 0.2rem;
  border: none;
  background: transparent;
  color: var(--theme-muted);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
#next-unlocks button.guide-link:is(:hover, :focus-visible) {
  color: var(--theme-accent);
}
#next-unlocks button.guide-link:disabled {
  opacity: 0.65;
  cursor: wait;
}
.unlock-hidden ul {
  width: fit-content;
  max-width: min(100%, 26rem);
}
.unlock-hidden li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  overflow-wrap: anywhere;
}
@media (max-width: 600px), (any-pointer: coarse) {
  #next-unlocks .guide-link {
    min-height: 44px;
  }
}
.unlock-hidden {
  margin-block-start: 0.5rem;
}
.unlock-hidden summary {
  width: fit-content;
  cursor: pointer;
}
#unlock-message:empty {
  display: none;
}
@media (min-width: 700px) {
  .library-filter-fields {
    grid-template-columns: 1fr 2fr;
  }
}
@media (max-width: 359px) {
  .trophy-library-order {
    grid-template-columns: minmax(0, 1fr);
  }
}
