:root {
  color-scheme: light;
  --bg: #f5f7f1;
  --surface: #ffffff;
  --surface-2: #eef3ea;
  --surface-3: #f8faf4;
  --ink: #101817;
  --muted: #65736c;
  --line: #d9e1d8;
  --accent: #137a5f;
  --accent-2: #d24c35;
  --gold: #b98122;
  --blue: #2f6f9f;
  --shadow: 0 18px 50px rgba(28, 42, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(245, 247, 241, 0.96), rgba(239, 245, 248, 0.96)),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(16, 24, 23, 0.08);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.main-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.main-nav-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  padding: 0 14px;
  text-decoration: none;
}

.main-nav-link:hover,
.main-nav-link.active {
  border-color: #f0d1aa;
  background: #fff6ec;
  color: #c76417;
}

.rank-nav-link {
  gap: 7px;
}

.rank-nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(199, 100, 23, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, #23170b, #ff9d28);
  color: #fff5d8;
  font-size: 13px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(16, 24, 23, 0.5);
  box-shadow: 0 7px 18px rgba(199, 100, 23, 0.18);
}

.rank-nav-link:hover .rank-nav-icon,
.rank-nav-link.active .rank-nav-icon {
  border-color: rgba(199, 100, 23, 0.55);
  box-shadow: 0 9px 22px rgba(199, 100, 23, 0.28);
}

.anchor-target {
  position: relative;
  top: -90px;
  display: block;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.home-hidden {
  display: none !important;
}

.market-home .balance-pill {
  min-height: 40px;
  padding: 5px 6px;
}

.market-home .balance-pill .balance-actions {
  display: inline-flex;
}

.market-home .balance-pill .balance-action-button:not(.compact-plus) {
  display: none !important;
}

.balance-action-button.compact-plus {
  display: inline-grid;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 8px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.header-search {
  display: block;
  width: clamp(190px, 24vw, 320px);
  min-width: 150px;
}

.header-search input {
  min-height: 40px;
  border-color: #cfdbe8;
  background: #fbfdfd;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.header-search input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(19, 122, 95, 0.16);
}

.auth-cluster {
  display: grid;
  min-width: 0;
  gap: 3px;
  justify-items: end;
}

.steam-safe-note {
  max-width: 220px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: right;
}

.demo-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #f0d1aa;
  border-radius: 8px;
  background: #fff6ec;
  color: #b95810;
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
  text-decoration: none;
}

.demo-button:hover {
  background: #ffead3;
  color: #8d3f08;
}

.language-menu {
  position: relative;
  flex: 0 0 auto;
}

.language-trigger {
  display: inline-flex;
  min-width: 68px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 0 9px;
  font-weight: 900;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.language-trigger:hover,
.language-menu.open .language-trigger,
.language-menu:focus-within .language-trigger {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(26, 42, 36, 0.12);
}

.language-flag {
  font-size: 18px;
  line-height: 1;
}

.language-code {
  font-size: 12px;
  line-height: 1;
}

.language-caret {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 55;
  display: none;
  width: min(230px, calc(100vw - 28px));
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.language-menu.open .language-dropdown,
.language-menu:focus-within .language-dropdown {
  display: grid;
  gap: 3px;
}

.language-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0 9px;
  text-align: left;
}

.language-option:hover,
.language-option.active {
  background: var(--surface-2);
}

.language-option.active {
  color: var(--accent);
}

.language-option span {
  font-size: 18px;
  line-height: 1;
}

.language-option strong,
.language-option small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-option strong {
  font-size: 13px;
  font-weight: 900;
}

.language-option small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.intermediary-note {
  max-width: 260px;
  color: #50615a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: right;
}

.intermediary-disclosure {
  position: relative;
  justify-self: end;
  max-width: 100%;
}

.intermediary-disclosure summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  list-style: none;
  text-align: right;
  text-decoration: underline;
}

.intermediary-disclosure summary::-webkit-details-marker {
  display: none;
}

.intermediary-disclosure summary:hover {
  color: var(--accent-2);
}

.intermediary-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(520px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 130px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 14px;
  text-align: left;
}

.intermediary-popover strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-weight: 900;
}

.intermediary-popover p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.notice-body {
  min-height: 100vh;
}

.notice-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.notice-brand {
  margin-bottom: 18px;
}

.notice-panel {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 28px);
}

.notice-panel h1 {
  max-width: 760px;
  font-size: clamp(28px, 4vw, 44px);
}

.notice-copy {
  display: grid;
  max-height: min(52vh, 560px);
  gap: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 14px;
}

.notice-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.notice-form {
  display: grid;
  gap: 12px;
}

.notice-accept {
  font-size: 14px;
}

.notice-actions {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(180px, 1fr);
  gap: 10px;
}

.icon-button,
.ghost-button,
.danger-button,
.steam-button,
.wide-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  font-weight: 900;
}

.create-button {
  border-color: #11654f;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.message-button,
.cart-button {
  position: relative;
  border-color: #cfdbe8;
  background: #f7fbff;
  color: var(--blue);
}

.cart-button.active {
  border-color: var(--accent);
  background: #f0fbf6;
  color: var(--accent);
}

.message-badge,
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.steam-button,
.ghost-button,
.danger-button,
.wide-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 800;
}

.steam-button,
.wide-button {
  border-color: #11654f;
  background: var(--accent);
  color: white;
}

.danger-button {
  border-color: #efd0cb;
  background: #fff7f5;
  color: var(--danger);
}

.ghost-button:hover,
.danger-button:hover,
.icon-button:hover,
.steam-button:hover,
.wide-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(26, 42, 36, 0.12);
}

.wide-button {
  width: 100%;
}

.balance-pill {
  display: flex;
  min-width: 168px;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7e7df;
  border-radius: 8px;
  background: #f3fbf7;
  color: #264d40;
  padding: 5px 6px 5px 10px;
}

.billing-pill {
  min-width: 120px;
}

.market-home .billing-pill {
  width: 120px;
}

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

.balance-copy span,
.balance-copy strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.balance-copy strong {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.balance-actions {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
}

.balance-action-button {
  display: inline-flex;
  min-width: 42px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8decf;
  border-radius: 7px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  padding: 0 8px;
}

.balance-action-button.secondary {
  background: #eaf4ff;
  border-color: #c7dff5;
  color: #23628f;
}

.balance-action-button:hover {
  border-color: var(--accent);
  background: #e9f8f1;
}

.profile-menu {
  position: relative;
  flex: 0 0 auto;
}

.profile-trigger {
  display: inline-flex;
  max-width: 190px;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 4px 10px 4px 5px;
  font-weight: 900;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.profile-trigger:hover,
.profile-menu.open .profile-trigger,
.profile-menu:focus-within .profile-trigger {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(26, 42, 36, 0.12);
}

.profile-trigger-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

#headerProfileName {
  min-width: 0;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trigger-caret {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  display: none;
  width: min(240px, calc(100vw - 28px));
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-menu.open .profile-dropdown,
.profile-menu:focus-within .profile-dropdown {
  display: block;
}

.profile-dropdown-head {
  min-width: 0;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
}

.profile-dropdown-head strong,
.profile-dropdown-head small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-menu-item {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  margin-top: 6px;
  padding: 0 10px;
  font-weight: 900;
  text-align: left;
}

.profile-menu-item + .profile-menu-item {
  margin-top: 2px;
}

.profile-menu-item:hover {
  background: var(--surface-2);
}

.profile-menu-item.danger {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  color: var(--accent-2);
}

.profile-inventory-preview {
  display: grid;
  gap: 8px;
  margin: 8px 0;
  border: 1px solid #d8e5dc;
  border-radius: 8px;
  background: #f5fbf7;
  padding: 10px;
}

.profile-inventory-preview small,
.profile-inventory-preview span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-inventory-preview small {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-inventory-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.profile-inventory-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.profile-inventory-strip img {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
  padding: 3px;
}

.profile-menu-mini-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-weight: 900;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 32px) 24px;
}

.market-home .app-shell {
  grid-template-columns: minmax(0, 1fr);
  width: min(1380px, 100%);
}

.market-home .market-panel {
  min-height: calc(100vh - 110px);
}

.market-panel,
.user-panel,
.creator-panel,
.safety-panel,
.pricing-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.market-panel {
  min-width: 0;
  padding: clamp(16px, 2.3vw, 28px);
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 24px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 32px) 36px;
}

.footer-brand,
.footer-links {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: 16px;
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-brand p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.footer-links div {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links h2 {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.footer-links span,
.footer-link,
.footer-link-button {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.footer-link,
.footer-link-button {
  cursor: pointer;
}

.footer-link:hover,
.footer-link-button:hover {
  color: var(--accent);
}

.user-panel,
.creator-panel,
.safety-panel,
.pricing-panel {
  padding: 16px;
}

.market-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.fee-pill {
  display: grid;
  min-width: 150px;
  gap: 2px;
  padding: 12px;
  border: 1px solid #e3d0a5;
  border-radius: 8px;
  background: #fff7e7;
}

.fee-pill span {
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
}

.fee-pill small {
  color: #665a3a;
}

.security-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #f0d4c8;
  border-radius: 8px;
  background: #fff7f3;
  color: #6a4135;
  font-size: 13px;
  line-height: 1.4;
}

.security-alert strong {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-weight: 900;
}

.market-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-tile {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.stat-tile strong,
.stat-tile span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-tile strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.stat-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recent-listings-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 520px);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #d7e7df;
  border-radius: 8px;
  background: #f4fbf7;
}

.recent-listings-panel strong,
.recent-listings-panel span {
  display: block;
}

.recent-listings-panel strong {
  color: var(--ink);
  font-weight: 900;
}

.recent-listings-panel span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recent-time-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.recent-time-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.recent-time-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.urgent-listings-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #ecd5a9;
  border-radius: 8px;
  background: #fff8ec;
}

.urgent-listings-panel .section-head {
  margin-bottom: 0;
}

#urgentListingsCount {
  align-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: #8a5d1a;
  font-size: 12px;
  font-weight: 900;
}

.urgent-listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.urgent-listing-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 76px;
  border: 1px solid #e5c88e;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.urgent-listing-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(120, 83, 19, 0.12);
}

