/* ===== 임영웅 소식 알리미 — Royal Blue + Gold 팔레트 ===== */

/* ===== 1. CSS 변수 ===== */
:root {
  --brand: #1E3A8A;
  --brand-2: #F59E0B;
  --brand-grad: linear-gradient(135deg, #1E3A8A 0%, #F59E0B 100%);
  --brand-light: #DBEAFE;
  --brand-dark: #152453;
  --text: #1F2937;
  --text-muted: #6B7280;
  --surface: #FFFFFF;
  --bg: #F8FAFC;
  --border: #E5E7EB;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 12px rgba(30, 58, 138, 0.08);
  --shadow-sm: 0 2px 6px rgba(30, 58, 138, 0.06);
}

/* ===== 2. Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ===== 3. 풀블리드 상단 광고 ===== */
.ad-container.top-ad {
  width: 100%;
  background: #f9fafb;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

/* ===== 4. 풀블리드 헤더 ===== */
.main-header {
  width: 100%;
  background: var(--brand-grad);
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.main-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(245, 158, 11, 0.25) 0%, transparent 60%),
              radial-gradient(ellipse at bottom left, rgba(30, 58, 138, 0.4) 0%, transparent 60%);
  pointer-events: none;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.header-link {
  display: inline-block;
  text-decoration: none;
}

.main-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.main-header .subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 0.5rem;
  font-weight: 400;
}

.btn-share-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-share-header:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* ===== 5. 컨테이너 (1100px 표준) ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

.layout-container {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

.main-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== 6. 사이드바 (컨트롤타워 sidebar.js 마크업 매칭) ===== */
.app-sidebar {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-sidebar::-webkit-scrollbar { display: none; }

.sidebar-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.sidebar-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-left: 8px;
  border-left: 3px solid var(--brand-2);
  color: var(--text);
}

.sidebar-card.recommended-card h3 {
  border-left-color: var(--brand);
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  margin-bottom: 4px;
}

.sidebar-list a {
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  transition: background .15s, transform .15s;
}

.sidebar-list a:hover {
  background: var(--brand-light);
  transform: translateX(2px);
}

.link-icon {
  margin-right: 10px;
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.4;
}

.link-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.link-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-desc {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
}

/* ===== 7. 카드 공통 ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ===== 8. 섹션 제목 ===== */
section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== 9. D-Day 위젯 ===== */
.dday-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.dday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.dday-card {
  background: var(--brand-grad);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  color: #fff;
}

.dday-label {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 6px;
}

.dday-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ===== 10. 최신 영상 섹션 ===== */
.videos-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

#videos-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

#videos-list[data-loading="1"] {
  display: block;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 20px 0;
}

.video-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--brand-light);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-info {
  padding: 12px;
}

.video-info h3 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.video-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== 11. 섹션 공통 (차트·콘서트·방송) ===== */
.chart-section,
.concert-section,
.broadcast-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 12px 0;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-link:hover {
  background: var(--brand-dark);
}

/* ===== 12. 어록 카드 ===== */
.quote-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.quote-card {
  background: linear-gradient(135deg, var(--brand-light) 0%, #FEF9C3 100%);
  border-radius: var(--radius-sm);
  padding: 16px;
  border-left: 4px solid var(--brand);
  position: relative;
}

.quote-card blockquote {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.quote-card .quote-source {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: right;
}

/* ===== 13. 뉴스 섹션 ===== */
.news-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.news-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}

.news-links a:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand);
}

/* ===== 14. popular-section (SEO 플레이스홀더) ===== */
.popular-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

#popular-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ===== 14-1. popular-card 링크 스타일 ===== */
.popular-card {
  display: inline-block;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}

.popular-card:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand);
}

/* ===== 15. FAQ ===== */
.faq-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.faq-section details {
  border-bottom: 1px solid var(--border);
}

.faq-section details:last-child {
  border-bottom: none;
}

