:root {
  --bg-0: #071725;
  --bg-1: #0b2638;
  --bg-2: #0e3a51;
  --panel: rgba(20, 52, 70, 0.76);
  --panel-strong: rgba(13, 38, 53, 0.92);
  --line: rgba(180, 209, 220, 0.26);
  --line-strong: rgba(205, 229, 237, 0.58);
  --text: #eef7f8;
  --muted: #9db1bb;
  --accent: #ff4655;
  --accent-2: #ff7b83;
  --cyan: #62e6ef;
  --gold: #f7c873;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --font-display: "Barlow Condensed", Impact, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-0);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 48% 6%, rgba(18, 126, 164, 0.35), transparent 32%),
    radial-gradient(circle at 66% 62%, rgba(20, 91, 126, 0.28), transparent 38%),
    linear-gradient(135deg, #071420 0%, #0a2435 42%, #081725 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image:
    linear-gradient(115deg, transparent 0 33%, rgba(255,255,255,.035) 33% 34%, transparent 34% 100%),
    linear-gradient(35deg, transparent 0 60%, rgba(255,255,255,.03) 60% 61%, transparent 61% 100%);
  background-size: 440px 440px, 520px 520px;
  mix-blend-mode: screen;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 72px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 260px minmax(480px, 1fr) 260px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(4, 17, 27, .95), rgba(7, 27, 40, .84));
  box-shadow: 0 12px 35px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.04);
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 23px;
}

.brand-copy {
  display: flex;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .12em;
}

.brand-copy span {
  color: var(--muted);
}

.main-nav {
  justify-self: center;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-icon,
.play-tab {
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-icon {
  width: 58px;
  color: #c6d2d6;
  font-size: 21px;
  opacity: .86;
  transition: .18s ease;
}

.nav-icon:hover {
  color: #fff;
  background: rgba(255,255,255,.04);
}

.play-tab {
  min-width: 230px;
  padding: 0 54px;
  margin: 0 10px;
  color: #fff;
  background: var(--accent);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: .13em;
  clip-path: polygon(11% 0, 89% 0, 100% 100%, 0 100%);
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  letter-spacing: .08em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #61e59d;
  box-shadow: 0 0 16px rgba(97, 229, 157, .78);
}

.status-label {
  color: var(--muted);
  font-size: 13px;
}

.reset-button {
  margin-left: 8px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .08em;
}

.reset-button:hover {
  border-color: var(--accent-2);
  color: #fff;
}

.collection-layout {
  flex: 1;
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 32px 34px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
}

.collection-panel {
  min-width: 0;
}

.section-heading {
  min-height: 64px;
  margin-bottom: 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #81a5b3;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
}

.section-heading h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 46px);
  letter-spacing: .055em;
}

.save-state {
  color: var(--muted);
  font-size: 12px;
}

.weapon-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(205px, 1fr));
  gap: 26px;
  align-items: start;
}

.weapon-column {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.weapon-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-title {
  margin: 0 0 2px;
  text-align: center;
  color: #edf6f7;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .035em;
  text-shadow: 0 1px 0 #000;
}

.weapon-grid {
  display: grid;
  gap: 10px;
}

.weapon-card {
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(255,255,255,.045), rgba(255,255,255,.01)),
    var(--panel);
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.weapon-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
  transition: .16s ease;
}

.weapon-card:hover {
  transform: translateY(-2px);
  border-color: rgba(210, 236, 244, .68);
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
  background:
    linear-gradient(120deg, rgba(100, 220, 235, .1), rgba(255,255,255,.025)),
    rgba(26, 70, 91, .82);
}

.weapon-card.equipped {
  border-color: rgba(98, 230, 239, .82);
  box-shadow: inset 0 0 0 1px rgba(98, 230, 239, .18);
}

.weapon-image-box {
  min-height: 104px;
  padding: 14px 16px 2px;
  display: grid;
  place-items: center;
  position: relative;
}

.weapon-image {
  width: 92%;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 10px 8px rgba(0,0,0,.22));
  transition: transform .18s ease;
}

.weapon-card:hover .weapon-image {
  transform: scale(1.035);
}

.equipped-mark {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 24px;
  height: 24px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: #07232d;
  background: var(--cyan);
  font-weight: 800;
  box-shadow: 0 0 18px rgba(98,230,239,.35);
}

.weapon-card.equipped .equipped-mark {
  display: grid;
}

.weapon-card-footer {
  min-height: 38px;
  padding: 8px 10px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.weapon-name,
.weapon-action {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .04em;
}

.weapon-name {
  color: #b9c9ce;
  font-size: 14px;
}

.weapon-action {
  color: #78a5b3;
  font-size: 10px;
  opacity: 0;
  transition: .16s ease;
}

.weapon-card:hover .weapon-action {
  opacity: 1;
}

.loadout-panel {
  min-width: 0;
  padding-top: 84px;
}

.player-card {
  width: 220px;
  margin: 0 auto 30px;
  border: 1px solid rgba(204, 226, 234, .54);
  background: rgba(7, 25, 38, .7);
  box-shadow: var(--shadow);
  position: relative;
}

.player-card::before,
.player-card::after {
  content: "";
  position: absolute;
  bottom: -38px;
  width: 1px;
  height: 46px;
  background: rgba(213, 234, 240, .46);
}

.player-card::before {
  left: 22px;
  transform: rotate(-34deg);
}

.player-card::after {
  right: 22px;
  transform: rotate(34deg);
}

.card-art {
  height: 270px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 60% 35%, rgba(255,70,85,.26), transparent 24%),
    radial-gradient(circle at 40% 68%, rgba(54,205,220,.2), transparent 28%),
    linear-gradient(145deg, #0f3149, #081727 70%);
}

.card-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  top: 38px;
  left: 0;
  background: conic-gradient(from 40deg, transparent, rgba(255,70,85,.32), transparent, rgba(66,210,227,.28), transparent);
  filter: blur(8px);
  transform: rotate(18deg);
}