.urgent-listing-card img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #efe6d1;
}

.urgent-listing-card span,
.urgent-listing-card strong,
.urgent-listing-card small,
.urgent-listing-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urgent-listing-card span {
  display: grid;
  gap: 2px;
}

.urgent-listing-card strong {
  font-weight: 900;
}

.urgent-listing-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.urgent-listing-card em {
  grid-column: 1 / -1;
  color: #8a5d1a;
  font-style: normal;
  font-weight: 900;
}

.game-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.game-tab {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: var(--surface-2);
  color: white;
  cursor: pointer;
  text-align: left;
}

.game-tab img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) brightness(0.64);
  transform: scale(1.02);
}

.game-tab span {
  position: relative;
  display: grid;
  height: 100%;
  align-content: end;
  gap: 2px;
  padding: 12px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.56);
}

.game-tab strong,
.game-tab small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-tab strong {
  font-weight: 900;
}

.game-tab small {
  font-size: 12px;
  font-weight: 700;
}

.game-tab.active {
  outline: 3px solid rgba(19, 122, 95, 0.24);
  border-color: var(--accent);
}

.filters {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(140px, 180px) minmax(140px, 180px) minmax(220px, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.advanced-filters {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d7e7df;
  border-radius: 8px;
  background: #f3fbf7;
}

.advanced-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quick-game-filters,
.filter-scope {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.filter-scope {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 240px);
  align-items: center;
}

.filter-scope p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quick-game,
.favorite-toggle,
.check-row,
.responsibility-check {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.quick-game.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.favorite-toggle,
.check-row,
.responsibility-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.favorite-toggle input,
.check-row input,
.responsibility-check input {
  width: auto;
  min-height: 0;
}

.responsibility-check {
  align-items: flex-start;
  padding: 10px 12px;
  color: #4b5c55;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.responsibility-check input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.label-with-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-with-badge small {
  padding: 2px 6px;
  border-radius: 999px;
  background: #d9432f;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.advanced-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

.live-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #d7e7df;
  border-radius: 8px;
  background: #f3fbf7;
  color: #264d40;
}

.live-strip strong {
  flex: 0 0 auto;
  color: var(--accent);
}

.ticker-window {
  min-width: 0;
  overflow: hidden;
}

#liveTicker {
  width: max-content;
  min-width: 100%;
  white-space: nowrap;
  animation: ticker-slide 18s linear infinite;
}

@keyframes ticker-slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-35%);
  }
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.listing-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.listing-card.urgent-listing {
  border-color: #e3c078;
  box-shadow: inset 0 0 0 1px rgba(181, 121, 23, 0.12);
}

.listing-media {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  min-height: 140px;
  place-items: center;
  background: #e7ece3;
}

.urgent-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  max-width: calc(100% - 62px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 999px;
  background: #b77a17;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.listing-media img {
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(16, 24, 23, 0.22));
}

.favorite-button {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(16, 24, 23, 0.72);
  color: white;
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(16, 24, 23, 0.22);
}

.listing-media-badge {
  position: absolute;
  top: 10px;
  right: 48px;
  z-index: 3;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: rgba(16, 24, 23, 0.72);
  box-shadow: 0 8px 20px rgba(16, 24, 23, 0.22);
}

.listing-media-badge .trade-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.42));
}

.favorite-button:hover,
.favorite-button.active {
  background: #fff7e7;
  border-color: #e3d0a5;
  color: var(--gold);
}

.listing-body {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 12px;
}

.listing-title {
  display: -webkit-box;
  min-height: 44px;
  margin-bottom: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  font-weight: 900;
}

.detail-link {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.detail-link:hover {
  color: var(--accent);
}

.meta-row,
.price-row,
.item-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.item-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.item-meta span,
.meta-row span,
.price-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #3d4d43;
  font-size: 12px;
  font-weight: 900;
}

.type-trade {
  background: #eef3ff;
  color: var(--blue);
}

.type-sale {
  background: #eef8f3;
  color: var(--accent);
}

.type-auction {
  background: #fff7e7;
  color: var(--gold);
}

.price {
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.listing-actions,
.listing-owner-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.listing-actions {
  grid-template-columns: 1fr;
}

.seller {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.seller span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller img,
.avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

.seller-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.market-product-card .seller-trust {
  display: none;
}

.seller-trust span {
  min-width: 0;
  overflow: hidden;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-3);
  color: #405047;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-trust .seller-trade-badge {
  grid-column: 1 / -1;
  border-color: rgba(255, 138, 36, 0.42);
  background: rgba(255, 138, 36, 0.12);
  color: #ffbd78;
}

.seller-trade-badge,
.account-trade-badge {
  position: relative;
  isolation: isolate;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border-color: rgba(148, 163, 184, 0.45) !important;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.2), rgba(15, 23, 42, 0.08)) !important;
  color: #475569 !important;
  padding: 6px 8px !important;
  white-space: normal !important;
}

.trade-badge-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 7px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.32));
}

.trade-badge-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  overflow: hidden;
}

.trade-badge-copy strong,
.trade-badge-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-badge-copy strong {
  color: inherit;
  font-size: 11px;
  font-weight: 1000;
}

.trade-badge-copy small {
  color: inherit;
  font-size: 9px;
  font-weight: 900;
  opacity: 0.82;
}

.account-trade-badge {
  min-height: 52px;
  border-radius: 999px !important;
  padding-right: 12px !important;
}

.account-trade-badge .trade-badge-icon {
  width: 44px;
  height: 44px;
}

.trade-badge-rookie {
  border-color: rgba(107, 114, 128, 0.5) !important;
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.95), rgba(156, 163, 175, 0.18)) !important;
  color: #374151 !important;
}

.trade-badge-bronze {
  border-color: rgba(180, 103, 45, 0.58) !important;
  background: linear-gradient(135deg, rgba(252, 211, 177, 0.9), rgba(146, 64, 14, 0.16)) !important;
  color: #8a3f12 !important;
}

.trade-badge-silver {
  border-color: rgba(148, 163, 184, 0.72) !important;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(148, 163, 184, 0.26)) !important;
  color: #334155 !important;
}

.trade-badge-gold {
  border-color: rgba(245, 158, 11, 0.72) !important;
  background: linear-gradient(135deg, rgba(255, 247, 189, 0.95), rgba(245, 158, 11, 0.28)) !important;
  color: #92400e !important;
}

.trade-badge-elite {
  border-color: rgba(168, 85, 247, 0.65) !important;
  background: linear-gradient(135deg, rgba(243, 232, 255, 0.94), rgba(126, 34, 206, 0.22)) !important;
  color: #6b21a8 !important;
}

.trade-badge-master {
  border-color: rgba(239, 68, 68, 0.62) !important;
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.96), rgba(185, 28, 28, 0.22)) !important;
  color: #991b1b !important;
}

