/* ═══════════════════════════════════════════════════════
   ChartFlow — site.css (2026-10 개편, 밝은 교육형)
   [2026-10-18] 모든 페이지(18개, auth/join-guild.html 포함)가 이 파일을 씁니다. css/common.css 는 이제 어느 페이지도 쓰지 않음
   (파일은 지우지 않고 남겨 둠 — 공개 때 정리).
   [2026-10-18] 나머지 페이지용 공용 부품(ui-*)과 '예전 이름 호환' 묶음을 맨 아래에 추가 — 부품 목록·쓰는 법은 그 묶음 첫 주석.
   페이지 하나에서만 쓰는 모양은 css/pages/<페이지>.css 에 둡니다 (견본: css/pages/_template.css).
   [2026-10-18 통합 점검] 여러 페이지가 따로 갖고 있던 규칙을 이 파일로 올림 — 표 목록 모양(.ui-table--stack), 탭 줄바꿈(.ui-tabs--wrap),
   값 목록 이름 칸 폭(--kv-label), 바로가기 위치(scroll-margin 이중 계산 제거), 고정폭 입력칸 안내 글꼴, 동의 칸 오류 테두리 등.
   ═══════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light;

  /* ── 색 ── */
  --c-bg: #FFFFFF;          /* 기본 바탕 */
  --c-band: #F6F7F9;        /* 회색 띠(섹션 구분) */
  --c-surface: #FFFFFF;     /* 카드 */
  --c-ink: #0F1B2D;         /* 본문·제목 (흰 바탕 17.3:1) */
  --c-ink-2: #4B5563;       /* 보조 글자 (7.6:1) */
  --c-ink-3: #5D6573;       /* 흐린 글자 (회색 띠 위 5.5:1) */
  --c-line: #E4E7EC;        /* 카드 테두리·구분선 */
  --c-line-2: #D0D5DD;      /* 버튼·입력 테두리 */
  --c-accent: #0F6E56;      /* 주 색 (흰 글자 6.2:1) */
  --c-accent-hover: #0B5A46;
  --c-accent-tint: #E1F5EE; /* 주 색 옅은 바탕 */
  --c-accent-ink: #085041;  /* 옅은 바탕 위 글자 (8.3:1) */
  --c-accent-line: #9CCFBD; /* 주 색 계열 테두리 */
  --c-up: #15803D;          /* 수익·완료 */
  --c-up-tint: #ECFDF3;
  --c-down: #B42318;        /* 손실·경고 */
  --c-down-tint: #FEF3F2;
  --c-warn: #B54708;        /* 대기 */
  --c-warn-tint: #FFFAEB;
  --c-info: #2563EB;        /* 도식 보조(트레이더 계정) */
  --c-info-tint: #EFF4FF;

  /* ── 글꼴 ── */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  --fs-body: 1.0625rem;     /* 17px */
  --fs-small: 0.9375rem;    /* 15px */
  --fs-xs: 0.8125rem;       /* 13px */
  --fs-h1: clamp(2rem, 1.35rem + 2.4vw, 3rem);
  --fs-h2: clamp(1.625rem, 1.25rem + 1.4vw, 2.125rem);
  --fs-h3: 1.1875rem;

  /* ── 간격·모양 ── */
  --space-section: clamp(64px, 5.5vw + 36px, 104px);
  --gutter: 24px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 2px rgba(15, 27, 45, 0.05);
  --shadow-pop: 0 10px 28px rgba(15, 27, 45, 0.10);
  --header-h: 64px;

  /* ── 로고 색 (2026-10-17 ChartFlow) ── 'Chart' 남색 · 'Flow' 청록. 주 색을 바꿔도 로고 색은 그대로 남도록 따로 둠 */
  --brand-navy: #0F1B2D;
  --brand-teal: #0F6E56;

  /* ── 예전 이름 호환 (개편 페이지에 남아 있는 인라인 스타일·스크립트 문자열용) ── */
  --bg-primary: var(--c-bg);
  --bg-secondary: var(--c-band);
  --bg-card: var(--c-surface);
  --bg-elevated: var(--c-band);
  --text-primary: var(--c-ink);
  --text-secondary: var(--c-ink-2);
  --text-muted: var(--c-ink-3);
  --border: var(--c-line);
  --accent: var(--c-accent);
  --accent-dim: var(--c-accent-line);
  --accent-glow: var(--c-accent-tint);
  --green: var(--c-up);
  --red: var(--c-down);
  --blue: var(--c-info);
  --font-kr: var(--font);
  --font-mono: var(--font);
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
/* 움직임 줄이기 설정이면 화면 전환 효과를 끔 (펀디드 구조 그림은 자체 스크립트가 마지막 장면을 정지 화면으로 보여줌) */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0s !important; } }

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss06";
}
img, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.32; letter-spacing: -0.02em; font-weight: 700; color: var(--c-ink); text-wrap: balance; }
p, li { text-wrap: pretty; }
strong { font-weight: 700; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }
.ib { display: inline-block; } /* 제목에서 이 덩어리를 한 줄로 (모자라면 안에서 줄바꿈) */
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
/* [2026-10-18] 모서리 4px 는 자기 모서리가 없는 요소(글자 링크 등)에만 — :where() 로 우선순위 0. 둥근 카드·버튼은 자기 모서리를 그대로 씀 */
:where(:focus-visible) { border-radius: 4px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--c-ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); font-size: var(--fs-small); }
.skip-link:focus { top: 12px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.text-link { color: var(--c-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--c-accent-hover); }
.inline-link { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ─── 섹션 공통 ─── */
.section, .content-section { padding: var(--space-section) 0; }
.section--band { background: var(--c-band); }
.section--tint { background: var(--c-accent-tint); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow, .section-tag { display: inline-block; font-size: var(--fs-small); font-weight: 600; color: var(--c-accent); margin-bottom: 10px; letter-spacing: 0; }
.section-title { font-size: var(--fs-h2); font-weight: 750; line-height: 1.34; margin-bottom: 14px; }
.section-lead, .section-desc { font-size: var(--fs-body); color: var(--c-ink-2); line-height: 1.75; max-width: 680px; }
.section-head.center .section-lead { margin-left: auto; margin-right: auto; }
.section-more { margin-top: 28px; }

/* ─── 버튼 ─── */
.btn-primary, .btn-outline, .btn-plain {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-hover); color: #fff; }
.btn-outline { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line-2); }
.btn-outline:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }
.btn-plain { background: transparent; color: var(--c-accent); padding-left: 8px; padding-right: 8px; }
.btn-plain:hover { color: var(--c-accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.0625rem; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: var(--fs-small); }
.btn-primary .arrow, .btn-outline .arrow { font-weight: 400; }

/* ═══════════════════════════════════════════════════════
   머리글 (메뉴)
   ═══════════════════════════════════════════════════════ */
/* [2026-10-17 검수] 바탕을 97% 흰색 → 불투명 흰색: 스크롤할 때 본문 글자가 머리글 뒤로 비치던 것 없앰 */
.site-nav { position: sticky; top: 0; z-index: 100; background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.nav-bar { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
/* 로고 — 글자 로고 'ChartFlow' (HTML: Chart<span class="brand-flow">Flow</span>). 아이콘 없음 */
.nav-logo { font-size: 1.25rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.025em; color: var(--brand-navy); white-space: nowrap; flex-shrink: 0; font-kerning: normal; }
.brand-flow { color: var(--brand-teal); }
.nav-logo:hover { color: var(--brand-navy); opacity: 0.82; }
.nav-panel { flex: 1; min-width: 0; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin-left: 20px; }
.nav-links a, .nav-dd-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 0.96875rem; font-weight: 500; color: var(--c-ink-2); background: none; border: 0; cursor: pointer; line-height: 1.4; white-space: nowrap;
}
.nav-links a:hover, .nav-dd-btn:hover { color: var(--c-ink); background: var(--c-band); }
.nav-links a[aria-current="page"], .nav-links a[aria-current="location"], .nav-dd-btn.is-current { color: var(--c-accent-ink); font-weight: 650; }
.nav-dd-caret { width: 12px; height: 12px; transition: transform 0.15s; flex-shrink: 0; }
.nav-dropdown { position: relative; }
.nav-dropdown.open .nav-dd-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 168px; list-style: none;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 6px;
  box-shadow: var(--shadow-pop); display: none; z-index: 120;
}
.nav-dropdown-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-dropdown.open .nav-dropdown-menu { display: block; }
@media (hover: hover) and (min-width: 901px) {
  .nav-dropdown:hover .nav-dropdown-menu { display: block; }
}
.nav-dropdown-menu a { display: flex; width: 100%; padding: 10px 12px; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.nav-cta { display: none !important; } /* auth.js 위치 표식 — 화면에는 보이지 않음 */
/* 디스코드 커뮤니티 — 로그인 버튼 왼쪽, 테두리 없는 글자 링크(로그인보다 약하게). 좁은 화면에서는 메뉴 안 줄(.nav-m-only)로 */
.nav-community { display: inline-flex; align-items: center; gap: 3px; min-height: 40px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: var(--fs-small); font-weight: 500; color: var(--c-ink-2); white-space: nowrap; }
.nav-community:hover { color: var(--c-ink); background: var(--c-band); }
.nav-links > li.nav-m-only { display: none; }
.nav-ext { width: 12px; height: 12px; flex-shrink: 0; color: var(--c-ink-3); }
.mobile-menu {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid var(--c-line-2); border-radius: 10px; background: var(--c-surface); color: var(--c-ink); cursor: pointer;
}
.mobile-menu svg { width: 20px; height: 20px; }
.mobile-menu .ico-close { display: none; }
.site-nav.menu-open .mobile-menu .ico-open { display: none; }
.site-nav.menu-open .mobile-menu .ico-close { display: block; }
.nav-mobile-extra { display: none; }
/* 좁은 화면 메뉴가 열려 있는 동안 site.js 가 html 에 .nav-locked 를 붙임 → 본문 스크롤 잠금.
   body 에는 overflow 를 걸지 않음 (걸면 body 가 스크롤 상자가 되어 머리글 sticky 가 풀림). 스크롤바 자리는 남겨 화면이 옆으로 밀리지 않게 */
html.nav-locked { overflow: hidden; scrollbar-gutter: stable; }
.nav-scrim { display: none; }

/* auth.js 가 넣는 로그인 버튼 · 사용자 메뉴 · 알림 */
.nav-login {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--c-line-2); background: var(--c-surface); color: var(--c-ink); font-size: var(--fs-small); font-weight: 600; white-space: nowrap;
}
.nav-login:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }
.nav-login-icon { display: block; color: #5865F2; flex-shrink: 0; }
.nav-user-menu { position: relative; }
.nav-user-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--c-line-2); background: var(--c-surface); color: var(--c-ink); font-size: var(--fs-small); font-weight: 500; cursor: pointer;
}
.nav-user-btn:hover { border-color: var(--c-accent); }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--c-band); border: 1px solid var(--c-line); }
.nav-user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.nav-user-caret { font-size: 0.75rem; color: var(--c-ink-3); transition: transform 0.15s; }
.nav-user-btn[aria-expanded="true"] .nav-user-caret { transform: rotate(180deg); }
.nav-user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; z-index: 200;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 6px; box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
}
.nav-user-dropdown.open { opacity: 1; visibility: visible; transform: none; }
.nav-user-dropdown a, .nav-user-dropdown button {
  display: block; width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); background: none; border: 0;
  color: var(--c-ink-2); font-size: var(--fs-small); text-align: left; cursor: pointer;
}
.nav-user-dropdown a:hover, .nav-user-dropdown button:hover { background: var(--c-band); color: var(--c-ink); }
.nav-user-dropdown .nav-user-logout { color: var(--c-down); border-top: 1px solid var(--c-line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin-top: 4px; }
.nav-user-dropdown .nav-user-logout:hover { background: var(--c-down-tint); color: var(--c-down); }
.nav-user-pill { display: block; padding: 10px 12px; color: var(--c-ink-3); font-size: var(--fs-small); }
.nav-bell-wrap { position: relative; display: inline-flex; }
.nav-bell {
  position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--c-line-2); background: var(--c-surface);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; cursor: pointer;
}
.nav-bell:hover { border-color: var(--c-accent); }
.nav-bell-badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--c-down); color: #fff; font-size: 0.72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.nav-bell-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(400px, 92vw); max-height: 70vh; overflow-y: auto; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-pop); display: none; z-index: 200; }
.nav-bell-panel.open { display: block; }
.nav-bell-head { padding: 14px 16px; font-weight: 700; font-size: var(--fs-small); border-bottom: 1px solid var(--c-line); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.nav-bell-sub { font-size: var(--fs-xs); color: var(--c-ink-3); font-weight: 400; }
.nav-bell-empty { padding: 26px 16px; text-align: center; color: var(--c-ink-3); font-size: var(--fs-small); }
.nav-bell-item { padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.nav-bell-item.unread { background: var(--c-accent-tint); }
.nav-bell-title { font-size: var(--fs-small); font-weight: 700; margin-bottom: 2px; }
.nav-bell-body { font-size: 0.875rem; color: var(--c-ink-2); line-height: 1.55; white-space: pre-line; }
.nav-bell-time { margin-top: 4px; font-size: 0.75rem; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }

/* auth.js — 세션 만료 배너 · 로그인 오류 알림 */
.tc-session-banner { position: fixed; top: calc(var(--header-h) + 8px); left: 50%; transform: translate(-50%, -12px); z-index: 1100; opacity: 0; transition: opacity 0.2s, transform 0.2s; width: 100%; max-width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.tc-session-banner.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.tc-session-banner-inner { display: flex; align-items: center; gap: 12px; background: var(--c-surface); border: 1px solid var(--c-line); border-left: 3px solid var(--c-down); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-pop); }
.tc-session-banner-icon { flex-shrink: 0; }
.tc-session-banner-text { flex: 1; font-size: var(--fs-small); line-height: 1.5; }
.tc-session-banner-cta { padding: 6px 14px; border-radius: var(--radius-sm); background: var(--c-accent); color: #fff; font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.tc-session-banner-close { background: none; border: 0; color: var(--c-ink-3); cursor: pointer; padding: 4px 6px; font-size: 1rem; }
.tc-auth-toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 24px); max-width: calc(100vw - 32px); padding: 12px 18px; background: var(--c-surface); border: 1px solid var(--c-line); border-left: 3px solid var(--c-down); border-radius: var(--radius); box-shadow: var(--shadow-pop); font-size: var(--fs-small); opacity: 0; transition: opacity 0.2s, transform 0.2s; z-index: 1200; }
.tc-auth-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1060px) {
  .nav-links { margin-left: 8px; }
  .nav-links a, .nav-dd-btn { padding: 8px 9px; font-size: 0.9375rem; }
  /* 커뮤니티 링크가 들어와 머리글이 빠듯함 — 긴 닉네임은 더 일찍 줄임 */
  .nav-community { padding: 8px 6px; }
  .nav-user-name { max-width: 84px; }
}
@media (max-width: 900px) {
  .mobile-menu { display: inline-flex; }
  .nav-panel {
    position: absolute; top: 100%; left: 0; right: 0; display: none;
    background: var(--c-surface); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
    box-shadow: 0 16px 24px -12px rgba(15, 27, 45, 0.08); /* [검수] 위쪽 선 복원 + 그림자가 머리글 쪽으로 번져 회색 띠처럼 보이던 것 없앰 */
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  }
  .site-nav.menu-open .nav-panel { display: block; }
  /* 메뉴가 열리면 메뉴 아래로 보이던 본문을 어둡게 덮음 (site.js 가 body 끝에 .nav-scrim 을 넣음 — 누르면 메뉴 닫힘).
     머리글(.site-nav, z-index 100)보다 한 칸 아래라 머리글과 메뉴는 덮이지 않음 */
  html.nav-locked .nav-scrim { display: block; position: fixed; inset: 0; z-index: 99; background: rgba(15, 27, 45, 0.45); touch-action: none; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px var(--gutter) 12px; }
  .nav-links > li { border-bottom: 1px solid var(--c-line); }
  .nav-links > li:last-child { border-bottom: 0; }
  .nav-links > li > a, .nav-dd-btn { display: flex; width: 100%; min-height: 52px; padding: 12px 4px; font-size: 1.0625rem; border-radius: 0; justify-content: space-between; }
  .nav-links > li > a:hover, .nav-dd-btn:hover { background: none; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 8px 12px; min-width: 0; }
  .nav-dropdown-menu::before { display: none; }
  .nav-dropdown-menu a { min-height: 48px; align-items: center; font-size: 1rem; }
  .nav-mobile-extra { display: block; padding: 4px var(--gutter) 20px; font-size: var(--fs-small); color: var(--c-ink-3); }
  .nav-community { display: none; }
  .nav-links > li.nav-m-only { display: block; }
  .nav-links > li.nav-m-only > a { justify-content: flex-start; gap: 8px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --fs-body: 1rem; }
  .nav-bar { gap: 8px; }
  .nav-logo { font-size: 1.125rem; }
  .nav-actions { gap: 6px; }
  .nav-user-name { max-width: 72px; }
  .nav-bell-panel { position: fixed; left: 8px; right: 8px; top: calc(var(--header-h) + 4px); width: auto; }
}
@media (max-width: 420px) {
  .nav-user-name { display: none; }
  .nav-user-btn { padding-right: 8px; }
  .nav-login { padding: 8px 12px; }
}

