/* ═══════════════════════════════════════════════
   AI라이프툴 | ailifeinfo.com
   common.css - 디자인 시스템
   ═══════════════════════════════════════════════ */

/* ───────────────────────────────
   1. CSS 변수 (라이트 모드)
─────────────────────────────── */
:root {
  /* 브랜드 컬러 */
  --primary:        #FEE500;   /* 카카오 옐로우 */
  --primary-hover:  #E6CF00;
  --primary-dark:   #3C1E1E;   /* 카카오 브라운 */
  --accent:         #FF6B35;   /* 포인트 오렌지 */

  /* 배경 */
  --bg:             #F7F8FC;
  --bg-card:        #FFFFFF;
  --bg-input:       #F3F4F6;

  /* 텍스트 */
  --text:           #191919;
  --text-sub:       #6B7280;
  --text-muted:     #9CA3AF;

  /* 테두리 */
  --border:         #E5E7EB;
  --border-focus:   #FEE500;

  /* 그림자 */
  --shadow-sm:      0 1px 3px rgba(0,0,0,.06);
  --shadow:         0 2px 8px rgba(0,0,0,.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.12);

  /* 반경 */
  --radius-sm:      6px;
  --radius:         12px;
  --radius-lg:      20px;
  --radius-full:    9999px;

  /* 간격 */
  --space-xs:       4px;
  --space-sm:       8px;
  --space-md:       16px;
  --space-lg:       24px;
  --space-xl:       40px;

  /* 최대 너비 */
  --max-w:          1180px;
  --max-w-content:  780px;

  /* 폰트 */
  --font:           'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:      'Courier New', 'Consolas', monospace;

  /* 트랜지션 */
  --transition:     all 0.18s ease;
  --transition-fast:all 0.1s ease;
}

/* ───────────────────────────────
   2. CSS 변수 (다크 모드)
─────────────────────────────── */
[data-theme="dark"] {
  --bg:             #0F172A;
  --bg-card:        #1E293B;
  --bg-input:       #1E293B;

  --text:           #F1F5F9;
  --text-sub:       #94A3B8;
  --text-muted:     #64748B;

  --border:         #334155;
  --border-focus:   #FEE500;

  --shadow-sm:      0 1px 3px rgba(0,0,0,.3);
  --shadow:         0 2px 8px rgba(0,0,0,.4);
  --shadow-md:      0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.6);
}

/* ───────────────────────────────
   3. 리셋 & 기본
─────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* iOS 스크롤 바운스로 인한 레이아웃 흔들림 방지 */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 64px; /* 고정된 하단 네비바 높이 확보 */
  transition: background 0.2s, color 0.2s;
  overscroll-behavior-y: none; /* 위아래 당겨서 새로고침(pull-to-refresh) 방지 */
  height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font);
  cursor: pointer;
}

input, textarea, select {
  font-family: var(--font);
}

/* ───────────────────────────────
   4. 타이포그래피
─────────────────────────────── */
h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; line-height: 1.2; }
h2 { font-size: clamp(20px, 3vw, 28px); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(17px, 2.5vw, 22px); font-weight: 700; line-height: 1.4; }
h4 { font-size: 17px; font-weight: 600; }
h5 { font-size: 15px; font-weight: 600; }

p { line-height: 1.75; }

.text-xs   { font-size: 11px; }
.text-sm   { font-size: 13px; }
.text-base { font-size: 15px; }
.text-lg   { font-size: 17px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }

.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }

.text-sub   { color: var(--text-sub); }
.text-muted { color: var(--text-muted); }
.text-accent{ color: var(--accent); }
.text-brand { color: var(--primary-dark); }
[data-theme="dark"] .text-brand { color: var(--primary); }

