/* ========================================================================
   생활꿀팁 — Editorial / Magazine Style
   Sans for body · Serif for headlines · Champagne gold accent
   ======================================================================== */

:root {
  --bg: #FFFFFF;
  --bg-soft: #FAFAF6;
  --bg-warm: #F6F2EA;
  --bg-card: #FFFFFF;

  --text: #14141A;
  --text-soft: #3D3D44;
  --sub: #6B6B70;
  --sub-light: #A4A4A8;
  --border: #E8E7E2;
  --border-soft: #F0EFEA;
  --rule: #14141A;

  /* Editorial palette */
  --accent: #2A3559;
  --accent-soft: #5C6A95;
  --accent-bg: #EEF0F6;
  --gold: #B8985A;
  --gold-soft: #F4EFDF;
  --gold-dark: #8A7142;

  /* Callouts — 더 차분한 톤 */
  --tip: #2F6B3F;
  --tip-bg: #F3F8F3;
  --tip-border: #CCDBCB;

  --warn: #8A5A1F;
  --warn-bg: #FAF5EB;
  --warn-border: #E4D4A8;

  --save: #5C3D88;
  --save-bg: #F4F1F8;
  --save-border: #D6C7E5;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'palt' 1;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

/* 헤드라인용 명조체 — 한국 에디토리얼 느낌 */
.serif,
.hero h1, .article-title, .cat-head h1, .step-title,
.featured-title, .card-title-large {
  font-family: 'Noto Serif KR', 'Source Han Serif KR', serif;
  font-weight: 900;
  letter-spacing: -0.03em;
}

/* ====== TOP RULE ====== */
.top-rule {
  height: 4px;
  background: var(--text);
}

/* ====== NAV ====== */
.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.96);
}

.logo {
  font-family: 'Noto Serif KR', serif;
  font-size: 21px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}
.logo span {
  color: var(--gold-dark);
  font-style: italic;
  font-weight: 700;
}
.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--text);
  color: #FFFFFF;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Serif KR', serif;
  font-size: 17px;
  font-weight: 900;
  font-style: italic;
  position: relative;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.logo-mark::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: 50%;
}
footer .f-logo {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  line-height: 1;
}
footer .f-logo .logo-mark {
  width: 28px;
  height: 28px;
  font-size: 15px;
}
footer .f-logo .logo-mark::after {
  width: 4px;
  height: 4px;
  top: 4px;
  right: 4px;
}

.nav-cats-bar {
  display: none;
}

.nav-search {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--text);
  background: transparent;
}
.nav-search input {
  padding: 8px 12px 8px 4px;
  font-size: 13px;
  border: none;
  outline: none;
  font-family: inherit;
  width: 200px;
  background: transparent;
  color: var(--text);
}
.nav-search input::placeholder { color: var(--sub-light); font-style: italic; }
.nav-search button {
  padding: 8px 6px;
  background: transparent;
  color: var(--text);
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ====== WRAP ====== */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 28px 80px; }
.wrap-wide { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ====== BREADCRUMB ====== */
.crumb {
  padding: 28px 0 0;
  font-size: 12px;
  color: var(--sub);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}
.crumb a { color: var(--sub); transition: color 0.15s; }
.crumb a:hover { color: var(--text); }

/* ====== HERO (hub) ====== */
.hero {
  background: var(--bg);
  padding: 96px 32px 72px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 32px; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 1px;
  background: var(--gold-dark);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 24px;
  padding-bottom: 0;
  border: none;
}
.hero h1 {
  font-size: 64px;
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--text);
}
.hero p {
  font-size: 17px;
  color: var(--sub);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto;
  font-weight: 400;
}

.cats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 56px;
  flex-wrap: wrap;
}
.cats a {
  padding: 8px 26px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
  border-right: 1px solid var(--border);
  transition: all 0.15s;
  letter-spacing: -0.01em;
}
.cats a:last-child { border-right: none; }
.cats a:hover { color: var(--text); }
.cats a.active { color: var(--gold-dark); }

/* ====== SECTION HEADER ====== */
h2.sec {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 80px 0 32px;
  padding-bottom: 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 16px;
}
h2.sec::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ====== CARD GRID — 매거진 스타일 ====== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
  background: transparent;
  border: none;
}

.card {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
  position: relative;
  border: none;
  border-radius: 0;
}
.card:hover { transform: translateY(-4px); }
.card:hover .card-img img { transform: scale(1.04); }
.card:hover .card-title { color: var(--gold-dark); }

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-soft);
  margin-bottom: 20px;
  position: relative;
}
.card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-soft);
  pointer-events: none;
  z-index: 1;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card-body { padding: 0; }

