/* ============================================================
   여의도 투자연구소 — 라이트 프리미엄 스타일
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

:root {
  --navy-900: #0a1730;
  --navy-800: #102347;
  --navy-700: #16305e;
  --navy-600: #1e3d75;
  --gold-500: #b8912a;
  --gold-400: #d4a935;
  --gold-300: #e6c260;
  --gold-glow: rgba(184,145,42,0.20);

  --bg: #f5f6f8;
  --surface: #ffffff;
  --card: #ffffff;
  --line: rgba(184,145,42,0.22);
  --line-soft: rgba(16,35,71,0.08);

  --text: #1a2438;
  --muted: #5c6780;
  --muted-2: #8a92a4;

  --up: #e53935;
  --down: #1565c0;
  --success: #16a34a;

  --shadow-sm: 0 2px 8px rgba(16,35,71,0.06);
  --shadow: 0 8px 24px rgba(16,35,71,0.08);
  --shadow-lg: 0 16px 48px rgba(16,35,71,0.12);
  --shadow-gold: 0 8px 24px rgba(184,145,42,0.20);
}

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system,
    BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue',
    'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-feature-settings: 'ss01','ss02','ss03','tnum';
  letter-spacing: -0.01em;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(16,35,71,0.04), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(184,145,42,0.06), transparent 45%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ====== Header ====== */
.site-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  box-shadow: 0 1px 3px rgba(16,35,71,0.04);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}

/* ★ 로고 이미지 적용 */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo img {
  height: 80px !important; /* ★ 핵심: 무조건 38px로 고정 */
  width: auto !important;
  max-height: 80px !important;
  object-fit: contain;
  display: block;
}
/* 이미지가 없을 때 대체 텍스트 */
.logo .logo-text-fallback {
  font-size: 21px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--navy-800);
}
.logo .logo-text-fallback span { color: var(--gold-500); }

.nav-toggle {
  display: none; background: none;
  border: 1px solid var(--line); color: var(--gold-500);
  font-size: 20px; padding: 6px 12px;
  border-radius: 8px; cursor: pointer;
}
.nav-list { display: flex; gap: 4px; list-style: none; }
.nav-list a {
  font-size: 14px; font-weight: 700;
  padding: 10px 16px; border-radius: 8px;
  transition: all 0.2s; color: var(--muted);
  letter-spacing: 0.2px;
}
.nav-list a:hover { color: var(--gold-500); background: rgba(184,145,42,0.08); }
.nav-list a.active {
  color: var(--gold-500);
  background: rgba(184,145,42,0.10);
  box-shadow: inset 0 -2px 0 var(--gold-500);
}

/* ====== Hero ====== */
.hero {
  padding: 80px 0 60px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--gold-glow), transparent 70%);
  pointer-events: none; opacity: 0.7;
}
.hero-tag {
  display: inline-block; font-size: 12px; font-weight: 800;
  letter-spacing: 2px; color: var(--gold-500);
  padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 100px; background: rgba(184,145,42,0.06);
  margin-bottom: 24px;
}
.hero-title {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(30px, 5.5vw, 54px);
  font-weight: 900; line-height: 1.2;
  letter-spacing: -0.02em; margin-bottom: 20px;
  color: var(--navy-900);
}
.hero-title em { font-style: normal; color: var(--gold-500); position: relative; }
.hero-sub {
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--muted); max-width: 640px;
  line-height: 1.8; margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ====== Buttons ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 800; font-size: 15px;
  padding: 15px 30px; border-radius: 10px;
  cursor: pointer; border: none; transition: all 0.2s;
  letter-spacing: 0.3px; white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #ffffff; box-shadow: var(--shadow-gold);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(184,145,42,0.30); }
.btn-ghost {
  background: #ffffff; color: var(--navy-800);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  background: rgba(184,145,42,0.06);
  border-color: var(--gold-500); color: var(--gold-500);
}

/* ====== Section ====== */
.section { padding: 60px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 30px; flex-wrap: wrap;
}
.section-title {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 900; color: var(--navy-900);
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 14px;
}
.section-title::before {
  content: ''; width: 4px; height: 26px;
  background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
  border-radius: 2px;
  box-shadow: 0 0 12px var(--gold-glow);
}
.section-desc { font-size: 14px; color: var(--muted); margin-top: 6px; }
.section-meta {
  font-size: 12px; color: var(--muted-2);
  font-weight: 700; letter-spacing: 0.5px;
}