/* ═══════════════════════════════════════════════════════
   바닥글
   ═══════════════════════════════════════════════════════ */
.site-footer { background: var(--c-band); border-top: 1px solid var(--c-line); padding: 56px 0 40px; color: var(--c-ink-2); font-size: var(--fs-small); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-brand .nav-logo { display: inline-block; margin-bottom: 10px; }
.footer-brand p { color: var(--c-ink-2); line-height: 1.7; max-width: 22em; }
.footer-h { font-size: 0.875rem; font-weight: 700; color: var(--c-ink); margin-bottom: 12px; letter-spacing: 0; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: var(--c-ink-2); }
.footer-col a:hover { color: var(--c-ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-line); font-size: var(--fs-xs); color: var(--c-ink-3); line-height: 1.75; }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════════════════
   카드 · 표 · 알림 공통
   ═══════════════════════════════════════════════════════ */
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; background: var(--c-band); color: var(--c-ink-2); white-space: nowrap; }
.chip--accent { background: var(--c-accent-tint); color: var(--c-accent-ink); }
.note { font-size: var(--fs-small); color: var(--c-ink-3); line-height: 1.7; }
.check-list { list-style: none; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 28px; color: var(--c-ink-2); line-height: 1.6; }
.check-list li::before { content: ''; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border-radius: 50%; background: var(--c-accent-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.6' fill='none' stroke='%23085041' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat; }
.check-list li strong { color: var(--c-ink); }

/* ═══════════════════════════════════════════════════════
   홈 — 히어로
   ═══════════════════════════════════════════════════════ */
.home-hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.hero-title { font-size: var(--fs-h1); font-weight: 800; line-height: 1.3; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero-title-line { display: inline-block; } /* '회사 자본으로 거래합니다'를 한 줄로 (넓이가 모자라면 안에서 줄바꿈) */
.hero-lead { font-size: 1.125rem; color: var(--c-ink-2); line-height: 1.75; max-width: 33em; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: var(--fs-small); color: var(--c-ink-3); }

/* 히어로 오른쪽 — 트레이더 과정에 포함된 것 (2026-10-17 2차: 강의실 그림 카드를 대신함) */
.incl-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); box-shadow: 0 1px 3px rgba(15, 27, 45, 0.06); padding: 26px 28px 22px; }
.incl-title { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.incl-list { list-style: none; }
.incl-list li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--c-line); }
.incl-list li:first-child { border-top: 0; }
.incl-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--c-accent-tint); color: var(--c-accent-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.incl-ico svg { width: 20px; height: 20px; }
.incl-name { font-size: 1rem; font-weight: 650; color: var(--c-ink); line-height: 1.45; }
.incl-sub { display: block; font-size: 0.875rem; font-weight: 400; color: var(--c-ink-3); line-height: 1.5; }
.incl-foot { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--c-line); font-size: var(--fs-small); color: var(--c-ink-3); line-height: 1.6; }

/* 펀디드 상태 배너 (로그인한 펀디드 이용자 — 히어로 안) */
.hero-state-banner { display: none; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--c-line); background: var(--c-band); }
.hero-state-banner .hsb-icon { font-size: 1.15rem; flex-shrink: 0; }
.hero-state-banner .hsb-text { flex: 1; min-width: 180px; font-size: var(--fs-small); line-height: 1.55; }
.hero-state-banner .hsb-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-sm); font-size: var(--fs-small); font-weight: 600; color: #fff; white-space: nowrap; }
.hero-state-active { background: var(--c-up-tint); border-color: #ABEFC6; }
.hero-state-active .hsb-text strong { color: var(--c-up); }
.hero-state-failed { background: var(--c-down-tint); border-color: #FECDCA; }
.hero-state-failed .hsb-text strong { color: var(--c-down); }
.hero-state-pending { background: var(--c-warn-tint); border-color: #FEDF89; }
.hero-state-pending .hsb-text strong { color: var(--c-warn); }
.hero-state-ended { background: var(--c-band); border-color: var(--c-line-2); }
.hsb-btn-green { background: var(--c-up); }
.hsb-btn-red { background: var(--c-down); }
.hsb-btn-amber { background: var(--c-warn); }
.hsb-btn-gray { background: var(--c-ink-2); }
.hero-state-banner .hsb-btn:hover { filter: brightness(0.92); }

/* ═══════════════════════════════════════════════════════
   펀디드 조건표 · 재도전 비교표 (program.html — 처음엔 홈 '다른 강의와 다른 점' 섹션용이었음.
   [2026-10-19] 홈에서 그 섹션을 빼며 홈 전용 .favor-card · .funded-actions 는 지움)
   ═══════════════════════════════════════════════════════ */
/* 조건표 — 항목을 3열 격자로 (좁은 화면 2열). 칸 사이 1px 선은 격자 간격으로 그림 */
.terms-card { padding: 0; overflow: hidden; }
.terms-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 28px; border-bottom: 1px solid var(--c-line); }
.terms-card-head h3 { font-size: 1.0625rem; }
.terms-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--c-line); }
.term { background: var(--c-surface); padding: 18px 28px 20px; }
.term dt { color: var(--c-ink-2); font-size: var(--fs-small); margin-bottom: 4px; }
.term dd { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; font-variant-numeric: tabular-nums; }
.term dd.em { color: var(--c-accent-ink); }
/* 재도전 조건 비교표 */
.favor-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.favor-table th, .favor-table td { padding: 12px 10px; text-align: left; border-top: 1px solid var(--c-line); vertical-align: top; line-height: 1.5; }
.favor-table thead th { border-top: 0; font-size: var(--fs-xs); color: var(--c-ink-3); font-weight: 600; padding-top: 0; }
.favor-table tbody th { font-weight: 500; color: var(--c-ink-2); width: 36%; }
.favor-table td.on { color: var(--c-accent-ink); font-weight: 650; }
.favor-table td.off { color: var(--c-ink-3); }

/* ═══════════════════════════════════════════════════════
   홈 — 성과 (js/home-perf.js 가 채움) [2026-10-19]
   역대 리더보드 상위 5명 · 정산 증빙(총 지급액 + 최근 5건) 두 카드, 아래에 최근 수익 인증 3개(.edu-proof 카드 재사용)
   ═══════════════════════════════════════════════════════ */
.perf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.perf-card { display: flex; flex-direction: column; min-width: 0; padding: 24px 26px 18px; }
.perf-card-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }
.perf-card-title { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.perf-card-meta { font-size: 0.875rem; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.perf-body { min-height: 96px; }
.perf-msg { padding: 24px 0; color: var(--c-ink-3); font-size: var(--fs-small); line-height: 1.7; }
.perf-retry { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 4px; border: 0; background: none; color: var(--c-accent); font-size: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.perf-retry:hover { color: var(--c-accent-hover); }
.perf-list { list-style: none; }
.perf-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--c-line); }
.perf-pay-row { grid-template-columns: minmax(0, 1fr) auto; }
.perf-rank { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-band); color: var(--c-ink-2); font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.perf-rank.is-top { background: var(--c-accent-tint); color: var(--c-accent-ink); }
.perf-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perf-name { font-weight: 650; color: var(--c-ink); line-height: 1.45; overflow-wrap: anywhere; }
.perf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.perf-meta .status-badge { min-height: 20px; padding: 0 8px; font-size: 0.75rem; }
.perf-sub { font-size: 0.8125rem; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.perf-sub.perf-again { color: var(--c-up-ink); font-weight: 600; } /* 지난 회차가 최고 기록인데 지금 새 도전 중 */
.perf-fig { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; }
.perf-pct { font-size: 1.0625rem; font-weight: 750; color: var(--c-up); white-space: nowrap; }
.perf-amt { font-size: 0.8125rem; color: var(--c-ink-2); white-space: nowrap; }
.perf-pay-amt { font-weight: 700; color: var(--c-ink); white-space: nowrap; }
.perf-tx { display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; font-family: var(--font-code); font-size: 0.8125rem; color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; white-space: nowrap; }
.perf-tx:hover { color: var(--c-accent-hover); }
.perf-tx-ext { width: 11px; height: 11px; flex-shrink: 0; }
.perf-tx-none { font-size: 0.8125rem; color: var(--c-ink-3); white-space: nowrap; }
.perf-total { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 10px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--c-band); }
.perf-total dt { font-size: 0.8125rem; color: var(--c-ink-2); }
.perf-total dd { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.perf-note { margin-top: 6px; font-size: 0.8125rem; color: var(--c-ink-3); line-height: 1.6; }
.perf-more { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--c-line); font-size: var(--fs-small); }
.perf-proofs { margin-top: 32px; }
.perf-proofs-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }
.perf-proofs-head .text-link { font-size: var(--fs-small); }
.edu-proof-grid.perf-proof-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } /* 3개만 — .edu-proof-grid 의 자동 칸 수(빈 칸 생김) 대신 */

/* ═══════════════════════════════════════════════════════
   홈 — 기회비용 계산기 (js/calculator.js — 로직 그대로, 겉모양만)
   ═══════════════════════════════════════════════════════ */
