/* 비트펑크 · 미드나잇 시그널(O2) — 2026-10-15 사용자 선택. 원본 조각: site/mock3/base.css + m.css + site/mock4/o2.css */
/* O2 시그널 · 고르신 미드나잇의 남보라 바탕은 그대로, 강조만 비트펑크 주황. 파랑-주황 보색 대비. 커버는 주황 + 보라 섞음 */
:root { color-scheme: dark; --bg: oklch(14% 0.025 285); --surface: oklch(19% 0.03 285); --surface-2: oklch(25% 0.035 285); --fg: oklch(96% 0.01 285); --muted: oklch(72% 0.03 285);
  --rule: oklch(27% 0.035 285); --line: oklch(40% 0.04 285); --accent: oklch(72% 0.18 50); --accent-2: oklch(66% 0.2 295); --on-accent: oklch(15% 0.03 285);
  --up: oklch(70% 0.2 25); --dn: oklch(72% 0.14 245); --link: oklch(80% 0.14 60); --focus: var(--accent); --radius: 18px;
  --font-body: 'Pretendard Variable', Pretendard, sans-serif; --font-display: 'Pretendard Variable', Pretendard, sans-serif; --font-latin: 'Unbounded', 'Pretendard Variable', sans-serif; --font-mono: 'JetBrains Mono', ui-monospace, monospace; }

/* 시안 3 공통 뼈대. 토큰은 m/p/c 파일이 정한다:
 * --bg --surface --surface-2 --fg --muted --rule --line --accent --on-accent --up --dn --link --focus --font-body --font-display --font-latin --font-mono --radius
 * 층표: 첫 문장 56~88/800 · 묶음 머리 28/800 + 개수 14 mono · 카드 제목 18/700 · 카드 메타 14 · 안내 19 회색 · 바닥 주석 14 */
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-text-size-adjust: 100%; word-break: keep-all; overflow-wrap: anywhere;
  font-variant-ligatures: no-contextual no-common-ligatures; font-feature-settings: 'calt' 0, 'liga' 0; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
