/* ===========================================
   Core Lens Korea — minimalist, data-first UI
   =========================================== */

:root {
  --bg: #0b0d10;
  --bg-soft: #111418;
  --bg-elev: #161a1f;
  --line: #232830;
  --line-soft: #1c2026;
  --ink: #f4f5f7;
  --ink-soft: #aab1bb;
  --ink-mute: #6b7380;
  --accent: #e8ff5c;       /* signature highlight */
  --accent-soft: #c9e043;
  --up: #34d399;
  --down: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --font-sans: "Inter", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "Menlo", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 페이지 전체 좌우 스크롤 차단 (안쪽 .table-scroll 등은 자체 가로 스크롤 가능) */
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(232, 255, 92, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(120, 200, 255, 0.04), transparent 60%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============ FOREX SECTION ============ */
.forex-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto 16px;
}
@media (max-width: 800px) {
  .forex-grid { grid-template-columns: 1fr; }
}

.forex-card {
  padding: 24px 26px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.forex-card--primary {
  background: linear-gradient(180deg, rgba(232,255,92,0.04), transparent 60%), var(--bg-soft);
  border-color: rgba(232,255,92,0.18);
}

.forex-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.forex-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.forex-card__pair {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.forex-card__price {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.forex-card__chg {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 14px;
}
.forex-card__chg.up   { color: var(--up); }
.forex-card__chg.down { color: var(--down); }

.forex-chart {
  width: 100%;
  height: 110px;
  margin-top: 18px;
  display: block;
}
.forex-card__chart-label {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--ink-mute);
  text-align: right;
}

.forex-card__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
@media (max-width: 600px) {
  .forex-card__stats { grid-template-columns: 1fr 1fr; gap: 10px; }
}
.forex-card__stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.forex-card__stats span {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.forex-card__stats strong {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

/* 분석 카드 */
.forex-analysis {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 26px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.forex-analysis__title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.forex-analysis__body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.forex-analysis__body strong {
  color: var(--ink);
  font-weight: 600;
}
.forex-analysis__verdict {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.forex-analysis__verdict--positive { background: rgba(52,211,153,0.12); color: var(--up); }
.forex-analysis__verdict--neutral  { background: rgba(232,255,92,0.12); color: var(--accent); }
.forex-analysis__verdict--negative { background: rgba(248,113,113,0.12); color: var(--down); }

/* ============ PRICE STACK (USD + KRW) ============ */
.price-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
  align-items: flex-end;
}
.price-usd {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
}
.price-krw {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: -0.02em;
}

/* ============ MARKET TICKER (subtle retro band) ============ */
.market-ticker {
  position: relative;
  z-index: 100;
  background: #07090b;
  border-bottom: 1px solid rgba(232, 255, 92, 0.18);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.market-ticker__track {
  display: inline-block;
  padding-left: 100%;
  animation: tickerScroll 90s linear infinite;
  color: var(--ink-soft);
}
.market-ticker:hover .market-ticker__track {
  animation-play-state: paused;
}
.market-ticker .ticker-item {
  margin: 0 18px;
}
.market-ticker .ticker-item strong {
  color: var(--accent);
  font-weight: 600;
  margin-right: 6px;
  letter-spacing: 0.06em;
}
.market-ticker .ticker-sep {
  color: rgba(232, 255, 92, 0.25);
}
.market-ticker .up   { color: #34d399; }
.market-ticker .down { color: #f87171; }
@keyframes tickerScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-100%, 0, 0); }
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 13, 16, 0.7);
  border-bottom: 1px solid var(--line-soft);
}
.header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand__logo {
  width: 40px;
  height: 40px;
  display: block;
}
.brand__name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__name em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}
.nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav a { transition: color 0.15s; }
.nav a:hover { color: var(--ink); }

/* ============ HERO ============ */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 24px 140px;
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ============ MINIMAL HERO ============ */
.hero--minimal {
  min-height: 100vh;
  padding: 24px;
}
.hero__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 640px;
  gap: 28px;
}
.hero__logo {
  width: 140px;
  height: 140px;
  display: block;
  margin-bottom: 4px;
}
.hero__brand {
  margin: 0 0 8px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero__brand em {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}
.cursor-blink {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent);
  font-weight: 300;
  animation: cursorBlink 1.05s steps(1, end) infinite;
  font-style: normal;
}
@keyframes cursorBlink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.hero--minimal .search {
  width: 100%;
}
.hero__content {
  max-width: 760px;
  width: 100%;
}
.hero__eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin: 0 0 24px;
}
.hero__title {
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 24px;
}
.hero__title-accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}
.hero__sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 44px;
}