.calc-input-area { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 36px 40px; margin-bottom: 24px; box-shadow: var(--shadow-1); }
.calc-question { font-size: 1.0625rem; color: var(--c-ink-2); margin-bottom: 4px; }
.calc-amount-display { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem); font-weight: 800; letter-spacing: -0.02em; color: var(--c-ink); line-height: 1.2; margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.calc-amount-display .currency { font-size: 0.55em; color: var(--c-ink-3); margin-right: 4px; vertical-align: 0.2em; font-weight: 600; }
.calc-slider-wrap { position: relative; height: 32px; display: flex; align-items: center; margin-bottom: 6px; }
.calc-slider-wrap::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--c-line); }
.slider-track { position: absolute; left: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--c-accent); pointer-events: none; }
.calc-slider { -webkit-appearance: none; appearance: none; position: relative; z-index: 1; width: 100%; height: 32px; background: transparent; cursor: pointer; margin: 0; }
.calc-slider::-webkit-slider-runnable-track { height: 6px; background: transparent; }
.calc-slider::-moz-range-track { height: 6px; background: transparent; }
.calc-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-accent); box-shadow: 0 1px 3px rgba(15, 27, 45, 0.18); cursor: grab; }
.calc-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-accent); box-shadow: 0 1px 3px rgba(15, 27, 45, 0.18); cursor: grab; }
.calc-slider:focus-visible { outline: none; }
.calc-slider:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--c-accent-line); outline-offset: 2px; }
.calc-slider:focus-visible::-moz-range-thumb { outline: 3px solid var(--c-accent-line); outline-offset: 2px; }
.calc-labels { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.calc-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.calc-preset { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--c-line-2); background: var(--c-surface); color: var(--c-ink-2); font-size: var(--fs-small); font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; }
.calc-preset:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }
.calc-preset.active { background: var(--c-accent-tint); border-color: var(--c-accent-line); color: var(--c-accent-ink); font-weight: 650; }
.calc-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.calc-result-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px 22px 20px; }
.calc-market { font-size: var(--fs-small); font-weight: 650; color: var(--c-ink); margin-bottom: 2px; }
.calc-symbol { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 1px 6px; margin-right: 4px; border-radius: 4px; background: var(--c-band); vertical-align: 0.1em; }
.calc-period { font-size: 0.875rem; color: var(--c-ink-3); margin-bottom: 10px; }
.calc-return-pct { font-size: 0.875rem; font-weight: 650; color: var(--c-up); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.calc-chart-wrap { width: 100%; height: 84px; margin: 6px 0 12px; position: relative; }
.calc-chart { width: 100%; height: 100%; display: block; }
.calc-profit-label { font-size: 0.8125rem; color: var(--c-ink-3); }
.calc-profit { font-size: clamp(1.25rem, 1rem + 0.8vw, 1.5rem); font-weight: 800; color: var(--c-ink); line-height: 1.3; font-variant-numeric: tabular-nums; }
.calc-invested { font-size: 0.875rem; color: var(--c-ink-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.calc-invested span { color: var(--c-ink-2); }
.calc-missed { padding: 28px 32px; border-radius: var(--radius-lg); background: var(--c-surface); border: 1px solid var(--c-line); text-align: center; }
.calc-missed-label { font-size: var(--fs-small); font-weight: 650; color: var(--c-ink-3); margin-bottom: 8px; }
.calc-missed-text { font-size: 1.125rem; font-weight: 600; line-height: 1.75; }
.calc-missed-text em { white-space: nowrap; font-style: normal; color: var(--c-accent-ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.calc-bottom-cta { margin-top: 24px; padding: 28px 32px; border-radius: var(--radius-lg); background: var(--c-accent-tint); text-align: center; }
.calc-bottom-cta p { font-size: 1.125rem; font-weight: 650; margin-bottom: 18px; line-height: 1.6; }
.calc-bottom-cta p em { font-style: normal; color: var(--c-accent-ink); }

/* ═══════════════════════════════════════════════════════
   홈 — 해외 펀디드 회사 비교표
   ═══════════════════════════════════════════════════════ */
.comp-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.comp-table { border-collapse: collapse; min-width: 720px; width: 100%; font-variant-numeric: tabular-nums; }
.comp-table th, .comp-table td { padding: 14px 18px; text-align: left; font-size: var(--fs-small); border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.comp-table thead th { font-size: var(--fs-xs); font-weight: 650; color: var(--c-ink-3); background: var(--c-band); }
.comp-table td { color: var(--c-ink-2); }
.comp-table tbody tr:last-child td { border-bottom: 0; }
.comp-table tr.comp-ours td { background: var(--c-accent-tint); color: var(--c-accent-ink); font-weight: 700; }
.comp-table .comp-free { font-weight: 800; }
.comp-note { font-size: var(--fs-small); color: var(--c-ink-3); margin-top: 16px; line-height: 1.7; }
@media (max-width: 640px) {
  .comp-table th:first-child, .comp-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--c-surface); box-shadow: 1px 0 0 var(--c-line); }
  .comp-table thead th:first-child { background: var(--c-band); }
  .comp-table tr.comp-ours td:first-child { background: var(--c-accent-tint); }
  .comp-table th, .comp-table td { padding: 11px 12px; }
}

/* ─── 실전 계좌까지 가는 길 (2026-10-19) — 홈 #comparison · program.html #compare 공용. 마크업은 두 페이지에 같은 모양으로 있음
   기본은 다 보이는 정지 화면. js/fund-visuals.js 가 화면에 들어올 때 .is-armed → .is-in 으로 단계를 차례로 밝힘(움직임 줄이기 설정이면 안 붙임)
   해외 줄은 4단계를 천천히(--rc-step .55s), ChartFlow 줄은 3단계를 빨리(.25s) — 같은 순간에 출발 ─── */
.route-cmp { margin-bottom: 28px; padding: 24px 26px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); }
.route-cmp__title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 18px; }
.route-cmp__lanes { display: grid; gap: 16px; }
.route-cmp__lane { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; align-items: center; --rc-step: .55s; }
.route-cmp__lane--us { --rc-step: .25s; }
.route-cmp__who { font-size: 0.9375rem; font-weight: 700; color: var(--c-ink-2); }
.route-cmp__lane--us .route-cmp__who { color: var(--c-accent-ink); }
.route-cmp__steps { list-style: none; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; --rc-right: calc((100% - 36px) / 8); }
.route-cmp__lane--us .route-cmp__steps { --rc-right: calc(37.5% - 1.5px); }
.route-cmp__steps::before, .route-cmp__steps::after { content: ''; position: absolute; top: 50%; left: calc((100% - 36px) / 8); right: var(--rc-right); height: 2px; margin-top: -1px; background: var(--c-line-2); }
.route-cmp__steps::after { background: #98A2B3; transform-origin: left center; }
.route-cmp__lane--us .route-cmp__steps::after { background: var(--c-accent); }
.route-cmp__step { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 66px; padding: 10px 14px; border: 1px solid var(--c-line-2); border-radius: 10px; background: var(--c-band); }
.route-cmp__name { font-size: 0.9375rem; font-weight: 650; line-height: 1.4; color: var(--c-ink); }
.route-cmp__sub { font-size: 0.8125rem; line-height: 1.45; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.route-cmp__lane--us .route-cmp__step { background: var(--c-surface); border-color: var(--c-accent-line); }
.route-cmp__lane--us .route-cmp__step--end { background: var(--c-accent); border-color: var(--c-accent); }
.route-cmp__lane--us .route-cmp__step--end .route-cmp__name, .route-cmp__lane--us .route-cmp__step--end .route-cmp__sub { color: #fff; }
.route-cmp__lane--them .route-cmp__step--end { background: var(--c-surface); }
/* 준비 상태: 칸 바탕은 그대로(선이 비치지 않게) 글자만 흐리게, ChartFlow 도착 칸은 흰 바탕 → 도착하면 진한 초록
   (흐려지는 쪽은 바로, 밝아지는 쪽만 차례로 — 전환·지연은 .is-in 에만 둠) */
.route-cmp.is-armed .route-cmp__step { transform: translateY(4px); }
.route-cmp.is-armed .route-cmp__step > span { opacity: .28; }
.route-cmp.is-armed:not(.is-in) .route-cmp__lane--us .route-cmp__step--end { background: var(--c-surface); border-color: var(--c-accent-line); }
.route-cmp.is-armed:not(.is-in) .route-cmp__lane--us .route-cmp__step--end .route-cmp__name { color: var(--c-ink); }
.route-cmp.is-armed:not(.is-in) .route-cmp__lane--us .route-cmp__step--end .route-cmp__sub { color: var(--c-ink-3); }
.route-cmp.is-armed .route-cmp__steps::after { transform: scaleX(0); }
.route-cmp.is-armed.is-in .route-cmp__step { transform: none; transition: transform .35s ease, background-color .35s ease, border-color .35s ease; transition-delay: calc(var(--i, 0) * var(--rc-step)); }
.route-cmp.is-armed.is-in .route-cmp__step > span { opacity: 1; transition: opacity .35s ease, color .35s ease; transition-delay: inherit; }
.route-cmp.is-armed.is-in .route-cmp__steps::after { transform: scaleX(1); transition: transform calc(var(--rc-n, 3) * var(--rc-step)) linear; }
.route-cmp.is-armed.is-in .route-cmp__lane--us .route-cmp__step--end { animation: rcArrive .6s calc(2 * var(--rc-step) + .3s) ease both; }
@keyframes rcArrive { 0% { box-shadow: 0 0 0 0 rgba(15, 110, 86, .35); } 100% { box-shadow: 0 0 0 10px rgba(15, 110, 86, 0); } }
@media (max-width: 720px) {
  /* 좁은 화면: 두 줄을 나란히(왼쪽 해외 · 오른쪽 ChartFlow), 단계는 위에서 아래로 */
  .route-cmp { padding: 18px 14px; }
  .route-cmp__lanes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
  .route-cmp__lane { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .route-cmp__who { text-align: center; }
  .route-cmp__steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .route-cmp__steps::before, .route-cmp__steps::after { top: 24px; bottom: 24px; left: 50%; right: auto; width: 2px; height: auto; margin: 0 0 0 -1px; }
  .route-cmp__steps::after { transform-origin: center top; }
  .route-cmp.is-armed .route-cmp__steps::after { transform: scaleY(0); }
  .route-cmp.is-armed.is-in .route-cmp__steps::after { transform: scaleY(1); }
  .route-cmp__step { min-height: 0; padding: 9px 10px; text-align: center; align-items: center; }
  .route-cmp__name { font-size: 0.875rem; }
  .route-cmp__sub { font-size: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .route-cmp.is-armed .route-cmp__step, .route-cmp.is-armed .route-cmp__step > span { opacity: 1; transform: none; transition: none; }
  .route-cmp.is-armed .route-cmp__steps::after { transform: none; transition: none; }
  .route-cmp.is-armed.is-in .route-cmp__lane--us .route-cmp__step--end { animation: none; }
}

/* ═══════════════════════════════════════════════════════
   홈 — 자주 묻는 질문 · 마무리
   ([2026-10-19] '무엇을 배우나'(.topic-*) · '가격'(.price-card · .ps-*) 섹션을 홈에서 빼며 규칙도 지움.
    가격 요약을 그리던 js/edu-buy.js 의 renderSummary 는 #eduPriceSummary 가 없으면 아무것도 안 함.
    .price-facts 는 education.html 결제 상자로 옮겨 그 묶음에 둠)
   ═══════════════════════════════════════════════════════ */
.faq-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 48px; align-items: start; }
.faq-layout .section-head { margin-bottom: 0; }
.faq-list { max-width: 820px; border-top: 1px solid var(--c-line); }
.qa { border-bottom: 1px solid var(--c-line); }
.qa summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 4px; font-weight: 650; font-size: 1.0625rem; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ''; flex-shrink: 0; width: 20px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%234B5563' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; transition: transform 0.15s; }
.qa[open] summary::after { transform: rotate(180deg); }
.qa summary:hover { color: var(--c-accent-ink); }
.qa-body { padding: 0 4px 22px; color: var(--c-ink-2); line-height: 1.8; font-size: var(--fs-body); }
.qa-body p + p { margin-top: 10px; }
/* 답변 안 목록 (FAQ 페이지) — 번호 목록은 주 색 숫자 */
.qa-body > * + * { margin-top: 10px; }
.qa-body ol, .qa-body ul { padding-left: 1.4em; }
.qa-body li { padding-left: 0.2em; line-height: 1.75; }
.qa-body li + li { margin-top: 4px; }
.qa-body ol > li::marker { color: var(--c-accent-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.qa-body ul > li::marker { color: var(--c-ink-3); }
.qa-body strong { color: var(--c-ink); }

.final-cta { text-align: center; }
.final-cta .section-title { margin-left: auto; margin-right: auto; max-width: 22em; margin-bottom: 28px; }
.final-cta .section-lead { margin: 0 auto 28px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-sub { margin-top: 22px; font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.75; }
.cta-sub-note { color: var(--c-ink-3); }

/* ═══════════════════════════════════════════════════════
   과정 등록(결제) 상자 (js/edu-buy.js 가 채움 — education · classroom 공용)
   ═══════════════════════════════════════════════════════ */
.edu-buy { max-width: 880px; margin: 0 auto; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 32px 36px; box-shadow: var(--shadow-1); }
.edu-buy-tag { display: inline-flex; font-size: var(--fs-xs); font-weight: 650; color: var(--c-accent-ink); background: var(--c-accent-tint); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; }
.edu-buy-title { font-size: 1.375rem; margin-bottom: 8px; }
.edu-buy-desc { color: var(--c-ink-2); line-height: 1.75; font-size: var(--fs-small); }
.edu-buy-body { margin-top: 24px; }
/* 과정 기본 조건 (이용 기간 · 결제 방법 · 이전 수강생) — [2026-10-19] 홈 가격 카드에서 옮김. 판매 전에도 보이는 고정 문구 */
.price-facts { display: grid; gap: 0; border-top: 1px solid var(--c-line); }
.price-facts > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-line); font-size: var(--fs-small); line-height: 1.6; }
.price-facts dt { color: var(--c-ink-3); }
.price-facts dd { color: var(--c-ink); }
.edu-buy-head .price-facts { margin-top: 18px; }
.edu-buy-loading, .edu-buy-note { color: var(--c-ink-3); font-size: var(--fs-small); line-height: 1.75; }
.edu-buy-note strong { color: var(--c-ink-2); }
.edu-buy-note a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.edu-price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.edu-price { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px 22px 20px; display: flex; flex-direction: column; }
.edu-price.hot { border-color: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-accent); }
.edu-price-label { font-size: var(--fs-small); color: var(--c-ink-2); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.edu-price-badge { background: var(--c-accent-tint); color: var(--c-accent-ink); font-weight: 700; font-size: 0.75rem; border-radius: 999px; padding: 2px 9px; }
.edu-price-amt { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.edu-price-sub { font-size: 0.875rem; color: var(--c-ink-2); margin-top: 8px; line-height: 1.65; flex: 1; font-variant-numeric: tabular-nums; }
.edu-price-sub s { color: var(--c-ink-3); }
.edu-price .btn-primary { margin-top: 16px; width: 100%; }
.edu-price .btn-primary.secondary { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line-2); }
.edu-price .btn-primary.secondary:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }
.edu-price .btn-primary[disabled], .edu-price .btn-primary.disabled { background: var(--c-band); color: var(--c-ink-3); border-color: var(--c-line); pointer-events: none; }
.edu-buy-alert { background: var(--c-band); border: 1px solid var(--c-line); border-left: 3px solid var(--c-accent); border-radius: var(--radius-sm); padding: 14px 18px; line-height: 1.75; color: var(--c-ink-2); font-size: var(--fs-small); }
.edu-buy-alert strong { color: var(--c-ink); }
.edu-buy-alert a { color: var(--c-accent); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.edu-buy-perk { display: flex; gap: 10px; align-items: flex-start; background: var(--c-accent-tint); color: var(--c-accent-ink); border-radius: var(--radius-sm); padding: 12px 16px; font-size: var(--fs-small); line-height: 1.65; margin-bottom: 16px; }
.edu-buy-perk strong { color: var(--c-accent-ink); }
.edu-prod-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.edu-prod { background: var(--c-surface); border: 1px solid var(--c-line-2); border-radius: var(--radius); padding: 16px 18px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.edu-prod:hover { border-color: var(--c-accent); }
.edu-prod.on { border-color: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-accent); background: #FBFEFD; }
.edu-prod-name { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.edu-prod-name::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--c-line-2); flex: none; box-sizing: border-box; }
.edu-prod.on .edu-prod-name::before { border-color: var(--c-accent); background: radial-gradient(circle, var(--c-accent) 38%, transparent 42%); }
.edu-prod-desc { font-size: 0.875rem; color: var(--c-ink-2); line-height: 1.6; }
.edu-prod-price { font-size: 0.875rem; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.edu-prod-one { font-size: var(--fs-small); color: var(--c-ink-2); margin-bottom: 14px; }
.edu-prod-one strong { color: var(--c-ink); }
.edu-dep-modal { position: fixed; inset: 0; background: rgba(15, 27, 45, 0.45); display: none; align-items: center; justify-content: center; z-index: 9999; padding: 16px; }
.edu-dep-modal.on { display: flex; }
.edu-dep-box { background: var(--c-surface); border-radius: var(--radius-lg); padding: 26px 28px; max-width: 460px; width: 100%; box-shadow: var(--shadow-pop); }
.edu-dep-box h4 { font-size: 1.125rem; margin-bottom: 8px; }
.edu-dep-box p { color: var(--c-ink-2); font-size: var(--fs-small); line-height: 1.7; margin-bottom: 14px; }
.edu-dep-box label { display: block; font-size: var(--fs-small); font-weight: 600; margin-bottom: 6px; }
.edu-dep-box input { width: 100%; background: var(--c-surface); border: 1px solid var(--c-line-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 1rem; }
.edu-dep-box input:focus { outline: 2px solid var(--c-accent); outline-offset: 0; border-color: var(--c-accent); }
.edu-dep-actions { display: flex; gap: 10px; margin-top: 16px; }
.edu-dep-actions button { flex: 1; min-height: 46px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--c-line-2); background: var(--c-surface); color: var(--c-ink); cursor: pointer; font-size: var(--fs-small); font-weight: 600; }
.edu-dep-actions button.go { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.edu-dep-actions button.go:hover { background: var(--c-accent-hover); }
/* [2026-10-19] 결제 전 확인(환불 규정 동의) 창 — js/edu-buy.js 가 만듦. 입금자명 창(.edu-dep-*)과 같은 틀 + 긴 내용이면 창 안에서 밀림 */
.edu-dep-actions button:disabled, .edu-dep-actions button.go:disabled { background: var(--c-band); color: var(--c-ink-3); border-color: var(--c-line); cursor: not-allowed; }
.edu-refund-box { max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.edu-dep-box .edu-refund-for { display: inline-flex; margin-bottom: 12px; padding: 3px 10px; border-radius: 999px; background: var(--c-accent-tint); color: var(--c-accent-ink); font-size: var(--fs-xs); font-weight: 650; line-height: 1.5; }
.edu-dep-box .edu-refund-for:empty { display: none; }
.edu-dep-box #eduRefundDesc p { margin-bottom: 8px; color: var(--c-ink); font-weight: 600; }
.edu-refund-list { margin: 0 0 12px; padding-left: 1.2em; color: var(--c-ink-2); font-size: var(--fs-small); line-height: 1.7; }
.edu-refund-list li + li { margin-top: 6px; }
.edu-refund-list strong { color: var(--c-ink); }
.edu-dep-box .edu-refund-more { margin-bottom: 14px; }
.edu-refund-more a { color: var(--c-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.edu-refund-box .edu-refund-check { display: flex; margin-bottom: 0; font-weight: 400; color: var(--c-ink-2); font-size: var(--fs-small); } /* .edu-dep-box label(블록·굵게)을 이김 */
.edu-refund-box .edu-refund-check input[type="checkbox"] { width: 20px; height: 20px; padding: 0; border: 0; }
.edu-dep-box .edu-refund-err { margin: 10px 0 0; color: var(--c-down); font-size: 0.875rem; font-weight: 500; line-height: 1.55; }

/* ═══════════════════════════════════════════════════════
   하위 페이지 머리 (education · classroom)
   ═══════════════════════════════════════════════════════ */
.page-header { padding: 64px 0 56px; background: var(--c-band); border-bottom: 1px solid var(--c-line); }
.page-header .section-title { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; max-width: 22em; }
.page-header .section-desc { max-width: 680px; }

/* education.html 전용 (개편 1차 — 겉모양만) */
.edu-hero-em { color: var(--c-accent-ink); }
.edu-hero-price { margin: 22px 0 4px; font-size: 1rem; color: var(--c-ink-2); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; font-variant-numeric: tabular-nums; }
.edu-hero-price .p-old { text-decoration: line-through; color: var(--c-ink-3); }
.edu-hero-price .p-new { font-size: 1.625rem; font-weight: 800; color: var(--c-ink); letter-spacing: -0.02em; }
.edu-hero-price .p-badge { background: var(--c-accent-tint); color: var(--c-accent-ink); font-weight: 700; font-size: 0.8125rem; border-radius: 999px; padding: 3px 10px; }
.edu-hero-price .p-note { font-size: var(--fs-small); color: var(--c-ink-3); }
.edu-hero-loading { color: var(--c-ink-3); font-size: var(--fs-small); }
.edu-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.diff-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 28px 30px; }
.diff-card.good { border-color: var(--c-accent-line); }
.diff-label { font-size: var(--fs-small); font-weight: 700; margin-bottom: 12px; }
.diff-label.bad { color: var(--c-ink-3); }
.diff-label.good { color: var(--c-accent-ink); }
.diff-list { list-style: none; }
.diff-list li { font-size: var(--fs-small); color: var(--c-ink-2); padding: 10px 0; border-top: 1px solid var(--c-line); display: flex; gap: 10px; line-height: 1.6; }
.diff-list li::before { content: ''; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; margin-top: 0.65em; background: var(--c-line-2); }
.diff-card.good .diff-list li::before { background: var(--c-accent); }
.edu-cmp { max-width: 920px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); overflow: hidden; background: var(--c-surface); }
.edu-cmp table { width: 100%; border-collapse: collapse; }
.edu-cmp th, .edu-cmp td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--c-line); font-size: var(--fs-small); vertical-align: top; line-height: 1.6; }
.edu-cmp th { background: var(--c-band); font-weight: 650; font-size: var(--fs-xs); color: var(--c-ink-2); }
.edu-cmp th.hot { color: var(--c-accent-ink); }
.edu-cmp tr:last-child td { border-bottom: 0; }
.edu-cmp td:first-child { color: var(--c-ink-2); width: 30%; }
.edu-cmp td.no { color: var(--c-ink-3); }
.edu-cmp td.yes { color: var(--c-ink); }
.edu-cmp td.yes::before { content: '✓ '; color: var(--c-accent); font-weight: 700; }
.edu-cmp td.price { color: var(--c-ink); font-weight: 650; font-variant-numeric: tabular-nums; } /* 가격 칸 — ✓ 없이 (판매 전에는 '판매 준비 중'이 들어감) */
/* (2026-10-17 2차) td.no 앞의 '— ' 표시는 뺌 — 칸 내용이 '—' 일 때 '— —' 로 두 번 보였음. 흐린 글자색으로 구분 */
.edu-proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.edu-proof { display: block; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.edu-proof:hover { border-color: var(--c-accent-line); }
.edu-proof img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--c-band); }
.edu-proof-body { padding: 12px 14px; }
.edu-proof-title { font-size: var(--fs-small); font-weight: 650; line-height: 1.45; margin-bottom: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.edu-proof-meta { font-size: var(--fs-xs); color: var(--c-ink-3); }
.edu-proof-empty { color: var(--c-ink-3); padding: 20px; border: 1px dashed var(--c-line-2); border-radius: var(--radius); text-align: center; font-size: var(--fs-small); grid-column: 1 / -1; }
.edu-quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.edu-quote { background: var(--c-surface); border: 1px solid var(--c-line); border-left: 3px solid var(--c-accent); border-radius: var(--radius-sm); padding: 18px 20px; line-height: 1.75; color: var(--c-ink-2); }
.edu-quote .q-who { display: block; margin-top: 10px; font-size: var(--fs-xs); color: var(--c-ink-3); }
.curriculum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: curr; }
.curriculum-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px 24px 24px; counter-increment: curr; }
.curriculum-card::before { content: counter(curr, decimal-leading-zero); display: block; font-size: 0.875rem; font-weight: 700; color: var(--c-accent); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.curriculum-title { font-size: var(--fs-h3); font-weight: 700; margin-bottom: 6px; }
.curriculum-desc { font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.7; }
.process-steps { display: grid; gap: 0; max-width: 860px; list-style: none; } /* <ol> 로 써도 번호 글자 없이 */
.process-step { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--c-line); }
.process-number { width: 40px; height: 40px; border-radius: 50%; background: var(--c-accent-tint); color: var(--c-accent-ink); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.process-content h3 { font-size: 1.125rem; margin-bottom: 6px; }
.process-content p { font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.75; }
.cta { text-align: center; background: var(--c-accent-tint); padding: var(--space-section) 0; }
.cta .section-title { margin-left: auto; margin-right: auto; }
.cta .section-desc { margin: 0 auto 28px; }

/* ═══════════════════════════════════════════════════════
   반응형
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 560px; }
  .terms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term:last-child:nth-child(odd) { grid-column: 1 / -1; } /* 칸 수가 홀수일 때만 마지막 칸을 한 줄로 (펀디드 12칸은 짝수 — 칸 수를 바꿀 때 대비) */
  .faq-layout { grid-template-columns: 1fr; gap: 0; }
  .faq-layout .section-head { margin-bottom: 28px; }
  .calc-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .curriculum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .perf-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .edu-price-grid, .edu-prod-pick { grid-template-columns: 1fr; }
  .edu-buy { padding: 24px 18px; }
  .diff-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .home-hero { padding: 40px 0 56px; }
  .hero-lead { font-size: 1.0625rem; }
  .incl-card { padding: 22px 20px 18px; }
  .hero-actions .btn-primary, .hero-actions .btn-outline { flex: 1 1 140px; }
  .section-head { margin-bottom: 28px; }
  .terms-card-head { padding: 16px 18px; }
  .term { padding: 14px 16px 16px; }
  .term dt { font-size: 0.875rem; }
  .term dd { font-size: 1.0625rem; }
  .favor-table { font-size: 0.875rem; }
  .favor-table th, .favor-table td { padding: 10px 6px; }
  .favor-table tbody th { width: 34%; }
  .calc-input-area { padding: 24px 18px; }
  /* 좁은 화면: 결과 카드 2열로 촘촘하게 (계산·그래프 로직은 그대로) */
  .calc-results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .calc-result-card { padding: 14px 12px 14px; }
  .calc-market { font-size: 0.875rem; }
  .calc-symbol { font-size: 0.6875rem; padding: 1px 4px; }
  .calc-period { font-size: 0.75rem; line-height: 1.45; margin-bottom: 6px; }
  .calc-return-pct { font-size: 0.8125rem; }
  .calc-chart-wrap { height: 64px; margin: 4px 0 8px; }
  .calc-profit-label { font-size: 0.75rem; }
  .calc-profit { font-size: 1.0625rem; }
  .calc-invested { font-size: 0.75rem; }
  .calc-missed, .calc-bottom-cta { padding: 22px 18px; }
  .calc-missed-text { font-size: 1rem; }
  .curriculum-grid { grid-template-columns: 1fr; }
  .cta-buttons .btn-primary, .cta-buttons .btn-outline { flex: 1 1 100%; }
  .perf-card { padding: 20px 18px 14px; }
  .perf-total dd { font-size: 1.1875rem; }
  /* 수익 인증 3개: 좁은 화면에서는 사진 왼쪽 · 글 오른쪽 한 줄씩 (세로로 너무 길어지지 않게) */
  .edu-proof-grid.perf-proof-grid { grid-template-columns: 1fr; gap: 10px; }
  .price-facts > div { grid-template-columns: 6em minmax(0, 1fr); } /* education.html 과정 조건 — 좁은 화면에서 오른쪽 글이 너무 잘게 끊기지 않게 */
  .perf-proof-grid .edu-proof { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: stretch; }
  .perf-proof-grid .edu-proof img { height: 100%; min-height: 84px; }
  .page-header { padding: 40px 0 36px; }
  .edu-cmp th, .edu-cmp td { padding: 11px 12px; }
  .edu-cmp td:first-child { width: 34%; }
  .diff-card { padding: 22px 20px; }
  .process-step { grid-template-columns: 44px 1fr; gap: 14px; }
  .hero-state-banner .hsb-btn { width: 100%; justify-content: center; }
  .section-title br { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   공용 부품 (ui-*) — 2026-10-18 나머지 페이지 개편용 기반
   ───────────────────────────────────────────────────────────────────────────
   이 아래는 나머지 페이지(소개·펀디드·신청·FAQ·지갑 안내·리더보드·정산내역·수익인증·
   내 페이지·계정 관리·결제·약관·개인정보·관리자·디스코드 가입 안내)를 옮기며 같이 쓰는 부품입니다.
   이름이 모두 새것(ui-*, 수식어 --, 상태 is-*)이라 이미 개편된 index · classroom · education 에는 닿지 않습니다.

   ▸ 페이지 전용 스타일 규칙
     · 페이지 하나에서만 쓰는 모양은 css/pages/<페이지>.css 에 둡니다. (예: css/pages/mypage.css)
       <link rel="stylesheet" href="css/site.css?v=…"> 바로 아래에 <link rel="stylesheet" href="css/pages/mypage.css?v=…">
     · 페이지 파일에서는 색·간격을 직접 쓰지 말고 위의 토큰(var(--c-…), var(--radius…))을 씁니다.
     · 페이지 파일의 이름은 그 페이지 접두어로 시작합니다(mp-·adm-·pf-·pay-·wg-…). 머리글·바닥글·ui-* 를 통째로 바꾸지 않습니다.
     · 개편 전 페이지 안의 <style> 덩어리는 그 페이지 css 로 옮깁니다. 여러 페이지가 같이 쓰게 되면 이 파일로 올립니다.
     · 참고 견본: css/pages/_template.css

   ▸ 부품 목록 (자세한 쓰임은 각 묶음 첫 줄 주석)
     배치 ········ .page-header--compact / --center · .section--tight · .ui-container--narrow / --prose / --wide
                   .ui-stack(--sm/--lg) · .ui-row(--between) · .ui-grid(--2/--3/--4) · .ui-subhead · .ui-h2 · .ui-h3 · .ui-meta
     카드 ········ .ui-card(--band/--accent/--flush/--tight) · __head · __title · __sub · __foot · .ui-icon-box
     값 목록 ····· .ui-kv(--tiles/--plain/--stack/--narrow, 이름 칸 폭 --kv-label) — <dl class="ui-kv"><div><dt>…</dt><dd>…</dd></div></dl>
     표 ·········· .ui-table-wrap(--stack) > table.ui-table(--compact/--sticky-first/--stack) · th/td .is-num · .is-pos · .is-neg · .is-muted · tr.is-dim · .ui-table__sub · .ui-scroll-hint
     입력 ········ .ui-fieldset · .ui-legend · .ui-field · .ui-label · .ui-req · .ui-input · .ui-select · .ui-textarea · .ui-input--mono
                   .ui-hint · .ui-error · .ui-check(--box) · .ui-field-row · .ui-form-actions · 오류 상태 = aria-invalid="true" 또는 .is-invalid
     버튼 ········ (기존) .btn-primary · .btn-outline · .btn-plain · .btn-lg · .btn-sm
                   (추가) .btn-danger · .btn-outline--danger · .btn-block · .ui-icon-btn · 모든 버튼 :disabled 모양
     배지 ········ .ui-badge + --success · --warning · --danger · --info · --accent · --neutral(기본) · --dot
                   (기존 .chip 은 상태가 아닌 꼬리표용, .chip--link 는 누를 수 있는 꼬리표)
     탭 ·········· .ui-tabs(--pill/--wrap) > button.ui-tab[aria-selected="true"] (또는 .is-active / .on) · .ui-tab-panel
     접기 ········ FAQ 는 홈과 같은 부품: .faq-list > details.qa > summary + .qa-body · 묶음 제목 .ui-acc-title
     창 ·········· .ui-modal(.is-open | .open) > .ui-modal__card > __head(__title, __close) · __body · __foot · --wide · --danger
     사진 크게 ··· .ui-lightbox(.is-open | .show) > __box > __media(__img, __nav--prev/--next, __close, __counter) · __thumbs · __body
     알림 ········ .ui-toast(.is-show | .show) · --success · --danger
     상태 화면 ··· .ui-state(--plain) > __icon · __title · __text · __actions · .ui-empty · .ui-loading > .ui-spinner
     안내 상자 ··· .ui-alert(기본=메모) · --info · --success · --warning · --danger · __title · __icon
     수치 ········ .ui-stats > .ui-stat > __label · __value(.is-pos/.is-neg) · __sub
     진행 ········ .ui-progress(--sm/--lg, --success/--warning/--danger) > .ui-progress__bar · .ui-progress-head · .ui-stepper > li.ui-step(.is-done/.is-current)
     쪽 넘김 ····· nav.ui-pagination > a|button (aria-current="page") · .ui-load-more
     복사 ········ .ui-copy > .ui-copy__val + button.ui-copy__btn(.is-done) · .ui-code · .ui-mono
     긴 글 ······· .ui-prose(약관·개인정보) · __meta · __lead · __note · .ui-toc
     보조 ········ .u-muted · .u-small · .u-center · .u-right · .u-mt-0/8/16/24/32/48 · .u-mb-0/8/16/24 · .is-pos · .is-neg

   ▸ 예전 이름 호환 (맨 아래 묶음) — 스크립트(js/*.js)가 만들어 넣는 마크업이라 이름을 못 바꾸는 것들을 새 모양으로 그립니다.
     tc-modal* · tc-toast · tc-onboard* · form-row 계열 · status-badge · loading-spinner/spinner ·
     btn-secondary · rank-cell · pnl-* · trader-name · settlement-amount · lb-section-title/lb-updated · mypage-section · mp-group
     ([2026-10-18 통합] 쓰는 곳이 없어진 error-message · coming-soon-icon · mypage-empty · table-responsive/leaderboard-table ·
      summary-card · lb-footnote · legal(약관 본문, 지금은 .ui-prose) 규칙은 지움)
     새로 짜는 정적 마크업에는 ui-* 를 쓰고, 이 호환 이름은 스크립트가 그 이름을 만들 때만 씁니다.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --c-row-hover: #FAFBFC;   /* 표 줄 마우스 올림 */
  --c-scrim-strong: rgba(15, 27, 45, 0.85); /* 사진 크게 보기 바탕 */
  --c-media-btn: rgba(15, 27, 45, 0.65);    /* 사진 위 단추·숫자 */
  --c-media-btn-hover: rgba(15, 27, 45, 0.9);
  --font-code: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "D2Coding", "Roboto Mono", monospace; /* 주소·TXID·주문 번호 */
  --c-line-input: #858E9E;  /* 입력칸 테두리 (흰 바탕 3.3:1 — 입력칸 경계는 3:1 이상) */
  --c-up-ink: #067647;      /* 옅은 초록 바탕 위 글자 (5.4:1) */
  --c-up-line: #ABEFC6;
  --c-down-line: #FECDCA;
  --c-warn-line: #FEDF89;
  --c-info-ink: #1D4ED8;    /* 옅은 파랑 바탕 위 글자 (6.1:1) */
  --c-info-line: #B2CCFF;
  --c-neutral-tint: #EEF0F3;
  --c-scrim: rgba(15, 27, 45, 0.45);
}

/* ─── 배치 ─── */
/* 하위 페이지 머리: <section class="page-header [page-header--compact]"><div class="container"><p class="eyebrow">…</p><h1 class="section-title">…</h1><p class="section-desc">…</p> */
.page-header--compact { padding: 40px 0 32px; }
.page-header--compact .section-title { font-size: var(--fs-h2); max-width: none; margin-bottom: 8px; }
.page-header--center { text-align: center; }
.page-header--center .section-title, .page-header--center .section-desc { margin-left: auto; margin-right: auto; }
.section--tight { padding: 48px 0 72px; }          /* 내 페이지·관리자처럼 머리 아래 바로 내용이 오는 화면 */
.section--flush-top { padding-top: 0; }
.ui-container--narrow { max-width: 808px; }        /* 본문 760px (신청서·결제) */
.ui-container--prose { max-width: 868px; }         /* 본문 820px (약관·FAQ) */
.ui-container--wide { max-width: min(1680px, 100%); } /* 관리자 표 */
.ui-stack > * + * { margin-top: var(--stack-gap, 16px); }
.ui-stack--sm { --stack-gap: 8px; }
.ui-stack--lg { --stack-gap: 32px; }
.ui-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ui-row--between { justify-content: space-between; }
.ui-grid { display: grid; gap: 16px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.ui-grid--2 { --cols: 2; }
.ui-grid--3 { --cols: 3; }
.ui-grid--4 { --cols: 4; }
/* 표·목록 위 작은 머리 (제목 + 갱신 시각/버튼) */
.ui-subhead { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }
.ui-h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.ui-h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; }
.ui-meta { font-size: 0.875rem; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }

/* ─── 카드 ─── <div class="ui-card"><div class="ui-card__head"><h2 class="ui-card__title">…</h2><a class="btn-outline btn-sm">…</a></div>…</div> */
.ui-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 24px 28px; }
.ui-card--band { background: var(--c-band); }
.ui-card--accent { border-color: var(--c-accent-line); }
.ui-card--tight { padding: 18px 20px; border-radius: var(--radius); }
.ui-card--flush { padding: 0; overflow: hidden; }
.ui-card__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 16px; }
.ui-card__title { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; }
.ui-card__sub { font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.65; }
.ui-card__foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.ui-kv + .ui-card__foot, .ui-table-wrap + .ui-card__foot { border-top: 0; padding-top: 0; }
.ui-icon-box { width: 40px; height: 40px; border-radius: 10px; background: var(--c-accent-tint); color: var(--c-accent-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.125rem; }
.ui-icon-box svg { width: 20px; height: 20px; }

/* ─── 값 목록 ─── 항목명 | 값. 줄마다 <div><dt>…</dt><dd>…</dd></div> */
.ui-kv { border-top: 1px solid var(--c-line); }
.ui-kv > div { display: grid; grid-template-columns: var(--kv-label, minmax(6.5em, 32%)) minmax(0, 1fr); gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--c-line); font-size: var(--fs-small); line-height: 1.6; }
.ui-kv dt { color: var(--c-ink-2); }
.ui-kv dd { color: var(--c-ink); font-weight: 500; min-width: 0; font-variant-numeric: tabular-nums; }
.ui-kv dd.is-em { color: var(--c-accent-ink); font-weight: 700; }
.ui-kv--plain { border-top: 0; }
.ui-kv--plain > div { border-bottom: 0; padding: 6px 0; }
.ui-kv--stack > div { grid-template-columns: 1fr; }
/* 이름 칸 폭: 짧은 이름만 있는 목록은 --narrow(7em). 페이지에서 --kv-label 로 직접 정해도 됨 (예: style 대신 페이지 css 에서 .x { --kv-label: 5em; }) */
.ui-kv--narrow { --kv-label: 7em; }
/* 칸 모양 (설정값 여러 개를 격자로) */
.ui-kv--tiles { border-top: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.ui-kv--tiles > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); }
.ui-kv--tiles > div.is-full { grid-column: 1 / -1; }
.ui-kv--tiles dt { font-size: 0.875rem; }
.ui-kv--tiles dd { font-size: 1rem; font-weight: 650; }

/* ─── 표 ─── 넓으면 상자 안에서만 옆으로 밀림.
   <div class="ui-table-wrap" role="region" aria-label="정산 내역" tabindex="0"><table class="ui-table">…</table></div> */
.ui-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); }
.ui-table-wrap:focus-visible { outline-offset: 2px; border-radius: var(--radius); }
.ui-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.ui-table th, .ui-table td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--c-line); white-space: nowrap; line-height: 1.5; }
.ui-table thead th { background: var(--c-band); font-size: var(--fs-xs); font-weight: 650; color: var(--c-ink-2); }
.ui-table tbody tr:last-child > * { border-bottom: 0; }
.ui-table tbody tr:hover > td { background: var(--c-row-hover); }
.ui-table td { color: var(--c-ink); }
.ui-table .is-num { text-align: right; }
.ui-table .is-wrap { white-space: normal; min-width: 14em; }
.ui-table .is-muted { color: var(--c-ink-3); }
.ui-table tr.is-dim > td { color: var(--c-ink-2); }
.ui-table__sub { display: block; font-size: var(--fs-xs); color: var(--c-ink-3); font-weight: 400; }
.ui-table--compact th, .ui-table--compact td { padding: 9px 12px; }
.ui-table-note { margin-top: 10px; font-size: 0.875rem; color: var(--c-ink-3); line-height: 1.6; }
.ui-scroll-hint { display: none; margin-bottom: 8px; font-size: var(--fs-xs); color: var(--c-ink-3); }
.is-pos { color: var(--c-up); }
.is-neg { color: var(--c-down); }
.ui-table .is-pos, .ui-table .is-neg { font-weight: 650; }

/* ─── 입력 ─── <div class="ui-field"><label class="ui-label" for="x">이름 <span class="ui-req" aria-hidden="true">*</span></label>
   <input class="ui-input" id="x" aria-describedby="x-hint x-err"><p class="ui-hint" id="x-hint">…</p><p class="ui-error" id="x-err"></p></div> */
.ui-fieldset { border: 0; margin: 0 0 28px; padding: 0 0 24px; border-bottom: 1px solid var(--c-line); min-width: 0; }
.ui-fieldset:last-of-type { border-bottom: 0; padding-bottom: 0; }
.ui-legend { font-size: 1.0625rem; font-weight: 700; color: var(--c-ink); margin-bottom: 16px; padding: 0; }
.ui-field { margin-bottom: 20px; }
.ui-field:last-child { margin-bottom: 0; }
.ui-label { display: block; font-size: var(--fs-small); font-weight: 600; color: var(--c-ink); margin-bottom: 6px; line-height: 1.5; }
.ui-req, .req { color: var(--c-down); margin-left: 2px; font-weight: 700; }
.ui-input, .ui-select, .ui-textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--c-line-input); border-radius: var(--radius-sm);
  background: var(--c-surface); color: var(--c-ink); font-size: 1rem; line-height: 1.5; transition: border-color 0.15s, box-shadow 0.15s;
}
.ui-input::placeholder, .ui-textarea::placeholder { color: #6B7280; opacity: 1; }
.ui-input:hover, .ui-select:hover, .ui-textarea:hover { border-color: var(--c-ink-3); }
.ui-input:focus, .ui-select:focus, .ui-textarea:focus { outline: 2px solid var(--c-accent); outline-offset: 0; border-color: var(--c-accent); border-radius: var(--radius-sm); }
.ui-input:disabled, .ui-select:disabled, .ui-textarea:disabled, .ui-input[readonly] { background: var(--c-band); color: var(--c-ink-2); cursor: not-allowed; }
.ui-input[readonly] { cursor: text; }
.ui-input--mono { font-family: var(--font-code); font-size: 0.9375rem; letter-spacing: 0; }
/* 고정폭 칸의 안내 문구(placeholder)는 본문 글꼴 — 한글이 고정폭 글꼴로 벌어져 보이지 않게 */
.ui-input--mono::placeholder, .form-row input.mono-input::placeholder { font-family: var(--font); font-size: 1rem; letter-spacing: 0; }
.ui-textarea { min-height: 120px; resize: vertical; }
.ui-select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background: var(--c-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%234B5563' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 12px no-repeat;
}
.ui-input[aria-invalid="true"], .ui-select[aria-invalid="true"], .ui-textarea[aria-invalid="true"],
.ui-input.is-invalid, .ui-select.is-invalid, .ui-textarea.is-invalid { border-color: var(--c-down); }
.ui-input[aria-invalid="true"]:focus, .ui-select[aria-invalid="true"]:focus, .ui-textarea[aria-invalid="true"]:focus,
.ui-input.is-invalid:focus, .ui-select.is-invalid:focus, .ui-textarea.is-invalid:focus { outline-color: var(--c-down); }
.ui-hint { margin-top: 6px; font-size: 0.875rem; color: var(--c-ink-3); line-height: 1.6; }
.ui-hint strong { color: var(--c-ink-2); }
.ui-error { margin-top: 6px; font-size: 0.875rem; font-weight: 500; color: var(--c-down); line-height: 1.55; }
.ui-error:empty { display: none; }
.ui-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
/* 체크 상자: <label class="ui-check [ui-check--box]"><input type="checkbox" name="…"><span>…</span></label> */
.ui-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.6; }
.ui-check input[type="checkbox"], .ui-check input[type="radio"] { flex-shrink: 0; width: 20px; height: 20px; margin: 0.15em 0 0; accent-color: var(--c-accent); cursor: pointer; }
.ui-check strong { color: var(--c-ink); }
.ui-check a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.ui-check--box { padding: 14px 16px; border: 1px solid var(--c-line-2); border-radius: var(--radius-sm); background: var(--c-surface); transition: border-color 0.15s, background-color 0.15s; }
.ui-check--box:hover { border-color: var(--c-accent-line); }
.ui-check--box:has(input:checked) { border-color: var(--c-accent-line); background: #FBFEFD; }
.ui-check--box + .ui-check--box, .ui-check--box + .ui-error + .ui-check--box { margin-top: 10px; }
.ui-form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ─── 버튼 추가분 ─── */
.btn-danger, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-danger { background: var(--c-down); color: #fff; }
.btn-danger:hover { background: #912018; color: #fff; }
.btn-outline--danger { color: var(--c-down); border-color: #F4A39B; }
.btn-outline--danger:hover { color: #912018; border-color: var(--c-down); background: var(--c-down-tint); }
.btn-block { display: flex; width: 100%; }
.btn-primary:disabled, .btn-outline:disabled, .btn-danger:disabled, .btn-secondary:disabled, .btn-plain:disabled,
.btn-primary.is-disabled, .btn-outline.is-disabled, .btn-danger.is-disabled {
  background: var(--c-band); color: var(--c-ink-3); border-color: var(--c-line); cursor: not-allowed;
}
.btn-plain:disabled { background: transparent; text-decoration: none; }
/* 아이콘만 있는 작은 버튼 (복사·보기 등) — aria-label 필수 */
.ui-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid var(--c-line-2); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-ink-2); cursor: pointer; font-size: 1rem; line-height: 1; }
.ui-icon-btn:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }
.ui-icon-btn svg { width: 18px; height: 18px; }

/* ─── 배지 (상태) ─── <span class="ui-badge ui-badge--success">승인</span> */
.ui-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 650; line-height: 1.4; white-space: nowrap; vertical-align: middle; background: var(--c-neutral-tint); color: var(--c-ink-2); }
.ui-badge--neutral { background: var(--c-neutral-tint); color: var(--c-ink-2); }
.ui-badge--success { background: var(--c-up-tint); color: var(--c-up-ink); }
.ui-badge--warning { background: var(--c-warn-tint); color: var(--c-warn); }
.ui-badge--danger { background: var(--c-down-tint); color: var(--c-down); }
.ui-badge--info { background: var(--c-info-tint); color: var(--c-info-ink); }
.ui-badge--accent { background: var(--c-accent-tint); color: var(--c-accent-ink); }
.ui-badge--dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
/* 누를 수 있는 꼬리표 (페이지 안 바로가기 등) */
.chip--link { min-height: 36px; padding: 6px 14px; border: 1px solid var(--c-line-2); background: var(--c-surface); font-size: 0.875rem; color: var(--c-ink-2); }
.chip--link:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }
.chip--link[aria-current] { background: var(--c-accent-tint); border-color: var(--c-accent-line); color: var(--c-accent-ink); }

