:root {
  --color-bg-main: #f7fafd;
  --color-bg-card: #fff;
  --color-bg-sidebar: #f4f8fd;
  --color-primary: #1976d2;
  --color-secondary: #43e97b;
  --color-accent: #ffb300;
  --color-border: #e3eaf2;
  --color-shadow: rgba(26,115,232,0.08);
  --color-shadow-strong: rgba(26,115,232,0.18);
  --color-text-main: #232323;
  --color-text-muted: #888;
  --radius-card: 18px;
  --radius-pill: 22px;
  --shadow-card: 0 4px 24px var(--color-shadow);
  --shadow-strong: 0 10px 40px var(--color-shadow-strong);
  --font-main: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', Arial, sans-serif;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg-main);
  color: var(--color-text-main);
  font-size: 18px;
  line-height: 1.8;
  box-sizing: border-box;
  margin: 0;
  padding: 0 1em;
  overflow-x: hidden; /* 가로 스크롤 방지 */
  word-wrap: break-word; /* 긴 텍스트 줄바꿈 */
  overflow-wrap: break-word; /* 모던 브라우저 지원 */
  min-height: 100vh; /* 최소 높이를 뷰포트 높이로 설정 */
  position: relative; /* 상대 위치 설정 */
}

/* HTML에도 최소 높이 설정 */
html {
  min-height: 100vh;
  position: relative;
}

