.shop { position: relative; z-index: 1; flex: 1 0 auto; width: 100%; padding-bottom: 96px; overflow-x: clip; }
.shop .pixels--left { top: 140px; }
.shop .pixels--right { top: 420px; }

.shop-section { padding-top: 88px; scroll-margin-top: 96px; }

.shop-hero {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 380px; align-items: center; gap: 48px;
  padding-top: 40px;
}
.shop-hero .flash { max-width: 520px; margin-bottom: 24px; }
.shop-hero .flash b { color: #fff; }
.shop-hero__title {
  max-width: 560px; font-size: 52px; font-weight: 700; line-height: 1.02; text-transform: uppercase;
}
.shop-hero__title span { color: var(--brand); }
.shop-hero__lead { max-width: 420px; margin-top: 20px; font-size: 14px; line-height: 1.7; color: var(--white-60); }
.shop-hero__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.shop-hero__links .step-chip { margin-top: 0; }

.wallet {
  position: relative; overflow: hidden; padding: 26px;
  border-radius: 24px; border: 1px solid rgba(255, 255, 255, .08);
  background: color-mix(in srgb, var(--card) 90%, transparent);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
  backdrop-filter: blur(12px);
}
.wallet__blob {
  position: absolute; right: -80px; top: -100px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 234, 167, .2), transparent); pointer-events: none;
  animation: breathe 5s ease-in-out infinite;
}
.wallet > :not(.wallet__blob) { position: relative; }
.wallet__user {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.wallet__user .pill__avatar { border-radius: 10px; }
.wallet__label {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--white-50);
}
.wallet__name { display: block; margin-top: 2px; font-size: 17px; font-weight: 600; }
.wallet__amount {
  margin-top: 6px; font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -.01em;
  color: var(--brand); white-space: nowrap;
}
.wallet__btn { width: 100%; margin-top: 22px; text-transform: uppercase; letter-spacing: .05em; }
.wallet__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.wallet__stat {
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--white-10);
  transition: background .2s, border-color .2s;
}
.wallet__stat:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); }
.wallet__stat b { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; }
.wallet__stat span { display: block; font-size: 11.5px; color: var(--white-50); }

