:root {
  --bg: #0d1117;
  --panel: #151b23;
  --panel-2: #1b2330;
  --line: #2a3441;
  --text: #e6edf3;
  --muted: #8b98a8;
  --gold: #f0c040;
  --green: #4ade80;
  --red: #f87171;
  --blue: #60a5fa;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% -10%, #1c2a3a 0, var(--bg) 45%);
  color: var(--text);
  font: 15px/1.45 "Segoe UI", system-ui, sans-serif;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 17, 23, .8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 21px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .2px;
}
.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: none;
}
.brand span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-left: 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.market {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

select, input, button {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
select { padding: 7px 10px; }
input[type="search"] { padding: 10px 12px; width: 100%; }
button {
  padding: 9px 16px;
  cursor: pointer;
  color: #10151c;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 650;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .5; cursor: default; }

.meta { margin-left: auto; color: var(--muted); font-size: 13px; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.live[hidden] { display: none; }
.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, .7);
}
.auth { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.auth .who { color: var(--gold); font-weight: 600; }

.download-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.download-link:hover {
  color: var(--gold);
  border-color: rgba(240, 192, 64, .6);
  background: rgba(240, 192, 64, .06);
}
.download-link:focus-visible {
  outline: 2px solid rgba(240, 192, 64, .6);
  outline-offset: 2px;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
button.ghost:hover { border-color: var(--gold); color: var(--gold); }

.sync-state { color: #6b7787; font-size: 12px; }
.sync-state.on { color: var(--green); }

dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 22px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
}
dialog::backdrop { background: rgba(2, 6, 12, .72); backdrop-filter: blur(3px); }
dialog h2 { margin: 0 0 8px; color: var(--gold); font-size: 19px; }
dialog p { color: var(--muted); font-size: 13px; }
dialog code { color: var(--text); background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
#auth-code {
  width: 100%;
  margin: 6px 0 4px;
  padding: 12px 14px;
  font: 600 22px/1 ui-monospace, monospace;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-align: center;
}
#auth-code::placeholder { color: #44505f; letter-spacing: 4px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
dialog .error { min-height: 18px; color: var(--red); margin: 4px 0; }

main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr);
  gap: 18px;
  padding: 18px 24px 40px;
  max-width: 1500px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; padding: 14px; }
}

.search-panel, .detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  min-width: 0;
}

#search-form { display: flex; gap: 10px; }

/* ---------- Results toolbar ---------- */

.results-head {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
}

.sort-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sort-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .9px;
  text-transform: uppercase;
  white-space: nowrap;
}
.sort-field select {
  padding: 6px 9px;
  font-size: 13px;
  border-radius: 7px;
}
.sort-field select:focus-visible,
.sort-dir button:focus-visible {
  outline: 2px solid rgba(240, 192, 64, .55);
  outline-offset: 2px;
}

.sort-dir {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  background: #0e141c;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sort-dir button {
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  transition: background .15s, color .15s;
}
.sort-dir button:hover {
  filter: none;
  color: var(--gold);
}
.sort-dir button[aria-pressed="true"] {
  background: var(--gold);
  color: #10151c;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.sort-dir button[aria-pressed="true"]:hover { color: #10151c; }

.watch-toggle {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  margin-bottom: 10px;
}
.status { color: var(--muted); font-size: 13px; }

.results { max-height: 68vh; overflow: auto; }

/* ---------- Filters ---------- */

.filters {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #10161e;
}

.filters > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary:hover .filter-title { color: var(--text); }

.filter-title {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .15s;
}
.filter-count {
  padding: 1px 8px;
  border: 1px solid rgba(240, 192, 64, .35);
  border-radius: 999px;
  background: rgba(240, 192, 64, .1);
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
}
.filter-caret {
  margin-left: auto;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transition: transform .18s ease;
}
.filters[open] .filter-caret { transform: rotate(180deg); }

.filter-body {
  padding: 12px;
  border-top: 1px solid var(--line);
  animation: filter-in .16s ease-out;
}
@keyframes filter-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

.filter-qualities { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
}
.quality-list { display: flex; flex-wrap: wrap; gap: 6px; }
.quality-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.quality-chip input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--gold);
}
.quality-chip:hover { background: #202a37; }
.quality-chip:has(input:checked) {
  border-color: currentColor;
  background: #1d2733;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
.quality-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 5px currentColor;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}
.field > span:first-child {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--muted);
}
.field select,
.field input {
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  font-size: 13px;
  border-radius: 7px;
}
.field input[type="number"] { font-variant-numeric: tabular-nums; }
.pair-inputs { display: flex; align-items: center; gap: 6px; }
.pair-inputs > span { color: #4a5768; }
.pair-inputs input { width: 100%; }

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.inline-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--gold); }