.card-v {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 128px;
  color: rgba(255,255,255,.82);
  text-shadow: 0 14px 40px rgba(0,0,0,.45);
  transform: skew(-9deg);
}

.card-grid {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.24) 1px, transparent 1px);
  background-size: 24px 24px;
}

.player-name {
  padding: 8px 10px;
  color: #07151e;
  background: var(--gold);
  text-align: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.player-subtitle {
  padding: 7px 10px;
  color: #a5b9c1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .08em;
}

.loadout-header {
  margin-top: 54px;
  padding-bottom: 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.loadout-header h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: .04em;
}

.count-badge {
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--cyan);
  background: rgba(98,230,239,.06);
  font-family: var(--font-display);
  font-weight: 800;
}

.loadout-list {
  margin-top: 12px;
  max-height: 510px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: auto;
  padding-right: 4px;
}

.empty-loadout {
  padding: 28px 18px;
  border: 1px dashed var(--line);
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.018);
}

.empty-loadout strong {
  display: block;
  margin-bottom: 7px;
  color: #c9d7dc;
  font-family: var(--font-display);
  font-size: 17px;
  text-transform: uppercase;
}

.empty-loadout p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.empty-icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 20px;
}

.loadout-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(15, 45, 62, .58);
  cursor: pointer;
  transition: .15s ease;
}

.loadout-item:hover {
  border-color: rgba(98,230,239,.52);
  background: rgba(18, 59, 77, .7);
}

.loadout-thumb {
  width: 78px;
  height: 46px;
  object-fit: contain;
}

.loadout-copy {
  min-width: 0;
}

.loadout-copy span {
  display: block;
  margin-bottom: 3px;
  color: #7fa0ab;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.loadout-copy strong {
  display: block;
  overflow: hidden;
  color: #eef7f8;
  font-family: var(--font-display);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.loadout-open {
  color: #72dfe7;
  font-size: 18px;
}

.loading-state,
.error-state {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 28, 42, .42);
  text-align: center;
}

.loading-state > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.loading-state strong,
.error-state strong {
  font-family: var(--font-display);
  font-size: 21px;
  text-transform: uppercase;
}

.loading-state span,
.error-state span {
  color: var(--muted);
  font-size: 12px;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255,255,255,.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state button {
  margin-top: 8px;
  padding: 10px 16px;
  border: 0;
  color: white;
  background: var(--accent);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
}

.footer-bar {
  min-height: 38px;
  padding: 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  color: #657f89;
  background: rgba(3, 15, 23, .8);
  font-size: 10px;
  letter-spacing: .08em;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 20, .82);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: absolute;
  inset: 34px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(197, 224, 232, .32);
  background:
    radial-gradient(circle at 65% 0, rgba(18, 117, 153, .24), transparent 33%),
    linear-gradient(145deg, rgba(10, 35, 51, .99), rgba(5, 21, 32, .99));
  box-shadow: 0 35px 100px rgba(0,0,0,.55);
}

.modal-header {
  min-height: 104px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.modal-weapon-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-button,
.close-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor: pointer;
}

.back-button {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.close-button {
  width: 42px;
  height: 42px;
  font-size: 28px;
  line-height: 1;
}

.back-button:hover,
.close-button:hover {
  border-color: rgba(255,255,255,.65);
}

.modal-weapon-image-wrap {
  width: 190px;
  height: 72px;
  display: grid;
  place-items: center;
}

.modal-weapon-image {
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(0,0,0,.25));
}

.modal-header h2 {
  margin: 0;
  font-size: 36px;
  letter-spacing: .055em;
}

.modal-help {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-tools {
  display: flex;
  gap: 10px;
}

.search-box {
  width: min(320px, 32vw);
  height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.16);
}

.search-box span {
  color: #86a7b2;
  font-size: 21px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #708d98;
}

.selected-skin-preview {
  min-height: 128px;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255,70,85,.09), transparent 42%),
    rgba(255,255,255,.018);
}

.preview-content h3 {
  margin: 0 0 10px;
  font-size: 27px;
}

.preview-image {
  width: min(420px, 42vw);
  height: 98px;
  object-fit: contain;
  filter: drop-shadow(0 14px 16px rgba(0,0,0,.25));
}

.remove-selection {
  padding: 7px 11px;
  border: 1px solid rgba(255,70,85,.55);
  color: #ff9ca3;
  background: rgba(255,70,85,.08);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
}

.skin-grid {
  flex: 1;
  overflow: auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
  align-content: start;
}

.skin-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(17, 51, 69, .58);
  cursor: pointer;
  text-align: left;
  transition: .16s ease;
}

.skin-card:hover {
  transform: translateY(-2px);
  border-color: rgba(222, 240, 245, .56);
  background: rgba(23, 68, 88, .72);
}

