@charset "utf-8";

/* ===================================================
   JACK.INVEST — 티스토리 스킨 CSS  v6
   =================================================== */

:root {
  --primary:    #0f172a;
  --accent:     #2563eb;
  --accent-hov: #1d4ed8;
  --gold:       #d4af37;
  --green:      #16a34a;
  --text-main:  #1e293b;
  --text-sub:   #64748b;
  --text-muted: #94a3b8;
  --bg:         #f8fafc;
  --bg-card:    #ffffff;
  --border:     #e2e8f0;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow-md:  0 4px 16px rgba(0,0,0,.09);
  --shadow-lg:  0 16px 40px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Pretendard', sans-serif;
  background: var(--bg); color: var(--text-main);
  line-height: 1.7; -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: all .25s; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===================================================
   HEADER
   =================================================== */
.main-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  transition: box-shadow .3s, background .3s;
}
.main-header.scrolled {
  background: rgba(255,255,255,.98);
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.header-inner {
  display: flex; align-items: center;
  max-width: 1260px; margin: 0 auto;
  height: 66px; padding: 0 24px; gap: 16px;
}

/* 로고 */
.logo { flex-shrink: 0; }
.logo a { font-weight: 900; font-size: 1.4rem; color: var(--primary); letter-spacing: -1.5px; }
.logo a span { color: var(--accent); }

/* ── 네비 메뉴
   [##_blog_menu_##] → <ul class="..."><li>...</li></ul> 전체 출력
   .nav-menu > ul 을 flex로 가로 나열 ── */
.nav-menu { flex: 1; min-width: 0; }
.nav-menu ul {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  gap: 0; margin: 0; padding: 0;
}
.nav-menu ul li { display: inline-flex; align-items: center; }
.nav-menu ul li a {
  padding: 5px 12px;
  font-size: .875rem; font-weight: 700;
  color: var(--text-sub); white-space: nowrap;
}
.nav-menu ul li a:hover { color: var(--accent); }
/* | 구분선 */
.nav-menu ul li + li::before {
  content: '|'; color: var(--border); font-size: .8rem; align-self: center;
}

/* ── 우측 ── */
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* 검색창 */
.search-wrap { display: flex; align-items: center; }
.search-input {
  width: 160px; height: 36px; padding: 0 12px;
  border: 1.5px solid var(--border); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: .84rem; font-family: 'Pretendard', sans-serif;
  background: var(--bg); color: var(--text-main);
  outline: none; transition: border-color .2s;
}
.search-input:focus { border-color: var(--accent); }
.search-btn {
  display: flex; align-items: center; justify-content: center;
  height: 36px; width: 38px; flex-shrink: 0;
  background: var(--accent); color: #fff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background .2s;
}
.search-btn:hover { background: var(--accent-hov); }

/* ── 인증 영역
   JS가 로그인 여부 감지 후 아래 둘 중 하나로 채움 ── */
.auth-zone { display: flex; align-items: center; }
.auth-loading { font-size: .75rem; color: var(--text-muted); padding: 0 6px; }

/* 미로그인: 로그인 버튼 */
.btn-login {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 700; color: var(--text-sub);
  background: #fff; white-space: nowrap; transition: all .2s;
}
.btn-login:hover { border-color: var(--accent); color: var(--accent); background: #eff6ff; }

/* 로그인(관리자): 배지 + 버튼 묶음 */
.admin-bar {
  display: flex; align-items: center; gap: 8px;
  padding-left: 10px; border-left: 1px solid var(--border);
}
.admin-status {
  font-size: .75rem; font-weight: 800;
  color: var(--green); white-space: nowrap;
}
.btn-write {
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 13px;
  background: var(--accent); color: #fff !important;
  border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 800; white-space: nowrap;
  transition: all .2s;
}
.btn-write:hover { background: var(--accent-hov); transform: translateY(-1px); }
.btn-manage-sm {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; width: 34px;
  background: #f1f5f9; color: var(--text-sub) !important;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .9rem; transition: background .2s;
}
.btn-manage-sm:hover { background: #e2e8f0; }

/* ===================================================
   HERO
   =================================================== */
.hero-section {
  background-color: var(--primary);
  background-image:
    radial-gradient(circle at 15% 40%, rgba(37,99,235,.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 60%, rgba(124,58,237,.1) 0%, transparent 40%);
  padding: 55px 24px 45px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px; pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-tag {
  display: inline-block; font-size: .72rem; font-weight: 800; color: var(--accent);
  letter-spacing: 3px; margin-bottom: 20px;
  background: rgba(37,99,235,.12); padding: 5px 14px;
  border-radius: 50px; border: 1px solid rgba(37,99,235,.3);
}
.hero-title { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; line-height: 1.2; margin: 0 0 20px; letter-spacing: -1px; }
.hero-title strong { color: var(--accent); }
.hero-desc { font-size: clamp(1rem, 1.5vw, 1.1rem); color: #94a3b8; max-width: 560px; margin: 0 auto 40px; line-height: 1.8; }
.hero-stats {
  display: inline-flex; align-items: center; gap: 30px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 20px 36px; backdrop-filter: blur(10px);
}
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-stat strong { font-size: 1.55rem; font-weight: 900; color: #fff; letter-spacing: -.5px; }
.hero-stat span { font-size: .7rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 1px; }
.hero-stat-div { width: 1px; height: 36px; background: rgba(255,255,255,.1); }

/* ===================================================
   LAYOUT
   =================================================== */
.main-container {
  max-width: 1260px; margin: 50px auto; padding: 0 24px;
  display: flex; gap: 44px; align-items: flex-start;
}
.content-area { flex: 1; min-width: 0; }
.side-area { width: 290px; flex-shrink: 0; position: sticky; top: 80px; }

.list-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px; padding-bottom: 16px; border-bottom: 2px solid var(--primary);
}
.list-header h2 { font-size: 1.2rem; font-weight: 900; color: var(--primary); }
.list-header h2 span { color: var(--accent); }
.list-header p { font-size: .82rem; color: var(--text-muted); font-weight: 600; }
.list-header p strong { color: var(--accent); }

/* ===================================================
   REPORT CARDS
   =================================================== */
.report-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 28px; overflow: hidden;
  transition: all .35s cubic-bezier(.165,.84,.44,1);
  opacity: 0; transform: translateY(20px);
}
.report-item.visible { opacity: 1; transform: translateY(0); }
.report-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }

.thumb { height: 230px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.thumb-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.5), transparent); opacity: 0; transition: opacity .3s; }
.report-item:hover .thumb-overlay { opacity: 1; }
.thumb-default { height: 230px; background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); display: flex; align-items: center; justify-content: center; }
.thumb-default span { font-size: 1.8rem; font-weight: 900; color: rgba(255,255,255,.12); letter-spacing: -2px; }

.report-item .info { padding: 26px 28px; }
.report-item .category {
  color: var(--accent); font-weight: 800; font-size: .72rem;
  text-transform: uppercase; letter-spacing: 1.5px;
  background: rgba(37,99,235,.08); padding: 3px 10px;
  border-radius: 50px; border: 1px solid rgba(37,99,235,.15);
}
.report-item .title { font-size: 1.35rem; font-weight: 800; margin: 13px 0 11px; line-height: 1.35; color: var(--text-main); transition: color .2s; }
.report-item:hover .title { color: var(--accent); }
.report-item .summary { color: var(--text-sub); font-size: .91rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7; }
.report-item .meta { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.report-item .date { font-size: .78rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.report-item .more { font-weight: 800; color: var(--accent); font-size: .84rem; }

/* ===================================================
   ARTICLE DETAIL
   =================================================== */
.article-detail { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.article-header { text-align: center; padding: 56px 56px 36px; border-bottom: 1px solid var(--border); background: linear-gradient(to bottom, #fafbfc, #fff); }
.article-header .cat { display: inline-block; color: var(--accent); font-weight: 900; font-size: .74rem; text-transform: uppercase; letter-spacing: 2px; background: rgba(37,99,235,.08); padding: 4px 14px; border-radius: 50px; border: 1px solid rgba(37,99,235,.15); }
.article-header h1 { font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 900; line-height: 1.3; margin: 16px 0 14px; color: var(--primary); }
.article-meta { display: flex; justify-content: center; align-items: center; gap: 16px; font-size: .82rem; color: var(--text-muted); }
.article-meta span { display: flex; align-items: center; gap: 5px; }

/* 관리자 바 (s_ad_div, 글 안에서만 동작) */
.article-admin-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 24px;
  background: #f0fdf4; border-bottom: 1px solid #bbf7d0;
}
.admin-badge { font-size: .78rem; font-weight: 800; color: var(--green); }
.btn-new-post { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 7px; background: var(--accent); color: #fff !important; font-size: .78rem; font-weight: 800; transition: all .2s; }
.btn-new-post:hover { background: var(--accent-hov); }
.btn-manage { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 7px; background: #f1f5f9; color: var(--text-sub) !important; border: 1px solid var(--border); font-size: .78rem; font-weight: 800; transition: all .2s; }
.btn-manage:hover { background: #e2e8f0; }

.article-body { padding: 48px 56px; font-size: 1.05rem; color: #334155; line-height: 1.9; }
.article-cta { margin: 0 56px 36px; padding: 20px 24px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.article-cta > p { font-size: .84rem; color: var(--text-sub); font-weight: 600; margin-bottom: 10px; }
.share-btns { display: flex; gap: 8px; }
.share-btn { font-size: .78rem; font-weight: 800; padding: 8px 18px; border-radius: 8px; }
.share-btn.kakao { background: #FEE500; color: #3C1E1E; }
.share-btn.copy  { background: var(--primary); color: #fff; }
.article-footer { padding: 0 56px 48px; }

/* ===================================================
   SIDEBAR
   =================================================== */
.side-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px;
  opacity: 0; transform: translateY(16px);
  transition: opacity .4s, transform .4s, box-shadow .25s;
}
.side-card.visible { opacity: 1; transform: translateY(0); }
.side-card:hover { box-shadow: var(--shadow-md); }
.side-title { font-size: .9rem; font-weight: 900; margin-bottom: 16px; padding-bottom: 11px; border-bottom: 2px solid var(--primary); color: var(--primary); }

/* 프로필 */
.profile { text-align: center; }
.avatar { width: 66px; height: 66px; background: linear-gradient(135deg, var(--primary), #1e40af); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 13px; font-size: 1.55rem; font-weight: 900; box-shadow: 0 8px 20px rgba(15,23,42,.25); }
.profile h3 { font-size: 1.05rem; font-weight: 900; margin-bottom: 4px; }
.profile-sub { font-size: .82rem; color: var(--text-muted); margin-bottom: 16px; }

/*
  ★ 구독 버튼 스타일
  [##_subscription_##] 가 렌더링하는 실제 HTML 예:
    미구독: <a href="..." class="btn_subscription">구독하기</a>
    구독중: class에 'on' 추가 or 텍스트 "구독중" 변경 (티스토리 자체 처리)
  아래 CSS가 두 상태 모두 예쁘게 처리
*/
.subscribe-wrap { min-height: 44px; }

/* 공통: 미구독 상태 */
.subscribe-wrap a,
.subscribe-wrap button {
  display: block !important;
  width: 100% !important;
  padding: 11px 0 !important;
  border-radius: 50px !important;
  font-size: .9rem !important;
  font-weight: 800 !important;
  text-align: center !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  transition: all .25s !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%) !important;
  color: #fff !important;
}
.subscribe-wrap a:hover,
.subscribe-wrap button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(37,99,235,.4) !important;
}
/* 구독 완료 상태: 티스토리가 .on 클래스 붙임 */
.subscribe-wrap a.on,
.subscribe-wrap .on {
  background: #dcfce7 !important;
  color: var(--green) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* 방문자 */
.visitor-stats { margin-bottom: 14px; }
.visitor-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); }
.visitor-row:last-child { border-bottom: none; }
.vlabel { font-size: .82rem; color: var(--text-sub); font-weight: 600; }
.vval   { font-size: .98rem; font-weight: 800; color: var(--primary); }
.vval.today { color: var(--accent); }
.vval.total { color: var(--gold); }
.visitor-chart { display: flex; align-items: flex-end; gap: 5px; height: 56px; margin: 12px 0 5px; }
.vbar { flex: 1; background: #e2e8f0; border-radius: 4px 4px 0 0; min-height: 6px; transition: background .2s; }
.vbar:hover { background: #93c5fd; }
.vbar.active { background: var(--accent); }
.chart-label { font-size: .7rem; color: var(--text-muted); text-align: center; font-weight: 600; }

/* 최근 포스트 */
.recent-posts { display: flex; flex-direction: column; gap: 12px; }
.recent-item { display: flex; gap: 11px; align-items: center; padding: 9px; border-radius: var(--radius-sm); transition: background .2s; }
.recent-item:hover { background: var(--bg); }
.recent-thumb { width: 58px; height: 48px; border-radius: 7px; background-size: cover; background-position: center; flex-shrink: 0; background-color: #e2e8f0; }
.recent-thumb-default { background: linear-gradient(135deg, #0f172a, #1e3a8a); }
.recent-info { flex: 1; min-width: 0; }
.recent-title { font-size: .82rem; font-weight: 700; color: var(--text-main); line-height: 1.4; margin-bottom: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-item:hover .recent-title { color: var(--accent); }
.recent-date { font-size: .72rem; color: var(--text-muted); }

/* ===================================================
   카테고리 depth
   =================================================== */
.cat-nav { font-size: .85rem; }
.cat-nav ul { list-style: none; margin: 0; padding: 0; }

/* depth 0 */
.cat-nav > ul > li > a { display: flex; justify-content: space-between; padding: 9px 6px; font-size: .88rem; font-weight: 800; color: var(--primary); border-bottom: 2px solid var(--border); }
.cat-nav > ul > li > a:hover { color: var(--accent); }

/* depth 1 */
.cat-nav > ul > li > ul > li > a { display: flex; justify-content: space-between; padding: 8px 6px 8px 16px; font-size: .85rem; font-weight: 700; color: var(--text-sub); border-bottom: 1px solid var(--border); position: relative; }
.cat-nav > ul > li > ul > li > a::before { content: '›'; position: absolute; left: 5px; color: var(--text-muted); }
.cat-nav > ul > li > ul > li > a:hover { color: var(--accent); padding-left: 20px; }

/* depth 2 */
.cat-nav > ul > li > ul > li > ul > li > a { display: flex; justify-content: space-between; padding: 6px 6px 6px 30px; font-size: .8rem; font-weight: 600; color: var(--text-muted); border-bottom: 1px dashed var(--border); position: relative; }
.cat-nav > ul > li > ul > li > ul > li > a::before { content: '—'; position: absolute; left: 14px; color: var(--border); font-size: .7rem; }
.cat-nav > ul > li > ul > li > ul > li > a:hover { color: var(--accent); }
.cat-nav > ul > li > ul > li:last-child > a { border-bottom: none; }

/* 태그 */
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags a { font-size: .74rem; font-weight: 700; color: var(--text-sub); background: var(--bg); border: 1px solid var(--border); padding: 4px 11px; border-radius: 50px; transition: all .2s; }
.tags a:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-1px); }

/* ===================================================
   PAGINATION
   =================================================== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 8px; font-size: .84rem; font-weight: 700; border: 1px solid var(--border); color: var(--text-sub); background: #fff; transition: all .2s; }
.pagination a:hover, .pagination a.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===================================================
   FOOTER
   =================================================== */
.main-footer { background: var(--primary); color: #64748b; padding: 60px 24px 36px; text-align: center; margin-top: 60px; }
.footer-inner { max-width: 740px; margin: 0 auto; }
.footer-logo { font-size: 1.55rem; font-weight: 900; color: #fff; letter-spacing: -1.5px; margin-bottom: 9px; }
.footer-logo span { color: var(--accent); }
.footer-tagline { font-size: .84rem; color: #475569; margin-bottom: 26px; }
.footer-links { display: flex; justify-content: center; gap: 22px; margin-bottom: 28px; }
.footer-links a { font-size: .82rem; color: #475569; font-weight: 700; }
.footer-links a:hover { color: #fff; }
.disclaimer { font-size: .77rem; color: #374151; max-width: 600px; margin: 0 auto 16px; border: 1px solid rgba(255,255,255,.07); padding: 11px 14px; border-radius: 8px; line-height: 1.7; background: rgba(255,255,255,.03); }
.copy { font-size: .74rem; color: #374151; }

/* ===================================================
   토스트
   =================================================== */
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--primary); color: #fff; padding: 12px 24px; border-radius: 50px; font-size: .88rem; font-weight: 700; opacity: 0; transition: all .35s; z-index: 9999; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1024px) {
  .side-area { width: 250px; }
  .article-header { padding: 40px 36px 28px; }
  .article-body  { padding: 36px; }
  .article-cta   { margin: 0 36px 30px; }
  .article-footer{ padding: 0 36px 40px; }
}
@media (max-width: 900px) {
  .main-container { flex-direction: column; margin-top: 36px; }
  .side-area { width: 100%; position: static; }
  .hero-stats { padding: 16px 20px; gap: 18px; }
  .search-input { width: 130px; }
}
@media (max-width: 680px) {
  .header-inner { padding: 0 14px; gap: 8px; }
  .nav-menu { display: none; }
  .search-input { width: 110px; }
  .admin-status { display: none; }
  .hero-section { padding: 60px 16px 50px; }
  .hero-stat-div { display: none; }
  .hero-stats { flex-wrap: wrap; gap: 14px; }
  .article-cta { margin: 0 20px 24px; }
  .article-header { padding: 28px 20px; }
  .article-body   { padding: 26px 20px; }
  .article-footer { padding: 0 20px 30px; }
}
/* 헤더 구독 버튼 */
.header-sub { display: flex; align-items: center; }
.header-sub .btn_subscription,
.header-sub a[href*="subscribe"],
.header-sub button {
  display: inline-flex !important;
  align-items: center !important;
  padding: 7px 16px !important;
  border-radius: 50px !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, var(--accent), #7c3aed) !important;
  color: #fff !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: opacity .2s !important;
}
.header-sub .btn_subscription:hover,
.header-sub a[href*="subscribe"]:hover { opacity: .85 !important; }
.header-sub .on { background: #dcfce7 !important; color: #16a34a !important; }

/* 헤더 구독 버튼 (JS 주입) */
.hdr-sub-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent,#2563eb), #7c3aed);
  color: #fff !important;
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  white-space: nowrap;
}
.hdr-sub-btn:hover { opacity: .88; transform: scale(1.03); }
.hdr-sub-btn.is-on { background: #374151; }

/* ── 댓글 섹션 ── */
#comment { padding: 0; }
#comment .cmt_wrap,
.cmt_wrap { padding: 0; }
.cmt_wrap .area_comment { margin-top: 32px; }
.cmt_wrap .area_comment .tit_comment {
  font-size: 1rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}
/* 댓글 입력폼 */
.cmt_wrap .area_cmt_inp { margin-top: 24px; }
.cmt_wrap .area_cmt_inp textarea {
  width: 100%; min-height: 80px;
  padding: 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: .9rem;
  background: var(--surface); color: var(--text-primary);
  resize: vertical;
}
.cmt_wrap .area_cmt_inp .btn_submit {
  display: inline-block; margin-top: 8px;
  padding: 8px 20px; border-radius: 6px;
  background: var(--primary); color: #fff;
  font-size: .85rem; font-weight: 700; border: none; cursor: pointer;
}
/* 개별 댓글 */
.cmt_wrap .cmt_list li { 
  padding: 12px 0; border-bottom: 1px solid var(--border-light, #e5e7eb);
}
.cmt_wrap .cmt_list .cmt_meta { font-size: .8rem; color: #6b7280; margin-bottom: 4px; }
.cmt_wrap .cmt_list .cmt_content { font-size: .9rem; color: var(--text-primary); }

/* Tistory 댓글/반응 컨테이너 */
[id^="reaction-"] {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--primary, #1e3a5f);
}
[id^="reaction-"] .wrap_comment,
[id^="reaction-"] .cmt_wrap {
  font-size: .9rem;
}

/* ── 포스트 그리드 (홈 목록) ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 32px 0;
}
@media (max-width: 768px) { .post-grid { grid-template-columns: 1fr; } }

/* ── 네비 링크 ── */
.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links li a {
  display: block;
  padding: 4px 14px;
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  transition: color .2s;
}
.nav-links li a:hover { color: #fff; }

/* ── 본문 콘텐츠 스타일 (Tistory 기본 호환) ── */
.contents_style {
  line-height: 1.8;
  font-size: 1rem;
  color: var(--text-primary);
  word-break: keep-all;
  overflow-wrap: break-word;
}
.contents_style h1,.contents_style h2,.contents_style h3 {
  font-weight: 700; margin: 1.4em 0 .6em;
  color: var(--text-primary);
}
.contents_style h2 { font-size: 1.3rem; }
.contents_style h3 { font-size: 1.1rem; }
.contents_style p { margin: .8em 0; }
.contents_style a { color: var(--accent); text-decoration: underline; }
.contents_style ul,.contents_style ol { padding-left: 1.5em; margin: .8em 0; }
.contents_style blockquote {
  margin: 1em 0; padding: .8em 1em;
  border-left: 4px solid var(--accent); background: rgba(37,99,235,.06);
  border-radius: 0 6px 6px 0;
}
.contents_style img { max-width: 100%; height: auto; border-radius: 8px; }
.contents_style table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.contents_style th,.contents_style td {
  border: 1px solid var(--border); padding: 8px 12px; text-align: left;
}
.contents_style th { background: var(--primary); color: #fff; font-weight: 600; }
.contents_style code {
  font-family: monospace; font-size: .88em;
  background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 3px;
}
.contents_style pre {
  background: #1e293b; color: #e2e8f0;
  padding: 16px; border-radius: 8px; overflow-x: auto;
}

/* ── 공감(좋아요) 버튼 영역 ── */
.postbtn_like {
  text-align: center;
  margin: 24px 0 8px;
}
.uoc-icon { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.uoc-count { font-size: .8rem; color: #6b7280; }

/* ── Tistory 댓글 추가 스타일 ── */
.tt-comment-cont { padding: 8px 0; }
.tt-box-total { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.tt_txt_g { margin-right: 6px; }
.tt_num_g { color: var(--accent); }
.tt-area-write { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.tt-thumbnail { display: block; width: 36px; height: 36px; border-radius: 50%; background-size: cover; }
.tt_wrap_write { flex: 1; }
.tt-box-account input[type="text"],
.tt-box-account input[type="password"] {
  padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: .85rem; margin-right: 6px;
  background: var(--surface); color: var(--text-primary);
}
.tt-area-text textarea {
  width: 100%; min-height: 72px; padding: 10px;
  border: 1px solid var(--border); border-radius: 8px;
  resize: vertical; font-size: .9rem;
  background: var(--surface); color: var(--text-primary);
  margin-top: 8px;
}
.tt-btn-write button {
  float: right; margin-top: 8px;
  padding: 7px 18px; background: var(--primary);
  color: #fff; border: none; border-radius: 6px;
  font-size: .85rem; font-weight: 600; cursor: pointer;
}
.tt-box-reply {
  padding: 12px; border: 1px solid var(--border-light, #e5e7eb);
  border-radius: 8px; margin-bottom: 12px;
  background: var(--surface);
}

/* AdSense revenue wrappers */
.revenue-wrap { margin: 32px auto; text-align: center; max-width: 100%; overflow: hidden; }
.revenue-wrap ins { display: block !important; }
/* live-market-widget-start */
.live-market-wrap{background:linear-gradient(135deg,#0a1628 0%,#0d2040 100%);padding:6px 32px 2px;margin:0;border-top:1px solid rgba(255,255,255,.06);border-bottom:1px solid rgba(255,255,255,.06)}
.tradingview-widget-container{width:100%;min-height:46px}
.tradingview-widget-container__widget{width:100%}
.report-item .summary{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-height:3.2em}
.article-body{overflow:visible!important;max-height:none!important}
.article-body img{max-width:100%;height:auto}
.article-body .contents_style{overflow:visible!important}
/* live-market-widget-end */
/* adsense-css-start */
.ad-wrap{clear:both;margin:20px auto;text-align:center;overflow:hidden;width:100%}
.ad-post-top{margin:0 0 24px}
.ad-sidebar-card{padding:0!important;background:transparent!important;border:none!important;box-shadow:none!important}
.ad-sidebar{margin:0}
@media(max-width:768px){.ad-sidebar-card{display:none!important}}
/* adsense-css-end */
/* post-footer-fixes-start */
/* 1+2. 공감/공유 우측 바 */
.pf-bar{display:flex;align-items:center;gap:10px;margin-left:auto;padding:4px 0}
.pf-sub-btn{background:#1a4fa0;color:#fff;border:none;border-radius:4px;padding:5px 14px;font-size:.82rem;font-weight:600;cursor:pointer;transition:background .2s;white-space:nowrap}
.pf-sub-btn:hover,.pf-sub-btn.is-on{background:#0d3a7a}
.pf-ccl{display:flex;align-items:center;gap:4px;font-size:.72rem;color:#8a9dc0;text-decoration:none;white-space:nowrap}
.pf-ccl img{vertical-align:middle}
.pf-share-btn{background:#2a3a50;color:#c8d8f0;border:none;border-radius:4px;padding:5px 12px;font-size:.82rem;font-weight:600;cursor:pointer;transition:background .2s;white-space:nowrap}
.pf-share-btn:hover{background:#3a4f6a}
/* 3. 카테고리 다른글 제목 배경 제거 */
.another_category th,.another_category_color_gray th{background:none!important;background-color:transparent!important}
.another_category th a,.another_category_color_gray th a{background:none!important;background-color:transparent!important}
/* 4. 댓글 하단 블로그 정보 */
.post-blog-info{background:linear-gradient(135deg,#0a1628 0%,#0d2040 100%);border-radius:12px;padding:20px 24px;margin:28px 0 0;border:1px solid rgba(255,255,255,.1)}
.pbi-inner{display:flex;align-items:center;gap:16px}
.pbi-avatar{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#1a4fa0,#0d2040);display:flex;align-items:center;justify-content:center;font-size:1.2rem;font-weight:700;color:#fff;flex-shrink:0;border:2px solid rgba(255,255,255,.2)}
.pbi-text{flex:1;min-width:0}
.pbi-name{font-size:.95rem;font-weight:700;color:#e0eaff;display:block}
.pbi-desc{font-size:.78rem;color:#8a9dc0;margin:.2em 0 0}
.pbi-sub-btn{background:#1a4fa0;color:#fff;border:none;border-radius:6px;padding:8px 18px;font-size:.85rem;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s;flex-shrink:0}
.pbi-sub-btn:hover{background:#2563c0}
@media(max-width:640px){.pbi-inner{flex-wrap:wrap}.pbi-sub-btn{width:100%}}
/* post-footer-fixes-end */
/* ui-enhancements-start */
/* 1. Reading progress bar */
#rdg-prog{position:fixed;top:0;left:0;height:3px;width:0;background:linear-gradient(90deg,#2563eb,#7c3aed);z-index:10000;pointer-events:none;transition:width .08s linear}
/* 2. TOC */
.toc-box{background:#f8fafc;border:1px solid #dee2e6;border-left:3px solid #2563eb;border-radius:0 8px 8px 0;padding:14px 18px;margin:0 0 28px}
.toc-box-hdr{display:flex;justify-content:space-between;align-items:center;font-weight:800;color:#1e293b;margin-bottom:10px;font-size:.9rem}
.toc-toggle{background:none;border:1px solid #dee2e6;border-radius:4px;padding:1px 7px;font-size:.73rem;color:#64748b;cursor:pointer;line-height:1.6}
.toc-list{list-style:none;padding:0;margin:0}
.toc-list li{margin:1px 0}
.toc-list li a{color:#475569;text-decoration:none;display:block;padding:4px 6px;border-radius:4px;font-size:.85rem;transition:background .12s,color .12s}
.toc-list li a:hover,.toc-list li.active a{background:#eff6ff;color:#2563eb;font-weight:700}
.toc-list li.toc-h3 a{padding-left:18px;font-size:.82rem;color:#64748b}
.toc-list li.toc-h3.active a{color:#2563eb;font-weight:600}
/* 3. Category badge colours */
.report-item .category[data-type="tesla"]{color:#dc2626!important;background:rgba(220,38,38,.08)!important}
.report-item .category[data-type="etf"]{color:#16a34a!important;background:rgba(22,163,74,.08)!important}
.report-item .category[data-type="macro"]{color:#d97706!important;background:rgba(217,119,6,.08)!important}
/* 4. Reading time */
.read-time{font-size:.72rem;color:#94a3b8;display:inline-flex;align-items:center;gap:3px}
/* 5. Hero height */
.hero-section{padding:55px 24px 45px!important}
/* 7. Back to top */
#btt{position:fixed;bottom:24px;right:24px;width:40px;height:40px;background:#2563eb;color:#fff;border:none;border-radius:50%;font-size:1.2rem;font-weight:700;cursor:pointer;z-index:8000;box-shadow:0 4px 14px rgba(37,99,235,.35);opacity:0;transform:translateY(8px);transition:opacity .25s,transform .25s;pointer-events:none;display:flex;align-items:center;justify-content:center;line-height:1}
#btt.on{opacity:1;transform:translateY(0);pointer-events:auto}
#btt:hover{background:#1d4ed8;transform:translateY(-2px)!important}
/* ui-enhancements-end */
/* sidebar-tabs-start */
/* Tab card */
.rp-tabs{display:flex;border-bottom:1px solid var(--border);margin-bottom:10px;gap:0}
.rp-tab{flex:1;background:none;border:none;padding:7px 0;font-size:.8rem;font-weight:600;color:var(--text-muted);cursor:pointer;border-bottom:2px solid transparent;transition:color .15s,border-color .15s}
.rp-tab.active{color:var(--accent);border-bottom-color:var(--accent)}
.rp-panel{display:block}
.rp-panel.hidden{display:none}
/* Popular rank badge — same dimensions as .recent-thumb */
.popular-rank-badge{width:58px;height:48px;border-radius:7px;flex-shrink:0;background:var(--bg);display:flex;align-items:center;justify-content:center;font-size:1.3rem;font-weight:900;color:#94a3b8}
.popular-rank-badge.top3{color:var(--accent);background:rgba(37,99,235,.08)}
.popular-loading{font-size:.8rem;color:var(--text-muted);text-align:center;padding:10px 0}
/* Article width fix */
.post-grid:has(.article-detail){display:block}
/* Sidebar category nav colors */
.cat-nav a[data-type="tesla"]{color:#dc2626!important}
.cat-nav a[data-type="etf"]{color:#16a34a!important}
.cat-nav a[data-type="macro"]{color:#d97706!important}
/* sidebar-tabs-end */
/* fix-subscribe-category-start */
/* 1. Subscribe button always-visible blue (override Tistory default) */
.pbi-sub-btn.btn_subscription,
.post-blog-info .btn_subscription{
  background:#2563eb!important;color:#fff!important;
  border:1px solid #2563eb!important;border-radius:20px!important;
  padding:9px 22px!important;font-size:.86rem!important;font-weight:700!important;
  cursor:pointer!important;transition:background .2s,transform .15s!important
}
.pbi-sub-btn.btn_subscription:hover,
.post-blog-info .btn_subscription:hover{
  background:#1d4ed8!important;transform:translateY(-1px)!important
}
.pbi-sub-btn.btn_subscription .txt_state,
.post-blog-info .btn_subscription .txt_state{color:#fff!important}
/* Subscribed state */
.pbi-sub-btn.btn_subscription.on,
.post-blog-info .btn_subscription.on{
  background:#e0f2fe!important;color:#0369a1!important;border-color:#7dd3fc!important
}
/* fix-subscribe-category-end */
/* sector-colors-start */
/* Card category badges */
.report-item .category[data-type="invest"]    {color:#2563eb!important;background:rgba(37,99,235,.08)!important}
.report-item .category[data-type="tesla"]     {color:#dc2626!important;background:rgba(220,38,38,.08)!important}
.report-item .category[data-type="portfolio"] {color:#16a34a!important;background:rgba(22,163,74,.08)!important}
.report-item .category[data-type="posco"]     {color:#d97706!important;background:rgba(217,119,6,.08)!important}
.report-item .category[data-type="etf"]       {color:#2563eb!important;background:rgba(37,99,235,.08)!important}
.report-item .category[data-type="macro"]     {color:#64748b!important;background:rgba(100,116,139,.08)!important}
/* Sidebar cat-nav: reset all data-type overrides to default */
.cat-nav a[data-type]{color:inherit!important}
/* Sidebar cat-nav: base (non-active) */
.cat-nav>ul>li>a{color:var(--text-main)!important;font-weight:700}
.cat-nav>ul>li>ul>li>a{color:var(--text-muted)!important;font-weight:600}
/* Sidebar cat-nav: active sector colors (JS adds these classes) */
.cat-nav a.cat-active-invest    {color:#2563eb!important;font-weight:800}
.cat-nav a.cat-active-tesla     {color:#dc2626!important;font-weight:800}
.cat-nav a.cat-active-portfolio {color:#16a34a!important;font-weight:800}
.cat-nav a.cat-active-posco     {color:#d97706!important;font-weight:800}
/* sector-colors-end */

/* btn-black-start */
/* pf-bar 구독하기+공유 버튼 — 검정 */
.pf-sub-btn{background:#111!important;color:#fff!important;border:none!important;border-radius:4px!important;padding:5px 14px!important;font-size:.82rem!important;font-weight:600!important;cursor:pointer!important;white-space:nowrap!important;transition:background .15s!important}
.pf-sub-btn:hover,.pf-sub-btn.is-on{background:#333!important}
.pf-share-btn{background:#111!important;color:#fff!important;border:none!important;border-radius:4px!important;padding:5px 12px!important;font-size:.82rem!important;font-weight:600!important;cursor:pointer!important;transition:background .15s!important}
.pf-share-btn:hover{background:#333!important}
/* post-blog-info 구독하기 버튼 — 검정 */
.pbi-sub-btn,.pbi-sub-btn.btn_subscription,.post-blog-info .btn_subscription{background:#111!important;color:#fff!important;border:none!important;border-radius:6px!important;padding:8px 18px!important;font-size:.85rem!important;font-weight:600!important;cursor:pointer!important}
.pbi-sub-btn:hover,.pbi-sub-btn.btn_subscription:hover,.post-blog-info .btn_subscription:hover{background:#333!important}
/* postbtn 공감 버튼 — 검정 */
.container_postbtn .btn_post,.btn_post.uoc-icon{background:#111!important;color:#fff!important;border:none!important;border-radius:20px!important;padding:4px 10px!important}
/* btn-black-end */
/* mkt6-start */
.live-market-wrap.mkt6{display:flex!important;width:100%;height:58px;overflow:hidden;padding:0!important;background:#0d1b2e}
.mkt6-cell{flex:1 1 0;min-width:0;height:58px;overflow:hidden;position:relative;border-right:1px solid rgba(255,255,255,.08)}
.mkt6-cell:last-child{border-right:none}
/* Korean label — larger font so names (S&P500, 나스닥 100 etc.) are clearly readable */
.mkt6-lbl{position:absolute;top:0;left:0;right:0;height:20px;background:#0d1b2e;z-index:10;font-size:.75rem;color:#a8bdd4;font-weight:700;display:flex;align-items:center;justify-content:center;letter-spacing:.03em;pointer-events:none;white-space:nowrap}
/* shift(-28)+label(20)=48px hidden → covers TV symbol-name row */
.mkt6-wgt{position:relative;top:-28px;height:100px}
.mkt6-wgt .tradingview-widget-container,.mkt6-wgt .tradingview-widget-container__widget{height:100px!important;width:100%!important}
@media(max-width:640px){
  .live-market-wrap.mkt6{height:48px}
  .mkt6-cell{height:48px}
  .mkt6-lbl{height:16px;font-size:.62rem}
  .mkt6-wgt{top:-24px;height:85px}
  .mkt6-wgt .tradingview-widget-container,.mkt6-wgt .tradingview-widget-container__widget{height:85px!important}
}
/* mkt6-end */