/* ──────────────────────────────────────────────────────────────
   mscwdb — Apple-grade dark design system
   OLED-black base · SF Pro typography · iOS Blue accent
   ────────────────────────────────────────────────────────────── */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* surface */
  --bg:            #000000;
  --surface:       rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --surface-high:  rgba(255,255,255,0.06);
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);

  /* text */
  --fg:            #f5f5f7;
  --fg-secondary:  #a1a1a6;
  --fg-tertiary:   #6e6e73;

  /* accent */
  --accent:        #0A84FF;
  --accent-hover:  #409CFF;
  --accent-soft:   rgba(10,132,255,0.1);

  /* status */
  --green:         #30D158;
  --red:           #FF453A;

  /* radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* spring easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Pretendard", "Inter", "Segoe UI", -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  font-feature-settings: "ss01", "cv01", "cv11";
  letter-spacing: -0.011em;
}

/* ── Nav bar (brand-blue tint) ──────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  /* content 는 중앙 1216px 안으로 — padding 으로 좌우 균형, nav 자체는 전폭 */
  padding: 20px max(32px, calc((100% - 1216px) / 2));
  background: linear-gradient(180deg, rgba(10,132,255,0.14) 0%, rgba(10,132,255,0.06) 100%);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(10,132,255,0.28);
  display: flex; justify-content: space-between; align-items: center;
}
.nav .brand { font-size: 20px; font-weight: 600; letter-spacing: 0.08em; }
.nav .brand a { display: flex; align-items: center; gap: 12px; }
.nav .brand .brand-icon {
  width: 36px; height: 36px;
  object-fit: contain;
}
.nav .brand .brand-text { display: flex; flex-direction: column; }
.nav .brand .brand-row { display: inline-flex; align-items: center; }
.nav .brand .beta-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--accent);
  background: rgba(10,132,255,0.14);
  border: 1px solid rgba(10,132,255,0.35);
  border-radius: 999px;
  text-transform: uppercase;
}
.nav .brand a { color: var(--fg); text-decoration: none; }
.nav .brand .accent {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(10,132,255,0.4);
}
.nav .brand .sub { color: var(--fg-tertiary); font-size: 11px; font-weight: 500;
                   display: block; margin-top: 2px; letter-spacing: 0.02em; text-transform: uppercase; }

.lang {
  display: flex; gap: 2px;
  background: var(--surface); border-radius: 999px; padding: 3px;
  border: 1px solid var(--border);
}
.lang a {
  padding: 6px 14px; color: var(--fg-secondary); text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  border-radius: 999px; transition: all 180ms var(--ease-out);
}
.lang a.active { background: var(--surface-hover); color: var(--fg); }
.lang a:hover:not(.active) { color: var(--fg); }

/* ── Container ───────────────────────────────────────────── */
main { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 32px; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: 140px 0 100px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  margin-bottom: 28px;
}
.hero .eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.hero h1 {
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #c7c7cc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--fg-secondary);
  max-width: 620px; margin: 0 auto;
  letter-spacing: -0.01em; line-height: 1.5;
}

/* ── Section ─────────────────────────────────────────────── */
section { padding: 60px 0; }
h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
  margin-bottom: 48px;
}
h3 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.015em;
  margin-bottom: 10px; color: var(--fg);
}
p { color: var(--fg-secondary); font-size: 17px; line-height: 1.5; }

