/* 종목 상세 페이지(2026-10-05). 색은 국내 시세 관례: 오름 빨강, 내림 파랑(styles.css의 .up·.down과 같은 값). */
.stock-page .sp-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.stock-page .sp-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; min-width: 0; }
.stock-page .sp-title h1 { margin: 0; font-size: clamp(22px, 2.6vw, 32px); }
.stock-page .sp-price { display: grid; justify-items: end; gap: 2px; }
.stock-page .sp-price strong { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; }
.stock-page .sp-nav a { text-decoration: none; }
.stock-page .sp-nav { position: sticky; top: 0; z-index: 5; margin-top: 14px; padding: 8px 0; background: var(--bg, #0b100d); }
.stock-page .sp-section-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; }
.stock-page .sp-section-head h2 { margin: 0 0 10px; font-size: 18px; }
.stock-page .sp-section { scroll-margin-top: 64px; }
.stock-page .sp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 18px; margin: 0; }
.stock-page .sp-facts div { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.stock-page .sp-facts dt { color: var(--muted); font-size: 12px; }
.stock-page .sp-facts dd { margin: 0; font-weight: 600; }
.stock-page .sp-note { margin-top: 10px; font-size: 12px; }
.stock-page .sp-chart-modes { margin-bottom: 10px; }
.stock-page .sp-chart { width: 100%; height: 380px; display: block; }
.stock-page .sp-grid { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.stock-page .sp-axis { fill: var(--muted, #8a948e); font-size: 11px; }
.stock-page .sp-up line, .stock-page .sp-up rect:not(.sp-volume) { stroke: #ff7979; fill: #ff7979; }
.stock-page .sp-down line, .stock-page .sp-down rect:not(.sp-volume) { stroke: #75aaff; fill: #75aaff; }
.stock-page .sp-flat line, .stock-page .sp-flat rect:not(.sp-volume) { stroke: #9aa39e; fill: #9aa39e; }
.stock-page .sp-volume { fill: rgba(255, 121, 121, .28); stroke: none; }
.stock-page .sp-volume.down { fill: rgba(117, 170, 255, .28); }
.stock-page .sp-ma5 { stroke: #f2c94c; stroke-width: 1.4; }
.stock-page .sp-ma20 { stroke: #56d998; stroke-width: 1.4; }
.stock-page .sp-ma60 { stroke: #c38bff; stroke-width: 1.4; }
.stock-page .sp-ma120 { stroke: #9aa39e; stroke-width: 1.4; }
.stock-page .sp-legends { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 12px; }
.stock-page .sp-legend::before { content: ""; display: inline-block; width: 14px; height: 2px; margin-right: 5px; vertical-align: middle; background: currentColor; }
.stock-page .sp-legend.sp-ma5 { color: #f2c94c; }
.stock-page .sp-legend.sp-ma20 { color: #56d998; }
.stock-page .sp-legend.sp-ma60 { color: #c38bff; }
.stock-page .sp-legend.sp-ma120 { color: #9aa39e; }
.stock-page .sp-book td { position: relative; text-align: right; }
.stock-page .sp-book td:nth-child(2) { text-align: center; font-weight: 600; }
.stock-page .sp-book .sp-bar { position: absolute; inset: 6px 4px; width: calc(100% - 8px); height: calc(100% - 12px); }
.stock-page .sp-book .sp-bar rect { fill: rgba(117, 170, 255, .22); }
.stock-page .sp-book .sp-bar.bid rect { fill: rgba(255, 121, 121, .22); }
.stock-page .sp-book td span { position: relative; }
.stock-page .sp-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.stock-page .sp-list li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
@media (max-width: 760px) {
  .stock-page .sp-head { grid-template-columns: 1fr; }
  .stock-page .sp-price { justify-items: start; }
  .stock-page .sp-chart { height: 260px; }
  .stock-page .sp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
