:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --gold: #d29922;
  --purple: #a371f7;
  --red: #f85149;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-bar span {
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-panel {
  max-width: 720px;
  margin: 1rem auto;
  padding: 0 1rem;
}

.auth-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.auth-card h3 {
  margin: 0 0 0.75rem;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-card input {
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.hint {
  margin-top: 1rem;
  font-size: 0.85rem;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

button:hover {
  filter: brightness(1.08);
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

.hidden {
  display: none !important;
}

.profile-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--border);
  object-fit: cover;
  flex-shrink: 0;
}

.avatar:not([src]),
.avatar[src=""] {
  visibility: hidden;
  width: 0;
  margin: 0;
}

.profile-meta h2 {
  margin: 0.15rem 0;
  font-size: 1.25rem;
}

.account-id {
  margin: 0;
  font-size: 0.8rem;
}

.muted {
  color: var(--muted);
}

.link-steam-row {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.link-steam-row input {
  flex: 1;
  min-width: 160px;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.tab {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem;
  text-align: center;
}

.stat-box .value {
  font-size: 1.35rem;
  font-weight: 700;
}

.stat-box .label {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.2rem;
}

.inv-hint {
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

.inv-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.inv-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.inv-toolbar-primary {
  width: 100%;
}

.inv-filters-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-start;
}

.inv-filters-panel.hidden {
  display: none;
}

.inv-filter-dropdown {
  flex: 1 1 140px;
  min-width: 120px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.35rem 0.5rem 0.5rem;
}

.inv-filter-dropdown summary {
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  user-select: none;
  list-style: none;
}

.inv-filter-dropdown summary::-webkit-details-marker {
  display: none;
}

.inv-filter-dropdown select,
.inv-filter-dropdown .inv-stack-toggle {
  width: 100%;
  margin-top: 0.35rem;
}

.favorite-pin {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 3;
  font-size: 0.72rem;
  line-height: 1;
  color: #ffd54f;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.inv-tile-favorite {
  box-shadow: inset 0 0 0 1px rgba(255, 213, 79, 0.35);
}

.settings-field-check {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.settings-field-check input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}

.settings-field-note {
  font-size: 0.8rem;
  margin: -0.25rem 0 0.75rem;
  grid-column: 1 / -1;
}

.inv-toolbar input[type="search"] {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.inv-toolbar select {
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
}

.inv-count {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.inv-hidden-wrap {
  margin-top: 1.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.inv-hidden-wrap summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
  user-select: none;
}

.inv-hidden-grid {
  opacity: 0.82;
}

.inv-tile-hidden {
  opacity: 0.65;
}

.skins-db-hint {
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.inventory-grid.compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.55rem;
}

.inv-tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: transform 0.08s ease, border-color 0.08s;
}

.inv-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.inv-tile-tradeup {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.tradeup-panel {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tradeup-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}

.tradeup-slots {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.tradeup-slot {
  width: 72px;
  height: 54px;
  border: 2px dashed var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--muted);
  background: #121820;
  padding: 0;
}

.tradeup-slot.filled {
  border-style: solid;
  cursor: pointer;
  overflow: hidden;
}

.tradeup-slot.filled img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tradeup-odds {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.35;
}

.tradeup-contract-info {
  margin: 0 0 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tradeup-contract-info.hidden {
  display: none;
}

.tradeup-status {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.tradeup-collections {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tradeup-col-row {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) 1fr 2.5rem;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
}

.tradeup-col-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.tradeup-col-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.tradeup-col-bar > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  min-width: 2px;
}

.tradeup-col-pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.78rem;
}

.tradeup-col-empty,
.tradeup-outcomes-empty {
  margin: 0;
  font-size: 0.78rem;
}

.tradeup-outcomes-block {
  margin-top: 0.15rem;
}

.tradeup-outcomes-heading {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tradeup-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 118px;
  overflow-y: auto;
  padding: 0.1rem 0;
}

.tradeup-outcome {
  flex: 0 0 52px;
  width: 52px;
  border: 1px solid var(--border);
  border-top-width: 2px;
  border-radius: 5px;
  background: #121820;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tradeup-outcome img {
  width: 100%;
  height: 34px;
  object-fit: contain;
  padding: 2px;
}

.tradeup-outcome-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 34px;
  font-size: 0.85rem;
  color: var(--muted);
}

.tradeup-outcome-pct {
  width: 100%;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0.15rem 0;
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
}

.tradeup-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.tradeup-hint {
  margin-bottom: 0.75rem;
}

.tradeup-grid {
  margin-top: 0.5rem;
}

.inv-tile-img-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1c2433 0%, #121820 100%);
  padding: 4px;
  position: relative;
}

.inv-tile-stickers {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  display: flex;
  gap: 2px;
  justify-content: center;
  pointer-events: none;
}

.inv-tile-stickers img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  background: rgba(13, 17, 23, 0.85);
  border-radius: 2px;
  border: 1px solid var(--border);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
  margin-bottom: 1rem;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-field-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.settings-field select {
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
}

.settings-hint {
  max-width: 560px;
  margin-bottom: 1rem;
}

.weapon-inspect-hero {
  display: block;
  max-height: 160px;
  width: auto;
  max-width: 100%;
  margin: 0.5rem auto 0.75rem;
  object-fit: contain;
}

.inv-tile img {
  max-width: 100%;
  max-height: 88px;
  object-fit: contain;
}

.inv-tile .placeholder {
  font-size: 1.5rem;
  color: var(--muted);
}

.stattrak-pin {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: #cf6a32;
  color: #fff;
  z-index: 2;
  letter-spacing: 0.02em;
}

.souvenir-pin {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
  color: #1a1a1a;
  z-index: 2;
  letter-spacing: 0.04em;
}

.inv-tile.inv-tile-gold {
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.22);
}

.inv-tile.inv-tile-souvenir {
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.45), 0 0 12px rgba(255, 215, 0, 0.18);
}

.stattrak-pin + .souvenir-pin {
  top: 4px;
  left: auto;
  right: 32px;
}

.inv-stack-count {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.14rem 0.3rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  pointer-events: none;
  letter-spacing: 0.02em;
}

.inv-stack-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.inv-stack-toggle input {
  accent-color: var(--accent);
}

.inv-tile-img-wrap .market-listed-pin {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3d7ee8;
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  z-index: 3;
  pointer-events: none;
}

.cases-section-title {
  font-size: 0.95rem;
  margin: 1rem 0 0.5rem;
  color: var(--muted);
  font-weight: 600;
}

.case-stattrak-note {
  font-size: 0.82rem;
  margin: 0 0 0.5rem;
}

.equipped-pin {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.inv-tile-cap {
  padding: 4px 6px 3px;
  font-size: 0.65rem;
  line-height: 1.15;
  color: var(--text);
  text-align: center;
  border-top: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-tile-wear {
  padding: 0 6px 5px;
  font-size: 0.58rem;
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctx-menu {
  position: fixed;
  z-index: 1000;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  padding: 0.25rem 0;
}

.ctx-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.85rem;
  background: transparent;
  color: var(--text);
  border-radius: 0;
  font-weight: 500;
  font-size: 0.88rem;
}

.ctx-menu button:hover {
  background: rgba(88, 166, 255, 0.15);
  filter: none;
}

.ctx-menu .ctx-muted {
  display: block;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: default;
}

.ctx-menu button.danger {
  color: var(--red);
}

.open-result {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
}

.unbox-img {
  width: 72px;
  height: 54px;
  object-fit: contain;
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.player-row .pid {
  color: var(--muted);
  font-size: 0.8rem;
}

.quests-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.quests-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.5rem;
}

.quests-simple-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.quests-simple-toggle input {
  accent-color: var(--accent);
}

.quest-simple-grid {
  margin-top: 0.15rem;
}

.quests-reset {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
}

.quest-category-title {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.quest-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.45rem;
}

.quest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
}

.quest-card.quest-claimed {
  opacity: 0.72;
}

.quest-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.quest-card-head h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
}

.quest-progress-label {
  font-size: 0.72rem;
  color: var(--accent);
  white-space: nowrap;
}

.quest-desc {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  line-height: 1.3;
}

.quest-reward {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  color: var(--gold);
}

.quest-bar {
  height: 4px;
  background: #21262d;
  border-radius: 2px;
  overflow: hidden;
}

.quest-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  border-radius: 3px;
  transition: width 0.2s ease;
}

.quests-placeholder {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.error {
  text-align: center;
  color: var(--red);
  padding: 0.75rem;
}

.skins-db-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.skins-db-mode {
  display: flex;
  gap: 0.25rem;
}

.mode-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.mode-btn.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.12);
}