.trade-badge-legend {
  border-color: rgba(251, 191, 36, 0.95) !important;
  background:
    linear-gradient(120deg, transparent 0 30%, rgba(255, 255, 255, 0.55) 45%, transparent 60%),
    linear-gradient(135deg, rgba(255, 237, 146, 0.98), rgba(234, 88, 12, 0.25)) !important;
  background-size: 220% 100%, 100% 100% !important;
  color: #78350f !important;
  animation: legendBadgeShine 3.4s ease-in-out infinite;
}

.seller-trade-badge.frozen,
.account-trade-badge.frozen {
  filter: grayscale(0.35);
  opacity: 0.78;
}

.seller-trade-badge.manual,
.account-trade-badge.manual {
  box-shadow: inset 0 0 0 1px rgba(17, 133, 98, 0.2);
}

.seller-trust-warning {
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: #fff2ee !important;
  color: #a33a2d !important;
}

@keyframes legendBadgeShine {
  0%,
  62%,
  100% {
    background-position: 140% 0, 0 0;
  }
  28% {
    background-position: -40% 0, 0 0;
  }
}

.how-it-works,
.faq-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.workflow-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.workflow-grid article,
.faq-grid details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 12px;
}

.workflow-grid strong,
.faq-grid summary {
  color: var(--ink);
  font-weight: 900;
}

.workflow-grid p,
.faq-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.profile-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.profile-row .avatar {
  width: 48px;
  height: 48px;
}

.profile-row strong,
.profile-row p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.placeholder {
  border: 1px dashed #b8c4ba;
}

.form-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.inventory-list {
  display: grid;
  max-height: 360px;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.inventory-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
  text-align: left;
}

.inventory-item.static {
  cursor: default;
}

.account-inventory-list .inventory-item.static {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.inventory-list-button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.inventory-item.selected {
  border-color: var(--accent);
  background: #f1faf5;
  box-shadow: inset 0 0 0 2px rgba(19, 122, 95, 0.14);
}

.inventory-item img {
  width: 54px;
  height: 48px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--surface-2);
}

.inventory-item strong,
.inventory-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-item small {
  color: var(--muted);
}

.listing-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.selected-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.selected-item img {
  width: 56px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}

.selected-item strong,
.selected-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-item small {
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: 8px;
  background: var(--surface-2);
}

.segment {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.segment.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 6px 16px rgba(25, 37, 30, 0.08);
}

.fee-preview {
  min-height: 36px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eefaf4;
  color: #156047;
  font-weight: 900;
}

.pricing-alert,
.beta-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid #b8decf;
  border-radius: 8px;
  background: #edf9f3;
  color: #174f3d;
  padding: 12px 14px;
}

.beta-alert {
  border-color: #f0d2a1;
  background: #fff7e7;
  color: #5e3e11;
}

.pricing-alert strong {
  flex: 0 0 auto;
  color: var(--accent);
}

.pricing-alert span,
.beta-alert span {
  min-width: 0;
  font-weight: 800;
  line-height: 1.45;
}

.beta-alert strong {
  flex: 0 0 auto;
  color: #aa7118;
}

.listing-plan-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.plan-status {
  display: grid;
  gap: 8px;
  border: 1px solid #cfe2d8;
  border-radius: 8px;
  background: #f4fbf7;
  padding: 12px;
}

.plan-status strong,
.plan-status small {
  display: block;
}

.plan-status small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.billing-notice {
  display: grid;
  gap: 6px;
  border: 1px solid #f0d2a1;
  border-radius: 8px;
  background: #fffaf0;
  color: #503812;
  padding: 10px;
}

.billing-notice strong,
.billing-notice span {
  display: block;
  line-height: 1.35;
}

.billing-notice strong {
  color: #9a6414;
  font-size: 13px;
  font-weight: 900;
}

.billing-notice span {
  font-size: 12px;
  font-weight: 800;
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.policy-links a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.entitlement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.entitlement-grid span {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.entitlement-grid strong,
.entitlement-grid small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.entitlement-grid strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
}

.entitlement-grid small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.pricing-grid {
  display: grid;
  gap: 8px;
}

.pricing-section {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pricing-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.pricing-grid.inner {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.free-option-card {
  padding: 12px;
  border: 1px solid #d7e7df;
  border-radius: 8px;
  background: #f4fbf7;
}

.free-option-grid,
.rights-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.free-option-grid span,
.rights-choice-grid span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.pricing-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 12px;
}

.pricing-card.featured {
  border-color: var(--accent);
  background: #f1fbf7;
}

.pricing-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pricing-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.pricing-price {
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.pricing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.pricing-card-audience {
  color: var(--ink);
}

.pricing-card .pricing-card-note {
  color: #8a5d1a;
}

.pricing-feature-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.pricing-card button {
  min-height: 38px;
}

.rights-choice-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #e7c58c;
  border-radius: 8px;
  background: #fff8ec;
  padding: 12px;
}

.rights-choice-panel p {
  margin: 0;
  color: #704a12;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.account-entitlement {
  display: grid;
  gap: 8px;
  margin-top: -4px;
}

.billing-list {
  gap: 10px;
}

.billing-status-card,
.receipt-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 12px;
}

.admin-summary-grid,
.admin-row-meta,
.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.admin-section h3 {
  margin: 0;
  font-size: 18px;
}

.admin-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 12px;
}

.admin-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-row p.seller-trade-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-admin-actions {
  align-items: center;
}

.badge-admin-actions select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
  font-weight: 900;
}

.balance-topup-panel {
  max-width: 460px;
}

.balance-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.balance-mode-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.balance-mode-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.balance-topup-form {
  display: grid;
  gap: 12px;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 520px) {
  .quick-amounts,
  .payment-method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.quick-amounts button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.quick-amounts button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.payment-method-picker {
  display: grid;
  gap: 8px;
}

.payment-method-picker > span {
  color: var(--muted);
  font-weight: 900;
}

.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.payment-method-card {
  display: grid;
  min-height: 74px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  text-align: center;
}

.payment-method-card:has(.payment-method-radio:checked),
.payment-method-card:hover {
  border-color: var(--accent);
  background: #effaf5;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.payment-method-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.payment-method-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.payment-brand {
  display: inline-flex;
  min-width: 46px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.payment-brand.visa {
  background: #1a4aa4;
}

.payment-brand.mastercard {
  background: linear-gradient(90deg, #e6422e 0 50%, #f6a21a 50% 100%);
}

.payment-brand.coin {
  background: #b77a17;
}

.payment-brand.paypal {
  background: #0b69b7;
}

.billing-status-card.warning {
  border-color: #f0d2a1;
  background: #fffaf0;
}

.receipt-card strong,
.receipt-card small,
.billing-status-card strong,
.billing-status-card span {
  overflow-wrap: anywhere;
}

.receipt-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.receipt-meta span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  font-size: 12px;
  font-weight: 800;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.safety-grid span {
  min-height: 40px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: #405047;
  font-size: 13px;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 36px));
  transform: translateY(20px);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 24, 20, 0.48);
}

.modal.hidden:target {
  display: grid !important;
}

.modal-panel {
  display: grid;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  gap: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.offer-list {
  max-height: 300px;
}

.account-panel {
  width: min(640px, 100%);
}

body.account-page {
  min-height: 100vh;
  background: var(--background);
}

body.account-page .app-shell,
body.account-page .site-footer {
  display: none;
}

body.account-page #accountModal {
  position: static;
  inset: auto;
  z-index: auto;
  display: block;
  min-height: calc(100vh - 88px);
  padding: 24px;
  background: transparent;
}

body.account-page #accountModal.hidden {
  display: block !important;
}

body.account-page #accountModal .account-panel {
  width: min(1080px, 100%);
  max-height: none;
  margin: 0 auto;
  overflow: visible;
  border-color: rgba(16, 24, 23, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 249, 0.98)),
    var(--surface);
  box-shadow: 0 24px 80px rgba(23, 36, 31, 0.12);
}

body.account-page #closeAccountModalButton {
  display: none;
}

body.account-page #accountModal .section-head.compact:first-child {
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

body.account-page #accountModal .section-head.compact:first-child h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

body.account-page #accountModal .section-head.compact:first-child .eyebrow {
  color: #d24c35;
}

body.account-page #accountModal .account-section {
  min-height: 320px;
}

.listing-modal-panel {
  width: min(680px, 100%);
}

.steam-consent-panel {
  width: min(520px, 100%);
}

.steam-consent-form {
  display: grid;
  gap: 12px;
}

