.profile-progress-nav {
  display: grid;
  gap: clamp(8px, 2.5vw, 13px);
  margin-bottom: clamp(11px, 2.8vw, 15px);
}
.progress-balance {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 5px clamp(12px, 3.5vw, 18px);
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  color: var(--profile-muted);
  font-size: 14px;
  box-shadow: 0 2px 5px #42578b08;
}
.progress-balance strong {
  margin-inline-start: auto;
  color: var(--profile-ink);
  text-align: end;
  overflow-wrap: anywhere;
}
.progress-coin {
  display: inline-block;
  flex: 0 0 auto;
  width: var(--coin-size, 26px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  vertical-align: middle;
}
.progress-price {
  --coin-size: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  color: var(--profile-ink, var(--text));
  font-size: 13px;
  font-weight: 800;
}
.progress-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.progress-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  background: var(--profile-field);
}
.progress-shop-filters, .collection-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.krug-ui .progress-filters button {
  min-width: 0;
  min-height: 44px;
  padding: 5px 2px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--profile-muted);
  font-size: clamp(11px, 3.1vw, 14px);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.krug-ui .progress-filters button[aria-pressed="true"] {
  border-color: var(--profile-border);
  background: var(--profile-card);
  color: var(--profile-blue);
  box-shadow: 0 2px 7px #2c479514;
}
.profile-progress-nav :is(.profile-section-switch, .profile-subtabs) {
  background: color-mix(in srgb, var(--profile-field) 83%, var(--profile-border));
  box-shadow: 0 2px 5px #42578b08;
}
.profile-section-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.krug-ui .profile-section-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: clamp(14px, 3.7vw, 16px);
}
.profile-section-switch button > svg { flex: none; }
.progress-panel { min-width: 0; }
.progress-panel h2 { font-size: clamp(24px, 5vw, 30px); }
.progress-panel h3 { font-size: clamp(17px, 4.2vw, 21px); }
.progress-panel h2 + .progress-filters { margin-top: 11px; }
.progress-note, .progress-empty {
  margin-top: 8px;
  color: var(--profile-muted);
  line-height: 1.4;
  font-size: 13px;
}
.progress-empty {
  padding: 11px;
  border-radius: 12px;
  background: var(--profile-field);
}
.progress-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 14px 0 20px;
}
.progress-stats > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 65px;
  padding: 7px 4px;
  border: 1px solid var(--profile-border);
  border-radius: 11px;
  background: var(--profile-field);
  text-align: center;
  overflow-wrap: anywhere;
}
.progress-stats dt { color: var(--profile-muted); font-size: 11px; line-height: 1.15; }
.progress-stats dd { margin: 0; font-size: clamp(15px, 4.4vw, 21px); font-weight: 780; line-height: 1.15; }
.progress-rankings { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.progress-rankings li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--profile-border);
  border-radius: 12px;
}
.progress-rankings li.is-me { background: var(--profile-selected); }
.progress-rank {
  min-width: 31px;
  padding: 4px;
  border-radius: 8px;
  background: var(--profile-field);
  color: var(--profile-ink);
  text-align: center;
  font-weight: 750;
}
.progress-player { display: grid; min-width: 0; overflow-wrap: anywhere; }
.progress-player strong { font-size: 14px; }
.progress-player :is(span, small) { color: var(--profile-muted); font-size: 12px; }
.progress-score { color: var(--profile-blue); font-size: 14px; }
.progress-category { margin-top: 18px; }
.progress-earn { margin-top: 14px; }
.progress-earn .progress-price { --coin-size: 17px; vertical-align: middle; }
.progress-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.progress-item {
  --shop-card-glow: #657fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  background: var(--profile-card);
  box-shadow: 0 4px 13px #18285114;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.progress-item[data-shop-item="background-aurora"],
.progress-item[data-shop-item="deck-crystal"] { --shop-card-glow: #39bfd5; }
.progress-item[data-shop-item="background-neon"],
.progress-item[data-shop-item="sign-orbit"] { --shop-card-glow: #a477ff; }
.progress-item[data-shop-item="background-velvet"],
.progress-item[data-shop-item="deck-imperial"],
.progress-item[data-shop-item="sign-phoenix"] { --shop-card-glow: #c58837; }
.progress-item.equipped { border-color: var(--profile-blue); }
.progress-item-body {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px;
}
.progress-item h4 {
  margin: 1px 0 0;
  line-height: 1.25;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.progress-item-description {
  margin: 0;
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.progress-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.progress-item-meta:empty { display: none; }
.progress-item-label, .progress-rarity {
  max-width: 100%;
  padding: 3px 5px;
  border-radius: 6px;
  background: var(--profile-selected);
  color: var(--profile-ink);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.progress-rarity.rare { background: #2e80dd30; }
.progress-rarity.epic { background: #8b58df32; }
.progress-rarity.legendary { background: #c68a2838; }
.progress-art {
  --cosmetic-preview-height: clamp(104px, 25vw, 146px);
  min-width: 0;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
}
.progress-art > * { transition: transform .3s ease; }
.sticker-pack-art {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  width: 100%;
  height: var(--cosmetic-preview-height);
  border-radius: inherit;
  background: radial-gradient(ellipse at center, #fae3a5, #edbd76);
}
.sticker-pack-art[data-pack="stickers-goblins"] { background: radial-gradient(ellipse at center, #e2ecb1, #99c8a0); }
.sticker-pack-art img { display: block; width: 76%; height: 88%; min-height: 0; object-fit: contain; }
.collection-art:has(> .sticker-pack-art) { display: block; }
.collection-art .sticker-pack-art { border-radius: 9px; }
.collection-option small { color: var(--profile-muted); font-size: 12px; }
@media (hover: hover) and (pointer: fine) {
  .progress-item:hover {
    transform: translateY(-2px) scale(1.015);
    border-color: var(--shop-card-glow);
    box-shadow: 0 9px 20px color-mix(in srgb, var(--shop-card-glow) 24%, transparent);
  }
  .progress-item:hover .progress-art > * { transform: scale(1.045); }
}
@media (prefers-reduced-motion: reduce) {
  .progress-item, .progress-art > * { transition: none; }
  .progress-item:hover, .progress-item:hover .progress-art > * { transform: none; }
}
.krug-ui .progress-panel .button {
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.2;
}
.krug-ui .progress-item .button { width: 100%; margin-top: auto; padding-inline: 4px; }
.krug-ui .progress-panel .button.secondary {
  border-color: var(--profile-border);
  background: var(--profile-card);
  color: var(--profile-ink);
}
.progress-error .button { margin-top: 8px; }

@media (min-width: 480px) {
  .progress-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.collection-panel { min-width: 0; padding: 2px 2px 12px; }
.collection-categories, .collection-items { display: grid; gap: clamp(5px, 2vw, 10px); }
.collection-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.krug-ui .collection-categories button, .krug-ui .collection-option {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--profile-border);
  background: var(--profile-card);
  color: var(--profile-ink);
  text-align: center;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.krug-ui .collection-categories button {
  gap: 3px;
  min-height: 61px;
  padding: 5px 7px;
  border-radius: 12px;
  color: var(--profile-muted);
  font-size: clamp(12px, 3.3vw, 14px);
  font-weight: 700;
  line-height: 1.12;
}
.collection-categories button small {
  position: absolute;
  top: 4px;
  right: 5px;
  padding: 1px 4px;
  border-radius: 8px;
  background: var(--profile-field);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.krug-ui .collection-categories button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--profile-blue) 42%, var(--profile-border));
  background: var(--profile-selected);
  color: var(--profile-blue);
}
.collection-empty { margin: 9px 2px 0; }
.collection-empty + .collection-items { margin-top: 9px; }
.collection-panel h3 {
  margin: 15px 2px 10px;
  color: var(--profile-ink);
  font-size: clamp(20px, 5.1vw, 24px);
  line-height: 1.18;
}
.krug-ui .collection-option {
  justify-content: end;
  gap: 3px;
  min-height: clamp(110px, 30vw, 145px);
  padding: 8px 7px 9px;
  border-radius: 14px;
  box-shadow: 0 2px 7px #3247770a;
  font-size: clamp(13px, 3.6vw, 16px);
  line-height: 1.15;
}
.krug-ui .collection-option[aria-pressed="true"] {
  border-color: var(--profile-blue);
  box-shadow: inset 0 0 0 1px var(--profile-blue);
}
.collection-art {
  --cosmetic-preview-height: 100%;
  --cosmetic-sample-card-width: clamp(28px, 8vw, 46px);
  display: grid;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  height: clamp(67px, 19vw, 99px);
  place-items: center;
}
.krug-ui .collection-option:is([data-category="deck"], [data-category="background"]) {
  padding-top: 24px;
}
.collection-art > .ward-avatar { --ward-size: clamp(52px, 16vw, 80px); }
.collection-art > .cosmetic-preview { border-radius: 9px; }
.collection-standard-table { --cosmetic-table: radial-gradient(ellipse at 49% 25%, #3b55a4, #293e80 62%, #22336b); }
.collection-art > .ward-item.cosmetic-preview { background: none; }
.collection-art .ward-item > .cosmetic-sign { --cosmetic-sign-size: clamp(54px, 16vw, 79px); }
.collection-art .ward-item > img {
  display: block;
  width: auto;
  max-width: 90%;
  height: clamp(58px, 17vw, 86px);
  object-fit: contain;
}
.collection-art .ward-item .ward-name[data-glow] { color: var(--profile-ink) !important; }
.collection-plain-name { font-size: clamp(26px, 6vw, 38px); font-weight: 800; }
.collection-equipped {
  position: absolute;
  z-index: 1;
  top: 5px;
  right: 5px;
  padding: 3px 6px;
  border-radius: 10px;
  background: var(--profile-selected);
  color: var(--profile-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}
.collection-shop .collection-art { color: color-mix(in srgb, var(--profile-blue) 44%, var(--profile-muted)); }
.krug-ui .collection-remove {
  min-height: 44px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--profile-blue);
  font-size: 14px;
  font-weight: 700;
}
.krug-ui .collection-remove + .collection-apply { margin-top: 0; }
.krug-ui .collection-panel .collection-apply {
  width: 100%;
  margin: 12px 0 0;
  min-height: 46px;
  padding: 8px;
  border-radius: 14px;
  font-size: 16px;
}
.collection-option, .collection-apply { scroll-margin-block-end: calc(92px + env(safe-area-inset-bottom)); }
@media (max-width: 600px) and (max-height: 640px) {
  .profile-screen .krug-ui .profile-redesign:has(.collection-panel) { --profile-top: max(10px, env(safe-area-inset-top)); }
  .profile-screen .profile-primary:has(.collection-panel) > header {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
  }
  .profile-primary:has(.collection-panel) .profile-progress-nav { gap: 5px; margin-bottom: 6px; }
  .krug-ui .collection-categories button { min-height: 49px; gap: 1px; padding-block: 3px; }
  .collection-categories svg { height: 19px; }
  .collection-panel h3 { margin-block: 10px 6px; }
}
@media (forced-colors: active) {
  .collection-panel [aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}
