/* 토스증권 계열의 디자인 언어를 따랐다:
   흰 바탕 · 굵은 숫자 · 얇은 구분선 · 알약형 탭 · 넉넉한 여백.
   등락 색은 한국 시장 관행대로 상승 빨강 / 하락 파랑. */

:root {
  --bg:        #FFFFFF;
  --page:      #F9FAFB;
  --card:      #FFFFFF;
  --line:      #F2F4F6;
  --line-2:    #E5E8EB;
  --ink:       #191F28;
  --ink-2:     #4E5968;
  --ink-3:     #626D7A;
  --ink-4:     #697480;
  --blue:      #1765CC;
  --blue-bg:   #EBF3FE;
  --up:        #D32F40;   /* 상승 */
  --up-bg:     #FEECEE;
  --up-ink:    #C42838;   /* 연한 빨강 배경 위 글자용(4.5:1 이상) */
  --down:      #1765CC;   /* 하락 */
  --down-bg:   #EBF3FE;
  --gold:      #966000;
  --radius:    16px;
  /* 글줄 단(段)의 폭. 페이지에는 폭이 두 가지만 있다 —
     읽는 것(산문·방법론·결론·노트)은 이 값, 보는 것(도표·표·카드)은 컨테이너 전체.
     ch가 아니라 px로 고정한다. ch는 요소의 폰트 크기를 따라가서
     같은 --measure를 줘도 블록마다 643~772px로 흔들린다. */
  --measure:   780px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.game-day-turnover { margin: 20px 0; }
.game-day-turnover[hidden] { display: none; }
.turnover-chart { display: block; width: 100%; height: 290px; margin: 16px 0; }
.turnover-chart text { fill: var(--ink-3); font: 12px var(--sans); }
.turnover-grid { stroke: var(--line-2); stroke-width: 1; }
.turnover-bar { fill: var(--blue); opacity: .7; }
.turnover-bar.selected { opacity: 1; }
.turnover-detail { margin-top: 12px; font-variant-numeric: tabular-nums; }
.game-day-turnover .turnover-limit { margin-top: 12px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:      #17171C;
    --page:    #101014;
    --card:    #1D1D22;
    --line:    #2A2B30;
    --line-2:  #35363C;
    --ink:     #E8EAED;
    --ink-2:   #B0B4BA;
    --ink-3:   #8B95A1;
    --ink-4:   #929BA7;
    --blue:    #79ADFF;
    --blue-bg: #17263D;
    --up-bg:   #33191D;
    --down-bg: #17263D;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px 80px; }

/* ── 헤더 ─────────────────────────────────────── */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
header.top .inner {
  max-width: 1000px; margin: 0 auto; padding: 0 20px;
  height: 58px; display: flex; align-items: center; gap: 26px;
}
header.top .brand { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; white-space: nowrap; }
header.top nav { display: flex; gap: 22px; font-size: 14.5px; font-weight: 500; }
header.top nav a { color: var(--ink-3); display: inline-flex; align-items: center; min-height: 32px; }
header.top nav a.on { color: var(--ink); }
header.top nav a:hover { color: var(--ink); }
header.top .spacer { flex: 1; }
header.top .built { font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
header.top .mobile-menu { display: none; }

/* 데이터 기준 시각 칩. 문장 설명은 올리거나 포커스했을 때만 펼친다.
   오래된 데이터는 금색으로 표시한다 — 빨강은 이 사이트에서 가격 상승을 뜻한다. */
.data-status {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: default;
}
.data-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.data-status.stale { color: var(--gold); border-color: rgba(245,166,35,.45); font-weight: 600; }
.data-status.stale .dot { background: var(--gold); }
.data-status .tip {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 290px;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg);
  box-shadow: 0 4px 16px rgba(0,0,0,.12); color: var(--ink-2); font-weight: 400; line-height: 1.6; white-space: normal;
}
.data-status:hover .tip, .data-status:focus .tip { display: block; }
.data-status:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.data-status .age:not(:empty)::before { content: '· '; }

/* ── 요약 카드 ─────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 26px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 18px 20px;
  border: 1px solid var(--line);
}
.card .k { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-bottom: 6px; }
.card .v { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.card .v small { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.card .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
button.weekday-summary { text-align: left; font-family: inherit; color: var(--ink); cursor: pointer; }
.weekday-summary .k, .weekday-summary .sub { display: block; }
.weekday-summary:hover { border-color: var(--blue); }
.weekday-days { display: flex; justify-content: space-between; gap: 5px; padding: 8px 0; font-size: 15px; font-weight: 600; }
.weekday-days .thu { color: var(--gold); }
.weekday-trend { scroll-margin-top: 80px; }
.weekday-trend > summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; font-size: 15px; font-weight: 700; list-style: none; }
.weekday-trend > summary::-webkit-details-marker { display: none; }
.weekday-trend > summary small { color: var(--ink-3); font-size: 12px; font-weight: 500; margin-left: 6px; }
.weekday-trend[open] > summary { margin-bottom: 16px; }
.weekday-bases { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.weekday-bases .chart-toggle { margin-left: 0; }
.weekday-trend .weekday-grid { margin: 14px 0; }
.weekday-trend .weekday-chart svg { min-width: 260px; }
.weekday-trend .legendary-weekday-table { margin-top: 12px; }
.weekday-trend th { white-space: nowrap; }
.weekday-trend thead th:not(:first-child) { text-align: right; }
.weekday-trend td { font-variant-numeric: tabular-nums; }
.weekday-thu-row { background: rgba(245,166,35,.08); }
.weekday-thu-row > th { color: var(--gold); }
.weekday-samples { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin: 16px 0; text-align: center; }
.weekday-samples > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 2px; }
.weekday-samples span { display: block; color: var(--ink-3); font-size: 12px; }
.weekday-samples b { display: block; margin-top: 4px; font-size: 16px; font-variant-numeric: tabular-nums; }
.weekday-samples .weekday-thu-row span { color: var(--gold); font-weight: 700; }
#card-weekday { scroll-margin-top: 80px; }
.card.hl { background: var(--blue-bg); border-color: transparent; }
a.card.hl:hover { border-color: var(--blue); }
.legendary-icon { display: grid; place-items: center; flex: none; width: 40px; height: 44px; border: 1px solid var(--gold); border-radius: 7px; background: var(--card); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.legendary-row .rank { font-size: 12px; }
.legendary-row .nm .t b { white-space: normal; }
.legendary-ranges { display: flex; gap: 6px; flex: none; margin-left: auto; }
.legendary-weekday-table { overflow-x: auto; }
.legendary-weekday-table table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: right; }
.legendary-weekday-table td, .legendary-weekday-table th { padding: 8px; border-bottom: 1px solid var(--line); }
.legendary-weekday-table th:first-child { text-align: left; }

/* ── 탭 ───────────────────────────────────────── */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs-end { display: flex; gap: 8px; margin-left: auto; padding-left: 16px; }
.tabs-end::before {
  content: '종결 슬롯'; align-self: center; flex: none; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--ink-4); margin-right: 2px;
}
.tab {
  flex: none; padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--card); color: var(--ink-3); border: 1px solid var(--line); cursor: pointer;
  white-space: nowrap; font-family: inherit; letter-spacing: -0.01em;
}
.tab:hover { color: var(--ink-2); }
.tab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── 리스트 ───────────────────────────────────── */
.list { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.lh, .row {
  display: grid;
  grid-template-columns: 34px minmax(150px, 1.9fr) 148px 88px 78px 96px 86px;
  align-items: center; gap: 10px; padding: 0 18px;
}
.lh {
  height: 40px; font-size: 12.5px; color: var(--ink-3); font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.lh span { cursor: pointer; user-select: none; }
.lh span:hover { color: var(--ink); }
.lh .r, .row .r { text-align: right; }
.lh .lh-short { display: none; }
.row { min-height: 68px; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: none; }
.row:hover { background: var(--page); }
.row:focus-visible, .slot:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.rank { font-size: 14px; color: var(--ink-4); font-weight: 600; font-variant-numeric: tabular-nums; }
.nm { display: flex; align-items: center; gap: 11px; min-width: 0; }
.nm img { width: 32px; height: 32px; flex: none; image-rendering: pixelated; border-radius: 8px; background: var(--line); }
.nm .t { min-width: 0; }
.nm .t b { display: block; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm .t span { font-size: 12px; color: var(--ink-3); }
.px {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  gap: 2px; font-variant-numeric: tabular-nums; text-align: right;
}
.px b { font-size: 15px; font-weight: 600; }
.px b.nov { font-size: 12.5px; font-weight: 500; }
.px small { font-size: 12px; font-weight: 500; white-space: nowrap; }
.c7 { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.c7 b { font-size: 13.5px; font-weight: 600; }
.c7 small { font-size: 12px; color: var(--ink-4); white-space: nowrap; }
.chg { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.dim { font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink-3); }
.spark { height: 30px; width: 100%; }

.tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 6px;
  border-radius: 5px; background: var(--blue-bg); color: var(--blue); margin-left: 6px;
  vertical-align: 1px;
}
.tag.fin { background: var(--up-bg); color: var(--up-ink); }
.tag.g { background: var(--line); color: var(--ink-3); }

.hint { font-size: 13px; color: var(--ink-3); margin: 14px 2px 0; line-height: 1.75; }
.hint b { color: var(--ink-2); }

/* ── 거래대금 TOP100 ───────────────────────────── */
.ranking-title { margin: 8px 0 22px; }
.ranking-title h1 { margin: 0; font-size: 28px; letter-spacing: -0.04em; }
.ranking-title p { margin: 5px 0 0; color: var(--ink-3); font-size: 14px; }
.ranking-title .tag { vertical-align: 5px; }
.ranking-lh, .ranking-row {
  display: grid; grid-template-columns: 34px minmax(180px, 1.8fr) 100px 112px 86px 82px;
  align-items: center; gap: 10px; padding: 0 18px;
}
.ranking-lh {
  height: 40px; border-bottom: 1px solid var(--line);
  color: var(--ink-3); font-size: 12.5px; font-weight: 500;
}
.ranking-row { min-height: 66px; border-bottom: 1px solid var(--line); }
.ranking-row:last-child { border-bottom: 0; }
a.ranking-row:hover { background: var(--page); }
.rank-turnover { text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.basis-tag {
  justify-self: end; padding: 2px 7px; border-radius: 6px;
  color: var(--ink-3); background: var(--line); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.basis-tag.collected { color: var(--blue); background: var(--blue-bg); }
.basis-tag.estimated { color: var(--gold); background: rgba(245,166,35,.12); }
/* 24시간의 5%(72분)도 관측하지 못한 종목. 같은 환산이라도 신뢰도가 크게 떨어진다.
   같은 색상을 진하게만 쓴다 — 빨강은 이 사이트에서 가격 상승을 뜻하므로 경고에 쓰지 않는다. */
.basis-tag.estimated.wide { background: rgba(245,166,35,.24); box-shadow: inset 0 0 0 1px rgba(245,166,35,.45); }

/* ── 차트 툴팁 ─────────────────────────────────── */
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 8px 11px; font-size: 12px; line-height: 1.55;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chart-tip .tt { color: var(--ink-3); font-size: 12px; margin-bottom: 4px; }
.chart-tip .tr { display: flex; justify-content: space-between; gap: 18px; }
.chart-tip .tr span { color: var(--ink-3); }
.chart-tip .tr b { font-weight: 600; }
.ranking-note { max-width: none; margin-top: 14px; }

/* ── 상세 ─────────────────────────────────────── */
.back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--ink-3); font-weight: 500; margin-bottom: 4px; }
.back:hover { color: var(--ink); }
.dh { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.dh img { width: 48px; height: 48px; image-rendering: pixelated; border-radius: 12px; background: var(--line); }
.dh h1, .dh h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.guide-h { margin: 0 0 4px; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.page-title { margin: 8px 0 14px; font-size: 28px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.25; }
.dh .meta { font-size: 13px; color: var(--ink-3); }
.bigpx { font-size: 34px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin: 14px 0 2px; }
.bigpx small { font-size: 16px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.price-meta { font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.price-basis { margin-top: 14px; }
.price-basis + .bigpx { margin-top: 2px; }
.bigchg { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 20px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.panel .desc { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.panel-head h3 { margin: 0; }
.chart-toggle {
  margin-left: auto; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--card); color: var(--ink-3); font: 600 12px var(--sans); cursor: pointer;
}
.chart-toggle.on { border-color: transparent; background: var(--blue-bg); color: var(--blue); }
.price-chart-head { flex-wrap: wrap; }
.price-chart-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.price-chart-controls .chart-toggle { margin-left: 0; min-height: 32px; }
.chart { height: 300px; }
.chart.tall { height: 340px; }
#stock-chart { height: 360px; }
#legendary-chart { height: auto; }
.stock-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 8px; font-size: 12px; color: var(--ink-3); }
.stock-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stock-price-key { width: 18px; height: 2px; background: var(--ink); }
.stock-min-key { width: 18px; height: 2px; background: var(--gold); }
.stock-qty-key { width: 10px; height: 10px; background: var(--blue); opacity: .5; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 18px 12px; }
.kv .k { font-size: 12.5px; color: var(--ink-3); }
.kv .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kv .v small { font-size: 12px; color: var(--ink-3); font-weight: 500; }

.depth-kv { margin-bottom: 16px; }
.depth-sub { font-size: 12px; color: var(--ink-3); }
/* 30일 가격 위치. 왼쪽이 최근 30일 최저, 오른쪽이 최고다. 색은 등락색을 피한다. */
.pos-bar { position: relative; height: 4px; margin: 7px 0 4px; border-radius: 2px; background: var(--line-2); max-width: 140px; }
.pos-bar i { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); border: 2px solid var(--card); transform: translate(-50%, -50%); }
.depth-chart { overflow-x: auto; }
.depth-chart svg { display: block; width: 100%; }
.depth-grid { stroke: var(--line); stroke-width: 1; }
.depth-guide { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 4 4; }
.depth-fill { fill: var(--up-bg); opacity: .7; }
.depth-line { fill: none; stroke: var(--up); stroke-width: 2; vector-effect: non-scaling-stroke; }
.depth-axis { fill: var(--ink-3); font: 12px var(--mono); }

.weekday-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.weekday-chart { min-width: 0; padding: 12px 12px 4px; background: var(--page); border-radius: 12px; overflow-x: auto; }
.weekday-chart h4, .weekday-chart h2 { margin: 0 0 2px; font-size: 13px; color: var(--ink-2); }
.weekday-chart svg { display: block; width: 100%; min-width: 340px; }
.weekday-thursday { fill: var(--gold); opacity: .09; }
.weekday-baseline { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.weekday-bar.above { fill: var(--up); }
.weekday-bar.below { fill: var(--down); }
.weekday-axis { fill: var(--ink-4); font: 12px var(--mono); }
.weekday-value { fill: var(--ink-2); font: 600 12px var(--mono); }
.weekday-label { fill: var(--ink-3); font: 12px var(--sans); }
.weekday-label.thursday { fill: var(--gold); font-weight: 700; }
.weekday-empty { margin: 0; color: var(--ink-3); font-size: 13px; }

.event-rail { position: relative; height: 30px; margin-top: 2px; }
.event-pin-group {
  position: absolute; top: 7px; transform: translateX(-50%);
  display: flex; gap: 3px;
}
.event-pin {
  position: relative; width: 22px; height: 19px;
  padding: 0; border: 0; border-radius: 5px; background: var(--blue-bg); color: var(--blue);
  font: 700 10px var(--sans); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.event-pin::before {
  content: ''; position: absolute; left: 7px; top: -4px;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid var(--blue-bg);
}
.event-pin.대규모, .event-pin.주요 { background: var(--up-bg); color: var(--up-ink); }
.event-pin.대규모::before, .event-pin.주요::before { border-bottom-color: var(--up-bg); }
.event-pin.패키지 { background: rgba(245,166,35,.14); color: var(--gold); }
.event-pin.패키지::before { border-bottom-color: rgba(245,166,35,.14); }
.event-pin:hover { filter: brightness(.97); }

.event-study { border-top: 1px solid var(--line); margin-top: 2px; }
.event-study summary {
  display: flex; align-items: center; gap: 8px; padding: 14px 0; cursor: pointer;
  list-style: none; font-size: 14px; font-weight: 700; user-select: none;
}
.event-study summary::-webkit-details-marker { display: none; }
.event-study summary small { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.event-study summary i { margin-left: auto; color: var(--ink-3); font-style: normal; font-size: 18px; transition: transform .18s ease; }
.event-study[open] summary i { transform: rotate(180deg); }
.event-body { padding-bottom: 4px; }
.event-study .desc { margin-bottom: 10px; }
.event-empty { margin: 0; color: var(--ink-3); font-size: 13px; }
.event-row { padding: 12px 0; border-top: 1px solid var(--line); }
.event-row:first-child { border-top: 0; }
.event-name { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-bottom: 10px; }
.event-name .tag { margin-left: 0; }
.event-name a, .event-source { margin-left: auto; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.event-name a:hover { color: var(--blue); }
.event-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.event-stages > div { background: var(--page); border-radius: 9px; padding: 9px 10px; }
.event-stages span, .event-stages small { display: block; color: var(--ink-3); font-size: 12px; }
.event-stages > div > b { display: block; font-size: 13px; margin: 2px 0 3px; }
.event-stages small b { display: inline; font-size: inherit; }

/* ── 분석 페이지 ──────────────────────────────── */
h2.sec { font-size: 34px; font-weight: 700; letter-spacing: -0.045em; margin: 96px 0 18px; line-height: 1.25; }
h2.sec .n { display: block; color: var(--blue); font-size: 13px; font-weight: 700; letter-spacing: .1em; margin-bottom: 6px; }
h3.sub { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; margin: 26px 0 8px; }
p { margin: 0 0 15px; color: var(--ink-2); }
p b, li b { color: var(--ink); font-weight: 600; }
ul { color: var(--ink-2); padding-left: 20px; }
li { margin-bottom: 7px; }
code { font-family: var(--mono); font-size: .87em; background: var(--line); padding: .12em .4em; border-radius: 5px; color: var(--ink); }
.lead { font-size: 18px; line-height: 1.68; color: var(--ink); max-width: var(--measure); }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
tr:last-child td { border-bottom: none; }
th.r, td.r { text-align: right; font-variant-numeric: tabular-nums; }
td b { color: var(--ink); }

.bars { margin: 18px 0 8px; }
.bar-row { display: grid; grid-template-columns: 40px 1fr 88px; align-items: center; gap: 12px; padding: 4px 0; font-size: 13.5px; }
.bar-row .lab { color: var(--ink-2); font-weight: 500; }
.bar-track { position: relative; height: 22px; background: var(--line); border-radius: 6px; }
.bar-track .zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.bar-track .fill { position: absolute; top: 4px; bottom: 4px; border-radius: 3px; }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-3); }
.bar-row.sig .lab { color: var(--ink); font-weight: 700; }

footer { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); line-height: 1.9; }
footer b { color: var(--ink-2); }
/* 헤더에서 뺀 피드백 입구. 푸터 안에서도 한눈에 보이도록 버튼 모양으로 둔다. */
.feedback-link {
  display: inline-block; margin: 0 6px 8px 0; padding: 5px 12px; border-radius: 999px;
  background: var(--blue-bg); color: var(--blue); font-weight: 600;
}
.feedback-link:hover { background: var(--blue); color: #fff; }

/* ── 지표 설명 페이지 ─────────────────────────── */
.guide-title .guide-icon {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  border-radius: 12px; background: var(--blue-bg); color: var(--blue);
  font: 700 24px var(--mono);
}
.guide-overview { margin-top: 22px; }
.guide-jumps {
  display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px;
}
.guide-jumps a {
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink-3); font-size: 12.5px; font-weight: 600;
}
.guide-jumps a:hover { color: var(--blue); border-color: var(--line-2); }
.guide-panel { scroll-margin-top: 76px; }
.guide-panel h3 { margin-bottom: 5px; }
.guide-no { color: var(--blue); font: 700 12px var(--mono); margin-right: 8px; vertical-align: 1px; }
.guide-example {
  margin: 14px 0; padding: 16px; border-radius: 12px; background: var(--page);
}
.guide-example .bigpx { margin-top: 0; }
.guide-muted { color: var(--ink-3); font-weight: 500; }
.guide-copy {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; margin-top: 14px;
}
.guide-copy > div {
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px;
}
.guide-copy b, .guide-copy span { display: block; }
.guide-copy b { margin-bottom: 3px; font-size: 13px; color: var(--ink); }
.guide-copy span { font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }
.guide-foot { margin: 14px 0 0; max-width: none; font-size: 12.5px; color: var(--ink-3); }
.guide-table { margin-bottom: 0; max-width: none; }
.guide-table table { min-width: 520px; }
.guide-chart {
  height: 250px; margin: 14px 0 8px; overflow: hidden; border-radius: 12px;
  background: var(--page);
}
.guide-chart svg { display: block; width: 100%; height: 100%; }
.guide-grid { stroke: var(--line-2); stroke-width: 1; }
.guide-candles line { stroke: var(--ink-3); stroke-width: 2; vector-effect: non-scaling-stroke; }
.guide-candles rect.up-candle { fill: var(--up); }
.guide-candles rect.down-candle { fill: var(--down); }
.guide-vwap {
  fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round;
}
.guide-vwap { stroke: var(--ink); stroke-width: 2; }
.guide-volume rect { fill: var(--blue); opacity: .25; }
.guide-legend { display: flex; flex-wrap: wrap; gap: 9px 18px; color: var(--ink-3); font-size: 12px; }
.guide-legend span { display: inline-flex; align-items: center; gap: 6px; }
.guide-legend i { width: 18px; height: 3px; display: inline-block; border-radius: 2px; }
.guide-legend i.candle { background: linear-gradient(90deg, var(--up) 0 50%, var(--down) 50%); }
.guide-legend i.actual { background: var(--ink); }
.guide-legend i.volume { height: 8px; background: var(--blue); opacity: .35; }
.guide-static-toggle { pointer-events: none; }
.guide-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.guide-tags .tag { margin-left: 0; }
.tag.guide-package { background: rgba(245,166,35,.14); color: var(--gold); }
.guide-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin: 14px 0; }
.guide-weekdays > div { padding: 11px 6px; text-align: center; border-radius: 9px; background: var(--page); }
.guide-weekdays span, .guide-weekdays b { display: block; }
.guide-weekdays span { color: var(--ink-3); font-size: 12px; }
.guide-weekdays b { font: 700 15px var(--mono); }
.guide-weekdays .thu { background: rgba(245,166,35,.1); color: var(--gold); }
.guide-formula {
  margin: 14px 0; padding: 13px 15px; border-radius: 10px; background: var(--page);
  color: var(--ink-2); font: 500 13px var(--mono); text-align: center;
}
.guide-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.guide-split > div { padding: 15px; border-radius: 10px; }
.guide-split > div:first-child { background: var(--up-bg); }
.guide-split > div:first-child.up { color: var(--up-ink); }   /* 연한 빨강 배경 위 4.5:1 */
/* 표 셀·요약 줄 안의 보조 글씨는 브라우저 기본(약 11.7px)에 맡기지 않고 12px로 */
td small, summary small { font-size: 12px; }
.guide-split > div:last-child { background: var(--down-bg); }
.guide-split.neutral > div { background: var(--page); color: var(--ink); }
.guide-split b, .guide-split span, .guide-split small { display: block; }
.guide-split span { color: var(--ink-2); font-size: 13px; }
.guide-split small { margin-top: 4px; color: var(--ink-3); font-size: 12px; }
.guide-static-switch span {
  padding: 6px 20px; border-radius: 999px; color: var(--ink-3); font-size: 14px; font-weight: 600;
}
.guide-static-switch span.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.guide-limit ul { max-width: none; margin-bottom: 0; }

@media (max-width: 780px) {
  .wrap { padding: 0 12px 64px; }
  header.top { margin-bottom: 18px; }
  header.top .inner { min-height: 50px; height: auto; padding: 8px 12px; gap: 8px 14px; flex-wrap: wrap; }
  header.top .inner > nav { display: none; }
  header.top .mobile-menu { display: block; position: relative; flex: none; }
  .mobile-menu summary { cursor: pointer; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13.5px; font-weight: 600; }
  .mobile-menu summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
  header.top .mobile-menu nav { position: absolute; top: calc(100% + 8px); left: 0; min-width: 150px; padding: 6px; flex-direction: column; gap: 0; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); box-shadow: 0 4px 16px rgba(0,0,0,.12); }
  header.top .mobile-menu nav a { padding: 10px 12px; border-radius: 6px; }
  header.top .mobile-menu nav a.on { background: var(--card); }
  header.top .built { display: none; }
  .data-status { padding: 3px 8px; }
  .data-status.stale { max-width: 100%; white-space: normal; flex-wrap: wrap; }
  /* 좁은 헤더에서는 평소 경과 시간만 둔다. 오래된 상태의 경고 문구는 그대로 보인다. */
  .data-status:not(.stale) #data-asof { display: none; }
  .data-status:not(.stale) .age::before { content: none; }
  .cards {
    display: flex; overflow-x: auto; gap: 8px; margin-bottom: 18px; padding-bottom: 4px;
    scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .cards::-webkit-scrollbar { display: none; }
  .cards .card { flex: 0 0 72%; padding: 13px 15px; scroll-snap-align: start; }
  .cards .card .k { margin-bottom: 2px; }
  .cards .card .v { font-size: 20px; }
  .tabs-end { margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line-2); }
  .lh, .row { grid-template-columns: minmax(0, 1fr) 104px 54px; gap: 8px; padding: 0 12px; }
  .lh > :first-child, .row .rank { display: none; }
  .lh .h5, .lh .h6, .lh .h7, .row .c5, .row .c6, .row .c7 { display: none; }
  .row { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
  .nm { gap: 8px; }
  .nm img { width: 30px; height: 30px; }
  .nm .t b { font-size: 13.5px; }
  .nm .t > span, .nm .tag { display: none; }
  .px b { font-size: 13px; }
  .px small { font-size: 11px; }
  /* 거래가·시각을 현재 시세 아래 한 줄로 합친다(가격 칸 아래 두 칸에 걸쳐 놓는다). 이름은 두 줄에 걸쳐 놓아
     첫 줄은 시세·변동률, 둘째 줄은 거래가와 나란히 선다. 거래가가 없는 행은 둘째 줄이 0이라 시세가 가운데 선다. */
  .row { grid-template-rows: 1fr auto; row-gap: 0; }
  .row .nm { grid-column: 1; grid-row: 1 / span 2; }
  .row .px { display: contents; }
  .row .px b { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; }
  .row .px small { grid-column: 2 / 4; grid-row: 2; justify-self: end; }
  .row .chg { grid-column: 3; grid-row: 1; }
  .lh .lh-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .lh .lh-short { display: inline; }
  .chg { font-size: 12.5px; }
  .dh { align-items: flex-start; }
  .dh h1, .dh h2 { font-size: 18px; line-height: 1.4; word-break: break-word; }
  .page-title { font-size: 23px; }
  .bigpx { font-size: 28px; }
  .panel { padding: 16px 14px; }
  .event-stages { grid-template-columns: 1fr; }
  .weekday-grid { grid-template-columns: 1fr; }
  .guide-jumps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .guide-jumps::-webkit-scrollbar { display: none; }
  .guide-jumps a { flex: none; }
  .guide-copy, .guide-split { grid-template-columns: 1fr; }
  .guide-weekdays { grid-template-columns: repeat(4, 1fr); }
  .guide-chart { height: 190px; }
  .ranking-title h1 { font-size: 23px; }
  .ranking-lh, .ranking-row { grid-template-columns: 24px minmax(0, 1fr) 72px 76px; gap: 8px; padding: 0 12px; }
  .ranking-lh .h-price, .ranking-row .h-price, .ranking-lh .h-qty, .ranking-row .h-qty { display: none; }
  .ranking-row .rank { font-size: 12px; text-align: center; }
  .ranking-row { min-height: 58px; }
  .rank-turnover { font-size: 13px; }
  .basis-tag { font-size: 12px; padding: 2px 5px; white-space: normal; text-align: center; line-height: 1.3; }
}

/* ── 분석 페이지 보조 요소 ────────────────────── */
.note {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; margin: 18px 0; font-size: 14px; color: var(--ink-2);
}
.note b { color: var(--ink); font-weight: 600; }
.note.blue { background: var(--blue-bg); border-color: transparent; }
.note.quiet { background: var(--page); }
.table-scroll {
  overflow-x: auto; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); margin: 18px 0;
}
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rule { display: none; }
.big { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ── 분석 페이지 ───────────────────────────────── */
/* 최상위 산문만 읽기 좋은 폭으로 묶는다. 박스·표·도표 안의 글은 컨테이너를 채운다 —
   넓은 상자 안에서 글만 좁으면 오른쪽이 비어 왼쪽으로 몰려 보인다. */
main > p, main > ul, main > .note, .method, .verdict { max-width: var(--measure); }

h3.sub {
  font-size: 20px; font-weight: 700; letter-spacing: -0.03em;
  margin: 52px 0 10px; color: var(--ink);
}

/* 결론 — 각 절의 답. 박스 대신 큰 숫자로 앵커를 만든다. */
.verdict { margin: 34px 0 30px; max-width: var(--measure); }
.verdict .num {
  font-size: 68px; font-weight: 700; letter-spacing: -0.055em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink); display: block;
}
.verdict .num small {
  font-size: 22px; font-weight: 600; color: var(--ink-3); margin-left: 8px; letter-spacing: -0.02em;
}
.verdict .cap { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }

/* 큰 숫자 밑의 눈금. 값 하나만 놓으면 그게 큰지 작은지 알 수 없다. */
.scale { margin: 18px 0 4px; max-width: 420px; }
.scale-track {
  position: relative; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--down-bg), var(--line), var(--up-bg));
}
.scale-ref {
  position: absolute; top: -5px; bottom: -5px; width: 2px;
  background: var(--ink-4); transform: translateX(-1px);
}
.scale-dot {
  position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue); border: 2px solid var(--bg);
  transform: translate(-50%, -50%);
}
.scale-labels {
  position: relative; margin-top: 9px; height: 18px;
  font-size: 12px; color: var(--ink-4);
}
.scale-labels > span:first-child { position: absolute; left: 0; }
.scale-labels > span:last-child { position: absolute; right: 0; }
.scale-labels .mid { position: absolute; transform: translateX(-50%); white-space: nowrap; color: var(--ink-3); }
.scale-labels .mid b { color: var(--ink-2); font-weight: 700; }
.verdict .say {
  margin-top: 16px; font-size: 19px; line-height: 1.6; font-weight: 600;
  letter-spacing: -0.025em; color: var(--ink);
}
.verdict .say + p { margin-top: 12px; font-size: 15px; }

/* 방법론 — 상자 대신 왼쪽 괘선. 본문 흐름을 끊지 않으면서 성격만 구분한다. */
.method {
  margin: 26px 0; padding: 2px 0 2px 22px;
  border-left: 2px solid var(--line-2); max-width: var(--measure);
}
.method h4 {
  margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--ink-3);
  letter-spacing: .08em;
}
.method h4:not(:first-child) { margin-top: 22px; }
.method p { font-size: 14.5px; margin-bottom: 10px; }
.method > *:last-child { margin-bottom: 0; }
.method-note { color: var(--ink-3); font-size: 13.5px !important; }
.formula {
  font-family: var(--mono); font-size: 13.5px; color: var(--ink);
  background: var(--page); border-radius: 8px; padding: 12px 15px; margin: 14px 0;
  overflow-x: auto; white-space: nowrap;
}
.method-steps { font-size: 14.5px; color: var(--ink-2); padding-left: 18px; margin: 0; }
.method-steps li { margin-bottom: 8px; }
.method-steps li:last-child { margin-bottom: 0; }
/* VR 세 경우를 나란히 놓는 표. 세 줄 목록보다 대조가 눈에 들어온다. */
.vr-cases { font-size: 13.5px; }
.vr-cases td:first-child { font-family: var(--mono); color: var(--ink); white-space: nowrap; }
.vr-cases td small { color: var(--ink-3); font-size: 12px; margin-left: 4px; font-weight: 500; }
.vr-cases tbody tr:nth-child(1) td { color: var(--down); }
.vr-cases tbody tr:nth-child(3) td { color: var(--up); }
.vr-cases tbody tr:nth-child(1) td:first-child,
.vr-cases tbody tr:nth-child(3) td:first-child { color: inherit; }

/* 접히는 상세 표 */
.detail-table { margin: 20px 0; }
.detail-table summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  padding: 12px 15px; border: 1px solid var(--line-2); border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.detail-table summary::-webkit-details-marker { display: none; }
.detail-table summary small { color: var(--ink-3); font-weight: 500; }
.detail-table summary i { margin-left: auto; font-style: normal; color: var(--ink-4); }
.detail-table[open] summary i { transform: rotate(180deg); }
.detail-table[open] summary { border-radius: 10px 10px 0 0; border-bottom: 0; }
.pipeline-details { max-width: var(--measure); margin: -8px 0 20px; }
.pipeline-details p { padding: 0 16px 14px; margin: 0; font-size: 13px; color: var(--ink-3); }
.detail-table .table-scroll {
  margin: 0; border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 10px 10px;
  max-height: 420px; overflow-y: auto;
}

/* 분석 도표 — 전체 폭을 쓰는 유일한 요소들 */
.figure { margin: 22px 0; }
.figure svg { width: 100%; height: auto; display: block; }
.figure figcaption {
  margin-top: 10px; font-size: 13px; color: var(--ink-3); max-width: var(--measure);
}
.ax { fill: var(--ink-3); font-size: 11px; }
.ax-line { stroke: var(--line-2); stroke-width: 1; }
.ax-ref { stroke: var(--ink-4); stroke-width: 1; stroke-dasharray: 4 3; }
.ax-ref-label { fill: var(--ink-4); font-size: 11px; font-weight: 600; }
.dot { stroke: var(--bg); stroke-width: 1.5; }
.dot.weak { opacity: .38; }

/* 한계 — 좁은 글 세 덩이를 나란히 놓아 전체 폭을 쓴다.
   목록만 세로로 이어붙이면 페이지 아래쪽이 통째로 왼쪽에 몰린다. */
.limit-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 14px; margin: 22px 0;
}
.limit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px;
}
.limit-card h4 {
  margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--ink-3);
  letter-spacing: 0.02em;
}
.limit-card ul { margin: 0; padding-left: 18px; max-width: none; font-size: 13.5px; }
.limit-card li { margin-bottom: 10px; }
.limit-card li:last-child { margin-bottom: 0; }

