/* 코인덕 뉴스레터 v4 — 매거진 톤 다크 (R2 적대적 리뷰 fix 반영)
   폰트: Paperlogy(헤딩 임팩트) + Freesentation(본문 가독)
   영감: frontend-slides Vintage Editorial + Bold Signal */

/* ── Freesentation Variable Font ── */
@font-face {
  font-family: 'Freesentation';
  src: url('fonts/FreesentationVF.ttf') format('truetype-variations'),
       url('fonts/FreesentationVF.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

/* ── Paperlogy ── */
@font-face { font-family: 'Paperlogy'; font-weight: 900; src: url('fonts/Paperlogy-Black.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'Paperlogy'; font-weight: 800; src: url('fonts/Paperlogy-ExtraBold.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'Paperlogy'; font-weight: 700; src: url('fonts/Paperlogy-Bold.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'Paperlogy'; font-weight: 400; src: url('fonts/Paperlogy-Regular.woff2') format('woff2'); font-display: block; }

:root {
  --bg:          #0d1117;
  --bg-elev:     #161b22;
  --bg-elev-2:   #1c2230;
  --bg-hover:    #1f242c;
  --border:      #2a3140;
  --border-soft: #1c2230;

  --text:        #f0f6fc;
  --text-dim:    #c4ccd6;
  --text-soft:   #a8b2be;            /* R2 fix: WCAG 대비 개선 (#9aa3b0 → #a8b2be) */
  --text-muted:  #7e8c9a;            /* R3.1 fix: WCAG AA 4.5:1 달성 (#6e7a89 3.8:1 → #7e8c9a 4.6:1) */

  --accent:      #f59e0b;
  --accent-deep: #b45309;
  --accent-soft: #f59e0b1a;
  --accent-glow: #f59e0b40;
  --link:        #79b8ff;
  --good:        #56d364;
  --bad:         #ff7b72;

  --rule:        rgba(245, 158, 11, 0.4);
  --rule-soft:   rgba(255, 255, 255, 0.06);

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;

  --font-heading: 'Paperlogy', 'Freesentation', "Pretendard", system-ui, sans-serif;
  --font-body:    'Freesentation', 'Paperlogy', "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;          /* 한국어 어절 보존 */
  overflow-wrap: break-word;
  letter-spacing: 0;
  word-spacing: 0.04em;
}

/* ─── 한국어 줄바꿈 — 헤딩(balance) + 본문(pretty) ─── */
h1, h2, h3, h4,
.letter-card .title,
.letter-hero .deck,
.top-story .lede,
.letter-footer .sign-off {
  text-wrap: balance;            /* 헤딩·중간 헤드라인 — 줄 균형 자동 */
}

p, .bite p, .top-story p, .bullet-list .item {
  text-wrap: pretty;             /* 본문 — 마지막 줄 고아 단어 방지 */
}

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

/* ─── 헤더 ─────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.92);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  max-width: 1080px; margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-header .brand-wrap { display: flex; align-items: baseline; gap: 12px; }
.site-header .brand {
  font-family: var(--font-heading);
  font-size: 23px; font-weight: 800;
  letter-spacing: 0.005em;
  color: var(--text);
}
.site-header .brand .accent { color: var(--accent); }
.site-header .brand-tag {
  /* R1 fix: 매체감 — 영문 tagline */
  font-family: var(--font-body);
  font-variation-settings: "wght" 500;
  font-size: 11px; color: var(--text-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-header nav { display: flex; gap: 28px; }
.site-header nav a {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  color: var(--text-dim);
  font-variation-settings: "wght" 600;
  transition: color .15s;
}
.site-header nav a:hover { color: var(--accent); }
.site-header nav a.active { color: var(--text); border-bottom: 2px solid var(--accent); padding-bottom: 4px; }

/* ─── 메인 컨테이너 ──────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 32px 120px;
}
.container.narrow { max-width: 760px; padding-left: 48px; padding-right: 48px; }

/* ─── 목록 페이지 (letterlist) ─────────────────────── */
.list-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 56px; padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.list-head h1 {
  font-family: var(--font-heading);
  font-size: 44px; font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.32;
  word-spacing: 0.06em;
}
.list-head h1 .accent { color: var(--accent); }
.list-head .meta {
  font-family: var(--font-body);
  font-variation-settings: "wght" 600;
  font-size: 13px; color: var(--text-soft);
  letter-spacing: 0.04em;
}

.list-filters {
  display: flex; gap: 12px;
  margin-bottom: 36px;
}
.list-filters select, .list-filters input {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font-body);
  font-variation-settings: "wght" 500;
}
.list-filters .search { flex: 1; max-width: 240px; }

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.letter-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s, background .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.letter-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.letter-card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--border-soft);
  overflow: hidden;
}
.letter-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.letter-card:hover .thumb img { transform: scale(1.04); }
.letter-card .body { padding: 24px 24px 28px; flex: 1; display: flex; flex-direction: column; }
.letter-card .date {
  font-family: var(--font-body);
  font-variation-settings: "wght" 700;
  font-size: 12px; color: var(--text-soft);
  letter-spacing: 0.12em; margin-bottom: 10px;
}
.letter-card .title {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700;
  line-height: 1.55; color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0;
  word-spacing: 0.04em;
}
.letter-card .excerpt {
  font-family: var(--font-body);
  font-variation-settings: "wght" 400;
  font-size: 14px; color: var(--text-dim);
  line-height: 1.7; flex: 1;
}
.letter-card .tags { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.letter-card .tag {
  font-variation-settings: "wght" 600;
  font-size: 11px; color: var(--text-soft);
  border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 4px;
  letter-spacing: 0.04em;
}

/* ─── 상세 페이지 — Vintage Editorial 톤 ──────────────────── */
.letter-hero {
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  position: relative;
  /* R1 fix: hero 좌측 vertical rule (매거진 단 분리감) */
  padding-left: 24px;
  border-left: 3px solid var(--accent);
}
.letter-hero .issue {
  font-family: var(--font-body);
  font-variation-settings: "wght" 700;
  font-size: 12px; letter-spacing: 0.18em;     /* R1 fix: 0.28em → 0.18em */
  color: var(--accent);
  margin-bottom: 18px;
}
.letter-hero h1 {
  font-family: var(--font-heading);
  font-size: 48px; font-weight: 800;             /* R2 fix: 44 → 48 (h2 34와 격차 확보) */
  line-height: 1.42;
  letter-spacing: 0.012em;
  word-spacing: 0.1em;
  margin-bottom: 28px;
}
.letter-hero .deck {
  font-family: var(--font-body);
  font-variation-settings: "wght" 400;
  font-size: 18px;                              /* R1 fix: 20px → 18px (단계 분리) */
  color: var(--text-soft);                      /* R1 fix: text-dim → text-soft (위계 명확) */
  line-height: 1.8;
  max-width: 560px;                             /* R1 fix: 640px → 560px (더 잡지스러운 단) */
  word-spacing: 0.04em;
}
.letter-hero .meta {
  margin-top: 24px; font-size: 13px;
  display: flex; gap: 18px; flex-wrap: wrap;
  font-variation-settings: "wght" 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
.letter-hero .meta .dot { color: var(--border); }
/* R1 fix: 다이아몬드 ◆ 제거 (어색했음). 좌측 vertical rule로 대체됨 */

/* 2026-05-25 추가: 카드뉴스 이미지 임베드용 — hero 위 커버 + top-story 위 본문 이미지 */
.letter-hero .hero-cover {
  margin: 28px 0 24px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface, #1a1a1a);
}
.letter-hero .hero-cover img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
}
.top-story .story-image {
  margin: 0 0 28px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface, #1a1a1a);
}
.top-story .story-image img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
}

/* 톱 스토리 섹션 */
.top-story {
  margin: 80px 0;
  padding-top: 24px;                            /* R1 fix: hero 직후 첫 top-story 호흡 */
  position: relative;
}
.top-story + .top-story {
  border-top: 1px solid var(--border);
  padding-top: 56px;                            /* R1 fix: 72px → 56px (비대칭 해소) */
  margin-top: 64px;
}

/* R1 fix: 섹션 번호 — opacity 0.12 → 0.18, font-size 100 → 132 (의도성 강화) */
.top-story .section-no {
  font-family: var(--font-heading);
  font-size: 132px; font-weight: 900;
  line-height: 0.85; color: var(--accent);
  opacity: 0.16;
  position: absolute; top: -16px; right: -8px;
  pointer-events: none;
  letter-spacing: -0.05em;
}

.top-story .badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading);             /* R1 fix: badge를 Paperlogy로 통일 */
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.2em;                        /* R1 fix: 0.24em → 0.2em */
  color: var(--accent);
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.top-story .badge::before {
  content: ''; width: 24px; height: 2px;
  background: var(--accent);
}
.top-story h2 {
  font-family: var(--font-heading);
  font-size: 34px;                              /* R1 fix: 30 → 34 (위계 명확) */
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.012em;
  word-spacing: 0.1em;
  margin-bottom: 26px;
  position: relative; z-index: 1;
}
.top-story .lede {
  font-family: var(--font-body);
  font-variation-settings: "wght" 600;
  font-size: 18px; color: var(--text);
  line-height: 1.78;
  margin-bottom: 32px;
  border-left: 2px solid var(--accent);          /* R2 fix: 3 → 2 (hero·bullet 3px와 차등) */
  padding-left: 22px;
  word-spacing: 0.04em;
}
.top-story p {
  font-family: var(--font-body);
  font-variation-settings: "wght" 400;
  font-size: 17px;
  line-height: 1.88;                            /* R1 fix: 2.05 → 1.88 (한국어 매거진 기준) */
  color: var(--text-dim);
  margin-bottom: 22px;
  word-spacing: 0.04em;
}

.top-story strong, .top-story b {
  color: var(--text);
  font-variation-settings: "wght" 700;
}
.top-story em.amber {
  color: var(--text);                           /* R1 fix: amber 절제 — text로 변경 + underline */
  font-style: normal;
  font-variation-settings: "wght" 700;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}

.bullet-list {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);          /* R1 fix: 좌측 amber line 추가 */
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 30px 0;
}
.bullet-list .item {
  font-family: var(--font-body);
  font-variation-settings: "wght" 400;
  font-size: 15px; line-height: 1.95;           /* R1 fix: 1.8 → 1.95 */
  color: var(--text-dim);
  padding: 8px 0;
  display: flex; gap: 14px;
}
.bullet-list .item::before {
  content: "▸";
  font-family: var(--font-heading);
  color: var(--text-soft);                      /* R1 fix: amber → text-soft (amber 절제) */
  flex-shrink: 0; font-weight: 900;
}
.bullet-list .item b {
  color: var(--text);
  font-variation-settings: "wght" 700;           /* R1 fix: 명시적 wght 700 */
}

/* 한입 뉴스 */
.bites { margin: 96px 0; padding-bottom: 24px; border-bottom: 1px solid var(--border); }   /* R2 fix: bites-market divider */
.bites .section-head {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 16px; margin-bottom: 40px;     /* R1 fix: 32 → 40 */
  position: relative;
}
.bites .section-head::after {
  content: '';
  position: absolute; bottom: -2px; left: 60px; right: 0;
  border-bottom: 2px solid var(--border);
  pointer-events: none;
}
.bites h3 {
  font-family: var(--font-heading);
  font-size: 26px; font-weight: 800;
  letter-spacing: 0;
  line-height: 1.4;
}
.bites .section-head .count {
  font-family: var(--font-body);
  font-variation-settings: "wght" 700;
  font-size: 13px; color: var(--text-soft);
}

.bite {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.bite:last-child { border-bottom: none; }
/* R1 fix: amber 점 마커 제거 — overuse 방지 */

.bite h4 {
  font-family: var(--font-heading);
  font-size: 19px;                              /* R1 fix: 18 → 19 (h2 34 사이 위계) */
  font-weight: 700;
  color: var(--text);
  line-height: 1.55; margin-bottom: 12px;
  letter-spacing: 0;
  word-spacing: 0.04em;
}
.bite p {
  font-family: var(--font-body);
  font-variation-settings: "wght" 400;
  font-size: 15px;
  line-height: 1.82;                            /* R1 fix: 1.95 → 1.82 (매거진 기준) */
  color: var(--text-dim);
  word-spacing: 0.04em;
}

/* 마켓 데이터 */
.market {
  margin: 96px 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  position: relative;
}
/* R1 fix: 마켓 좌측 amber 바 제거 — bullet-list와 중복, amber 절제 */
.market h3 {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 0;
  line-height: 1.4;
}
.market .timestamp {
  font-family: var(--font-body);
  font-variation-settings: "wght" 600;
  font-size: 12px; color: var(--text-soft);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}
.market .price-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.market .price-cell .label {
  font-family: var(--font-body);
  font-variation-settings: "wght" 700;
  font-size: 11px; color: var(--text-soft);
  margin-bottom: 10px; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.market .price-cell .value {
  font-family: var(--font-heading);
  font-size: clamp(18px, 2vw, 24px);            /* R3.1 fix: clamp — 모바일 2열 잘림 방지 */
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.market .price-cell .sub {
  font-family: var(--font-body);
  font-variation-settings: "wght" 500;
  font-size: 13px; color: var(--text-soft);     /* R2 fix: 12 → 13 ($표기 가독성) */
  margin-top: 8px;
}
.market .price-cell .value.bad { color: var(--bad); }
.market .price-cell .value.good { color: var(--good); }

.exchange-table {
  font-family: var(--font-body);
  font-variation-settings: "wght" 400;
  font-size: 13px; line-height: 1.9;
  color: var(--text-dim);
}
.exchange-table .row {
  display: grid; grid-template-columns: 120px 1fr;
  gap: 16px; padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.exchange-table .row:last-child { border-bottom: none; }
.exchange-table .row .ex {
  font-family: var(--font-heading);
  color: var(--text);
  font-weight: 800;                              /* R3.1 fix: 이중 선언 정리 (font-variation-settings 제거) */
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* R3.1 fix: 인라인 style 제거용 클래스 — exchange-table·events 위 작은 라벨 */
.market .section-label {
  font-family: var(--font-body);
  font-variation-settings: "wght" 700;
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.events { margin-top: 32px; }
.events h4 {
  font-family: var(--font-body);
  font-variation-settings: "wght" 800;
  font-size: 12px; color: var(--text-soft);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.events .event {
  font-family: var(--font-body);
  font-variation-settings: "wght" 400;
  font-size: 13px; padding: 10px 0;
  display: grid; grid-template-columns: 140px 1fr;
  gap: 14px; color: var(--text-dim);
  border-bottom: 1px solid var(--rule-soft);
}
.events .event:last-child { border-bottom: none; }
.events .event .when {
  font-variation-settings: "wght" 700;
  color: var(--text-soft);                      /* R1 fix: amber → text-soft (amber 절제) */
  font-size: 12px;
}

/* 푸터 */
.letter-footer {
  margin-top: 112px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.letter-footer .sign-off {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
  letter-spacing: 0;
  line-height: 1.5;
  word-spacing: 0.06em;
}
.letter-footer .cta {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 800; font-size: 15px;
  letter-spacing: 0.02em;
  margin-bottom: 32px;
  transition: transform .15s, box-shadow .15s;
}
.letter-footer .cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.letter-footer .disclaimer {
  font-family: var(--font-body);
  font-variation-settings: "wght" 400;
  font-size: 12px; color: var(--text-muted);
  max-width: 480px; margin: 0 auto;
  line-height: 1.85;
}

/* ─── 반응형 — 모바일 ─────────────────────── */
@media (max-width: 720px) {
  html, body { font-size: 16px; line-height: 1.9; word-spacing: 0.05em; }

  .site-header .wrap { padding: 14px 18px; }
  .site-header .brand { font-size: 18px; letter-spacing: 0.01em; }
  .site-header .brand-tag { display: none; }
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: 13px; }

  .container { padding: 36px 22px 80px; }
  .container.narrow { padding-left: 24px; padding-right: 24px; }

  .list-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 36px; }
  .list-head h1 { font-size: 30px; line-height: 1.45; letter-spacing: 0; word-spacing: 0.06em; }
  .letter-grid { grid-template-columns: 1fr; gap: 18px; }
  .letter-card .body { padding: 20px 20px 24px; }
  .letter-card .title { font-size: 18px; line-height: 1.6; letter-spacing: 0; word-spacing: 0.04em; }

  /* R2 fix: 모바일 hero — border-left → border-top (기울어짐 해소) */
  .letter-hero {
    padding-bottom: 36px; margin-bottom: 48px;
    padding-left: 0;
    border-left: 0;
    padding-top: 18px;
    border-top: 3px solid var(--accent);
  }
  .letter-hero .issue { font-size: 11px; margin-bottom: 14px; letter-spacing: 0.16em; }
  .letter-hero h1 {
    /* R2 fix: 자간·단어자간 조여 4줄 수렴 */
    font-size: 22px;
    line-height: 1.55;
    margin-bottom: 22px;
    letter-spacing: 0;
    word-spacing: 0.04em;
  }
  .letter-hero .deck { font-size: 15px; line-height: 1.78; word-spacing: 0.05em; }
  .letter-hero .meta { gap: 10px; font-size: 12px; }

  .top-story { margin: 56px 0; padding-top: 12px; }
  .top-story + .top-story { padding-top: 44px; margin-top: 44px; }
  .top-story .section-no { font-size: 92px; opacity: 0.13; top: -8px; right: -4px; }
  .top-story h2 {
    font-size: 22px;
    line-height: 1.6;
    margin-bottom: 20px;
    letter-spacing: 0.012em;
    word-spacing: 0.08em;
  }
  .top-story .lede { font-size: 16px; line-height: 1.78; margin-bottom: 26px; padding-left: 16px; word-spacing: 0.04em; }
  .top-story p { font-size: 16px; line-height: 1.92; margin-bottom: 22px; word-spacing: 0.05em; }

  .bullet-list { padding: 22px 22px; margin: 24px 0; }
  .bullet-list .item { font-size: 14px; line-height: 1.95; padding: 11px 0; }

  .bites { margin: 64px 0; }
  .bites .section-head { padding-bottom: 14px; margin-bottom: 24px; }
  .bites h3 { font-size: 22px; line-height: 1.45; }
  .bite { padding: 24px 0; }
  .bite h4 { font-size: 17px; line-height: 1.6; margin-bottom: 10px; letter-spacing: 0; word-spacing: 0.04em; }
  .bite p { font-size: 14.5px; line-height: 1.78; word-spacing: 0.04em; }  /* R2 fix: 1.88 → 1.78 */

  .market { padding: 28px 22px; margin: 64px 0; border-radius: 14px; }
  .market h3 { font-size: 20px; }
  .market .price-row { grid-template-columns: repeat(2, 1fr); gap: 18px; padding-bottom: 22px; margin-bottom: 24px; }
  .market .price-cell .value { font-size: 22px; }
  .market .price-cell .sub { margin-top: 6px; }
  .exchange-table .row { grid-template-columns: 90px 1fr; gap: 10px; font-size: 13px; line-height: 1.85; padding: 10px 0; }
  .events .event { grid-template-columns: 110px 1fr; gap: 10px; font-size: 13px; padding: 10px 0; line-height: 1.7; }

  .letter-footer { margin-top: 76px; padding-top: 36px; }
  .letter-footer .sign-off { font-size: 20px; margin-bottom: 22px; }
  .letter-footer .cta { padding: 13px 26px; font-size: 14px; margin-bottom: 26px; }
}

@media (max-width: 380px) {
  html, body { font-size: 15px; }
  .letter-hero h1 { font-size: 21px; }
  .top-story h2 { font-size: 21px; }
  .top-story p { font-size: 15px; }
  .bite h4 { font-size: 16px; }
  .bite p { font-size: 13.5px; }
  .market .price-cell .value { font-size: 20px; }
  .exchange-table .row { grid-template-columns: 80px 1fr; font-size: 12.5px; }
}

/* ─── 통합 topbar — 백서 사이트와 동일한 다크 헤더 (2026-05-26 재추가) ───
   자동 발행 시에도 보존되도록 testbed에 영구 등록. */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar .brand {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 6px; border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-body);
}
.topbar .brand:hover { background: var(--bg-hover); }
.topbar .brand .logo { font-size: 18px; }
.topbar .brand .title { font-weight: 700; font-size: 16px; color: var(--text); }
.topbar .brand .subtitle { color: var(--text-dim); font-size: 12px; }
.topnav { display: flex; gap: 6px; flex: 1; margin-left: 14px; }
.topnav .nav-link {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
  letter-spacing: -0.2px; color: var(--text-dim); text-decoration: none;
  border: 1px solid var(--border); background: var(--bg);
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; box-shadow: 0 1px 0 rgba(0,0,0,.2);
  font-family: var(--font-body); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.topnav .nav-link:hover {
  background: var(--bg-hover); color: var(--text); border-color: var(--accent);
  transform: translateY(-1px);
}
.topnav .nav-link.active {
  background: var(--accent-soft);
  color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 2px 8px var(--accent-glow);
}
.mobile-tabbar { display: none; }
.site-header { display: none !important; }  /* legacy */

@media (max-width: 720px) {
  .topbar { padding: 6px 12px; gap: 8px; min-height: 44px; }
  .topbar .brand {
    padding: 2px 4px; gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Pretendard,
                 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  }
  .topbar .brand .subtitle { display: none; }
  .topbar .brand .title { font-size: 14px; font-weight: 700; }
  .topbar .brand .logo { font-size: 16px; }
  .topnav { display: none; }
  .mobile-tabbar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-elev); border-top: 1px solid var(--border);
    z-index: 100;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  }
  .mobile-tabbar .mtab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 2px; color: #a8b2bd; text-decoration: none;
    transition: color .15s;
  }
  .mobile-tabbar .mtab:hover,
  .mobile-tabbar .mtab:focus-visible,
  .mobile-tabbar .mtab.active { color: #79b8ff; }
  .mobile-tabbar .mtab-icon { font-size: 18px; line-height: 1; }
  .mobile-tabbar .mtab-label { font-size: 10px; font-weight: 600; letter-spacing: -0.2px; }
  .container { padding-bottom: 90px; }
}

/* ═══ 라이트 테마 + 글로벌 nav chrome 보강 (생성페이지 이식, 2026-06-02) ═══
   생성페이지(코인·뉴스레터·뉴스룸·listing)는 홈 SPA의 2그룹 드롭다운 nav를 쓰지만
   이 시트엔 .nav-group/.ic/라이트 블록이 없어 아이콘 거대화 + 화이트 모드 미동작이었다.
   (1) 라이트 팔레트(맑은 앰버 amber-600 #d97706 + slate 중립) (2) nav chrome 보강. */

/* (1) 라이트 팔레트 — 홈과 동일 색배합 */
[data-theme="light"]{
  /* 라이트 = 블루(홈 style.css 와 동일 색배합). 2026-06-03 B 적용. 다크(:root)는 앰버 유지 */
  --bg:#f8fafc; --bg-elev:#ffffff; --bg-elev-2:#f1f4f8; --bg-hover:#f1f4f8;
  --border:#e3e7ed; --border-soft:#edf0f4; --surface:#ffffff;
  --text:#18212f; --text-dim:#4a5567; --text-soft:#586273; --text-muted:#7e8898;
  --accent:#0062df; --accent-deep:#004cad;
  --accent-soft:rgba(0,98,223,.10); --accent-glow:rgba(0,98,223,.16);
  --link:#0062df; --good:#0f9d6b; --bad:#dd3c44;
  --rule:rgba(0,98,223,.30); --rule-soft:rgba(16,24,40,.08);
}

/* (2) 글로벌 nav chrome — 홈 SPA와 동일(드롭다운 + SVG 아이콘 + 테마 토글) */
/* ⚠️ SYNC: nav chrome 폰트 = 홈과 동일(Pretendard). 페이지 본문 폰트(Freesentation/Paperlogy) 상속 차단 —
   이게 탭바 폰트가 페이지마다 다르던 구조적 원인이었음(2026-06-02). site/style.css 와 동일 유지. */
.topbar, .mobile-tabbar { font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; }
.topbar .brand .logo-ic{ width:1.15em; height:1.15em; color:var(--accent); vertical-align:-.15em; }
.ic{ width:1.1em; height:1.1em; display:inline-block; vertical-align:-.15em; flex:0 0 auto; }
.topnav{ align-items:center; }
.nav-group{ position:relative; }
.nav-gbtn{ display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:9px; border:1px solid transparent; background:transparent; color:var(--text-dim); font-weight:700; font-size:13px; letter-spacing:-.2px; cursor:pointer; font-family:inherit; white-space:nowrap; }
.nav-gbtn .ic{ color:var(--accent); }
.nav-gbtn .caret{ width:.8em; height:.8em; opacity:.55; transition:transform .15s; }
.nav-group:hover .nav-gbtn, .nav-group.open .nav-gbtn, .nav-gbtn.active{ background:var(--accent-soft); color:var(--accent); border-color:var(--accent); }
.nav-group.open .caret{ transform:rotate(90deg); }
.nav-dropdown{ display:none; position:absolute; top:calc(100% + 8px); left:0; min-width:250px; background:var(--bg-elev); border:1px solid var(--border); border-radius:12px; box-shadow:0 12px 32px rgba(16,24,40,.20); padding:7px; z-index:60; }
.nav-group:hover .nav-dropdown, .nav-group.open .nav-dropdown{ display:block; }
.nav-dropdown a{ display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:8px; color:var(--text); text-decoration:none; font-size:13.5px; font-weight:600; white-space:nowrap; }
.nav-dropdown a .ic{ width:1.15em; height:1.15em; color:var(--accent); }
.nav-dropdown a small{ margin-left:auto; color:var(--text-muted); font-weight:500; font-size:11.5px; padding-left:12px; }
.nav-dropdown a:hover{ background:var(--accent-soft); }
.nav-dropdown a.active{ background:var(--accent-soft); color:var(--accent); }
/* ⚠️ SYNC: 헤더 액션 버튼(의견·테마) — site/style.css 와 동일 유지(아이콘+라벨 세로, 동일 크기). */
.header-icon,.theme-toggle{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:52px;height:48px;padding:4px 8px;border-radius:10px;border:1px solid var(--border);background:transparent;color:var(--text-dim);text-decoration:none;cursor:pointer;line-height:1;transition:color .15s,border-color .15s,background .15s;flex:0 0 auto;}
.header-icon .ic,.theme-toggle .ic{width:19px;height:19px;}
.header-icon .hi-label,.theme-toggle .hi-label{font-size:9px;font-weight:600;line-height:1;white-space:nowrap;letter-spacing:-0.2px;}
.header-icon:hover,.header-icon.active,.theme-toggle:hover{color:var(--accent);border-color:var(--accent);}
.mobile-tabbar .mtab-icon .ic{ width:1.35em; height:1.35em; vertical-align:middle; }   /* 홈과 동일 아이콘 크기·정렬 */
@media (max-width:700px){ .nav-gbtn{ padding:6px 10px; font-size:12px; } }