.skin-card.selected {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(98,230,239,.24), 0 10px 28px rgba(0,0,0,.17);
}

.skin-image-box {
  min-height: 150px;
  padding: 16px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.08), transparent 45%),
    rgba(0,0,0,.08);
}

.skin-image {
  width: 95%;
  height: 116px;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(0,0,0,.28));
}

.skin-selected-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  display: none;
  padding: 5px 7px;
  color: #05222a;
  background: var(--cyan);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.skin-card.selected .skin-selected-badge {
  display: block;
}

.skin-card-footer {
  min-height: 55px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.skin-name {
  overflow: hidden;
  color: #eaf4f6;
  font-family: var(--font-display);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.skin-cta {
  color: #7599a6;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .08em;
}

.skin-card.selected .skin-cta {
  color: var(--cyan);
}

.skin-loading {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.no-skins {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: 220px minmax(450px, 1fr) 200px;
  }

  .weapon-columns {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }

  .skin-grid {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: 180px 1fr auto;
  }

  .brand-copy,
  .status-label {
    display: none;
  }

  .nav-icon {
    display: none;
  }

  .play-tab {
    min-width: 190px;
  }

  .collection-layout {
    grid-template-columns: 1fr;
  }

  .loadout-panel {
    padding-top: 0;
  }

  .player-card {
    display: none;
  }

  .loadout-header {
    margin-top: 0;
  }

  .loadout-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .weapon-columns {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .modal-panel {
    inset: 18px;
  }

  .modal-header {
    align-items: flex-start;
  }

  .modal-weapon-image-wrap {
    display: none;
  }

  .skin-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

@media (max-width: 700px) {
  .topbar {
    height: 60px;
    padding: 0 12px;
    grid-template-columns: 50px 1fr auto;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .play-tab {
    min-width: 0;
    width: 170px;
    padding: 0 22px;
    margin: 0;
    font-size: 20px;
  }

  .reset-button {
    padding: 0 8px;
  }

  .status-dot {
    display: none;
  }

  .collection-layout {
    padding: 20px 14px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .weapon-columns {
    grid-template-columns: 1fr;
  }

  .weapon-column {
    gap: 22px;
  }

  .loadout-list {
    grid-template-columns: 1fr;
  }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-panel {
    inset: 0;
    border: 0;
  }

  .modal-header {
    min-height: 0;
    padding: 12px;
    flex-direction: column;
  }

  .modal-weapon-info {
    width: 100%;
  }

  .modal-weapon-info > div:last-child {
    min-width: 0;
  }

  .modal-header h2 {
    font-size: 28px;
  }

  .modal-help {
    display: none;
  }

  .modal-tools {
    width: 100%;
  }

  .search-box {
    flex: 1;
    width: auto;
  }

  .selected-skin-preview {
    min-height: 100px;
    padding: 12px 16px;
  }

  .preview-image {
    width: 45vw;
    height: 72px;
  }

  .preview-content h3 {
    font-size: 20px;
  }

  .skin-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}


/* =========================================================
   SKIN GRID V2 — fixed-size cards + pagination
   Prevents large skin collections from shrinking the cards.
   ========================================================= */
.modal-panel {
  min-height: 0;
}

.skin-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  grid-auto-rows: 218px;
  align-content: start;
  scrollbar-gutter: stable;
}

.skin-card {
  height: 218px;
  min-height: 218px;
  max-height: 218px;
  display: flex;
  flex-direction: column;
}

.skin-image-box {
  height: 162px;
  min-height: 162px;
  flex: 0 0 162px;
  padding: 14px 16px;
}

.skin-image {
  width: 96%;
  height: 128px;
  max-height: 128px;
  object-fit: contain;
}

.skin-card-footer {
  height: 56px;
  min-height: 56px;
  flex: 0 0 56px;
}

.skin-pagination {
  flex: 0 0 58px;
  min-height: 58px;
  padding: 8px 20px;
  display: grid;
  grid-template-columns: 140px minmax(180px, 1fr) 140px;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  background: rgba(4, 19, 29, .94);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .16);
}

.page-button {
  height: 38px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  color: #dcebed;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  transition: .15s ease;
}

.page-button:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(98,230,239,.06);
}

.page-button:disabled {
  cursor: not-allowed;
  opacity: .28;
}

.page-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  font-family: var(--font-display);
}

.page-status span {
  color: #7898a4;
  font-size: 10px;
  letter-spacing: .1em;
}

.page-status strong {
  color: #e9f4f6;
  font-size: 14px;
  letter-spacing: .08em;
}

@media (max-width: 1040px) {
  .skin-grid {
    grid-auto-rows: 210px;
  }

  .skin-card {
    height: 210px;
    min-height: 210px;
    max-height: 210px;
  }

  .skin-image-box {
    height: 154px;
    min-height: 154px;
    flex-basis: 154px;
  }

  .skin-pagination {
    grid-template-columns: 110px 1fr 110px;
  }
}

@media (max-width: 700px) {
  .skin-grid {
    grid-auto-rows: 202px;
  }

  .skin-card {
    height: 202px;
    min-height: 202px;
    max-height: 202px;
  }

  .skin-image-box {
    height: 146px;
    min-height: 146px;
    flex-basis: 146px;
  }

  .skin-pagination {
    min-height: 54px;
    padding: 7px 10px;
    grid-template-columns: 84px 1fr 84px;
    gap: 7px;
  }

  .page-button {
    height: 36px;
    font-size: 10px;
  }

  .page-status span {
    display: none;
  }

  .page-status strong {
    font-size: 12px;
  }
}


/* V3 — selected skin replaces the default weapon image in Collection */
.weapon-image.equipped-skin-image {
  width: 96%;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(0,0,0,.28));
}

.weapon-card.equipped .weapon-image-box {
  background:
    radial-gradient(circle at 50% 55%, rgba(98,230,239,.08), transparent 58%);
}


/* =========================================================
   V5 — SKIN VARIANT / CHROMA SELECTOR
   ========================================================= */

.variant-panel {
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(98,230,239,.055), transparent 50%),
    rgba(4, 20, 31, .42);
}