/* ── Feature cards grid ──────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.feature {
  display: block;
  padding: 36px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none; color: inherit;
  transition: all 240ms var(--ease-out);
  position: relative; overflow: hidden;
}
.feature::after {
  content: '→'; position: absolute; right: 28px; bottom: 28px;
  color: var(--fg-tertiary); font-size: 18px;
  transition: all 240ms var(--ease-out);
}
.feature:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.feature:hover::after { color: var(--accent); transform: translate(4px, 0); }
.feature.disabled { opacity: 0.4; pointer-events: none; }
.feature .label {
  display: inline-block; padding: 3px 10px;
  background: var(--surface-high); border: 1px solid var(--border);
  border-radius: 999px; font-size: 11px; font-weight: 600;
  color: var(--fg-tertiary); letter-spacing: 0.02em; margin-top: 14px;
}
.feature p { color: var(--fg-secondary); font-size: 15px; margin-top: 6px; }

/* ── Legal pages ─────────────────────────────────────────── */
.doc {
  max-width: 760px; margin: 0 auto;
  padding: 80px 32px 120px;
}
.doc .doc-eyebrow {
  color: var(--accent); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px;
}
.doc h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
  margin-bottom: 10px;
  color: var(--fg);
}
.doc .doc-meta { color: var(--fg-tertiary); font-size: 14px; margin-bottom: 48px; }
.doc h2 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.015em;
  margin: 48px 0 14px; color: var(--fg); border-top: none;
}
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc p { color: var(--fg-secondary); font-size: 16px; line-height: 1.7; margin: 12px 0; }
.doc ul { margin: 10px 0 20px 20px; color: var(--fg-secondary); }
.doc li { margin: 6px 0; line-height: 1.6; }
.doc strong { color: var(--fg); font-weight: 600; }
.doc a { color: var(--accent); text-decoration: none; }
.doc a:hover { text-decoration: underline; }
.doc .callout {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px 22px; margin: 16px 0;
  font-size: 15px;
}
.doc code {
  background: var(--surface-high); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 6px;
  color: var(--accent); font-size: 14px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  margin-top: 100px;
  padding: 48px 32px 60px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--fg-tertiary);
  font-size: 13px;
}
footer .links { margin-bottom: 20px; }
footer a {
  color: var(--fg-secondary); margin: 0 14px; text-decoration: none;
  transition: color 180ms var(--ease-out);
}
footer a:hover { color: var(--fg); }
footer .fine { font-size: 12px; color: var(--fg-tertiary); line-height: 1.6; max-width: 640px; margin: 0 auto; }

/* ── Live ticker (gentle blue strip) ──────────────────────── */
.ticker {
  background: rgba(10,132,255,0.08);
  border-top: 1px solid rgba(10,132,255,0.2);
  border-bottom: 1px solid rgba(10,132,255,0.2);
  overflow: hidden; position: relative;
  padding: 5px 0; margin: 0;
}
.ticker-track {
  display: flex; gap: 40px; width: max-content;
  animation: scroll 60s linear infinite;
}
.ticker-item {
  color: #8ab4f8; font-size: 11px; font-weight: 500;
  white-space: nowrap; letter-spacing: -0.005em;
  display: inline-flex; align-items: center; gap: 10px;
}
.ticker-item strong { color: var(--fg); font-weight: 600; }
.ticker-item .pos { color: var(--green); }
.ticker-item .neg { color: var(--red); }
.ticker-item .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); opacity: 0.9;
}
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Stats block ─────────────────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden;
}
.stats .stat {
  padding: 32px 24px; background: var(--bg); text-align: center;
}
.stats .stat .n {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1; margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.stats .stat .l {
  color: var(--fg-tertiary); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em;
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Section header ──────────────────────────────────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.section-head .more {
  color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 500;
}
.section-head .more:hover { color: var(--accent-hover); }

/* ── Row list (sales / items) ────────────────────────────── */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 44px 1fr auto auto;
  gap: 16px; padding: 14px 16px; align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 180ms var(--ease-out);
  color: inherit; text-decoration: none;
}
.row:last-child { border-bottom: none; }
.row:hover { background: var(--surface); }
.row .av {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-tertiary); font-size: 18px; font-weight: 600;
}
.row .nm { font-size: 15px; font-weight: 500; color: var(--fg); }
.row .meta { font-size: 12px; color: var(--fg-tertiary); margin-top: 2px; }
.row .price { font-size: 14px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.row .delta { font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; text-align: right; }
.row .delta.up { color: var(--green); }
.row .delta.down { color: var(--red); }
.row .chevron { color: var(--fg-tertiary); font-size: 16px; }

/* ── Grid of channel chips ───────────────────────────────── */
.chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.chips a {
  padding: 14px 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); text-align: center; text-decoration: none;
  color: var(--fg); font-size: 13px; font-weight: 500;
  transition: all 180ms var(--ease-out);
}
.chips a:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.chips a .ct { display: block; font-size: 11px; color: var(--fg-tertiary); margin-top: 2px; font-weight: 400; }