/* ====== Cards ====== */
.card {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 16px; padding: 26px;
  transition: all 0.25s; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card:hover { border-color: var(--line); box-shadow: var(--shadow); transform: translateY(-2px); }

/* ====== KPI Grid ====== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.kpi {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 16px; padding: 22px;
  position: relative; overflow: hidden;
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}
.kpi::before {
  content: ''; position: absolute;
  top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold-500), transparent);
}
.kpi::after {
  content: ''; position: absolute;
  top: 16px; right: 16px; width: 6px; height: 6px;
  background: var(--gold-400); border-radius: 50%;
  box-shadow: 0 0 10px var(--gold-glow);
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); }
.kpi-label {
  font-size: 12px; color: var(--muted);
  font-weight: 800; margin-bottom: 12px;
  letter-spacing: 1px; text-transform: uppercase;
}
.kpi-value {
  font-size: 28px; font-weight: 800; color: var(--navy-900);
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.kpi-sub {
  font-size: 12px; color: var(--muted-2);
  margin-top: 8px; display: flex; align-items: center; gap: 6px;
}
.kpi-sub .dot {
  width: 6px; height: 6px; background: var(--success);
  border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

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

/* ====== Risk Meters ====== */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin-top: 16px;
}
.risk-card {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 16px; padding: 24px;
  box-shadow: var(--shadow-sm);
}
.risk-head {
  display: flex; justify-content: space-between;
  align-items: baseline; margin-bottom: 14px;
}
.risk-head .label {
  font-size: 13px; color: var(--muted);
  font-weight: 800; letter-spacing: 0.5px;
}
.risk-head .val {
  font-size: 22px; font-weight: 800;
  color: var(--navy-900); letter-spacing: -0.5px;
}
.risk-bar {
  height: 8px; background: rgba(16,35,71,0.08);
  border-radius: 100px; overflow: hidden; position: relative;
}
.risk-fill {
  height: 100%; border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 12px currentColor;
}
.risk-fill.gold { background: linear-gradient(90deg, #8b6d14, var(--gold-400)); color: var(--gold-400); }
.risk-fill.red { background: linear-gradient(90deg, #7a1f2b, #e53935); color: var(--up); }
.risk-fill.green { background: linear-gradient(90deg, #1a5d3a, #16a34a); color: var(--success); }

/* ====== Tables ====== */
.table-card {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 14px; min-width: 600px;
}
table.data th, table.data td {
  padding: 14px 18px; text-align: right;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
table.data th {
  background: #fafbfc; color: var(--gold-500);
  font-weight: 800; font-size: 12px;
  letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
table.data td:first-child, table.data th:first-child { text-align: left; color: var(--navy-900); font-weight: 700; }
table.data tbody tr { transition: background 0.15s; }
table.data tbody tr:hover { background: rgba(184,145,42,0.04); }
table.data tbody tr:last-child td { border-bottom: none; }

.rank-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: rgba(184,145,42,0.10);
  color: var(--gold-500);
  border: 1px solid var(--line);
  border-radius: 6px; font-size: 11px; font-weight: 800;
  margin-right: 10px;
}
.rank-no.top1 { background: linear-gradient(135deg, var(--gold-400), var(--gold-500)); color: #fff; border-color: transparent; }
.rank-no.top2 { background: rgba(184,145,42,0.22); color: var(--gold-500); }
.rank-no.top3 { background: rgba(184,145,42,0.12); color: var(--gold-400); }

/* ====== CTA ====== */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  border: 1px solid var(--line); border-radius: 20px;
  padding: 48px 40px; text-align: center;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.cta-banner::before {
  content: ''; position: absolute;
  top: -100px; right: -100px; width: 300px; height: 300px;
  background: radial-gradient(circle, var(--gold-glow), transparent 70%);
  pointer-events: none;
}
.cta-banner h3 {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900; margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.cta-banner h3 em { font-style: normal; color: var(--gold-300); }
.cta-banner p {
  font-size: 15px; color: rgba(255,255,255,0.75);
  margin-bottom: 28px; max-width: 500px;
  margin-left: auto; margin-right: auto;
}

/* ====== Team ====== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.team-card {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 20px; padding: 30px 26px;
  transition: all 0.3s; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.team-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 80px;
  background: radial-gradient(ellipse at 50% 0%, var(--gold-glow), transparent 70%);
  opacity: 0.6; pointer-events: none;
}
.team-card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: var(--shadow-lg);
}
.team-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 22px; font-weight: 900;
  color: var(--navy-900); letter-spacing: -0.02em;
  margin-bottom: 6px; position: relative;
}
.team-role {
  font-size: 13px; color: var(--gold-500);
  margin-bottom: 20px; font-weight: 700;
  letter-spacing: 0.5px; position: relative;
}
.team-actions { display: flex; justify-content: center; }
.btn-sm { padding: 12px 26px; font-size: 14px; }

/* ====== Footer ====== */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.72);
  padding: 40px 0 32px; font-size: 13px;
  margin-top: 60px;
}
.footer-inner {
  display: flex; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
}
.footer-brand strong { color: #ffffff; font-size: 15px; }
.footer-brand { line-height: 1.9; }
.footer-note {
  max-width: 560px; font-size: 12px;
  color: rgba(255,255,255,0.55); line-height: 1.9;
}

/* ====== Tabs ====== */
.tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: #ffffff; padding: 4px;
  border-radius: 12px; border: 1px solid var(--line-soft);
  width: fit-content; overflow-x: auto; max-width: 100%;
  box-shadow: var(--shadow-sm);
}
.tab {
  padding: 10px 22px; border-radius: 8px;
  font-size: 13px; font-weight: 800;
  color: var(--muted); cursor: pointer;
  border: none; background: none;
  transition: all 0.2s; white-space: nowrap;
  letter-spacing: 0.3px;
}
.tab:hover { color: var(--gold-500); }
.tab.active {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #ffffff; box-shadow: var(--shadow-gold);
}

/* ====== Chart ====== */
.chart-wrap {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px;
  height: 400px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) { .chart-wrap { height: 300px; } }

/* ====== Toast ====== */
.toast {
  position: fixed; top: 90px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #ffffff;
  border: 1px solid var(--line); color: var(--navy-900);
  padding: 16px 30px; border-radius: 12px;
  font-weight: 800; font-size: 15px;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: all 0.35s; z-index: 999;
  letter-spacing: 0.3px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.win { border-color: var(--up); box-shadow: 0 0 30px rgba(229,57,53,0.35); color: var(--up); }
.toast.lose { border-color: var(--down); box-shadow: 0 0 30px rgba(21,101,192,0.35); color: var(--down); }

/* ====== Modal (신청서) ====== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,23,48,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px; overflow-y: auto;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 20px; padding: 40px 34px 34px;
  max-width: 500px; width: 100%;
  position: relative;
  box-shadow: 0 30px 80px rgba(10,23,48,0.30), 0 0 60px rgba(184,145,42,0.10);
  max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(16,35,71,0.04);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  width: 34px; height: 34px; border-radius: 8px;
  cursor: pointer; font-size: 15px;
  transition: all 0.2s;
}
.modal-close:hover { color: var(--gold-500); border-color: var(--line); }
.modal-head { text-align: center; margin-bottom: 28px; }
.modal-tag {
  display: inline-block; font-size: 11px; font-weight: 800;
  letter-spacing: 2px; color: var(--gold-500);
  padding: 5px 12px; border: 1px solid var(--line);
  border-radius: 100px; background: rgba(184,145,42,0.06);
  margin-bottom: 14px; text-transform: uppercase;
}
.modal-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 24px; font-weight: 900;
  color: var(--navy-900); letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.modal-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

.modal-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-size: 12px; font-weight: 800;
  color: var(--muted); letter-spacing: 0.5px;
}
.form-row label span { color: var(--gold-500); }
.form-row input, .form-row select {
  background: #fafbfc;
  border: 1px solid var(--line-soft);
  border-radius: 10px; color: var(--navy-900);
  font-family: inherit; font-size: 14px;
  padding: 12px 14px; outline: none;
  transition: all 0.2s; width: 100%;
  -webkit-appearance: none; appearance: none;
}
.form-row select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235c6780' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-row input:focus, .form-row select:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(184,145,42,0.12);
  background: #ffffff;
}
.form-row input::placeholder { color: var(--muted-2); }

.form-agree {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
  cursor: pointer; padding: 4px 0; margin-top: 4px;
}
.form-agree input { accent-color: var(--gold-500); width: 16px; height: 16px; }
.modal-submit { margin-top: 10px; width: 100%; padding: 16px 0; font-size: 15px; }

.modal-success { text-align: center; padding: 20px 10px 10px; }
.success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #ffffff; font-size: 34px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 12px 32px rgba(184,145,42,0.35);
}
.modal-success h3 {
  font-family: 'Noto Serif KR', serif;
  font-size: 22px; font-weight: 900;
  color: var(--navy-900); margin-bottom: 10px;
}
.modal-success p {
  font-size: 14px; color: var(--muted);
  line-height: 1.7; margin-bottom: 24px;
}
.modal-success strong { color: var(--gold-500); }

@media (max-width: 480px) {
  .modal-box { padding: 32px 22px 26px; }
  .modal-title { font-size: 20px; }
}

/* ====== Responsive ====== */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none; position: absolute;
    top: 100%; left: 0; right: 0;
    background: #ffffff;
    backdrop-filter: blur(20px);
    flex-direction: column; gap: 0; padding: 8px;
    border-bottom: 1px solid var(--line-soft);
    box-shadow: var(--shadow);
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 14px 18px; border-radius: 8px; }
  .site-header { position: relative; padding: 12px 0; }
  .hero { padding: 50px 0 40px; }
  .section { padding: 40px 0; }
  .cta-banner { padding: 36px 24px; }
  .kpi-value { font-size: 24px; }
  .card { padding: 20px; }
  .team-card { padding: 26px 20px; }
}

/* ====== Editorial refinement · visual layer only ====== */
:root {
  --navy-900: #101c29;
  --navy-800: #192b39;
  --navy-700: #273c49;
  --navy-600: #35515e;
  --gold-500: #a3773a;
  --gold-400: #c39b59;
  --gold-300: #e3c997;
  --gold-glow: rgba(191,151,87,0.19);
  --bg: #f5f3ef;
  --surface: #fffefa;
  --card: #fffefa;
  --line: rgba(163,119,58,0.28);
  --line-soft: rgba(30,42,47,0.10);
  --text: #19252c;
  --muted: #667077;
  --muted-2: #92999a;
  --up: #e53935;
  --down: #1565c0;
  --shadow-sm: 0 5px 24px rgba(20,35,42,0.035);
  --shadow: 0 18px 48px rgba(20,35,42,0.075);
  --shadow-lg: 0 30px 75px rgba(20,35,42,0.11);
  --shadow-gold: 0 10px 28px rgba(125,87,38,0.15);
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(circle at 2% 15%, rgba(195,155,89,0.075), transparent 30%),
    radial-gradient(circle at 100% 60%, rgba(25,43,57,0.035), transparent 35%);
  background-attachment: scroll;
  letter-spacing: -0.025em;
}
::selection { background: #c39b59; color: #101c29; }
.container { max-width: 1240px; padding-left: clamp(22px, 4vw, 48px); padding-right: clamp(22px, 4vw, 48px); }

.site-header {
  background: rgba(250,249,246,0.96);
  border-bottom: 1px solid rgba(30,42,47,0.12);
  padding: 8px 0;
  box-shadow: none;
}
.header-inner { min-height: 76px; }
.logo { color: var(--navy-900); font-family: 'Noto Serif KR', serif; font-size: 20px; font-weight: 900; letter-spacing: -0.07em; white-space: nowrap; }
.logo > span:not(.logo-text-fallback) { color: var(--gold-500); }
.logo img { height: 64px !important; max-height: 64px !important; }
.logo .logo-text-fallback { font-family: 'Noto Serif KR', serif; font-size: 20px; letter-spacing: -0.07em; }
.nav-list { align-items: center; gap: 6px; }
.nav-list a { display: block; color: #485760; font-size: 13px; font-weight: 700; letter-spacing: -0.02em; padding: 12px 15px; border-radius: 2px; }
.nav-list a:hover { color: var(--navy-900); background: rgba(163,119,58,0.08); }
.nav-list a.active { color: var(--navy-900); background: transparent; box-shadow: inset 0 -2px 0 var(--gold-500); }
.nav-list li:last-child a { margin-left: 14px; padding: 11px 19px; border: 1px solid var(--navy-900); color: var(--navy-900); }
.nav-list li:last-child a:hover, .nav-list li:last-child a.active { background: var(--navy-900); color: #fff; box-shadow: none; }

.hero {
  min-height: 550px;
  display: flex; align-items: center;
  padding: 100px 0 105px;
  background-color: #101d28;
  background-image:
    radial-gradient(ellipse at 78% 48%, rgba(180,137,72,0.19), transparent 35%),
    linear-gradient(90deg, #101d28 0%, #142633 58%, #1e3540 100%);
  border-bottom: 4px solid #b69159;
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(224,200,156,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,200,156,0.055) 1px, transparent 1px);
  background-size: 66px 66px;
  mask-image: linear-gradient(90deg, transparent 35%, black 100%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute;
  left: auto; right: -125px; top: 50%;
  transform: translateY(-50%) rotate(-23deg);
  width: min(57vw, 760px); height: min(57vw, 760px);
  border: 1px solid rgba(209,172,110,0.22);
  border-radius: 50%; opacity: 1;
  background: repeating-radial-gradient(circle, transparent 0, transparent 57px, rgba(216,181,122,0.11) 58px, transparent 59px),
    radial-gradient(circle, rgba(173,133,74,0.10), transparent 63%);
  box-shadow: 0 0 0 95px rgba(216,181,122,0.025), inset 0 0 90px rgba(216,181,122,0.06);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; width: 100%; }
.hero-tag {
  margin-bottom: 29px; border: 0; border-radius: 0; padding: 0 0 0 20px;
  background: transparent; color: var(--gold-300);
  font-size: 11px; font-weight: 700; letter-spacing: 0.23em;
  position: relative;
}
.hero-tag::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 2px; background: var(--gold-400); }
.hero-title { max-width: 850px; color: #f8f7f2; font-size: clamp(37px, 4.7vw, 64px); line-height: 1.34; letter-spacing: -0.065em; margin-bottom: 24px; }
.hero-title em { color: #e5c58e; }
.hero-sub { max-width: 570px; color: #c4cbd0; font-size: 16px; line-height: 1.95; margin-bottom: 38px; }
.hero-cta { gap: 10px; }
.btn { border-radius: 3px; padding: 15px 25px; font-size: 13px; font-weight: 700; letter-spacing: 0; transition: background .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s; }
.btn-gold { background: #bb9255; color: #111d27; box-shadow: none; }
.btn-gold:hover { background: #d2ac70; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.14); }
.hero .btn-ghost { background: transparent; color: #f4f1e9; border-color: rgba(244,241,233,0.45); box-shadow: none; }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }

.section { padding: 72px 0; }
.section-head { align-items: flex-end; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid rgba(30,42,47,0.15); }
.section-title { gap: 0; font-size: clamp(23px, 2.5vw, 32px); font-weight: 700; letter-spacing: -0.06em; line-height: 1.35; }
.section-title::before { display: none; }
.section-desc { margin-top: 8px; font-size: 13px; letter-spacing: 0; }
.section-meta { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-500); }
main.section { min-height: calc(100vh - 410px); padding-top: 68px; }
main.section > .container > .section-head:first-child { margin-bottom: 34px; }

.card, .kpi, .risk-card, .table-card, .team-card, .trade-panel, .idx-card, .chart-mini, .chart-wrap {
  background: #fffefa; border: 1px solid rgba(30,42,47,0.11); border-radius: 5px;
  box-shadow: var(--shadow-sm);
}
.card:hover, .kpi:hover, .team-card:hover { border-color: rgba(163,119,58,0.45); box-shadow: var(--shadow); transform: translateY(-3px); }
.kpi::before { height: 2px; }
.kpi::after { display: none; }

/* Home dashboard: override page-local presentation without changing values or scripts. */
#analysis-dashboard { background: #fffefa; border: 1px solid rgba(30,42,47,0.11); border-radius: 5px; box-shadow: var(--shadow-sm); padding: clamp(18px, 3vw, 30px); }
#analysis-dashboard .gauge-container { gap: 14px; margin-bottom: 16px; }
#analysis-dashboard .gauge-wrapper { align-items: flex-start; border: 1px solid var(--line-soft); border-radius: 3px; background: #f7f6f2; padding: 22px 24px; }
#analysis-dashboard .gauge-label { color: var(--gold-500); font-size: 11px; letter-spacing: 0.13em; margin-bottom: 15px; }
#analysis-dashboard .gauge-value { font-size: clamp(30px, 4vw, 42px); font-weight: 700; }
#analysis-dashboard .gauge-value.up,
#analysis-dashboard .gauge-value.positive { color: var(--up); }
#analysis-dashboard .gauge-value.down,
#analysis-dashboard .gauge-value.negative { color: var(--down); }
#analysis-dashboard .gauge-unit { font-size: 15px; }
#analysis-dashboard .gauge-bar-container { height: 3px; background: #e2e0d9; margin-top: 20px; }
#analysis-dashboard .gauge-bar-fill { background: var(--down); }
#analysis-dashboard .gauge-bar-fill.up,
#analysis-dashboard .gauge-bar-fill.positive { background: var(--up); }
#analysis-dashboard .gauge-bar-fill.down,
#analysis-dashboard .gauge-bar-fill.negative { background: var(--down); }
#analysis-dashboard .progress-section { padding-top: 16px; }
#analysis-dashboard .progress-item { background: #f7f6f2; border: 1px solid var(--line-soft); border-radius: 3px; padding: 20px 24px; }
#analysis-dashboard .progress-bar-bg { height: 4px; background: #e2e0d9; }
#analysis-dashboard .progress-bar-fill.positive { background: var(--up); }
#analysis-dashboard .progress-bar-fill.negative { background: var(--down); }
#analysis-dashboard .progress-bar-fill.neutral { background: var(--muted); }
.risk-gauge-card { background: #fffefa; border: 1px solid rgba(30,42,47,0.11); border-radius: 5px; padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow-sm); }
.risk-gauge-title { font-family: 'Noto Serif KR', serif; font-size: 18px; }
.risk-gauge-desc { background: #f7f6f2; border-left: 2px solid #b4915d; border-radius: 0; color: var(--muted); padding: 15px 18px; }
.strategy-card { background: #fffefa; border: 1px solid rgba(30,42,47,0.11); border-radius: 5px; padding: clamp(18px, 3vw, 28px); margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.strategy-card-header { border-bottom: 1px solid var(--line-soft); padding-bottom: 17px; margin-bottom: 17px; }
.strategy-card-title { font-family: 'Noto Serif KR', serif; font-size: 17px; }
.strategy-card-badge { background: #f1ece2; border-radius: 2px; font-size: 10px; letter-spacing: .08em; padding: 5px 10px; }
.strategy-item, .strategy-item.win, .strategy-item.loss { background: #f7f6f2; border: 1px solid var(--line-soft); border-radius: 3px; padding: 17px 20px; }
.strategy-item.win { background: #f2f6f1; }
.strategy-item.loss { background: #f6f5f2; }
.vip-blur-overlay { border-radius: 3px; }
.vip-blur-overlay .btn { border-radius: 3px; box-shadow: none; }

/* Data tables and controls. */
.table-card { overflow: hidden; }
table.data { font-size: 13px; }
table.data th { background: #f2f0eb; color: #617078; border-bottom: 1px solid rgba(30,42,47,0.15); font-size: 11px; letter-spacing: 0.07em; }
table.data th, table.data td { padding: 18px 22px; }
table.data tbody tr:nth-child(even) { background: rgba(245,243,239,0.42); }
table.data tbody tr:hover { background: #f6f1e7; }
.rank-no { background: transparent; border: 1px solid var(--line); border-radius: 2px; margin-right: 0; }
.rank-no.top1 { background: var(--navy-900); border-color: var(--navy-900); color: #e5c58e; }
.rank-no.top2, .rank-no.top3 { background: #eee7db; color: var(--gold-500); }
.rank-tabs { border-bottom-color: rgba(30,42,47,0.15); }
.rank-tab-btn { font-size: 14px; }
.rank-tab-btn.active { color: var(--navy-900); }
.rank-tab-btn.active::after { background: var(--gold-500); }
.rank-tab-btn.active .tab-count { background: var(--navy-900); }
.tabs { background: #eae7e0; border: 0; border-radius: 3px; box-shadow: none; gap: 2px; }
.tab { border-radius: 2px; font-size: 12px; }
.tab.active { background: var(--navy-900); color: #fff; box-shadow: none; }

/* Derivatives panels. */
.idx-grid { gap: 16px; margin-bottom: 54px; }
.idx-card { padding: 26px 30px; }
.idx-card::before { background: var(--gold-400); width: 2px; }
.idx-name { color: var(--gold-500); letter-spacing: .14em; font-size: 10px; }
.idx-val { font-size: clamp(30px, 4vw, 40px); font-weight: 700; }
.trade-panel { padding: clamp(18px, 3vw, 32px); }
.attempt-info, .balance-item { background: #f7f6f2; border-radius: 3px; }
.balance-item { padding: 21px; }
.balance-item .lbl { color: var(--gold-500); font-size: 10px; letter-spacing: .12em; }
.balance-item .val { font-size: 22px; }
.btn-buy, .btn-sell { border-radius: 3px; box-shadow: none; letter-spacing: 0; font-size: 14px; padding: 17px 0; }
.btn-buy { background: #ab4b43; }
.btn-sell { background: #426983; }
.btn-buy:hover:not(:disabled), .btn-sell:hover:not(:disabled) { filter: brightness(1.08); }

/* Profit summary. */
.profit-hero {
  background: #152632;
  background-image: radial-gradient(circle at 90% 0%, rgba(206,168,101,0.17), transparent 34%),
    linear-gradient(125deg, #142531, #233a44);
  border: 1px solid rgba(193,154,87,0.35); border-radius: 5px;
  padding: clamp(28px, 5vw, 54px); box-shadow: 0 24px 60px rgba(17,31,39,0.12);
}
.profit-hero::before { background: repeating-radial-gradient(circle, transparent 0, transparent 36px, rgba(222,188,131,0.09) 37px, transparent 38px); top: -180px; right: -80px; width: 490px; height: 490px; }
.profit-hero-label { font-size: 11px; letter-spacing: .16em; color: #e2c48b; }
.profit-hero-val { font-size: clamp(38px, 6vw, 60px); letter-spacing: -0.055em; }
.profit-hero-sub { color: #c2cccf; }
.profit-hero-sub em { color: #e2c48b; }
.profit-hero .stat-grid { border-top: 1px solid rgba(255,255,255,0.16); padding-top: 26px; margin-top: 32px; }
.profit-hero .stat-item { background: rgba(255,255,255,0.045); border-color: rgba(255,255,255,0.12); border-radius: 3px; }
.chart-mini { padding: 16px; }

/* Consultation, profile and testimonials. */
.intro-banner {
  background: #152632; background-image: radial-gradient(circle at 82% 0%, rgba(197,159,95,0.18), transparent 42%), linear-gradient(120deg, #142531, #253d47);
  border: 1px solid rgba(193,154,87,0.3); border-radius: 5px;
  padding: clamp(42px, 6vw, 75px) 26px; margin-bottom: 60px;
}
.intro-banner::before { background: repeating-radial-gradient(circle, transparent 0, transparent 51px, rgba(222,188,131,0.08) 52px, transparent 53px); width: 500px; height: 500px; top: -200px; left: 80%; }
.intro-banner h3 { font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.06em; }
.intro-banner em { color: #e2c48b; }
.intro-banner p { color: #cbd2d3; max-width: 620px; margin: 0 auto; }
.team-grid { gap: 18px; }
.team-card { padding: 36px 24px 40px; }
.team-card::before { height: 110px; background: linear-gradient(180deg, rgba(185,151,92,.1), transparent); }
.team-profile, .team-profile-fallback { border-radius: 50%; border: 3px solid #fffefa; outline: 1px solid rgba(163,119,58,0.3); box-shadow: 0 14px 32px rgba(20,35,42,0.12); }
.team-name { font-size: 24px; }
.trust-section { background: #fffefa; border: 1px solid var(--line-soft); border-radius: 5px; padding: 45px 22px; }
.trust-title { font-size: 26px; letter-spacing: -0.05em; }
.badge-item { background: #f7f6f2; border: 1px solid var(--line-soft); border-radius: 3px; box-shadow: none; }
.badge-item:hover { border-color: var(--gold-500); }
.review-stats { background: #192b39; border: 1px solid #192b39; border-radius: 5px; box-shadow: none; }
.review-stats .stat-item { flex: 1; min-width: 130px; padding: 10px; }
.review-stats .stat-item + .stat-item { border-left: 1px solid rgba(255,255,255,.15); }
.review-stats .stat-val { color: #e2c48b; font-family: 'Noto Serif KR', serif; }
.review-stats .stat-label { color: #c5ced0; }
.review-card { background: #fffefa; border: 1px solid var(--line-soft); border-radius: 4px; box-shadow: var(--shadow-sm); padding: 28px; }
.review-quote { font-size: 14px; line-height: 1.85; font-weight: 500; }
.review-quote::before { color: rgba(163,119,58,0.16); }
.review-avatar { background: #eae7e0; color: var(--gold-500); }
.slider-btn { border-radius: 3px; box-shadow: none; background: #fffefa; }

.site-footer { margin-top: 50px; background: #101d27; border-top: 3px solid #ab8854; padding: 54px 0; }
.footer-inner { align-items: flex-start; }
.footer-brand strong { font-family: 'Noto Serif KR', serif; font-size: 18px; letter-spacing: -0.05em; }
.footer-brand { color: #c1c9c9; }
.footer-note { color: #9ba8a9; }
.toast { border-radius: 3px; }
.modal-box { border-radius: 5px; }

@media (max-width: 860px) {
  .site-header { position: sticky; padding: 5px 0; }
  .header-inner { min-height: 64px; }
  .logo img { height: 56px !important; max-height: 56px !important; }
  .nav-toggle { display: block; border-radius: 2px; color: var(--navy-900); border-color: var(--line-soft); }
  .nav-list { background: #faf9f6; padding: 12px 22px 20px; border-bottom: 1px solid var(--line-soft); }
  .nav-list li:last-child a { margin: 7px 0 0; text-align: center; }
  .hero { min-height: 490px; padding: 74px 0 78px; }
  .hero::after { right: -220px; width: 550px; height: 550px; opacity: .45; }
  .section { padding: 54px 0; }
  main.section { padding-top: 48px; }
}
@media (max-width: 640px) {
  .hero { min-height: 0; padding: 70px 0 76px; }
  .hero::after { right: -310px; opacity: .28; }
  .hero-title { font-size: clamp(35px, 9vw, 47px); }
  .hero-sub { font-size: 14px; }
  .hero-cta .btn { flex: 1 1 180px; }
  .section-head { gap: 8px; }
  .section-meta { font-size: 10px; }
  #analysis-dashboard .gauge-wrapper { padding: 17px 14px; }
  #analysis-dashboard .gauge-value { font-size: 30px; }
  table.data th, table.data td { padding: 14px 15px; }
  .rank-tab-btn { padding: 13px 12px; font-size: 13px; }
  .review-stats { gap: 0; padding: 12px 5px; }
  .review-stats .stat-item { min-width: 95px; padding: 8px 4px; }
  .review-stats .stat-val { font-size: 20px; }
  .review-stats .stat-label { font-size: 11px; }
  .footer-inner { gap: 24px; }
}
/* ====== Mobile & tablet layouts ====== */
@media (max-width: 1024px) {
  .review-card { min-width: 0; }
  .trust-badges { gap: 12px; }
  .badge-item { flex: 1 1 220px; }
}

@media (max-width: 860px) {
  .header-inner { position: relative; }
  .site-header nav { margin-left: 0; }
  .nav-toggle { position: relative; z-index: 2; min-width: 44px; min-height: 44px; margin-left: auto; }
  .site-header.mobile-open .nav-list { display: flex; }
  .nav-list {
    align-items: stretch;
    max-height: calc(100dvh - 74px);
    overflow-y: auto;
    z-index: 1;
  }
  .nav-list a { display: block; min-height: 44px; padding: 12px 16px; }
  .section-head > div:first-child { min-width: 0; }
  .section-title { flex-wrap: wrap; }
  .idx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .container { padding-left: 18px; padding-right: 18px; }
  .site-header .logo { min-width: 0; font-size: 17px; }
  .site-header .logo .logo-text-fallback { font-size: 17px; }
  .site-header .logo img { height: 48px !important; max-height: 48px !important; }
  .nav-list { padding: 10px 18px 18px; }
  main.section { padding-top: 36px; }
  .section { padding-bottom: 42px; }
  .section-head { margin-bottom: 18px; padding-bottom: 15px; }
  .section-title { font-size: 23px; line-height: 1.35; }
  .section-desc { font-size: 12px; line-height: 1.6; }
  .hero-tag { font-size: 9px; letter-spacing: .16em; }
  .hero-cta { display: grid; grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; min-height: 48px; }
  #analysis-dashboard .gauge-container { gap: 8px; }
  #analysis-dashboard .gauge-wrapper { min-width: 0; }
  #analysis-dashboard .gauge-label { margin-bottom: 10px; }
  #analysis-dashboard .gauge-value { white-space: nowrap; letter-spacing: -1px; }
  #analysis-dashboard .progress-item { padding: 16px; }
  .risk-gauge-labels { font-size: 10px; }
  .strategy-card { margin-bottom: 12px; }
  .strategy-card-title { font-size: 15px; }
  .strategy-item { min-width: 0; }
  .strategy-stock-name { overflow-wrap: anywhere; }
  .rank-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .rank-tab-btn { padding: 13px 4px; white-space: nowrap; }
  .rank-tab-btn .tab-count { margin-left: 3px; padding: 2px 5px; }
  .rank-status { margin-left: 0; display: inline-block; }
  #panel-foreign table.data, #panel-program table.data { min-width: 0; table-layout: fixed; font-size: 11px; }
  #panel-foreign table.data th, #panel-foreign table.data td,
  #panel-program table.data th, #panel-program table.data td { padding: 11px 5px; }
  #panel-foreign table.data th:first-child, #panel-foreign table.data td:first-child,
  #panel-program table.data th:first-child, #panel-program table.data td:first-child { width: 12%; padding-left: 10px; }
  #panel-foreign table.data th:nth-child(2), #panel-foreign table.data td:nth-child(2),
  #panel-program table.data th:nth-child(2), #panel-program table.data td:nth-child(2) { width: 37%; text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
  #panel-foreign table.data th:nth-child(3), #panel-foreign table.data td:nth-child(3),
  #panel-program table.data th:nth-child(3), #panel-program table.data td:nth-child(3) { width: 26%; }
  #panel-foreign table.data th:last-child, #panel-foreign table.data td:last-child,
  #panel-program table.data th:last-child, #panel-program table.data td:last-child { width: 25%; padding-right: 10px; }
  .rank-no { width: 21px; height: 21px; font-size: 10px; }
  .pct { font-size: 11px; }
  .idx-grid, .team-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .idx-grid { margin-bottom: 38px; }
  .idx-card { padding: 20px 22px; }
  .idx-val { font-size: 32px; overflow-wrap: anywhere; }
  .trade-panel { padding: 16px; }
  .attempt-info { padding: 12px; }
  .balance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .balance-item:first-child { grid-column: 1 / -1; }
  .balance-item { min-width: 0; padding: 13px; }
  .balance-item .val { font-size: clamp(15px, 4.2vw, 20px); white-space: nowrap; letter-spacing: -0.06em; }
  .btn-row { gap: 8px; }
  .btn-buy, .btn-sell { font-size: 12px; padding: 16px 3px; }
  .profit-hero { padding: 28px 20px; }
  .profit-hero-val { font-size: clamp(32px, 8vw, 44px); overflow-wrap: anywhere; }
  .profit-hero-sub { font-size: 12px; line-height: 1.8; }
  .profit-hero .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .profit-hero .stat-item { min-width: 0; padding: 14px 10px; }
  .profit-hero .stat-item .val { font-size: clamp(14px, 4vw, 20px); overflow-wrap: anywhere; }
  .chart-mini { padding: 8px; }
  .table-card .table-wrap { -webkit-overflow-scrolling: touch; }
  #profit-tbody { font-size: 12px; }
  .table-card:has(#profit-tbody) table.data { min-width: 550px; }
  .intro-banner { margin-bottom: 38px; padding: 36px 20px; }
  .intro-banner p { font-size: 12px; }
  .intro-banner br { display: none; }
  .team-card { padding: 30px 20px; }
  .team-profile, .team-profile-fallback { width: min(220px, 100%); height: auto; aspect-ratio: 1; }
  .team-profile-fallback { height: auto; }
  .trust-section, .review-section { margin-top: 40px; }
  .trust-section { padding: 32px 16px; }
  .trust-title { font-size: 21px; }
  .trust-desc { font-size: 12px; }
  .badge-item { flex: 1 1 100%; padding: 14px 16px; }
  .review-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .review-stats .stat-item { min-width: 0; }
  .review-header-wrap { gap: 14px; }
  .review-card { padding: 22px; }
  .slider-btn { min-width: 44px; min-height: 44px; }
  .site-footer { margin-top: 26px; padding: 36px 0; }
  .footer-brand, .footer-note { width: 100%; }
}

@media (max-width: 380px) {
  .container { padding-left: 15px; padding-right: 15px; }
  .hero-title { font-size: 32px; }
  #analysis-dashboard .gauge-wrapper { padding: 14px 10px; }
  #analysis-dashboard .gauge-value { font-size: 26px; }
  #analysis-dashboard .gauge-unit { font-size: 12px; }
  .review-stats .stat-val { font-size: 17px; }
  .review-stats .stat-label { font-size: 10px; }
  .rank-tab-btn { font-size: 12px; }
}

@media (max-width: 640px) {
  body {
    padding-top: 62px; /* ★ 헤더가 본문을 가리지 않게 위쪽 여백 확보 */
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .site-header {
    position: fixed; /* ★ sticky 대신 fixed로 확실하게 상단 고정 */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999; /* ★ 다른 요소에 가려지지 않게 높임 */
    padding: 0;
    background: #fffefa;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 2px 12px rgba(16, 28, 41, 0.08);
  }
  
  /* ★ 로고 영역을 중앙 정렬하고 높이 고정 */
  .header-inner { 
    min-height: 62px; 
    display: flex;
    align-items: center;
  }
  .site-header .logo img { height: 46px !important; max-height: 46px !important; }
  .nav-toggle { display: none; }
  .site-header .nav-list,
  .site-header .nav-list.open {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 101;
    max-height: none;
    overflow: visible;
    gap: 0;
    padding: 7px max(7px, env(safe-area-inset-right, 0px)) calc(7px + env(safe-area-inset-bottom, 0px)) max(7px, env(safe-area-inset-left, 0px));
    background: #12222e;
    border-top: 1px solid #ae8a53;
    border-bottom: 0;
    box-shadow: 0 -8px 28px rgba(16,28,41,0.18);
  }
  .site-header .nav-list li { min-width: 0; }
  .site-header .nav-list a,
  .site-header .nav-list li:last-child a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 61px;
    margin: 0;
    padding: 6px 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    color: #d2dbdf;
    font-size: clamp(11px, 3vw, 13px);
    font-weight: 700;
    letter-spacing: -0.05em;
    text-align: center;
    white-space: nowrap;
  }
  .site-header .nav-list a::before {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    background: var(--nav-icon) center / contain no-repeat;
  }
  .nav-list li:nth-child(1) { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c993' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7 9 7v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
  .nav-list li:nth-child(2) { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c993' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V12m5 8V7m5 13V10m5 10V4M2 21h20'/%3E%3C/svg%3E"); }
  .nav-list li:nth-child(3) { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c993' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17 9 11l4 3 8-8M16 6h5v5'/%3E%3C/svg%3E"); }
  .nav-list li:nth-child(4) { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c993' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M7 15l3-3 3 2 4-5'/%3E%3C/svg%3E"); }
  .nav-list li:nth-child(5) { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c993' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3Cpath d='M8 9h8m-8 3h5'/%3E%3C/svg%3E"); }
  .site-header .nav-list a:hover,
  .site-header .nav-list li:last-child a:hover { background: #243c49; color: #fff; }
  body:has(.hero) .nav-list li:nth-child(1) a,
  body:has(#rank-foreign) .nav-list li:nth-child(2) a,
  body:has(#candleCanvas) .nav-list li:nth-child(3) a,
  body:has(#profitChart) .nav-list li:nth-child(4) a,
  body:has(.team-grid) .nav-list li:nth-child(5) a {
    background: #354956;
    color: #f8e3bc;
    box-shadow: inset 0 2px 0 #c5a36d;
  }
  .toast { top: 76px; max-width: calc(100vw - 32px); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* =======================================================
   ★ 모바일 상단 로고 고정 및 빈틈 방지 최종 설정 (최우선)
   ======================================================= */
@media (max-width: 860px) {
  /* 헤더를 문서 흐름에 딱 맞춰서 최상단에 고정 (빈틈 원천 차단) */
  .site-header {
    position: sticky !important; 
    top: -1px !important; /* 위쪽에 미세한 빈틈이 생기는 것을 방지 */
    z-index: 99999 !important;
    background: #fffefa !important;
    border-bottom: 1px solid rgba(30,42,47,0.12) !important;
    box-shadow: 0 2px 12px rgba(16, 28, 41, 0.08) !important;
  }
  
  /* 로고가 헤더 밖으로 삐져나오지 않게 고정 */
  .header-inner {
    min-height: 62px !important;
    display: flex !important;
    align-items: center !important;
  }
  .site-header .logo img {
    height: 46px !important;
    max-height: 46px !important;
    width: auto !important;
  }
}

/* 모바일 화면(640px 이하) 하단 네비게이션 위치 강제 고정 */
@media (max-width: 640px) {
  body {
    /* 헤더가 fixed가 아닌 sticky로 바뀌었으므로 padding-top을 0으로 */
    padding-top: 0 !important; 
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
}