/* ---------- Stats filter ---------- */

.filter-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #222c3a;
}
.filter-stats > .field-label {
  transition: color .15s;
}
.filter-stats.is-active > .field-label {
  color: var(--gold);
}
.filter-stats.is-active > .field-label::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
  vertical-align: middle;
}

.stats-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.45fr) minmax(130px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 8px 10px;
  border: 1px solid #1c2532;
  border-radius: 9px;
  background: #0e141c;
  transition: border-color .15s, background .15s;
}
.stat-row:hover { border-color: #26313f; }
.stat-row.is-active {
  border-color: rgba(240, 192, 64, .3);
  background: #111823;
}
.stat-row .pair-inputs { min-width: 0; }
.stat-row-key select {
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.stat-row-key select.is-active {
  color: var(--gold);
  border-color: rgba(240, 192, 64, .5);
  box-shadow: 0 0 0 1px rgba(240, 192, 64, .08) inset;
}
.field input:disabled {
  background: #111820;
  border-color: #222c3a;
  color: #566273;
  cursor: not-allowed;
}

.stat-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin-bottom: 1px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  transition: color .15s, border-color .15s, background .15s, transform .12s;
}
.stat-remove:hover {
  color: var(--red);
  border-color: rgba(248, 113, 113, .45);
  background: rgba(248, 113, 113, .08);
  filter: none;
}
.stat-remove:active { transform: scale(.94); }
.stat-remove:focus-visible {
  outline: 2px solid rgba(240, 192, 64, .55);
  outline-offset: 1px;
}

.stats-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.add-stat {
  padding: 6px 12px;
  font-size: 12px;
  border-style: dashed;
  color: var(--muted);
}
.add-stat:hover {
  color: var(--gold);
  border-color: rgba(240, 192, 64, .45);
}
.add-stat:disabled,
.add-stat:disabled:hover {
  opacity: .4;
  cursor: not-allowed;
  color: var(--muted);
  border-color: var(--line);
}
.stats-actions .inline-check { min-height: 32px; padding: 5px 10px; }

.stats-hint {
  margin: 0;
  color: #6b7787;
  font-size: 11px;
  line-height: 1.4;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.filter-actions button { padding: 6px 12px; font-size: 12px; }
.filter-hint { color: #6b7787; font-size: 11px; }

/* ---------- Pager ---------- */

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.pager[hidden] { display: none; }
.pager button { padding: 6px 14px; font-size: 12px; }
.page-label {
  margin-left: auto;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.page-of { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ---------- Item hover card ---------- */

.item-card {
  position: fixed;
  z-index: 60;
  width: min(320px, calc(100vw - 24px));
  max-height: min(72vh, 560px);
  overflow: auto;
  padding: 12px 14px;
  background: linear-gradient(180deg, #0c131b 0%, #090e14 100%);
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .65), 0 1px 0 rgba(255, 255, 255, .04) inset;
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  animation: card-in .12s ease-out;
}
.item-card[hidden] { display: none; }
.item-card.pinned {
  pointer-events: auto;
  border-color: rgba(240, 192, 64, .42);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .7), 0 0 0 1px rgba(240, 192, 64, .1);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.card-head { display: flex; align-items: flex-start; gap: 8px; }
.card-name { font-size: 15px; font-weight: 650; line-height: 1.3; }
.card-close {
  flex: none;
  margin-left: auto;
  padding: 0 3px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}
.card-close:hover { color: var(--gold); }
.card-loading { margin-top: 6px; color: var(--muted); }
.card-sub { margin-top: 2px; color: var(--muted); }
.card-line { margin-top: 3px; color: var(--text); }
.card-line.gold { color: var(--gold); }
.card-line.muted { color: var(--muted); }

.card-stats,
.card-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #1e2836;
}
.card-stat {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--green);
}
.card-stat .stat-label { color: var(--green); }
.card-stat .stat-value { color: var(--green); font-variant-numeric: tabular-nums; }
.card-detail-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #c8d2df;
}
.card-detail-line + .card-detail-line { margin-top: 3px; }
.card-detail-line .detail-left { color: inherit; }
.card-detail-line .detail-right {
  flex: none;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.card-description {
  margin-top: 8px;
  color: var(--gold);
  font-style: italic;
  opacity: .85;
}
.card-pre {
  max-height: 180px;
  margin: 8px 0 0;
  padding: 8px;
  overflow: auto;
  background: #0a1017;
  border: 1px solid #1e2836;
  border-radius: 6px;
  color: var(--muted);
  font: 11px/1.5 ui-monospace, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.card-price {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 14px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #1e2836;
}
.card-price > div { display: flex; justify-content: space-between; gap: 8px; }
.card-price span { color: var(--muted); }
.card-price strong {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.card-price .card-price-main strong { color: var(--gold); }
.card-price .card-price-main span { color: var(--gold); opacity: .8; }

/* ---------- Variant selector ---------- */

.variants {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #1e2836;
}

.variants-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.variants-count {
  color: #6b7787;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .3px;
  text-transform: none;
}

.variant-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 158px;
  padding-bottom: 1px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}
.variant-list.has-more {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
}

.variant {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #0e141c;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}
button.variant { cursor: pointer; }
button.variant:hover {
  filter: none;
  background: #17202b;
  border-color: #2c3a4c;
}
.variant.is-active {
  background: rgba(240, 192, 64, .1);
  border-color: rgba(240, 192, 64, .48);
  box-shadow: inset 2px 0 var(--gold);
}
.variant-level {
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}
.variant.is-active .variant-level { color: var(--gold); }
.variant-price {
  overflow: hidden;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.variant.is-active .variant-price { color: #ffd97a; }
.variant-qty {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.variant.is-active .variant-qty { color: var(--text); }
button.variant:focus-visible {
  outline: 2px solid rgba(240, 192, 64, .65);
  outline-offset: 1px;
}

tr.row:focus-visible {
  outline: 2px solid rgba(240, 192, 64, .5);
  outline-offset: -2px;
}

@media (max-width: 900px) {
  .filters { margin-top: 12px; }
  .item-card { max-height: min(60vh, 420px); }
  #auth-area { order: 3; margin-left: auto; }
  .meta { order: 4; flex: 1 1 100%; margin-left: 0; }
}

@media (max-width: 640px) {
  header { gap: 10px 12px; padding: 12px 14px; }
  .brand { font-size: 19px; }
  .brand-icon { width: 24px; height: 24px; }
  .meta { font-size: 12px; }
  .results-head { margin-top: 12px; padding-top: 10px; }
  .results-bar { gap: 8px 10px; }
  .sort-field { flex: 1 1 auto; }
  .sort-field select { flex: 1 1 auto; min-width: 104px; }
  .sort-dir button { padding: 5px 8px; }
  .watch-toggle { margin-left: 0; white-space: nowrap; }
  .results-meta { margin-top: 4px; gap: 2px 8px; }
  .sync-state { font-size: 11px; }
  .status { font-size: 12px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "key key"
      "value remove";
    gap: 8px;
  }
  .stat-row-key { grid-area: key; }
  .stat-row-value { grid-area: value; }
  .stat-remove { grid-area: remove; }
  .stats-actions .inline-check { white-space: normal; }
  .results { max-height: 56vh; }
  .pager { flex-wrap: wrap; }
  .page-label { margin-left: 0; }
  .page-of { margin-left: auto; }
  .item-card { width: min(300px, calc(100vw - 16px)); }
  th:nth-child(4), td:nth-child(4) { display: none; }
}

@media (max-width: 420px) {
  .filter-grid { grid-template-columns: 1fr; }
  .quality-chip { padding: 4px 8px; }
  .item-card { padding: 10px 12px; }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
}
td { padding: 8px; border-bottom: 1px solid #1f2731; vertical-align: middle; }
tr.row { cursor: pointer; }
tr.row:hover { background: var(--panel-2); }
tr.row.active { background: #1e2b3a; box-shadow: inset 3px 0 var(--gold); }

.item-name { font-weight: 600; }
.item-sub { color: var(--muted); font-size: 12px; }
.price { color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.qty, .age { color: var(--muted); white-space: nowrap; }
.num { text-align: right; }

.star {
  background: none;
  border: 0;
  padding: 2px 6px;
  color: #44505f;
  font-size: 17px;
  line-height: 1;
}
.star.on { color: var(--gold); }
.star:hover { color: var(--gold); }

.detail { align-self: start; position: sticky; top: 90px; }
.detail h2 { margin: 0 0 4px; font-size: 20px; }
.detail .key { color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
.detail .current {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 16px 0;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.detail .current strong { display: block; color: var(--gold); font-size: 18px; }
.detail .current span { color: var(--muted); font-size: 12px; }

/* Variant block sits between the current price and the watch button. */
.detail .variants {
  margin: 0 0 14px;
  padding: 0;
  border-top: 0;
}
.detail .variants-head {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 1.2px;
}
.detail .variants-count { font-size: 11px; }
.detail .variant-list { max-height: 238px; }
.detail .variant {
  padding: 7px 10px;
  font-size: 13px;
}
.detail .variant-qty { font-size: 12px; }

.chart-wrap {
  position: relative;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #10161e;
}
.chart-wrap svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.legend i { display: inline-block; width: 10px; height: 3px; margin-right: 5px; vertical-align: middle; }
.chart-hint { margin-left: auto; color: #6b7787; font-style: italic; }

.chart-hit { fill: transparent; cursor: crosshair; }
.chart-guide {
  stroke: #64748b;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0;
  transition: opacity .1s;
  pointer-events: none;
}
.chart-cursor-max, .chart-cursor-min {
  opacity: 0;
  stroke: #0d1117;
  stroke-width: 2;
  pointer-events: none;
  transition: opacity .1s;
}
.chart-cursor-max { fill: #f0c040; }
.chart-cursor-min { fill: #4ade80; }

.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 158px;
  padding: 9px 11px;
  background: #0b1016;
  border: 1px solid #334155;
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
  font-size: 12px;
  pointer-events: none;
}
.chart-tip[hidden] { display: none; }
.chart-tip .tip-time { color: var(--gold); font-weight: 650; margin-bottom: 6px; }
.chart-tip .tip-row { display: flex; justify-content: space-between; gap: 18px; margin-top: 2px; }
.chart-tip .tip-row span { color: var(--muted); }
.chart-tip .tip-row strong { color: var(--text); font-weight: 600; }
.chart-tip .tip-samples { color: #6b7787; margin-top: 6px; }

.detail h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 20px 0 6px; }
.range-tabs { display: flex; gap: 6px; margin: 0 0 8px; }
.range-tabs button {
  padding: 5px 12px;
  font-size: 12px;
  background: var(--panel-2);
  color: var(--muted);
  border-color: var(--line);
}
.range-tabs button.active {
  color: #10151c;
  background: var(--gold);
  border-color: var(--gold);
}
.market-table td { padding: 7px 6px; }
.market-table .best { color: var(--green); font-weight: 700; }

.empty { color: var(--muted); }
.error { color: var(--red); }
.mono { font-family: ui-monospace, monospace; }