.filter-field {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-field input,
.filter-select,
#skins-db-search {
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  max-width: 8rem;
}

#skins-db-search {
  max-width: 12rem;
  min-width: 10rem;
}

.skins-db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.skins-db-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.skins-db-img {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}

.skins-db-img img {
  max-height: 64px;
  max-width: 90%;
  object-fit: contain;
}

.skins-db-name {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skins-db-meta {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem 0.45rem;
  line-height: 1.25;
}

.skins-db-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.case-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.case-modal.hidden {
  display: none;
}

.case-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.case-modal-panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: 92vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.case-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  z-index: 2;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.case-modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.1rem 1.25rem;
}

.case-open-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.case-open-hero-wrap {
  padding: 0.25rem 0 0.5rem;
}

.case-open-hero {
  width: 168px;
  height: 126px;
  object-fit: contain;
  display: block;
}

.case-open-title {
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

.case-open-sub {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-align: center;
}

.souvenir-variant-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin: 0.35rem 0 0.75rem;
  width: 100%;
}

.souvenir-variant-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.souvenir-variant-select {
  min-width: min(100%, 280px);
  max-width: 100%;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
}

.souvenir-sticker-preview {
  width: 100%;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.souvenir-sticker-preview-cap {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  text-align: center;
}

.souvenir-sticker-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.souvenir-preview-sticker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 5.5rem;
  font-size: 0.62rem;
  color: var(--muted);
  text-align: center;
}