.variant-header {
  margin-bottom: 10px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.variant-header strong {
  display: block;
  color: #eaf5f7;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.variant-count {
  color: #7698a4;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .08em;
}

.variant-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scrollbar-width: thin;
}

.variant-option {
  flex: 0 0 155px;
  min-width: 155px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(16, 48, 65, .62);
  cursor: pointer;
  text-align: left;
  transition:
    transform .15s ease,
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease;
}

.variant-option:hover {
  transform: translateY(-1px);
  border-color: rgba(218, 239, 245, .58);
  background: rgba(24, 68, 87, .78);
}

.variant-option.selected {
  border-color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(98,230,239,.10), transparent 62%),
    rgba(17, 57, 74, .86);
  box-shadow:
    inset 0 0 0 1px rgba(98,230,239,.16),
    0 8px 22px rgba(0,0,0,.14);
}

.variant-thumb-box {
  height: 72px;
  padding: 7px 8px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(circle at 50% 48%, rgba(255,255,255,.075), transparent 56%),
    rgba(0,0,0,.09);
}

.variant-thumb {
  width: 100%;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,.25));
}

.variant-swatch {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 22px;
  height: 22px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.variant-option.selected .variant-swatch {
  border-color: var(--cyan);
}

.variant-option-footer {
  min-height: 37px;
  padding: 7px 9px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.variant-label {
  overflow: hidden;
  color: #b9cdd4;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .055em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.variant-check {
  display: none;
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.variant-option.selected .variant-label {
  color: #f0fbfc;
}

.variant-option.selected .variant-check {
  display: inline;
}

@media (max-width: 700px) {
  .variant-panel {
    padding: 10px 12px 11px;
  }

  .variant-option {
    flex-basis: 136px;
    min-width: 136px;
  }

  .variant-thumb-box {
    height: 64px;
  }

  .variant-thumb {
    height: 50px;
  }
}


/* =========================================================
   V6 — PLAYER CARD / EXPRESSIONS / BUDDY CUSTOMIZATION
   ========================================================= */

.collection-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.profile-panel {
  padding-top: 8px;
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 105px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.profile-section {
  width: 100%;
}

.profile-section + .profile-section {
  margin-top: 28px;
}

.profile-section-title {
  margin: 0 0 13px;
  text-align: center;
  color: #eef6f7;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.valorant-card-frame {
  width: 252px;
  margin: 0 auto;
  position: relative;
  padding-top: 17px;
}

.level-border-button {
  width: 100%;
  height: 42px;
  padding: 0;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.level-line {
  position: absolute;
  top: 13px;
  height: 4px;
  background: #edf6f6;
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
}

.level-line-left {
  left: 0;
  width: 86px;
}

.level-line-right {
  right: 0;
  width: 86px;
}

.profile-level-number {
  min-width: 48px;
  min-height: 28px;
  padding: 5px 9px 4px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(225, 238, 241, .65);
  border-radius: 50%;
  color: #eee9e2;
  background: rgba(43, 32, 31, .92);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 3px 12px rgba(0,0,0,.35);
}

.level-border-image {
  width: 112px;
  height: 44px;
  position: absolute;
  left: 50%;
  top: -7px;
  object-fit: contain;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
}

.profile-card-button {
  width: 232px;
  margin: 0 auto;
  padding: 0;
  display: block;
  position: relative;
  border: 1px solid rgba(210, 232, 238, .65);
  background: rgba(5, 23, 36, .76);
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(0,0,0,.26);
  overflow: hidden;
}

.profile-card-art-wrap {
  height: 315px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 58% 33%, rgba(255,70,85,.22), transparent 27%),
    radial-gradient(circle at 36% 62%, rgba(67,206,220,.22), transparent 33%),
    linear-gradient(145deg, #0d3147, #071725 76%);
}

.profile-card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(71,214,229,.15), transparent 42%),
    radial-gradient(circle at 60% 60%, rgba(255,70,85,.17), transparent 45%);
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.profile-card-fallback span {
  color: rgba(244,248,249,.9);
  font-family: var(--font-display);
  font-size: 118px;
  font-weight: 800;
  transform: skew(-7deg);
}

.profile-name-bar {
  min-height: 31px;
  display: grid;
  place-items: center;
  color: #07151e;
  background: #f7c96e;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.profile-title-button {
  width: 232px;
  min-height: 30px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid rgba(210, 232, 238, .65);
  border-right: 1px solid rgba(210, 232, 238, .65);
  color: #dde9ec;
  background: rgba(5, 21, 32, .87);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.profile-card-button:hover,
.profile-title-button:hover,
.level-border-button:hover .profile-level-number {
  filter: brightness(1.12);
}

.profile-card-tail {
  width: 232px;
  height: 70px;
  margin: 0 auto;
  position: relative;
}

.profile-card-tail::before,
.profile-card-tail::after {
  content: "";
  position: absolute;
  top: -1px;
  width: 1px;
  height: 75px;
  background: rgba(201, 224, 231, .63);
}

.profile-card-tail::before {
  left: 28px;
  transform: rotate(-37deg);
  transform-origin: top;
}

.profile-card-tail::after {
  right: 28px;
  transform: rotate(37deg);
  transform-origin: top;
}

.profile-card-tail span {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 13px;
  background: rgba(201, 224, 231, .63);
}

.profile-card-tail span:first-child {
  left: 84px;
}

.profile-card-tail span:last-child {
  right: 84px;
}

.expressions-section {
  padding-bottom: 18px;
}

.expression-wheel {
  width: 242px;
  height: 242px;
  margin: 0 auto;
  position: relative;
  border: 2px solid rgba(174, 199, 207, .38);
  border-radius: 50%;
  background: rgba(6, 22, 33, .24);
}

.expression-wheel::before,
.expression-wheel::after {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(174, 199, 207, .24);
  border-radius: 50%;
}

.expression-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 92%;
  background: rgba(174, 199, 207, .31);
  transform-origin: center;
}

.expression-ring-one {
  transform: translate(-50%, -50%) rotate(45deg);
}

.expression-ring-two {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.expression-center {
  width: 58px;
  height: 58px;
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(183, 205, 211, .43);
  border-radius: 50%;
  color: #e4a229;
  background: rgba(8, 28, 40, .92);
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 800;
  z-index: 3;
}

.expression-slot {
  width: 56px;
  height: 56px;
  padding: 4px;
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 1px solid rgba(191, 215, 222, .34);
  background: rgba(11, 42, 56, .9);
  cursor: pointer;
  transition: .15s ease;
}

.expression-slot:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(98,230,239,.14);
  transform: scale(1.05);
}

.expression-slot-top {
  left: 50%;
  top: 15px;
  transform: translateX(-50%);
}

.expression-slot-top:hover {
  transform: translateX(-50%) scale(1.05);
}

.expression-slot-bottom {
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
}

.expression-slot-bottom:hover {
  transform: translateX(-50%) scale(1.05);
}

.expression-slot-left {
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.expression-slot-left:hover {
  transform: translateY(-50%) scale(1.05);
}

.expression-slot-right {
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.expression-slot-right:hover {
  transform: translateY(-50%) scale(1.05);
}

.expression-slot-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.expression-slot-plus {
  color: #80a0aa;
  font-size: 25px;
  font-weight: 300;
}

.expressions-hint {
  margin: 10px 0 0;
  color: #6e8d98;
  text-align: center;
  font-size: 10px;
  line-height: 1.45;
}

/* Buddy --------------------------------------------------- */

.buddy-panel {
  min-height: 84px;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(247,201,110,.055), transparent 48%),
    rgba(5, 23, 35, .42);
}

.buddy-panel-copy {
  min-width: 0;
}

.buddy-panel-copy strong {
  display: block;
  max-width: 420px;
  overflow: hidden;
  color: #edf6f7;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .05em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.buddy-panel-copy > span {
  display: block;
  margin-top: 2px;
  color: #72909b;
  font-size: 10px;
}

.buddy-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.buddy-preview-image {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 7px 6px rgba(0,0,0,.25));
}

.buddy-select-button,
.buddy-remove-button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
}

.buddy-select-button:hover {
  border-color: var(--cyan);
}

.buddy-remove-button {
  border-color: rgba(255,70,85,.4);
  color: #ff9ea5;
}

.weapon-buddy-icon {
  width: 34px;
  height: 34px;
  position: absolute;
  right: 9px;
  bottom: 6px;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.45));
  z-index: 4;
}

/* Generic cosmetic picker -------------------------------- */

.cosmetic-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
}