.card-cat {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
  transition: color 0.2s;
}

.card-desc {
  font-size: 14px;
  color: var(--sub);
  line-height: 1.7;
  margin-bottom: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--sub-light);
  padding-top: 14px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.02em;
}
.card-steps {
  background: transparent;
  color: var(--gold-dark);
  padding: 0;
  border: none;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ====== ARTICLE HEADER ====== */
.article-head {
  padding: 32px 0 0;
  text-align: center;
}

.article-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  margin-bottom: 28px;
  background: transparent;
  color: var(--gold-dark);
  border: none;
  text-transform: uppercase;
}
.article-cat::before,
.article-cat::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold-dark);
}

.article-title {
  font-size: 48px;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--text);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 12px;
  color: var(--sub);
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 28px;
  flex-wrap: wrap;
  letter-spacing: 0.02em;
}
.article-meta strong { color: var(--text); font-weight: 700; }
.article-meta .stars { color: var(--gold); letter-spacing: 2px; }

/* ====== INTRO IMAGE ====== */
.intro-img {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  margin: 48px 0 36px;
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
}
.intro-img img,
.step-img img,
.card-img img,
.related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ====== INTRO LEDE ====== */
.intro {
  font-size: 18px;
  line-height: 1.9;
  color: var(--text-soft);
  margin-bottom: 24px;
  font-weight: 400;
}
.intro:first-of-type::first-letter {
  initial-letter: 3;
  -webkit-initial-letter: 3;
  font-family: 'Noto Serif KR', serif;
  font-weight: 900;
  color: var(--text);
  margin-right: 8px;
  font-size: 56px;
  float: left;
  line-height: 0.9;
  padding-top: 6px;
  padding-right: 8px;
}
.intro strong { color: var(--text); font-weight: 700; }

/* ====== TOC ====== */
.toc {
  background: var(--bg-warm);
  border: none;
  padding: 32px 36px;
  margin: 48px 0;
  position: relative;
}
.toc::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: var(--gold-dark);
}

.toc-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 18px;
  padding-bottom: 0;
  border-bottom: none;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toc-list a {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 4px 0;
  line-height: 1.5;
  font-weight: 700;
  transition: color 0.15s;
}
.toc-list a:hover { color: var(--gold-dark); }
.toc-num {
  font-family: 'Noto Serif KR', serif;
  font-weight: 900;
  color: var(--gold-dark);
  font-size: 14px;
  min-width: 24px;
  font-style: italic;
}

/* ====== STEP ====== */
.step {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-soft);
  scroll-margin-top: 96px;
}
.step:last-child { border-bottom: none; }

.step-h {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.step-num {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--gold-dark);
  border-radius: 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 17px;
  font-weight: 900;
  color: var(--gold-dark);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  font-style: italic;
}

.step-title {
  font-size: 28px;
  line-height: 1.25;
  color: var(--text);
  flex: 1;
}

.step-img {
  width: 100%;
  aspect-ratio: 16/9;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  border: none;
  background: var(--bg-soft);
}

.step-body {
  font-size: 16px;
  line-height: 1.95;
  color: var(--text-soft);
}
.step-body p { margin-bottom: 16px; }
.step-body p:last-child { margin-bottom: 0; }
.step-body strong { color: var(--text); font-weight: 700; }
.step-body ol, .step-body ul {
  margin: 16px 0;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-body li { padding-left: 4px; }
.step-body a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.15s;
}
.step-body a:hover { text-decoration-color: var(--gold-dark); }

/* ====== CALLOUTS — 더 차분하고 격조있게 ====== */
.tip, .warn, .save {
  padding: 22px 26px;
  margin: 28px 0;
  font-size: 14px;
  line-height: 1.8;
  border: none;
  border-radius: 0;
  border-left: 3px solid;
  position: relative;
}

.tip {
  background: var(--tip-bg);
  border-left-color: var(--tip);
  color: #1F4A2C;
}
.warn {
  background: var(--warn-bg);
  border-left-color: var(--warn);
  color: #6B4413;
}
.save {
  background: var(--save-bg);
  border-left-color: var(--save);
  color: #432C66;
}
.tip strong, .warn strong, .save strong { font-weight: 800; letter-spacing: -0.01em; }

/* ====== TABLE ====== */
.tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 14px;
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
}
.tbl th {
  background: transparent;
  padding: 14px 16px;
  text-align: left;
  font-weight: 800;
  border-bottom: 1px solid var(--text);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}
