:root {
  color-scheme: dark;
  --bg: #0a0d13;
  --surface: #11161f;
  --surface-2: #171d29;
  --surface-3: #1e2534;
  --border: #222a39;
  --text: #e9edf4;
  --text-2: #a7b0c0;
  --muted: #6c7588;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, .14);
  --up: #f2545b;
  --up-soft: rgba(242, 84, 91, .14);
  --down: #4c8dff;
  --down-soft: rgba(76, 141, 255, .14);
  /* 공포·탐욕 구간 (항상 텍스트 라벨과 함께 사용) */
  --fg-xfear: #d03b3b;
  --fg-fear: #ec835a;
  --fg-neutral: #8d8c86;
  --fg-greed: #6fbf5f;
  --fg-xgreed: #0ca30c;
  --warn: #fab219;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --radius: 14px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eceff5;
  --border: #e3e7ef;
  --text: #121620;
  --text-2: #4c5466;
  --muted: #8a92a3;
  --accent: #2a6ff0;
  --accent-soft: rgba(42, 111, 240, .1);
  --up: #e0313a;
  --up-soft: rgba(224, 49, 58, .09);
  --down: #1f63e0;
  --down-soft: rgba(31, 99, 224, .09);
  --fg-neutral: #9a9993;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 18px rgba(16,24,40,.06);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    color-scheme: light;
    --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f6f8fb; --surface-3: #eceff5; --border: #e3e7ef;
    --text: #121620; --text-2: #4c5466; --muted: #8a92a3; --accent: #2a6ff0; --accent-soft: rgba(42,111,240,.1);
    --up: #e0313a; --up-soft: rgba(224,49,58,.09); --down: #1f63e0; --down-soft: rgba(31,99,224,.09);
    --fg-neutral: #9a9993; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 18px rgba(16,24,40,.06);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum';
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
b { font-weight: 650; }
[hidden] { display: none !important; }

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text-2); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; flex: none; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.topbar__right { display: flex; align-items: center; gap: 10px; flex: none; }
.clock { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-2);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }

.ticker { overflow: hidden; border-top: 1px solid var(--border); height: 36px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__track { display: flex; width: max-content; animation: marquee 70s linear infinite; height: 100%; align-items: center; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.tick { display: flex; gap: 8px; align-items: baseline; padding: 0 22px; font-size: 13px; white-space: nowrap; border-right: 1px solid var(--border); cursor: pointer; }
.tick__name { color: var(--text-2); }
.tick__price { font-weight: 600; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ---------- layout ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 8px 20px 40px; }
.section { padding: 44px 0 8px; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.025em; font-weight: 750; }
.sub { margin: 0; color: var(--text-2); font-size: 14.5px; max-width: 760px; }
.hint { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.updated { color: var(--muted); font-size: 12.5px; }
.note { color: var(--muted); font-size: 12.5px; margin: 14px 0 0; }
.tip { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--text-2); font-size: 14px; }
.tip b:first-child { color: var(--accent); margin-right: 6px; }

.grid { display: grid; gap: 16px; }
.grid--brief { grid-template-columns: 1.5fr 1fr; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--fng { grid-template-columns: 1.4fr 1fr; margin-top: 16px; }
.stack { display: grid; gap: 16px; align-content: start; }
@media (max-width: 960px) {
  .grid--brief, .grid--2, .grid--fng { grid-template-columns: 1fr; }
}

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card__title { margin: 0 0 14px; font-size: 15.5px; font-weight: 700; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.card__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card__row .card__title { margin: 0; }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; min-height: 18px; list-style: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* segmented control */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-size: 13.5px; font-weight: 550; white-space: nowrap; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
:root[data-theme="dark"] .seg button[aria-selected="true"], .seg button[aria-selected="true"] { background: var(--surface-3); }
.seg .count { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* ---------- briefing ---------- */
.brief { display: flex; flex-direction: column; gap: 18px; }
.mood { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); }
.mood__badge { font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.mood__title { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.mood__desc { color: var(--text-2); font-size: 14px; }
.mood--on .mood__badge { background: var(--up-soft); color: var(--up); }
.mood--off .mood__badge { background: var(--down-soft); color: var(--down); }
.mood--mid .mood__badge { background: var(--surface-3); color: var(--text-2); }
.brief__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.brief__list li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 11px 4px; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.brief__list li:last-child { border-bottom: 0; }
.brief__list li.skeleton { height: 40px; border: 0; }
/* 일별 등락 달력 */
.mcal { border-top: 1px solid var(--border); padding-top: 16px; margin-top: auto; }
.mcal__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mcal__title { display: flex; align-items: center; gap: 10px; }
.mcal__title select { font-weight: 700; height: 34px; }
.mcal__sub { font-size: 13px; color: var(--text-2); font-weight: 600; }
.mcal__nav { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.mcal__nav .icon-btn { width: 30px; height: 30px; font-size: 18px; line-height: 1; }
.mcal__nav .icon-btn:disabled { opacity: .35; cursor: default; }
.mcal__summary { font-size: 13px; color: var(--text-2); margin: 8px 0 10px; min-height: 1.4em; }
.mcal__grid { display: grid; gap: 4px; }
.mcal__dow { font-size: 11.5px; color: var(--muted); text-align: center; padding-bottom: 2px; font-weight: 600; }
.mcal__cell { border-radius: 8px; padding: 6px 7px; min-height: 52px; display: flex; flex-direction: column; justify-content: space-between; background: var(--surface-2); }
.mcal__cell--empty { background: transparent; border: 1px dashed var(--border); }
.mcal__cell--today { outline: 2px solid var(--accent); outline-offset: -2px; }
.mcal__day { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.mcal__pct { font-size: 13.5px; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.mcal__cell--empty .mcal__pct { font-size: 11px; font-weight: 500; }
.mcal__pct.up { color: var(--up); }
.mcal__pct.down { color: var(--down); }
.mcal__day.on, .mcal__pct.on { color: #fff; }
.mcal__note { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 560px) { .mcal__cell { min-height: 44px; padding: 4px 5px; } .mcal__pct { font-size: 11.5px; } }
.brief__tag { font-size: 12.5px; color: var(--text-2); font-weight: 600; padding-top: 1px; }
.brief__text b { font-weight: 650; }

.sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sessions li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot--open { background: var(--fg-xgreed); box-shadow: 0 0 0 4px rgba(12,163,12,.15); }
.sessions .name { flex: 1; }
.sessions .state { font-size: 12.5px; color: var(--muted); text-align: right; }
.sessions .state b { color: var(--text-2); font-weight: 600; }

.next-event .ne__title { font-size: 17px; font-weight: 700; margin: 2px 0 4px; }
.ne__meta { color: var(--text-2); font-size: 13.5px; }
.ne__count { font-size: 26px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 8px; }
.ne__explain { color: var(--muted); font-size: 13px; margin-top: 6px; }

.macro { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 960px) { .macro { grid-template-columns: repeat(2, 1fr); } }
.macro .card { padding: 16px 18px; }
.macro__name { font-size: 13px; color: var(--text-2); font-weight: 600; display: flex; justify-content: space-between; }
.macro__val { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 2px 0; }
.macro__desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* ---------- fear & greed ---------- */
.gauge-card { display: grid; grid-template-columns: 1fr; gap: 6px; }
.gauge-card h3 { margin: 0; font-size: 15.5px; }
.gauge-wrap { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; align-items: center; }
@media (max-width: 560px) { .gauge-wrap { grid-template-columns: 1fr; } }
.gauge svg { width: 100%; height: auto; display: block; }
.gauge__label { font-size: 12px; fill: var(--muted); }
.gauge__score { font-size: 46px; font-weight: 800; fill: var(--text); letter-spacing: -.03em; }
.gauge__rating { font-size: 16px; font-weight: 700; }
.fng-side p { margin: 0 0 12px; color: var(--text-2); font-size: 14px; }
.compare { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare li { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.compare .k { font-size: 12px; color: var(--muted); }
.compare .v { font-size: 15px; font-weight: 700; }
.compare .r { font-size: 12px; font-weight: 600; margin-left: 4px; }

.chart { position: relative; height: 340px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .axis text { font-size: 11px; fill: var(--muted); }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface-3); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, -110%); }

.components { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.comp__top { display: flex; justify-content: space-between; font-size: 13.5px; }
.comp__name { font-weight: 600; }
.comp__rating { font-weight: 650; font-size: 12.5px; }
.comp__bar { position: relative; height: 8px; border-radius: 4px; margin: 6px 0 4px; background: linear-gradient(90deg, var(--fg-xfear) 0 25%, var(--fg-fear) 25% 45%, var(--fg-neutral) 45% 55%, var(--fg-greed) 55% 75%, var(--fg-xgreed) 75%); opacity: .35; }
.comp__bar-wrap { position: relative; }
.comp__marker { position: absolute; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 3px solid var(--surface); transform: translateX(-50%); box-shadow: 0 0 0 1px var(--border); }
.comp__desc { font-size: 12.5px; color: var(--muted); }

/* ---------- symbols ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.search { flex: 0 1 300px; min-width: 0; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 14px; font: inherit; font-size: 14px; }
.search:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.group-desc { margin: 0 0 14px; color: var(--text-2); font-size: 14px; min-height: 1.5em; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sym {
  text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 14px 10px;
  cursor: pointer; display: grid; gap: 2px; transition: border-color .15s, transform .15s; box-shadow: var(--shadow); min-width: 0;
}
.sym:hover { border-color: var(--accent); transform: translateY(-1px); }
.sym:focus-visible { outline: 2px solid var(--accent); }
.sym__head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.sym__code { font-weight: 750; font-size: 14.5px; letter-spacing: -.01em; }
.sym__name { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sym__price { font-size: 19px; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; }
.sym__chg { font-size: 13px; font-weight: 650; }
.sym__spark { height: 38px; margin-top: 4px; }
.sym__spark svg { width: 100%; height: 100%; display: block; }
.sym__desc { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.pill--up { background: var(--up-soft); color: var(--up); }
.pill--down { background: var(--down-soft); color: var(--down); }
.empty { color: var(--muted); padding: 30px; text-align: center; grid-column: 1 / -1; }

/* ---------- calendar ---------- */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
select { height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 10px; font: inherit; font-size: 13.5px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 13px; cursor: pointer; color: var(--text-2); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.cal { display: grid; gap: 18px; }
.cal-day h3 { margin: 0 0 8px; font-size: 14.5px; color: var(--text-2); font-weight: 650; display: flex; gap: 8px; align-items: center; }
.cal-day h3 .today { background: var(--accent); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.cal-day summary { list-style: none; cursor: pointer; border-radius: 10px; padding: 6px 4px; }
.cal-day summary::-webkit-details-marker { display: none; }
.cal-day summary:hover { background: var(--surface-2); }
.cal-day summary h3 { margin: 0; }
.cal-day summary h3::before { content: '▸'; color: var(--muted); font-size: 12px; transition: transform .15s; display: inline-block; width: 12px; }
.cal-day[open] summary h3::before { transform: rotate(90deg); }
.cal-day[open] summary { margin-bottom: 8px; }
.cal-count { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.cal-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ev { display: grid; grid-template-columns: 62px 74px 1fr auto; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); align-items: start; }
.ev:last-child { border-bottom: 0; }
.ev--past { opacity: .5; }
.ev--soon { background: color-mix(in srgb, var(--warn) 9%, transparent); }
.ev__time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.ev__soon { display: block; font-size: 11px; color: var(--warn); font-weight: 700; }
.ev__country { font-size: 12.5px; font-weight: 650; background: var(--surface-2); border-radius: 6px; padding: 2px 8px; text-align: center; justify-self: start; }
.ev__title { font-weight: 650; font-size: 14.5px; }
.ev__orig { color: var(--muted); font-size: 12px; margin-left: 6px; font-weight: 400; }
.ev__explain { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.ev__effect { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.ev__nums { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); text-align: right; }
.ev__nums b { display: block; color: var(--text); font-size: 14px; }
.ev__actual { color: var(--accent); font-weight: 600; }
.ev__actual b { color: var(--accent); }
.stars { color: var(--warn); letter-spacing: 1px; font-size: 12px; }
.stars .off { color: var(--border); }
@media (max-width: 720px) {
  .ev { grid-template-columns: 56px 1fr; gap: 6px 12px; }
  .ev__country { grid-column: 2; grid-row: 1; }
  .ev__main { grid-column: 1 / -1; }
  .ev__nums { grid-column: 1 / -1; justify-content: flex-start; text-align: left; }
}

/* ---------- TradingView boxes ---------- */
.tv-box { padding: 0; overflow: hidden; }
.tv-box--tall { height: 640px; }
.tv-box--heat { height: 620px; }
.tv-box .tradingview-widget-container, .tv-box .tradingview-widget-container__widget { height: 100%; width: 100%; }
.tv-box .tradingview-widget-copyright { display: none; }
/* 다크 페이지에서 투명 위젯 iframe 뒤에 흰 배경이 칠해지는 것 방지 */
.tv-box iframe { color-scheme: light; }
@media (max-width: 720px) { .tv-box--heat { height: 480px; } }

/* ---------- news ---------- */
.news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 22px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .news { grid-template-columns: 1fr; padding: 4px 16px; } }
.news__item { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.news__item:hover .news__title { color: var(--accent); }
.news__meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; flex-wrap: wrap; }
.news__cat { font-weight: 700; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.news__cat--crypto { background: rgba(250,178,25,.14); color: #d99a10; }
.news__cat--forex { background: var(--accent-soft); color: var(--accent); }
.news__cat--commodities { background: rgba(12,163,12,.12); color: var(--fg-xgreed); }
.news__cat--index { background: rgba(144,133,233,.15); color: #8a7de6; }
.news__breaking { font-weight: 800; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--up); color: #fff; }
.news__title { font-weight: 650; font-size: 15px; line-height: 1.45; transition: color .15s; }
.news__summary { font-size: 13px; color: var(--text-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 14px; }
.more-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 22px; cursor: pointer; font-weight: 600; font-size: 14px; }
.more-btn:hover { background: var(--surface-2); }

/* ---------- guide ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 960px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .guide-grid { grid-template-columns: 1fr; } }
.guide { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.guide__num { font-size: 12px; font-weight: 750; color: var(--accent); }
.guide h4 { margin: 4px 0 8px; font-size: 16px; letter-spacing: -.01em; }
.guide p { margin: 0; color: var(--text-2); font-size: 14px; }
.guide .ex { margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 13px; color: var(--text-2); }
.glossary-title { margin: 32px 0 12px; font-size: 18px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.hours-card { padding: 0; overflow-x: auto; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.hours-table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.hours-table td { padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: top; font-variant-numeric: tabular-nums; }
.hours-table tr:last-child td { border-bottom: 0; }
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; }
.glossary details { border-bottom: 1px solid var(--border); padding: 12px 2px; }
.glossary summary { cursor: pointer; font-weight: 650; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; }
.glossary summary::after { content: '+'; color: var(--muted); }
.glossary details[open] summary::after { content: '−'; }
.glossary p { margin: 8px 0 0; color: var(--text-2); font-size: 13.5px; }

/* ---------- modal ---------- */
.modal { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.modal::backdrop { background: rgba(5,8,14,.6); backdrop-filter: blur(3px); }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal__head h3 { margin: 0; font-size: 19px; }
.modal__code { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.modal__body { display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.modal__chart { height: min(620px, calc(100vh - 140px)); border-right: 1px solid var(--border); border-radius: 0; }
.modal__side { padding: 18px; overflow-y: auto; max-height: min(620px, calc(100vh - 140px)); }
.modal__info .price { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.modal__info dl { margin: 12px 0; display: grid; gap: 10px; }
.modal__info dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.modal__info dd { margin: 0; font-size: 14px; color: var(--text-2); }
.tv-box--ta { height: 400px; }
@media (max-width: 860px) {
  .modal__body { grid-template-columns: 1fr; }
  .modal__chart { height: 380px; border-right: 0; border-bottom: 1px solid var(--border); }
  .modal__side { max-height: none; }
}

/* ---------- 컬쳐캐피탈 차트 ---------- */
.modal__chartwrap { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); }
.modal__chartwrap .modal__chart { border-right: 0; }
.cc-toolbar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cc-toolbar:not([hidden]) ~ .modal__chart { height: min(570px, calc(100vh - 190px)); }
.cc-ohlc { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cc-ohlc b { color: var(--text); font-weight: 650; margin-right: 6px; }
.cc-ohlc b.up { color: var(--up); } .cc-ohlc b.down { color: var(--down); }
.live-badge { margin-left: 8px; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--up-soft); color: var(--up); }
.live-badge::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--up); margin-right: 5px; vertical-align: 1px; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (max-width: 860px) { .modal__chartwrap { border-right: 0; border-bottom: 1px solid var(--border); } .cc-toolbar:not([hidden]) ~ .modal__chart { height: 360px; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 28px 20px 40px; max-width: 1280px; margin: 0 auto; color: var(--muted); font-size: 12.5px; }
.footer p { margin: 0 0 6px; }
.footer b { color: var(--text-2); margin-right: 6px; }

@media (max-width: 720px) {
  .topbar__inner { padding: 0 16px; gap: 12px; }
  .clock { display: none; }
  main { padding: 0 16px 32px; }
  .section { padding-top: 34px; }
  .section h2 { font-size: 21px; }
  .card { padding: 16px; }
  .brief__list li { grid-template-columns: 1fr; gap: 2px; }
  .sym-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sym__desc { display: none; }
  .search { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .brand span { display: none; }
  .nav a { padding: 6px 9px; font-size: 13px; }
}