/* ─── 탭 ─── <div class="ui-tabs" role="tablist"><button class="ui-tab" role="tab" aria-selected="true" aria-controls="p1">…</button></div>
   <div class="ui-tab-panel" id="p1" role="tabpanel">…</div>  (좁은 화면에서는 탭 줄만 옆으로 밀림) */
.ui-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--c-line); margin-bottom: 24px; }
.ui-tabs::-webkit-scrollbar { display: none; }
.ui-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; background: none; color: var(--c-ink-2); font-size: var(--fs-small); font-weight: 600; white-space: nowrap; cursor: pointer; }
.ui-tab:hover { color: var(--c-ink); background: var(--c-band); }
.ui-tab[aria-selected="true"], .ui-tab.is-active, .ui-tab.on { color: var(--c-accent-ink); border-bottom-color: var(--c-accent); }
.ui-tab:focus-visible { outline-offset: -2px; }
.ui-tab-panel:focus-visible { outline-offset: 4px; }
.ui-tabs--pill { box-shadow: none; gap: 8px; flex-wrap: wrap; overflow: visible; }
.ui-tabs--pill .ui-tab { min-height: 40px; padding: 8px 16px; border: 1px solid var(--c-line-2); border-radius: 999px; background: var(--c-surface); }
.ui-tabs--pill .ui-tab[aria-selected="true"], .ui-tabs--pill .ui-tab.is-active, .ui-tabs--pill .ui-tab.on { background: var(--c-accent-tint); border-color: var(--c-accent-line); }