.tbl td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-soft);
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--bg-soft); }
.tbl td strong { color: var(--text); font-weight: 700; }

/* ====== SUMMARY ====== */
.summary {
  background: var(--bg-warm);
  border: none;
  border-left: none;
  padding: 36px 40px;
  margin: 56px 0 0;
  position: relative;
}
.summary::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 32px; height: 3px;
  background: var(--gold-dark);
}
.summary h3 {
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.summary ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.summary li {
  font-size: 15px;
  line-height: 1.7;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--text-soft);
}
.summary li::before {
  content: '—';
  color: var(--gold-dark);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0;
}

/* ====== RELATED ====== */
.related {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 2px solid var(--text);
}
.related h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 28px;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.related-card {
  background: var(--bg);
  border: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}
.related-card:hover { transform: translateY(-2px); }
.related-card:hover .related-img img { transform: scale(1.04); }
.related-img {
  width: 100%;
  aspect-ratio: 4/3;
  flex-shrink: 0;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--bg-soft);
}
.related-img img { transition: transform 0.5s; }
.related-body { padding: 0; flex: 1; min-width: 0; }
.related-cat {
  font-size: 10px;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.related-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ====== CATEGORY PAGE — 정돈된 헤더 + 카테고리 nav ====== */
.cat-head {
  padding: 64px 32px 0;
  text-align: center;
  border-bottom: none;
  background: var(--bg);
  position: relative;
}
.cat-emoji {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  height: auto;
  line-height: 1;
  background: transparent;
  border: none;
  border-radius: 0;
}
.cat-emoji::before,
.cat-emoji::after {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--gold-dark);
}
.cat-head h1 {
  font-size: 40px;
  margin-bottom: 14px;
  color: var(--text);
  line-height: 1.15;
}
.cat-head p {
  font-size: 15px;
  color: var(--sub);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
}

/* 카테고리 간 이동 nav bar */
.cat-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 36px auto 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
  max-width: 1180px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sub);
  letter-spacing: 0.05em;
  transition: color 0.15s;
  border-radius: 0;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}
.cat-nav a:hover { color: var(--text); }
.cat-nav a.active { color: var(--text); }
.cat-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 18px; right: 18px;
  height: 2px;
  background: var(--gold-dark);
}

/* 컴팩트 카드 그리드 — 카테고리 페이지용 */
.cat-grid-wrap {
  max-width: 1180px;
  margin: 56px auto 0;
  padding: 0 32px;
}

.cat-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cat-meta-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.cat-meta-count {
  font-size: 12px;
  color: var(--sub);
  font-style: italic;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 36px 24px;
}
.cat-grid .card-img {
  aspect-ratio: 16/10;
  margin-bottom: 14px;
}
.cat-grid .card-title {
  font-size: 17px;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.cat-grid .card-desc {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.cat-grid .card-meta {
  padding-top: 10px;
  font-size: 11px;
}
.cat-grid .card-cat { font-size: 9px; margin-bottom: 8px; }

/* ====== FOOTER ====== */
footer {
  border-top: 2px solid var(--text);
  padding: 64px 32px 48px;
  text-align: center;
  color: var(--sub);
  font-size: 12px;
  margin-top: 120px;
  background: var(--bg);
  letter-spacing: 0.03em;
}
footer .f-logo {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
footer .f-logo span { color: var(--gold-dark); font-style: italic; font-weight: 700; }
footer a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--gold-dark); }

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .related-grid { grid-template-columns: 1fr; }
  .nav { padding: 0 20px; height: 60px; }
  .nav-search { display: none; }
  .wrap { padding: 0 22px 60px; }
  .wrap-wide { padding: 0 22px; }
  .hero { padding: 64px 24px 48px; }
  .hero h1 { font-size: 40px; }
  .article-title { font-size: 32px; }
  .cat-head { padding: 64px 24px 48px; }
  .cat-head h1 { font-size: 36px; }
  .step-title { font-size: 22px; }
  .step { padding: 44px 0; }
  .step-h { gap: 16px; }
  .step-num { width: 36px; height: 36px; font-size: 14px; }
  .summary, .toc { padding: 24px 26px; }
  .article-meta { gap: 12px; font-size: 11px; }
}

@media (max-width: 580px) {
  .grid { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 32px; }
  .article-title { font-size: 26px; }
  .intro { font-size: 16px; }
  .intro:first-of-type::first-letter { font-size: 44px; }
  .cats a { padding: 8px 16px; font-size: 12px; }
}
