/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; line-height: 1.15; }

/* ===== Base ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #1e293b;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Back to Index ===== */
.back-to-index {
  margin-bottom: 24px;
}
.back-to-index a {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}
.back-to-index a:hover {
  color: #2563eb;
}

/* ===== Layout ===== */
.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

@media (max-width: 640px) {
  .article-body {
    padding: 24px 16px 60px;
  }
}

/* ===== Hero Image ===== */
.article-hero {
  margin: 0 0 1.5rem;
}
.article-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ===== Article Dates ===== */
.article-dates {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

/* ===== Typography ===== */
.article-body h1 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  color: #0f172a;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1e293b;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.article-body h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: #334155;
}

.article-body strong {
  font-weight: 600;
  color: #0f172a;
}

.article-body em {
  font-style: italic;
}

/* ===== Links ===== */
.article-body a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-color: #93c5fd;
  text-underline-offset: 2px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.article-body a:hover {
  color: #1d4ed8;
  text-decoration-color: #1d4ed8;
}

/* ===== Images ===== */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  display: block;
}

.article-body figure {
  margin: 1.5rem 0;
}

.article-body figcaption {
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.5rem;
}

/* ===== Lists ===== */
.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}

.article-body ul {
  list-style-type: disc;
}

.article-body ol {
  list-style-type: decimal;
}

.article-body li {
  margin-bottom: 0.375rem;
  color: #334155;
}

.article-body li > ul,
.article-body li > ol {
  margin-top: 0.375rem;
  margin-bottom: 0;
}

/* ===== Blockquote ===== */
.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #3b82f6;
  background-color: #f8fafc;
  border-radius: 0 8px 8px 0;
  color: #475569;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* ===== Table ===== */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
  border: 1px solid #e2e8f0;
}

@media (min-width: 641px) {
  .article-body table {
    display: table;
  }
}

.article-body thead th,
.article-body tbody tr:first-child th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
}

.article-body tbody td {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.article-body tbody tr:hover {
  background-color: #f8fafc;
}

/* ===== Code ===== */
.article-body code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background-color: #f1f5f9;
  color: #be185d;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.article-body pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background-color: #1e293b;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.6;
}

.article-body pre code {
  background-color: transparent;
  color: #e2e8f0;
  padding: 0;
  font-size: 0.875rem;
}

/* ===== Horizontal Rule ===== */
.article-body hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2.5rem 0;
}

/* ===== Definition List ===== */
.article-body dl {
  margin-bottom: 1.25rem;
}

.article-body dt {
  font-weight: 600;
  color: #0f172a;
  margin-top: 1rem;
}

.article-body dd {
  margin-left: 1.5rem;
  color: #334155;
}

/* ===== iframe (YouTube等) ===== */
.article-body iframe {
  max-width: 100%;
  margin: 1.5rem 0;
  border-radius: 8px;
}