.cosmetic-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 11, 18, .86);
  backdrop-filter: blur(8px);
}

.cosmetic-modal-panel {
  position: absolute;
  inset: 42px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(197, 224, 232, .32);
  background:
    radial-gradient(circle at 66% 0, rgba(18, 117, 153, .22), transparent 34%),
    linear-gradient(145deg, rgba(10, 35, 51, .995), rgba(5, 21, 32, .995));
  box-shadow: 0 35px 100px rgba(0,0,0,.58);
}

.cosmetic-modal-header {
  min-height: 78px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.cosmetic-modal-header h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: .05em;
}

.cosmetic-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cosmetic-tabs {
  display: flex;
  height: 42px;
  border: 1px solid var(--line);
}

.cosmetic-tab {
  min-width: 72px;
  border: 0;
  color: #87a4ae;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
}

.cosmetic-tab.active {
  color: #061820;
  background: var(--cyan);
}

.cosmetic-search-box {
  width: min(310px, 29vw);
}

.cosmetic-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 11px;
  align-content: start;
}

.cosmetic-item {
  min-height: 160px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 48, 64, .61);
  cursor: pointer;
  text-align: left;
  transition: .15s ease;
}

.cosmetic-item:hover {
  transform: translateY(-2px);
  border-color: rgba(224, 241, 246, .57);
  background: rgba(22, 67, 86, .76);
}

