.trophy-cabinet {
  margin: 18px 0;
  padding: 12px;
  min-width: 0;
  color: #273f47;
  border: 1px solid #edf5f5ce;
  border-radius: 15px;
  background: linear-gradient(145deg,#ecf5f477,#b0c9cb46);
  box-shadow: inset 0 1px #ffffff9e, 0 3px 10px #23415010;
}
.trophy-shelf-heading, .trophy-shelf-heading > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.trophy-shelf-heading h3 {margin:0!important}
.trophy-count {font-size:12px;font-variant-numeric:tabular-nums;color:#405a64}
.trophy-empty {margin:9px 0 2px;font-size:13px;color:#405a64}
.trophy-scroll {position:relative;margin-top:9px}
.trophy-shelf {
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 3px 4px 9px;
  overflow-x: auto;
  scrollbar-color: #79969f #e3eeef70;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  list-style: none;
}
.trophy-shelf:focus-visible {outline:2px solid #517d81;outline-offset:3px}
.trophy-shelf > li {flex:0 0 clamp(104px,16vw,138px);scroll-snap-align:start}
body :is(#communityHub,#playerProfilePopup) .hub-content button.trophy-card {
  width: 100%;
  min-height: 148px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  border-radius: 10px!important;
  padding: 4px 6px 8px!important;
  border: 1px solid #f4f9fae5!important;
  background: linear-gradient(180deg,#f3f8faef,#cedfe3cd)!important;
  box-shadow: inset 0 1px #fff, 0 2px 5px #48647126!important;
  color: #24414b!important;
  text-align: center;
  font-family: 'Barlow',sans-serif;
}
body :is(#communityHub,#playerProfilePopup) .hub-content button.trophy-card:hover {background:#f8fbfc!important}
.trophy-card-stage {
  display: grid;
  position: relative;
  place-items: center;
  width: 100%;
  height: 100px;
  background: radial-gradient(ellipse at 50% 92%,#677f8d33,transparent 61%);
}
.trophy-card img {width:100px;height:100px;max-width:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 4px #2c3b4e3d)}
.trophy-card strong {font-size:13px;line-height:1.14;max-width:100%;overflow-wrap:anywhere}
.trophy-variants {font-size:10px;color:#47636d}
.trophy-featured {
  position:absolute;
  top:3px;
  right:2px;
  padding:2px 5px;
  border-radius:9px;
  background:#e8f4f3ed;
  color:#2e6260;
  font-size:9px;
}
.trophy-navigation,.trophy-order {display:flex;justify-content:flex-end;gap:5px;margin-top:5px}
.trophy-navigation button,.trophy-order button {display:grid;place-items:center;min-width:32px;min-height:30px;padding:4px!important}
.trophy-navigation svg,.trophy-order svg {
  fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;width:16px;height:16px
}
.trophy-order {justify-content:center}
body :is(#communityHub,#playerProfilePopup) .hub-content li:has(.trophy-order) button.trophy-card {height:auto;flex:1 0 auto}
.trophy-shelf > li:has(.trophy-order) {display:flex;flex-direction:column}
.trophy-order {flex:none}
.hub-legacy-awards {margin:10px 0}
.hub-legacy-awards > summary {cursor:pointer;color:#425d66;font-weight:600}

body #trophyDetailPopup.fbs-popup {
  box-sizing:border-box;
  width:min(570px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px);
  max-width:none;
  padding:14px 18px 16px;
  overflow:auto;
  color:#213b45;
  font:500 14px/1.35 'Barlow',sans-serif;
}
#trophyDetailPopup .trophy-popup-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:34px;
  padding-right:68px;
}
#trophyDetailPopup .trophy-popup-header h2 {
  margin:0;
  color:#213b45;
  text-align:left;
  font:700 27px/1.08 'Barlow Condensed',sans-serif;
}
.trophy-popup-stage {
  display:grid;
  place-items:center;
  margin:5px 0 9px;
  border:1px solid #f3fafbc9;
  border-radius:12px;
  background:radial-gradient(ellipse at 50% 66%,#f5fafb 0%,#d9e6eb 53%,#b7cbd5 100%);
  box-shadow:inset 0 1px 8px #5e798932;
}
.trophy-popup-stage img {
  width:clamp(122px,47dvh,300px);
  height:auto;
  max-width:88%;
  aspect-ratio:1;
  object-fit:contain;
  filter:drop-shadow(0 8px 12px #203e5448);
}
.trophy-rule,.trophy-earned,.trophy-progress {margin:8px 0}
.trophy-earned {font-weight:700;color:#305e5a}
.trophy-progress-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  list-style:none;
  gap:3px 12px;
  padding:0;
  margin:7px 0;
}
.trophy-progress-grid li {display:flex;justify-content:space-between;gap:8px;padding:3px 0;border-bottom:1px solid #617e8e37;font-size:12px}
.trophy-progress-grid b {color:#2f625e}
.trophy-tier-list {display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}
.trophy-popup-actions {display:flex;justify-content:flex-end;margin:8px 0}
.trophy-popup-actions button {box-sizing:border-box;min-height:32px;padding:6px 12px;font:600 12px/1.2 Barlow,sans-serif;border-radius:8px}
.trophy-tier-list button {display:flex;align-items:center;gap:3px;min-height:44px;padding:2px 6px!important}
.trophy-tier-list img {width:40px;height:40px;object-fit:contain}
.trophy-tier-list button[aria-label$="Locked"] img {opacity:.42;filter:grayscale(.8)}
.trophy-history-list {padding:0;margin:4px 0;list-style:none}
.trophy-history-list li {padding:6px 0;border-top:1px solid #78949e45}
.trophy-history-list small {display:block;color:#45606d;margin-top:3px}
.trophy-popup-status:empty,.trophy-history:empty {display:none}
.trophy-popup-status {margin:7px 0 0}
@media (max-height:460px) {
  body #trophyDetailPopup.fbs-popup {padding:9px 12px}
  #trophyDetailPopup .trophy-popup-header h2 {font-size:23px}
  .trophy-popup-stage img {width:clamp(105px,37dvh,180px)}
}
body #trophyDetailPopup.fbs-popup[open] {
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden!important;
}
.trophy-popup-detail {min-height:0;overflow:auto;overscroll-behavior:contain;padding-inline:2px}
body :is(#communityHub,#playerProfilePopup) .hub-content .hub-active-trophy {
  display:grid;place-items:center;width:60px;height:60px;min-height:0;
  padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;
}
.hub-active-trophy img {width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 3px #25435250)}
body #communityHub .hub-content .hub-profile-own > .hub-active-trophy {
  position:absolute;left:50px;top:52px;width:31px;height:33px;
}
@media (max-width:720px) {
  body #communityHub .hub-content .hub-profile-own > .hub-active-trophy {left:44px;top:43px}
  body #playerProfilePopup .hub-content .hub-active-trophy {width:44px;height:44px;grid-column:3}
}
.trophy-navigation[hidden] {display:none}
.trophy-shelf-actions {display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.trophy-shelf-actions button {white-space:normal}
.trophy-card[data-locked=true] .trophy-card-stage img {opacity:.54;filter:grayscale(.8)}

body #trophyDetailPopup:is([data-size=full],[data-size=inset]) {
  position:fixed;inset:0;max-width:100vw;max-height:100dvh;
}
body #trophyDetailPopup[data-size=full] {width:100vw;height:100dvh}
body #trophyDetailPopup[data-size=inset] {width:92vw;height:80dvh}
@media(max-height:500px){body #trophyDetailPopup[data-size=inset]{height:88dvh}}
#trophyDetailPopup[data-size=inset] .trophy-popup-stage img {width:min(47dvh,380px)}
#trophyDetailPopup[data-size=full] .trophy-popup-stage img {width:min(56dvh,512px)}

.trophy-popup-stage,.trophy-tier-list button,.hub-active-trophy {position:relative}
.trophy-copies {
  position:absolute;left:3px;top:3px;padding:2px 5px;border-radius:8px;
  background:#f3faf9;color:#23494b!important;box-shadow:0 0 0 1px #57787770;font:700 11px/1.2 Barlow,sans-serif;
  font-variant-numeric:tabular-nums;pointer-events:none;
}
.trophy-tier-list .trophy-copies,.hub-active-trophy .trophy-copies {font-size:9px;left:0;top:auto;bottom:0}

.profile-title-strip {
  display:flex;gap:8px;list-style:none;margin:7px 0 0;padding:2px 2px 6px;
  overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;
}
.profile-title-strip li {flex:none}
body :is(#communityHub,#playerProfilePopup) .profile-title-strip button {
  white-space:nowrap;min-height:34px;padding:6px 12px!important;border-radius:18px!important
}
.profile-title-strip button[data-active=true]::before {content:'✓';margin-right:5px;color:#26665c}
.trophy-cabinet .trophy-shelf {margin-top:7px}

.trophy-card[data-ghost=true] .trophy-card-stage img {filter:grayscale(1) contrast(.94);opacity:.65}
.trophy-lock {position:absolute;right:3px;top:2px;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5}
.trophy-popup-stage[data-ghost=true] img {filter:grayscale(1);opacity:.55}
