.inventory-page {
  width: min(100% - 32px, var(--max));
  margin: 22px auto 70px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.inventory-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 166px;
  padding: 36px 32px 28px;
  border-bottom: 1px solid var(--line);
}

.inventory-title h1 {
  margin: 0;
  font-size: clamp(3.25rem, 6vw, 5.8rem);
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.inventory-title span,
.inventory-status,
.inventory-heading span,
.ticket-entry span,
.user-order span {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.inventory-status {
  min-height: 40px;
  margin: 0;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}

.inventory-status:empty {
  min-height: 0;
  padding: 0;
  border: 0;
}

.inventory-section + .inventory-section {
  border-top: 1px solid var(--line);
}

.inventory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}

.inventory-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.owned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.owned-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  min-height: 150px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.owned-media {
  display: grid;
  overflow: hidden;
  place-items: center;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.owned-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.owned-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
}

.owned-copy h3,
.ticket-entry strong,
.user-order strong {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.owned-copy span {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.ticket-list,
.user-order-list {
  display: grid;
}

.ticket-entry,
.user-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 82px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
}

.ticket-numbers {
  max-width: 60ch;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-order-copy {
  display: grid;
  gap: 5px;
}

.user-order-price {
  color: var(--text) !important;
  font-size: 13px !important;
  font-variant-numeric: tabular-nums;
}

.empty-inventory {
  min-height: 150px;
  margin: 0;
  padding: 60px 24px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .inventory-page {
    width: 100%;
    margin-top: 12px;
    border-right: 0;
    border-left: 0;
  }

  .inventory-title {
    min-height: 130px;
    padding: 30px 18px 22px;
  }

  .inventory-title span {
    display: none;
  }

  .inventory-heading {
    padding-inline: 18px;
  }

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

  .ticket-entry,
  .user-order {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 18px;
  }

  .ticket-numbers {
    text-align: left;
  }
}