/* ── CTA banner ──────────────────────────────────────────── */
.banner {
  padding: 48px 40px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(10,132,255,0.02) 100%);
  border: 1px solid rgba(10,132,255,0.2);
  border-radius: var(--r-xl);
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px; margin: 60px 0;
}
.banner h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.banner p { color: var(--fg-secondary); font-size: 15px; }
.banner .btn {
  padding: 12px 24px; background: var(--accent); color: #fff;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px;
  flex-shrink: 0; transition: background 180ms var(--ease-out);
}
.banner .btn:hover { background: var(--accent-hover); }
@media (max-width: 640px) {
  .banner { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
}

/* ── Notice box ──────────────────────────────────────────── */
.notice {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px 20px; display: flex; align-items: flex-start; gap: 14px;
  margin: 20px 0;
}
.notice .icn {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.notice .ctn h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--fg); }
.notice .ctn p { color: var(--fg-secondary); font-size: 13px; margin: 0; }
.notice .ctn p a { color: var(--accent); text-decoration: none; }

/* ── Hub cards (homepage big tiles) ─────────────────────── */
.hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.hub .tile {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 32px 28px 28px;
  min-height: 200px;
  transition: all 240ms var(--ease-out);
  position: relative; overflow: hidden;
}
.hub .tile::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at top right, var(--accent-soft), transparent 60%);
  opacity: 0; transition: opacity 300ms var(--ease-out);
}
.hub .tile:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.hub .tile:hover::before { opacity: 1; }
.hub .tile.ready { border-color: rgba(10,132,255,0.3); }
.hub .tile .icon {
  width: 52px; height: 52px; border-radius: var(--r-md);
  background: var(--surface-high); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 18px;
  position: relative; z-index: 1; overflow: hidden;
}
.hub .tile .icon img {
  max-width: 40px; max-height: 40px; image-rendering: pixelated;
}
.hub .tile h3 {
  font-size: 20px; font-weight: 600; letter-spacing: -0.015em;
  margin-bottom: 6px; position: relative; z-index: 1;
}
.hub .tile p {
  font-size: 14px; color: var(--fg-secondary); line-height: 1.5;
  position: relative; z-index: 1;
}
.hub .tile .status {
  position: absolute; top: 20px; right: 20px;
  padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.hub .tile .status.live {
  background: rgba(48,209,88,0.12); color: var(--green);
  border: 1px solid rgba(48,209,88,0.3);
}
.hub .tile .status.soon {
  background: var(--surface-high); color: var(--fg-tertiary);
  border: 1px solid var(--border);
}
.hub .tile .arrow {
  position: absolute; bottom: 28px; right: 28px;
  color: var(--fg-tertiary); font-size: 20px;
  transition: all 240ms var(--ease-out);
}
.hub .tile:hover .arrow { color: var(--accent); transform: translateX(4px); }

/* ── Hero search bar (unified) ────────────────────────── */
.search-hero {
  max-width: 720px; margin: 0 auto;
  position: relative;
}
.search-hero .input-wrap {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 4px 6px 4px 22px;
  transition: all 180ms var(--ease-out);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}
.search-hero .input-wrap:focus-within {
  background: var(--surface-hover); border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(10,132,255,0.15);
}
.search-hero .ic {
  color: var(--fg-tertiary); font-size: 18px; margin-right: 12px; flex-shrink: 0;
}
.search-hero input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--fg); font-size: 17px; padding: 16px 0; font-family: inherit;
  letter-spacing: -0.01em;
}
.search-hero input::placeholder { color: var(--fg-tertiary); }
.search-hero .go {
  background: var(--accent); color: #fff; border: none; border-radius: 999px;
  padding: 11px 22px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background 180ms var(--ease-out);
  flex-shrink: 0;
}
.search-hero .go:hover { background: var(--accent-hover); }
.search-hero .hints {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 16px;
}
.search-hero .hint {
  padding: 5px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; font-size: 12px; color: var(--fg-secondary);
  text-decoration: none; cursor: pointer;
  transition: all 180ms var(--ease-out);
}
.search-hero .hint:hover { background: var(--surface-hover); color: var(--fg); border-color: var(--border-strong); }
@media (max-width: 540px) {
  .search-hero input { font-size: 15px; padding: 12px 0; }
  .search-hero .go { padding: 9px 16px; font-size: 13px; }
  .search-hero .input-wrap { padding-left: 16px; }
}