/* ─── 접기 (FAQ) ─── 홈과 같은 .faq-list > details.qa 를 씁니다. 묶음이 여럿이면 각 묶음 앞에 <h2 class="ui-acc-title"> */
.ui-acc-title { font-size: 1.125rem; font-weight: 700; color: var(--c-ink); margin: 0 0 4px; padding-top: 8px; }
.faq-list + .ui-acc-title { margin-top: 48px; }

/* ─── 창 (모달) ─── 열기: .is-open (또는 .open). 닫힌 동안은 보이지 않고 눌리지도 않음.
   <div class="ui-modal" role="dialog" aria-modal="true" aria-labelledby="mT"><div class="ui-modal__card">
     <div class="ui-modal__head"><h2 class="ui-modal__title" id="mT">…</h2><button class="ui-modal__close" aria-label="닫기">✕</button></div>
     <div class="ui-modal__body">…</div><div class="ui-modal__foot"><button class="btn-outline">취소</button><button class="btn-primary">확인</button></div></div></div> */
.ui-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--c-scrim); opacity: 0; visibility: hidden; transition: opacity 0.18s, visibility 0.18s; }
.ui-modal.is-open, .ui-modal.open { opacity: 1; visibility: visible; }
.ui-modal__card { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); transform: translateY(8px); transition: transform 0.18s; }
.ui-modal.is-open .ui-modal__card, .ui-modal.open .ui-modal__card { transform: none; }
.ui-modal--wide .ui-modal__card { max-width: 720px; }
.ui-modal--danger .ui-modal__card { border-top: 3px solid var(--c-down); }
.ui-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px 24px; border-bottom: 1px solid var(--c-line); }
.ui-modal__title { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; }
.ui-modal__close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--c-ink-2); font-size: 1.125rem; line-height: 1; cursor: pointer; }
.ui-modal__close:hover { background: var(--c-band); color: var(--c-ink); }
.ui-modal__body { padding: 20px 24px; font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.7; }
.ui-modal__body > * + * { margin-top: 14px; }
.ui-modal__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 0 24px 24px; }