.faq-section summary {
  padding: 14px 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.faq-section summary::-webkit-details-marker { display: none; }

.faq-section summary::before {
  content: '+';
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.faq-section details[open] summary::before { content: '−'; }

.faq-section details p {
  padding: 4px 4px 16px 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== 13-B. 콘서트 카드 ===== */
.concert-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.concert-h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 4px 0 10px;
  padding-left: 8px;
  border-left: 3px solid var(--brand-2);
}
.concert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 768px) { .concert-grid { grid-template-columns: 1fr; } }
.concert-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.concert-card:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.concert-poster {
  width: 80px;
  height: 110px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #eee;
}
.concert-poster img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.concert-info { flex: 1; min-width: 0; }
.concert-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.concert-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.78rem;
}
.concert-state.up {
  background: #DCFCE7;
  color: #166534;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.concert-state.done {
  background: #F3F4F6;
  color: #6B7280;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.concert-date { color: var(--text-muted); }
.concert-venue {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.concert-empty {
  padding: 18px;
  background: var(--brand-light);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--brand-dark);
  text-align: center;
  line-height: 1.6;
}
.concert-source-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.55;
  word-break: keep-all;
}
.concert-tickets {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.concert-tickets a {
  padding: 8px 14px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}
.concert-tickets a:hover { background: var(--brand); color: #fff; }

/* ===== 13-C. 방송 출연 카드 ===== */
.broadcast-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
#broadcasts-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 768px) { #broadcasts-list { grid-template-columns: 1fr; } }
.bcast-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.bcast-card:hover {
  background: var(--brand-light);
  border-color: var(--brand);
}
.bcast-thumb {
  width: 100px;
  aspect-ratio: 16/9;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #eee;
}
.bcast-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bcast-info { flex: 1; min-width: 0; }
.bcast-channel {
  font-size: 0.7rem;
  color: var(--brand-2);
  font-weight: 700;
  margin-bottom: 4px;
}
.bcast-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bcast-date { font-size: 0.72rem; color: var(--text-muted); }
.bcast-empty {
  padding: 20px;
  background: var(--brand-light);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--brand-dark);
  text-align: center;
  line-height: 1.7;
}
.broadcast-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ===== 13-D. 디스코그래피 ===== */
.discography-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.disco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.disco-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #F1F5F9 0%, #FEF3C7 100%);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
}
.disco-emoji { font-size: 28px; flex-shrink: 0; }
.disco-body { flex: 1; min-width: 0; }
.disco-year {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 3px;
}
.disco-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.disco-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
}
.disco-links {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.disco-links a {
  padding: 8px 14px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}
.disco-links a:hover { background: var(--brand); color: #fff; }

/* ===== 13-E. 블로그 후기 ===== */
.blog-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
#blog-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blog-card {
  display: block;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.blog-card:hover {
  background: var(--brand-light);
  border-color: var(--brand);
}
.blog-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.blog-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.blog-author { font-weight: 600; }
.blog-source-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* ===== 13-F. 굿즈/MD ===== */
.md-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.md-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 768px) { .md-grid { grid-template-columns: 1fr; } }
.md-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.md-card:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  transform: translateY(-1px);
}
.md-icon { font-size: 26px; flex-shrink: 0; }
.md-body { flex: 1; min-width: 0; }
.md-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 3px;
}
.md-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.md-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* ===== 14-B. 뉴스 카드 ===== */
.news-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
#news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.news-card {
  display: block;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-2);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.news-card:hover {
  background: var(--brand-light);
  border-left-color: var(--brand);
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}
.news-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.news-date { color: var(--text-muted); }
.news-go { color: var(--brand); font-weight: 600; }
.news-source-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}
.news-more {
  margin-top: 8px;
  text-align: center;
}
.news-more a {
  display: inline-block;
  padding: 8px 18px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.news-more a:hover { background: var(--brand); color: #fff; }

/* ===== 15-A. SNS 모음 ===== */
.sns-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.sns-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}
@media (max-width: 768px) { .sns-grid { grid-template-columns: 1fr; } }

.sns-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: #fff;
  transition: transform .15s, box-shadow .15s, filter .15s;
  min-width: 0;
}
.sns-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  filter: brightness(1.08);
}