/* search */
.search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 255, 92, 0.12);
}
.search__icon {
  width: 20px;
  height: 20px;
  color: var(--ink-mute);
  flex-shrink: 0;
}
.search__input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  padding: 14px 14px;
  outline: none;
  font-family: inherit;
}
.search__input::placeholder { color: var(--ink-mute); }
.search__btn {
  border: none;
  background: var(--accent);
  color: #14180a;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 999px;
  transition: transform 0.1s, background 0.15s;
}
.search__btn:hover { background: var(--accent-soft); }
.search__btn:active { transform: scale(0.97); }

.search__suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  text-align: left;
  max-height: 320px;
  overflow-y: auto;
  z-index: 10;
}
.search__suggest li {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.1s;
}
.search__suggest li:hover,
.search__suggest li[aria-selected="true"] {
  background: var(--bg-soft);
}
.search__suggest .sug-ticker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

/* chips */
.hero__chips {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-label {
  font-size: 12px;
  color: var(--ink-mute);
  margin-right: 4px;
}
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-mono);
  transition: all 0.15s;
}
.chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  animation: bounce 2.4s ease-in-out infinite;
}
.scroll-indicator svg {
  width: 18px;
  height: 18px;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50%      { transform: translate(-50%, 8px); opacity: 1; }
}

/* ============ SECTIONS ============ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px 24px;
}
.section--alt {
  background: var(--bg-soft);
  max-width: none;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section--alt > .features { padding: 0 24px; }

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section__eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin: 0 0 10px;
  font-weight: 500;
}
.section__title {
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 10px;
}
.section__sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.market-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-mute);
}
.dot--live {
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ============ RANKING TABLE ============ */
.table-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.ranking {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ranking thead th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  text-transform: uppercase;
}
.ranking td {
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.ranking tr:last-child td { border-bottom: none; }
.ranking tbody tr {
  transition: background 0.12s;
}
.ranking tbody tr:hover { background: rgba(232, 255, 92, 0.03); }

.col-rank { width: 56px; }
.col-num  { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.col-act  { width: 64px; text-align: right; }

.rank-num {
  font-family: var(--font-mono);
  color: var(--ink-mute);
  font-size: 13px;
}
.company {
  display: flex;
  align-items: center;
  gap: 14px;
}
.company__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a3038, #1a1e24);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.company__meta { display: flex; flex-direction: column; gap: 2px; }
.company__name { font-weight: 500; color: var(--ink); }
.company__ticker { font-size: 12px; color: var(--ink-mute); font-family: var(--font-mono); }

.up   { color: var(--up); }
.down { color: var(--down); }

.detail-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.detail-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 255, 92, 0.06);
}
.detail-btn svg { width: 16px; height: 16px; }

/* ============ FEATURES ============ */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.feature {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.15s, transform 0.2s;
}
.feature:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(232, 255, 92, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}
.feature h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

/* ============ DATA CARDS ============ */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.data-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.15s;
}
.data-card:hover { border-color: var(--ink-mute); }
.data-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}
.data-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 40px 24px;
  background: var(--bg-soft);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__brand {
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 15px;
}
.footer__tag {
  margin: 0;
  color: var(--ink-mute);
  font-size: 13px;
}
.footer__meta {
  text-align: right;
  font-size: 12px;
  color: var(--ink-mute);
}
.footer__meta p { margin: 0 0 4px; }

/* ============ MODAL ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  animation: modalIn 0.22s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-right: 40px;
  margin-bottom: 24px;
}
.modal__ticker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  margin: 0 0 4px;
  letter-spacing: 0.05em;
}
.modal__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.modal__price-now {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  text-align: right;
}
.modal__price-chg {
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 4px 0 0;
  text-align: right;
}

.modal__chart {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}
.modal__chart svg {
  width: 100%;
  height: 180px;
  display: block;
}

.modal__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 24px;
}
.metric {
  background: var(--bg-elev);
  padding: 14px 16px;
}
.metric__label {
  font-size: 11px;
  color: var(--ink-mute);
  margin: 0 0 6px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.metric__help {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--ink-mute);
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  cursor: help;
  background: transparent;
  font-weight: 600;
  position: relative;
}
.metric__help:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.metric__help[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  max-width: 240px;
  white-space: normal;
  width: max-content;
  z-index: 1;
  pointer-events: none;
}
.metric__value {
  font-family: var(--font-mono);
  font-size: 16px;
  margin: 0;
  font-weight: 500;
}

.modal__section h4 {
  font-size: 13px;
  margin: 0 0 8px;
  color: var(--ink-mute);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.modal__section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ============ HELP TOOLTIP (universal) ============ */