/* ─── 사진 크게 보기 ─── 열기: .is-open (또는 .show). 사진 넘김 단추·숫자는 사진 위에 */
.ui-lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; background: var(--c-scrim-strong); }
.ui-lightbox.is-open, .ui-lightbox.show { display: flex; }
.ui-lightbox__box { width: min(880px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; background: var(--c-surface); border-radius: var(--radius-lg); }
.ui-lightbox__media { position: relative; background: var(--c-ink); }
.ui-lightbox__img { display: block; width: 100%; max-height: 62vh; object-fit: contain; }
.ui-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 56px; border: 0; background: var(--c-media-btn); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ui-lightbox__nav:hover { background: var(--c-media-btn-hover); }
.ui-lightbox__nav--prev { left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.ui-lightbox__nav--next { right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.ui-lightbox__nav:focus-visible, .ui-lightbox__close:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.ui-lightbox__close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--c-media-btn); color: #fff; font-size: 1.0625rem; cursor: pointer; }
.ui-lightbox__close:hover { background: var(--c-media-btn-hover); }
.ui-lightbox__counter { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 2px 12px; border-radius: 999px; background: var(--c-media-btn); color: #fff; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.ui-lightbox__thumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 0; }
.ui-lightbox__thumbs img { width: 56px; height: 56px; object-fit: cover; border: 2px solid transparent; border-radius: 6px; opacity: 0.6; cursor: pointer; }
.ui-lightbox__thumbs img.is-current, .ui-lightbox__thumbs img.cur { border-color: var(--c-accent); opacity: 1; }
.ui-lightbox__body { padding: 16px 22px 22px; }
.ui-lightbox__title { font-size: 1.0625rem; font-weight: 700; line-height: 1.5; margin-bottom: 4px; }
.ui-lightbox__meta { font-size: 0.875rem; color: var(--c-ink-3); margin-bottom: 10px; }
.ui-lightbox__text { font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ─── 알림 (토스트) ─── 아래 가운데. 보이기: .is-show (또는 .show). 읽어 줄 내용이면 role="status" */
.ui-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1200; max-width: min(480px, calc(100vw - 32px)); padding: 12px 18px; background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); border-left: 3px solid var(--c-accent); border-radius: var(--radius); box-shadow: var(--shadow-pop); font-size: var(--fs-small); line-height: 1.55; opacity: 0; visibility: hidden; transform: translate(-50%, 16px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s; }
.ui-toast.is-show, .ui-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.ui-toast--success { border-left-color: var(--c-up); }
.ui-toast--danger { border-left-color: var(--c-down); }

/* ─── 상태 화면 (불러오는 중 · 빈 목록 · 오류 · 로그인 필요) ───
   <div class="ui-state"><div class="ui-state__icon" aria-hidden="true">…</div><h2 class="ui-state__title">…</h2><p class="ui-state__text">…</p><div class="ui-state__actions">…</div></div> */
.ui-state { text-align: center; padding: 48px 24px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); }
.ui-state--plain { background: none; border: 0; padding: 40px 0; }
.ui-state__icon { display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; width: 48px; height: 48px; border-radius: 50%; background: var(--c-band); color: var(--c-ink-2); font-size: 1.5rem; line-height: 1; }
.ui-state__icon svg { width: 24px; height: 24px; }
.ui-state__title { font-size: 1.125rem; font-weight: 700; color: var(--c-ink); margin-bottom: 6px; }
.ui-state__text { font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.7; max-width: 34em; margin: 0 auto; }
.ui-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.ui-empty { padding: 32px 20px; text-align: center; border: 1px dashed var(--c-line-2); border-radius: var(--radius); background: var(--c-surface); color: var(--c-ink-3); font-size: var(--fs-small); line-height: 1.7; }
.ui-loading { padding: 64px 0; text-align: center; color: var(--c-ink-3); font-size: var(--fs-small); }
.ui-spinner { display: block; width: 32px; height: 32px; margin: 0 auto 12px; border: 3px solid var(--c-line); border-top-color: var(--c-accent); border-radius: 50%; animation: ui-spin 0.8s linear infinite; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ui-spinner, .spinner { animation-duration: 2.4s; } }

/* ─── 안내 상자 ─── 기본 = 회색 메모(강의실 판매 안내와 같은 모양). 색은 뜻이 있을 때만.
   <div class="ui-alert ui-alert--warning" role="note"><div><strong class="ui-alert__title">…</strong>본문</div></div> */
.ui-alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px; border: 1px solid var(--c-line); border-left: 3px solid var(--c-accent); border-radius: var(--radius-sm); background: var(--c-band); color: var(--c-ink-2); font-size: var(--fs-small); line-height: 1.75; }
.ui-alert > div { flex: 1; min-width: 0; }
.ui-alert strong { color: var(--c-ink); }
.ui-alert a { color: var(--c-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ui-alert__title { display: block; margin-bottom: 2px; font-weight: 700; color: var(--c-ink); }
.ui-alert__icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 0.2em; }
.ui-alert ul { margin: 4px 0 0; padding-left: 1.2em; }
.ui-alert li + li { margin-top: 2px; }
.ui-alert--info { background: var(--c-accent-tint); border-color: var(--c-accent-line); border-left-color: var(--c-accent); }
.ui-alert--success { background: var(--c-up-tint); border-color: var(--c-up-line); border-left-color: var(--c-up); }
.ui-alert--warning { background: var(--c-warn-tint); border-color: var(--c-warn-line); border-left-color: var(--c-warn); }
.ui-alert--danger { background: var(--c-down-tint); border-color: var(--c-down-line); border-left-color: var(--c-down); }
.ui-alert--danger .ui-alert__title { color: var(--c-down); }

/* ─── 수치 ─── <div class="ui-stats"><div class="ui-stat"><div class="ui-stat__label">누적 수익률</div><div class="ui-stat__value is-pos">+4.2%</div></div></div> */
.ui-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.ui-stat { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.ui-stat__label { font-size: 0.875rem; color: var(--c-ink-2); margin-bottom: 4px; line-height: 1.5; }
.ui-stat__value { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; color: var(--c-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ui-stat__value.is-pos { color: var(--c-up); }
.ui-stat__value.is-neg { color: var(--c-down); }
.ui-stat__sub { margin-top: 4px; font-size: var(--fs-xs); color: var(--c-ink-3); line-height: 1.5; }

/* ─── 진행 ─── 막대: <div class="ui-progress" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"><div class="ui-progress__bar" style="width:40%"></div></div> */
.ui-progress { height: 8px; background: var(--c-line); border-radius: 999px; overflow: hidden; }
.ui-progress__bar { height: 100%; width: 0; background: var(--c-accent); border-radius: inherit; transition: width 0.4s ease; }
.ui-progress--sm { height: 4px; }
.ui-progress--lg { height: 12px; }
.ui-progress--success .ui-progress__bar { background: var(--c-up); }
.ui-progress--warning .ui-progress__bar { background: var(--c-warn); }
.ui-progress--danger .ui-progress__bar { background: var(--c-down); }
.ui-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 0.875rem; color: var(--c-ink-2); }
.ui-progress-head strong { color: var(--c-ink); font-variant-numeric: tabular-nums; }
/* 단계 (가로, 좁은 화면에서는 세로): <ol class="ui-stepper"><li class="ui-step is-done"><span class="ui-step__dot">1</span><span class="ui-step__label">…</span><span class="ui-step__sub">…</span></li>… */
.ui-stepper { list-style: none; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 8px; }
.ui-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px; min-width: 0; }
.ui-step:not(:last-child)::after { content: ''; position: absolute; top: 16px; left: calc(50% + 24px); right: calc(-50% + 16px); height: 2px; background: var(--c-line); } /* 점 양쪽 8px 띄움 (칸 사이 8px 포함) */
.ui-step.is-done:not(:last-child)::after { background: var(--c-up); }
.ui-step__dot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 8px; border-radius: 50%; border: 2px solid var(--c-line-2); background: var(--c-surface); color: var(--c-ink-2); font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ui-step.is-done .ui-step__dot { background: var(--c-up); border-color: var(--c-up); color: #fff; }
.ui-step.is-current .ui-step__dot { background: var(--c-accent-tint); border-color: var(--c-accent); color: var(--c-accent-ink); }
.ui-step__label { font-size: var(--fs-small); font-weight: 600; color: var(--c-ink); line-height: 1.45; }
.ui-step.is-current .ui-step__label { color: var(--c-accent-ink); font-weight: 700; }
.ui-step__sub { margin-top: 2px; font-size: var(--fs-xs); color: var(--c-ink-3); line-height: 1.5; }

/* ─── 쪽 넘김 ─── <nav class="ui-pagination" aria-label="쪽"><a href="?p=1" aria-current="page">1</a><a href="?p=2">2</a></nav>  ·  더 보기: <div class="ui-load-more"><button class="btn-outline">더 보기</button></div> */
.ui-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }
.ui-pagination a, .ui-pagination button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--c-line-2); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-ink-2); font-size: var(--fs-small); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.ui-pagination a:hover, .ui-pagination button:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }
.ui-pagination [aria-current="page"] { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.ui-pagination [aria-disabled="true"], .ui-pagination button:disabled { background: var(--c-band); border-color: var(--c-line); color: var(--c-ink-3); cursor: not-allowed; pointer-events: none; }
.ui-load-more { margin-top: 32px; text-align: center; }

/* ─── 복사 상자 ─── <div class="ui-copy"><code class="ui-copy__val">T…</code><button type="button" class="ui-copy__btn">복사</button></div> */
.ui-copy { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; background: var(--c-band); border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.ui-copy__val { flex: 1; min-width: 0; font-family: var(--font-code); font-size: 0.9375rem; color: var(--c-ink); line-height: 1.5; word-break: break-all; }
.ui-copy__btn { flex-shrink: 0; min-height: 36px; padding: 6px 12px; border: 1px solid var(--c-line-2); border-radius: 6px; background: var(--c-surface); color: var(--c-ink); font-size: 0.875rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.ui-copy__btn:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }
.ui-copy__btn.is-done { border-color: var(--c-up-line); color: var(--c-up-ink); background: var(--c-up-tint); }
.ui-code { font-family: var(--font-code); font-size: 0.9em; padding: 1px 6px; border: 1px solid var(--c-line); border-radius: 6px; background: var(--c-band); color: var(--c-ink); word-break: break-all; }
.ui-mono { font-family: var(--font-code); word-break: break-all; }

/* ─── 긴 글 (약관·개인정보) ─── 문구는 그대로 두고 모양만. <article class="ui-prose"><p class="ui-prose__meta">…</p><p class="ui-prose__lead">…</p><h2 id="art1">제1조 …</h2>… */
.ui-prose { max-width: 760px; font-size: 1rem; line-height: 1.85; color: var(--c-ink-2); }
.ui-prose > :first-child { margin-top: 0; }
.ui-prose .ui-prose__meta, .ui-prose__meta { margin-top: 0; font-size: 0.875rem; color: var(--c-ink-3); line-height: 1.65; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.ui-prose .ui-prose__lead, .ui-prose__lead { margin-top: 0; font-size: 1.0625rem; color: var(--c-ink); line-height: 1.8; padding-bottom: 24px; margin-bottom: 8px; border-bottom: 1px solid var(--c-line); }
.ui-prose h2 { font-size: 1.25rem; font-weight: 700; color: var(--c-ink); letter-spacing: -0.015em; line-height: 1.45; margin: 44px 0 12px; }
.ui-prose h3 { font-size: 1.0625rem; font-weight: 700; color: var(--c-ink); margin: 28px 0 8px; }
.ui-prose p { margin: 10px 0; }
.ui-prose ul, .ui-prose ol { margin: 10px 0; padding-left: 1.35em; }
.ui-prose li { margin: 6px 0; padding-left: 0.2em; }
.ui-prose li::marker { color: var(--c-ink-3); }
.ui-prose strong { color: var(--c-ink); }
.ui-prose a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.ui-prose .ui-prose__note, .ui-prose .note { margin: 16px 0; padding: 14px 18px; background: var(--c-band); border: 1px solid var(--c-line); border-radius: var(--radius-sm); font-size: var(--fs-small); line-height: 1.75; }
.ui-prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: var(--fs-small); line-height: 1.6; }
.ui-prose th, .ui-prose td { padding: 10px 12px; border: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.ui-prose th { background: var(--c-band); color: var(--c-ink); font-weight: 650; }
.ui-prose .ui-table-wrap { margin: 14px 0; }
.ui-prose .ui-table-wrap table { margin: 0; }
.ui-prose .ui-table-wrap th, .ui-prose .ui-table-wrap td { border-width: 0 1px 1px 0; }
.ui-prose .ui-table-wrap tr > :last-child { border-right: 0; }
.ui-prose .ui-table-wrap tbody tr:last-child > * { border-bottom: 0; }
/* 조문 바로가기 */
.ui-toc { margin: 24px 0 8px; padding: 18px 22px; background: var(--c-band); border: 1px solid var(--c-line); border-radius: var(--radius); }
.ui-toc .ui-toc__title, .ui-toc__title { margin: 0 0 8px; font-size: 0.875rem; font-weight: 700; color: var(--c-ink); margin-bottom: 8px; }
.ui-toc ol, .ui-toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.ui-toc li { break-inside: avoid; margin: 0; padding: 3px 0; font-size: 0.9375rem; line-height: 1.55; }
.ui-toc a { color: var(--c-ink-2); text-decoration: none; }
.ui-toc a:hover { color: var(--c-accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ─── 보조 ─── */
.u-muted { color: var(--c-ink-3); }
.u-small { font-size: var(--fs-small); }
.u-xs { font-size: var(--fs-xs); }
.u-center { text-align: center; }
.u-right { text-align: right; }
.u-mt-0 { margin-top: 0 !important; }
.u-mt-8 { margin-top: 8px !important; }
.u-mt-16 { margin-top: 16px !important; }
.u-mt-24 { margin-top: 24px !important; }
.u-mt-32 { margin-top: 32px !important; }
.u-mt-48 { margin-top: 48px !important; }
.u-mb-0 { margin-bottom: 0 !important; }
.u-mb-8 { margin-bottom: 8px !important; }
.u-mb-16 { margin-bottom: 16px !important; }
.u-mb-24 { margin-bottom: 24px !important; }

/* ═══════════════════════════════════════════════════════
   예전 이름 호환 — 스크립트(js/*.js)가 만드는 마크업
   (이름은 그대로, 모양만 위 ui-* 와 같게. 새 정적 마크업에는 쓰지 말 것)
   ═══════════════════════════════════════════════════════ */
/* 불러오는 중 — leaderboard · settlements 의 .loading-spinner, 여러 페이지의 .spinner · 다시 시도 단추 .btn-secondary */
.loading-spinner { padding: 64px 0; text-align: center; color: var(--c-ink-3); font-size: var(--fs-small); }
.loading-spinner p { margin-top: 12px; color: var(--c-ink-3); }
.spinner { display: block; width: 32px; height: 32px; margin: 0 auto; border: 3px solid var(--c-line); border-top-color: var(--c-accent); border-radius: 50%; animation: ui-spin 0.8s linear infinite; }
.btn-secondary { min-height: 44px; padding: 10px 20px; background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line-2); font-size: var(--fs-small); }
.btn-secondary:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }

.rank-cell { text-align: center; min-width: 52px; font-weight: 700; }
.rank-cell.rank-medal { font-size: 1.25rem; }
.trader-name { font-weight: 600; }
.pnl-positive { color: var(--c-up); font-weight: 650; }
.pnl-negative { color: var(--c-down); font-weight: 650; }
.settlement-amount { font-weight: 650; color: var(--c-ink); }
.inactive-row > td { color: var(--c-ink-2); }
.reason-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-2); }
.lb-section-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; color: var(--c-ink); margin-bottom: 4px; }
.lb-updated { font-size: 0.875rem; color: var(--c-ink-3); margin-bottom: 14px; font-variant-numeric: tabular-nums; }