time, .logo, .chip, kbd, .tk, .cv-no, .cv-sym, .tr-code, .tb-code { white-space: nowrap; overflow-wrap: normal; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
/* 머리 */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px; padding: 14px 24px; background: color-mix(in oklch, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--rule); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-latin); font-weight: 800; font-size: 19px; letter-spacing: 0.02em; }
.logo-mark { width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent)); box-shadow: 0 0 18px color-mix(in oklch, var(--accent) 60%, transparent); }
.menu { display: flex; gap: 22px; font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.menu a:hover { color: var(--fg); }
.sx { position: relative; margin-left: auto; flex: 0 1 280px; min-width: 0; }
.sx-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sx-in { width: 100%; font: inherit; font-size: 15px; color: var(--fg); background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 9px 40px 9px 16px; transition: border-color 0.2s; }
.sx-in:focus { border-color: var(--accent); outline: none; }
.sx-in::placeholder { color: var(--muted); }
.sx-k { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 13px; color: var(--muted); border: 1px solid var(--rule); border-radius: 5px; padding: 0 6px; pointer-events: none; }
.sx-res { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; width: min(440px, 90vw); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 24px 60px rgb(0 0 0 / 0.28); max-height: 60vh; overflow-y: auto; }
.sx-res a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; } .sx-res a:hover { background: var(--surface-2); }
.sx-t { font-size: 15px; font-weight: 600; } .sx-m, .sx-none { font-size: 14px; color: var(--muted); } .sx-none { padding: 12px; }
/* 시세 띠 */
.tick { overflow: hidden; white-space: nowrap; font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; }
body > .tick { padding: 11px 0; border-block: 1px solid var(--rule); -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tick-track { display: flex; gap: 34px; width: max-content; }
.tick.flow .tick-track { animation: flow 70s linear infinite; } .tick.flow:hover .tick-track { animation-play-state: paused; }
@keyframes flow { to { transform: translateX(calc(-50% - 17px)); } }
.tick:not(.flow) .tick-track { width: auto; flex-wrap: wrap; gap: 8px 20px; }
.tk { display: inline-flex; gap: 8px; } .tk b { font-weight: 600; color: var(--muted); } .tk.up .ch { color: var(--up); } .tk.dn .ch { color: var(--dn); }
.sk { color: transparent !important; background: linear-gradient(90deg, var(--surface-2) 0 40%, var(--rule) 50%, var(--surface-2) 60% 100%) 0 0 / 300% 100%; border-radius: 4px; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -150% 0; } }
/* 공통 문법 */
.eyebrow { margin: 0 0 18px; font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.04em; color: var(--muted); }
.hero h1, .t-hero h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 7.2vw, 88px); line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance; animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.lede { margin: 22px 0 0; max-width: 32em; font-size: 19px; line-height: 1.6; color: var(--muted); }
@keyframes rise { from { transform: translateY(14px); opacity: 0.001; } }
.btn { display: inline-flex; align-items: center; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; background: var(--accent); color: var(--on-accent); transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s; box-shadow: 0 8px 28px color-mix(in oklch, var(--accent) 40%, transparent); }
.btn:hover { transform: translateY(-2px); } .btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); box-shadow: none; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.sec { margin-top: 96px; }
.sec-h { display: flex; align-items: baseline; gap: 14px; margin: 0 0 24px; font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.sec-h span { font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
/* 커버 */
.cover { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--base); isolation: isolate; }
.cover::before { content: ''; position: absolute; inset: -10%; background: var(--g); transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); z-index: -1; }
.cover::after { content: ''; position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.cv-sym { position: absolute; left: 6%; bottom: 7%; font-family: var(--font-latin); font-weight: 800; font-size: clamp(22px, 3.4vw, 40px); letter-spacing: -0.02em; color: oklch(98% 0.01 90 / 0.92); }
.cv-no { position: absolute; right: 6%; top: 8%; font-family: var(--font-mono); font-size: 14px; color: oklch(98% 0.01 90 / 0.8); }
.cover-sm .cv-sym { font-size: 22px; } .cover-xs { width: 56px; aspect-ratio: 1; border-radius: 10px; flex: 0 0 56px; } .cover-xs .cv-sym, .cover-xs .cv-no { display: none; }
/* 카드 */
.card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card:hover .cover::before { transform: scale(1.12) rotate(2deg); }
.card:hover .card-t { color: var(--link); }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.chip { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--fg); font-size: 14px; font-weight: 600; }
.card-meta time { font-family: var(--font-mono); font-size: 14px; }
.card-t { font-size: 18px; font-weight: 700; line-height: 1.45; letter-spacing: -0.015em; transition: color 0.2s; }
.card-big .card-t { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -0.03em; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 40px 28px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); font-weight: 600; transition: border-color 0.2s, transform 0.2s; }
.pill b { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--muted); } .pill:hover { border-color: var(--accent); transform: translateY(-2px); }
/* 차트 */
.chart { position: relative; display: flex; flex-direction: column; color: var(--muted); }
.chart.up { color: var(--up); } .chart.dn { color: var(--dn); }
.ch-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; color: var(--fg); }
.ch-sym { font-family: var(--font-latin); font-weight: 800; font-size: 18px; } .ch-sym small { font-size: 14px; color: var(--muted); margin-left: 2px; font-weight: 600; }
.ch-px { font-family: var(--font-mono); font-size: clamp(22px, 2.6vw, 30px); font-variant-numeric: tabular-nums; }
.ch-ch { font-family: var(--font-mono); font-size: 15px; } .chart.up .ch-ch { color: var(--up); } .chart.dn .ch-ch { color: var(--dn); }
.ch-svg { width: 100%; height: 180px; margin-top: 12px; overflow: visible; }
.ch-line { stroke-dasharray: 2000; stroke-dashoffset: 2000; } .chart.ready .ch-line { animation: draw 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ch-cap { margin-top: 6px; font-size: 14px; color: var(--muted); }
/* 강좌 줄 */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.track { display: grid; gap: 6px; scroll-snap-align: start; }
.tr-name { margin-top: 6px; font-size: 18px; font-weight: 700; } .tr-n { font-size: 14px; color: var(--muted); }
.track:hover .cover::before { transform: scale(1.12) rotate(2deg); }
/* 바닥 */
.foot { max-width: 1200px; margin: 120px auto 0; padding: 48px 24px 40px; border-top: 1px solid var(--rule); }
.foot-mark { margin: 0 0 32px; font-family: var(--font-latin); font-weight: 800; font-size: clamp(56px, 12vw, 160px); line-height: 0.9; letter-spacing: -0.04em; background: linear-gradient(120deg, var(--fg), var(--accent) 60%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; } .foot-cols a { display: block; padding: 4px 0; font-size: 15px; color: var(--muted); } .foot-cols a:hover { color: var(--fg); }
.foot-h { margin: 0 0 8px; font-size: 14px; font-weight: 700; } .foot-note { margin: 36px 0 0; font-size: 14px; color: var(--muted); }
/* 글 화면 */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; } .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: 0 50%; transform: scaleX(0); }
.post-hero { position: relative; max-width: 1200px; margin: 24px auto 0; padding-inline: 24px; }
.cover-hero { aspect-ratio: auto; height: clamp(300px, 46vw, 480px); }
.cover-hero .cv-sym { font-size: clamp(40px, 8vw, 96px); opacity: 0.35; right: 5%; left: auto; bottom: 4%; }
.ph-in { position: absolute; left: 24px; right: 24px; bottom: 0; padding: 0 clamp(20px, 5vw, 56px) clamp(24px, 4vw, 48px); color: oklch(98% 0.01 90); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; opacity: 0.85; } .crumbs a:hover { text-decoration: underline; }
.art-h1 { margin: 12px 0 0; max-width: 20em; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4.4vw, 52px); line-height: 1.18; letter-spacing: -0.035em; text-wrap: balance; }
.art-meta { margin: 14px 0 0; font-family: var(--font-mono); font-size: 14px; opacity: 0.85; }
.read { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 64px; justify-content: center; max-width: 1200px; margin: 64px auto 0; padding-inline: 24px; }
.read-side { position: sticky; top: 90px; align-self: start; }
.toc { font-size: 14px; } .toc-h { margin: 0 0 10px; font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--rule); } .toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.5; } .toc li a:hover { color: var(--fg); border-left-color: var(--accent); }
.prose { font-size: 18px; line-height: 1.9; }
.prose p { margin: 0 0 1.1em; } .prose p:has(> br:only-child), .prose p:empty { margin: 0; line-height: 0.9; }
.prose h2 { margin: 2.4em 0 0.7em; font-family: var(--font-display); font-size: 27px; font-weight: 800; line-height: 1.35; letter-spacing: -0.025em; scroll-margin-top: 90px; }
.prose h3 { margin: 1.8em 0 0.5em; font-size: 20px; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose figure { margin: 32px 0; text-align: center; } .prose figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.prose blockquote { margin: 28px 0; padding: 16px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); }
.prose ul, .prose ol { padding-left: 1.3em; }
.table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--rule); border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100% !important; min-width: 460px; font-size: 15px; line-height: 1.6; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 10px 14px; text-align: left; width: auto !important; height: auto !important; } .prose thead td, .prose th { background: var(--surface); font-weight: 700; }
.prose iframe { max-width: 100%; border: 0; border-radius: 12px; }
.prose button.register { font: inherit; font-weight: 700; padding: 13px 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 56px; }
.pg { display: grid; gap: 6px; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule); transition: border-color 0.2s, transform 0.2s; } .pg:hover { border-color: var(--accent); transform: translateY(-2px); }
.pg-next { text-align: right; } .pg-k { font-family: var(--font-mono); font-size: 14px; color: var(--muted); } .pg-t { font-weight: 700; line-height: 1.45; }
@media (max-width: 900px) {
  .menu { display: none; } .top { gap: 16px; padding: 12px 16px; } .wrap, .post-hero, .read { padding-inline: 16px; }
  .read { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px; } .read-side { position: static; margin-bottom: 28px; padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius); }
  .ph-in { left: 16px; right: 16px; } .sec { margin-top: 72px; } .pager { grid-template-columns: minmax(0, 1fr); } .pg-next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .ch-line { stroke-dashoffset: 0; } }