.consent-lead {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.consent-error {
  min-height: 40px;
  border: 1px solid #f1b2a6;
  border-radius: 8px;
  background: #fff2ee;
  color: #a33a2d;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
}

.inline-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.messages-panel {
  width: min(920px, 100%);
}

.report-panel {
  width: min(620px, 100%);
}

.cart-panel {
  width: min(720px, 100%);
}

.cart-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #cfe2d8;
  border-radius: 8px;
  background: #f4fbf7;
  color: #174f3d;
  padding: 12px;
}

.cart-summary strong {
  font-size: 18px;
}

.cart-summary span {
  color: var(--muted);
  font-weight: 900;
}

.cart-list {
  display: grid;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) minmax(150px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 10px;
}

.cart-item img {
  width: 78px;
  height: 62px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--surface-2);
}

.cart-item-title {
  display: block;
  width: 100%;
  margin: 0 0 5px;
  text-align: left;
}

.cart-item small,
.cart-item strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cart-item small {
  color: var(--muted);
  font-weight: 800;
}

.cart-item strong {
  margin-top: 5px;
  color: var(--accent);
}

.cart-item-actions {
  display: grid;
  gap: 8px;
}

.report-form {
  display: grid;
  gap: 12px;
}

.report-form textarea {
  min-height: 120px;
}

.report-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.report-screenshot-preview {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 8px;
}

.report-screenshot-preview img {
  width: 92px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
}

.report-screenshot-preview span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-detail-button {
  justify-self: start;
  min-height: 38px;
  padding: 0 12px;
}

.messages-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 12px;
  min-height: 500px;
}

.message-sidebar,
.message-main {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
}

.message-sidebar {
  border-right: 1px solid var(--line);
  padding-right: 12px;
}