.help-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--ink-mute);
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: help;
  background: transparent;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
  transition: border-color 120ms ease, color 120ms ease;
}
.help-btn:hover,
.help-btn:focus {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

/* JS가 body에 단 하나 생성해서 위치 계산 — overflow:hidden 영향 안 받음 */
.help-tooltip {
  position: fixed;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  max-width: 280px;
  width: max-content;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  transition: opacity 100ms ease;
  transform: translate(-50%, -100%);
}
.help-tooltip[data-placement="bottom"] {
  transform: translate(-50%, 0);
}
.help-tooltip.visible { opacity: 1; }

/* ============ MODAL LAUNCHER ============ */
.modal__launcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
}
@media (max-width: 600px) {
  .modal__launcher { grid-template-columns: 1fr 1fr; }
}
.launcher-btn {
  padding: 12px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  transition: all 120ms ease;
}
.launcher-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-1px);
}

/* ============ RESPONSIVE — TABLET (≤900px) ============ */
@media (max-width: 900px) {
  .header__inner { padding: 12px 16px; gap: 12px; }
  .nav a { font-size: 13px; }
  .features { gap: 12px; padding: 0 4px; }
  .feature { padding: 20px; }
  .data-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ RESPONSIVE — MOBILE (≤720px) ============ */
@media (max-width: 720px) {
  body { font-size: 14px; }
  .nav { display: none; }
  .section { padding: 56px 16px; }
  .section__header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section__title { font-size: 24px; line-height: 1.25; }
  .section__sub { font-size: 12px; }
  .section__eyebrow { font-size: 10px; }

  /* HERO */
  .hero--minimal { padding: 12px 16px; }
  .hero__center { gap: 20px; max-width: 100%; }
  .hero__logo { width: 110px; height: 110px; }
  .hero__brand { font-size: 30px; letter-spacing: -0.02em; }
  .search { padding: 4px 6px 4px 14px; }
  .search__icon { width: 16px; height: 16px; }
  .search__input { font-size: 14px; min-width: 0; flex: 1; padding: 10px 4px; }
  .search__btn { font-size: 13px; padding: 8px 14px; flex-shrink: 0; }
  .scroll-indicator { bottom: 24px; }

  /* MARKET TICKER */
  .market-ticker { font-size: 11px; padding: 6px 0; }

  /* RANKING TABLE */
  .table-wrap { margin: 0 -16px; padding: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ranking { font-size: 12px; min-width: 580px; }
  .ranking thead th, .ranking td { padding: 10px 8px; }
  .col-num.col-per { display: none; }
  .ranking thead th:nth-child(6),
  .ranking td:nth-child(6) { display: none; }
  .company__avatar { width: 28px; height: 28px; font-size: 10px; }
  .company__name { font-size: 13px; }
  .company__ticker { font-size: 11px; }

  /* FOREX */
  .forex-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 4px; }
  .forex-card { padding: 18px 18px; }
  .forex-card__price { font-size: 28px; }
  .forex-card__chg { font-size: 13px; }
  .forex-card__stats { grid-template-columns: 1fr 1fr; gap: 12px 16px; padding-top: 14px; margin-top: 14px; }
  .forex-card__stats span { font-size: 9px; }
  .forex-card__stats strong { font-size: 13px; }
  .forex-card__head { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 12px; }
  .forex-chart { height: 90px; margin-top: 14px; }
  .forex-analysis { padding: 18px 18px; margin: 0 4px; }
  .forex-analysis__title { font-size: 13px; }
  .forex-analysis__body { font-size: 13px; line-height: 1.65; }

  /* FEATURES */
  .features { grid-template-columns: 1fr; }
  .feature { padding: 22px 18px; }
  .feature__icon { font-size: 28px; }
  .feature h3 { font-size: 16px; }
  .feature p { font-size: 13px; }

  /* DATA GRID */
  .data-grid { grid-template-columns: 1fr; gap: 10px; }
  .data-card { padding: 18px; }

  /* FOOTER */
  .footer__inner { flex-direction: column; gap: 16px; align-items: flex-start; padding: 28px 16px; }
  .footer__meta { text-align: left; font-size: 11px; }
  .footer__meta p { margin: 4px 0; }

  /* HELP TOOLTIP */
  .help-tooltip { max-width: calc(100vw - 24px); font-size: 11px; padding: 8px 10px; }

  /* SUGGEST DROPDOWN */
  .search__suggest { font-size: 13px; max-height: 280px; }
  .search__suggest li { padding: 10px 12px; }
}

/* ============ RESPONSIVE — SMALL MOBILE (≤480px) ============ */
@media (max-width: 480px) {
  .hero__brand { font-size: 26px; }
  .hero__logo { width: 90px; height: 90px; }
  .section__title { font-size: 22px; }
  .forex-card__price { font-size: 24px; }
  .forex-card__stats { grid-template-columns: 1fr 1fr; }
  .ranking { min-width: 520px; }
  /* 거래량도 숨김 (5개 컬럼만) */
  .ranking thead th:nth-child(5),
  .ranking td:nth-child(5) { display: none; }
}
