/* ===================================================
   VentureStory — 스타일시트
   컨셉: 전문가들이 둘러앉은 '사랑방' — 로고의 앰버·코랄 웜톤 기반
   =================================================== */

:root {
  /* 브랜드 (로고 색에서 파생) */
  --primary:       #A9483A;   /* 테라코타 — 주 액션 */
  --primary-dark:  #8E3A2D;
  --primary-soft:  #FBEDE9;
  --amber:         #B8791E;   /* 텍스트로 쓸 수 있는 앰버 */
  --amber-light:   #F5C84A;   /* 로고 원색 */
  --amber-soft:    #FDF4DE;
  --coral:         #E87878;   /* 로고 원색 */
  --coral-soft:    #FCEEEE;

  /* 중립 (따뜻한 회색) */
  --ink:           #241F2E;
  --text:          #241F2E;
  --muted:         #6E6678;
  --muted-light:   #948C9E;
  --bg:            #FBF8F3;
  --surface:       #FFFFFF;
  --surface-alt:   #F7F2EA;
  --border:        #EBE3D7;
  --border-strong: #DDD2C1;

  /* 상태 */
  --success:       #2E8B6F;
  --success-soft:  #EDF7F3;
  --warn:          #B5810E;
  --warn-soft:     #FDF6E3;
  --danger:        #C0392B;
  --danger-soft:   #FDF1EF;

  --shadow:    0 1px 2px rgba(80,60,40,.06), 0 1px 3px rgba(80,60,40,.05);
  --shadow-md: 0 4px 12px rgba(80,60,40,.07);
  --shadow-lg: 0 12px 32px rgba(80,60,40,.10);

  --radius:    10px;
  --radius-lg: 14px;
  --font: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.text-muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sep { color: var(--border-strong); margin: 0 2px; }

/* ── 상단 바 ─────────────────────────────────────── */
.topbar {
  background: var(--ink);
  color: rgba(255,255,255,.82);
  font-size: 12.5px;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 7px 20px; }
.topbar-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-links { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.topbar-link { color: rgba(255,255,255,.75); transition: color .15s; }
.topbar-link:hover { color: var(--amber-light); }
.topbar-link-strong { color: var(--amber-light); font-weight: 600; }
.topbar-me { color: #fff; font-weight: 500; }
.expert-dot {
  display: inline-block; background: var(--amber-light); color: var(--ink);
  width: 15px; height: 15px; line-height: 15px; text-align: center;
  border-radius: 50%; font-size: 10px; font-weight: 700; margin-left: 2px;
}

/* ── 헤더 ────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.site-logo { flex-shrink: 0; }
.site-logo-img { height: 44px; width: auto; }

.header-search { flex: 1; max-width: 420px; position: relative; display: flex; }
.header-search input {
  width: 100%; font-family: inherit; font-size: 14px;
  padding: 10px 44px 10px 16px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface-alt); color: var(--text);
}
.header-search input::placeholder { color: var(--muted-light); }
.header-search input:focus { outline: none; border-color: var(--primary); background: #fff; }
.header-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; font-size: 15px; padding: 6px 12px; border-radius: 999px;
}
.header-actions { margin-left: auto; flex-shrink: 0; }

/* 1차 축: 형식 메뉴 */
.main-nav { border-top: 1px solid var(--border); background: var(--surface); }
.main-nav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.main-nav-inner::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 16px; font-size: 14.5px; font-weight: 500;
  color: var(--muted); white-space: nowrap;
  border-bottom: 3px solid transparent; transition: color .15s, border-color .15s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.nav-icon { font-size: 15px; }

/* ── 본문 ────────────────────────────────────────── */
.site-main { padding: 28px 0 64px; min-height: 60vh; }

.flash {
  padding: 13px 18px; border-radius: var(--radius); margin-bottom: 20px;
  font-size: 14px; font-weight: 500; border: 1px solid;
}
.flash-ok   { background: var(--success-soft); border-color: #C9E4CE; color: #1F5C33; }
.flash-err  { background: var(--danger-soft);  border-color: #F2CFC8; color: #8E3A2D; }
.flash-warn { background: var(--warn-soft);    border-color: #EFDFB4; color: #7A5B10; }
.flash a { text-decoration: underline; font-weight: 600; }

/* ── 히어로 ──────────────────────────────────────── */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  background: linear-gradient(135deg, #2B2438 0%, #4A3242 55%, #6E3F3A 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: 40px 44px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,200,74,.22), transparent 70%);
}
.hero-text { position: relative; z-index: 1; }
.hero-text h1 { font-size: 30px; font-weight: 800; line-height: 1.35; letter-spacing: -.6px; margin-bottom: 12px; }
.hero-text h1 strong { color: var(--amber-light); font-weight: 800; }
.hero-text p { color: rgba(255,255,255,.82); font-size: 14.5px; line-height: 1.8; margin-bottom: 22px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 28px; position: relative; z-index: 1; flex-shrink: 0; }
.hero-stats div { text-align: center; }
.hero-stats dt { font-size: 12px; color: rgba(255,255,255,.65); margin-bottom: 4px; }
.hero-stats dd { font-size: 26px; font-weight: 800; color: var(--amber-light); font-family: 'Inter', sans-serif; }

/* ── 형식 안내 카드 ──────────────────────────────── */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.type-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  border-left: 4px solid var(--type-color, var(--primary));
  transition: transform .15s, box-shadow .15s;
}
.type-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: inherit; }
.type-card-icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.type-card-name { font-size: 15.5px; font-weight: 700; margin-bottom: 4px; }
.type-card-name em {
  font-style: normal; font-size: 12.5px; font-weight: 700;
  color: var(--type-color);
  background: var(--surface-alt);  /* color-mix 미지원 브라우저용 대체 */
  background: color-mix(in srgb, var(--type-color) 12%, transparent);
  padding: 1px 8px; border-radius: 999px; margin-left: 4px;
}
.type-card-desc { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ── 2차 축: 주제 필터 ───────────────────────────── */
.topicbar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 22px;
}
.topicbar-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.topicbar-sub { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.topicbar-label {
  font-size: 12px; font-weight: 700; color: var(--muted-light);
  letter-spacing: .04em; margin-right: 4px; flex-shrink: 0;
}
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  background: var(--surface-alt); border: 1px solid transparent;
  padding: 6px 13px; border-radius: 999px; transition: all .15s;
}
.chip:hover { background: var(--amber-soft); color: var(--text); }
.chip.active {
  background: var(--chip-color, var(--primary)); color: #fff; font-weight: 600;
  border-color: var(--chip-color, var(--primary));
}
.chip.active:hover { color: #fff; opacity: .92; }
.chip em {
  font-style: normal; font-size: 11.5px; font-weight: 700;
  background: rgba(0,0,0,.07); padding: 0 6px; border-radius: 999px;
}
.chip.active em { background: rgba(255,255,255,.25); }
.chip-sm { font-size: 12.5px; padding: 4px 11px; }

/* ── 레이아웃 ────────────────────────────────────── */
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.main-col { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 130px; }
.sidebar .card + .card { margin-top: 0; }

.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.section-title { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.view-all { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.view-all:hover { color: var(--primary); }

/* ── 카드 ────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card-accent { border-color: #EFD9A8; background: linear-gradient(180deg, #FEFAF0, var(--surface) 60%); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border); gap: 10px;
}
.card-title { font-size: 14.5px; font-weight: 700; }
.card-title em { font-style: normal; color: var(--primary); font-weight: 700; margin-left: 3px; }
.card-more { font-size: 12.5px; color: var(--muted); flex-shrink: 0; }
.card-body { padding: 20px; }

/* ── 글 목록 ─────────────────────────────────────── */
.post-item {
  display: flex; gap: 14px; padding: 18px 20px;
  border-bottom: 1px solid var(--border); transition: background .15s;
}
.post-item:last-child { border-bottom: 0; }
.post-item:hover { background: #FDFBF7; }

.post-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  background: var(--avatar-color, var(--primary));
}
.post-body { min-width: 0; flex: 1; }

.post-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.type-badge {
  font-size: 11.5px; font-weight: 700; color: #fff;
  background: var(--type-color, var(--primary));
  padding: 2px 9px; border-radius: 5px;
}
.topic-badge {
  font-size: 11.5px; font-weight: 600; color: var(--topic-color, var(--muted));
  background: var(--surface-alt);  /* color-mix 미지원 브라우저용 대체 */
  background: color-mix(in srgb, var(--topic-color, var(--muted)) 10%, transparent);
  padding: 2px 9px; border-radius: 5px;
}
.state-badge {
  font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 5px;
  background: var(--surface-alt); color: var(--muted);
}
.state-resolved { background: var(--success-soft); color: var(--success); }
.state-waiting  { background: var(--coral-soft);   color: #C0564B; }
.deadline-urgent { background: var(--danger-soft); color: var(--danger); }
.deadline-open   { background: var(--success-soft); color: var(--success); }
.deadline-closed { background: var(--surface-alt);  color: var(--muted-light); }

.post-title { font-size: 15.5px; font-weight: 600; line-height: 1.5; margin-bottom: 6px; }
.post-title a { display: block; }
.post-title a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.post-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.post-author, .author-name { font-weight: 600; color: var(--text); }
.author-type { color: var(--muted); }
.expert-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: #7A5B10;
  background: var(--amber-soft); border: 1px solid #EFDFB4;
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
}
.count-comment { color: #C0564B; font-weight: 600; }
.count-helpful { color: var(--amber); font-weight: 600; }

/* ── 빈 상태 ─────────────────────────────────────── */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state-icon { font-size: 42px; margin-bottom: 14px; }
.empty-state h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 13.5px; color: var(--muted); margin-bottom: 20px; line-height: 1.8; }

/* ── 사이드바 목록 ───────────────────────────────── */
.mini-list { padding: 6px 0; }
.mini-list li { padding: 10px 20px; border-bottom: 1px solid var(--border); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li > a { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.55; margin-bottom: 4px; }
.mini-list li > a:hover { color: var(--primary); }
.mini-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-light); }

.expert-mini-list { padding: 6px 0; }
.expert-mini-list li { display: flex; gap: 10px; align-items: center; padding: 9px 20px; }
.expert-mini-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber-soft); font-size: 15px;
}
.expert-mini-name { font-size: 13.5px; font-weight: 600; }
.expert-mini-name:hover { color: var(--primary); }
.expert-mini-type { font-size: 11.5px; color: var(--muted); }

.topic-list { padding: 6px 0; }
.topic-list li a {
  display: flex; align-items: center; gap: 10px; padding: 9px 20px;
  font-size: 13.5px; transition: background .15s;
}
.topic-list li a:hover { background: var(--surface-alt); color: inherit; }
.topic-list-icon { font-size: 16px; }
.topic-list-name { flex: 1; font-weight: 500; }
.topic-list-count {
  font-size: 11.5px; font-weight: 700; color: var(--topic-color, var(--muted));
  background: var(--surface-alt);  /* color-mix 미지원 브라우저용 대체 */
  background: color-mix(in srgb, var(--topic-color, var(--muted)) 11%, transparent);
  padding: 1px 8px; border-radius: 999px;
}

/* ── CTA 카드 ────────────────────────────────────── */
.cta-card { text-align: center; padding: 24px 20px; background: linear-gradient(180deg, var(--amber-soft), var(--surface) 70%); }
.cta-icon { font-size: 32px; margin-bottom: 10px; }
.cta-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.cta-card p { font-size: 12.5px; color: var(--muted); line-height: 1.75; margin-bottom: 16px; }
.cta-sub { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); text-decoration: underline; }

/* ── 페이지 머리말 ───────────────────────────────── */
.list-head { padding: 6px 0 20px; margin-bottom: 18px; border-bottom: 2px solid var(--border); }
.list-head h1 {
  font-size: 24px; font-weight: 800; letter-spacing: -.5px;
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.list-head-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px; font-size: 20px;
  background: var(--surface-alt);  /* color-mix 미지원 브라우저용 대체 */
  background: color-mix(in srgb, var(--head-color, var(--primary)) 12%, transparent);
}
.list-head p { font-size: 14px; color: var(--muted); line-height: 1.75; }

/* ── 목록 툴바 ───────────────────────────────────── */
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.list-count { font-size: 13.5px; color: var(--muted); }
.list-count strong { color: var(--primary); font-weight: 700; }
.list-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sort-group { display: flex; background: var(--surface-alt); border-radius: 999px; padding: 3px; }
.sort-btn { font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 5px 13px; border-radius: 999px; }
.sort-btn:hover { color: var(--text); }
.sort-btn.active { background: var(--surface); color: var(--primary); font-weight: 700; box-shadow: var(--shadow); }

/* ── 페이지네이션 ────────────────────────────────── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 26px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13.5px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--muted); transition: all .15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.page-dots { color: var(--muted-light); padding: 0 4px; }

/* ── 버튼 ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  padding: 11px 20px; border-radius: 9px; border: 1px solid transparent;
  transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-lg { font-size: 15px; padding: 13px 26px; }
.btn-sm { font-size: 12.5px; padding: 7px 13px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-text { background: transparent; border: 0; padding: 5px 8px; font-size: 12.5px; color: var(--muted); }
.btn-text:hover { color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-accept { color: var(--success); font-weight: 700; }
.btn-accept:hover { background: var(--success-soft); color: var(--success); }
/* 히어로 안의 고스트 버튼은 어두운 배경 위에 놓입니다 */
.hero .btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }

.inline-form { display: inline-flex; gap: 6px; align-items: center; }

/* ── 브레드크럼 ──────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); margin-bottom: 16px;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb > span { color: var(--border-strong); }

/* ── 글 상세 ─────────────────────────────────────── */
.post-detail-head { padding: 28px 32px 20px; border-bottom: 1px solid var(--border); }
.post-detail-title {
  font-size: 25px; font-weight: 800; line-height: 1.45;
  letter-spacing: -.5px; margin: 10px 0 18px;
}
.post-detail-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.post-detail-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff;
  background: var(--avatar-color, var(--primary));
}
.author-avatar.sm { width: 32px; height: 32px; font-size: 14px; background: var(--amber-soft); color: var(--ink); }
.author-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 14.5px; }
.author-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.notice-box {
  display: flex; gap: 32px; flex-wrap: wrap; margin-top: 20px;
  background: var(--amber-soft); border: 1px solid #EFDFB4;
  border-radius: var(--radius); padding: 14px 18px;
}
.notice-box dt { font-size: 11.5px; font-weight: 700; color: #7A5B10; margin-bottom: 2px; }
.notice-box dd { font-size: 14px; font-weight: 600; }
.notice-box dd a { color: var(--primary); text-decoration: underline; }

.post-content {
  padding: 30px 32px; font-size: 15.5px; line-height: 2;
  word-break: break-word; overflow-wrap: break-word;
}
.post-detail-foot {
  padding: 20px 32px 26px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.helpful-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border-strong);
  padding: 11px 24px; border-radius: 999px; transition: all .15s;
}
.helpful-btn:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.helpful-btn.voted { background: var(--amber-soft); border-color: var(--amber); color: #7A5B10; }
.helpful-btn strong { font-family: 'Inter', sans-serif; }
.helpful-btn.sm { font-size: 12px; padding: 4px 11px; }
.post-disclaimer { font-size: 12px; color: var(--muted-light); text-align: center; line-height: 1.7; }

/* 이전/다음 */
.adjacent-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.adjacent-link {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px; transition: border-color .15s;
}
.adjacent-link:hover { border-color: var(--primary); color: inherit; }
.adjacent-link span { font-size: 11.5px; color: var(--muted-light); font-weight: 600; }
.adjacent-link strong {
  font-size: 13.5px; font-weight: 500; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.adjacent-link.align-end { text-align: right; align-items: flex-end; }

/* ── 댓글 ────────────────────────────────────────── */
.comment-section { margin-top: 22px; }
.comment { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.comment-accepted { background: var(--success-soft); border-left: 3px solid var(--success); }
.accepted-flag { font-size: 12px; font-weight: 700; color: var(--success); margin-bottom: 8px; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.comment-author { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13.5px; flex: 1; min-width: 0; }
.comment-time { font-size: 12px; color: var(--muted-light); }
.comment-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.comment-body { font-size: 14.5px; line-height: 1.9; padding-left: 42px; word-break: break-word; }
.comment-empty { padding: 34px 22px; text-align: center; font-size: 13.5px; color: var(--muted); line-height: 1.8; }

.comment-form { padding: 22px; background: var(--surface-alt); border-top: 1px solid var(--border); }
.comment-form-as {
  font-size: 13px; color: var(--muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.comment-form-as strong { color: var(--text); }

/* ── 폼 ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label, legend.form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.form-label span { color: var(--primary); }
.form-label .optional { color: var(--muted-light); font-weight: 500; }
.form-control {
  width: 100%; font-family: inherit; font-size: 14.5px; line-height: 1.7;
  padding: 11px 14px; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.form-control { resize: vertical; min-height: 96px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.form-hint a { color: var(--primary); text-decoration: underline; }
.char-count { font-size: 11.5px; color: var(--muted-light); text-align: right; margin-top: 5px; font-family: 'Inter', sans-serif; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 0; }

.check-line { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.7; cursor: pointer; }
.check-line input { margin-top: 4px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--primary); }
.agree-line { margin: 20px 0; padding: 14px; background: var(--surface-alt); border-radius: var(--radius); }

.form-card { margin-bottom: 16px; }
.form-body { padding: 22px; }
.status-line {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 13.5px; line-height: 1.75; padding: 14px 16px;
  border-radius: var(--radius); border: 1px solid;
}
.status-ok       { background: var(--success-soft); border-color: #C9E4CE; color: #1F5C33; }
.status-pending  { background: var(--warn-soft);    border-color: #EFDFB4; color: #7A5B10; }
.status-rejected { background: var(--danger-soft);  border-color: #F2CFC8; color: #8E3A2D; margin-bottom: 16px; }

/* ── 글쓰기 ──────────────────────────────────────── */
.write-layout { max-width: 800px; margin: 0 auto; }
.write-card { padding: 28px 30px; }

.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.radio-card {
  display: flex; flex-direction: column; gap: 4px; cursor: pointer;
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 14px; transition: all .15s; position: relative;
}
.radio-card:hover { border-color: var(--border-strong); background: var(--surface-alt); }
.radio-card input { position: absolute; opacity: 0; }
.radio-card.selected {
  border-color: var(--type-color, var(--primary));
  background: var(--surface-alt);  /* color-mix 미지원 브라우저용 대체 */
  background: color-mix(in srgb, var(--type-color, var(--primary)) 7%, transparent);
}
.radio-card-icon { font-size: 20px; }
.radio-card-name { font-size: 14px; font-weight: 700; }
.radio-card-desc { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

.write-as {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px;
}
.write-as strong { font-size: 14.5px; }
.write-as-edit { margin-left: auto; font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.write-textarea { min-height: 380px; line-height: 1.9; }

.write-guide {
  background: var(--amber-soft); border: 1px solid #EFDFB4;
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px;
}
.write-guide strong { display: block; font-size: 13px; color: #7A5B10; margin-bottom: 7px; }
.write-guide ul { list-style: disc; padding-left: 18px; }
.write-guide li { font-size: 12.5px; color: #7A5B10; line-height: 1.85; }

.write-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── 로그인 / 회원가입 ───────────────────────────── */
.auth-layout { max-width: 440px; margin: 20px auto; }
.auth-layout-wide { max-width: 640px; }
.auth-card { padding: 32px 30px; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 8px; }
.auth-head p { font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 20px; }
.auth-alt a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.auth-note { text-align: center; font-size: 12px; color: var(--muted-light); margin-top: 8px; }

.expert-apply {
  background: var(--amber-soft); border: 1px solid #EFDFB4;
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 4px;
}
.expert-apply-desc { font-size: 12.5px; color: #7A5B10; line-height: 1.8; margin: 8px 0 12px; }

/* ── 프로필 ──────────────────────────────────────── */
.profile-card { text-align: center; padding: 26px 20px; }
.profile-avatar {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: var(--amber-soft);
}
.profile-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.profile-type { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.profile-company { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.profile-stats { display: flex; justify-content: center; gap: 26px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.profile-stats dt { font-size: 11.5px; color: var(--muted-light); margin-bottom: 3px; }
.profile-stats dd { font-size: 16px; font-weight: 700; }

.profile-head { display: flex; gap: 20px; padding: 28px 30px; align-items: flex-start; }
.profile-head-avatar {
  width: 68px; height: 68px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: var(--amber-soft);
}
.profile-head-body { min-width: 0; }
.profile-head h1 { font-size: 23px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.profile-head-type { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.profile-head-bio { font-size: 14px; line-height: 1.85; margin-bottom: 12px; }
.profile-head-meta { font-size: 12.5px; color: var(--muted); }

/* ── 전문가 찾기 ─────────────────────────────────── */
.expert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.expert-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 20px; text-align: center;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.expert-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--amber-light); color: inherit; }
.expert-card-avatar {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: var(--amber-soft);
}
.expert-card-name { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 4px; }
.expert-card-type { font-size: 12.5px; color: var(--primary); font-weight: 600; margin-bottom: 3px; }
.expert-card-company { font-size: 12px; color: var(--muted); }
.expert-card-bio { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 10px; }
.expert-card-foot { font-size: 11.5px; color: var(--muted-light); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ── 안내 스트립 ─────────────────────────────────── */
.info-strip {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 24px; margin-top: 24px;
}
.info-strip strong { display: block; font-size: 14px; margin-bottom: 8px; }
.info-strip ul, .info-strip ol { padding-left: 20px; list-style: disc; }
.info-strip ol { list-style: decimal; }
.info-strip li { font-size: 13px; color: var(--muted); line-height: 1.9; }
.info-strip a { color: var(--primary); text-decoration: underline; }

/* ── 용어사전 ────────────────────────────────────── */
.glossary-tools { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.glossary-search { flex: 1; min-width: 240px; }
.glossary-search input {
  width: 100%; font-family: inherit; font-size: 14.5px; padding: 12px 18px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
}
.glossary-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.glossary-count { font-size: 13.5px; color: var(--muted); }
.glossary-count strong { color: var(--primary); font-weight: 700; }

.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.term-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; scroll-margin-top: 140px;
}
.term-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.term-name { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.term-cat { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-alt); padding: 2px 9px; border-radius: 999px; flex-shrink: 0; }
.term-full { font-size: 12.5px; color: var(--amber); font-weight: 600; margin-bottom: 10px; }
.term-desc { font-size: 13.5px; color: var(--text); line-height: 1.85; }
.term-related { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.term-related > span { font-size: 11px; font-weight: 700; color: var(--muted-light); }
.term-rel {
  font-size: 11.5px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); border: 0; padding: 3px 10px; border-radius: 999px;
}
.term-rel:hover { background: var(--primary); color: #fff; }

/* 본문 속 용어 하이라이트 + 툴팁 */
.gt { border-bottom: 1px dashed var(--amber); cursor: help; color: inherit; }
.gt:hover, .gt:focus { background: var(--amber-soft); }
.gt-tip {
  position: absolute; z-index: 500; width: 320px; max-width: calc(100vw - 24px);
  background: var(--ink); color: #fff; border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--shadow-lg); font-size: 13px; line-height: 1.75;
}
.gt-tip-head { font-size: 15px; font-weight: 800; color: var(--amber-light); }
.gt-tip-full { font-size: 11.5px; color: rgba(255,255,255,.65); margin-bottom: 8px; }
.gt-tip-desc { color: rgba(255,255,255,.92); }
.gt-tip-related { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.15); }
.gt-tip-related > span { font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.5); }
.gt-tip-rel { font-size: 11px; background: rgba(255,255,255,.13); padding: 2px 8px; border-radius: 999px; }

/* ── 관리자 ──────────────────────────────────────── */
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.admin-tab {
  padding: 11px 16px; font-size: 13.5px; font-weight: 500; color: var(--muted);
  white-space: nowrap; border-bottom: 3px solid transparent;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.tab-badge {
  font-style: normal; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--danger); padding: 1px 7px; border-radius: 999px; margin-left: 3px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; }
.stat-tile dt { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.stat-tile dd { font-size: 26px; font-weight: 800; font-family: 'Inter', sans-serif; }
.stat-alert { border-color: var(--danger); background: var(--danger-soft); }
.stat-alert dd { color: var(--danger); }

.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-cols .card + .card { margin-top: 0; }

.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted);
  padding: 10px 14px; background: var(--surface-alt); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td.num { text-align: right; font-family: 'Inter', sans-serif; }
.admin-table a:hover { color: var(--primary); text-decoration: underline; }
.cell-sub { font-size: 11.5px; color: var(--muted-light); margin-top: 2px; }
.cell-note { font-size: 12px; color: var(--muted); line-height: 1.7; max-width: 320px; }
.admin-search { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-search .form-control { max-width: 320px; }
.admin-empty { padding: 32px; text-align: center; font-size: 13.5px; color: var(--muted); }
.row-inactive { opacity: .5; }
.admin-badge {
  font-size: 10.5px; font-weight: 700; color: #fff; background: var(--ink);
  padding: 1px 7px; border-radius: 999px; margin-left: 5px;
}

/* ── 푸터 ────────────────────────────────────────── */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); margin-top: 60px; }
.footer-inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px; padding-top: 44px; padding-bottom: 36px;
}
.footer-logo-img { height: 38px; width: auto; margin-bottom: 12px; filter: brightness(0) invert(1) opacity(.92); }
.footer-tagline { font-size: 13px; color: var(--amber-light); font-weight: 600; margin-bottom: 8px; }
.footer-desc { font-size: 12.5px; line-height: 1.85; color: rgba(255,255,255,.55); }
.footer-links h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-links a { display: block; font-size: 12.5px; color: rgba(255,255,255,.62); padding: 4px 0; }
.footer-links a:hover { color: var(--amber-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; }
.footer-bottom p { font-size: 11.5px; color: rgba(255,255,255,.45); text-align: center; line-height: 1.7; }

/* ===================================================
   반응형
   =================================================== */
@media (max-width: 1024px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .type-grid { grid-template-columns: 1fr; }
  .admin-cols { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }

  .topbar-msg { display: none; }
  .topbar-inner { justify-content: flex-end; }

  .header-inner { flex-wrap: wrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .site-logo-img { height: 36px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-actions { margin-left: auto; }
  .nav-link { padding: 11px 12px; font-size: 13.5px; }

  .hero { flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 24px; }
  .hero-text h1 { font-size: 23px; }
  .hero-stats { gap: 20px; width: 100%; justify-content: space-between; }
  .hero-stats dd { font-size: 21px; }
  .only-desktop { display: none; }

  .post-detail-head, .post-content, .post-detail-foot { padding-left: 20px; padding-right: 20px; }
  .post-detail-title { font-size: 21px; }
  .post-content { font-size: 15px; }
  .comment-body { padding-left: 0; }

  .form-row { grid-template-columns: 1fr; gap: 0; }
  .radio-cards { grid-template-columns: 1fr; }
  .write-card { padding: 22px 18px; }
  .write-textarea { min-height: 280px; }
  .write-actions { flex-direction: column-reverse; }
  .write-actions .btn { width: 100%; }

  .adjacent-nav { grid-template-columns: 1fr; }
  .adjacent-link.align-end { text-align: left; align-items: flex-start; }

  .profile-head { flex-direction: column; align-items: center; text-align: center; }
  .term-grid, .expert-grid { grid-template-columns: 1fr; }

  .list-head h1 { font-size: 20px; }
  .list-head-icon { width: 34px; height: 34px; font-size: 17px; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .post-item { padding: 15px 16px; gap: 11px; }
  .post-avatar { width: 32px; height: 32px; font-size: 13px; }
  .post-title { font-size: 14.5px; }
  .hero-stats { flex-wrap: wrap; gap: 16px 24px; }
  .auth-card { padding: 24px 18px; }
}

/* 인쇄 */
@media print {
  .topbar, .site-header, .site-footer, .sidebar, .comment-form,
  .post-detail-foot, .adjacent-nav, .breadcrumb { display: none !important; }
  .page-layout { grid-template-columns: 1fr; }
  body { background: #fff; }
  .card { border: 0; }
}