.message-thread-list {
  display: grid;
  max-height: 430px;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.message-thread {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.message-thread.active {
  border-color: var(--accent);
  background: #f1faf5;
}

.message-thread img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

.message-thread strong,
.message-thread small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.message-thread-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.message-thread-title strong {
  flex: 1 1 auto;
}

.message-thread-badge {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: rgba(16, 24, 23, 0.08);
}

.message-thread-badge .trade-badge-icon {
  width: 23px;
  height: 23px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(16, 24, 23, 0.18));
}

.message-thread small {
  color: var(--muted);
  font-size: 12px;
}

.message-thread em {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.message-thread-head {
  display: grid;
  min-height: 48px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 10px 12px;
  font-weight: 900;
}

.message-thread-head strong,
.message-thread-head small {
  display: block;
}

.message-thread-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-conversation {
  display: flex;
  min-height: 310px;
  max-height: 360px;
  flex-direction: column;
  gap: 9px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
  padding: 10px;
}

.message-bubble {
  max-width: min(78%, 420px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.message-bubble.own {
  align-self: flex-end;
  border-color: #b9dbc9;
  background: #ecf8f2;
}

.message-bubble strong,
.message-bubble small,
.message-bubble time {
  display: block;
}

.message-bubble small,
.message-bubble time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.message-bubble p {
  margin: 6px 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
  gap: 10px;
}

.message-form textarea {
  min-height: 54px;
}

.manual-listing-form {
  display: grid;
  gap: 12px;
}

.listing-wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.listing-wizard-steps span,
.inventory-source-hint,
.boost-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.listing-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.listing-source-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 12px;
}

.listing-source-card:has(input:checked) {
  border-color: var(--accent);
  background: #effaf5;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.listing-source-card strong,
.listing-source-card small {
  grid-column: 2;
  min-width: 0;
}

.listing-source-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.inventory-source-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-color: #cfe2d8;
  background: #f4fbf7;
}

.inventory-source-hint.is-manual {
  border-color: #f0d2a1;
  background: #fffaf0;
}

.game-specific-panel,
.listing-preview-panel,
.listing-boost-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.game-specific-grid,
.boost-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-tile,
.boost-option-grid label {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 9px 10px;
  font-weight: 900;
}

.listing-preview-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.listing-preview-card img {
  width: 86px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  object-fit: contain;
  padding: 6px;
}

.listing-preview-card strong,
.listing-preview-card small,
.listing-preview-card span,
.listing-preview-card em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.listing-preview-card small,
.listing-preview-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.listing-preview-card span {
  color: var(--accent);
  font-weight: 900;
}

.form-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-profile {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.account-profile .avatar {
  width: 56px;
  height: 56px;
}

.account-profile strong,
.account-profile p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-profile p {
  margin: 4px 0 0;
  color: var(--muted);
}

.account-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.account-profile-badges span,
.account-profile small {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid #cfe3da;
  border-radius: 999px;
  background: #f4fbf7;
  color: #0d7358;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

body.account-page .account-profile {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  border-color: #d9e5de;
  background:
    radial-gradient(circle at 16% 24%, rgba(19, 122, 95, 0.18), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(255, 128, 24, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(17, 133, 98, 0.1), rgba(255, 128, 24, 0.08)),
    #fff;
  padding: 22px;
  box-shadow: 0 18px 46px rgba(25, 37, 30, 0.08);
}

body.account-page .account-profile .avatar {
  width: 92px;
  height: 92px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(16, 24, 23, 0.18);
}

body.account-page .account-profile strong {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1;
}

.account-profile-main {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.account-profile-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.account-profile-rank-link {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid #f0d1aa;
  border-radius: 999px;
  background: #fff6ec;
  color: #b95810;
  font-size: 12px;
  font-weight: 1000;
  padding: 0 12px;
  text-decoration: none;
}

.account-profile-rank-link:hover {
  background: #ffead3;
  color: #8d3f08;
}

.account-profile-progress {
  display: grid;
  gap: 6px;
  max-width: 520px;
}

.account-profile-progress > span {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #137a5f 0 34%, #ff8a1c 34% 54%, rgba(16, 24, 23, 0.12) 54% 100%);
}

.account-profile-progress small {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 12px;
  line-height: 1.25;
}

.account-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 22px;
  padding: 7px;
  border: 1px solid rgba(16, 24, 23, 0.06);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(238, 243, 234, 0.95), rgba(248, 250, 244, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.account-tab {
  min-height: 42px;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-tab.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 10px 22px rgba(25, 37, 30, 0.1);
}

.account-dashboard {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid #d7e7df;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(245, 251, 248, 0.98), rgba(250, 253, 249, 0.98));
  padding: 18px;
}

.account-dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.account-dashboard-head strong,
.account-dashboard-head small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-dashboard-head strong {
  color: var(--ink);
  font-size: 18px;
}

.account-dashboard-head small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.account-dashboard-action {
  min-height: 38px;
  white-space: nowrap;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.account-summary-grid span {
  display: grid;
  align-content: center;
  min-height: 80px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
}

.account-summary-grid span,
.account-detail-rights .entitlement-grid span {
  border-color: #d7e7df;
  background:
    linear-gradient(180deg, #fff, #fbfdf9);
  box-shadow: 0 8px 22px rgba(25, 37, 30, 0.05);
}

.account-summary-grid strong,
.account-summary-grid small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-summary-grid strong {
  color: #074737;
  font-size: clamp(18px, 2.5vw, 23px);
}

.account-summary-grid small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-summary-grid strong {
  color: #063f33;
  font-size: 20px;
}

.account-summary-grid small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.account-detail-rights {
  border: 1px solid #d7e7df;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0;
}

.account-detail-rights summary {
  cursor: pointer;
  list-style-position: inside;
  padding: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.account-detail-rights .entitlement-grid {
  padding: 0 12px 12px;
}

body.account-page .account-tabs {
  position: sticky;
  top: 76px;
  z-index: 5;
  box-shadow: 0 10px 24px rgba(25, 37, 30, 0.08);
}

.account-section {
  margin-top: 16px;
}

.account-inventory {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.account-inventory-list {
  max-height: 420px;
}

body.account-page .account-inventory-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: none;
  gap: 12px;
  overflow: visible;
  padding-right: 0;
}

.account-inventory-list .inventory-item.static.account-inventory-card {
  position: relative;
  grid-template-columns: 1fr;
  align-content: start;
  min-height: 280px;
  gap: 10px;
  border-color: #d7e7df;
  background: #fff;
  padding: 12px;
}

.account-inventory-card .account-inventory-media {
  display: grid;
  min-height: 124px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 128, 24, 0.12), transparent 45%),
    var(--surface-2);
}

.account-inventory-card .account-inventory-media img,
.account-inventory-card > img {
  width: 100%;
  height: 116px;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.account-inventory-copy {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.account-inventory-game {
  width: fit-content;
  border-radius: 999px;
  background: #fff1df;
  color: #b45d08;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
}

.account-inventory-card strong {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.account-inventory-meta,
.account-inventory-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-inventory-meta span,
.account-inventory-flags span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-inventory-flags span {
  border-color: #cfe3da;
  background: #f4fbf7;
  color: #0d7358;
}

.account-inventory-card .inventory-list-button {
  width: 100%;
  margin-top: auto;
}

.account-list {
  display: grid;
  max-height: 420px;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.account-status-group {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.account-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-status-head span {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.secure-payment-notice,
.secure-payment-admin,
.secure-transaction-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.secure-payment-notice {
  display: grid;
  gap: 7px;
  border-color: #f0d2a1;
  background: #fffaf0;
  color: #503812;
}

.secure-payment-notice strong,
.secure-payment-notice span {
  display: block;
  line-height: 1.35;
}

.secure-payment-notice span {
  font-size: 12px;
  font-weight: 800;
}

.secure-payment-admin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.secure-transaction-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.secure-transaction-card > img {
  width: 72px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  object-fit: contain;
  padding: 6px;
}

.secure-transaction-body {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.secure-transaction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.secure-transaction-grid span {
  min-width: 0;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-3);
  padding: 7px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.secure-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.secure-payment-actions select {
  min-height: 38px;
  flex: 1 1 180px;
}

.account-list-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-list-item img {
  width: 58px;
  height: 52px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--surface-2);
}

.account-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.account-item-actions .ghost-button,
.account-item-actions .danger-button {
  min-height: 34px;
  padding: 0 10px;
}

.account-list-item strong,
.account-list-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-list-item small {
  color: var(--muted);
}

.settings-panel {
  width: min(520px, 100%);
}

.contact-panel {
  width: min(460px, 100%);
}

.item-detail-panel {
  width: min(820px, 100%);
}

.item-detail-layout {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 14px;
}

.item-detail-media {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.item-detail-media img {
  width: calc(100% - 24px);
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(16, 24, 23, 0.2));
}

.item-detail-main {
  display: grid;
  align-content: start;
  gap: 12px;
}

.detail-price {
  color: var(--accent);
  font-size: 26px;
  font-weight: 900;
}

.detail-facts,
.price-history,
.similar-listings {
  display: grid;
  gap: 8px;
}

.detail-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-facts span,
.price-history span {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.price-history strong {
  display: block;
  color: var(--ink);
}

.detail-section {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0;
}

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

.similar-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.similar-item img {
  width: 54px;
  height: 48px;
  object-fit: contain;
}

.similar-item strong,
.similar-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.similar-item small {
  color: var(--muted);
}

.legal-panel {
  width: min(720px, 100%);
}

.contact-copy {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.contact-copy strong {
  color: var(--ink);
  font-size: 17px;
}

.contact-copy p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.support-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.support-form textarea {
  min-height: 150px;
  resize: vertical;
}

.support-mail-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.legal-copy {
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.legal-copy h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 16px;
}

.legal-copy p,
.legal-copy ul {
  margin: 0;
}

.legal-copy ul {
  display: grid;
  gap: 6px;
  padding-left: 20px;
}

.legal-copy li {
  padding-left: 2px;
}

.legal-page-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 44px) 44px;
}

.legal-document {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 30px);
}

.legal-document header {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.legal-document h1 {
  max-width: none;
  font-size: clamp(28px, 4vw, 42px);
}

.legal-document h2 {
  margin-top: 10px;
  font-size: 20px;
}

.legal-document p,
.legal-document li {
  color: var(--muted);
  line-height: 1.6;
}

.legal-document ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.rank-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 122, 24, 0.2), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(117, 67, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #070a0f 0%, #111722 54%, #080a0d 100%);
  color: #f7fafc;
}

.rank-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 11, 16, 0.82);
  backdrop-filter: blur(18px);
}

.rank-brand {
  color: #fff;
}

.rank-brand small {
  color: #9fa8b7;
}

.rank-page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.rank-page-nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #d9e0ea;
  font-size: 13px;
  font-weight: 900;
  padding: 0 13px;
  text-decoration: none;
}

.rank-page-nav a:hover,
.rank-page-nav a.active {
  border-color: rgba(255, 122, 24, 0.55);
  background: rgba(255, 122, 24, 0.16);
  color: #ffad55;
}

.rank-shell {
  display: grid;
  width: min(1180px, calc(100% - 32px));
  gap: 22px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 54px) 0 56px;
}

.rank-hero,
.rank-info-grid > article,
.rank-preview,
.rank-warning,
.rank-final-cta {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(20, 25, 34, 0.92), rgba(9, 12, 18, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.rank-hero {
  display: grid;
  gap: 14px;
  min-height: 320px;
  align-content: end;
  padding: clamp(24px, 5vw, 58px);
  overflow: hidden;
  position: relative;
}

.rank-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -38% 48%;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 171, 65, 0.36), transparent 66%);
  pointer-events: none;
}

.rank-kicker {
  margin: 0;
  color: #ff8a1c;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rank-hero h1,
.rank-final-cta h2,
.rank-preview h2,
.rank-info-grid h2 {
  margin: 0;
  color: #fff;
}

.rank-hero h1 {
  max-width: 760px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.96;
}

.rank-hero p:not(.rank-kicker),
.rank-final-cta p,
.rank-preview p,
.rank-info-grid p,
.rank-warning p,
.rank-card p,
.rank-info-grid li {
  color: #aeb7c5;
  line-height: 1.58;
}

.rank-hero p:not(.rank-kicker) {
  max-width: 620px;
  margin: 0;
  font-size: clamp(16px, 2vw, 20px);
}

.rank-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.rank-primary-action,
.rank-secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 1000;
  padding: 0 18px;
  text-decoration: none;
}

.rank-primary-action {
  border: 1px solid #ff8a1c;
  background: #ff7a18;
  color: #101817;
}

.rank-secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #f7fafc;
}

.rank-user-progress {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 0.7fr);
  align-items: center;
  gap: 14px;
  width: min(900px, 100%);
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 138, 28, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 138, 28, 0.13), rgba(12, 18, 28, 0.86));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.rank-user-badge {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-user-badge img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.rank-user-progress-copy {
  min-width: 0;
}

.rank-user-progress-copy span,
.rank-user-next span {
  display: block;
  color: #ffb86b;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.rank-user-progress-copy strong,
.rank-user-next strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: clamp(18px, 2.2vw, 24px);
}

.rank-user-progress-copy p,
.rank-user-next p {
  margin: 4px 0 0;
  color: #cbd5e1;
  line-height: 1.45;
}

.rank-user-progress-bar {
  height: 9px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.rank-user-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7a18, #ffd166);
}

.rank-user-next {
  min-height: 84px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.42);
}

.rank-mini-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 138, 28, 0.42);
  border-radius: 8px;
  padding: 0 14px;
  color: #ffb86b;
  font-weight: 1000;
  text-decoration: none;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rank-card {
  display: grid;
  min-height: 360px;
  align-content: start;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    #121821;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.rank-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 8%, var(--rank-glow, rgba(255, 122, 24, 0.22)), transparent 42%);
  pointer-events: none;
}

.rank-card > * {
  position: relative;
  z-index: 1;
}

.rank-card img {
  width: min(168px, 60%);
  aspect-ratio: 1;
  justify-self: center;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.45));
}

.rank-card span {
  color: #ffb46a;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.rank-card h2 {
  margin: 0;
  color: #fff;
  font-size: 23px;
}

.rank-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.rank-card dl div {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  padding: 9px;
}

.rank-card dt {
  color: #8e98a8;
  font-size: 11px;
  font-weight: 900;
}

.rank-card dd {
  margin: 3px 0 0;
  color: #fff;
  font-size: 18px;
  font-weight: 1000;
}

.rank-card p {
  margin: 0;
  font-size: 14px;
}

.rank-rookie { --rank-glow: rgba(148, 163, 184, 0.22); }
.rank-bronze { --rank-glow: rgba(205, 127, 50, 0.26); }
.rank-silver { --rank-glow: rgba(226, 232, 240, 0.24); }
.rank-gold { --rank-glow: rgba(250, 204, 21, 0.28); }
.rank-elite { --rank-glow: rgba(168, 85, 247, 0.3); }
.rank-master { --rank-glow: rgba(239, 68, 68, 0.3); }
.rank-legend {
  grid-column: span 3;
  min-height: 320px;
  grid-template-columns: minmax(170px, 0.34fr) minmax(0, 1fr);
  align-items: center;
  --rank-glow: rgba(255, 196, 66, 0.38);
}

.rank-legend img {
  width: min(260px, 100%);
}

.rank-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-info-grid > article,
.rank-preview,
.rank-warning,
.rank-final-cta {
  display: grid;
  gap: 12px;
  padding: clamp(18px, 3vw, 28px);
}

.rank-info-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.rank-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rank-preview-list span {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #ecf2f8;
  font-weight: 900;
  padding: 12px;
}

.rank-warning {
  border-color: rgba(255, 122, 24, 0.34);
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.13), rgba(18, 24, 33, 0.92));
}

.rank-warning strong {
  color: #ffb46a;
}

.rank-final-cta {
  align-items: center;
  justify-items: center;
  text-align: center;
}

.rank-final-cta p {
  max-width: 620px;
  margin: 0;
}

.back-link {
  width: max-content;
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-form label:nth-of-type(n + 3) {
  grid-column: 1 / -1;
}

.modal-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(160px, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 1px dashed #b8c4ba;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.empty-state.compact {
  min-height: 124px;
}

.empty-state strong {
  color: var(--ink);
}

.empty-state p {
  margin: 6px 0 0;
}

.loading-state {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 190px;
  align-items: center;
  gap: 14px;
  border: 1px solid #d7e7df;
  border-radius: 8px;
  background: #f3fbf7;
  color: var(--muted);
  padding: 24px;
}

.loading-state.compact {
  min-height: 124px;
}

.loading-state strong,
.loading-state p {
  display: block;
  min-width: 0;
}

.loading-state strong {
  color: var(--ink);
  font-weight: 900;
}

.loading-state p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #cfe1d8;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

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

.hidden {
  display: none !important;
}

.loading {
  opacity: 0.64;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

  .side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creator-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
    max-width: 100%;
  }

  .header-search {
    flex: 1 1 260px;
    width: auto;
  }

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

  .filters,
  .advanced-filter-grid,
  .workflow-grid,
  .faq-grid,
  .market-stats,
  .urgent-listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recent-listings-panel {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 12px;
  }

  .brand small {
    display: none;
  }

  .nav-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 42px 42px 42px 68px minmax(0, 1fr);
    gap: 8px;
  }

  .header-search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .auth-cluster {
    justify-items: stretch;
  }

  .steam-button {
    width: 100%;
  }

  .steam-safe-note {
    max-width: none;
    text-align: left;
  }

  .intermediary-note,
  .intermediary-disclosure,
  .intermediary-disclosure summary {
    max-width: none;
    text-align: left;
    justify-self: stretch;
  }

  .intermediary-popover {
    left: 0;
    right: auto;
    width: min(100%, calc(100vw - 24px));
  }

  .steam-button,
  .ghost-button,
  .danger-button {
    padding: 0 10px;
  }

  .balance-pill {
    min-width: 76px;
    padding: 5px 8px;
  }

  .balance-copy strong {
    font-size: 13px;
  }

  .profile-trigger {
    width: 100%;
    max-width: none;
    padding-right: 8px;
  }

  #headerProfileName {
    max-width: none;
  }

  .profile-menu {
    grid-column: 1 / -1;
    width: 100%;
  }

  .language-trigger {
    width: 100%;
    min-width: 0;
    padding: 0 6px;
  }

  .language-dropdown {
    left: 0;
    right: auto;
  }

  .profile-dropdown {
    left: 0;
    right: 0;
    width: auto;
    min-width: 0;
  }

  .market-head,
  .live-strip,
  .security-alert,
  .recent-listings-panel,
  .item-detail-layout {
    display: grid;
  }

  .fee-pill {
    min-width: 0;
  }

  .account-list-item {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .account-item-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .account-item-actions .ghost-button,
  .account-item-actions .danger-button {
    flex: 1 1 0;
  }

  .game-tabs,
  .filters,
  .advanced-filter-grid,
  .recent-time-tabs,
  .urgent-listing-grid,
  .quick-game-filters,
  .filter-scope,
  .workflow-grid,
  .faq-grid,
  .detail-facts,
  .price-history,
  .seller-trust.detail,
  .entitlement-grid,
  .market-stats,
  .messages-layout,
  .message-form,
  .cart-item,
  .account-inventory-list .inventory-item.static,
  .notice-actions,
  .side-panel,
  .footer-links,
  .account-tabs,
  .secure-payment-admin,
  .secure-transaction-card,
  .secure-transaction-grid,
  .form-grid.two,
  .form-grid.three,
  .listing-source-grid,
  .listing-wizard-steps,
  .game-specific-grid,
  .boost-option-grid,
  .settings-form,
  .modal-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  body {
    min-width: 0;
  }

  .topbar {
    padding: 12px;
  }

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

  .nav-actions {
    grid-template-columns: 40px 40px 40px 58px minmax(0, 1fr);
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .market-panel,
  .user-panel,
  .creator-panel,
  .safety-panel,
  .pricing-panel,
  .site-footer {
    padding: 14px;
  }

  .game-tab {
    min-height: 82px;
  }

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

  .listing-actions,
  .listing-owner-actions {
    grid-template-columns: 1fr;
  }

  .message-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 12px;
  }

  .message-bubble {
    max-width: 100%;
  }

  .seller-trust {
    grid-template-columns: 1fr;
  }

  .loading-state {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

/* CaseLoots market redesign */
.market-panel {
  border-color: rgba(255, 122, 24, 0.2);
  background:
    radial-gradient(circle at top left, rgba(255, 122, 24, 0.16), transparent 34%),
    linear-gradient(180deg, #151922 0%, #10131a 100%);
  color: #f6f7fb;
}

.market-panel .market-head h1,
.market-panel h2,
.market-panel .listing-title,
.market-panel .price {
  color: #ffffff;
}

.market-panel .eyebrow,
.market-panel .market-card-category {
  color: #ff8a24;
}

.market-panel .fee-pill,
.market-panel .beta-alert,
.market-panel .pricing-alert,
.market-panel .security-alert {
  border-color: rgba(255, 138, 36, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #dce2ec;
}

.market-panel .fee-pill span,
.market-panel .beta-alert strong,
.market-panel .pricing-alert strong,
.market-panel .security-alert strong {
  color: #ff9a32;
}

.market-shop {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(8, 11, 17, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.market-shop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#marketStats {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(255, 138, 36, 0.28);
  border-radius: 999px;
  background: rgba(255, 138, 36, 0.12);
  color: #ffbd78;
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
  white-space: nowrap;
}

.market-category-tabs {
  display: grid;
  grid-template-columns: repeat(11, minmax(82px, 1fr));
  gap: 8px;
  margin-bottom: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.market-game-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.market-game-pills button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8edf5;
  cursor: pointer;
  padding: 0 16px;
  font-weight: 900;
}

.market-game-pills button:hover,
.market-game-pills button.active {
  border-color: #ff8a24;
  background: #ff7a18;
  color: #141820;
}

.market-category-button {
  display: grid;
  min-width: 82px;
  min-height: 74px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  color: #d7deea;
  cursor: pointer;
  padding: 8px;
  text-align: center;
}

.market-category-button:hover,
.market-category-button.active {
  border-color: rgba(255, 138, 36, 0.78);
  background: linear-gradient(180deg, rgba(255, 138, 36, 0.24), rgba(255, 138, 36, 0.1));
  box-shadow: 0 12px 28px rgba(255, 104, 16, 0.14);
  color: #fff;
}

.market-category-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 138, 36, 0.14);
  color: #ff9a32;
  font-size: 12px;
  font-weight: 1000;
}

.market-category-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.market-category-copy strong,
.market-category-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-category-copy strong {
  font-size: 12px;
  font-weight: 900;
}

.market-category-copy small {
  color: #8d98a9;
  font-size: 10px;
  font-weight: 800;
}

.market-filter-row {
  display: grid;
  grid-template-columns: repeat(9, minmax(94px, 1fr));
  gap: 8px;
}

.market-filter-dropdown {
  position: relative;
  min-width: 0;
}

.market-filter-dropdown summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8edf5;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

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

.market-filter-dropdown[open] summary {
  border-color: rgba(255, 138, 36, 0.7);
  color: #ffbd78;
}

.market-filter-dropdown div {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 7;
  display: grid;
  width: min(220px, 72vw);
  gap: 4px;
  border: 1px solid rgba(255, 138, 36, 0.24);
  border-radius: 8px;
  background: #171c26;
  padding: 8px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.market-filter-dropdown button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dbe3ef;
  cursor: pointer;
  padding: 0 8px;
  text-align: left;
}

.market-filter-dropdown button:hover {
  background: rgba(255, 138, 36, 0.14);
  color: #fff;
}

.market-toolbox {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px repeat(3, minmax(132px, 170px));
  gap: 10px;
  align-items: end;
}

.market-toolbox label,
.market-toolbox label span {
  color: #9ba7b8;
}

.market-toolbox input,
.market-toolbox select {
  border-color: rgba(255, 255, 255, 0.12);
  background: #0f141d;
  color: #fff;
}

.market-toolbox input:focus,
.market-toolbox select:focus {
  border-color: #ff8a24;
  outline: 3px solid rgba(255, 138, 36, 0.18);
}

.market-search-button,
.market-card-action {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #ff7a18;
  color: #11151d;
  cursor: pointer;
  font-weight: 1000;
}

.market-product-card .market-card-action {
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1.05;
}

.market-search-button:hover,
.market-card-action:hover {
  background: #ff9a32;
}

.market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.market-tabs button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #dce2ec;
  cursor: pointer;
  padding: 0 16px;
  font-weight: 900;
}

.market-tabs button.active {
  border-color: #ff8a24;
  background: #ff7a18;
  color: #141820;
}

.market-live-strip {
  border-color: rgba(255, 138, 36, 0.2);
  background: rgba(255, 138, 36, 0.08);
  color: #ffd0a0;
}

.market-live-strip strong {
  color: #ff9a32;
}

.market-product-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.market-product-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: #171c26;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

.market-product-card:hover {
  border-color: rgba(255, 138, 36, 0.46);
  transform: translateY(-2px);
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.market-product-card .listing-media {
  min-height: 150px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 138, 36, 0.2), transparent 48%),
    linear-gradient(180deg, #232a36, #121722);
}

.market-product-card .listing-media img {
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
}

.market-product-card .listing-media .listing-media-badge .trade-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.market-condition {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  max-width: calc(100% - 58px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 11, 17, 0.74);
  color: #ffbd78;
  font-size: 10px;
  font-weight: 900;
  padding: 5px 8px;
}

.market-product-card .listing-body {
  gap: 8px;
}

.market-card-category {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-product-card .listing-title {
  display: block;
  min-height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.market-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-card-bottom span:last-child {
  color: #909caf;
  font-size: 12px;
  font-weight: 800;
}

.market-product-card .price {
  color: #ff9a32;
  font-size: 17px;
  font-weight: 1000;
}

.market-product-card .listing-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.market-product-card .inspect-action {
  grid-column: auto;
}

.market-card-seller {
  color: #aeb8c8;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.market-card-tools button,
.market-card-tools span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #dce2ec;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
}

.market-card-tools button {
  cursor: pointer;
}

.market-card-tools button:hover {
  border-color: rgba(255, 138, 36, 0.54);
  background: rgba(255, 138, 36, 0.16);
  color: #ffbd78;
}

.market-card-tools button[data-report-listing]:hover {
  border-color: rgba(220, 70, 53, 0.45);
  background: rgba(220, 70, 53, 0.14);
  color: #ffb5aa;
}

.market-card-tools.own-listing-note {
  grid-template-columns: 1fr;
}

.market-card-tools.own-listing-note span {
  justify-content: flex-start;
  color: #909caf;
}

.transaction-badges {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin-top: 2px;
  overflow: hidden;
}

.transaction-badges span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 138, 36, 0.38);
  border-radius: 6px;
  background: rgba(255, 138, 36, 0.12);
  color: #ffbd78;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  padding: 4px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card-action.secondary {
  border: 1px solid rgba(255, 138, 36, 0.42);
  background: rgba(255, 138, 36, 0.12);
  color: #ffbd78;
}

.market-card-action.secondary:hover {
  background: rgba(255, 138, 36, 0.22);
  color: #fff;
}

.market-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-top: 6px;
}

.market-pagination button,
.market-pagination span {
  display: inline-flex;
  min-width: 40px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #dce2ec;
  padding: 0 12px;
  font-weight: 900;
}

.market-pagination button {
  cursor: pointer;
}

.market-pagination button.active,
.market-pagination button:hover:not(:disabled) {
  border-color: #ff8a24;
  background: rgba(255, 138, 36, 0.2);
  color: #ffbd78;
}

.market-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.package-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.package-page-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 14px;
}