@media (max-width: 780px) {
  .formula { font-size: 12px; }
  .limit-grid { gap: 10px; }
}

/* ── 인챈트 인벤토리 (던파 장비창 배치) ─────────── */
.job-sw, .upgrade-sw { display: inline-flex; background: var(--line); border-radius: 999px; padding: 3px; gap: 2px; margin-bottom: 18px; }
.job-sw button, .upgrade-sw button {
  border: 0; background: transparent; color: var(--ink-3); font-family: inherit;
  font-size: 14px; font-weight: 600; padding: 6px 20px; border-radius: 999px; cursor: pointer;
}
.job-sw button.on, .upgrade-sw button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.upgrade-sw { margin: 2px 0 16px; }
.upgrade-economics .desc { margin: 14px 0 0; }
.detail-metrics { margin: 24px 0; padding: 0 20px 24px; border-bottom: 1px solid var(--line-2); }
.detail-metrics .k, .price-basis, #fc-desc { color: var(--ink-2); }
.upgrade-caveat { margin: 10px 0; color: var(--ink-2); font-size: 12px; }
.upgrade-calculation summary { cursor: pointer; color: var(--ink-2); font-size: 13px; padding: 8px 0; }
.upgrade-calculation .kv { margin-top: 14px; }
.upgrade-verdict {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--blue-bg); color: var(--ink-2); font-size: 14px;
}
.upgrade-verdict b { color: var(--blue); }