.souvenir-preview-sticker-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.souvenir-preview-sticker-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.souvenir-preview-sticker-cap {
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-contents-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.case-contents-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
  width: max-content;
  min-width: 100%;
  padding: 0.2rem 0.1rem 0.45rem;
}

.case-modal-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding-right: 2rem;
}

.case-modal-hero-img {
  width: 96px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

.case-modal-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.case-odds-legend {
  font-size: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.5rem 0.65rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.case-tier-block {
  margin-bottom: 1rem;
}

.case-tier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  padding: 0.4rem 0.55rem;
  border-left: 4px solid var(--border);
  margin-bottom: 0.45rem;
}

.case-tier-head h4 {
  margin: 0;
  font-size: 0.9rem;
}

.case-tier-odds {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.88rem;
}

.case-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.45rem;
}

.case-pool-item {
  flex: 0 0 80px;
  width: 80px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  border-top-width: 3px;
}

.case-pool-img {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.case-pool-odds {
  position: absolute;
  top: 2px;
  right: 3px;
  z-index: 1;
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--gold);
  pointer-events: none;
  max-width: calc(100% - 6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-pool-img img {
  max-height: 40px;
  max-width: 90%;
  object-fit: contain;
}

.case-pool-weapon {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 0.22rem 0.3rem 0;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-pool-skin {
  font-size: 0.52rem;
  padding: 0 0.3rem 0.32rem;
  line-height: 1.15;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-pool-rare {
  background: linear-gradient(180deg, rgba(235, 75, 75, 0.14) 0%, var(--bg) 60%);
}

.case-pool-rare-icon {
  background: transparent;
}

.rare-glyph {
  font-size: 1.65rem;
  color: #eb4b4b;
  text-shadow: 0 0 10px rgba(235, 75, 75, 0.45);
}

.case-pool-name {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.25rem 0.35rem 0;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.case-pool-meta {
  font-size: 0.58rem;
  padding: 0 0.35rem 0.35rem;
}

.case-item-float {
  display: block;
  font-size: 0.55rem;
}

.case-modal-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.case-modal-footer-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.case-open-btn {
  min-width: 200px;
  font-size: 1rem;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(180deg, #3d8bfd 0%, #2563eb 100%);
}

.case-unbox-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(400px, 68vh);
  text-align: center;
  padding: 2rem 1.25rem;
  border-top: 4px solid var(--accent);
  animation: case-unbox-pop 0.35s ease-out;
}

@keyframes case-unbox-pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.case-unbox-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--gold);
}

.case-unbox-reveal-img {
  max-width: 280px;
  max-height: 200px;
  object-fit: contain;
  margin: 0.75rem 0;
}

.case-unbox-reveal-title {
  margin: 0.25rem 0;
  font-size: 1.35rem;
}

.case-unbox-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  text-align: center;
}

.case-unbox-result h3 {
  margin: 0 0 0.5rem;
}

.unbox-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.35rem 0;
}

.cases-browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.case-browser-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  text-align: center;
}

