:root {
  --max-w: 800px;
  --color-bg: #fff;
  --color-text: #1a1a1a;
  --color-muted: #666;
  --color-border: #e5e7eb;
  --color-accent: #2563eb;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.site-name { font-size: 1.25rem; font-weight: 700; color: var(--color-text); }

.lang-switcher { font-size: 0.875rem; }
.lang-switcher a { color: var(--color-muted); margin: 0 0.25rem; }
.lang-switcher a.active { color: var(--color-accent); font-weight: 600; }

.main-content {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 3rem;
}
.site-footer a { color: var(--color-muted); margin-left: 1rem; }

/* Homepage */
.home-intro { margin-bottom: 1rem; }
.home-intro h1 { font-size: 1.75rem; }
.site-description { margin-top: 0.5rem; font-size: 1rem; color: var(--color-muted); }

.category-section { margin-bottom: 3rem; }
.category-section > h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}
.category-section > h2 a { color: var(--color-text); }

.view-all { display: inline-block; margin-top: 1rem; font-size: 0.875rem; }

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.post-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.post-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.post-card-body { padding: 1rem; }

/* dayone (TCG 카드): 세로형 카드 이미지는 잘리지 않게 전체를 보여준다 */
.site-dayone .post-card img {
  height: 300px;
  object-fit: contain;
  background: radial-gradient(circle at 50% 32%, #243047 0%, #0f172a 100%);
  padding: 1rem;
}
.cat-badge { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--color-accent); color: #fff; margin-bottom: 0.6rem; text-decoration: none; letter-spacing: 0.02em; white-space: nowrap; }
.cat-badge:hover { opacity: 0.85; text-decoration: none; transform: translateY(-1px); transition: opacity 0.15s, transform 0.15s; }
.cat-travel  { background: #0ea5e9; }
.cat-food    { background: #f97316; }
.cat-activities { background: #8b5cf6; }
.cat-hobby   { background: #ec4899; }
.cat-pokemon    { background: #dc2626; }
.cat-one-piece  { background: #0284c7; }
.post-card h2 { font-size: 1rem; padding: 0 0 0.4rem; line-height: 1.4; }
.post-card h2 a { color: var(--color-text); }
.post-card h2 a:hover { color: var(--color-accent); text-decoration: none; }
.post-card p { font-size: 0.875rem; color: var(--color-muted); padding: 0; line-height: 1.5; }

/* Pinned (종합 시세) — 풀 컬러 배너 카드 */
.post-card.pinned { border: none; border-radius: 12px; }
.pinned-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 300px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
}
.pinned-inner:hover { text-decoration: none; }
.pinned-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.pinned-prices { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.pinned-prices span {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
}
.pinned-meta {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  background: rgba(255,255,255,0.12);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  letter-spacing: 0.01em;
}
.pinned-cta {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  transition: transform 0.15s;
}
.post-card.pinned:hover .pinned-cta { transform: translateX(3px); }

/* 포켓몬 시세: 카드 뒷면 — 딥 블루 + 소용돌이 에너지 */
.pinned-pokemon {
  box-shadow: 0 4px 20px rgba(127,29,29,0.35);
}
.pinned-pokemon:hover { box-shadow: 0 8px 28px rgba(127,29,29,0.5); }
.pinned-pokemon .pinned-inner {
  background: radial-gradient(ellipse at 35% 50%, #b91c1c 0%, #7f1d1d 60%, #450a0a 100%);
  border: 1px solid #991b1b;
  position: relative;
  overflow: hidden;
}
/* 소용돌이 에너지 — 선버스트 */
.pinned-pokemon .pinned-inner::before {
  content: '';
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 260px;
  opacity: 0.18;
  pointer-events: none;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255,255,255,0.9) 0deg 8deg,
    transparent 8deg 30deg
  );
}
/* 몬스터볼 실루엣 — 동심원 + 중앙 버튼 */
.pinned-pokemon .pinned-inner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 260px;
  opacity: 0.22;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%,
      rgba(255,255,255,0.9) 4%, transparent 4.5%,
      transparent 18%, rgba(255,255,255,0.7) 18.5%, transparent 19%,
      transparent 35%, rgba(255,255,255,0.7) 35.5%, transparent 36%,
      transparent 49%, rgba(255,255,255,0.7) 49.5%, transparent 50%
    );
}
.pinned-pokemon .pinned-title { color: #fff; position: relative; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.pinned-pokemon .pinned-prices { position: relative; }
.pinned-pokemon .pinned-prices span { background: rgba(255,255,255,0.12); color: #fecaca; border: 1px solid rgba(255,255,255,0.2); }
.pinned-pokemon .pinned-meta { color: #fecaca; background: rgba(255,255,255,0.08); position: relative; }
.pinned-pokemon .pinned-cta { background: #fff; color: #7f1d1d; position: relative; font-weight: 800; }

/* 원피스 시세: 카드 뒷면 — 다크 네이비 + 골드 나침반(로그포스) */
.pinned-one-piece {
  box-shadow: 0 4px 20px rgba(11,21,80,0.4);
}
.pinned-one-piece:hover { box-shadow: 0 8px 28px rgba(11,21,80,0.55); }
.pinned-one-piece .pinned-inner {
  background: radial-gradient(ellipse at 65% 50%, #1e2d8a 0%, #0d1962 60%, #080f3c 100%);
  border: 1px solid #2a3b9e;
  position: relative;
  overflow: hidden;
}
/* 나침반 동심원 — 골드 링 */
.pinned-one-piece .pinned-inner::before {
  content: '';
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 260px;
  opacity: 0.38;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%,
      #c9940a 2.5%, transparent 3%,
      transparent 10%, #c9940a 10.5%, transparent 11%,
      transparent 19%, #c9940a 19.5%, transparent 20%,
      transparent 28.5%, #c9940a 29%, transparent 29.5%,
      transparent 38.5%, #c9940a 39%, transparent 39.5%,
      transparent 48.5%, #c9940a 49%, transparent 49.5%
    );
}
/* 나침반 침로선 — 골드 방사 스포크 */
.pinned-one-piece .pinned-inner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 260px;
  opacity: 0.22;
  pointer-events: none;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(201,148,10,0.9) 0deg 1.5deg,
    transparent 1.5deg 15deg
  );
}
.pinned-one-piece .pinned-title { color: #fff; position: relative; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.pinned-one-piece .pinned-prices { position: relative; }
.pinned-one-piece .pinned-prices span { background: rgba(201,148,10,0.18); color: #fcd34d; border: 1px solid rgba(201,148,10,0.35); }
.pinned-one-piece .pinned-meta { color: #fcd34d; background: rgba(201,148,10,0.1); position: relative; }
.pinned-one-piece .pinned-cta { background: #c9940a; color: #080f3c; position: relative; font-weight: 800; }

/* Today's Card (오늘의 카드) — 일반 카드와 동일 크기, 테두리·배경색만 차별 */
.post-card.today {
  border: 2px solid transparent;
  border-radius: 8px;
}
.today-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

/* 오늘의 카드: 포켓몬 — 차분한 레드 */
.today-pokemon {
  border-color: #fecaca;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.today-pokemon:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.today-pokemon .post-card-body { background: #fef2f2; }
.today-pokemon h2 a { color: #991b1b; }
.today-pokemon .today-badge { background: #991b1b; }

/* 오늘의 카드: 원피스 — 차분한 블루 */
.today-one-piece {
  border-color: #bfdbfe;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.today-one-piece:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.today-one-piece .post-card-body { background: #eff6ff; }
.today-one-piece h2 a { color: #1e3a8a; }
.today-one-piece .today-badge { background: #1e3a8a; }

/* Category tabs */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 2rem;
}
.category-tabs a {
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
  transition: color 0.15s;
}
.category-tabs a:hover { color: var(--color-text); text-decoration: none; }
.category-tabs a.active { color: var(--color-accent); border-bottom-color: var(--color-accent); font-weight: 600; }


/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}
.back-link:hover { color: var(--color-accent); text-decoration: none; }

/* Breadcrumb */
.breadcrumb { font-size: 0.875rem; color: var(--color-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-accent); }

/* Post page */
.post-article h1 { font-size: 2rem; line-height: 1.3; margin-bottom: 1rem; }

/* 상단 대표(hero) 이미지 — 기본값은 기존 인라인 스타일과 동일 */
.post-hero { display: block; width: 100%; height: auto; aspect-ratio: 1200/630; object-fit: cover; }
/* dayone (TCG 카드): 세로형 카드는 잘리지 않게 전체를 보여준다 (리스트/관련글과 동일 톤) */
.site-dayone .post-hero {
  aspect-ratio: auto;
  width: auto;
  height: auto;
  max-width: 340px;
  max-height: 540px;
  margin: 0.5rem auto 1.75rem;
  padding: 1.25rem;
  object-fit: contain;
  background: radial-gradient(circle at 50% 32%, #243047 0%, #0f172a 100%);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22);
}

/* 카테고리별 카드 배경 — 포켓몬(레드)·원피스(오션블루)로 구분 (리스트/관련글/hero 공통) */
.site-dayone .post-card img.tcg-pokemon,
.site-dayone .post-hero.tcg-pokemon {
  background: radial-gradient(circle at 50% 32%, #4a1d24 0%, #160b0d 100%);
}
.site-dayone .post-card img.tcg-one-piece,
.site-dayone .post-hero.tcg-one-piece {
  background: radial-gradient(circle at 50% 32%, #143a52 0%, #08151f 100%);
}

.post-meta { display: flex; gap: 1rem; font-size: 0.875rem; color: var(--color-muted); margin-bottom: 1.5rem; }

.post-content { font-size: 1rem; line-height: 1.8; }
.post-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.post-content h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5rem 0; }
.post-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
  color: var(--color-muted);
  background: #f8fafc;
}
.post-content code { background: #f1f5f9; padding: 0.125rem 0.375rem; border-radius: 4px; font-size: 0.875em; }
.post-content pre { background: #1e293b; color: #e2e8f0; padding: 1rem; border-radius: 8px; overflow-x: auto; margin-bottom: 1.25rem; }
.post-content pre code { background: none; padding: 0; }

/* Prev/Next post navigation */
.post-nav {
  display: flex;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}
.post-nav a {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.post-nav a:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: var(--color-accent); text-decoration: none; }
.post-nav-next { text-align: right; }
.post-nav-empty { flex: 1; }
.post-nav-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
}
.post-nav-next .post-nav-label { justify-content: flex-end; }
.post-nav-arrow {
  font-size: 1.125rem;
  line-height: 1;
  color: var(--color-muted);
  transition: color 0.2s, transform 0.2s;
}
.post-nav a:hover .post-nav-arrow { color: var(--color-accent); }
.post-nav-prev:hover .post-nav-arrow { transform: translateX(-3px); }
.post-nav-next:hover .post-nav-arrow { transform: translateX(3px); }
.post-nav-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Related posts in same category */
.related-posts { margin: 2.5rem 0 1rem; }
.related-posts h2 { font-size: 1.25rem; margin-bottom: 1rem; }

/* Scroll to top button */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover { transform: translateY(-2px); }

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .pinned-inner { min-height: 260px; padding: 1.25rem; }
  .pinned-title { font-size: 1.3rem; }
  .post-article h1 { font-size: 1.5rem; }
  .back-to-top { bottom: 1rem; right: 1rem; }
  .post-nav { flex-direction: column; }
  .post-nav-next { text-align: left; }
}