/* ── Sold (판매 기록) ─────────────────────────────────── */
.sold-list { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; width: 100%; }
.sold-item {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 20px; align-items: center;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 180ms var(--ease-out);
}
.sold-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.sold-item .ic {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--surface-high); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sold-item .ic img { max-width: 48px; max-height: 48px; image-rendering: pixelated; }
.sold-item .nm {
  font-size: 15px; font-weight: 600; color: var(--fg); letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px;
}
.sold-item .nm .id {
  font-size: 11px; color: var(--fg-tertiary); font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.sold-item .meta {
  font-size: 12px; color: var(--fg-tertiary);
}
.sold-item .metrics {
  display: flex; gap: 32px; align-items: center;
  font-variant-numeric: tabular-nums;
}
.sold-item .metrics .m { text-align: right; }
.sold-item .metrics .m .l {
  display: block; font-size: 10px; color: var(--fg-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px;
  font-weight: 500;
}
.sold-item .metrics .m .n {
  display: block; font-size: 15px; font-weight: 600;
  color: var(--fg); letter-spacing: -0.02em;
}
.sold-item .metrics .m .n.up { color: var(--red); }       /* 최고 = 비싼 가격 */
.sold-item .metrics .m .n.down { color: var(--green); }   /* 최저 = 저렴 */
.sold-item .chev {
  color: var(--fg-tertiary); font-size: 20px;
  transition: transform 240ms var(--ease-out);
}
.sold-item:hover .chev { color: var(--accent); }
.sold-item.expanded .chev { transform: rotate(90deg); color: var(--accent); }
.sold-item.expanded {
  background: var(--surface-hover);
  border-color: rgba(10,132,255,0.4);
}
@media (max-width: 720px) {
  .sold-item { grid-template-columns: 48px 1fr; }
  .sold-item .metrics { grid-column: 1 / -1; gap: 20px; justify-content: space-between; }
  .sold-item .chev { display: none; }
}

/* Sold tab subfilter bar (above list) */
.sold-subfilter {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px 16px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  grid-column: 1 / -1;
}
.sold-subfilter .fl { font-size: 11px; font-weight: 600; color: var(--fg-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-right: 4px; }
.sold-subfilter select, .sold-subfilter button {
  background: var(--bg); border: 1px solid var(--border); color: var(--fg);
  padding: 7px 12px; border-radius: 999px; font-size: 12px; font-family: inherit;
  font-weight: 500; cursor: pointer; outline: none;
  transition: all 180ms var(--ease-out);
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path fill='%23a1a1a6' d='M5 7L1 3h8z'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 28px;
}
.sold-subfilter select:hover, .sold-subfilter button:hover {
  background-color: var(--surface-hover); border-color: var(--border-strong);
}
.sold-subfilter select:focus { border-color: var(--accent); }
/* native option list — force dark */
.sold-subfilter select option { background: #171521; color: var(--fg); }
.sold-subfilter .no-trade {
  color: var(--fg-tertiary); font-size: 12px; margin-left: auto;
  display: flex; align-items: center; gap: 6px;
}
.sold-subfilter .no-trade input { accent-color: var(--accent); }

/* No-trade row (greyed) */
.sold-item.notrade { opacity: 0.55; }
.sold-item.notrade .metrics { font-style: italic; color: var(--fg-tertiary); }

/* Expanded details (inline accordion) */
.sold-details {
  grid-column: 1 / -1; width: 100%;
  background: var(--surface);
  border: 1px solid rgba(10,132,255,0.4);
  border-radius: var(--r-md);
  overflow: hidden;
  max-height: 0; opacity: 0;
  transition: max-height 420ms var(--ease-out), opacity 240ms var(--ease-out), margin 320ms var(--ease-out);
  margin-top: 0;
}
.sold-details.open {
  max-height: 1200px; opacity: 1; margin-top: -4px;
}
.sold-details .inner { padding: 24px 28px; }

/* Stats row inside expanded */
.sd-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; margin-bottom: 24px;
}
.sd-stats .st { padding: 16px 12px; background: #0a0a0d; text-align: center; font-variant-numeric: tabular-nums; }
.sd-stats .st .n { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); line-height: 1; }
.sd-stats .st .n.up { color: var(--red); }
.sd-stats .st .n.down { color: var(--green); }
.sd-stats .st .l {
  font-size: 10px; color: var(--fg-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 6px; font-weight: 500;
}

/* Chart */
.sd-chart-wrap {
  margin: 24px 0; padding: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.sd-chart-wrap h4 {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--fg-tertiary); margin-bottom: 12px;
}
.sd-chart { width: 100%; height: 180px; display: block; }
.sd-chart .grid-line { stroke: rgba(255,255,255,0.06); stroke-width: 1; }
.sd-chart .avg-line  { stroke: rgba(255,255,255,0.3); stroke-width: 1; stroke-dasharray: 4,4; }
.sd-chart .area {
  fill: url(#spark-grad);
}
.sd-chart .line  { fill: none; stroke: var(--accent); stroke-width: 2; }
.sd-chart .dot   { fill: var(--accent); }
.sd-chart .lbl   { fill: var(--fg-tertiary); font-size: 10px; font-family: -apple-system, system-ui, sans-serif; }

/* Base info panel (maplestory.io metadata) */
.sd-base {
  display: grid; grid-template-columns: 72px 1fr; gap: 16px;
  padding: 16px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.sd-base .ic-big {
  width: 72px; height: 72px; border-radius: 12px;
  background: var(--surface-high); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sd-base .ic-big img { max-width: 60px; max-height: 60px; image-rendering: pixelated; }
.sd-base .info-head {
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--fg-tertiary); margin-bottom: 6px;
}
.sd-base .props {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.sd-base .prop {
  font-size: 12px; padding: 4px 10px;
  background: var(--surface-high); border: 1px solid var(--border);
  border-radius: 999px; color: var(--fg); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.sd-base .prop .l { color: var(--fg-tertiary); font-weight: 400; margin-right: 4px; }

/* Filter row */
.sd-filter {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 14px 16px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.sd-filter .fl { font-size: 12px; font-weight: 600; color: var(--fg-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-right: 4px; }
.sd-filter .fx {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg-secondary);
}
.sd-filter .fx input[type="number"] {
  width: 64px; background: var(--bg); border: 1px solid var(--border);
  color: var(--fg); padding: 6px 10px; border-radius: 8px; font-size: 13px;
  font-family: inherit; font-variant-numeric: tabular-nums; outline: none;
}
.sd-filter .fx input[type="number"]:focus { border-color: var(--accent); }
.sd-filter .fx label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sd-filter .fx input[type="checkbox"] { accent-color: var(--accent); }
.sd-filter .reset {
  margin-left: auto; padding: 6px 14px;
  background: transparent; border: 1px solid var(--border);
  color: var(--fg-secondary); font-size: 12px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-weight: 500;
  transition: all 180ms var(--ease-out);
}
.sd-filter .reset:hover { background: var(--surface-hover); color: var(--fg); }

/* Trade list inside expanded */
.sd-trades-head {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--fg-tertiary); margin-bottom: 10px;
}
.sd-trades { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.sd-trades::-webkit-scrollbar { width: 6px; }
.sd-trades::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
@media (max-width: 540px) {
  .sold-details .inner { padding: 18px 16px; }
  .sd-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Sold detail modal ─────────────────────────────────── */
.sold-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 240ms var(--ease-out);
}
.sold-modal-overlay.open { opacity: 1; pointer-events: auto; }
.sold-modal {
  background: #0a0a0d;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  max-width: 720px; width: 100%; max-height: 85vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(10px); transition: transform 240ms var(--ease-out);
}
.sold-modal-overlay.open .sold-modal { transform: translateY(0); }
.sold-modal-head {
  padding: 28px 32px; border-bottom: 1px solid var(--border);
  display: flex; gap: 20px; align-items: center;
}
.sold-modal-head .ic {
  width: 72px; height: 72px; border-radius: 16px;
  background: var(--surface-high); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sold-modal-head .ic img { max-width: 60px; max-height: 60px; image-rendering: pixelated; }
.sold-modal-head .title { flex: 1; }
.sold-modal-head .title h2 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--fg); margin: 0 0 4px;
}
.sold-modal-head .title .iid {
  font-size: 12px; color: var(--fg-tertiary);
  font-variant-numeric: tabular-nums;
}
.sold-modal-head .close {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50%; width: 32px; height: 32px;
  color: var(--fg-secondary); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 180ms var(--ease-out);
}
.sold-modal-head .close:hover { background: var(--surface-hover); color: var(--fg); }

.sold-modal-stats {
  padding: 20px 32px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.sold-modal-stats .st {
  background: #0a0a0d; padding: 16px 12px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.sold-modal-stats .st .n {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); line-height: 1;
}
.sold-modal-stats .st .n.up { color: var(--red); }
.sold-modal-stats .st .n.down { color: var(--green); }
.sold-modal-stats .st .l {
  font-size: 10px; color: var(--fg-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 6px; font-weight: 500;
}

.sold-modal-body {
  flex: 1; overflow-y: auto; padding: 20px 32px 28px;
}
.sold-modal-body h3 {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--fg-tertiary); margin-bottom: 12px;
}
.sold-trades { display: flex; flex-direction: column; }
.sold-trade {
  display: grid; grid-template-columns: 1.4fr 1fr auto auto;
  gap: 14px; padding: 12px 0; align-items: center;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.sold-trade:last-child { border-bottom: none; }
.sold-trade .who { font-size: 13px; color: var(--fg); font-weight: 500; min-width: 0; }
.sold-trade .who .where { color: var(--fg-tertiary); font-size: 11px; display: block; margin-top: 2px; font-weight: 400;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sold-trade .opts { display: flex; flex-wrap: wrap; gap: 4px; }
.sold-trade .opts .chip {
  font-size: 10px; padding: 3px 8px; border-radius: 999px; font-weight: 600;
  background: var(--surface-high); color: var(--fg-secondary);
  border: 1px solid var(--border); letter-spacing: 0.01em;
}
.sold-trade .opts .chip.clean { background: rgba(48,209,88,0.1); color: var(--green); border-color: rgba(48,209,88,0.25); }
.sold-trade .opts .chip.scroll { background: rgba(10,132,255,0.1); color: var(--accent); border-color: rgba(10,132,255,0.25); }
.sold-trade .opts .chip.att { background: rgba(255,69,58,0.1); color: var(--red); border-color: rgba(255,69,58,0.25); }
.sold-trade .pr { font-size: 14px; font-weight: 600; color: var(--fg); text-align: right; }
.sold-trade .ago { font-size: 11px; color: var(--fg-tertiary); min-width: 72px; text-align: right; }
@media (max-width: 540px) {
  .sold-trade { grid-template-columns: 1fr auto; gap: 8px; }
  .sold-trade .opts { grid-column: 1 / -1; }
  .sold-trade .ago { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 540px) {
  .sold-modal-head { padding: 20px; gap: 14px; }
  .sold-modal-stats { padding: 16px 20px; grid-template-columns: repeat(2,1fr); }
  .sold-modal-body { padding: 16px 20px 24px; }
}

/* ── EXP Tracker card (cw-helper inspired) ──────────────── */
.tracker-wrap { padding: 40px 0 80px; }
.tracker-head { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tracker-head h2 { font-size: 24px; margin: 0; }
.tracker-head .act { display: flex; gap: 8px; }
.tracker-head .act button {
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--fg); cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 13px;
  transition: all 180ms var(--ease-out);
}
.tracker-head .act button.primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.tracker-head .act button.primary:hover { background: var(--accent-hover); }
.tracker-head .act button:hover { background: var(--surface-hover); border-color: var(--border-strong); }

.exp-card {
  display: grid;
  grid-template-columns: 44px 56px 1fr auto;
  gap: 16px; align-items: center;
  padding: 14px 20px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 180ms var(--ease-out);
}
.exp-card:hover { background: var(--surface-hover); border-color: var(--border-strong); }

.exp-rank {
  width: 36px; height: 36px; border-radius: 50%;
  background: #ff9f0a; color: #000; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(255,159,10,0.25);
}
.exp-rank.r1 { background: linear-gradient(135deg,#ffd60a,#ff9f0a); }
.exp-rank.r2 { background: linear-gradient(135deg,#aeaeb2,#8e8e93); }
.exp-rank.r3 { background: linear-gradient(135deg,#c76e3a,#a0522d); color: #fff; }

.exp-lvl {
  width: 56px; padding: 4px 6px; border-radius: 10px;
  background: linear-gradient(180deg,#1c1c1e,#000);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ffd60a; font-size: 10px; font-weight: 700; text-align: center;
  display: flex; flex-direction: column; align-items: center; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.exp-lvl .label { font-size: 8px; color: #a1a1a6; letter-spacing: 0.1em; }
.exp-lvl .num   { font-size: 18px; }

.exp-main { min-width: 0; }
.exp-nm {
  font-size: 15px; font-weight: 700; color: var(--fg); letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.exp-nm .horn { color: var(--accent); font-size: 13px; }
.exp-status {
  font-size: 11px; color: var(--fg-tertiary);
  display: flex; align-items: center; gap: 6px;
}
.exp-status .live-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
}

.exp-bar-wrap { grid-column: 3; margin-top: 8px; }
.exp-bar {
  position: relative; height: 24px; border-radius: 12px;
  background: #2a2a2e; border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.exp-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(180deg, #30D158 0%, #228B22 100%);
  box-shadow: 0 0 8px rgba(48,209,88,0.4);
  transition: width 500ms var(--ease-out);
}
.exp-fill.gradient-blue {
  background: linear-gradient(180deg, #0A84FF 0%, #0062cc 100%);
}
.exp-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6); font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.exp-label em { color: #ffd60a; font-style: normal; font-weight: 800; margin-right: 6px; }

.exp-mini {
  grid-column: 3; margin-top: 6px;
  display: flex; align-items: flex-end; gap: 2px;
  height: 16px;
}
.exp-mini .b {
  width: 4px; background: var(--accent); opacity: 0.35; border-radius: 1px;
}
.exp-mini .b.hi { opacity: 0.9; }

.exp-foot {
  grid-column: 3; margin-top: 4px;
  font-size: 11px; color: var(--fg-tertiary); font-variant-numeric: tabular-nums;
}

.exp-rate {
  text-align: right; min-width: 90px;
  font-variant-numeric: tabular-nums;
}
.exp-rate .big {
  font-size: 20px; font-weight: 700; color: var(--fg); letter-spacing: -0.02em;
  background: linear-gradient(180deg,#fff,#aeaeb2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.exp-rate .sm { font-size: 10px; color: var(--fg-tertiary); letter-spacing: 0.03em; margin-top: 2px; }

@media (max-width: 720px) {
  .exp-card { grid-template-columns: 36px 48px 1fr; gap: 10px; padding: 12px 14px; }
  .exp-rate { grid-column: 1 / -1; text-align: left; margin-top: 6px; }
  .exp-bar-wrap, .exp-mini, .exp-foot { grid-column: 1 / -1; }
}

/* Screen capture preview panel */
.capture-panel {
  margin: 24px 0; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.capture-wrap {
  position: relative; max-width: 720px; margin: 0 auto;
  border-radius: 10px; overflow: hidden; background: #000;
}
.capture-wrap video { width: 100%; display: block; }
.capture-overlay {
  position: absolute; inset: 0; cursor: crosshair;
  pointer-events: auto;
}
.capture-overlay .box {
  position: absolute; pointer-events: none;
  border: 2px solid var(--accent);
  background: rgba(10,132,255,0.08);
}
.capture-overlay .box .lbl {
  position: absolute; top: -22px; left: 0;
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; letter-spacing: 0.05em;
  background: var(--accent); white-space: nowrap;
}
.capture-overlay .box.char { border-color: #ff9500; background: rgba(255,149,0,0.08); }
.capture-overlay .box.char .lbl { background: #ff9500; }
.capture-overlay .box.exp  { border-color: var(--accent); background: rgba(10,132,255,0.08); }
.capture-overlay .box.exp  .lbl { background: var(--accent); }
.capture-overlay .box.drafting { background: rgba(10,132,255,0.2); }
.capture-panel .empty {
  padding: 60px 20px; text-align: center; color: var(--fg-tertiary); font-size: 14px;
}
.capture-status {
  margin-top: 14px; padding: 12px 16px;
  background: var(--surface-high); border: 1px solid var(--border); border-radius: 8px;
  font-size: 12px; color: var(--fg-secondary); font-variant-numeric: tabular-nums;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.capture-status .k { color: var(--fg-tertiary); font-size: 11px; margin-right: 6px; }
.capture-status .v { color: var(--fg); font-weight: 600; }
.capture-status .v.ok { color: var(--green); }
.capture-status .v.err { color: var(--red); }

/* ROI mode buttons */
.roi-mode {
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--fg-secondary); font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 180ms var(--ease-out);
  display: inline-flex; align-items: center; gap: 8px;
}
.roi-mode .st {
  font-size: 10px; color: var(--fg-tertiary); font-weight: 500;
  background: var(--surface-high); padding: 2px 7px; border-radius: 999px;
}
.roi-mode:hover { background: var(--surface-hover); border-color: var(--border-strong); color: var(--fg); }
.roi-mode.active {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover);
}
.roi-mode.active .st { background: var(--accent); color: #fff; }
.roi-mode.set .st { background: var(--green); color: #000; }

/* Session chip row */
.session-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.session-chips .chip-s {
  padding: 7px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.session-chips .chip-s .l { color: var(--fg-tertiary); font-size: 11px; }
.session-chips .chip-s .v { color: var(--fg); font-weight: 600; }
.session-chips .chip-s.accent { background: var(--accent-soft); border-color: rgba(10,132,255,0.3); }
.session-chips .chip-s.accent .v { color: var(--accent-hover); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-with-icon .hero-icon { position: static !important; transform: none !important; display: block; margin: 0 auto 20px; width: 100px !important; height: 100px !important; }
  .nav { padding: 14px 20px; }
  .nav .brand { font-size: 17px; }
  main, .wrap { padding: 0 20px; }
  .hero { padding: 80px 0 60px; }
  .feature { padding: 28px 24px; }
  .doc { padding: 60px 20px 100px; }
}