.cosmetic-item.selected {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(98,230,239,.18);
}

.cosmetic-item-image-wrap {
  height: 118px;
  padding: 9px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.065), transparent 54%),
    rgba(0,0,0,.08);
}

.cosmetic-item-image {
  max-width: 100%;
  width: 100%;
  height: 100px;
  object-fit: contain;
}

.cosmetic-item.player-card-cosmetic .cosmetic-item-image-wrap {
  height: 230px;
}

.cosmetic-item.player-card-cosmetic .cosmetic-item-image {
  height: 220px;
  object-fit: cover;
}

.cosmetic-item.level-border-cosmetic .cosmetic-item-image-wrap {
  height: 100px;
}

.cosmetic-item.level-border-cosmetic .cosmetic-item-image {
  height: 78px;
}

.cosmetic-item.title-cosmetic {
  min-height: 88px;
}

.cosmetic-item.title-cosmetic .cosmetic-item-image-wrap {
  height: 48px;
}

.cosmetic-item-title-text {
  color: #edf7f8;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.cosmetic-item-footer {
  min-height: 42px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,.07);
}

.cosmetic-item-name {
  overflow: hidden;
  color: #dcebed;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.cosmetic-item-sub {
  margin-top: 2px;
  color: #6f8e99;
  font-size: 9px;
  text-transform: uppercase;
}

.cosmetic-loading,
.cosmetic-error {
  flex: 1;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #91aab3;
}

.cosmetic-error {
  flex-direction: column;
}

.cosmetic-error strong {
  color: #edf6f7;
  font-family: var(--font-display);
  font-size: 20px;
}

.cosmetic-modal-footer {
  min-height: 62px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 150px 1fr 240px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: rgba(2, 14, 22, .56);
}

.clear-cosmetic-button {
  height: 38px;
  border: 1px solid rgba(255,70,85,.42);
  color: #ff9ea5;
  background: rgba(255,70,85,.06);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
}

.cosmetic-page-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #74929c;
  font-family: var(--font-display);
  font-size: 10px;
}

.cosmetic-page-status strong {
  color: #d8e8eb;
  font-size: 14px;
}

.cosmetic-pagination-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 1320px) {
  .collection-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .cosmetic-grid {
    grid-template-columns: repeat(4, minmax(145px, 1fr));
  }
}

@media (max-width: 1040px) {
  .profile-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .profile-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
    align-items: start;
  }

  .profile-section + .profile-section {
    margin-top: 0;
  }

  .cosmetic-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 700px) {
  .profile-panel {
    display: block;
  }

  .profile-section + .profile-section {
    margin-top: 25px;
  }

  .buddy-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .buddy-panel-actions {
    width: 100%;
  }

  .cosmetic-modal-panel {
    inset: 0;
    border: 0;
  }

  .cosmetic-modal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .cosmetic-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .cosmetic-tabs {
    flex: 1 1 100%;
  }

  .cosmetic-tab {
    flex: 1;
  }

  .cosmetic-search-box {
    flex: 1;
    width: auto;
  }

  .cosmetic-grid {
    grid-template-columns: repeat(2, minmax(125px, 1fr));
    padding: 10px;
  }

  .cosmetic-item.player-card-cosmetic .cosmetic-item-image-wrap {
    height: 190px;
  }

  .cosmetic-item.player-card-cosmetic .cosmetic-item-image {
    height: 180px;
  }

  .cosmetic-modal-footer {
    grid-template-columns: 1fr 1fr;
  }

  .cosmetic-page-status {
    order: -1;
    grid-column: 1 / -1;
  }

  .cosmetic-pagination-actions {
    justify-content: stretch;
  }

  .cosmetic-pagination-actions .page-button {
    flex: 1;
  }
}


/* =========================================================
   V7 — SEAMLESS PLAYER CARD + PROFILE TABS + FAVORITES
   ========================================================= */

/* Player Card liền mạch ----------------------------------- */

.profile-card-composite {
  width: 270px;
  margin: 0 auto;
  padding: 0;
  display: block;
  position: relative;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: initial;
}

.profile-card-composite:hover .profile-card-shell {
  border-color: rgba(226, 241, 245, .82);
  box-shadow:
    0 18px 42px rgba(0,0,0,.34),
    0 0 0 1px rgba(98,230,239,.09);
}

.profile-card-top-border {
  height: 27px;
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 5;
}

.profile-top-line {
  height: 4px;
  background: #eef6f7;
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
}

.profile-level-badge {
  height: 44px;
  display: grid;
  place-items: center;
  position: relative;
}