.package-page-grid span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.package-page-grid strong {
  color: var(--accent);
  font-size: 22px;
  font-weight: 1000;
}

.package-page-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.package-buy-button,
.package-confirm-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  margin-top: 8px;
}

.package-buy-button:hover,
.package-buy-button.active,
.package-confirm-button:hover {
  background: #0f6f56;
}

.package-buy-button.active {
  box-shadow: 0 0 0 3px rgba(19, 122, 95, 0.18);
}

.package-checkout-panel {
  display: grid;
  gap: 14px;
  margin: 22px 0;
  border: 1px solid #d7e7df;
  border-radius: 8px;
  background: #f4fbf7;
  padding: 16px;
}

.package-selected-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  padding: 12px;
}

.package-payment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.package-payment-grid button {
  display: grid;
  min-height: 82px;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
}

.package-payment-grid button:hover,
.package-payment-grid button.active {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(26, 42, 36, 0.1);
}

.package-payment-grid strong {
  color: var(--accent);
  font-size: 18px;
  font-weight: 1000;
}

.package-payment-grid span,
.package-demo-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.package-demo-note {
  margin: 0;
}

.market-legacy-hooks {
  display: none !important;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .main-nav-link {
    flex: 0 0 auto;
  }

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

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

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

@media (max-width: 720px) {
  .market-shop-head,
  .market-toolbox {
    grid-template-columns: 1fr;
  }

  .market-shop-head {
    display: grid;
  }

  #marketStats {
    width: fit-content;
    white-space: normal;
  }

  .market-category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  .market-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .package-payment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.account-page #accountModal {
    padding: 14px;
  }

  body.account-page .account-profile,
  .account-dashboard-head {
    grid-template-columns: 1fr;
  }

  .account-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.account-page .account-inventory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.account-page .account-tabs {
    position: static;
  }

  .market-product-card .listing-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .market-filter-row,
  .market-product-grid,
  .market-category-tabs,
  .package-payment-grid,
  .account-summary-grid,
  body.account-page .account-inventory-list,
  .entitlement-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive polish: keep the marketplace usable from Steam browser/mobile to wide desktop. */