.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.service {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px;
  padding: 20px 22px; border-radius: 20px; background: var(--card);
}
.service::before {
  content: ""; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  pointer-events: none;
}
.service > * { position: relative; }
.service__top { display: flex; align-items: center; gap: 14px; }
.service__icon { width: 52px; height: 52px; flex: none; object-fit: contain; }
.service__text { flex: 1; min-width: 0; }
.service__name { font-size: 17px; font-weight: 600; line-height: 1.25; }
.service__meta { display: block; margin-top: 2px; font-size: 12px; color: var(--white-50); }
.service__badge {
  flex: none; align-self: flex-start; padding: 4px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ok); background: rgba(118, 229, 66, .1); border: 1px solid rgba(118, 229, 66, .28);
}
.service__bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.service__bar i {
  display: block; height: 100%; border-radius: inherit; background: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent);
}
.service__foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--white-50); }
.service__foot b { color: #fff; font-weight: 600; }

.history {
  margin-top: 16px; border-radius: 18px; border: 1px solid var(--white-10);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}
.history summary {
  display: flex; align-items: center; gap: 10px; padding: 16px 22px;
  font-size: 14px; font-weight: 500; color: var(--white-60); cursor: pointer; list-style: none;
  transition: color .2s;
}
.history summary::-webkit-details-marker { display: none; }
.history summary:hover, .history[open] summary { color: #fff; }
.history__icon {
  margin-left: auto; width: 9px; height: 9px;
  border-right: 2px solid var(--white-50); border-bottom: 2px solid var(--white-50);
  transform: translateY(-3px) rotate(45deg); transition: transform .25s;
}
.history[open] .history__icon { transform: translateY(2px) rotate(-135deg); }
.history__list { list-style: none; margin: 0; padding: 0 22px 8px; }
.history__item {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .06); font-size: 13px; color: var(--white-50);
}
.history__item img { width: 32px; height: 32px; object-fit: contain; filter: grayscale(.7); opacity: .6; }
.history__item b { color: rgba(255, 255, 255, .8); font-weight: 500; }
.history__date { margin-left: auto; font-size: 12px; white-space: nowrap; }

.rank-picker { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
.rank-tabs { display: flex; flex-direction: column; gap: 10px; }
.rank-tab {
  flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 18px; border: 1px solid var(--white-10); text-align: left;
  transition: background .25s, border-color .25s;
}
.rank-tab:hover { background: rgba(255, 255, 255, .03); }
.rank-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rank-tab img { width: 48px; height: 48px; flex: none; object-fit: contain; opacity: .5; transition: opacity .25s, transform .25s; }
.rank-tab:hover img { opacity: .85; }
.rank-tab__text { flex: 1; min-width: 0; }
.rank-tab__text b { display: block; font-size: 16px; font-weight: 600; transition: color .25s; }
.rank-tab__text em {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin-top: 3px; font-size: 12px; font-style: normal; line-height: 1.45; color: var(--white-50);
}
.rank-tab__text small { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.rank-tab__badge {
  flex: none; padding: 3px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ok); background: rgba(118, 229, 66, .12);
}
.rank-tab__bar {
  position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  transform: scaleY(0); transition: transform .3s;
}
.rank-tab.is-active { background: var(--card); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.rank-tab.is-active img { opacity: 1; transform: scale(1.08); }
.rank-tab.is-active .rank-tab__text b { color: var(--accent); }
.rank-tab.is-active .rank-tab__bar { transform: scaleY(1); }

.rank-stage { position: relative; border-radius: 24px; background: var(--card); overflow: hidden; transition: height .35s ease; }
.rank-panel {
  --glow: var(--accent);
  position: absolute; inset: 0 0 auto; display: flex; flex-direction: column;
  padding: 30px 36px 28px; opacity: 0; visibility: hidden; transition: opacity .12s, visibility .12s;
}
.rank-panel.is-active { position: relative; opacity: 1; visibility: visible; transition: opacity .35s .12s, visibility 0s; }
.rank-panel:not(.is-active) * { animation-play-state: paused; }
.rank-panel::before {
  content: ""; position: absolute; left: -160px; top: -200px; width: 640px; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
}
.rank-panel > * { position: relative; }

.rank-panel__head { display: flex; align-items: center; gap: 26px; }
.rank-panel__art { flex: none; position: relative; width: 168px; height: 168px; display: grid; place-items: center; }
.rank-panel__glow {
  position: absolute; inset: -12px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 40%, transparent), transparent);
}
.rank-panel__icon { position: relative; z-index: 1; width: 136px; height: 136px; object-fit: contain; }
.rank-panel.is-active .rank-panel__icon { animation: pop .6s cubic-bezier(.2, .9, .3, 1.3), float-block 4s ease-in-out .6s infinite; }
.rank-panel__shadow {
  position: absolute; bottom: 2px; width: 104px; height: 16px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent);
}
.rank-panel.is-active .rank-panel__shadow { animation: float-shadow 4s ease-in-out .6s infinite; }
.rank-panel__num { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.rank-panel__name { margin: 8px 0 10px; font-size: 44px; font-weight: 800; line-height: 1; text-transform: uppercase; }
.rank-panel__tagline { max-width: 400px; font-size: 14px; line-height: 1.6; color: var(--white-60); }

.rank-panel__body { flex: 1; margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .07); }
.perks-all {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 11px 16px; border-radius: 14px;
  font-size: 14px; font-weight: 600; color: #fff;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.perks-all i {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  font-style: normal; font-size: 16px; font-weight: 700; line-height: 1; color: #121010; background: var(--accent);
}
.perks { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.perks li {
  position: relative; break-inside: avoid; padding: 0 0 11px 26px;
  font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .72);
}
.perks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.perks li::after {
  content: ""; position: absolute; left: 6px; top: 5px; width: 4px; height: 8px;
  border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.rank-panel__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .07);
}
.price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price b { font-size: 36px; font-weight: 800; line-height: 1; color: var(--brand); white-space: nowrap; }
.price span { font-size: 13px; color: var(--white-50); }

