/* Notion Design System - post-punk-underground blog */
:root {
  --font-sans: 'Inter', 'Noto Sans JP', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --page-bg: #0f0f12;
  --surface: #18181d;
  --surface-soft: #22222a;
  --text: #f5f5f7;
  --muted: #b8b8c4;
  --border: rgba(255, 255, 255, 0.12);
  --brand: #e31e79;
  --brand-soft: rgba(227, 30, 121, 0.14);
  --accent: #00ffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 12px 32px rgba(227, 30, 121, 0.12);
  --sidebar-width: 300px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-sans); color: var(--text); background: radial-gradient(circle at top left, rgba(227,30,121,0.18), transparent 30%), var(--page-bg); line-height: 1.75; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

.blog-header { position: sticky; top: 0; z-index: 20; background: rgba(15, 15, 18, 0.88); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); }
.blog-nav { max-width: 1180px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.blog-logo { font-weight: 900; color: var(--brand); letter-spacing: 0.04em; text-transform: uppercase; }
.blog-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.92rem; color: var(--muted); }
.blog-links a.active, .blog-links a:hover { color: var(--accent); }

.blog-hero { max-width: 1180px; margin: 0 auto; padding: 64px 24px 30px; }
/* 記事ページは ../styles.css の固定ヘッダー(.header, position:fixed)配下で表示されるため、
   本体サイトの .hero/.page-hero と同様に上部オフセットを確保する(トップページとの整合)。
   既存の色・フォントには触れず、article-header 用の余白のみ補完。 */
.blog-hero.article-header { padding-top: 144px; }
.blog-kicker { display: inline-flex; padding: 4px 12px; border-radius: 9999px; background: var(--brand-soft); color: var(--accent); border: 1px solid rgba(0,255,255,0.22); font-size: 0.82rem; font-weight: 800; }
.blog-hero h1, .article-header h1 { margin: 16px 0 12px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -0.04em; }
.blog-hero p, .article-lead { max-width: 760px; color: var(--muted); font-size: 1.05rem; }

.blog-layout { max-width: 1180px; margin: 0 auto; padding: 24px 24px 72px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.blog-main, .main-content { min-width: 0; }
.blog-list { display: grid; gap: 18px; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 1px rgba(0,0,0,0.24); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(0,255,255,0.25); }
.blog-card-body { padding: 24px; }
.blog-card time, .article-meta { color: var(--muted); font-size: 0.86rem; }
.blog-card h2 { margin: 8px 0 10px; font-size: 1.25rem; line-height: 1.45; letter-spacing: -0.02em; }
.blog-card p { margin: 0 0 14px; color: var(--muted); }
.read-more { color: var(--accent); font-weight: 800; font-size: 0.92rem; }

.blog-sidebar { display: grid; gap: 18px; position: sticky; top: 86px; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 18px; box-shadow: 0 1px 1px rgba(0,0,0,0.2); }
.sidebar-card h2, .sidebar-card h3 { margin: 0 0 12px; font-size: 1rem; }
.sidebar-card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.sidebar-card li + li { margin-top: 8px; }
.amazon-ad-box { min-height: 92px; display: grid; place-items: center; text-align: center; border: 1px dashed rgba(0,255,255,0.35); border-radius: 8px; background: linear-gradient(135deg, rgba(227,30,121,0.16), rgba(0,255,255,0.08)); color: var(--accent); font-weight: 800; }
.sitenavi-frame { width: 100%; min-height: 280px; border: 0; border-radius: 8px; background: var(--surface); }

.article-shell { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.article-header { border-bottom: 1px solid var(--border); margin-bottom: 28px; padding-bottom: 22px; }
.blog-hero-image { width: 100%; max-height: 430px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); margin: 0 0 28px; }
.article-body h2 { margin-top: 2rem; padding-top: 0.4rem; border-top: 1px solid var(--border); }
.article-body p { margin: 1rem 0; }

.blog-footer { border-top: 1px solid var(--border); background: #0b0b0e; }
.blog-footer-inner { max-width: 1180px; margin: 0 auto; padding: 28px 24px; color: var(--muted); font-size: 0.9rem; }
.blog-footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }

@media (max-width: 768px) {
  .blog-nav { align-items: flex-start; flex-direction: column; }
  .blog-layout { grid-template-columns: 1fr; padding-inline: 16px; }
  .blog-hero { padding-inline: 16px; }
  .blog-sidebar { position: static; }
}

/* ============================================================
   Blog Index Page (blog/index.html) 専用スタイル
   本体サイト（../styles.css）のデザイントーンを継承。
   記事ページ（20YYMMDD-NN.html）が使う上記セレクタは変更しない。
   ============================================================ */
body.blog-index-page {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic Medium', 'Meiryo', 'MS Gothic', sans-serif;
  line-height: 1.8;
  color: var(--text-light);
  background: var(--bg-dark);
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(227, 30, 121, 0.03) 25%, rgba(227, 30, 121, 0.03) 26%, transparent 27%, transparent 74%, rgba(227, 30, 121, 0.03) 75%, rgba(227, 30, 121, 0.03) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(139, 47, 201, 0.03) 25%, rgba(139, 47, 201, 0.03) 26%, transparent 27%, transparent 74%, rgba(139, 47, 201, 0.03) 75%, rgba(139, 47, 201, 0.03) 76%, transparent 77%, transparent);
  background-size: 50px 50px;
}
body.blog-index-page a:hover { color: var(--accent-neon); }
body.blog-index-page .logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(227, 30, 121, 0.5);
  line-height: 1.3;
}
body.blog-index-page .logo-text a { color: var(--primary-color); }