.sns-youtube { background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%); }
.sns-instagram { background: linear-gradient(135deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%); }
.sns-x { background: linear-gradient(135deg, #1D1D1F 0%, #000000 100%); }
.sns-facebook { background: linear-gradient(135deg, #1877F2 0%, #0E5FCC 100%); }

.sns-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  width: 38px;
  text-align: center;
  font-weight: 800;
}

.sns-body {
  flex: 1;
  min-width: 0;
}

.sns-name {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.sns-handle {
  font-size: 0.78rem;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sns-arrow {
  font-size: 1.6rem;
  font-weight: 300;
  opacity: 0.7;
  flex-shrink: 0;
}

.sns-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ===== 16. related-grid ===== */
.related-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}
@media (max-width: 768px) { .related-grid { grid-template-columns: 1fr; } }

.related-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  min-width: 0;
}

.related-link:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.rel-emoji {
  font-size: 26px;
  flex-shrink: 0;
}

.rel-body {
  flex: 1;
  min-width: 0;
}

.rel-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-link:hover .rel-title { color: var(--brand); }

.rel-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 17. 하단 광고 ===== */
.ad-container.bottom-ad {
  width: 100%;
  background: #f9fafb;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  margin-top: 24px;
}

/* ===== 18. 푸터 ===== */
.main-footer {
  width: 100%;
  background: var(--brand-dark);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 24px 16px;
  font-size: 0.85rem;
  line-height: 1.8;
}

.main-footer p { margin: 4px 0; }

.main-footer .disclaimer {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 700px;
  margin: 8px auto 0;
  line-height: 1.6;
}

/* ===== 19. 토스트 ===== */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1F2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.3s ease;
  pointer-events: none;
}

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

/* ===== 20. 유틸 ===== */
.hidden { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--brand-grad);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* ===== 21. 중앙 광고 슬롯 시스템 (ad-loader.js 렌더) ===== */
.ad-slot {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: linear-gradient(135deg, #1E3A8A, #152453);
  color: #fff;
  position: relative;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ad-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.ad-slot.banner-wide {
  aspect-ratio: 4/1;
  max-width: 800px;
  margin: 20px auto;
}

.ad-slot.banner-square {
  aspect-ratio: 1/1;
  max-width: 320px;
  margin: 20px auto;
}

.ad-slot .ad-inner {
  position: absolute;
  inset: 0;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
}

.ad-slot.has-image .ad-inner {
  background: linear-gradient(90deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .25) 60%, rgba(0, 0, 0, 0) 100%);
}

.ad-slot.banner-square .ad-inner {
  padding: 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .55) 100%);
  justify-content: flex-end;
}

.ad-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ad-slot .ad-inner { z-index: 1; }

.ad-slot .ad-label {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, .75);
  background: rgba(0, 0, 0, .25);
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
}

.ad-slot .ad-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.2px;
}

.ad-slot.banner-square .ad-title { font-size: 17px; }

.ad-slot .ad-subtitle {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 2px;
}

.ad-slot .ad-cta {
  display: inline-block;
  align-self: flex-start;
  margin-top: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: background .15s;
}

.ad-slot .ad-cta:hover { background: rgba(255, 255, 255, 0.4); }

/* 카카오 채널 슬롯 — 전 사이트 공통 브랜드 (노랑 #FEE500 + 브라운 #3C1E1E) */
.ad-slot.kakao-channel,
.ad-slot[data-ad-type="kakao-channel"] {
  background: #FEE500;
  border-color: rgba(0, 0, 0, 0.12);
}

.ad-slot.kakao-channel.has-image .ad-inner,
.ad-slot[data-ad-type="kakao-channel"].has-image .ad-inner {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0) 40%);
}

.ad-slot.kakao-channel .ad-title,
.ad-slot[data-ad-type="kakao-channel"] .ad-title {
  color: #3C1E1E;
  text-shadow: none;
}

.ad-slot.kakao-channel .ad-subtitle,
.ad-slot[data-ad-type="kakao-channel"] .ad-subtitle {
  color: rgba(60, 30, 30, 0.82);
  opacity: 1;
}

.ad-slot.kakao-channel .ad-label,
.ad-slot[data-ad-type="kakao-channel"] .ad-label {
  background: #3C1E1E;
  color: #FEE500;
}

.ad-slot.kakao-channel .ad-cta,
.ad-slot[data-ad-type="kakao-channel"] .ad-cta {
  background: #3C1E1E;
  color: #FEE500;
  border-color: transparent;
}

/* ===== 22. 반응형 ===== */
@media (max-width: 1024px) {
  .layout-container {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    max-height: none;
  }

  #videos-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .main-header h1 {
    font-size: 1.5rem;
  }

  .container {
    padding: 16px 12px;
  }

  .dday-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #videos-list {
    grid-template-columns: 1fr;
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ad-slot.banner-wide {
    aspect-ratio: 3/1;
  }
}

@media (max-width: 520px) {
  .main-header h1 {
    font-size: 1.25rem;
  }

  .main-header .subtitle {
    font-size: 0.82rem;
  }

  .dday-grid {
    grid-template-columns: 1fr 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ad-slot.banner-wide {
    aspect-ratio: 2.5/1;
  }
}