.buy { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.buy form { display: contents; }
.buy__btn { min-width: 168px; text-transform: uppercase; letter-spacing: .05em; }
.buy__note { font-size: 12.5px; color: var(--white-50); }
.buy__note b { color: #ffb7b8; font-weight: 600; }
.owned {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 12px;
  font-size: 13px; font-weight: 600; color: #c2f7a6;
  background: rgba(118, 229, 66, .08); border: 1px solid rgba(118, 229, 66, .3);
}
.owned i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.item {
  --glow: var(--accent);
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 22px 22px; border-radius: 24px; background: var(--card); border: 1px solid transparent;
  transition: border-color .3s;
}
.item::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 60%; pointer-events: none;
  background: radial-gradient(70% 80% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent);
}
.item:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.item__art { position: relative; width: 150px; height: 150px; display: grid; place-items: center; margin-bottom: 8px; }
.item__glow {
  position: absolute; inset: -6px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent), transparent);
  transition: transform .4s, opacity .4s; opacity: .8;
}
.item:hover .item__glow { transform: scale(1.15); opacity: 1; }
.item__art img {
  position: relative; z-index: 1; width: 118px; height: 118px; object-fit: contain;
  transition: transform .45s cubic-bezier(.2, .9, .3, 1.3);
}
.item:hover .item__art img { transform: translateY(-10px) rotate(-5deg) scale(1.06); }
.item__shadow {
  position: absolute; bottom: 10px; width: 92px; height: 14px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent);
  transition: transform .45s, opacity .45s;
}
.item:hover .item__shadow { transform: scale(.75); opacity: .6; }
.item .specks i { animation-play-state: paused; }
.item:hover .specks i { animation-play-state: running; }
.item__name { position: relative; font-size: 18px; font-weight: 600; line-height: 1.25; }
.item__text { position: relative; margin-top: 6px; font-size: 12.5px; line-height: 1.55; color: var(--white-50); }
.item__foot {
  position: relative; width: 100%; display: grid; gap: 14px;
  margin-top: auto; padding-top: 20px;
}
.item__price { margin-top: 4px; font-size: 26px; font-weight: 800; line-height: 1; color: var(--brand); }
.item .buy { flex-direction: column; align-items: stretch; gap: 10px; }
.item .buy__btn, .item .owned { width: 100%; justify-content: center; }

