@font-face {
  font-family: 'Jacquard 24';
  src: url('/static/fonts/Jacquard24.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Jersey 15';
  src: url('/static/fonts/Jersey15.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #2a2a4a 0%, #7a82a0 100%);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #c8c8d4;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-radial-gradient(circle, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 4px);
  background-size: 6px 6px;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.page-wide {
  max-width: 520px;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-family: 'Jersey 15', sans-serif;
  font-size: 1.05rem;
}

.site-nav a,
.view-connections-link {
  color: #c8c8d4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-nav a:hover,
.view-connections-link:hover {
  color: #e8d48b;
}

.site-footer {
  margin-top: 2rem;
  padding: 1rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
}

.site-footer-logo {
  width: min(180px, 72%);
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  mix-blend-mode: multiply;
}

.site-footer-meta {
  font-family: 'Jersey 15', sans-serif;
  font-size: 1rem;
  color: #d8d8e2;
}

.flash {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.flash-error {
  background-color: #ffdddd;
  border: 1px solid #ffaaaa;
  color: #882222;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 2rem;
}

.claim-inventory-grid {
  margin-bottom: 1.5rem;
}

.cell {
  aspect-ratio: 1;
  border: 2px solid #c5a55a;
  border-radius: 4px;
  background: rgba(42, 42, 74, 0.5);
  overflow: hidden;
}

.cell img,
.cell-lg img,
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cell img,
.cell-lg img {
  border-radius: 2px;
}

.cell.border-Common,
.border-Common {
  border-color: #9d9d9d;
}

.cell.border-Uncommon,
.border-Uncommon {
  border-color: #1eff00;
}

.cell.border-Rare,
.border-Rare {
  border-color: #0070dd;
}

.cell.border-Epic,
.border-Epic {
  border-color: #a335ee;
}

.cell.border-Legendary,
.border-Legendary {
  border-color: #ff8000;
}

.cell-highlight {
  box-shadow: 0 0 0 2px rgba(232, 212, 139, 0.9), 0 0 18px rgba(232, 212, 139, 0.35);
}

.cell-lg {
  grid-column: 2 / 5;
  grid-row: 2 / 5;
  border: 2px solid #c5a55a;
  border-radius: 4px;
  background: rgba(42, 42, 74, 0.5);
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paper-doll {
  width: 100%;
  height: 100%;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paper-doll-frame {
  width: 100%;
  max-width: 208px;
  aspect-ratio: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 50%, transparent 50%) 0 0 / 24px 24px,
    linear-gradient(rgba(0, 0, 0, 0.08) 50%, transparent 50%) 0 0 / 24px 24px,
    #cfcfd4;
  border: 2px solid rgba(24, 24, 44, 0.2);
  border-radius: 6px;
}

.paper-doll-layer {
  position: absolute;
  inset: 0;
}

.paper-doll-base-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  position: relative;
  z-index: 10;
}

.paper-doll-item-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.paper-doll-slot-back { z-index: 5; }
.paper-doll-slot-legs { z-index: 12; }
.paper-doll-slot-feet { z-index: 13; }
.paper-doll-slot-torso { z-index: 14; }
.paper-doll-slot-face { z-index: 15; }
.paper-doll-slot-head { z-index: 16; }
.paper-doll-slot-left_hand { z-index: 17; }
.paper-doll-slot-right_hand { z-index: 17; }
.paper-doll-slot-left_pet { z-index: 18; }
.paper-doll-slot-right_pet { z-index: 18; }

.paper-doll-slot-right_hand img {
  transform: scaleX(-1);
  transform-origin: center;
}

.paper-doll-slot-left_pet img {
  transform: scaleX(-1);
  transform-origin: center;
}

.level-badge {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  background: #2a2a4a;
  border: 3px solid #c5a55a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Jersey 15', sans-serif;
  font-size: 2rem;
  font-weight: 400;
  color: #e8d48b;
}

.card,
.profile-card,
.form-card,
.title-card,
.leaderboard,
.empty-message {
  background: #1e1e38;
  border: 2px solid #c5a55a;
  border-radius: 8px;
}

.card,
.profile-card {
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.profile-card,
.title-card {
  border-width: 3px;
  position: relative;
}

.title-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(197, 165, 90, 0.35);
  border-radius: 5px;
  pointer-events: none;
}

.title-card {
  padding: 1.25rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.card-title,
.profile-name,
.form-card-title,
h1 {
  font-family: 'Jacquard 24', serif;
  background: linear-gradient(180deg, #e8d48b, #c5a55a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.profile-name,
h1 {
  font-size: 2.7rem;
  line-height: 1;
}

.form-card-title {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.trade-offer-page .form-card-title {
  font-size: 2rem;
}

.card-body {
  color: #a0a0b4;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.profile-subtitle,
.card-subtitle {
  font-family: 'Jersey 15', sans-serif;
  font-size: 1.1rem;
  color: #c8c8d4;
  margin-bottom: 1.25rem;
}

.card-subtitle {
  margin-bottom: 0.5rem;
}

.profile-desc,
.card-text {
  font-family: 'Jersey 15', sans-serif;
  font-size: 1rem;
  color: #a0a0b4;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.card-text {
  margin-bottom: 1.25rem;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #c5a55a, transparent);
  margin: 0 2rem 0.75rem;
}

.btn,
.btn-claim,
.btn-connect,
.btn-submit {
  display: inline-block;
  color: #e8d48b;
  border: 2px solid #c5a55a;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.btn,
.btn-connect {
  padding: 0.75rem 2rem;
  background: #3a6abf;
  font-family: 'Jersey 15', sans-serif;
  font-size: 1.2rem;
}

.btn-connect {
  margin-bottom: 1rem;
  appearance: none;
}

.btn:hover,
.btn-connect:hover {
  background: #4a7acf;
}

.btn-claim,
.btn-submit {
  background: #3a4a8a;
}

.btn-claim {
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 600;
}

.btn-submit {
  padding: 0.6rem 2.5rem;
  font-family: 'Jersey 15', sans-serif;
  font-size: 1.2rem;
}

.btn-claim:hover,
.btn-submit:hover {
  background: #4a5a9a;
}

.view-connections-link {
  display: block;
  font-family: 'Jersey 15', sans-serif;
  font-size: 1rem;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

button.view-connections-link {
  width: 100%;
  text-align: center;
  appearance: none;
}

#connect-toggle,
#collect-toggle,
#connections-toggle,
#form-toggle,
#open-toggle {
  display: none;
}

.connect-form,
.collect-form,
.connections-panel,
.claim-form,
.opened-state {
  display: none;
}

#connect-toggle:checked ~ .connect-form,
#collect-toggle:checked ~ .collect-form,
#connections-toggle:checked ~ .connections-panel,
#form-toggle:checked ~ .claim-form,
#open-toggle:checked ~ .opened-state {
  display: block;
}

#form-toggle:checked ~ .card,
#open-toggle:checked ~ .closed-state {
  display: none;
}

.claim-form .card {
  display: block;
  text-align: left;
}

.claim-form-open {
  display: block;
}

.claim-form .card-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.claim-avatar-preview {
  margin: 0 auto 1.5rem;
  display: flex;
  justify-content: center;
}

.claim-avatar-stage {
  width: min(100%, 240px);
  padding: 0;
}

.claim-avatar-stage .paper-doll {
  padding: 0;
}

.claim-avatar-stage .paper-doll-frame {
  max-width: 224px;
  background: none;
  border: none;
  border-radius: 0;
}

.banner {
  background: rgba(58, 138, 58, 0.15);
  border: 1px solid #3a8a3a;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #7ac38a;
  font-size: 0.9rem;
}

.banner-warn {
  background: rgba(197, 165, 90, 0.12);
  border-color: #c5a55a;
  color: #e8d48b;
}

.form-card {
  padding: 2rem 1.5rem;
  text-align: left;
  margin-bottom: 1.5rem;
  font-family: 'Jersey 15', sans-serif;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 1.15rem;
  color: #c8c8d4;
  margin-bottom: 0.5rem;
  font-family: 'Jersey 15', sans-serif;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  background: #2a2a4a;
  border: 1px solid #c5a55a;
  border-radius: 4px;
  color: #e0e0ec;
  font-size: 1.15rem;
  font-family: 'Jersey 15', sans-serif;
}

.form-group select {
  width: 100%;
  padding: 0.75rem;
  background: #2a2a4a;
  border: 1px solid #c5a55a;
  border-radius: 4px;
  color: #e0e0ec;
  font-size: 1.15rem;
  font-family: 'Jersey 15', sans-serif;
}

.form-group input[type="text"]::placeholder {
  color: #6a6a80;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #e8d48b;
}

.form-group select:focus {
  outline: none;
  border-color: #e8d48b;
}

.color-swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
}

.color-swatch-grid-skin {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid rgba(197, 165, 90, 0.45);
  border-radius: 8px;
  background: var(--swatch-color);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.color-swatch-skin {
  aspect-ratio: 1;
  padding: 0;
  background: #2a2a4a;
}

.color-swatch-skin img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.color-swatch:hover {
  transform: translateY(-1px);
  border-color: #e8d48b;
}

.color-swatch.is-selected {
  border-color: #f3e7b0;
  box-shadow: 0 0 0 2px rgba(243, 231, 176, 0.35);
}

.color-swatch:focus-visible {
  outline: 2px solid #f3e7b0;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hair-style-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.hair-style-arrow,
.hair-style-label {
  min-height: 44px;
  border: 1px solid #c5a55a;
  border-radius: 6px;
  background: #2a2a4a;
  color: #e0e0ec;
  font-family: 'Jersey 15', sans-serif;
  font-size: 1.15rem;
}

.hair-style-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.hair-style-arrow:hover {
  border-color: #e8d48b;
  background: #32325a;
}

.hair-style-arrow:focus-visible {
  outline: 2px solid #f3e7b0;
  outline-offset: 2px;
}

.hair-style-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.75rem;
  text-align: center;
}

.file-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #c5a55a;
  border-radius: 4px;
  background: #2a2a4a;
  overflow: hidden;
}

.file-input-wrap input[type="file"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  color: #e0e0ec;
  font-size: 0.85rem;
  font-family: inherit;
}

.file-input-wrap input[type="file"]:focus {
  outline: none;
}

.file-input-wrap input[type="file"]::file-selector-button {
  background: #3a8a3a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Jersey 15', sans-serif;
  cursor: pointer;
}

.file-input-wrap input[type="file"]::file-selector-button:hover {
  background: #4a9a4a;
}

.form-actions {
  text-align: center;
  margin-top: 1.5rem;
}

.connections-panel {
  margin-bottom: 1.5rem;
}

.connections-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Jersey 15', sans-serif;
  color: #d7d7e8;
}

.connections-table th {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8d8da8;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(197, 165, 90, 0.2);
  text-align: left;
}

.connections-table td {
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid rgba(197, 165, 90, 0.12);
  font-size: 1.3rem;
  line-height: 1.1;
  color: #d7d7e8;
}

.connections-table tbody tr:last-child td {
  border-bottom: none;
}

.connections-table tbody tr:hover td {
  background: rgba(197, 165, 90, 0.06);
}

.connections-table tbody tr.connection-row-link {
  cursor: pointer;
}

.connections-table tbody tr.connection-row-link:focus-visible {
  outline: none;
}

.connections-table tbody tr.connection-row-link:focus-visible td {
  background: rgba(197, 165, 90, 0.08);
}

.connections-table tbody tr.connection-row-link td:first-child {
  color: #e8d48b;
}

.connections-table tbody tr.connection-row-link:hover td:first-child {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.leaderboard {
  list-style: none;
  padding: 0.35rem 0;
  margin: 0;
}

.leaderboard-item {
  border-bottom: 1px solid rgba(197, 165, 90, 0.18);
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-row-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin: 0 0.45rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}

.leaderboard-row-link:hover {
  background: rgba(197, 165, 90, 0.06);
}

.leaderboard-row-link:focus-visible {
  outline: none;
  background: rgba(197, 165, 90, 0.08);
  box-shadow: inset 0 0 0 2px rgba(197, 165, 90, 0.6);
}

.leaderboard-name {
  color: #e8d48b;
  font-family: 'Jersey 15', sans-serif;
  font-size: 1.45rem;
  line-height: 1.1;
}

.leaderboard-row-link:hover .leaderboard-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.level {
  font-family: 'Jersey 15', sans-serif;
  font-size: 1.2rem;
  color: #c8c8d4;
  white-space: nowrap;
}

.empty-message {
  text-align: center;
  color: #a0a0b4;
  font-family: 'Jersey 15', sans-serif;
  font-size: 1.3rem;
  padding: 2rem 1rem;
}

.profile-hero,
.inventory-manager {
  background: #1e1e38;
  border: 2px solid #c5a55a;
  border-radius: 8px;
  padding: 0.95rem;
  margin-bottom: 1rem;
}

.profile-hero {
  display: block;
}

.profile-overview-card {
  margin-bottom: 0.2rem;
  padding: 0.2rem 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  align-items: center;
}

.profile-hero-actions .btn-connect {
  margin-bottom: 0;
}

.profile-inline-link {
  display: inline-block;
  width: auto;
  margin-top: 0;
}

.profile-stage {
  display: block;
}

.profile-inline-doll {
  position: relative;
  margin: 0 auto 0.1rem;
  width: min(100%, 260px);
}

.profile-inline-doll .paper-doll-frame {
  max-width: 260px;
  aspect-ratio: 3 / 4;
  background: none;
  border: none;
  border-radius: 0;
}

.profile-inline-doll .paper-doll {
  padding: 0;
  overflow: hidden;
}

.profile-inline-doll .paper-doll-base-image,
.profile-inline-doll .paper-doll-item-layer {
  transform: translateY(-8%) scale(1.08);
  transform-origin: center top;
}

.loadout-card {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.equip-slot {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(197, 165, 90, 0.28);
  background: rgba(20, 22, 40, 0.5);
  border-radius: 6px;
  padding: 0.35rem;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.equip-slot-filled {
  border-color: rgba(232, 212, 139, 0.8);
  box-shadow: inset 0 0 0 1px rgba(232, 212, 139, 0.2), 0 0 14px rgba(232, 212, 139, 0.06);
}

.equip-slot.is-selected {
  border-color: #e8d48b;
  box-shadow: 0 0 0 1px rgba(232, 212, 139, 0.3), 0 0 18px rgba(232, 212, 139, 0.1);
  background: rgba(40, 46, 72, 0.82);
}

.equip-slot-label {
  font-family: 'Jersey 15', sans-serif;
  font-size: 0.85rem;
  color: #b8b8c8;
  margin-bottom: 0.2rem;
}

.equip-slot-body {
  aspect-ratio: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 18, 34, 0.45);
  border-radius: 4px;
  overflow: hidden;
  padding: 0.2rem;
}

.equip-slot-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.equip-slot-empty {
  font-family: 'Jersey 15', sans-serif;
  font-size: 1rem;
  color: #7a7a90;
}

.inventory-manager-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.inventory-manager-note {
  font-family: 'Jersey 15', sans-serif;
  color: #a0a0b4;
  font-size: 1rem;
}

.inventory-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.inventory-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  width: 100%;
  border: 1px solid rgba(197, 165, 90, 0.4);
  background: rgba(30, 34, 56, 0.72);
  color: #c8c8d4;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Jersey 15', sans-serif;
  font-size: 1rem;
}

.inventory-tab.is-active {
  color: #e8d48b;
  border-color: #e8d48b;
  background: rgba(58, 106, 191, 0.3);
  box-shadow: inset 0 0 0 1px rgba(232, 212, 139, 0.12);
}

.inventory-tab-count {
  min-width: 1.5rem;
  text-align: center;
  color: #7a7a90;
}

.inventory-panel {
  display: none;
}

.inventory-panel.is-active {
  display: block;
}

.inventory-workbench {
  display: block;
}

.tab-detail-host {
  margin-bottom: 0.75rem;
}

.tab-detail-host:empty {
  display: none;
  margin-bottom: 0;
}

.inventory-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.inventory-item-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.45rem;
  width: 100%;
  text-align: left;
  background: rgba(28, 31, 50, 0.72);
  border: 1px solid rgba(197, 165, 90, 0.25);
  border-radius: 6px;
  color: #d7d7e8;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s, box-shadow 0.18s;
}

.inventory-item-card:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 212, 139, 0.4);
  background: rgba(34, 38, 60, 0.82);
}

.inventory-item-card.is-selected {
  border-color: #e8d48b;
  box-shadow: 0 0 0 1px rgba(232, 212, 139, 0.25), 0 0 18px rgba(232, 212, 139, 0.08);
}

.inventory-item-card.is-equipped {
  background: rgba(42, 62, 56, 0.62);
}

.inventory-item-art {
  aspect-ratio: 1;
  border: 2px solid #c5a55a;
  border-radius: 6px;
  overflow: hidden;
  display: block;
  background:
    radial-gradient(circle at center, rgba(232, 212, 139, 0.08), transparent 58%),
    rgba(18, 18, 34, 0.35);
}

.inventory-item-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.inventory-item-name {
  font-family: 'Jersey 15', sans-serif;
  font-size: 0.9rem;
  color: #e8d48b;
  line-height: 1.1;
}

.item-detail-meta,
.item-detail-state {
  font-family: 'Jersey 15', sans-serif;
  color: #a0a0b4;
}

.item-detail-meta {
  margin-bottom: 0.75rem;
}

.item-detail-card {
  background: rgba(30, 34, 56, 0.78);
  border: 1px solid rgba(197, 165, 90, 0.3);
  border-radius: 8px;
  padding: 0.85rem;
}

.item-detail-placeholder {
  font-family: 'Jersey 15', sans-serif;
  color: #a0a0b4;
  text-align: center;
}

.item-detail-layout {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.item-detail-art {
  aspect-ratio: 1;
  border: 2px solid #c5a55a;
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(232, 212, 139, 0.08), transparent 58%),
    rgba(18, 18, 34, 0.35);
}

.item-detail-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.inventory-item-art.border-Common,
.item-detail-art.border-Common {
  border-color: #9d9d9d;
}

.inventory-item-art.border-Uncommon,
.item-detail-art.border-Uncommon {
  border-color: #1eff00;
}

.inventory-item-art.border-Rare,
.item-detail-art.border-Rare {
  border-color: #0070dd;
}

.inventory-item-art.border-Epic,
.item-detail-art.border-Epic {
  border-color: #a335ee;
}

.inventory-item-art.border-Legendary,
.item-detail-art.border-Legendary {
  border-color: #ff8000;
}

.item-detail-name {
  font-family: 'Jacquard 24', serif;
  font-size: 2rem;
  line-height: 1;
  background: linear-gradient(180deg, #e8d48b, #c5a55a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.45rem;
}

.item-detail-copy {
  min-width: 0;
}

.item-detail-state {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.hand-loadout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.hand-loadout-grid:empty {
  display: none;
  margin-top: 0;
}

.hand-detail-card.is-current {
  border-color: rgba(232, 212, 139, 0.7);
  box-shadow: 0 0 0 1px rgba(232, 212, 139, 0.18);
}

.hand-detail-layout {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.hand-detail-heading,
.hand-detail-name {
  font-family: 'Jersey 15', sans-serif;
}

.hand-detail-heading {
  color: #a0a0b4;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.hand-detail-name {
  font-size: 1.45rem;
  line-height: 1;
  color: #e8d48b;
  margin-bottom: 0.2rem;
}

.item-detail-actions,
.detail-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trade-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trade-offer-actions form {
  margin: 0;
}

.detail-action-group {
  margin-bottom: 0.5rem;
}

.detail-btn {
  padding: 0.6rem 1rem;
  font-size: 1rem;
}

.detail-btn-active {
  background: #4a7acf;
}

.detail-btn-muted {
  background: #3a4a8a;
}

.admin-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.trade-offers-panel {
  margin-bottom: 1rem;
}

.trade-offers-panel .form-card {
  padding: 0.55rem 0.85rem 0.65rem;
}

.trade-offers-heading {
  font-family: 'Jersey 15', sans-serif;
  font-size: 1.2rem;
  color: #e8d48b;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  display: block;
  width: 100%;
}

.trade-offers-list {
  display: grid;
  gap: 0.85rem;
  margin: 0.65rem 0 0.15rem;
}

.trade-offers-list[hidden] {
  display: none;
}

.trade-offer-card {
  background: rgba(30, 34, 56, 0.78);
  border: 1px solid rgba(197, 165, 90, 0.3);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  display: grid;
  grid-template-columns: max-content 4.5rem minmax(0, 1fr) 6.75rem;
  align-items: center;
  gap: 0.6rem;
}

.trade-offer-label,
.trade-offer-name {
  font-family: 'Jersey 15', sans-serif;
}

.trade-offer-art {
  width: 4.5rem;
  justify-self: start;
}

.trade-offer-label {
  color: #a0a0b4;
  line-height: 1.1;
  white-space: nowrap;
}

.trade-offer-label a {
  color: #e8d48b;
}

.trade-offer-name {
  color: #e8d48b;
  line-height: 1.1;
  min-width: 0;
}

.trade-offer-action {
  margin: 0;
  width: 6.75rem;
}

.trade-offer-action .detail-btn {
  width: 100%;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .trade-offers-panel .form-card {
    padding: 0.75rem 0.65rem 0.65rem;
  }

  .trade-offers-heading {
    font-size: 1.05rem;
  }

  .trade-offer-card {
    padding: 0.55rem 0.6rem;
    grid-template-columns: max-content 2.6rem minmax(0, 1fr) 6rem;
  }

  .trade-offer-art {
    width: 2.6rem;
    justify-self: start;
  }

  .trade-offer-action {
    width: 6rem;
  }
}

.trade-inventory-manager {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.trade-inventory-card {
  padding: 0.95rem;
}

@media (max-width: 640px) {
  .inventory-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .inventory-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .equipment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.image-frame {
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem;
  border: 3px solid #c5a55a;
  border-radius: 8px;
  background: rgba(42, 42, 74, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-frame img {
  border-radius: 4px;
}

.rarity-Common {
  color: #9d9d9d;
  -webkit-text-fill-color: #9d9d9d;
}

.rarity-Uncommon {
  color: #1eff00;
  -webkit-text-fill-color: #1eff00;
}

.rarity-Rare {
  color: #0070dd;
  -webkit-text-fill-color: #0070dd;
}

.rarity-Epic {
  color: #a335ee;
  -webkit-text-fill-color: #a335ee;
}

.rarity-Legendary {
  background: linear-gradient(180deg, #ffb347, #ff8000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.not-found {
  text-align: center;
  margin-top: 5rem;
}

.not-found-code {
  font-size: 4rem;
  font-weight: bold;
  color: #e8d48b;
}

.not-found-title {
  font-size: 1.5rem;
  color: #c8c8d4;
  margin-top: 1rem;
}

.not-found-link {
  display: inline-block;
  margin-top: 2rem;
  color: #e8d48b;
}

@media (max-width: 480px) {
  .leaderboard-name { font-size: 1.25rem; }
  .level { font-size: 1.05rem; }
  h1 { font-size: 2rem; }
}