/* ───────────────────────────────
   5. 레이아웃
─────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

.container-sm {
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 16px;
}

.page-body {
  padding: 32px 16px;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* 그리드 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }

/* 플렉스 유틸 */
.flex       { display: flex; }
.flex-col   { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.flex-wrap  { flex-wrap: wrap; }
.flex-1     { flex: 1; }

/* 간격 */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ───────────────────────────────
   6. 네비게이션
─────────────────────────────── */
.navbar {
  background: var(--primary);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 900;
  color: var(--primary-dark);
  white-space: nowrap;
  user-select: none;
}

.navbar__logo .logo-dot {
  color: var(--accent);
}

.navbar__logo img {
  height: 30px;
  width: auto;
}

.navbar__search {
  /* 모든 페이지가 자체 검색 UI를 갖고 있으므로
     상단 네비 검색창은 전역으로 숨김 (중복 방지) */
  display: none;
}

.navbar__links {
  margin-left: auto;
}

.navbar__search input {
  width: 100%;
  background: rgba(0,0,0,.1);
  border: none;
  border-radius: var(--radius-full);
  padding: 7px 14px 7px 36px;
  font-size: 14px;
  color: var(--primary-dark);
  outline: none;
  transition: background 0.15s;
}

.navbar__search input::placeholder {
  color: rgba(60,30,30,.5);
}

.navbar__search input:focus {
  background: rgba(0,0,0,.15);
}

.navbar__search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.navbar__icon-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  color: var(--primary-dark);
}

.navbar__icon-btn:hover {
  background: rgba(0,0,0,.1);
}

/* 네비 링크 (PC) */
.navbar__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar__link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  transition: background 0.15s;
  white-space: nowrap;
}

.navbar__link:hover {
  background: rgba(0,0,0,.1);
}

.navbar__link.active {
  background: rgba(0,0,0,.12);
}

/* ───────────────────────────────
   7. 카테고리 바
─────────────────────────────── */
.cat-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-bar::-webkit-scrollbar {
  display: none;
}

.cat-bar__inner {
  display: flex;
  padding: 0 12px;
  white-space: nowrap;
  gap: 2px;
}

.cat-bar__btn {
  background: none;
  border: none;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  transition: var(--transition-fast);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cat-bar__btn:hover {
  color: var(--text);
}

.cat-bar__btn.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

[data-theme="dark"] .cat-bar__btn.active {
  color: var(--primary);
}

/* ───────────────────────────────
   8. 카드
─────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: var(--space-lg);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card--tool {
  padding: 18px 16px 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card--tool:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.card--tool .tool-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}

.card--tool .tool-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card--tool .tool-desc {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
}

/* 인기 배지 */
.card--tool.popular::before {
  content: '인기';
  position: absolute;
  top: 0;
  left: 0;
  background: var(--primary);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius) 0 var(--radius-sm) 0;
}

/* 즐겨찾기 버튼 */
.card--tool .fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 4px;
  border-radius: 50%;
  line-height: 1;
}

.card--tool:hover .fav-btn,
.card--tool .fav-btn.active {
  opacity: 1;
}

/* 블로그 카드 */
.card--blog {
  cursor: pointer;
  overflow: hidden;
}

.card--blog:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card--blog .blog-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  background: var(--bg-input);
}

.card--blog .blog-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
}

[data-theme="dark"] .card--blog .blog-category {
  color: var(--primary-dark);
}

