:root {
  --brand1: #f59e0b;
  --brand2: #f97316;
  --brand3: #ef4444;
  --grad: linear-gradient(135deg, var(--brand1), var(--brand2) 55%, var(--brand3));
  --up: #ef4444;
  --down: #2563eb;
  --new: #f97316;

  --bg: #f6f7f9;
  --bg-soft: #eef0f4;
  --card: #ffffff;
  --line: #e9ebf0;
  --line-soft: #f1f2f6;
  --text: #171a21;
  --text-2: #4a5160;
  --muted: #9298a6;
  --shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 6px 20px rgba(20, 24, 40, .05);
  --shadow-lg: 0 8px 30px rgba(20, 24, 40, .10);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 62px;
}
html[data-theme="dark"] {
  --bg: #0f1116;
  --bg-soft: #151821;
  --card: #191c24;
  --line: #262b36;
  --line-soft: #21252f;
  --text: #eef1f6;
  --text-2: #b8bfcc;
  --muted: #7d8595;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.28);
  --shadow-lg: 0 10px 34px rgba(0,0,0,.4);
  --up: #f87171;
  --down: #60a5fa;
}

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

/* 글자 크기(화면 전체 확대) — 고령자/저시력 배려 */
html[data-fs="2"] body { zoom: 1.15; }
html[data-fs="3"] body { zoom: 1.32; }

/* 키보드 포커스 표시(접근성) */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand2) 65%, transparent); outline-offset: 2px; border-radius: 6px; }

/* 모션 최소화 선호 시 애니메이션 끔 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  transition: background .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.ic { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ── 헤더 ── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; color: #fff; box-shadow: 0 3px 10px rgba(239, 68, 68, .28);
}
.logo-mark .ic { width: 20px; height: 20px; }
.logo { min-width: 0; }
.logo-word { min-width: 0; }
.logo-word b { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.logo-short { display: none; }
.beta { font-size: 9px; font-weight: 800; color: var(--brand2); margin-left: 3px; vertical-align: super; letter-spacing: .02em; text-transform: lowercase; }
.live-pill {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 4px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand3); background: color-mix(in srgb, var(--brand3) 12%, transparent);
  padding: 3px 8px; border-radius: 999px;
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand3); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(.8)} }
.header-actions { display: flex; align-items: center; gap: 8px; }
.select-wrap {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 10px;
  height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  color: var(--text-2); cursor: pointer;
}
.select-wrap:hover { border-color: color-mix(in srgb, var(--brand2) 50%, var(--line)); }
.select-wrap select {
  border: none; background: transparent; color: var(--text); font: inherit; font-size: 13.5px;
  font-weight: 600; cursor: pointer; padding: 0 2px; outline: none;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text-2); cursor: pointer; position: relative;
  display: grid; place-items: center; transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: color-mix(in srgb, var(--brand2) 50%, var(--line)); color: var(--brand2); }
.icon-btn.sm { width: 30px; height: 30px; border: none; font-size: 15px; }
.icon-btn .ic-moon { display: none; }
html[data-theme="dark"] .icon-btn .ic-sun { display: none; }
html[data-theme="dark"] .icon-btn .ic-moon { display: block; }

/* ── 페이지 ── */
.page { padding: 30px 20px 60px; }
.hero { text-align: center; margin-bottom: 26px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700;
  color: var(--brand2); background: color-mix(in srgb, var(--brand2) 10%, transparent);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 14px;
}
.hero-badge .ic { width: 15px; height: 15px; }
.hero-title { margin: 0; font-size: 34px; font-weight: 850; letter-spacing: -0.035em; }
.hero-desc { margin: 10px auto 0; max-width: 560px; color: var(--text-2); font-size: 15px; }
.hero-search {
  display: flex; align-items: center; gap: 8px; max-width: 560px; margin: 20px auto 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 14px;
  box-shadow: var(--shadow); transition: border-color .18s, box-shadow .18s;
}
.hero-search:focus-within { border-color: color-mix(in srgb, var(--brand2) 55%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand2) 14%, transparent); }
.hero-search > .ic { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.hero-search input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font: inherit; font-size: 15px; color: var(--text); padding: 8px 2px;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-btn {
  flex-shrink: 0; font: inherit; font-size: 14px; font-weight: 700; color: #fff; border: none; cursor: pointer;
  background: var(--grad); border-radius: 10px; padding: 10px 20px; min-height: 42px;
}
.search-btn:hover { filter: brightness(1.05); }

.layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: calc(var(--header-h) + 22px); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.rank-card, .news-card { padding: 22px 24px 26px; }
.card-head { margin-bottom: 16px; }
.card-head.compact { margin-bottom: 14px; }
.card-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.025em; }
.card-title.sm { font-size: 15.5px; }
.card-sub { margin: 5px 0 0; font-size: 13px; color: var(--muted); }

