/* ============================================================
   QQ Market Board — Base / Shell (GNB + LNB)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--qq-gold); outline-offset: 2px; border-radius: 4px; }
.tnum { font-family: var(--ff-num); font-variant-numeric: tabular-nums; }
.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;
}

/* 스킵 링크 (키보드 첫 Tab으로 본문 이동) */
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 300;
  padding: 8px 14px; border-radius: var(--r-sm);
  background: var(--qq-gold); color: #1a1300; font-weight: 800; font-size: var(--fs-sm);
  box-shadow: var(--shadow-2); transition: top .15s ease;
}
.skip-link:focus { top: 8px; outline: 2px solid var(--text); outline-offset: 2px; }
/* main 포커스 시 외곽선 깜빡임 방지 */
.main:focus { outline: none; }
.main:focus-visible { outline: 2px solid var(--qq-gold); outline-offset: -2px; }

/* ---------- GNB ---------- */
.gnb {
  position: sticky; top: 0; z-index: 100;
  height: var(--gnb-h);
  display: flex; align-items: center; gap: var(--sp-4);
  padding: 0 var(--sp-5);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.gnb__brand { display: flex; align-items: center; gap: var(--sp-2); font-weight: 800; font-size: var(--fs-lg); letter-spacing: -.2px; }
.gnb__logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: radial-gradient(circle at 30% 30%, var(--qq-gold), var(--qq-gold-dim));
  display: grid; place-items: center; color: #1a1300; font-weight: 900; font-size: 14px;
}
.gnb__brand small { color: var(--text-3); font-weight: 600; font-size: var(--fs-2xs); }
.gnb__nav { display: flex; gap: 2px; margin-left: var(--sp-4); }
.gnb__nav a {
  padding: 8px 14px; border-radius: var(--r-sm); color: var(--text-2);
  font-weight: 600; font-size: var(--fs-sm); white-space: nowrap;
}
.gnb__nav a:hover { background: var(--hover); color: var(--text); }
.gnb__nav a.is-active { color: var(--text); background: var(--surface-2); }
.gnb__spacer { flex: 1; }
.gnb__search {
  display: flex; align-items: center; gap: 6px; height: 36px;
  padding: 0 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-pill); min-width: 200px;
}
.gnb__search input { background: none; border: none; color: var(--text); outline: none; width: 100%; font-size: var(--fs-sm); }
.gnb__search input::placeholder { color: var(--text-3); }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border);
  font-size: var(--fs-xs); color: var(--text-2); font-weight: 600;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--flat); }
.live-pill.is-live .live-dot { background: var(--sig-new); box-shadow: 0 0 0 0 rgba(22,199,132,.5); animation: pulse 1.6s infinite; }
.live-pill.is-down .live-dot { background: var(--up); }
.live-pill.is-stale .live-dot { background: var(--qq-gold); animation: none; box-shadow: none; }
.live-pill.is-stale { color: var(--qq-gold); border-color: var(--qq-gold-dim); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(22,199,132,.5)} 70%{box-shadow:0 0 0 7px rgba(22,199,132,0)} 100%{box-shadow:0 0 0 0 rgba(22,199,132,0)} }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 16px;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--lnb-w) 1fr; min-height: calc(100vh - var(--gnb-h)); }

/* ---------- LNB ---------- */
.lnb {
  border-right: 1px solid var(--border); background: var(--bg-elev);
  padding: var(--sp-4) var(--sp-3); position: sticky; top: var(--gnb-h);
  height: calc(100vh - var(--gnb-h)); overflow-y: auto;
}
.lnb__title { font-size: var(--fs-2xs); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .6px; margin: var(--sp-4) var(--sp-2) var(--sp-2); }
.lnb__title:first-child { margin-top: 0; }
.lnb__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--r-sm); border: none; background: none;
  color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; text-align: left;
}
.lnb__item:hover { background: var(--hover); color: var(--text); }
.lnb__item.is-active { background: var(--surface-2); color: var(--text); }
.lnb__item .count { margin-left: auto; font-size: var(--fs-2xs); color: var(--text-3); font-weight: 700; }
.lnb__emoji { width: 18px; text-align: center; }

/* market summary mini */
.mkt-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: var(--sp-2) 0 var(--sp-4); }
.mkt-summary div { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-sm); padding: 8px; text-align: center; }
.mkt-summary .k { font-size: var(--fs-2xs); color: var(--text-3); }
.mkt-summary .v { font-size: var(--fs-md); font-weight: 800; }

/* ---------- Main ---------- */
.main { padding: var(--sp-5) var(--sp-6); min-width: 0; }
.page-head { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-2xl); font-weight: 800; margin: 0; letter-spacing: -.4px; }
.page-head .sub { color: var(--text-3); font-size: var(--fs-sm); }

.disclaimer {
  margin-top: var(--sp-8); padding: var(--sp-3) var(--sp-4); border: 1px dashed var(--border);
  border-radius: var(--r-md); color: var(--text-3); font-size: var(--fs-xs); line-height: 1.7;
}

.mobile-bottom-nav { display: none; }
.lnb-backdrop { display: none; }
