/* Zync Plus (/plus/) e Loja (/loja/): provador e cartões de peças (S55/S56). */
.tryon {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.tryon__stage {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
}
.tryon__card {
  /* Sem cortar: algumas molduras passam da borda do cartão, como no app. */
  overflow: visible;
  border: 1px solid var(--line2);
  border-radius: 18px;
  background: #1c1e27;
  color: #f3f4f8;
}
.tryon__banner {
  height: 96px;
  border-radius: 17px 17px 0 0;
  background: linear-gradient(120deg, #5865f2, #b34df0 60%, #f05267);
}
.tryon__who {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: -52px;
  /* Espaço para a moldura, que passa 31 px do avatar para cada lado. */
  padding: 0 20px 36px 40px;
}
.tryon__avatar {
  position: relative;
  flex: none;
  width: 104px;
  height: 104px;
}
.tryon__avatar > img {
  width: 104px;
  height: 104px;
  border: 6px solid #1c1e27;
  border-radius: 50%;
}
/* A moldura passa 30% do avatar para cada lado (o mesmo espaço -64..64 do app, avatar r=40). */
.tryon__avatar .zx-frame {
  position: absolute;
  inset: -31px;
  pointer-events: none;
}
.tryon__avatar .zx-frame img,
.zx-frame img {
  width: 100%;
  height: 100%;
}
.tryon__name {
  min-width: 0;
  padding-bottom: 8px;
  font-size: 22px;
  font-weight: 800;
}
.tryon__name small {
  display: block;
  color: #969cab;
  font-size: 13px;
  font-weight: 500;
}
/* Linha da lista de membros, com a placa por trás do nome (como no app). */
.tryon__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  margin: 0 12px 14px;
  padding: 0 12px;
  overflow: hidden;
  border-radius: 10px;
  background: #262936;
}
.tryon__row > * {
  position: relative;
}
.tryon__row .zx-plateimg {
  position: absolute;
  inset: 0;
}
.tryon__row .zx-plateimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.tryon__row::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #1c1e27f2 0%, #1c1e27b3 38%, transparent 72%);
  pointer-events: none;
}
.tryon__row > img {
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.tryon__row .tryon__rowname {
  z-index: 1;
  font-weight: 700;
}
.tryon__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: var(--surface);
}
.tryon__price b {
  font-size: 18px;
}
.tryon__tabs {
  margin: 0 0 16px;
}
.tryon__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tryon__grid--plates {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.piece {
  display: grid;
  gap: 6px;
  justify-items: center;
  width: 100%;
  padding: 10px 8px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}
.piece:hover {
  border-color: var(--primary-hi);
}
.piece[aria-pressed='true'] {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}
.piece .zx-frame {
  display: block;
  width: 72px;
  height: 72px;
}
.piece__ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
}
.piece__ring::before {
  content: '';
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: #5865f2;
  opacity: 0.55;
}
.piece__ring .zx-frame {
  position: absolute;
  inset: 0;
}
.piece--plate .zx-plateimg {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 5 / 1;
  border-radius: 8px;
}
.piece--plate .zx-plateimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.piece--name {
  min-height: 64px;
  font-size: 18px;
  background: #1c1e27;
  color: #f3f4f8;
}
.piece small {
  color: var(--muted);
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.swatch {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid var(--line2);
  border-radius: 50%;
  cursor: pointer;
}
.swatch[aria-pressed='true'] {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--primary);
}
.swatch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.tryon__label {
  margin: 18px 0 6px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rarity {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--elevated);
  font-size: 12px;
  font-weight: 700;
}
.rarity--rara {
  color: #38bdf8;
}
.rarity--epica {
  color: #c084fc;
}
.rarity--lendaria {
  color: #fbbf24;
}
@media (max-width: 820px) {
  .tryon {
    grid-template-columns: minmax(0, 1fr);
  }
  .tryon__stage {
    position: static;
  }
}
.zs-original {
  background: conic-gradient(#5865f2, #f05267, #f0b44c, #23c483, #5865f2);
}
.tryon__label--card {
  margin: 0 20px 8px;
  /* O cartão é sempre escuro, nos dois temas (como o app). */
  color: #969cab;
}

/* Loja (/loja/) */
.shopcard {
  height: 100%;
  color: var(--text);
  text-decoration: none;
}
.shopcard b {
  font-size: 14px;
}
.shopgrid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.shopgrid .piece--plate .zx-plateimg {
  aspect-ratio: 3 / 1;
}
.fx-tile {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px #ffffff26;
}
.fx-tile--big {
  width: 220px;
  height: 140px;
  border-radius: 20px;
}
.shopfilter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.shopfilter[hidden] {
  display: none;
}
.shopfilter input,
.shopfilter select {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.shopfilter input {
  min-width: 220px;
}
.collections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}
.collection {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line2);
  border-radius: 16px;
  background: var(--surface);
}
.collection__pieces {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 72px;
}
.collection__pieces a {
  flex: 1;
  min-width: 0;
}
.collection__pieces .zx-plateimg {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}
.collection__pieces .zx-plateimg img {
  width: 100%;
  height: 36px;
  object-fit: cover;
  object-position: right center;
}
.collection__pieces .fx-tile {
  width: 56px;
  height: 56px;
}
.collection__price {
  font-weight: 800;
}
.rarities {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.pieceview {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin: 8px 0 24px;
}
.pieceview__art {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line2);
  border-radius: 18px;
  background: #1c1e27;
}
.tryon__row--big {
  width: 100%;
  margin: 0;
}
.variants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.variant {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 10px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: var(--surface);
  font-size: 13px;
  text-align: center;
}
.variant .zx-plateimg {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 1;
  border-radius: 8px;
}
.variant .zx-plateimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
@media (max-width: 720px) {
  .pieceview {
    grid-template-columns: minmax(0, 1fr);
  }
}
.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
}
:root[data-theme='light'] .rarity--rara {
  color: #0369a1;
}
:root[data-theme='light'] .rarity--epica {
  color: #7e22ce;
}
:root[data-theme='light'] .rarity--lendaria {
  color: #92400e;
}

/* Efeitos de perfil (S57): animação gravada do app, por trás do conteúdo do cartão. */
.tryon__card {
  position: relative;
}
.tryon__card > :not(.tryon__fx) {
  position: relative;
}
.tryon__fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 17px;
  pointer-events: none;
}
.tryon__fx[hidden] {
  display: none;
}
.tryon__fx[data-zone='banner'] {
  bottom: auto;
  height: 96px;
  border-radius: 17px 17px 0 0;
}
.tryon__fx .fx-anim,
.tryon__fx img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Sem fundo próprio por cima do vídeo: o banner some quando o efeito é de céu (o vídeo traz o degradê). */
.tryon__card[data-fx-zone='banner'] .tryon__banner {
  background: none;
}
.fx-frame {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 5 / 3;
  border-radius: 10px;
  background: #1c1e27;
}
.fx-frame img,
.fx-frame picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fx-frame--big {
  width: min(100%, 400px);
  border-radius: 16px;
}
.tryon__grid--fx {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}
.collection__pieces .fx-frame {
  width: 72px;
}

/* O provador e os botões de nome são escuros também no tema claro (como o cartão do app): ali o
   nome fica na cor original, sem o escurecimento do tema claro do zx-names.css (--zx-shade). */
:root[data-theme] :is(.tryon__card, .tryon__row, .piece--name) .zx-name {
  --zx-shade: 0%;
}

/* Temas da Loja (S71): a lista de temas em chips. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 24px;
  padding: 0;
  list-style: none;
}
.chips .chip {
  text-decoration: none;
}