.case-browser-card:hover {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}

.case-browser-card img {
  height: 56px;
  object-fit: contain;
}

.case-browser-name {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.case-browser-drop-rarity {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
}

.case-drop-rarity-note {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.8rem;
}

.skin-modal-layout {
  display: grid;
  grid-template-columns: minmax(96px, 140px) 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
}

.skin-modal-hero {
  display: block;
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  margin: 0;
}

.skin-modal-main {
  min-width: 0;
}

.skin-modal-main .case-open-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.skin-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.5rem;
}

.skin-meta-chip {
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  white-space: nowrap;
}

.skin-modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  margin: 0.35rem 0 0.5rem;
}

.skin-modal-toolbar .skin-modal-actions,
.skin-modal-toolbar .skin-modal-inspect-copy,
.skin-modal-toolbar .market-inspect-actions {
  margin: 0;
}

.skin-modal-inspect-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  margin: 0;
}

.skin-modal-inspect-copy .skin-modal-note {
  margin: 0;
}

@media (max-width: 480px) {
  .skin-modal-layout {
    grid-template-columns: 1fr;
  }

  .skin-modal-hero {
    max-height: 100px;
    margin: 0 auto;
    width: auto;
    max-width: 100%;
  }
}

.skin-modal-meta {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0.5rem 0 0.75rem;
}

.skin-modal-note {
  font-size: 0.8rem;
  margin: 0.35rem 0;
}

.skin-modal-hq-wrap {
  margin: 0.35rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.skin-modal-hq-status {
  font-size: 0.78rem;
  margin: 0;
}

.skin-modal-hq-img {
  display: block;
  width: 100%;
  max-width: min(520px, 100%);
  max-height: 220px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d1117;
}

.skin-modal-hq-img.hidden {
  display: none;
}

.skin-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.6rem 0 0.75rem;
}

.skin-modal-equip-block {
  flex-direction: column;
  align-items: flex-start;
}

.skin-modal-equip-hint {
  font-size: 0.8rem;
  margin: 0;
  width: 100%;
}

.skin-modal-attach-strip {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin: 0.75rem 0;
  background: rgba(88, 166, 255, 0.06);
}

.skin-modal-slot-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.skin-modal-attach summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.skin-sticker-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.skin-sticker-pick {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  text-align: left;
}