.blog-index-hero {
  padding: 140px 0 44px;
  text-align: center;
}
.blog-index-hero h1 {
  color: var(--primary-color);
  font-size: 2.6rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 0 0 15px rgba(227, 30, 121, 0.5);
  margin-bottom: 1rem;
}
.blog-index-lead {
  max-width: 780px;
  margin: 0 auto;
  color: var(--text-light);
  font-size: 1.05rem;
}

.blog-index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
  padding-bottom: 72px;
}
.blog-index-main { min-width: 0; }
.blog-index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.blog-index-card {
  background: var(--bg-card);
  border: 1px solid rgba(227, 30, 121, 0.25);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}
.blog-index-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: 0 8px 30px rgba(227, 30, 121, 0.4);
}
.blog-index-card-link { display: block; color: inherit; }
.blog-index-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-darker); }
.blog-index-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-index-card-body { padding: 1.2rem 1.3rem 1.4rem; }
.blog-index-card-body time {
  display: block;
  color: var(--accent-neon);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.blog-index-card-body h2 {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-white);
  margin-bottom: 0.6rem;
  letter-spacing: 0;
}
.blog-index-card-body p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 0;
}

.blog-index-sidebar {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 96px;
  min-width: 0;
}
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid rgba(227, 30, 121, 0.25);
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}
.sidebar-widget h2 {
  font-size: 1.05rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid rgba(227, 30, 121, 0.3);
  padding-bottom: 0.7rem;
  margin-bottom: 1rem;
}
.sidebar-widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar-widget li { margin-bottom: 0.7rem; }
.sidebar-widget li:last-child { margin-bottom: 0; }
.sidebar-widget li a {
  display: block;
  color: var(--text-light);
  font-size: 0.95rem;
  transition: var(--transition);
}
.sidebar-widget li a:hover { color: var(--accent-neon); padding-left: 0.4rem; }
.sidebar-note { font-size: 0.9rem; line-height: 1.7; margin-bottom: 0; }
.sidebar-ad { text-align: center; }
.sidebar-ad img { display: inline-block; max-width: 100%; height: auto; }
.blog-index-sidebar .amazon-banner { margin: 0; padding: 1.2rem; }

@media (max-width: 1200px) {
  .blog-index-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .blog-index-layout { grid-template-columns: 1fr; }
  .blog-index-sidebar { position: static; }
}
@media (max-width: 768px) {
  .blog-index-hero { padding: 115px 0 28px; }
  .blog-index-hero h1 { font-size: 1.9rem; }
  .blog-index-grid { grid-template-columns: 1fr; }
}

/* Mobile news-commentary readability baseline (shared site-local rule). */
@media (max-width: 768px) {
  .blog-main, .blog-container, .two-col-layout { min-width: 0; }
  .article-detail, .blog-article, .article-body { min-width: 0; }
  .article-detail .article-body, .blog-article { padding-inline: 16px; }
  .article-content {
    font-size: 1rem;
    line-height: 1.85;
    overflow-wrap: anywhere;
  }
  .article-content h2 { font-size: clamp(1.25rem, 6vw, 1.45rem); line-height: 1.4; }
  .article-content h3 { font-size: clamp(1.12rem, 5vw, 1.25rem); line-height: 1.45; }
  .article-content :is(img, iframe, video) { max-width: 100%; height: auto; }
  .article-content table { display: block; max-width: 100%; overflow-x: auto; }
  .sidebar, .blog-sidebar { position: static; order: 2; }
}
/* Mobile article reading width: keep outer page gutters, remove duplicated inner gutters. */
@media (max-width: 768px) {
  .article-content,
  .article-detail .article-body,
  .blog-article,
  .main-content > article.main-content {
    padding-left: 0;
    padding-right: 0;
  }
  /* Cap article-panel padding without removing deliberate card framing. */
  .article-panel,
  .article-main,
  .post-content,
  .article-detail {
    padding-left: min(16px, 4vw);
    padding-right: min(16px, 4vw);
  }
  .article-body { padding-left: 0; padding-right: 0; }
}

/* Mobile article width fix: styles.css applies padding to every nested
   article/section element, which compounds the side gutters on article pages. */
@media (max-width: 768px) {
  .blog-layout { padding-left: 12px !important; padding-right: 12px !important; }
  .blog-layout > .main-content,
  .blog-layout .article-shell,
  .blog-layout .article-body,
  .blog-layout .article-body > section { padding-left: 0 !important; padding-right: 0 !important; }
  .blog-layout > .main-content { padding-top: 0; padding-bottom: 0; }
  .blog-layout .article-shell { padding-top: 16px; padding-bottom: 16px; }
}