.profile-level-badge .profile-level-number {
  min-width: 48px;
  height: 27px;
  padding: 3px 9px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 3;
  border: 1px solid rgba(238, 238, 231, .74);
  border-radius: 50%;
  color: #eee8df;
  background:
    radial-gradient(circle at 50% 28%, #6b4c40, #2a211f 72%);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  box-shadow:
    0 2px 10px rgba(0,0,0,.42),
    inset 0 0 0 2px rgba(184, 127, 88, .25);
}

.profile-level-badge .level-border-image {
  width: 78px;
  height: 48px;
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 4;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.profile-card-shell {
  width: 252px;
  margin: -2px auto 0;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(202, 226, 233, .64);
  background: rgba(5, 22, 34, .88);
  box-shadow: 0 18px 38px rgba(0,0,0,.27);
  transition: .16s ease;
}

.profile-card-shell .profile-card-art-wrap {
  height: 337px;
  border: 0;
}

.profile-card-shell .profile-name-bar {
  min-height: 31px;
  border: 0;
  color: #07151e;
  background: #f6cb70;
  font-size: 16px;
}

.profile-title-row {
  min-height: 32px;
  display: grid;
  place-items: center;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #dce8eb;
  background:
    linear-gradient(180deg, rgba(6, 23, 35, .93), rgba(5, 19, 30, .98));
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.profile-accent {
  width: 2px;
  height: 102px;
  position: absolute;
  top: 7px;
  z-index: 5;
  background: #1fe4df;
  box-shadow: 0 0 10px rgba(31,228,223,.25);
}

.profile-accent::after {
  content: "";
  width: 1px;
  height: 40px;
  position: absolute;
  top: 99px;
  background: rgba(31,228,223,.7);
}

.profile-accent-left {
  left: -5px;
}

.profile-accent-left::after {
  left: 0;
  transform: rotate(34deg);
  transform-origin: top;
}

.profile-accent-right {
  right: -5px;
}

.profile-accent-right::after {
  right: 0;
  transform: rotate(-34deg);
  transform-origin: top;
}

.profile-card-composite .profile-card-tail {
  width: 252px;
  height: 86px;
  margin: 0 auto;
  position: relative;
}

.tail-line {
  width: 1px;
  height: 88px;
  position: absolute;
  top: -1px;
  background: rgba(204, 226, 233, .67);
  transform-origin: top;
}

.tail-line-left {
  left: 28px;
  transform: rotate(-37deg);
}

.tail-line-right {
  right: 28px;
  transform: rotate(37deg);
}

.tail-tip {
  width: 1px;
  height: 16px;
  position: absolute;
  bottom: -1px;
  background: rgba(222, 239, 243, .83);
}

.tail-tip-left {
  left: 91px;
}

.tail-tip-right {
  right: 91px;
}

.profile-customize-hint {
  width: 270px;
  margin: 2px auto 0;
  color: #607f8a;
  text-align: center;
  font-size: 9px;
  letter-spacing: .03em;
}

/* One Profile picker with 3 tabs -------------------------- */

.profile-picker-tabs {
  min-height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 18, 28, .63);
}

.profile-picker-tab {
  min-width: 126px;
  padding: 0 18px;
  position: relative;
  border: 0;
  color: #d1dde1;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .035em;
}

.profile-picker-tab::after {
  content: "";
  height: 3px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
}

.profile-picker-tab:hover {
  color: #fff;
}

.profile-picker-tab.active {
  color: #61f5d0;
}

.profile-picker-tab.active::after {
  background: #45e6bf;
  box-shadow: 0 0 13px rgba(69,230,191,.28);
}

/* Favorites ------------------------------------------------ */

.favorite-star {
  display: grid;
  place-items: center;
  color: #8ca1a9;
  cursor: pointer;
  user-select: none;
  transition:
    color .14s ease,
    transform .14s ease,
    filter .14s ease;
}

.favorite-star:hover,
.favorite-star:focus-visible {
  color: #f3c35f;
  outline: none;
  transform: scale(1.12);
}

.favorite-star.is-favorite {
  color: #f1bf51;
  filter: drop-shadow(0 2px 5px rgba(241,191,81,.28));
}

.skin-favorite-star {
  width: 31px;
  height: 31px;
  position: absolute;
  top: 8px;
  left: 9px;
  z-index: 8;
  border: 1px solid rgba(211, 231, 237, .26);
  background: rgba(4, 17, 25, .70);
  font-size: 21px;
}

.skin-card.favorite-item {
  border-color: rgba(241,191,81,.46);
}

.skin-card.favorite-item::before {
  content: "FAVORITE";
  position: absolute;
  top: 8px;
  left: 45px;
  z-index: 7;
  padding: 4px 6px;
  color: #0a1a21;
  background: #f1bf51;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
}

.cosmetic-item {
  position: relative;
}

.cosmetic-favorite-star {
  width: 34px;
  height: 34px;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 8;
  border: 1px solid rgba(221, 237, 241, .25);
  background: rgba(5, 18, 26, .76);
  font-size: 23px;
}

.cosmetic-item.favorite-item {
  border-color: rgba(241,191,81,.47);
}

.cosmetic-selected-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 7;
  display: none;
  padding: 5px 7px;
  color: #062128;
  background: #62e6ef;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
}

.cosmetic-item.selected .cosmetic-selected-badge {
  display: block;
}

.favorite-priority-note {
  grid-column: 1 / -1;
  min-height: 29px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d2ab59;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .profile-card-composite,
  .profile-customize-hint {
    width: 250px;
  }

  .profile-card-shell,
  .profile-card-composite .profile-card-tail {
    width: 232px;
  }

  .profile-card-shell .profile-card-art-wrap {
    height: 310px;
  }

  .profile-picker-tabs {
    padding: 0;
    overflow-x: auto;
  }

  .profile-picker-tab {
    flex: 1 0 auto;
    min-width: 115px;
    padding: 0 12px;
  }
}


/* =========================================================
   V8 — TOP BUDDY PICKER + BUDDY ON WEAPON + ALL FAVORITES
   ========================================================= */

/* Weapon customization top tabs --------------------------- */

.weapon-customize-tabs {
  min-height: 47px;
  padding: 0 20px;
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 18, 28, .62);
}