.card--blog .blog-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card--blog .blog-excerpt {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.card--blog .blog-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ───────────────────────────────
   9. 버튼
─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:active {
  transform: scale(0.97);
}

/* 주요 버튼 */
.btn--primary {
  background: var(--primary);
  color: var(--primary-dark);
}

.btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* 보조 버튼 */
.btn--secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn--secondary:hover {
  background: var(--border);
}

/* 다크 버튼 */
.btn--dark {
  background: var(--primary-dark);
  color: var(--primary);
}

.btn--dark:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* 아웃라인 버튼 */
.btn--outline {
  background: transparent;
  color: var(--primary-dark);
  border: 2px solid var(--primary-dark);
}

.btn--outline:hover {
  background: var(--primary-dark);
  color: var(--primary);
}

[data-theme="dark"] .btn--outline {
  color: var(--primary);
  border-color: var(--primary);
}

[data-theme="dark"] .btn--outline:hover {
  background: var(--primary);
  color: var(--primary-dark);
}

/* 복사 버튼 */
.btn--copy {
  background: var(--bg-input);
  color: var(--text);
}

.btn--copy:hover {
  background: var(--primary);
  color: var(--primary-dark);
}

/* 위험 버튼 */
.btn--danger {
  background: #FEE2E2;
  color: #DC2626;
}

.btn--danger:hover {
  background: #FCA5A5;
}

/* 사이즈 */
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--lg { padding: 14px 24px; font-size: 16px; border-radius: var(--radius); }
.btn--full { width: 100%; }
.btn--icon { padding: 8px; width: 36px; height: 36px; border-radius: 50%; }

/* 버튼 그룹 */
.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ───────────────────────────────
   10. 폼 요소
─────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ───────────────────────────────
   11. 배지 & 태그
─────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge--primary  { background: var(--primary); color: var(--primary-dark); }
.badge--gray     { background: var(--bg-input); color: var(--text-sub); }
.badge--green    { background: #DCFCE7; color: #166534; }
.badge--red      { background: #FEE2E2; color: #991B1B; }
.badge--blue     { background: #DBEAFE; color: #1D4ED8; }
.badge--orange   { background: #FEF3C7; color: #92400E; }

[data-theme="dark"] .badge--gray   { background: var(--border); color: var(--text-sub); }
[data-theme="dark"] .badge--green  { background: #14532D; color: #86EFAC; }
[data-theme="dark"] .badge--red    { background: #7F1D1D; color: #FCA5A5; }
[data-theme="dark"] .badge--blue   { background: #1E3A5F; color: #93C5FD; }

.badge-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ───────────────────────────────
   12. 섹션 헤더
─────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.section-header .more-link {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
  transition: color 0.15s;
}

.section-header .more-link:hover {
  color: var(--text);
}

/* ───────────────────────────────
   13. 광고 슬롯
─────────────────────────────── */
.ad-slot {
  width: 100%;
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
}

/* 광고 유형별 크기 */
.ad-slot--top-banner    { height: 90px; }
.ad-slot--content       { min-height: 100px; padding: 16px; }
.ad-slot--sidebar       { height: 250px; max-width: 300px; }
.ad-slot--tool          { min-height: 90px; }
.ad-slot--footer-banner { height: 90px; }

.ad-slot__label {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 9px;
  background: var(--border);
  color: var(--text-muted);
  padding: 1px 5px;
  border-radius: 3px;
}

.ad-slot__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: .6;
}

/* 광고 래퍼 */
.ad-wrap         { padding: 10px 16px; }
.ad-wrap--center { padding: 10px 16px; display: flex; justify-content: center; }

/* ───────────────────────────────
   14. 히어로
─────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #FFED4E 100%);
  padding: 52px 20px 44px;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.08);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero__title span {
  color: var(--accent);
}

.hero__subtitle {
  font-size: 16px;
  color: rgba(60,30,30,.7);
  margin-bottom: 28px;
}

.hero__search-wrap {
  max-width: 480px;
  margin: 0 auto 20px;
  position: relative;
}

.hero__search {
  width: 100%;
  padding: 14px 56px 14px 20px;
  border-radius: var(--radius-full);
  border: none;
  font-size: 15px;
  outline: none;
  box-shadow: var(--shadow-lg);
  color: #191919;
  background: #fff;
}

.hero__search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-dark);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
}

.hero__search-btn:hover {
  opacity: .9;
}

.hero__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__tag {
  background: rgba(0,0,0,.09);
  color: var(--primary-dark);
  border: none;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
}

.hero__tag:hover {
  background: rgba(0,0,0,.16);
}

/* ───────────────────────────────
   15. 하단 모바일 네비
─────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 490;
  height: 60px;
  transition: transform 0.3s ease-in-out;
}

body.nav-up .bottom-nav {
  transform: translateY(100%);
}

.bottom-nav__btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-sub);
  transition: color 0.15s;
}

.bottom-nav__btn .icon {
  font-size: 22px;
  line-height: 1;
}

.bottom-nav__btn.active {
  color: var(--primary-dark);
  font-weight: 700;
}

[data-theme="dark"] .bottom-nav__btn.active {
  color: var(--primary);
}

/* ───────────────────────────────
   16. 푸터
─────────────────────────────── */
.footer {
  background: #1A2433;
  color: #9CA3AF;
  font-size: 13px;
}

.footer__main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 44px 16px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer__brand .logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 10px;
}

.footer__brand .logo span {
  color: var(--accent);
}

.footer__brand p {
  color: #9CA3AF;
  font-size: 13px;
  line-height: 1.7;
}

.footer__col h4 {
  color: #E5E7EB;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer__col a {
  display: block;
  color: #9CA3AF;
  font-size: 13px;
  padding: 3px 0;
  transition: color 0.15s;
}

.footer__col a:hover {
  color: var(--primary);
}

.footer__bottom {
  border-top: 1px solid #2D3748;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #6B7280;
}

/* ───────────────────────────────
   17. 토스트 알림
─────────────────────────────── */
.toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1A2433;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 9999;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ───────────────────────────────
   18. 로딩 스피너
─────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-dark);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ───────────────────────────────
   19. 블로그 관련
─────────────────────────────── */
/* 마크다운 콘텐츠 렌더링 */
.prose {
  max-width: var(--max-w-content);
  margin: 0 auto;
  color: var(--text);
  line-height: 1.8;
}

.prose h1 { font-size: 32px; font-weight: 900; margin: 0 0 16px; }
.prose h2 { font-size: 24px; font-weight: 700; margin: 36px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.prose h3 { font-size: 20px; font-weight: 700; margin: 28px 0 10px; }
.prose h4 { font-size: 17px; font-weight: 600; margin: 20px 0 8px; }

.prose p { margin-bottom: 16px; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; color: var(--text-sub); }

.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; line-height: 1.7; }

.prose a { color: var(--accent); text-decoration: underline; }
.prose a:hover { opacity: .8; }

.prose blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  background: var(--bg-input);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  color: var(--text-sub);
}

.prose code {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.prose pre {
  background: #1A2433;
  color: #E2E8F0;
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 16px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.prose img {
  border-radius: var(--radius-sm);
  margin: 16px auto;
  max-width: 100%;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.prose th {
  background: var(--bg-input);
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
}

.prose td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}

.prose hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 28px 0;
}

/* ───────────────────────────────
   20. 유틸리티
─────────────────────────────── */
.hidden   { display: none !important; }
.visible  { display: block !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.text-center { text-align: center; }
.text-right  { text-align: right; }

.rounded     { border-radius: var(--radius); }
.rounded-sm  { border-radius: var(--radius-sm); }
.rounded-full{ border-radius: var(--radius-full); }

.shadow      { box-shadow: var(--shadow); }
.shadow-md   { box-shadow: var(--shadow-md); }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-sub);
}

.empty-state .icon { font-size: 52px; margin-bottom: 14px; }
.empty-state h3    { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.empty-state p     { font-size: 14px; }

/* 출력 박스 */
.output-box {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  min-height: 80px;
  word-break: break-all;
  white-space: pre-wrap;
  color: var(--text);
  line-height: 1.6;
}

/* 사이드바 레이아웃 */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* ───────────────────────────────
   21. 반응형
─────────────────────────────── */
@media (max-width: 1024px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .footer__main   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-row        { grid-template-columns: 1fr; }
  .hero            { padding: 36px 16px 30px; }
  .footer__main    { grid-template-columns: 1fr; gap: 20px; }
  .navbar__links   { display: none; }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: repeat(2, 1fr); }
}

/* PC 화면 설정 및 하단 네비 숨기기 */
@media (min-width: 1024px) {
  /* navbar uses sticky */
  body            { padding-bottom: 0; }
  .bottom-nav     { display: none; }
  .footer         { padding-bottom: 0; }
}

/* 모션 줄이기 설정 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}