/* ===== Author Footer ===== */
.author-footer-container {
  display: flex;
  align-items: flex-start;
  border-top: 2px solid #e0e0e0;
  padding: 25px;
  margin-top: 30px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.author-footer-image-wrapper {
  flex-shrink: 0;
  margin-right: 20px;
}

.article-body .author-footer-image {
  width: 100px;
  height: 100px;
  min-width: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ddd;
  display: inline-block;
  margin: 0;
}

.author-footer-info p {
  margin: 0 0 5px 0;
  color: #343a40;
  line-height: 1.5;
}

.author-footer-name {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 8px;
}

.author-footer-title,
.author-footer-organization {
  font-size: 1em;
  color: #555;
}

.author-footer-bio {
  font-size: 0.95em;
  color: #444;
}

.author-footer-links a {
  color: #2563eb;
  text-decoration: none;
  margin-right: 12px;
  font-size: 0.9em;
}

.author-footer-links a:hover {
  text-decoration: underline;
}

.author-footer-published-at {
  font-size: 0.9em;
  color: #777;
  margin-top: 10px;
}

.author-footer-name {
  cursor: pointer;
  transition: color 0.2s;
}
.author-footer-name:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* ===== Author Profile Modal ===== */
.author-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-modal {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px;
  text-align: center;
}
.author-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}
.author-modal-close:hover {
  color: #475569;
}
.author-modal-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ddd;
  margin-bottom: 16px;
}
.author-modal-name {
  font-size: 1.5em;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 4px;
}
.author-modal-title {
  font-size: 1em;
  color: #475569;
  margin-bottom: 2px;
}
.author-modal-organization {
  font-size: 0.9em;
  color: #64748b;
}
.author-modal-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 20px 0;
}
.author-modal-bio-label {
  font-size: 0.85em;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  text-align: left;
}
.author-modal-bio {
  font-size: 0.95em;
  color: #475569;
  line-height: 1.8;
  white-space: pre-wrap;
  text-align: left;
}
.author-modal-links {
  text-align: left;
}
.author-modal-links a {
  display: block;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9em;
  margin-bottom: 6px;
}
.author-modal-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .author-footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .author-footer-image-wrapper {
    margin-right: 0;
    margin-bottom: 15px;
  }
  .author-modal {
    padding: 24px 16px;
  }
}

/* ===== Custom CSS ===== */
  /* ===== MAiRO Column Custom CSS ===== */

  /* ---------- ヒーローセクション ---------- */
  .hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0e4d92 100%);
    padding: 80px 24px;
    text-align: center;
  }

  /* オーバーレイを薄めに（背景画像使用時） */
  .hero--bg-image::before {
    background: rgba(15, 23, 42, 0.4);
  }

  .hero__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.04em;
    line-height: 1.25;
    margin-bottom: 16px;
    /* 既存のスタイルに追記 */
    text-shadow:
      0 2px 6px rgba(0, 0, 0, 0.5),
      0 4px 20px rgba(0, 0, 0, 0.3);
  }

  .hero__subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto;
    background: none;      /* ピル削除 */
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    text-shadow:
      0 1px 3px rgba(0, 0, 0, 0.9),
      0 2px 16px rgba(0, 0, 0, 0.7);
  }

  /* ---------- 記事カード ---------- */
  .article-card {
    border-radius: 12px;
    border: 1px solid #e8edf5;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
  }

  .article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }

  /* ---------- 記事本文 ---------- */
  .article-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px;
    font-size: 1rem;
    line-height: 1.9;
    color: #1e293b;
  }

  .article-body h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 32px;
  }

  .article-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    border-left: 4px solid #0e4d92;
    padding-left: 14px;
    margin: 48px 0 20px;
  }

  .article-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 36px 0 12px;
  }

  .article-body h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
    margin: 24px 0 8px;
  }

  .article-body p {
    margin: 0 0 1.6em;
    color: #334155;
  }

  .article-body a {
    color: #0e4d92;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
  }

  .article-body a:hover {
    color: #1e3a5f;
  }

  .article-body img {
    width: 100%;
    border-radius: 10px;
    margin: 24px 0;
    display: block;
  }

  .article-body blockquote {
    border-left: 4px solid #93c5fd;
    background: #f0f7ff;
    padding: 16px 20px;
    margin: 32px 0;
    border-radius: 0 8px 8px 0;
    color: #1e3a5f;
    font-style: italic;
  }

  .article-body blockquote p {
    margin: 0;
    color: #1e3a5f;
  }

  .article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 0.9rem;
  }

  .article-body th {
    background: #1e3a5f;
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
  }

  .article-body table td {
    padding: 11px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
  }

  .article-body table tr:nth-child(even) td {
    background: #f8fafc;
  }

  /* ---------- 著者フッター ---------- */
  .author-footer-container {
    border-top: 1px solid #e2e8f0;
    padding-top: 32px;
    margin-top: 48px;
  }

  /* ---------- 戻るリンク ---------- */
  .back-to-index a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0e4d92;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
  }

  .back-to-index a:hover {
    color: #1e3a5f;
  }