.inv-group { margin-bottom: 22px; }
.inv-group > h4 {
  margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  letter-spacing: 0.02em;
}
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }

.slot {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; cursor: pointer; min-height: 96px;
  display: flex; flex-direction: column; gap: 7px;
}
.slot:hover { border-color: var(--line-2); }
.slot .sl { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.slot .card-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.slot img {
  width: 30px; height: 30px; flex: none; image-rendering: pixelated;
  border-radius: 7px; background: var(--line);
}
.slot .cn { min-width: 0; flex: 1; }
.slot .cn b {
  display: block; font-size: 13px; font-weight: 600; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slot .cn .p { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.slot .cn .p i { font-style: normal; font-size: 12px; font-weight: 500; margin-left: 5px; }
.slot .price-mode {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 5px; align-items: baseline;
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.slot .price-mode span { color: var(--ink-3); }
.slot .price-mode b { text-align: right; font-size: 12px; }
.slot .price-mode i { font-style: normal; font-size: 11px; }
.slot .upgrade-hint { margin-top: 3px; font-size: 11px; color: var(--ink-3); line-height: 1.35; }
.slot .upgrade-hint.self { color: var(--blue); }
.slot .upgrade-hint.max { color: var(--gold); }
.slot.empty { opacity: .45; justify-content: center; align-items: center; cursor: default; font-size: 12.5px; color: var(--ink-3); }
.slot .cn .ks { margin: 2px 0; font-size: 12px; line-height: 1.35; color: var(--blue); font-weight: 600; }

/* Initial layout is reserved before data and chat modules arrive. */
.market-home #view{min-height:calc(100vh - 84px)}
.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}
.nowrap{white-space:nowrap}
@media(max-width:600px){
.market-home .cards{display:grid;grid-template-columns:1fr;overflow:visible}
.market-home .cards .card{min-width:0}
.nm .t b{white-space:normal;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;line-height:1.45}
.px small{font-size:12px}
.chart-toggle{min-height:44px;font-size:12.5px}
}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){--up:#FF7B86;--up-ink:#FF7B86;--down:#79ADFF}}

.weekday-detail { margin-top: 14px; }
.weekday-detail > summary { cursor: pointer; color: var(--ink-2); font-size: 13px; padding: 10px 0; min-height: 44px; }

@media(max-width:600px){
.market-home .cards,.ranking-page .cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible}
.market-home .cards .card,.ranking-page .cards .card{padding:12px;min-width:0}
.ranking-page .cards .sub{font-size:12px;overflow-wrap:anywhere}
.market-home .cards .weekday-summary{grid-column:1/-1;padding:10px 12px}
.market-home .cards .weekday-days{display:none}
.market-home .cards .sub{font-size:12px;overflow-wrap:anywhere}
.tabs button{min-height:44px}
}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){--gold:#F5BC55}}

/* ── 터치 영역·작은 글씨 (모바일) ──────────────────────────────
   눌리는 영역을 44px 이상으로 넓히되 보이는 모양과 줄 간격은 그대로 둔다.
   - 단독 버튼·링크: ::after로 영역만 넓힌다. --hit-y/--hit-x가 위아래·좌우로 넓히는 만큼이다.
   - 글줄 안의 링크: 세로 padding으로 넓힌다. 인라인이라 줄 간격은 변하지 않는다. */
@media (max-width: 780px) {
  :is(header.top .brand, .mobile-menu summary, .data-status, .feedback-link, .weekday-trend > summary, .job-sw button, .upgrade-sw button) { position: relative; }
  :is(header.top .brand, .mobile-menu summary, .data-status, .feedback-link, .weekday-trend > summary, .job-sw button, .upgrade-sw button)::after {
    content: ''; position: absolute; inset: calc(var(--hit-y, 0px) * -1) calc(var(--hit-x, 0px) * -1);
  }
  header.top .brand { --hit-y: 9px; --hit-x: 6px; }
  .mobile-menu summary { --hit-y: 6px; --hit-x: 5px; } /* 테두리 1px은 ::after 기준 밖이라 그만큼 더한다 */
  .data-status { --hit-y: 10px; --hit-x: 5px; }
  .feedback-link { --hit-y: 5px; --hit-x: 2px; }
  .weekday-trend > summary { --hit-y: 10px; --hit-x: 2px; }
  .job-sw button, .upgrade-sw button { --hit-y: 8px; }
  header.top .mobile-menu nav a { min-height: 44px; }
  footer a:not(.feedback-link), .hint a, .guide-copy b > a { padding-block: 15px; }
  .chart-toggle, .price-chart-controls .chart-toggle { min-height: 44px; }
  /* 요일 차트는 화면 폭에 맞춰 그려 가로 스크롤로 요일이 잘리지 않게 한다. 글자 크기는 app.js의 좁은 화면 폭(300)과 짝이다. */
  .weekday-chart svg, .weekday-trend .weekday-chart svg { min-width: 0; }
  .weekday-axis, .weekday-value { font-size: 11px; } /* 5자리 숫자 사이 간격을 3px 이상 남기는 최대 크기 */
  .weekday-label { font-size: 12.5px; }
  .guide-jumps a { display: inline-flex; align-items: center; min-height: 44px; }
}