/* 모든 요소에 박스 모델 강제 적용 */
*, *::before, *::after {
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

a { color: #1a73e8; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: 2px solid #1a73e8; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; margin: 1.2em 0 0.6em; }
img { max-width: 100%; height: auto; border-radius: 8px; cursor: pointer; }

header {
  background: var(--color-bg-main);
  box-shadow: none;
  border-bottom: none;
  padding: 1.2em 0 0.7em 0;
  text-align: left;
}
header h1 {
  font-size: 2.3em;
  font-weight: 900;
  letter-spacing: 0.01em;
  margin: 0 0 2em 0;
  color: var(--color-primary);
  text-align: center;
}
.article-view h1 {
  font-size: 2.3em;
  font-weight: 900;
  letter-spacing: 0.01em;
  margin-bottom: 1.8em;
  color: var(--color-primary);
  text-align: left;
}
nav { margin: 1em 0; }

.post-list { 
  display: flex; 
  flex-direction: column; 
  gap: 1em; 
  margin-bottom: 1.2em; 
  margin-top: 2em;
}
.post-card { background: #f8f9fa; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); padding: 1.5em; transition: box-shadow 0.2s; }
.post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
.post-card h2 { font-size: 1.3em; margin: 0.5em 0; }
.post-card .summary { color: #555; font-size: 1em; margin-bottom: 0.5em; }
.post-card .meta { font-size: 0.95em; color: #888; display: flex; gap: 1em; }

.sidebar {
  background: #f4f6fa;
  border-radius: 10px;
  padding: 1.5em;
  margin-top: 2em;
  padding-bottom: 90px;
}
.sidebar-section {
  background: var(--color-bg-sidebar);
  border-radius: 14px;
  box-shadow: 0 2px 8px var(--color-shadow);
  padding: 2em;
  margin-bottom: 2.5em;
}
.sidebar-section:not(:last-child) {
  border-bottom: 2.5px solid #90caf9;
  margin-bottom: 2.2em;
  padding-bottom: 1.7em;
}
.sidebar-section h3 {
  font-size: 1.18em;
  font-weight: 900;
  color: #1976d2;
  display: flex;
  align-items: center;
  gap: 0.7em;
  vertical-align: middle;
  letter-spacing: 0.01em;
}
.sidebar-section h3:nth-of-type(1)::before { content: '📂'; font-size: 1.3em; color: #1976d2; }
.sidebar-section h3:nth-of-type(2)::before { content: '#'; font-size: 1.3em; color: #43a047; }
.sidebar-section h3:nth-of-type(3)::before { content: '⭐'; font-size: 1.3em; color: #ffb300; }
.sidebar-section h3:nth-of-type(4)::before { content: '🕒'; font-size: 1.3em; color: #8d6e63; }
.sidebar-section h3:nth-of-type(5)::before { content: '🔍'; font-size: 1.3em; color: #1a73e8; }
.sidebar-section:hover {
  box-shadow: 0 4px 16px rgba(26,115,232,0.10);
  background: #e3f2fd;
  transition: box-shadow 0.18s, background 0.18s;
}
.sidebar-section ul { margin-top: 0.7em; }
.sidebar-section ul { list-style: none; padding: 0; margin: 0; }
.sidebar-section li { margin-bottom: 0.4em; }

/* 사이드바 섹션 구분선/여백 개선 */
.sidebar-section:not(:last-child) {
  border-bottom: 1.5px solid #b0bec5;
  margin-bottom: 1.3em;
  padding-bottom: 1.3em;
}

/* 섹션 제목 아이콘 (nth-of-type으로 대체) */
.sidebar-section h3:nth-of-type(1)::before { content: '📂 '; }
.sidebar-section h3:nth-of-type(2)::before { content: '# '; }
.sidebar-section h3:nth-of-type(3)::before { content: '⭐ '; }
.sidebar-section h3:nth-of-type(4)::before { content: '🕒 '; }
.sidebar-section h3:nth-of-type(5)::before { content: '🔍 '; }

/* 태그 스타일 (class 없이도 적용) */
.sidebar-section a[class*="tag"],
.sidebar-section a[href*="/tag/"] {
  display: inline-block;
  background: #e3f0fc;
  color: var(--color-primary);
  border-radius: var(--radius-pill);
  font-size: 1em;
  padding: 0.35em 1.2em;
  margin: 0 0.3em 0.4em 0;
  font-weight: 700;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.sidebar-section a[class*="tag"]:hover,
.sidebar-section a[href*="/tag/"]:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--color-shadow-strong);
}

/* 검색 버튼 스타일 */
.sidebar-section button {
  border-radius: 8px;
  border: none;
  background: #1a73e8;
  color: #fff;
  font-size: 1em;
  padding: 0.55em 1.5em;
  margin-top: 0.3em;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(26,115,232,0.08);
  transition: background 0.18s;
}
.sidebar-section button:hover {
  background: #1765c1;
}

/* input+button 한 줄 배치(선택적) */
.sidebar-section form {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  align-items: stretch;
}
.sidebar-section input[type="text"] {
  height: 2.7em;
  line-height: 2.7em;
  box-sizing: border-box;
  padding: 0 1em;
  font-size: 1.08em;
  border: 1.5px solid var(--color-primary);
  border-radius: 8px;
  background: #fff;
}
.sidebar-section button {
  width: 100%;
  height: 2.7em;
  line-height: 2.7em;
  box-sizing: border-box;
  padding: 0;
  font-size: 1.08em;
  border: none;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: background 0.18s, box-shadow 0.18s;
  margin-top: 0.5em;
}
.sidebar-section button:hover {
  background: var(--color-secondary);
  color: #232323;
  box-shadow: 0 4px 16px var(--color-shadow-strong);
}

/* 플로팅 버튼 사이드바 열릴 때 숨김 예시 */
.sidebar.open ~ .floating-btn {
  display: none !important;
}

.sidebar-section ul, .sidebar-section li {
  font-size: 0.97em;
}

.ad-top, .ad-bottom { display: block; margin: 2em 0; text-align: center; }

/* 헤더 밑 광고 고정 */
.adsense-topbar {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 0.7em 0 0.5em 0;
  text-align: center;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 999998 !important;
  overflow: visible !important; /* 닫기 버튼 잘림 방지 */
  min-height: 40px;
  padding: 0.3em 0;
  margin-bottom: 0.3em;
  border-bottom: 2px solid #e3eaf2;
  box-shadow: 0 2px 12px rgba(26,115,232,0.07);
}
.adsense-topbar.visible {
  transform: translateY(0);
}
.ad-close-btn {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 24px !important;
  height: 24px !important;
  font-size: 16px !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.top-gap { height: 4px; }
.ad-top {
  margin-top: 0.7em;
  margin-bottom: 1.2em;
}
.ad-bottom {
  margin-top: 1.2em;
  margin-bottom: 0.7em;
}

/* 플로팅 버튼 - 클릭 유도 최적화 */
.floating-btn {
  /* 기본 floating-btn 스타일 - display: none 제거 */
}

/* 모바일용 플로팅 버튼 - 강제 표시 */
.floating-btn.mobile-floating-btn {
  display: flex !important; /* 강제 표시 */
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 1.2em !important;
  transform: translateX(-50%) !important;
  z-index: 999999 !important; /* 최고 우선순위 */
  justify-content: center;
  animation: cta-bounce 1.8s infinite cubic-bezier(.68,-0.55,.27,1.55);
  width: auto;
  min-width: 280px;
  max-width: 90vw;
  pointer-events: auto !important;
  /* 레이아웃 방해 완전 방지 */
  position: fixed !important;
  top: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  /* 레이아웃에서 완전히 분리 */
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 999999 !important;
  /* 다른 요소에 영향 주지 않음 */
  pointer-events: auto !important;
  /* 문서 흐름에서 제외 */
  position: fixed !important;
}
.floating-btn.mobile-floating-btn a {
  display: flex;
  align-items: center;
  gap: 0.6em;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3), 0 4px 16px rgba(118, 75, 162, 0.2);
  padding: 0.8em 1.4em;
  font-weight: 800;
  font-size: 1.05em;
  min-height: 44px;
  letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  outline: none;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  width: 100%;
  text-align: center;
  justify-content: center;
}
.floating-btn.mobile-floating-btn a:hover, .floating-btn.mobile-floating-btn a:focus {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 16px 48px rgba(102, 126, 234, 0.4), 0 8px 24px rgba(118, 75, 162, 0.3);
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.4);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.floating-btn.mobile-floating-btn .floating-btn__icon {
  font-size: 1.5em;
  margin-right: 0.3em;
  animation: cta-bounce 1.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}
.floating-btn.mobile-floating-btn:hover .floating-btn__icon {
  animation: cta-bounce 0.8s ease-in-out infinite;
  transform: scale(1.1);
}

/* 본문/카드/배너 가독성 */
body, article, .article-view { font-size: 19px; line-height: 1.85; color: #232323; background: #fff; }
/* 게시글 제목 여백 추가 */
.article-view h1, .article-view h2:first-of-type { 
  margin-top: 80px; /* 헤더(70px) + 광고(90px) + 여유공간(20px) → 80px로 축소 */
  margin-bottom: 0.3em;
  padding-top: 1em;
}
.post-card, .article-view { background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.07); padding: 2em 1.5em; margin-bottom: 2.5em; }
h1, h2, h3, h4, h5, h6 { font-weight: 800; margin: 1.5em 0 0.7em; letter-spacing: 0.01em; }
h2 { font-size: 1.35em; color: #1a73e8; }
h3 { font-size: 1.15em; color: #ff9800; }
p, li { font-size: 1.07em; margin-bottom: 1.2em; }
ul, ol { padding-left: 1.5em; }

/* h2, img 클릭 유도 효과 */
h2, img {
  cursor: pointer;
  transition: filter 0.2s, box-shadow 0.2s, transform 0.1s, outline 0.18s;
}
h2:hover, h2:focus, img:hover, img:focus {
  filter: brightness(1.15);
  box-shadow: 0 2px 12px rgba(67,233,123,0.18), 0 0 0 4px #43e97b;
  transform: scale(1.06);
  outline: 3px solid #43e97b;
  transition: box-shadow 0.18s, outline 0.18s, transform 0.12s;
}

/* CTA(배너) */
.cta-banner {
  background: linear-gradient(90deg,#ff9800 0%,#ff5722 100%);
  color: #fff;
  font-weight: 900;
  font-size: 1.18em;
  padding: 1.5em 2em;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(255,152,0,0.13);
  margin: 2.5em 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  min-height: 3.7em;
  position: relative;
}
.cta-banner:hover, .cta-banner:focus { background: linear-gradient(90deg,#ff5722 0%,#ff9800 100%); box-shadow: 0 8px 32px rgba(255,87,34,0.18); outline: 3px solid #ff9800; transform: scale(1.04); }
.cta-banner::before { content: '\1F449'; font-size: 1.6em; margin-right: 0.7em; vertical-align: middle; animation: cta-pulse 1.2s infinite alternate; }
@keyframes cta-bounce { 
  0%, 100% { transform: translateX(-50%) translateY(0); } 
  20% { transform: translateX(-50%) translateY(-6px); } 
  40% { transform: translateX(-50%) translateY(0); } 
  60% { transform: translateX(-50%) translateY(-3px); } 
  80% { transform: translateX(-50%) translateY(0); } 
}
@keyframes cta-pulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.15); opacity: 1; } }
.cta-text { margin-left: 0.5em; font-size: 1.13em; }

.table-of-contents {
  background: #e3f0fc;
  border-radius: 16px;
  box-shadow: 0 2px 12px var(--color-shadow);
  padding: 2em 2em 1.5em 2em;
  margin: 3.5em 0;
}
.toc-title {
  font-size: 1.25em;
  color: var(--color-primary);
  margin-bottom: 1em;
  font-weight: 800;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li {
  margin-bottom: 0.7em;
  font-size: 1.08em;
  position: relative;
  padding-left: 1.5em;
}
.toc-list li::before {
  content: '→';
  color: var(--color-secondary);
  font-size: 1.1em;
  position: absolute;
  left: 0;
  top: 0.1em;
}
.toc-list a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.18s;
}
.toc-list a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.post-meta-section { margin: 2em 0; }
.tags { margin-bottom: 1em; }
.related-posts ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1em; }
.related-posts li { background: #f8f9fa; border-radius: 8px; padding: 0.7em 1em; }
.comments-section { margin: 2em 0; }

/* 푸터 하단 고정 강화 */
footer {
  background: #222;
  color: #fff;
  padding: 2em 0;
  margin-top: 3em;
  /* 모바일에서 하단 여백 추가 */
  margin-bottom: 80px; /* 플로팅 버튼 공간 확보 */
  position: relative;
  z-index: 1;
  /* 푸터가 항상 하단에 위치하도록 */
  width: 100%;
  clear: both;
}

/* 모바일에서 푸터 하단 여백 조정 */
@media (max-width: 1024px) {
  footer {
    margin-bottom: 100px; /* 플로팅 버튼 공간 더 확보 */
  }
}

@media (max-width: 768px) {
  footer {
    margin-bottom: 90px; /* 중간 크기 모바일 */
  }
}

@media (max-width: 480px) {
  footer {
    margin-bottom: 80px; /* 작은 모바일 */
  }
}

.paging { display: flex; justify-content: center; align-items: center; gap: 0.5em; margin: 2em 0; }
.paging .num { background: #f4f6fa; color: #1a73e8; border-radius: 6px; padding: 0.4em 0.9em; font-weight: 700; transition: background 0.2s, color 0.2s; }
.paging .num:hover, .paging .num:focus { background: #1a73e8; color: #fff; outline: 2px solid #ff9800; }
.paging .prev, .paging .next { color: #888; font-weight: 700; padding: 0.4em 0.9em; border-radius: 6px; }
.paging .prev[disabled], .paging .next[disabled], .paging .prev.no_more, .paging .next.no_more { color: #ccc; pointer-events: none; }
@media (max-width: 900px) {
  .sidebar { padding: 0.8em; }
  .sidebar-section { padding-bottom: 0.8em; margin-bottom: 0.8em; }
  .sidebar-section h3 { font-size: 1.05em; }
  .sidebar-section ul, .sidebar-section li { font-size: 0.92em; }
  .sidebar-section input[type="text"] { font-size: 0.95em; padding: 0.38em 0.7em; }
  .sidebar-section button { font-size: 0.95em; padding: 0.38em 0.7em; }
  .footer-inner { padding: 0 1em; }
}
@media (max-width: 768px) {
  html, body {
    font-size: 14px !important;
  }
  body .article-view h1,
  .article-view h1,
  .article-view > h1 {
    font-size: 0.6em !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 480px) {
  /* 1. 제목, 목차 폰트 80% */
  .article-view h1,
  .article-view h2,
  .article-view h3,
  .table-of-contents,
  .toc-title,
  .toc-list,
  .toc-list li {
    font-size: 80% !important;
  }

  /* 2. 우측 잘림 방지 */
  .article-view,
  .table-of-contents,
  .toc-list,
  .toc-list li,
  .article-view h1,
  .article-view h2,
  .article-view h3,
  .article-view p,
  .article-view ul,
  .article-view ol,
  .article-view li {
    max-width: 100vw !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    padding-right: 0.2em !important;
  }
  .article-view img,
  .article-view figure img,
  .article-view .imageblock img {
    max-width: 98vw !important;
    height: auto !important;
    display: block;
    margin: 1em auto !important;
  }
}

/* 썸네일+제목/요약 가로 배치 (메인 리스트용) */
.post-card.horizontal {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5em;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  padding: 2em 1.5em;
  margin-bottom: 1.5em;
}
.post-thumb-link { flex-shrink: 0; }
.post-thumb-square {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  background: #f4f6fa;
}
.post-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-info h2 {
  font-size: 1.18em;
  color: #1a73e8;
  margin: 0 0 0.7em 0;
  font-weight: 800;
}
/* 요약 2줄, 150자 이내 */
.summary {
  color: #232323;
  font-size: 1.05em;
  margin-bottom: 0.7em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 3.6em;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .post-card.horizontal {
    flex-direction: column;
    align-items: stretch;
    padding: 1.1em;
  }
  .post-thumb-square {
    width: 100%;
    height: 180px;
  }
}
@media (max-width: 600px) {
  .post-card.horizontal { padding: 0.7em; }
  .post-thumb-square { height: 120px; }
  .post-info h2 { font-size: 1em; }
} 

.sidebar-section input[type="text"], .sidebar-section button {
  height: 2.5em;
  line-height: 2.5em;
  padding-top: 0;
  padding-bottom: 0;
}
@media (max-width: 600px) {
  .sidebar-section form {
    flex-direction: column;
    gap: 0.3em;
    align-items: stretch;
  }
  .sidebar-section input[type="text"], .sidebar-section button {
    width: 100%;
    min-width: 0;
    height: 2.5em;
    font-size: 1em;
  }
} 

.main-content-with-sidebar {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 3.5em;
}
.post-list {
  flex: 1 1 0;
}
.sidebar {
  width: 320px;
  flex-shrink: 0;
  position: relative;
}
.floating-btn.desktop-sidebar-btn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: block;
  position: sticky;
  bottom: 1.5em;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3), 0 4px 16px rgba(118, 75, 162, 0.2);
  border-radius: 50px;
  padding: 0.6em 0.6em;
  margin: 3.5em auto 0 auto;
  z-index: 20;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}
.floating-btn.desktop-sidebar-btn:hover, .floating-btn.desktop-sidebar-btn:focus {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 48px rgba(102, 126, 234, 0.4), 0 8px 24px rgba(118, 75, 162, 0.3);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  border-color: rgba(255, 255, 255, 0.4);
}
.floating-btn.desktop-sidebar-btn a {
  color: #fff;
  font-size: 1.1em;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 1em 0.6em;
  border-radius: 50px;
  background: none;
  box-shadow: none;
  white-space: normal;
  word-break: keep-all;
  text-align: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}
.floating-btn.desktop-sidebar-btn a:hover {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.floating-btn__icon {
  font-size: 2.2em;
  animation: cta-bounce 1.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}
.floating-btn.desktop-sidebar-btn:hover .floating-btn__icon {
  animation: cta-bounce 0.8s ease-in-out infinite;
  transform: scale(1.1);
}
@keyframes cta-bounce {
  0%, 100% { 
    transform: translateY(0) scale(1); 
  }
  50% { 
    transform: translateY(-8px) scale(1.05); 
  }
}
@media (max-width: 1024px) {
  .main-content-with-sidebar {
    flex-direction: column;
    gap: 0;
  }
  .sidebar {
    width: 100%;
    margin-top: 2.5em;
  }
  /* 데스크탑 사이드바 플로팅 버튼 숨김 */
  .floating-btn.desktop-sidebar-btn {
    display: none !important;
  }
  /* 모바일 플로팅 버튼 강제 표시 */
  .floating-btn.mobile-floating-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}
.article-view img,
.article-view figure img,
.article-view .imageblock img {
  float: left;
  display: block;
  margin: 1.5em 0 1.5em 0;
  clear: both;
  height: auto;
}
@media (min-width: 1025px) {
  .article-view img,
  .article-view figure img,
  .article-view .imageblock img {
    max-width: 70% !important;
  }
}

.h4-banner {
  display: flex;
  width: 90%;
  max-width: 700px;
  min-height: 50px;
  max-height: 120px;
  margin: 25px auto 25px auto;
  padding: 12px 20px;
  font-weight: bold;
  color: #000000;
  background-color: #ffd700;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 50px rgba(0,0,0,0.6);
  animation: blink 1s infinite;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  border: 2px solid #000000;
  justify-content: center;
  align-items: center;
  font-size: calc(16px + 1vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
} 

@media (max-width: 480px) {
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .main-content-with-sidebar,
  .post-list,
  .article-view,
  .sidebar,
  .sidebar-section,
  .cta-banner,
  .post-card,
  .ad-top,
  .ad-bottom {
    max-width: 96vw !important;
    box-sizing: border-box !important;
    padding-left: 2vw !important;
    padding-right: 2vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
  .cta-banner {
    font-size: 0.9em !important;
    padding: 0.7em 0.2em !important;
    min-width: 0 !important;
    word-break: break-word !important;
  }
  .post-card {
    padding: 0.7em 0.2em !important;
    min-width: 0 !important;
    word-break: break-word !important;
  }
  .sidebar, .sidebar-section {
    padding: 0.5em 0.2em !important;
    min-width: 0 !important;
  }
  .ad-top, .ad-bottom {
    padding: 0.3em 0.1em !important;
    min-width: 0 !important;
  }
  .article-view img,
  .article-view figure img,
  .article-view .imageblock img {
    max-width: 98vw !important;
    height: auto !important;
    display: block;
    margin: 0.5em auto !important;
  }
} 

@media (max-width: 768px) {
  html, body {
    font-size: 12px !important;
  }
  .article-view h1,
  .article-view > h1 {
    font-size: 0.6em !important;
    line-height: 1.2 !important;
  }
} 

@media (max-width: 360px) {
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    font-size: 11px !important;
  }
  .cta-banner,
  .h4-banner,
  .article-view,
  .article-view img,
  .article-view figure img,
  .article-view .imageblock img,
  .post-card,
  .ad-top,
  .ad-bottom,
  .sidebar,
  .sidebar-section,
  .main-content-with-sidebar {
    max-width: 94vw !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding-left: 3vw !important;
    padding-right: 3vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    word-break: break-all !important;
    white-space: normal !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    outline: none !important;
    gap: 0 !important;
    flex-shrink: 1 !important;
  }
  .cta-banner, .h4-banner {
    font-size: 0.9em !important;
    min-width: 0 !important;
    padding: 0.5em 0.2em !important;
  }
  .article-view h1, .article-view h2, .article-view h3, .article-view h4 {
    font-size: 0.7em !important;
    word-break: break-all !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
  }
  .article-view p, .article-view li, .article-view ul, .article-view ol {
    font-size: 0.9em !important;
    word-break: break-all !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
  }
  .floating-btn, .floating-btn.mobile-floating-btn, .floating-btn.desktop-sidebar-btn {
    max-width: 94vw !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 0.7em !important;
  }
  .floating-btn a, .floating-btn.mobile-floating-btn a, .floating-btn.desktop-sidebar-btn a {
    min-width: 0 !important;
    max-width: 94vw !important;
    font-size: 0.7em !important;
    padding: 0.2em 0.2em !important;
    word-break: break-all !important;
  }
} 

@media (max-width: 480px) {
  .floating-btn.mobile-floating-btn {
    min-width: 312px !important; /* 240px * 1.3 */
    max-width: 98vw !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 0 !important;
  }
  .floating-btn.mobile-floating-btn a {
    font-size: 1.5em !important; /* 1.15em * 1.3 */
    padding: 1.43em 2.08em !important; /* 1.1em * 1.3, 1.6em * 1.3 */
    min-height: 62px !important; /* 48px * 1.3 */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    border-width: 2.5px !important;
  }
}
@media (max-width: 400px) {
  .floating-btn.mobile-floating-btn {
    min-width: 234px !important; /* 180px * 1.3 */
    max-width: 98vw !important;
  }
  .floating-btn.mobile-floating-btn a {
    font-size: 1.3em !important; /* 1em * 1.3 */
    padding: 1.17em 1.56em !important; /* 0.9em * 1.3, 1.2em * 1.3 */
    min-height: 52px !important; /* 40px * 1.3 */
  }
}
@media (max-width: 360px) {
  .floating-btn.mobile-floating-btn {
    min-width: 182px !important; /* 140px * 1.3 */
    max-width: 98vw !important;
  }
  .floating-btn.mobile-floating-btn a {
    font-size: 1.24em !important; /* 0.95em * 1.3 */
    padding: 0.91em 1.04em !important; /* 0.7em * 1.3, 0.8em * 1.3 */
    min-height: 47px !important; /* 36px * 1.3 */
  }
} 

@media (max-width: 480px) {
  .floating-btn.mobile-floating-btn .floating-btn__top,
  .floating-btn.mobile-floating-btn .floating-btn__bottom {
    font-size: 1.2em !important;
  }
  .floating-btn.mobile-floating-btn .floating-btn__icon {
    font-size: 2.75em !important;
  }
} 

@media (max-width: 480px) {
  .floating-btn.mobile-floating-btn a {
    padding-top: 0.5em !important;
    padding-bottom: 0.5em !important;
    min-height: 32px !important;
  }
  .floating-btn.mobile-floating-btn {
    bottom: 0.5em !important;
  }
}
@media (max-width: 400px) {
  .floating-btn.mobile-floating-btn a {
    padding-top: 0.4em !important;
    padding-bottom: 0.4em !important;
    min-height: 28px !important;
  }
  .floating-btn.mobile-floating-btn {
    bottom: 0.3em !important;
  }
}
@media (max-width: 360px) {
  .floating-btn.mobile-floating-btn a {
    padding-top: 0.3em !important;
    padding-bottom: 0.3em !important;
    min-height: 24px !important;
  }
  .floating-btn.mobile-floating-btn {
    bottom: 0.2em !important;
  }
} 

@media (max-width: 480px) {
  .article-view img,
  .article-view figure img,
  .article-view .imageblock img {
    float: left !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 1em !important;
    margin-bottom: 1em !important;
    max-width: 100% !important;
    width: auto !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    clear: both !important;
  }
  .article-view,
  .article-view figure {
    padding-left: 0 !important;
  }
} 