/* 배지 — leaderboard.js · settlements.js · mypage.js 의 .status-badge.<상태> */
.status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 650; line-height: 1.4; white-space: nowrap; vertical-align: middle; background: var(--c-neutral-tint); color: var(--c-ink-2); }
.status-badge.active, .status-badge.approved { background: var(--c-up-tint); color: var(--c-up-ink); }
.status-badge.pending, .status-badge.revoked { background: var(--c-warn-tint); color: var(--c-warn); }
.status-badge.failed { background: var(--c-down-tint); color: var(--c-down); }
.status-badge.given-up, .status-badge.none { background: var(--c-neutral-tint); color: var(--c-ink-2); }


/* 입력 — apply.html 정적 폼 + mypage.js · account.js 창 안 입력 (.form-row 등; apply.js 가 '.form-row input.invalid' 로 찾음) */
.form-section { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--c-line); }
.form-section:last-of-type { border-bottom: 0; padding-bottom: 0; }
.form-section-title { font-size: 1.0625rem; font-weight: 700; color: var(--c-ink); margin-bottom: 16px; }
.form-row { margin-bottom: 20px; }
.form-row > label { display: block; font-size: var(--fs-small); font-weight: 600; color: var(--c-ink); margin-bottom: 6px; line-height: 1.5; }
.form-row-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
/* :where() 로 묶어 낮은 우선순위 — 아래 :hover · :focus · .invalid 가 이길 수 있게 */
.form-row :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), select, textarea) {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--c-line-input); border-radius: var(--radius-sm);
  background: var(--c-surface); color: var(--c-ink); font-size: 1rem; line-height: 1.5; transition: border-color 0.15s;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: #6B7280; opacity: 1; }