@media (min-width: 1440px) {
  .app-shell {
    width: min(1400px, calc(100vw - 72px));
    margin-inline: auto;
  }

  .market-product-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .topbar {
    gap: 10px;
    padding-inline: 24px;
  }

  .header-search {
    width: clamp(160px, 20vw, 260px);
  }

  .market-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .market-product-card .listing-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .market-card-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(160px, auto) minmax(0, 1fr);
    align-items: center;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .nav-actions {
    max-width: 100%;
    min-width: 0;
  }

  .header-search {
    flex: 1 1 240px;
    width: auto;
  }

  .game-tabs,
  .market-filter-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .market-toolbox {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  body.account-page #accountModal .account-panel,
  .modal-panel {
    width: min(100%, calc(100vw - 28px));
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .brand {
    width: 100%;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .header-search {
    min-width: min(100%, 220px);
  }

  .balance-pill {
    flex: 0 0 auto;
  }

  .profile-menu {
    flex: 0 0 auto;
  }

  .profile-trigger {
    max-width: 230px;
  }

  #headerProfileName,
  .balance-copy {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .market-head {
    padding: 22px 16px;
  }

  .market-head h1 {
    font-size: clamp(34px, 9vw, 58px);
  }

  .game-tabs,
  .market-filter-row,
  .market-toolbox {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .market-product-card .listing-media {
    min-height: 132px;
  }

  .listing-media-badge {
    right: 44px;
  }

  .modal {
    padding: 10px;
  }

  .messages-layout,
  .item-detail-layout,
  .settings-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    min-width: 0;
  }

  .topbar {
    position: sticky;
    min-height: 0;
  }

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

  .brand small {
    font-size: 11px;
  }

  .main-nav {
    gap: 6px;
  }

  .main-nav-link {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .nav-actions > .icon-button,
  .language-menu-button,
  .balance-pill,
  .profile-trigger {
    min-height: 38px;
  }

  .header-search {
    flex-basis: 100%;
    width: 100%;
  }

  .app-shell {
    width: 100%;
    padding-inline: 10px;
  }

  .market-panel,
  .market-shop {
    border-radius: 0;
    padding: 14px 10px;
  }

  .game-tabs,
  .market-filter-row,
  .market-toolbox {
    grid-template-columns: 1fr;
  }

  .market-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .market-product-card .listing-media {
    min-height: 112px;
  }

  .market-product-card .listing-body {
    padding: 10px;
  }

  .market-product-card .listing-title {
    font-size: 13px;
  }

  .market-product-card .price {
    font-size: 15px;
  }

  .market-card-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .favorite-button {
    width: 30px;
    height: 30px;
    font-size: 17px;
  }

  .listing-media-badge {
    right: 42px;
    width: 28px;
    height: 28px;
  }

  .market-product-card .listing-media .listing-media-badge .trade-badge-icon {
    width: 24px;
    height: 24px;
  }

  .market-card-tools button,
  .market-card-action {
    min-height: 34px;
    font-size: 12px;
  }

  .market-product-card .listing-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.account-page #accountModal {
    padding: 10px;
  }

  body.account-page .account-profile {
    grid-template-columns: 56px minmax(0, 1fr);
    padding: 12px;
  }

  body.account-page .account-profile .avatar {
    width: 56px;
    height: 56px;
  }

  body.account-page .account-profile strong {
    font-size: 18px;
  }

  .account-profile-badges {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-profile-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-profile-rank-link {
    min-height: 34px;
  }

  .account-trade-badge {
    max-width: 100%;
  }

  .rank-user-progress {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .rank-user-badge {
    width: 60px;
    height: 60px;
  }

  .rank-user-badge img {
    width: 48px;
    height: 48px;
  }

  .rank-user-next {
    min-height: auto;
  }
}

@media (max-width: 380px) {
  .market-product-grid {
    grid-template-columns: 1fr;
  }

  .market-product-card .listing-media {
    min-height: 150px;
  }

  .profile-trigger {
    max-width: 100%;
  }

  .balance-copy strong {
    font-size: 12px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .market-product-card:hover {
    transform: none;
  }

  button,
  .main-nav-link,
  .market-tabs button,
  .market-game-pills button {
    min-height: 42px;
  }

  .market-product-card .market-card-action,
  .market-product-card .market-card-tools button {
    min-height: 34px;
  }

  .favorite-button,
  .listing-media-badge {
    touch-action: manipulation;
  }
}

@media (max-height: 720px) and (orientation: landscape) {
  .topbar {
    min-height: 58px;
    padding-block: 8px;
  }

  .market-head h1 {
    font-size: clamp(30px, 5vw, 52px);
  }

  .market-product-card .listing-media {
    min-height: 118px;
  }

  .modal-panel {
    max-height: calc(100vh - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-legend {
    grid-column: span 2;
  }

  .rank-info-grid,
  .rank-preview-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .rank-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-page-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .rank-shell {
    width: min(100% - 20px, 1180px);
  }

  .rank-grid,
  .rank-legend {
    grid-template-columns: 1fr;
  }

  .rank-legend {
    grid-column: auto;
  }

  .rank-hero {
    min-height: 260px;
  }

  .rank-card {
    min-height: auto;
  }

  .rank-card dl {
    grid-template-columns: 1fr;
  }
}

/* Final responsive normalization: keeps Caseloots usable on phone, desktop, TV and browser variants. */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.topbar {
  width: 100%;
}

.app-shell,
.market-home .app-shell,
.market-page-layout,
.rank-shell,
.legal-page-shell {
  width: min(100% - clamp(20px, 4vw, 72px), 1480px);
}

.market-panel,
.market-shop,
.account-panel,
.rank-hero,
.rank-card,
.legal-document {
  max-width: 100%;
}

.market-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(180px, 18vw, 250px), 1fr));
}

.market-product-card {
  min-width: 0;
}

.market-product-card .listing-media {
  min-height: clamp(118px, 12vw, 190px);
}

.market-category-tabs {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  overflow-x: visible;
}

.market-filter-row {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.market-toolbox {
  grid-template-columns: minmax(220px, 1.5fr) minmax(96px, 0.45fr) repeat(3, minmax(120px, 0.7fr));
}

.market-tabs,
.market-game-pills {
  min-width: 0;
}

body.account-page #accountModal {
  width: 100%;
}

body.account-page #accountModal .account-panel {
  width: min(100% - clamp(20px, 4vw, 72px), 1120px);
}

.account-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.account-tabs {
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}

.account-inventory-grid,
.inventory-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.rank-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.rank-legend {
  grid-column: auto;
  grid-template-columns: minmax(140px, 0.35fr) minmax(0, 1fr);
}

@media (min-width: 1680px) {
  .app-shell,
  .market-home .app-shell,
  .market-page-layout,
  .rank-shell {
    width: min(100% - 96px, 1720px);
  }

  .market-product-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
  }

  .market-product-card .listing-media {
    min-height: 210px;
  }

  .market-head h1,
  .rank-hero h1 {
    font-size: clamp(56px, 5vw, 88px);
  }
}

@media (min-width: 2200px) {
  .app-shell,
  .market-home .app-shell,
  .market-page-layout,
  .rank-shell {
    width: min(100% - 140px, 1880px);
  }

  .topbar,
  .rank-topbar {
    padding-inline: clamp(48px, 5vw, 110px);
  }

  .market-product-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 1180px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(170px, auto) minmax(0, 1fr);
  }

  .main-nav {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-actions {
    grid-column: 1 / -1;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .header-search {
    flex: 1 1 260px;
    width: auto;
  }

  .market-toolbox {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell,
  .market-home .app-shell,
  .market-page-layout,
  .rank-shell,
  .legal-page-shell {
    width: min(100% - 20px, 1480px);
    padding-inline: 0;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .brand {
    width: 100%;
  }

  .main-nav {
    width: 100%;
    padding-bottom: 2px;
  }

  .main-nav-link {
    flex: 0 0 auto;
  }

  .nav-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(42px, auto)) minmax(0, 1fr);
    align-items: center;
  }

  .nav-actions .auth-cluster,
  .nav-actions .profile-menu {
    grid-column: 1 / -1;
    width: 100%;
    justify-items: stretch;
  }

  .profile-trigger,
  .steam-button,
  .demo-button,
  .balance-pill {
    width: 100%;
    max-width: none;
  }

  .market-shop-head,
  .account-dashboard-head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  #marketStats {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .market-toolbox {
    grid-template-columns: 1fr;
  }

  .market-product-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  }

  .market-product-card .listing-media {
    min-height: clamp(128px, 34vw, 180px);
  }

  body.account-page #accountModal {
    padding: 10px;
  }

  body.account-page #accountModal .account-panel {
    width: 100%;
  }

  body.account-page .account-profile {
    grid-template-columns: 68px minmax(0, 1fr);
    padding: 14px;
  }

  body.account-page .account-profile .avatar {
    width: 68px;
    height: 68px;
  }

  .rank-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .rank-page-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .rank-hero {
    min-height: auto;
  }

  .rank-legend {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body {
    min-width: 0;
  }

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

  .nav-actions {
    grid-template-columns: repeat(3, minmax(42px, auto)) minmax(0, 1fr);
  }

  .header-search {
    grid-column: 1 / -1;
    flex-basis: 100%;
    width: 100%;
  }

  .main-nav-link,
  .rank-page-nav a {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .market-panel,
  .market-shop,
  .legal-document {
    border-radius: 8px;
    padding: 12px;
  }

  .market-head h1,
  .rank-hero h1 {
    font-size: clamp(34px, 12vw, 50px);
    line-height: 1;
  }

  .market-category-tabs,
  .market-filter-row,
  .account-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .market-product-card .listing-media {
    min-height: 118px;
  }

  .market-product-card .listing-body {
    padding: 10px;
  }

  .market-product-card .listing-title {
    font-size: 13px;
  }

  .market-card-tools,
  .market-product-card .listing-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-summary-grid,
  .account-inventory-grid,
  .inventory-grid,
  .rank-grid,
  .rank-info-grid,
  .rank-preview-list {
    grid-template-columns: 1fr;
  }

  body.account-page .account-profile {
    grid-template-columns: 1fr;
  }

  body.account-page .account-profile .avatar {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 360px) {
  .market-category-tabs,
  .market-filter-row,
  .market-product-grid,
  .account-tabs {
    grid-template-columns: 1fr;
  }

  .market-product-card .listing-media {
    min-height: 150px;
  }
}