/* ── 툴바 ── */
.rank-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.clock-wrap { display: inline-flex; align-items: center; gap: 8px; }
.clock-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px color-mix(in srgb, #22c55e 22%, transparent); }
.clock { font-size: 13.5px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.toolbar-btns { display: flex; gap: 8px; }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-2); background: var(--bg-soft); border: 1px solid transparent; border-radius: 10px;
  padding: 8px 12px; cursor: pointer; transition: color .2s, background .2s;
}
.ghost-btn:hover { color: var(--brand2); background: color-mix(in srgb, var(--brand2) 9%, var(--bg-soft)); }
.ghost-btn .ic { width: 15px; height: 15px; }
.countdown { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; min-width: 26px; }

/* ── 탭 ── */
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.tab {
  display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; color: var(--text-2);
  border: 1px solid var(--line); background: var(--card); transition: all .18s ease;
}
.tab:hover { border-color: color-mix(in srgb, var(--brand2) 45%, var(--line)); color: var(--text); }
.tab.active { color: #fff; border-color: transparent; background: var(--grad); box-shadow: 0 4px 12px rgba(239,68,68,.24); font-weight: 700; }
.tab .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.tab.live .dot { background: #22c55e; }
.tab.active .dot { background: rgba(255,255,255,.9); }

.rank-status { font-size: 12.5px; color: var(--muted); min-height: 18px; margin-bottom: 10px; }

/* ── 순위 리스트 ── */
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 34px; }
.rank-item {
  display: flex; align-items: center; gap: 13px; padding: 13px 10px; border-radius: 10px; min-height: 52px;
  border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .15s ease;
}
.rank-item:hover, .rank-item:focus-visible { background: var(--bg-soft); }
.rank-item:hover .rank-kw { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--brand2) 60%, transparent); }
.rank-num { width: 20px; text-align: center; font-weight: 800; font-size: 15px; color: var(--text-2); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rank-item.top .rank-num { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.rank-body { flex: 1; min-width: 0; }
.rank-kw { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.rank-meta { display: flex; align-items: center; gap: 7px; margin-top: 2px; }
.vol { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--brand2); background: color-mix(in srgb, var(--brand2) 11%, transparent); padding: 1px 7px 1px 5px; border-radius: 999px; }
.vol .ic { width: 11px; height: 11px; }
.src-badges { display: inline-flex; gap: 3px; }
.src-badges .b { font-size: 10px; font-weight: 700; color: var(--muted); background: var(--bg-soft); padding: 1px 5px; border-radius: 5px; }
.rank-change { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 800; flex-shrink: 0; min-width: 30px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.rank-change .ic { width: 13px; height: 13px; }
.rank-change.up { color: var(--up); }
.rank-change.down { color: var(--down); }
.rank-change.same { color: var(--muted); }
.rank-change.new { color: var(--new); font-size: 10px; letter-spacing: .03em; }
.kw-go { width: 16px; height: 16px; color: var(--muted); opacity: .38; transition: opacity .15s, color .15s; }
.rank-item:hover .kw-go, .rank-item:focus-visible .kw-go { opacity: 1; color: var(--brand2); }

/* ── 뉴스 ── */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.news-item { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.news-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand2) 35%, var(--line)); }
.news-thumb { aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; position: relative; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-kw { position: absolute; left: 8px; top: 8px; font-size: 10.5px; font-weight: 800; color: #fff; background: rgba(17,20,27,.66); backdrop-filter: blur(4px); padding: 3px 8px; border-radius: 999px; }
.news-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.news-title { font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-src { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: auto; display: inline-flex; align-items: center; gap: 4px; }
.news-src .ic { width: 12px; height: 12px; }

/* ── 사이드 ── */
.brand-card { padding: 24px; text-align: center; }
.brand-mark { width: 52px; height: 52px; border-radius: 15px; background: var(--grad); display: inline-grid; place-items: center; color: #fff; box-shadow: 0 6px 18px rgba(239,68,68,.28); margin-bottom: 14px; }
.brand-mark .ic { width: 28px; height: 28px; }
.brand-name { font-weight: 800; font-size: 16.5px; letter-spacing: -0.02em; }
.brand-slogan { font-size: 13px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
.brand-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.solid-btn, .line-btn {
  font: inherit; font-size: 14px; font-weight: 700; padding: 12px; border-radius: 12px; cursor: pointer; transition: all .18s ease;
}
.solid-btn { color: #fff; border: none; background: var(--grad); box-shadow: 0 5px 14px rgba(239,68,68,.24); }
.solid-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.solid-btn.full { width: 100%; margin-top: 4px; }
.line-btn { color: var(--text-2); background: var(--card); border: 1px solid var(--line); }
.line-btn:hover { border-color: color-mix(in srgb, var(--brand2) 45%, var(--line)); color: var(--brand2); }

.status-card { padding: 20px; }
.source-list { display: flex; flex-direction: column; gap: 8px; }
.src-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; background: var(--bg-soft); }
.src-name { font-weight: 700; font-size: 13.5px; width: 58px; flex-shrink: 0; }
.src-lead { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.src-tag { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; flex-shrink: 0; }
.src-tag.live { color: #15803d; background: color-mix(in srgb, #22c55e 16%, transparent); }
.src-tag.mock { color: #b45309; background: color-mix(in srgb, #f59e0b 18%, transparent); }
.src-tag.derived { color: #2563eb; background: color-mix(in srgb, #3b82f6 15%, transparent); }
html[data-theme="dark"] .src-tag.live { color: #4ade80; }
html[data-theme="dark"] .src-tag.mock { color: #fbbf24; }
html[data-theme="dark"] .src-tag.derived { color: #60a5fa; }

/* ── 푸터 ── */
.footer { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 14px; }
.foot-link { font: inherit; font-size: 12.5px; color: var(--text-2); background: none; border: none; padding: 0; cursor: pointer; font-weight: 600; }
.foot-link:hover { color: var(--brand2); }
.footer-note { margin: 0 0 14px; font-size: 12px; line-height: 1.6; max-width: 720px; }
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.footer-src { color: var(--muted); }

/* ── 정보 모달 본문 ── */
.info-body { font-size: 13.5px; color: var(--text-2); line-height: 1.72; max-height: 62vh; overflow-y: auto; }
.info-body p { margin: 0 0 12px; }
.info-body a { color: var(--brand2); font-weight: 600; }
.info-body .notice-list { list-style: none; padding: 0; margin: 0; }
.info-body .notice-list li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); display: flex; gap: 12px; }
.info-body .notice-list li:last-child { border-bottom: none; }
.info-body .notice-list b { color: var(--brand2); font-variant-numeric: tabular-nums; flex-shrink: 0; font-weight: 700; }

/* ── 계열사 무료 서비스 자동 슬라이드 배너 ── */
.family-slider { position: relative; margin-bottom: 22px; }
.family-slider[hidden] { display: none; }
.fs-viewport { overflow: hidden; border-radius: 16px; box-shadow: var(--shadow); }
.fs-track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.fs-slide {
  flex: 0 0 100%; width: 100%; min-width: 0; box-sizing: border-box; overflow: hidden;
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  text-decoration: none; color: #fff; min-height: 96px;
  background: linear-gradient(120deg, var(--g1, #4f7cff), var(--g2, #2dd4bf));
}
.fs-mark {
  width: 54px; height: 54px; border-radius: 15px; flex-shrink: 0; display: grid; place-items: center;
  font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: #fff;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3);
}
.fs-body { flex: 1 1 0; min-width: 0; overflow: hidden; }
.fs-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; opacity: .95; }
.fs-free { background: rgba(255,255,255,.28); padding: 1px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.fs-name { display: block; font-size: 18px; font-weight: 850; letter-spacing: -.025em; margin: 3px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-tag { display: block; font-size: 12.5px; opacity: .96; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-cta {
  flex-shrink: 0; background: #fff; color: #16181d; font-weight: 800; font-size: 13px;
  padding: 11px 17px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.18);
  display: inline-flex; align-items: center; gap: 5px;
}
.fs-cta-text { white-space: nowrap; }
.fs-slide:hover .fs-cta { transform: translateY(-1px); }
.fs-cta .ic { width: 13px; height: 13px; }
.fs-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.85); color: #16181d; font-size: 18px; line-height: 1; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.fs-nav.prev { left: 8px; } .fs-nav.next { right: 8px; }
.fs-nav:hover { background: #fff; }
.fs-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.fs-dot { width: 7px; height: 7px; border-radius: 999px; border: none; padding: 0; cursor: pointer; background: var(--line); transition: width .2s, background .2s; }
.fs-dot.active { width: 20px; background: var(--brand2); }

@media (max-width: 560px) {
  .fs-slide { padding: 14px 15px; gap: 11px; min-height: 84px; }
  .fs-mark { width: 44px; height: 44px; font-size: 15px; }
  .fs-name { font-size: 16px; }
  .fs-tag { font-size: 11.5px; }
  .fs-nav { display: none; }
  /* 모바일: CTA는 텍스트 숨기고 원형 화살표 버튼(전체 슬라이드가 클릭 가능) */
  .fs-cta-text { display: none; }
  .fs-cta { padding: 0; width: 40px; height: 40px; border-radius: 50%; justify-content: center; gap: 0; }
  .fs-cta .ic { width: 16px; height: 16px; }
}

/* ── Blog 탭 (헤더) ── */
.blog-tab {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  font-weight: 700; font-size: 13.5px; text-decoration: none; transition: all .18s ease;
}
.blog-tab:hover { color: #fff; border-color: transparent; background: var(--grad); }

/* ── 블로그 페이지 ── */
.blog-wrap { max-width: 860px; margin: 0 auto; padding: 26px 20px 60px; }
.header-actions a.ghost-btn { text-decoration: none; }
.blog-hero { text-align: center; margin-bottom: 26px; }
.blog-hero h1 { font-size: 28px; font-weight: 850; letter-spacing: -.03em; margin: 0 0 8px; }
.blog-hero p { color: var(--text-2); margin: 0; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.blog-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .16s, box-shadow .16s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-card-thumb { aspect-ratio: 16/9; background: var(--bg-soft); overflow: hidden; }
.blog-card-thumb.ph { background: var(--grad); }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 14px 16px 16px; }
.blog-card-badge { font-size: 11px; font-weight: 800; color: var(--brand2); }
.blog-card-body h2 { font-size: 16.5px; font-weight: 800; margin: 6px 0 6px; letter-spacing: -.02em; }
.blog-card-body p { font-size: 13px; color: var(--muted); margin: 0; }

/* ── 글 본문 ── */
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--brand2); text-decoration: none; }
.post-h1 { font-size: 30px; font-weight: 850; letter-spacing: -.035em; line-height: 1.25; margin: 0 0 18px; }
.post-thumb { width: 100%; border-radius: 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.blog-post { font-size: 16.5px; line-height: 1.85; color: var(--text); }
.blog-post h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 34px 0 14px; padding-top: 8px; border-top: 2px solid var(--line-soft); }
.blog-post p { margin: 0 0 18px; }
.blog-post b { color: var(--text); }
.post-aff { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 8px 0 24px; }
.post-aff .aff-note { font-size: 11.5px; color: var(--muted); margin: 0 0 8px; }
.post-aff ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.post-aff a { display: block; padding: 12px 15px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-weight: 700; color: var(--brand3); text-decoration: none; transition: border-color .16s; }
.post-aff a:hover { border-color: var(--brand2); }
.post-toc { background: var(--bg-soft); border-radius: 14px; padding: 16px 18px; margin: 0 0 24px; }
.post-toc b { display: block; margin-bottom: 8px; }
.post-toc ol { margin: 0; padding-left: 20px; }
.post-toc a { color: var(--text-2); text-decoration: none; }
.post-toc a:hover { color: var(--brand2); }
.post-quote { border-left: 4px solid var(--brand2); background: color-mix(in srgb, var(--brand1) 8%, transparent); margin: 0 0 24px; padding: 14px 18px; border-radius: 0 12px 12px 0; font-size: 17px; font-weight: 600; }
.post-fig { margin: 0 0 22px; }
.post-fig img { width: 100%; border-radius: 14px; }
.post-fig figcaption { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 8px; }
.post-table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 14.5px; }
.post-table th, .post-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post-table th { background: var(--bg-soft); font-weight: 700; }
.post-table a { color: var(--brand3); text-decoration: none; }
.post-chart { background: var(--bg-soft); border-radius: 14px; padding: 18px; margin: 0 0 22px; text-align: center; }
.post-checklist { background: color-mix(in srgb, #22c55e 8%, transparent); border-radius: 14px; padding: 8px 18px; margin: 0 0 20px; }
.post-checklist ul { margin: 12px 0; padding-left: 4px; list-style: none; }
.post-checklist li { margin-bottom: 8px; }
.post-tip { background: color-mix(in srgb, var(--brand1) 12%, transparent); border-radius: 14px; padding: 14px 18px; margin: 0 0 22px; font-size: 15px; }
.post-summary { background: var(--bg-soft); border: 1px dashed var(--line); border-radius: 14px; padding: 16px 18px; margin: 0 0 24px; }
.post-summary ol { margin: 10px 0 0; padding-left: 22px; }
.post-faq details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.post-faq summary { font-weight: 700; cursor: pointer; }
.post-faq p { margin: 10px 0 0; color: var(--text-2); font-size: 15px; }
.post-tags { color: var(--brand2); font-weight: 700; font-size: 13.5px; margin-top: 24px; }
.post-cta-home { text-align: center; margin: 30px 0 0; padding: 18px; background: var(--bg-soft); border-radius: 14px; font-weight: 700; }
.post-cta-home a { color: var(--brand2); text-decoration: none; }
@media (max-width: 620px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post-h1 { font-size: 24px; }
  .blog-post { font-size: 16px; }
  .blog-tab { height: 36px; padding: 0 11px; font-size: 13px; }
}

/* 본문 바로가기(접근성) */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--card); color: var(--text); border: 1px solid var(--brand2); border-radius: 10px; padding: 10px 16px; font-weight: 700; font-size: 14px; transition: top .18s ease; }
.skip-link:focus { top: 12px; }

/* 키워드 상세 모달 */
.kw-sub { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.kw-engines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.kw-engine { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font-weight: 700; font-size: 14px; min-height: 46px; transition: border-color .16s, color .16s, background .16s; }
.kw-engine:hover { border-color: color-mix(in srgb, var(--brand2) 55%, var(--line)); color: var(--brand2); background: color-mix(in srgb, var(--brand2) 6%, var(--card)); }
.kw-engine-go { width: 14px; height: 14px; color: var(--muted); }
.kw-engine:hover .kw-engine-go { color: var(--brand2); }
.kw-news-wrap { margin-top: 18px; }
.kw-news-head { margin: 0 0 10px; font-size: 14px; font-weight: 800; }
.kw-news { display: flex; flex-direction: column; gap: 8px; }
.kw-news-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; transition: border-color .16s; }
.kw-news-item:hover { border-color: color-mix(in srgb, var(--brand2) 45%, var(--line)); }
.kw-news-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
.kw-news-src { font-size: 11px; color: var(--muted); font-weight: 600; }
.kw-actions { display: flex; gap: 8px; margin-top: 18px; }
.kw-actions .line-btn { flex: 1; }
@media (max-width: 480px) { .kw-engines { grid-template-columns: repeat(2, 1fr); } }

/* ── 광고 슬롯 ── */
.ad-slot { position: relative; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); overflow: hidden; }
.ad-slot::before {
  content: attr(data-ad-label); position: absolute; top: 6px; left: 8px; z-index: 1;
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: color-mix(in srgb, var(--card) 70%, transparent);
  padding: 1px 6px; border-radius: 5px;
}
.ad-slot.filled { border-style: solid; }
.ad-horizontal { min-height: 100px; margin: 22px 0; display: grid; place-items: center; }
.ad-rect { min-height: 250px; display: grid; place-items: center; }
.side .ad-rect { position: sticky; top: calc(var(--header-h) + 22px); }
.ad-ph { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.ad-ph .ic { width: 15px; height: 15px; opacity: .6; }
.ad-slot .adsbygoogle { display: block; width: 100%; }

/* 글자 크기 조절 버튼 (네이버 뉴스식 가−/가+) */
.font-stepper { display: inline-flex; gap: 4px; }
.font-btn { width: auto; min-width: 40px; padding: 0 9px; font-size: 14px; font-weight: 800; gap: 0; }
.font-btn .minus, .font-btn .plus { font-size: 12px; margin-left: 1px; color: var(--brand2); font-weight: 800; }
.font-btn:disabled { opacity: .4; cursor: default; }
.font-btn:disabled:hover { border-color: var(--line); color: var(--text-2); }

/* 첫 방문 안내 */
.onboard { margin-bottom: 22px; }
.onboard[hidden] { display: none; }
.onboard-inner { border: 1px solid color-mix(in srgb, var(--brand2) 32%, var(--line)); background: color-mix(in srgb, var(--brand1) 8%, var(--card)); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.onboard-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.onboard-head strong { font-size: 16px; font-weight: 800; }
.onboard-ok { font: inherit; font-size: 13.5px; font-weight: 700; color: #fff; background: var(--grad); border: none; border-radius: 999px; padding: 9px 18px; cursor: pointer; min-height: 40px; }
.onboard-ok:hover { filter: brightness(1.05); }
.onboard-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.onboard-steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.step-n { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }

/* 순위 도움말 힌트 */
.rank-help { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--brand2); }
.rank-help .ic { width: 15px; height: 15px; }

/* 맨 위로 버튼 */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; cursor: pointer; box-shadow: var(--shadow-lg); min-height: 46px; }
.to-top[hidden] { display: none; }
.to-top:hover { border-color: color-mix(in srgb, var(--brand2) 50%, var(--line)); color: var(--brand2); }
.to-top .ic { width: 16px; height: 16px; }

/* 라벨(제휴 배지) */
.ad-tag { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; }

/* ── 추천 서비스 · 핫딜 (메인 대시보드 제휴 배너) ── */
.deals-card { padding: 22px 24px 26px; }
.deals-title-row { display: flex; align-items: center; gap: 10px; }
.deal-cats { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 18px; }
.deal-cat {
  font: inherit; font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text-2); transition: all .16s ease;
}
.deal-cat:hover { border-color: color-mix(in srgb, var(--brand2) 45%, var(--line)); color: var(--text); }
.deal-cat.active { color: #fff; border-color: transparent; background: var(--grad); font-weight: 700; }

.deal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.deal-card {
  --bc: var(--brand2);
  display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); position: relative; overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.deal-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--bc); }
.deal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--bc) 45%, var(--line)); }
.deal-mark {
  width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: -0.02em;
  background: var(--bc); box-shadow: 0 4px 12px color-mix(in srgb, var(--bc) 40%, transparent);
}
.deal-body { min-width: 0; flex: 1; }
.deal-brand { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.deal-cat-tag { font-size: 10px; font-weight: 700; color: var(--muted); background: var(--bg-soft); padding: 1px 6px; border-radius: 5px; }
.deal-blurb { font-size: 12.5px; color: var(--text-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-go {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 800;
  color: #fff; background: var(--bc); border-radius: 999px; padding: 8px 13px; min-height: 38px; white-space: nowrap;
}
.deal-go .ic { width: 13px; height: 13px; }
.deal-ad-flag { position: absolute; right: 9px; top: 8px; font-size: 9px; font-weight: 800; letter-spacing: .05em; color: var(--muted); }

/* 광고 슬롯 안에 들어가는 제휴 배너 */
.ad-slot .aff-banner { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; }
.ad-slot .aff-banner .deal-mark { width: 44px; height: 44px; }
.ad-slot.rect-banner { display: block; }
.ad-slot.rect-banner .aff-banner { flex-direction: column; text-align: center; gap: 10px; padding: 22px 16px; }
.ad-slot.rect-banner .deal-mark { width: 60px; height: 60px; font-size: 20px; }

/* ── 제휴 카드 (사이드바) ── */
.aff-card { padding: 18px 18px 14px; }
.aff-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.aff-list { display: flex; flex-direction: column; gap: 10px; }
.aff-item { display: flex; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .18s, transform .18s; align-items: center; }
.aff-item:hover { border-color: color-mix(in srgb, var(--brand2) 45%, var(--line)); transform: translateY(-1px); }
.aff-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--bg-soft); flex-shrink: 0; display: grid; place-items: center; color: var(--muted); }
.aff-thumb .ic { width: 22px; height: 22px; opacity: .5; }
.aff-body { min-width: 0; flex: 1; }
.aff-title { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aff-desc { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aff-badge { font-size: 9.5px; font-weight: 800; color: var(--brand2); background: color-mix(in srgb, var(--brand2) 12%, transparent); padding: 1px 6px; border-radius: 5px; margin-left: 6px; }
.aff-cta { font-size: 12px; font-weight: 700; color: var(--brand2); flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; }
.aff-cta .ic { width: 13px; height: 13px; }
.aff-disclosure { font-size: 10.5px; color: var(--muted); margin: 12px 2px 0; line-height: 1.5; }

/* ── 스켈레톤 ── */
.sk { position: relative; overflow: hidden; background: var(--bg-soft); border-radius: 8px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 60%, transparent), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-row { height: 20px; margin: 14px 8px; }

/* ── 모달 ── */
.modal { position: fixed; inset: 0; background: rgba(10,12,18,.5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 60; }
.modal[hidden] { display: none; }
.modal-box { background: var(--card); color: var(--text); border-radius: 20px; padding: 24px; max-width: 460px; width: 100%; box-shadow: var(--shadow-lg); animation: pop .2s ease; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.guide-list { margin: 0 0 16px; padding-left: 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.guide-list li { margin-bottom: 8px; }
.guide-list b { color: var(--text); }
.guide-legend { display: flex; gap: 16px; padding: 12px 14px; background: var(--bg-soft); border-radius: 12px; margin-bottom: 16px; }
.lg { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.tone-up { color: var(--up); } .tone-down { color: var(--new); }
.guide-shortcuts { margin: 0 0 16px; font-size: 12px; color: var(--muted); background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }

/* ── 반응형 ── */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 660px) {
  .deal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .hero-title { font-size: 27px; }
  .rank-list { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .live-pill { display: none; }
  .footer { flex-direction: column; align-items: flex-start; }
  /* 헤더: 좁은 화면에선 짧은 로고 + 컴팩트 컨트롤 (로고 줄바꿈 깨짐 방지) */
  .logo-full { display: none; }
  .logo-short { display: inline; font-size: 15px; }
  .beta { display: none; }
  .logo { gap: 8px; }
  .logo-mark { width: 32px; height: 32px; }
  .header-actions { gap: 6px; }
  .font-btn { min-width: 33px; padding: 0 6px; }
  .select-wrap { height: 36px; padding: 0 6px 0 8px; gap: 4px; }
  .select-wrap select { font-size: 13px; font-weight: 600; max-width: 92px; }
  .icon-btn { width: 36px; height: 36px; }
  .wrap { padding: 0 14px; }
  .page { padding: 22px 14px 48px; }
  .rank-card, .news-card, .deals-card { padding: 18px 16px 20px; }
}
@media (max-width: 380px) {
  /* 초협소: 언어선택 텍스트 숨기고 아이콘만 */
  .select-wrap select { max-width: 40px; }
}
