﻿:root {
  --bg: #070c14;
  --surface: #0c1724;
  --surface-2: #112337;
  --line: #23415c;
  --muted: #7897ad;
  --text: #eef8ff;
  --accent: #75d9ff;
  --accent-soft: rgba(117, 217, 255, 0.12);
  --orange: #ff9a62;
  font-family: "IBM Plex Sans KR", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -12%, rgba(87, 181, 255, .12), transparent 34%),
    radial-gradient(circle at 8% 42%, rgba(72, 133, 205, .055), transparent 28%),
    var(--bg);
}
button, input { font: inherit; }
button { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 72px);
  border-bottom: 1px solid rgba(117,217,255,.12);
  background: rgba(7,12,20,.82);
  backdrop-filter: blur(14px);
}
.brand { display: flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; }
.brand-mark img { display: block; width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 7px rgba(117,217,255,.48)); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.site-tabs { display: flex; align-items: center; gap: 3px; padding: 4px; background: #0c1724; border: 1px solid var(--line); border-radius: 11px; }
.header-link { position: relative; padding: 9px 13px; color: #9ba8b2; border-radius: 7px; text-decoration: none; font-size: 12px; font-weight: 600; transition: .18s ease; }
.header-link:hover { color: var(--text); background: #1a242d; }
.header-link.active { color: #06131d; background: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 5px 16px rgba(117,217,255,.14); }
.header-link.featured:not(.active) { color: var(--accent); }
.header-link.featured:not(.active)::after { content: ""; position: absolute; top: 6px; right: 6px; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 7px var(--accent); }
.data-status { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.status-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); }
.status-copy { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.status-copy strong { color: #bdc7cf; font-size: 13px; font-weight: 600; }
.status-copy small { color: #75828d; font-size: 10px; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { position: relative; padding: 105px 0 84px; text-align: center; }
.hero::before {
  content: "";
  position: absolute;
  width: 540px; height: 340px;
  left: 50%; top: 30px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(117,217,255,.085), transparent 68%);
  pointer-events: none;
}
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .18em; }
h1 { position: relative; margin: 0; font-family: "Gowun Dodum", sans-serif; font-size: clamp(46px, 7vw, 82px); font-weight: 400; line-height: 1.12; letter-spacing: -.055em; }
h1 em { color: var(--accent); font-style: normal; }
.hero-copy { margin: 27px 0 36px; color: #a6b0b9; font-size: 16px; line-height: 1.8; }
.search-shell { position: relative; display: flex; align-items: center; width: min(680px, 100%); height: 66px; margin: 52px auto 0; padding: 0 18px; background: #f0f4f1; border: 2px solid transparent; border-radius: 12px; box-shadow: 0 22px 70px rgba(0,0,0,.3); z-index: 4; }
.search-shell:focus-within { border-color: var(--accent); }
.search-icon { width: 18px; height: 18px; margin-right: 14px; border: 2px solid #56616a; border-radius: 50%; }
.search-icon::after { content:""; display:block; width: 7px; height:2px; background:#56616a; transform: translate(13px,13px) rotate(45deg); }
.search-shell input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #10161c; font-size: 17px; }
.search-shell input::placeholder { color: #737d84; }
kbd { padding: 3px 8px; border: 1px solid #cbd1ce; border-radius: 5px; color: #778079; background: #e4e9e5; font-size: 12px; }
.suggestions { position: absolute; top: 72px; left: 0; right: 0; padding: 8px; max-height: 330px; overflow-y: auto; text-align: left; color: var(--text); background: #102235; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.suggestion { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 14px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.suggestion:hover, .suggestion.active { color: #06131d; background: var(--accent); }
.suggestion small { color: var(--muted); }
.suggestion:hover small, .suggestion.active small { color: #315469; }
.popular { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.popular span { color: var(--muted); font-size: 12px; line-height: 28px; }
.chip { padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; color: #aeb7bf; background: transparent; font-size: 12px; cursor: pointer; }
.chip:hover { border-color: #596876; color: var(--text); }
.catalog-panel { margin: -18px 0 28px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(16,24,32,.82); }
.catalog-panel[hidden] { display: none; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.catalog-heading .eyebrow { margin: 0 0 5px; }
.catalog-heading h2 { margin: 0; font-size: 22px; }
.catalog-source { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.catalog-source a { color: #aeb8c2; }
.catalog-source a:hover { color: var(--accent); }
.catalog-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #08131f; }
.catalog-tabs button, .catalog-filters button { color: var(--muted); background: transparent; border: 1px solid transparent; cursor: pointer; }
.catalog-tabs button { padding: 8px 16px; border-radius: 8px; font-weight: 700; }
.catalog-tabs button.active { color: #06131d; background: var(--accent); }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 19px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.07); }
.catalog-secondary, .catalog-levels { margin-top: 10px; padding-top: 0; border-top: 0; }
.catalog-filters button { padding: 7px 11px; border-color: var(--line); border-radius: 999px; font-size: 12px; }
.catalog-filters button:hover, .catalog-filters button.active { color: var(--accent); border-color: rgba(117,217,255,.55); background: rgba(117,217,255,.07); }
.catalog-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.catalog-result-heading strong { font-size: 14px; }
.catalog-result-heading span { color: var(--muted); font-size: 11px; }
.catalog-items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-height: 330px; margin-top: 11px; overflow-y: auto; }
.catalog-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 10px 11px; color: #dce7ef; background: #0a1723; border: 1px solid var(--line); border-radius: 9px; text-align: left; cursor: pointer; }
.catalog-item:hover { color: var(--accent); border-color: #465667; }
.catalog-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-item small { flex: 0 0 auto; color: var(--muted); font-size: 10px; }

.empty-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 190px; padding: 28px; overflow: hidden; text-align: center; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(23,33,43,.72), rgba(15,21,28,.5)); }
.empty-panel[hidden] { display: none; }
.empty-panel h2 { margin: 14px 0 6px; font-size: 20px; }
.empty-panel p { margin: 0; color: var(--muted); font-size: 14px; }
.empty-orbit { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #465360; border-radius: 50%; }
.empty-orbit::before { content:""; position:absolute; width: 78px; height: 26px; border: 1px solid #2e3944; border-radius: 50%; transform: rotate(-25deg); }
.empty-orbit span { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); }

.result { padding-top: 15px; }
.result-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.result-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.item-icon-wrap { flex: 0 0 auto; width: 76px; height: 76px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(circle, rgba(117,217,255,.1), transparent 68%), var(--surface); }
.item-icon-wrap img { display: block; width: 100%; height: 100%; image-rendering: pixelated; object-fit: contain; }
.result-heading .eyebrow { margin-bottom: 8px; }
.result-title-row { display: flex; align-items: center; gap: 13px; min-width: 0; }
.result-heading h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; }
.item-info { position: relative; flex: 0 0 auto; }
.item-info-button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid #344451; border-radius: 999px; color: #9fb0bc; background: #111a22; cursor: help; font: inherit; font-size: 11px; font-weight: 700; }
.item-info-button span { color: var(--accent); font-size: 13px; }
.item-info-button:hover, .item-info-button:focus-visible, .item-info.is-open .item-info-button { border-color: rgba(117,217,255,.65); color: #f2f6f8; outline: none; background: rgba(117,217,255,.08); }
.item-info-tooltip { position: absolute; z-index: 30; top: calc(100% + 12px); left: 0; width: min(330px, calc(100vw - 42px)); padding: 18px; border: 1px solid #3a4a56; border-radius: 14px; color: #ecf2f5; background: linear-gradient(155deg, #17232d, #0b1926 72%); box-shadow: 0 22px 55px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.04); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s ease, transform .16s ease, visibility .16s; pointer-events: none; }
.item-info-tooltip::before { content: ""; position: absolute; top: -7px; left: 22px; width: 12px; height: 12px; border-left: 1px solid #3a4a56; border-top: 1px solid #3a4a56; background: #17232d; transform: rotate(45deg); }
.item-info:hover .item-info-tooltip, .item-info:focus-within .item-info-tooltip, .item-info.is-open .item-info-tooltip { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.item-tooltip-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-bottom: 14px; }
.item-tooltip-head small { display: block; margin-bottom: 5px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.item-tooltip-head strong { display: block; font-size: 18px; line-height: 1.25; }
.item-tooltip-level { padding: 4px 7px; border-radius: 6px; color: #091015; background: var(--accent); font-size: 11px; font-weight: 900; white-space: nowrap; }
.item-info-tooltip dl { margin: 0; }
.item-info-tooltip dl > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 5px 0; }
.item-info-tooltip dt { color: #82919c; font-size: 12px; }
.item-info-tooltip dd { margin: 0; color: #e9eef1; font-size: 12px; font-weight: 700; text-align: right; }
.item-tooltip-divider { display: flex; align-items: center; gap: 10px; margin: 11px 0 6px; color: #b9c5cc; font-size: 10px; font-weight: 800; }
.item-tooltip-divider::before, .item-tooltip-divider::after { content: ""; height: 1px; background: #2b3944; }
.item-tooltip-divider::before { width: 10px; }
.item-tooltip-divider::after { flex: 1; }
.item-tooltip-stats dd { color: var(--accent); }
.item-tooltip-empty { margin: 10px 0; color: #81909a; font-size: 12px; }
.item-tooltip-source { margin: 13px 0 0; padding-top: 11px; border-top: 1px solid #26343e; color: #64737e; font-size: 9px; line-height: 1.45; }
.ghost-button, .text-button { border: 0; background: transparent; cursor: pointer; }
.ghost-button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; color: #bac3ca; font-size: 12px; }
.ghost-button:hover { border-color: var(--accent); color: var(--accent); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat-card span { display: block; margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: clamp(19px, 2.4vw, 30px); letter-spacing: -.045em; white-space: nowrap; }
.stat-card small { display: block; margin-top: 5px; color: #65717c; font-size: 11px; line-height: 1.45; }
.stat-value-row { min-width: 0; }
.stat-value-row .comparison-badge { display: inline-block; margin: 6px 0 0; padding: 4px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.comparison-badge.up { color: #ff705a; background: rgba(255, 112, 90, .12); }
.comparison-badge.down { color: #55aaff; background: rgba(80, 160, 255, .12); }
.comparison-badge.same { color: #aeb7bf; background: rgba(174, 183, 191, .1); }
.stat-card.featured { border-color: rgba(117,217,255,.33); background: var(--accent-soft); }
.stat-card.featured strong { color: var(--accent); }
.content-grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 12px; margin-top: 12px; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.option-panel { margin-top: 12px; padding: 23px; }
.option-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.option-filter { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #0b1926; }
.option-filter > span { display: block; margin-bottom: 9px; color: #c7d0d6; font-size: 11px; font-weight: 600; }
.derived-option-filter { border-color: rgba(117,217,255,.25); background: rgba(117,217,255,.035); }
.derived-filter-title { min-height: 29px; }
.derived-filter-title b { margin-right: 6px; color: var(--accent); }
.derived-filter-title select { height: 27px; margin-right: 5px; padding: 0 24px 0 8px; color: #e4ebef; background: #11263a; border: 1px solid #34434f; border-radius: 6px; outline: none; font-size: 11px; }
.derived-filter-title select:focus { border-color: var(--accent); }
.derived-option-filter small { color: #84929c; font-weight: 400; }
.derived-filter-input { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-bottom: 0 !important; }
.derived-filter-input input { width: 100%; min-width: 0; padding: 8px; color: var(--text); background: #11263a; border: 1px solid #2b3843; border-radius: 6px; outline: none; font-size: 12px; }
.derived-filter-input input:focus { border-color: var(--accent); }
.derived-mode-toggle { min-width: 82px; padding: 0 9px; color: #aeb8c0; background: #11263a; border: 1px solid #34434f; border-radius: 6px; font-size: 10px; font-weight: 700; cursor: pointer; }
.derived-mode-toggle[aria-pressed="true"] { color: #06131d; border-color: var(--accent); background: var(--accent); }
.range-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: center; }
.range-inputs span { color: #5f6b75; font-size: 10px; }
.range-inputs input { width: 100%; min-width: 0; padding: 8px; color: var(--text); background: #11263a; border: 1px solid #2b3843; border-radius: 6px; outline: none; font-size: 12px; }
.range-inputs input:focus { border-color: var(--accent); }
.range-inputs input::placeholder { color: #56626c; }
.filter-summary { margin: 15px 0 0; color: var(--accent); font-size: 11px; }
.chart-panel, .distribution-panel { padding: 23px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; }
.panel-heading h3 { margin: 0 0 6px; font-size: 18px; }
.panel-heading p, .unit-label { margin: 0; color: #96a3ae; font-size: 13px; }
.chart-legend { display: flex; gap: 15px; margin-top: 7px; color: #96a3ae; font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend span::before { content: ""; width: 15px; height: 3px; border-radius: 99px; background: var(--accent); }
.chart-legend .count-legend::before { background: var(--orange); }
.chart-toggle { flex: 0 0 auto; }
.chart-unit-label { margin-top: -20px; color: var(--muted); font-size: 12px; text-align: right; }
.chart-content[hidden] { display: none; }
.chart-panel.is-collapsed { align-self: start; }
.content-grid.is-chart-collapsed { grid-template-columns: 1fr; }
.distribution-panel[hidden] { display: none; }
.chart-wrap { position: relative; height: 260px; margin-top: 25px; }
#priceChart { width: 100%; height: 100%; }
.chart-tooltip { position: absolute; padding: 8px 10px; pointer-events: none; color: #06131d; background: var(--accent); border-radius: 7px; font-size: 11px; font-weight: 700; transform: translate(-50%, -115%); }
.chart-tooltip.count-tooltip { background: var(--orange); }
.distribution { display: flex; flex-direction: column; gap: 15px; margin-top: 27px; }
.dist-row { display: grid; grid-template-columns: 75px 1fr 28px; align-items: center; gap: 10px; font-size: 10px; color: var(--muted); }
.dist-track { height: 8px; overflow: hidden; background: #26313a; border-radius: 99px; }
.dist-bar { height: 100%; min-width: 3px; background: var(--orange); border-radius: inherit; }
.dist-row strong { color: #aab4bc; font-size: 10px; text-align: right; }
.trades-panel { margin-top: 12px; padding: 30px; }
.text-button { color: var(--accent); font-size: 13px; font-weight: 600; }
.trade-controls { display: flex; align-items: center; gap: 7px; }
.sort-control { position: relative; }
.sort-control::after { content: "▾"; position: absolute; top: 50%; right: 10px; color: var(--accent); font-size: 10px; transform: translateY(-50%); pointer-events: none; }
.sort-control select { height: 36px; padding: 0 29px 0 11px; color: #d8e0e5; background: #11263a; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; font-weight: 600; appearance: none; cursor: pointer; }
.sort-control select:focus { outline: 1px solid var(--accent); outline-offset: 1px; }
.unit-toggle { height: 36px; padding: 0 11px; color: var(--muted); background: #11263a; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; font-weight: 600; cursor: pointer; }
.unit-toggle[aria-pressed="true"] { color: #06131d; background: var(--accent); border-color: var(--accent); }
.table-wrap { margin-top: 27px; overflow-x: auto; }
table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 15px; }
th { padding: 14px 12px; color: #91a0ac; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; text-align: right; }
th:first-child, td:first-child { text-align: left; }
td { padding: 18px 12px; color: #d0d8de; border-bottom: 1px solid rgba(37,49,61,.8); text-align: right; }
td:last-child { color: #fff; font-size: 16px; font-weight: 700; }
.option-tags { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; min-width: 300px; }
.option-tag { padding: 5px 8px; color: #d1d9df; background: #24313c; border: 1px solid #2d3d49; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.no-results { padding: 30px !important; color: var(--muted) !important; text-align: center !important; }
.trade-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 18px; }
.trade-pagination[hidden] { display: none; }
.trade-pagination button { width: 28px; height: 28px; padding: 0; color: var(--accent); background: transparent; border: 0; border-radius: 5px; font-size: 17px; cursor: pointer; }
.trade-pagination button:hover:not(:disabled) { background: var(--accent-soft); }
.trade-pagination button:disabled { color: var(--muted); opacity: .3; cursor: default; }
.pagination-status { min-width: 68px; color: #b9c4cc; font-size: 12px; font-weight: 600; text-align: center; }

.upload-section { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin: 90px 0 45px; padding: 50px clamp(28px, 5vw, 60px); border: 1px solid var(--line); border-radius: 18px; background: #0f151c; }
.upload-section .eyebrow { margin-bottom: 11px; }
.upload-section h2 { margin: 0 0 12px; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.04em; }
.upload-section p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.drop-zone { display: grid; grid-template-columns: auto 1fr; column-gap: 13px; align-items: center; padding: 22px; border: 1px dashed #495864; border-radius: 12px; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone input { display: none; }
.static-log { cursor: default; }
.static-log:hover { border-color: #495864; background: transparent; }
.upload-section code { color: var(--accent); }
.upload-arrow { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; color: #06131d; background: var(--accent); border-radius: 50%; font-size: 19px; }
.drop-zone strong { font-size: 13px; }
.drop-zone small { color: var(--muted); font-size: 11px; }
footer { display: flex; justify-content: space-between; padding: 25px clamp(24px, 5vw, 72px); color: #59646d; border-top: 1px solid rgba(255,255,255,.06); font-size: 9px; letter-spacing: .14em; }
.discord-feedback {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  color: #fff;
  background: #5865f2;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  box-shadow: 0 10px 32px rgba(0,0,0,.38);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.discord-feedback:hover { color: #fff; background: #6d78f5; box-shadow: 0 13px 38px rgba(88,101,242,.35); transform: translateY(-2px); }
.discord-feedback svg { width: 21px; height: 21px; fill: currentColor; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 10; padding: 11px 16px; opacity: 0; color: #06131d; background: var(--accent); border-radius: 8px; font-size: 12px; font-weight: 700; transform: translate(-50%, 15px); transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 850px) {
  .hero { padding-top: 78px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .option-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-section { grid-template-columns: 1fr; gap: 28px; }
  .catalog-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) and (min-width: 851px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
  main { width: min(100% - 24px, 1180px); }
  .topbar { height: 62px; padding: 0 14px; }
  .brand span:last-child { display: none; }
  .header-actions { gap: 8px; }
  .site-tabs { padding: 3px; }
  .header-link { padding: 7px 6px; font-size: 10px; }
  .hero { padding: 62px 0 55px; }
  .hero-copy { font-size: 14px; }
  .desktop-only { display: none; }
  .search-shell { height: 58px; padding: 0 13px; }
  kbd { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 17px; }
  .stat-card strong { font-size: 19px; }
  .result-heading { align-items: center; }
  .result-title-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .item-info-tooltip { position: fixed; top: 50%; left: 50%; width: min(330px, calc(100vw - 32px)); transform: translate(-50%, calc(-50% - 5px)); }
  .item-info-tooltip::before { display: none; }
  .item-info:hover .item-info-tooltip, .item-info:focus-within .item-info-tooltip, .item-info.is-open .item-info-tooltip { transform: translate(-50%, -50%); }
  .chart-panel, .distribution-panel, .trades-panel { padding: 17px; }
  .trade-controls { align-items: stretch; flex-direction: column; }
  .sort-control select, .unit-toggle { width: 100%; }
  .trade-pagination { gap: 4px; }
  .option-panel { padding: 17px; }
  .option-filters { grid-template-columns: 1fr; }
  .upload-section { margin-top: 55px; padding: 28px 20px; }
  .catalog-panel { margin-top: -28px; padding: 17px; }
  .catalog-heading { align-items: stretch; flex-direction: column; }
  .catalog-tabs { align-self: stretch; }
  .catalog-tabs button { flex: 1; }
  .catalog-result-heading { align-items: flex-start; flex-direction: column; }
  .catalog-items { grid-template-columns: 1fr; max-height: 380px; }
  footer { padding: 20px 14px; }
  .discord-feedback { right: 14px; bottom: 14px; padding: 11px; }
  .discord-feedback span { display: none; }
}