.step-chip--player { gap: 10px; }
.step-chip--player .pill__avatar { border-radius: 5px; }
.shop-help {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 20px; padding: 22px 28px; border-radius: 20px;
  background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--white-10);
}
.shop-help p { font-size: 14px; color: var(--white-60); }
.shop-help b { color: #fff; font-weight: 600; }

.modal {
  border: 0; padding: 0; background: none; color: #fff;
  width: calc(100% - 32px); max-width: 460px; max-height: 88vh; overflow: auto;
}
.modal[open] { animation: modal-in .22s ease-out; }
.modal::backdrop { background: rgba(10, 9, 9, .74); backdrop-filter: blur(6px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal__inner {
  position: relative; overflow: hidden; padding: 28px; border-radius: 24px;
  background: var(--card); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
}
.modal__inner::before {
  content: ""; position: absolute; left: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 234, 167, .14), transparent); pointer-events: none;
}
.modal__inner > * { position: relative; }
.modal__close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; z-index: 1;
  display: grid; place-items: center; border-radius: 10px;
  font-size: 20px; line-height: 1; color: var(--white-50); background: rgba(255, 255, 255, .05);
}
.modal__close:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.modal__cat { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.modal__title { margin-top: 4px; font-size: 26px; font-weight: 700; line-height: 1.15; }

.confirm__head { display: flex; align-items: center; gap: 16px; padding-right: 36px; }
.confirm__icon { width: 64px; height: 64px; flex: none; object-fit: contain; }
.confirm__icon:not([src]), .confirm__icon[src=""] { display: none; }
.confirm__rows { margin: 22px 0 0; padding: 6px 16px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--white-10); }
.confirm__rows div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.confirm__rows div + div { border-top: 1px solid rgba(255, 255, 255, .06); }
.confirm__rows dt { color: var(--white-60); }
.confirm__rows dd { margin: 0; font-weight: 600; }
.confirm__total dd { color: var(--brand); font-size: 17px; }
.confirm__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 22px; }
.confirm__actions .btn-brand { text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 1010px) {
  .rank-picker { grid-template-columns: 250px 1fr; }
  .rank-panel { padding: 26px 26px 28px; }
  .rank-panel__name { font-size: 36px; }
}
@media (max-width: 900px) {
  .shop .pixels { opacity: .2; }
  .shop-section { padding-top: 72px; }
  .shop-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; }
  .shop-hero__title { font-size: 40px; }
  .wallet { max-width: 520px; }

  .rank-picker { grid-template-columns: 1fr; }
  .rank-panel { display: none; }
  .rank-panel.is-active { display: flex; }
  .rank-tab__text em { display: none; }
  .rank-tab__text small { margin-top: 1px; font-weight: 400; color: var(--white-50); }
  .rank-tabs {
    flex-direction: row; overflow-x: auto; scrollbar-width: none;
    margin-inline: -24px; padding-inline: 24px;
  }
  .rank-tabs::-webkit-scrollbar { display: none; }
  .rank-tab { flex: none; padding: 10px 16px 10px 12px; gap: 10px; }
  .rank-tab img { width: 36px; height: 36px; }
  .rank-tab__bar { inset: auto 14px 0; width: auto; height: 3px; border-radius: 3px 3px 0 0; transform: scaleX(0); }
  .rank-tab.is-active .rank-tab__bar { transform: scaleX(1); }
}
@media (max-width: 680px) {
  .rank-panel__head { flex-direction: column; text-align: center; gap: 8px; }
  .rank-panel__tagline { margin-inline: auto; }
  .perks { columns: 1; }
  .perks-all { text-align: left; }
  .rank-panel__foot { flex-direction: column; align-items: stretch; text-align: center; }
  .price { justify-content: center; }
  .rank-panel .buy { justify-content: center; }
  .rank-panel .buy__btn, .rank-panel .owned { flex: 1; justify-content: center; }
}
@media (max-width: 560px) {
  .rank-tabs { margin-inline: -16px; padding-inline: 16px; }
  .shop-hero__title { font-size: 32px; }
  .wallet { padding: 22px; }
  .wallet__amount { font-size: 38px; }
  .rank-panel { padding: 22px 18px 24px; }
  .rank-panel__art { width: 140px; height: 140px; }
  .rank-panel__icon { width: 112px; height: 112px; }
  .rank-panel__name { font-size: 32px; }
  .price b { font-size: 30px; }
  .items { grid-template-columns: 1fr 1fr; gap: 12px; }
  .item { padding: 18px 12px 14px; border-radius: 20px; }
  .item__art { width: 110px; height: 110px; }
  .item__art img { width: 84px; height: 84px; }
  .item__shadow { width: 64px; bottom: 6px; }
  .item__name { font-size: 15px; }
  .item__text { font-size: 11.5px; }
  .item__price { font-size: 22px; }
  .item .buy__btn { min-width: 0; padding: 12px 10px; font-size: 13px; }
  .buy__note { font-size: 11.5px; }
  .shop-help { padding: 20px; }
  .modal__inner { padding: 22px; }
  .modal__title { font-size: 22px; }
  .confirm__actions { grid-template-columns: 1fr; }
  .confirm__actions .btn-brand { order: -1; }
}