.weapon-customize-tab {
  min-width: 150px;
  padding: 0 20px;
  position: relative;
  border: 0;
  color: #c6d5da;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .055em;
}

.weapon-customize-tab::after {
  content: "";
  height: 3px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
}

.weapon-customize-tab.active {
  color: #5cf0d0;
}

.weapon-customize-tab.active::after {
  background: #49e6c4;
}

.weapon-buddy-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.weapon-buddy-tab:hover:not(:disabled) {
  color: #fff;
  background: rgba(255,255,255,.025);
}

.weapon-buddy-tab:disabled {
  display: none;
}

.buddy-tab-image {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.35));
}

/* Buddy rendered on the gun itself ------------------------ */

.modal-weapon-image-wrap {
  position: relative;
}

.modal-weapon-buddy-overlay {
  width: 30px;
  height: 30px;
  position: absolute;
  left: 57%;
  top: 57%;
  z-index: 5;
  object-fit: contain;
  transform: translate(-50%, -50%) rotate(10deg);
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.55));
  pointer-events: none;
}

.preview-weapon-stage {
  width: min(470px, 46vw);
  height: 108px;
  position: relative;
  display: grid;
  place-items: center;
}

.preview-weapon-stage .preview-image {
  width: 100%;
  height: 98px;
}

.preview-buddy-overlay {
  width: 40px;
  height: 40px;
  position: absolute;
  left: 57%;
  top: 58%;
  z-index: 5;
  object-fit: contain;
  transform: translate(-50%, -50%) rotate(10deg);
  filter: drop-shadow(0 5px 5px rgba(0,0,0,.55));
  pointer-events: none;
}

/* Collection card buddy is no longer a corner icon.
   It sits approximately on the receiver/body of the gun. */
.weapon-buddy-icon {
  width: 29px !important;
  height: 29px !important;
  left: 58% !important;
  right: auto !important;
  top: 58% !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) rotate(10deg);
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.58)) !important;
  pointer-events: none;
}

/* Equipped skin favorite ---------------------------------- */

.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-favorite-button {
  width: 38px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 232, 236, .32);
  color: #91a4ab;
  background: rgba(4, 17, 25, .56);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.preview-favorite-button:hover {
  color: #f1bf51;
  border-color: rgba(241,191,81,.62);
}

.preview-favorite-button.is-favorite {
  color: #f1bf51;
  border-color: rgba(241,191,81,.7);
  filter: drop-shadow(0 2px 5px rgba(241,191,81,.22));
}

/* Variant favorites --------------------------------------- */

.variant-thumb-box {
  position: relative;
}

.variant-favorite-star {
  width: 28px;
  height: 28px;
  position: absolute;
  left: 7px;
  top: 7px;
  z-index: 7;
  border: 1px solid rgba(219, 235, 240, .27);
  background: rgba(5, 18, 26, .72);
  font-size: 20px;
}

.variant-option.favorite-item {
  border-color: rgba(241,191,81,.5);
}

/* Favorites are now available for every cosmetic picker item. */
.cosmetic-item.title-cosmetic .cosmetic-favorite-star {
  display: grid;
}

@media (max-width: 700px) {
  .weapon-customize-tabs {
    padding: 0;
    overflow-x: auto;
  }

  .weapon-customize-tab {
    flex: 1 0 auto;
    min-width: 135px;
  }

  .preview-weapon-stage {
    width: 46vw;
    height: 82px;
  }

  .preview-weapon-stage .preview-image {
    height: 72px;
  }

  .preview-buddy-overlay {
    width: 31px;
    height: 31px;
  }
}


/* =========================================================
   V9 — TALLER / NARROWER PLAYER CARD
   Artwork area is close to a 9:16 vertical card ratio.
   ========================================================= */

.profile-card-composite {
  width: 238px;
}

.profile-card-top-border {
  width: 238px;
  margin: 0 auto;
  grid-template-columns: 1fr 60px 1fr;
  gap: 7px;
}

.profile-card-shell {
  width: 216px;
}

.profile-card-shell .profile-card-art-wrap {
  height: 384px;
}

.profile-card-shell .profile-card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.profile-card-shell .profile-card-fallback {
  width: 100%;
  height: 100%;
}

.profile-card-shell .profile-name-bar {
  min-height: 30px;
  font-size: 15px;
}

.profile-title-row {
  min-height: 31px;
}

.profile-card-composite .profile-card-tail {
  width: 216px;
  height: 84px;
}

.tail-line-left {
  left: 24px;
}

.tail-line-right {
  right: 24px;
}

.tail-tip-left {
  left: 78px;
}

.tail-tip-right {
  right: 78px;
}

.profile-customize-hint {
  width: 238px;
}

/* Keep the right column visually balanced with the slimmer card. */
.profile-panel {
  padding-left: 12px;
  padding-right: 12px;
}

@media (max-width: 700px) {
  .profile-card-composite,
  .profile-customize-hint {
    width: 222px;
  }

  .profile-card-top-border {
    width: 222px;
  }

  .profile-card-shell,
  .profile-card-composite .profile-card-tail {
    width: 204px;
  }

  .profile-card-shell .profile-card-art-wrap {
    height: 363px;
  }

  .tail-tip-left {
    left: 73px;
  }

  .tail-tip-right {
    right: 73px;
  }
}
