:root {
  color-scheme: dark;
  --ink: #0a0a0a;
  --demon-red: #dc1c1c;
  --demon-red-hot: #ff2a2a;
  --fg: #e4e4e4;
  --muted: #9a9a9a;
  --line: rgba(255, 255, 255, 0.1);
  --surface: rgba(16, 16, 16, 0.72);
  --danger: #ff4d4d;
  --good: #8dffb0;
  --font-display: "Syne", sans-serif;
  --font-body: "Nunito Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.4;
  background: #070707;
  -webkit-font-smoothing: antialiased;
}

.demon-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.top-bar, .page { position: relative; z-index: 1; }

.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(220, 28, 28, 0.12);
  backdrop-filter: blur(8px);
}

.top-banner {
  grid-column: 2;
  margin: 0;
  padding: 0.7rem 0;
  color: #ff8a8a;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

.site-nav {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

.site-nav-link {
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav-link:hover {
  color: #ffb0b0;
}

.site-nav-link.is-current {
  color: #fff;
  background: rgba(220, 28, 28, 0.18);
}

.top-bar-end {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.account-page {
  width: min(560px, calc(100% - 32px));
  padding-top: 2.5rem;
}

.account-eyebrow {
  text-align: center;
  margin-bottom: 1rem;
}

.account-shell {
  min-height: 18rem;
}

.account-status {
  margin: 2rem 0 0;
  text-align: center;
  color: var(--muted);
}

.account-card {
  position: relative;
  overflow: hidden;
  padding: 1.6rem 1.5rem 1.45rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(220, 28, 28, 0.22), transparent 55%),
    rgba(14, 14, 14, 0.82);
  box-shadow: rgba(220, 28, 28, 0.08) 0 0 0 1px, rgba(0, 0, 0, 0.5) 0 28px 70px;
  backdrop-filter: blur(16px);
}

.account-card-guest {
  text-align: center;
  padding: 2.2rem 1.6rem 1.7rem;
}

.account-guest-mark {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(160deg, #3a0a0a, #dc1c1c 70%);
  box-shadow: 0 0 40px rgba(220, 28, 28, 0.28);
}

.account-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem;
  align-items: center;
}

.account-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 6px rgba(220, 28, 28, 0.12), 0 18px 40px rgba(0, 0, 0, 0.45);
}

.account-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #5c0d0d, #dc1c1c);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
}

.account-kicker {
  margin: 0 0 0.35rem;
  color: #ff8a8a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.account-title,
.account-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.account-title {
  font-size: clamp(1.7rem, 5vw, 2.2rem);
}

.account-name {
  font-size: clamp(1.55rem, 4.2vw, 2.05rem);
  word-break: break-word;
}

.account-lead {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.account-meta {
  margin: 1.35rem 0 0;
  padding: 0.95rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.85rem;
}

.account-meta-row {
  display: grid;
  gap: 0.25rem;
}

.account-meta-row dt {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-meta-row dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.account-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f2f2f2;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.account-btn-primary {
  background: var(--demon-red);
  border-color: transparent;
  color: #fff;
}

.account-btn-primary:hover {
  background: var(--demon-red-hot);
}

.account-steam-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  margin-top: 1.35rem;
  padding: 0 1.35rem;
  border-radius: 0.65rem;
  background: linear-gradient(180deg, #2a475e, #1b2838);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.account-steam-btn:hover {
  filter: brightness(1.08);
}

.account-secondary-link {
  display: inline-block;
  margin-top: 0.95rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.account-secondary-link:hover {
  color: #ffb0b0;
}

@media (max-width: 560px) {
  .account-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .account-actions {
    flex-direction: column;
  }

  .account-actions .dir-btn {
    width: 100%;
  }
}

.lang-btn {
  margin: 0;
  padding: 0.2rem 0.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.lang-btn.is-current {
  color: #fff;
}

.lang-btn:hover {
  color: #ffb0b0;
}

.lang-sep {
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.72rem;
  font-weight: 700;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 64px;
}

.hero {
  padding: 2.4rem 0 0.4rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.brand-logo {
  width: clamp(3rem, 8vw, 4.5rem);
  height: auto;
  flex: 0 0 auto;
  image-rendering: auto;
  filter: drop-shadow(0 0 18px rgba(220, 28, 28, 0.35));
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 0.92;
  text-shadow: rgba(220, 28, 28, 0.25) 0 0 40px;
}

.brand-demon { color: #fff; }

.brand-tv {
  color: var(--demon-red-hot);
  margin-left: 0.08em;
}

.panel {
  margin-top: 1.6rem;
  padding: 1.4rem 1.45rem 1.5rem;
  border-radius: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: rgba(220, 28, 28, 0.06) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 24px 60px;
  backdrop-filter: blur(14px);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.panel h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.lead, .note, .status, .summary p { color: var(--muted); }

.lead {
  margin: 0.85rem 0 0;
  max-width: none;
  width: 100%;
}

button, select, input {
  font: inherit;
  color: var(--fg);
}

.dir-btn, .btn {
  height: 2.55rem;
  padding: 0 1rem;
  border-radius: 0.55rem;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.dir-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.dir-btn:hover:not(:disabled) {
  border-color: rgba(220, 28, 28, 0.8);
  color: #fff;
  background: rgba(220, 28, 28, 0.2);
}

.btn {
  margin-left: auto;
  border: 0;
  background: var(--demon-red);
  color: #fff;
  letter-spacing: 0.04em;
  box-shadow: rgba(220, 28, 28, 0.25) 0 0 24px;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover:not(:disabled) { background: var(--demon-red-hot); }
.btn:active:not(:disabled) { transform: translateY(1px); }

button:disabled { opacity: 0.55; cursor: not-allowed; }

.market-pick {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.market-pick-field {
  min-width: 0;
}

.swap-btn {
  width: 2.55rem;
  height: 2.55rem;
  margin-bottom: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.swap-btn:hover {
  border-color: rgba(220, 28, 28, 0.8);
  color: #fff;
  background: rgba(220, 28, 28, 0.2);
}

.tool-row {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.search-field {
  flex: 1;
  min-width: 0;
}

.filter-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.filter-tools-label {
  line-height: 1.2;
}

.filter-tools-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.filter-tools-buttons .dir-btn {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

#filters-toggle.is-current {
  border-color: rgba(220, 28, 28, 0.8);
  color: #fff;
  background: rgba(220, 28, 28, 0.2);
}

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

.controls[hidden] { display: none; }

.tag-filters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

.tag-check {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg);
  font-size: 0.86rem;
  cursor: pointer;
  user-select: none;
}

.tag-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: #121212;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.tag-check input[type="checkbox"]:hover {
  border-color: rgba(220, 28, 28, 0.55);
}

.tag-check input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--demon-red-hot);
  box-shadow: 0 0 0 2px rgba(220, 28, 28, 0.25);
}

.tag-check input[type="checkbox"]:checked {
  border-color: rgba(220, 28, 28, 0.9);
  background: var(--demon-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") center / 0.85rem no-repeat;
}

.tag-check:hover {
  color: #fff;
}

.filter-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.fees-panel {
  margin-top: 12px;
  display: grid;
  gap: 0.75rem;
}

.fees-panel[hidden] { display: none; }

.fees-actions {
  display: flex;
  justify-content: flex-end;
}

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

.fee-card {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #121212;
}

.fee-title {
  margin: 0 0 0.55rem;
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 700;
}

.fee-fields {
  display: grid;
  gap: 0.45rem;
}

.fee-fields label {
  font-size: 0.72rem;
}

.fee-fields input {
  height: 2.2rem;
}

#fees-toggle.is-current,
#sales-toggle.is-current {
  border-color: rgba(220, 28, 28, 0.8);
  color: #fff;
  background: rgba(220, 28, 28, 0.2);
}

.sales-panel {
  margin-top: 12px;
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #101010;
}

.sales-panel[hidden] { display: none; }

.sales-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.sales-period {
  height: 2.4rem;
  padding: 0 1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}

.sales-period[aria-selected="true"] {
  color: #fff;
  border-bottom-color: var(--demon-red-hot);
  background: transparent;
}

.sales-list {
  display: grid;
  gap: 0.35rem;
  max-height: 18rem;
  overflow: auto;
}

.sales-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.6rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.55rem;
}

.sales-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.sales-item.is-disabled {
  opacity: 0.45;
}

.sales-item .tag-check {
  margin: 0;
}

.sales-item-name {
  color: var(--fg);
  font-size: 0.92rem;
  font-weight: 600;
}

.sales-item-min {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.sales-stepper {
  display: grid;
  grid-template-columns: 2rem 4.2rem 2rem;
  align-items: center;
  gap: 0.35rem;
}

.sales-item-min input {
  width: 4.2rem;
  height: 2rem;
  text-align: center;
}

.sales-step {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.sales-step:hover {
  border-color: rgba(220, 40, 40, 0.7);
  background: rgba(220, 40, 40, 0.18);
  color: #fff;
}

.sales-step:active {
  background: rgba(220, 40, 40, 0.32);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

input[type="search"], input[type="number"] {
  width: 100%;
  height: 2.7rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #121212;
  color: var(--fg);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

input[type="search"]::placeholder,
input[type="number"]::placeholder {
  color: #6f6f6f;
}

input[type="search"]::-webkit-search-cancel-button {
  filter: invert(1) opacity(0.55);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

input:focus { border-color: rgba(220, 28, 28, 0.8); }

.choice {
  position: relative;
  width: 100%;
}

.choice-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.choice-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 2.7rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #121212;
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.choice-trigger::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #8a8a8a;
  border-bottom: 2px solid #8a8a8a;
  transform: rotate(45deg) translate(-1px, -1px);
  flex: 0 0 auto;
}

.choice.is-open .choice-trigger {
  border-color: rgba(220, 28, 28, 0.8);
}

.choice.is-open .choice-trigger::after {
  transform: rotate(225deg) translate(-1px, -1px);
  border-color: #ff8a8a;
}

.choice-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  background: #101010;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.choice-menu[hidden] { display: none; }

.choice-menu::-webkit-scrollbar { width: 8px; }
.choice-menu::-webkit-scrollbar-track { background: #0a0a0a; }
.choice-menu::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
.choice-menu::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }

.choice-option {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.choice-option:hover {
  background: rgba(220, 28, 28, 0.18);
  color: #fff;
}

.choice-option.is-current {
  background: rgba(220, 28, 28, 0.28);
  color: #fff;
}

.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-top: 1.35rem;
  font-size: 0.95rem;
  color: var(--fg);
  cursor: pointer;
}

.check input {
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.3rem;
  background: #121212;
  display: grid;
  place-content: center;
  cursor: pointer;
}

.check input::before {
  content: "";
  width: 0.55rem;
  height: 0.35rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.check input:checked {
  border-color: transparent;
  background: var(--demon-red);
}

.check input:checked::before { opacity: 1; }

.check input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1000;
  max-width: min(520px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 18px;
  border: 1px solid rgba(70, 180, 110, 0.45);
  border-radius: 12px;
  background: rgba(12, 18, 14, 0.94);
  color: #6ddea0;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
  pointer-events: none;
}

.pager-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 14px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 16, 16, 0.85);
}

.pager-shown, .pager-note {
  margin: 0;
  padding: 0 12px;
  color: var(--fg);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.pager-shown span {
  margin-right: 8px;
  color: #c8c8c8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-btn {
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-weight: 700;
  cursor: pointer;
}

.page-btn.is-current {
  border-color: transparent;
  background: var(--demon-red);
  color: #fff;
}

.page-btn:hover:not(:disabled):not(.is-current) {
  border-color: rgba(220, 28, 28, 0.8);
  background: rgba(220, 28, 28, 0.2);
}

th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th.sortable:hover,
th.sortable.is-sorted {
  color: #fff;
}

.pager-note { padding: 6px 12px; max-width: 720px; }

.table-wrap {
  margin-top: 0.4rem;
  padding: 0;
  overflow: auto;
}

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  background: #121212;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.col-text {
  text-align: left;
}

.col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.col-center {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.name { cursor: copy; }

.sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pos { color: var(--good); }
.neg { color: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

.note { margin: 12px 0 0; font-size: 0.9rem; }

@media (max-width: 800px) {
  .page {
    width: min(100%, calc(100% - 20px));
    padding-bottom: 48px;
  }

  .brand { font-size: clamp(2.4rem, 14vw, 3.4rem); }

  .panel { padding: 1.05rem 0.95rem 1.15rem; }

  .lead {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .market-pick {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .swap-btn {
    width: 100%;
    min-height: 44px;
  }

  .top-bar {
    grid-template-columns: 1fr auto;
    padding: 0.35rem 0.75rem;
  }

  .top-banner {
    grid-column: 1;
    justify-self: start;
    padding: 0.45rem 0;
    letter-spacing: 0.12em;
    text-align: left;
  }

  .site-nav {
    grid-column: 1;
    gap: 0;
  }

  .site-nav-link {
    padding: 0.3rem 0.4rem;
    font-size: 0.72rem;
  }

  .top-bar-end {
    grid-column: 2;
  }

  .tool-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-tools-buttons {
    width: 100%;
  }

  .tool-row .dir-btn {
    width: 100%;
    min-height: 44px;
  }

  .controls { grid-template-columns: 1fr; }
  .tag-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fees-grid { grid-template-columns: 1fr 1fr; }

  .pager-bar {
    gap: 6px;
  }

  .page-btn, .pager-bar .dir-btn {
    min-height: 40px;
    min-width: 40px;
  }

  .table-wrap {
    margin-left: -0.2rem;
    margin-right: -0.2rem;
    border-radius: 0.75rem;
  }

  th, td { padding: 10px 10px; font-size: 0.92rem; }

  .check { padding-top: 0; }
  .btn { margin-left: 0; }
}