/* 글 머리의 큰 기호는 오른쪽 위로 — 아래에 두면 제목 줄과 겹쳤다 */
.cover-hero .cv-sym { top: 6%; bottom: auto; right: 5%; } .cover-hero .cv-no { top: auto; bottom: 8%; right: 5%; }
/* 휴대폰: 카드 커버가 폭 가득이면 목록 하나가 화면 수십 장 높이가 된다 → 작은 정사각 커버 + 제목의 가로 줄 */
@media (max-width: 600px) {
  .grid3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .grid3 .card { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .grid3 .card .cover { grid-row: 1 / 3; aspect-ratio: 1; border-radius: 12px; }
  .grid3 .card .cv-sym { font-size: 16px; } .grid3 .card .cv-no { display: none; }
  .grid3 .card .card-t { font-size: 16px; }
  .grid3 .card .chip { font-size: 13px; padding: 1px 8px; }
}

/* M 미드나잇 · 어두운 남보라 + 보라→산호 빛. 첫 화면 = 제목 + 실데이터 차트, 대표 1+2, 강좌 가로 줄 */
.v-m .hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: end; max-width: 1200px; margin: 0 auto; padding: 96px 24px 72px; isolation: isolate; }
.v-m .hero::before { content: ''; position: absolute; inset: -20% -10% 0 30%; z-index: -1; background: radial-gradient(closest-side, color-mix(in oklch, var(--accent) 45%, transparent), transparent), radial-gradient(closest-side at 80% 70%, color-mix(in oklch, var(--accent-2) 30%, transparent), transparent); filter: blur(30px); }
.v-m .hero h1 { background: linear-gradient(180deg, var(--fg) 30%, color-mix(in oklch, var(--fg) 60%, var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.v-m .hero-chart { padding: 24px; border-radius: 24px; background: color-mix(in oklch, var(--surface) 70%, transparent); border: 1px solid var(--rule); backdrop-filter: blur(10px); box-shadow: 0 30px 80px rgb(0 0 0 / 0.35); }
.v-m .feat { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 28px; }
.v-m .feat .card-big { grid-row: span 2; } .v-m .feat .card-big .cover { aspect-ratio: 4 / 3; }
@media (max-width: 900px) { .v-m .hero { grid-template-columns: minmax(0, 1fr); padding: 56px 16px 48px; gap: 36px; } .v-m .feat { grid-template-columns: minmax(0, 1fr); } .v-m .feat .card-big { grid-row: auto; } }

/* 주황은 면 · 선 · 밑줄에만, 글자는 본문색 */
.prose a { color: var(--fg); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.card:hover .card-t { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
/* 카테고리 · 404 머리 */
.cat-head { padding: 72px 0 40px; margin-bottom: 40px; border-bottom: 1px solid var(--rule); }
.cat-head h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 5.6vw, 64px); line-height: 1.1; letter-spacing: -0.04em; }
.cat-head .pills { margin-top: 24px; }
.cat-head .eyebrow a:hover { color: var(--fg); }
.foot-h a:hover { color: var(--accent); }
@media (max-width: 600px) { .cat-head { padding: 40px 0 28px; margin-bottom: 8px; } }
/* 트레이딩뷰 위젯 — 뜨기 전에도 자리를 잡아 두어 아래가 튀지 않게(띠 46px · 차트 카드 260px) */
.tv { min-width: 0; }
.tv-tape { height: 74px; border-block: 1px solid var(--rule); padding-top: 4px; overflow: hidden; }
.tv-chart.hero-chart { height: 300px; padding: 16px 16px 8px; }
.tv-chart .tradingview-widget-container { height: 100%; display: flex; flex-direction: column; }
.tv-chart .tradingview-widget-container__widget { flex: 1; min-height: 0; }
.tradingview-widget-copyright { font-size: 13px; line-height: 1.4; padding: 4px 0 0; color: var(--muted); text-align: right; }
.tv-tape .tradingview-widget-copyright { padding: 0 24px; }
.tradingview-widget-copyright a { color: var(--muted); text-decoration: none; } .tradingview-widget-copyright a:hover { color: var(--fg); text-decoration: underline; }
/* 페이지가 color-scheme: dark 이고 위젯 문서는 light 라, 둘이 다르면 브라우저가 iframe 뒤에 흰 판을 깐다(투명 위젯이 흰 상자로 보였다) → 위젯 칸만 light 로 맞춘다 */
.tv iframe { color-scheme: light; }
.tv-tape { height: 92px; }
/* 띠의 'TradingView 제공' 줄이 고정 높이에 잘렸다 — 지우면 안 되는 표기라 높이는 최소값으로만 잡는다 */
.tv-tape { height: auto; min-height: 112px; overflow: visible; padding-bottom: 8px; }