.form-row input:hover, .form-row select:hover, .form-row textarea:hover { border-color: var(--c-ink-3); }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: 2px solid var(--c-accent); outline-offset: 0; border-color: var(--c-accent); border-radius: var(--radius-sm); }
.form-row :where(textarea) { min-height: 110px; resize: vertical; }
.form-row :where(select) { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px; background: var(--c-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%234B5563' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 12px no-repeat; }
.form-row input.mono-input { font-family: var(--font-code); font-size: 0.9375rem; }
.form-row .invalid, .form-row input.invalid, .form-row select.invalid, .form-row textarea.invalid { border-color: var(--c-down); }
.form-row .invalid:focus { outline-color: var(--c-down); }
.form-hint { margin-top: 6px; font-size: 0.875rem; color: var(--c-ink-3); line-height: 1.6; }
.form-hint strong { color: var(--c-ink-2); }
.form-error { margin-top: 6px; font-size: 0.875rem; font-weight: 500; color: var(--c-down); line-height: 1.55; opacity: 0; }
.form-error.show { opacity: 1; }
.form-error:empty { margin-top: 0; }
.form-check { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--c-line-2); border-radius: var(--radius-sm); background: var(--c-surface); cursor: pointer; font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.6; }
.form-check:hover { border-color: var(--c-accent-line); }
.form-check:has(input:checked) { border-color: var(--c-accent-line); background: #FBFEFD; }
/* 동의 칸 오류 — apply.js 가 체크 상자에 .invalid 를 붙임 (뒤따르는 .form-error 는 칸에 바짝 붙임) */
.form-check:has(input.invalid), .form-check:has(input[aria-invalid="true"]) { border-color: var(--c-down); }
.form-check + .form-error.show { margin: -2px 0 12px; }
.form-check input[type="checkbox"] { flex-shrink: 0; width: 20px; height: 20px; margin: 0.15em 0 0; accent-color: var(--c-accent); cursor: pointer; }
.form-check strong { color: var(--c-ink); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.form-actions .btn-primary { flex: 1 1 200px; }
.form-server-error, .tc-modal-server-error { padding: 12px 16px; border: 1px solid var(--c-down-line); border-left: 3px solid var(--c-down); border-radius: var(--radius-sm); background: var(--c-down-tint); color: var(--c-ink); font-size: var(--fs-small); line-height: 1.65; }
.form-server-error { margin-top: 16px; }

/* 창 — mypage.js · account.js 의 .tc-modal (열기 = .open, 제출 중 = .busy) */
.tc-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--c-scrim); opacity: 0; transition: opacity 0.18s; }
.tc-modal.open { opacity: 1; }
.tc-modal-card { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); transform: translateY(8px); transition: transform 0.18s; }
.tc-modal.open .tc-modal-card { transform: none; }
.tc-modal-danger .tc-modal-card { border-top: 3px solid var(--c-down); }
.tc-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px 24px; border-bottom: 1px solid var(--c-line); }
.tc-modal-title { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; margin: 0; }
.tc-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--c-ink-2); font-size: 1.125rem; line-height: 1; cursor: pointer; }
.tc-modal-close:hover { background: var(--c-band); color: var(--c-ink); }
.tc-modal-body { padding: 20px 24px; font-size: var(--fs-small); color: var(--c-ink-2); line-height: 1.7; }
.tc-modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 0 24px 24px; }
.tc-modal-server-error { margin: 0 24px 20px; }
.tc-modal-body .tc-modal-server-error { margin: 16px 0 0; } /* account.js 처럼 창 본문 안에 넣은 경우 */
.tc-modal.busy .tc-modal-close { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.tc-modal.busy::after { content: '처리 중 — 창을 닫지 마세요'; position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10; padding: 4px 14px; border-radius: 999px; background: var(--c-ink); color: #fff; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.tc-modal-hint { padding: 12px 16px; border: 1px solid var(--c-line); border-left: 3px solid var(--c-accent); border-radius: var(--radius-sm); background: var(--c-band); color: var(--c-ink-2); font-size: var(--fs-small); line-height: 1.7; }
.tc-modal-hint + .tc-modal-hint { margin-top: 10px; }
.tc-modal-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--radius-sm); overflow: hidden; }
.tc-modal-info-grid > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--c-surface); }
.tc-mi-label { font-size: 0.875rem; color: var(--c-ink-2); }
.tc-mi-value { font-size: var(--fs-small); font-weight: 650; color: var(--c-ink); font-variant-numeric: tabular-nums; text-align: right; }
.tc-mi-value.positive { color: var(--c-up); }
.tc-mi-value.negative { color: var(--c-down); }
.tc-mi-value.accent { color: var(--c-accent-ink); font-weight: 750; }
.tc-modal-danger-box { padding: 18px 20px; border: 1px solid var(--c-down-line); border-radius: var(--radius); background: var(--c-down-tint); }
.tc-modal-danger-icon { font-size: 1.75rem; line-height: 1; text-align: center; margin-bottom: 8px; }
.tc-modal-danger-title { text-align: center; font-size: 1rem; font-weight: 700; color: var(--c-down); margin-bottom: 12px; }
.tc-modal-danger-list { list-style: none; margin: 0; padding: 0; }
.tc-modal-danger-list li { position: relative; padding: 5px 0 5px 22px; color: var(--c-ink); font-size: var(--fs-small); line-height: 1.6; }
.tc-modal-danger-list li::before { content: '✕'; position: absolute; left: 2px; top: 5px; color: var(--c-down); font-weight: 700; font-size: 0.8125rem; }
.tc-modal-danger-list strong { color: var(--c-down); }
.tc-onboard-step { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.tc-onboard-num { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-accent-tint); color: var(--c-accent-ink); font-size: 0.875rem; font-weight: 700; }
.tc-onboard-step > div:last-child { color: var(--c-ink-2); font-size: var(--fs-small); line-height: 1.65; }
.tc-onboard-step strong { color: var(--c-ink); }
/* 알림 — mypage.js · account.js 의 .tc-toast (보이기 = .show) */
.tc-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1200; max-width: min(480px, calc(100vw - 32px)); padding: 12px 18px; background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); border-left: 3px solid var(--c-accent); border-radius: var(--radius); box-shadow: var(--shadow-pop); font-size: var(--fs-small); line-height: 1.55; opacity: 0; transform: translate(-50%, 16px); transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
.tc-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* 내 페이지 · 계정 관리 · 관리자 공통 틀 */
.mypage-section { padding: 48px 0 80px; min-height: 50vh; }
.mp-group { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--c-line); }
.mp-group-title { display: flex; align-items: center; gap: 8px; font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; color: var(--c-ink); margin-bottom: 18px; } /* 카드 제목(1.125rem)보다 한 단계 크게 */

/* ─── 공용 부품 반응형 ─── */
@media (max-width: 1024px) {
  .ui-grid--3, .ui-grid--4 { --cols: 2; }
}
@media (max-width: 640px) {
  .page-header--compact { padding: 28px 0 24px; }
  .section--tight { padding: 32px 0 56px; }
  .mypage-section { padding: 32px 0 56px; }
  .ui-grid, .ui-grid--2, .ui-grid--3, .ui-grid--4 { --cols: 1; }
  .ui-card { padding: 20px 18px; }
  .ui-card--flush { padding: 0; }
  .ui-card--tight { padding: 16px; }
  .ui-table th, .ui-table td { padding: 10px 12px; }
  .ui-table--sticky-first th:first-child, .ui-table--sticky-first td:first-child { position: sticky; left: 0; z-index: 1; background: var(--c-surface); box-shadow: 1px 0 0 var(--c-line); }
  .ui-table--sticky-first thead th:first-child { background: var(--c-band); }
  .ui-scroll-hint { display: block; }
  .ui-field-row, .form-row-group { grid-template-columns: 1fr; }
  .ui-form-actions > .btn-primary, .ui-form-actions > .btn-outline, .ui-form-actions > .btn-danger,
  .form-actions > .btn-primary, .form-actions > .btn-outline { flex: 1 1 100%; }
  .ui-modal, .tc-modal { padding: 12px; }
  .ui-modal__head, .tc-modal-header { padding: 14px 12px 12px 18px; }
  .ui-modal__body, .tc-modal-body { padding: 16px 18px; }
  .ui-modal__foot, .tc-modal-footer { padding: 0 18px 18px; }
  .ui-modal__foot > *, .tc-modal-footer > * { flex: 1 1 130px; }
  .tc-modal-info-grid { grid-template-columns: 1fr; }
  .ui-lightbox { padding: 8px; }
  .ui-lightbox__nav { width: 38px; height: 48px; }
  .ui-state { padding: 36px 18px; }
  .ui-stat { padding: 16px; }
  .ui-stat__value { font-size: 1.375rem; }
  .ui-prose h2 { font-size: 1.125rem; margin-top: 36px; }
  .ui-prose th, .ui-prose td { padding: 8px 10px; overflow-wrap: anywhere; }
  .ui-toc ol, .ui-toc ul { columns: 1; }
  .ui-toc { padding: 16px 18px; }
  /* 단계: 세로로 */
  .ui-stepper { grid-auto-flow: row; grid-auto-columns: auto; gap: 0; }
  .ui-step { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; column-gap: 12px; padding: 0 0 18px; }
  .ui-step__dot { margin-bottom: 0; }
  .ui-step__label { flex: 1; min-width: 0; }
  .ui-step__sub { flex-basis: 100%; padding-left: 44px; margin-top: 0; }
  .ui-step:not(:last-child)::after { top: 34px; bottom: 2px; left: 15px; right: auto; width: 2px; height: auto; }
  /* 표 → 줄마다 목록 모양 (옆으로 밀지 않고 읽게). <div class="ui-table-wrap ui-table-wrap--stack"><table class="ui-table ui-table--stack">
     머리줄은 화면에서만 숨기고 읽기 프로그램에는 남김. 줄 안 칸 배치(grid-template-columns/areas)는 페이지 css 가 정함
     (예: leaderboard.css · settlements.css · mypage.css). display 가 바뀌어도 표로 읽히게 표·줄·칸에 role 을 달아 두는 것을 권장 */
  .ui-table-wrap--stack { overflow: visible; }
  .ui-table--stack, .ui-table--stack tbody { display: block; width: 100%; }
  .ui-table--stack thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .ui-table--stack tr { display: grid; align-items: center; column-gap: 12px; row-gap: 2px; padding: 14px 16px; border-bottom: 1px solid var(--c-line); }
  .ui-table--stack tbody tr:last-child { border-bottom: 0; }
  .ui-table.ui-table--stack td { display: block; min-width: 0; width: auto; padding: 0; border: 0; text-align: left; line-height: 1.5; } /* .is-num 오른쪽 정렬보다 우선 — 칸별 정렬은 페이지 css 에서 */
  .ui-table--stack tbody tr:hover > td { background: none; }
  /* 탭이 한 줄에 다 안 들어가면 알약 모양으로 줄바꿈 (옆으로 밀어야 보이는 탭이 없게) */
  .ui-tabs--wrap { flex-wrap: wrap; gap: 6px; overflow: visible; box-shadow: none; }
  .ui-tabs--wrap .ui-tab { min-height: 40px; padding: 8px 14px; border: 1px solid var(--c-line-2); border-radius: 999px; background: var(--c-surface); }
  .ui-tabs--wrap .ui-tab[aria-selected="true"], .ui-tabs--wrap .ui-tab.is-active, .ui-tabs--wrap .ui-tab.on { background: var(--c-accent-tint); border-color: var(--c-accent-line); }
}
@media (max-width: 420px) {
  .ui-kv > div { grid-template-columns: 1fr; gap: 0; }
}
