/* ===== 記事ページ（エンゲージメント） ===== */

body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  right: 0;
  bottom: 0;
  width: min(58vw, 760px);
  aspect-ratio: 1380 / 752;
  background-image: url("../../images/CoHAL_background.png");
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
  mix-blend-mode: multiply;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.top-nav,
.article-page,
footer {
  position: relative;
  z-index: 1;
}

.article-page {
  padding: 24px 20px 80px;
}

/* ===== ヒーロー画像 ===== */
.article-hero-wrap {
  max-width: 860px;
  margin: 0 auto 28px;
}

.article-hero {
  width: 100%;
  height: 360px;
  object-fit: contain;
  background: #fff;
  display: block;
  border-radius: 20px;
}

/* ===== メタ情報 ===== */
.article-meta {
  max-width: 860px;
  margin: 0 auto 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #6e7894;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.article-category {
  padding: 6px 12px;
  border-radius: 999px;
  background: #e6edf7;
  color: #4f6fa5;
  font-size: 12px;
  font-weight: 700;
}

.article-meta-divider {
  color: #8a90a9;
  font-weight: 700;
}

/* ===== 本文 ===== */
.article-container {
  max-width: 860px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 32px;
}

.article-header h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.4;
  color: #1f2736;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.article-lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.9;
  color: #444;
}

.cohal-gallery-wrap {
  position: relative;
  margin: 22px 0 24px;
}

.cohal-image-gallery {
  display: flex;
  gap: 28px;
  margin: 22px 0 24px;
  overflow-x: auto;
  padding: 4px 78px 18px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.cohal-image-gallery::-webkit-scrollbar {
  display: none;
}

.cohal-image-gallery img {
  display: block;
  width: 220px;
  height: auto;
  max-height: 480px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
  scroll-snap-align: start;
}

.cohal-gallery-btn {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  z-index: 2;
}

.cohal-gallery-btn:hover {
  background: rgba(0, 0, 0, 0.72);
}

.cohal-gallery-btn.left {
  left: -12px;
}

.cohal-gallery-btn.right {
  right: -12px;
}

.cohal-feature-image {
  display: block;
  width: min(100%, 860px);
  height: 300px;
  object-fit: cover;
  margin: 0 0 22px;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
}

.cohal-feature-list {
  margin: 2px 0 22px;
  padding: 0;
  list-style: none;
}

.cohal-feature-list li {
  position: relative;
  margin-bottom: 12px;
  padding: 12px 16px 12px 20px;
  background: #eeeeee;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 5px solid #6f7378;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.75;
  color: #222;
  box-shadow: 0 5px 14px rgba(31, 39, 54, 0.08);
}

.cohal-feature-list strong {
  color: #1f2736;
  font-weight: 800;
}

.app-store-badge-link {
  display: inline-block;
  margin: 2px 0 22px;
}

.app-store-badge {
  display: block;
  width: 180px;
  height: auto;
}

.article-toc {
  margin: 36px 0 12px;
  padding: 20px 22px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(31, 39, 54, 0.06);
}

.article-toc h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.5;
  color: #1f2736;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.4em;
}

.article-toc li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-toc li:last-child {
  margin-bottom: 0;
}

.article-toc a {
  color: #333;
  font-weight: 700;
  text-decoration: none;
}

.article-toc a:hover {
  text-decoration: underline;
}

.share-section {
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 34px;
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  min-height: 62px;
}

.share-button img,
.share-image {
  display: block;
  width: 100%;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.share-button:hover img,
.share-button:hover .share-image {
  opacity: 0.88;
  transform: translateY(-1px);
}

.copy-share-status {
  min-height: 1.5em;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}

/* ===== セクション ===== */
.article-section {
  margin-top: 36px;
}

.article-header + .article-section {
  margin-top: 64px;
}

.article-section h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.45;
  color: #1f2736;
  letter-spacing: -0.01em;
}

.article-section h3 {
  margin: 20px 0 8px;
  font-size: 18px;
  line-height: 1.6;
  color: #1f2736;
}

.article-section p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.95;
  color: #333;
}

/* ===== CTA ===== */
.article-cta {
  max-width: 860px;
  margin: 50px auto 0;
}

/* ===== ページトップボタン ===== */
#scrollTopBtn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #aeb4c2;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  z-index: 9999;
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

#scrollTopBtn:hover {
  background: #8f97a8;
  transform: translateY(-3px);
}

#scrollTopBtn::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  transform: rotate(-45deg);
  margin-top: 6px;
}

/* ===== スマホ ===== */
@media (max-width: 768px) {
  body::before {
    width: 92vw;
    opacity: 0.12;
  }

  .article-page {
    padding: 16px 16px 60px;
  }

  .article-hero-wrap {
    margin-bottom: 18px;
  }

  .article-hero {
    height: 220px;
    object-fit: contain;
    border-radius: 16px;
  }

  .article-meta {
    margin-bottom: 18px;
    gap: 8px;
    font-size: 12px;
  }

  .article-category {
    font-size: 11px;
    padding: 5px 10px;
  }

  .article-header {
    margin-bottom: 26px;
  }

  .article-header h1 {
    font-size: 26px;
    white-space: normal;
  }

  .article-lead {
    font-size: 16px;
    line-height: 1.85;
  }

  .cohal-gallery-wrap {
    margin: 18px -16px 22px;
  }

  .cohal-image-gallery {
    gap: 10px;
    margin: 0;
    overflow-x: auto;
    padding: 0 16px 8px;
    scroll-snap-type: x mandatory;
  }

  .cohal-image-gallery img {
    width: 132px;
    height: auto;
    max-height: 288px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 12px;
    scroll-snap-align: start;
  }

  .cohal-gallery-btn {
    display: none;
  }

  .cohal-feature-image {
    display: block;
    width: 100%;
    max-width: none;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 18px;
  }

  .cohal-feature-list li {
    padding: 10px 13px 10px 16px;
    font-size: 15px;
    line-height: 1.75;
  }

  .app-store-badge-link {
    margin-bottom: 18px;
  }

  .app-store-badge {
    width: 160px;
  }

  .article-toc {
    margin: 28px 0 8px;
    padding: 16px 18px;
    border-radius: 10px;
  }

  .article-toc h2 {
    font-size: 18px;
  }

  .article-toc li {
    font-size: 14px;
  }

  .share-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .share-button {
    min-height: 54px;
  }

  .share-button img,
  .share-image {
    height: 48px;
  }

  .article-section {
    margin-top: 30px;
  }

  .article-header + .article-section {
    margin-top: 44px;
  }

  .article-section h2 {
    font-size: 22px;
  }

  .article-section h3 {
    font-size: 16px;
  }

  .article-section p {
    font-size: 15px;
    line-height: 1.9;
  }

  #scrollTopBtn {
    width: 44px;
    height: 44px;
  }
}