.skin-sticker-pick.selected {
  border-color: var(--accent, #58a6ff);
  box-shadow: 0 0 0 1px var(--accent, #58a6ff);
}

.skin-sticker-pick-img {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.skin-sticker-pick-img img {
  max-height: 38px;
  object-fit: contain;
}

.skin-sticker-pick-cap {
  font-size: 0.58rem;
  line-height: 1.15;
  color: var(--muted);
}

.sticker-apply-search {
  width: 100%;
  margin-bottom: 0.5rem;
}

.sticker-apply-skin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.45rem;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 0.75rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.sticker-skin-opt {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-height: 76px;
}

.sticker-skin-opt.selected {
  border-color: var(--accent, #58a6ff);
  box-shadow: 0 0 0 1px var(--accent, #58a6ff);
}

.sticker-skin-opt-img {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

.sticker-skin-opt-img img {
  max-height: 40px;
  object-fit: contain;
}

.sticker-skin-opt-cap {
  font-size: 0.58rem;
  text-align: center;
  line-height: 1.1;
  color: var(--text);
}

.sticker-skin-eq {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.5rem;
  font-weight: 700;
  background: var(--green);
  color: #fff;
  padding: 1px 3px;
  border-radius: 2px;
}

.sticker-apply-lock {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
}


.skin-modal-meta-small {
  font-size: 0.75rem;
  margin-top: 0.35rem;
}

.catalog-preview-warning {
  background: rgba(255, 165, 0, 0.12);
  border: 1px solid rgba(255, 165, 0, 0.35);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

.sticker-slots-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.sticker-slot-card.compact {
  padding: 0.45rem 0.35rem;
  min-width: 0;
}

.sticker-slot-card.compact.picked {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.sticker-slot-card.compact .sticker-slot-preview {
  min-height: 40px;
  font-size: 0.65rem;
}

.sticker-slot-card.compact .sticker-slot-preview img {
  max-height: 32px;
}

.sticker-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.sticker-slot-card {
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sticker-slot-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.sticker-slot-region {
  font-size: 0.68rem;
  line-height: 1.35;
}

.sticker-slot-preview {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  text-align: center;
}

.sticker-slot-preview img {
  max-height: 40px;
  object-fit: contain;
}

.skin-st-kills {
  margin: 0.5rem 0;
}

.btn-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.sticker-apply-hero {
  max-height: 72px;
  object-fit: contain;
  display: block;
  margin: 0.5rem auto;
}

.sticker-apply-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
}

.sticker-apply-select {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
}

.sticker-apply-slots-wrap {
  margin: 0.5rem 0 1rem;
}

.sticker-apply-slots-wrap .sticker-slots-row {
  margin-top: 0.35rem;
}

.sticker-apply-slot-help {
  font-size: 0.8rem;
  margin: 0 0 0.35rem;
}

.sticker-apply-hq-wrap {
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.sticker-apply-hq-status {
  margin: 0;
  font-size: 0.78rem;
}

.sticker-apply-hq-img {
  display: block;
  width: 100%;
  max-width: min(480px, 100%);
  max-height: 200px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d1117;
}

.sticker-apply-hq-img.hidden {
  display: none;
}

.market-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.75rem;
}

.market-balance strong {
  color: var(--gold);
  font-size: 1.15rem;
}

.market-hint {
  margin: 0 0 0.75rem;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.market-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  border-top: 3px solid var(--rarity, var(--border));
  min-height: 100%;
}

.market-card.sold {
  opacity: 0.55;
}

.market-card-img {
  position: relative;
  flex: 0 0 auto;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1c2433 0%, #0d1117 100%);
  padding: 0.45rem 0.5rem;
}

.market-card-img .inv-tile-stickers {
  z-index: 1;
}

.market-card-img .inv-tile-stickers img {
  width: 16px;
  height: 16px;
}

.market-card-img-el {
  display: block;
  max-width: 100%;
  max-height: 76px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.market-no-img {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.market-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.55rem 0.55rem;
}

.market-card-type {
  font-size: 0.68rem;
  text-transform: uppercase;
  margin: 0 0 0.15rem;
  letter-spacing: 0.04em;
}

.market-card-name {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-card-rarity {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rarity, var(--muted));
}

.market-card-wear {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
}

.market-card-price {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
}

.market-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.market-card-actions .case-open-btn,
.market-card-actions .ghost {
  flex: 1 1 auto;
  min-width: 4.5rem;
}

.market-inspect-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.market-card .case-open-btn {
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  width: 100%;
  margin-top: auto;
}

.market-card .case-open-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.market-subtitle {
  margin: 0.5rem 0 0.5rem;
  font-size: 0.95rem;
}

.market-listings {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.market-your-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.45rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Skin DB */
.skin-db-hint {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
}

.skin-db-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.35rem;
}

.skin-db-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.skin-db-filters select,
.skin-db-toolbar input[type="search"] {
  font-size: 0.78rem;
  padding: 0.28rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
}

.skin-db-toolbar input[type="search"] {
  flex: 1 1 10rem;
  min-width: 8rem;
}

.skin-db-status {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
}

.skin-db-table-wrap {
  overflow-x: auto;
  margin-top: 0.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.skin-db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  table-layout: fixed;
}

.skin-db-table col.skin-db-col-rank {
  width: 2.1rem;
}

.skin-db-table col.skin-db-col-item {
  width: 34%;
}

.skin-db-table col.skin-db-col-float {
  width: 8.5rem;
}

.skin-db-table col.skin-db-col-seed {
  width: 2.75rem;
}

.skin-db-table col.skin-db-col-stickers {
  width: 6.5rem;
}

.skin-db-table col.skin-db-col-source {
  width: 4.75rem;
}

.skin-db-table col.skin-db-col-owner {
  width: 9.5rem;
}

.skin-db-table thead th {
  padding: 0.35rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.skin-db-table tbody td {
  padding: 0.28rem 0.4rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.25;
}

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

.skin-db-table tbody tr {
  cursor: pointer;
}

.skin-db-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.skin-db-rank {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.skin-db-item-inner {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding-left: 0.25rem;
}

.skin-db-thumb {
  flex: 0 0 40px;
  width: 40px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 3px;
}

.skin-db-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.skin-db-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.05rem;
}

.skin-db-weapon {
  font-weight: 600;
  font-size: 0.76rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skin-db-skin {
  font-size: 0.68rem;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skin-db-float {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skin-db-float .skin-db-wear-tier {
  font-weight: 600;
  color: var(--text);
  margin-right: 0.2rem;
}

.skin-db-seed {
  font-size: 0.72rem;
  color: var(--muted);
}

.skin-db-stickers-cell {
  vertical-align: middle;
}

.skin-db-stickers {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
}

.skin-db-sticker {
  flex: 0 0 22px;
  width: 22px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.skin-db-sticker img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.skin-db-stickers-empty {
  font-size: 0.72rem;
}

.skin-db-source-cell {
  vertical-align: middle;
}

.skin-db-source-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.12rem 0.32rem;
  border-radius: 3px;
  white-space: nowrap;
}

.skin-db-source-badge[data-via="unbox"] {
  background: rgba(88, 166, 255, 0.18);
  color: #79b8ff;
}

.skin-db-source-badge[data-via="drop"] {
  background: rgba(63, 185, 80, 0.18);
  color: var(--green);
}

.skin-db-source-badge[data-via="tradeup"] {
  background: rgba(210, 153, 34, 0.2);
  color: var(--gold);
}

.skin-db-source-badge[data-via="shop"] {
  background: rgba(163, 113, 247, 0.18);
  color: var(--purple);
}

.skin-db-source-badge[data-via="market"] {
  background: rgba(248, 81, 73, 0.15);
  color: #ff7b72;
}

.skin-db-source-badge[data-via="starter"],
.skin-db-source-badge[data-via="unknown"] {
  background: rgba(139, 148, 158, 0.15);
  color: var(--muted);
}

.skin-db-owner-cell {
  vertical-align: middle;
  padding-right: 0.35rem;
}

.skin-db-owner-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 1.75rem;
  width: 100%;
}

.skin-db-owner-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--muted);
}

.skin-db-inspect-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.18rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 4px;
}

.skin-db-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
}

.skin-db-empty {
  padding: 1rem;
  text-align: center;
}
