/*
Theme Name: Purple Magazine
Theme URI: https://example.com/
Author: Your Name
Description: purple.fr風のレスポンシブ・マガジンレイアウトを再現したオリジナルテーマ。
Version: 1.0
Text Domain: purple-magazine
*/

:root {
  --ink: #111111;
  --paper: #ffffff;
  --line: #e5e5e5;
  --accent: #1899b5;
  --muted: #767676;
}

/* ---------- Lexend (自己ホスト) ---------- */
@font-face {
  font-family: 'Lexend';
  src: url('assets/fonts/lexend-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('assets/fonts/lexend-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('assets/fonts/lexend-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('assets/fonts/lexend-latin-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Lexend', "Helvetica Neue", Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ページ読み込み時の静かなフェードイン */
body {
  opacity: 0;
  transition: opacity 0.5s ease;
}
body.is-loaded {
  opacity: 1;
}

/* キーボード操作時のフォーカスだけ、はっきり分かるように(アクセシビリティ) */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* スクロールで現れる要素(カードなど)のフェードアップ演出 */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* 同じ行に並ぶカードが、少しずつ時間差で現れるようにする(スタガーアニメーション) */
.grid .card.reveal-on-scroll:nth-child(3n+1) { transition-delay: 0s; }
.grid .card.reveal-on-scroll:nth-child(3n+2) { transition-delay: 0.08s; }
.grid .card.reveal-on-scroll:nth-child(3n+3) { transition-delay: 0.16s; }
.related-scroll .related-card.reveal-on-scroll:nth-child(1) { transition-delay: 0s; }
.related-scroll .related-card.reveal-on-scroll:nth-child(2) { transition-delay: 0.06s; }
.related-scroll .related-card.reveal-on-scroll:nth-child(3) { transition-delay: 0.12s; }
.related-scroll .related-card.reveal-on-scroll:nth-child(4) { transition-delay: 0.18s; }
.related-scroll .related-card.reveal-on-scroll:nth-child(n+5) { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Header ---------- */
header.site-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  position: sticky;
  top: 0;
  z-index: 60; /* ドロワーより手前に表示し、開いている間も常に見えるようにする */
  background: var(--paper);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: box-shadow 0.25s ease;
}
/* 少しスクロールしたら、浮いているように見える柔らかい影をつける */
header.site-header.is-scrolled {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ---------- 検索パネル ---------- */
.search-panel {
  display: none;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 14px;
}
.search-panel.open {
  display: block;
}
.search-panel form {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
  max-width: 480px;
  margin: 0 auto;
}
.search-panel input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  background: none;
}
.search-panel button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  text-align: center;
  flex: 1;
  display: flex;
  justify-content: center;
}
.logo a {
  display: inline-flex;
  transition: opacity 0.2s ease;
}
.logo a:hover {
  opacity: 0.7;
}
.logo__img {
  height: 20px;
  width: auto;
  display: block;
}

@media (min-width: 700px) {
  .logo__img { height: 24px; }
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  color: var(--ink);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ハンバーガー(≡)が開いている間は×に変形する */
.hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

nav.top-nav {
  display: none;
  text-align: center;
  padding-top: 14px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
nav.top-nav > ul,
nav.top-nav ul.nav-parent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
nav.top-nav > ul > li,
nav.top-nav .nav-parent-item {
  display: inline-block;
  margin: 0 16px;
  position: relative;
}
/* トップレベルのリンクだけ、下線がホバーで左から右に伸びる演出をつける */
nav.top-nav > ul > li > a,
nav.top-nav .nav-parent-item > a {
  position: relative;
  transition: color 0.15s ease;
}
nav.top-nav > ul > li > a::after,
nav.top-nav .nav-parent-item > a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
nav.top-nav a {
  transition: color 0.15s ease;
}
nav.top-nav a:hover,
nav.top-nav a:active,
nav.top-nav a:focus {
  color: var(--accent);
}
nav.top-nav > ul > li > a:hover::after,
nav.top-nav .nav-parent-item > a:hover::after {
  transform: scaleX(1);
}

/* 子カテゴリーのドロップダウン(PC: ホバーで表示) */
nav.top-nav .sub-menu,
nav.top-nav .nav-child-list {
  list-style: none;
  margin: 0;
  padding: 14px 0;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--line);
  min-width: 220px;
  text-align: left;
  text-transform: none;
  font-weight: 400;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 70;
}
nav.top-nav .nav-parent-item:hover .sub-menu,
nav.top-nav .nav-parent-item:hover .nav-child-list,
nav.top-nav li.menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
}
nav.top-nav .sub-menu li,
nav.top-nav .nav-child-list li {
  display: block;
  margin: 0;
}
nav.top-nav .sub-menu a,
nav.top-nav .nav-child-list a {
  display: block;
  padding: 8px 20px;
}
nav.top-nav .sub-menu a:hover,
nav.top-nav .nav-child-list a:hover {
  background: #f6f6f6;
}

@media (min-width: 1100px) {
  nav.top-nav { display: block; }
  .header-row .hamburger { display: none; }
}

/* ---------- Mobile drawer nav ---------- */
.drawer {
  position: fixed;
  inset: 0;
  background: var(--paper);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 50; /* ヘッダー(60)より下にすることで、開いている間もヘッダーが常に見える */
  padding: 80px 20px 20px; /* JSで実際のヘッダー高さに応じて上書きされる仮の値 */
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.drawer ul li a {
  display: block;
  font-size: 24px;
  font-weight: 700;
  margin: 14px 0;
  transition: color 0.15s ease;
}
.drawer ul li a:hover,
.drawer ul li a:active,
.drawer ul li a:focus {
  color: var(--accent);
}

/* ドロワー内、親カテゴリーのアコーディオン開閉 */
.drawer .nav-parent-toggle {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: 'Lexend', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 14px 0;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.drawer .nav-parent-toggle::after {
  content: '+';
  position: absolute;
  right: 4px;
  font-size: 22px;
}
.drawer .nav-parent-item--accordion.is-open .nav-parent-toggle::after {
  content: '–';
}
.drawer .nav-child-list,
.drawer .sub-menu {
  list-style: none;
  margin: 0 0 10px;
  padding-left: 16px;
  display: none;
}
.drawer .nav-parent-item--accordion.is-open .nav-child-list,
.drawer li.menu-item-has-children.is-open .sub-menu {
  display: block;
}
.drawer .nav-child-list li a,
.drawer .sub-menu li a {
  font-size: 17px;
  font-weight: 400;
  margin: 10px 0;
  color: var(--muted);
}

.drawer .subscribe-btn {
  display: block;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 16px;
  margin-top: 30px;
  font-size: 18px;
  font-family: 'Lexend', sans-serif;
}

.drawer-footer-links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drawer-footer-links a {
  font-size: 15px;
  color: var(--muted);
}
.drawer-footer-links a:hover {
  color: var(--accent);
}

/* ---------- Hero slider ---------- */
.hero-wrap {
  padding: 0; /* スマホ・タブレットは全幅(元の見た目) */
}
.hero {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
}
.hero-slides {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}
.hero-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: block;
}
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 8s linear;
}
.hero-slide.is-active::before {
  transform: scale(1.08); /* ゆっくり拡大する静かなKen Burns効果 */
}
.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.hero-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0;
  transition: transform 0.25s ease, background 0.25s ease;
}
.hero-dots button.active {
  background: var(--accent);
  transform: scale(1.3);
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide::before { transition: none; }
}

/* PC画面のみ、左右に余白を持たせて縦横比も少し抑える */
@media (min-width: 1100px) {
  .hero-wrap { padding: 0 20px; }
  .hero { aspect-ratio: 2/1; }
}

/* ---------- PICK UP セクション(トップページ、グリッドの中に挿入される全幅バンド) ---------- */
.pickup-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #f5f5f3;
  padding: 44px 0 36px;
  margin-top: 8px;
  margin-bottom: 8px;
}
.pickup-section__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.pickup-section__label {
  flex: 0 0 auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pickup-section__label span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: 'Lexend', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--ink);
  white-space: nowrap;
}

.pickup-scroll-wrap {
  position: relative;
  flex: 1;
  min-width: 0; /* flexアイテムがはみ出さないように */
}

.pickup-scroll {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.pickup-scroll::-webkit-scrollbar {
  display: none;
}

.pickup-card {
  flex: 0 0 260px;
  display: block;
  position: relative;
  z-index: 1;
}
@media (min-width: 700px) {
  .pickup-card { flex-basis: 300px; }
}
@media (min-width: 1100px) {
  .pickup-card { flex-basis: 320px; }
}

/* 画像は単独のボックスにして、他の要素の影響でサイズがズレないようにする */
.pickup-card__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #ddd;
  margin-bottom: 14px;
}
.pickup-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.pickup-card:hover .pickup-card__thumb img,
.pickup-card:active .pickup-card__thumb img {
  transform: scale(1.05);
}

/* 画像の下に、カテゴリーピル + 日付を横並びで表示する(メインのグリッドと同じ見た目) */
.pickup-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pickup-card__meta-date {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.pickup-card__title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0;
  transition: color 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pickup-card:hover .pickup-card__title {
  color: var(--accent);
}

.pickup-arrow {
  position: absolute;
  top: 130px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.pickup-arrow:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pickup-arrow:active {
  transform: scale(0.92);
}
.pickup-arrow--left { left: -16px; }
.pickup-arrow--right { right: -16px; }

@media (min-width: 700px) {
  .pickup-arrow { top: 150px; }
  .pickup-arrow--left { left: -18px; }
  .pickup-arrow--right { right: -18px; }
}
@media (min-width: 1100px) {
  .pickup-arrow { top: 160px; }
}

.pickup-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin-top: 20px;
}
/* 見た目の点は小さいまま、タップ領域(ヒットエリア)は広めに確保する */
.pickup-dots button {
  width: 28px;
  height: 28px;
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.pickup-dots button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4d4d2;
  transform: translate(-50%, -50%);
  transition: background 0.2s ease, transform 0.2s ease;
}
.pickup-dots button.is-current::after {
  background: var(--ink);
  transform: translate(-50%, -50%) scale(1.6);
}

@media (max-width: 699px) {
  .pickup-section { display: none !important; }
  .pickup-section__inner { gap: 10px; }
  .pickup-section__label span { font-size: 16px; letter-spacing: 2px; }
  .pickup-card { flex-basis: 78vw; }
  .pickup-arrow { display: none; } /* スマホはスワイプ操作を基本にする */
  .pickup-dots button { width: 36px; height: 36px; } /* スマホはタップ領域をさらに広く */
}

/* ---------- Article grid ---------- */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.card {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover {
  transform: translateY(-3px);
}
.card:hover .card-thumb {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}
.card-thumb {
  transition: box-shadow 0.25s ease;
}

/*
 * タブレット・PCでは、見た目は2列/3列のまま、内部的には4列/6列のグリッドにしておく。
 * 各カードは通常その半分(2列ぶん/2列ぶん)を占有するが、行の最後に1つだけ・あるいは
 * 2つだけ記事が残った場合は、その記事の幅を自動で広げて「余白(空きマス)」が
 * 生まれないようにする。記事が動的に追加(Load more)されても、CSSのセレクタが
 * その都度DOMの状態を見て再評価されるので、常に正しく機能する。
 */
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(4, 1fr); column-gap: 40px; }
  .card { grid-column: span 2; padding: 32px 0; }
}

/* 2列レイアウト(タブレット幅)の時だけ、行の最後に1つ残った記事を全幅に広げる */
@media (min-width: 700px) and (max-width: 1099px) {
  .grid .card:last-child:nth-child(odd) { grid-column: span 4; }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
  .card { grid-column: span 2; }
  /* 3列レイアウトで、行の最後に1つだけ記事が残った場合は全幅に広げる */
  .grid .card:last-child:nth-child(3n+1) { grid-column: span 6; }
  /* 3列レイアウトで、行の最後に2つ記事が残った場合は、それぞれ半分ずつ広げて埋める */
  .grid .card:nth-last-child(2):nth-child(3n+1) { grid-column: span 3; }
  .grid .card:last-child:nth-child(3n+2) { grid-column: span 3; }
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-meta .date {
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: var(--muted);
}

/* カテゴリーをカラフルなピル(バッジ)で表示する */
.card-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: 'Lexend', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  transition: transform 0.15s ease;
}
.card-tag:hover,
.card-tag:active {
  transform: translateY(-1px);
}

/* 記事ページ上部の複数タグ表示 */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

/* 記事ページ下部(Back to Homeの上)のハッシュタグ表示 */
.single-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 36px;
  padding: 18px 20px;
  background: #f4f4f4;
  border-radius: 4px;
}
.single-hashtags__tag {
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  transition: color 0.15s ease;
}
.single-hashtags__tag:hover,
.single-hashtags__tag:focus {
  color: var(--accent);
}

/* ---------- プロフィール欄 & リード文(記事ページ、タイトルと本文の間) ---------- */
.profile-list { display: flex; flex-direction: column; }
.profile-list .profile-box { padding: 16px 0 16px 16px; border-left: 4px solid transparent; }
.profile-list:has(.profile-box--2) .profile-box--1 { border-left-color: #4a7fe0; }
.profile-box--2 { border-left-color: #e0577f !important; }
.profile-box--3 { border-left-color: #3fa66a !important; }
.profile-box--4 { border-left-color: #e8892b !important; }
.profile-list .profile-box:first-child:last-child { padding-left: 0; border-left: 0; }
@media (max-width: 699px) {
  .profile-box__photo { flex-basis: 84px; width: 84px; height: 84px; }
}
.profile-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0;
}
.profile-box__photo {
  flex: 0 0 110px;
  width: 110px;
  height: 110px;
  border-radius: 6px;
  overflow: hidden;
  background: #ddd;
}
.profile-box__text {
  flex: 1;
  padding-top: 4px;
}
.profile-box__name {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 2px;
}
.profile-box__subname {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 10px;
}
.profile-box__role {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.profile-box__divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 28px;
}
.lead-text {
  font-size: 18px;
  line-height: 1.9;
  margin: 0 0 32px;
}

/* ---------- 記事ページの文字サイズ(スマホ基準がデフォルト、PCはmin-width 700pxから) ---------- */
.article-title-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
.article-title {
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 10px;
  font-size: 18px; /* スマホ */
}
.article-body {
  line-height: 1.8;
  font-size: 14px; /* スマホ */
}

@media (min-width: 700px) {
  .article-title { font-size: 22px; }
  .article-body { font-size: 16px; }
}

/* 「Enlarge text」ボタン(スマホのみ表示) */
.enlarge-text-btn {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.enlarge-text-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #e5e5e5;
  color: #fff;
  font-size: 11px;
}
.article.text-enlarged .enlarge-text-btn .enlarge-text-btn__icon {
  background: #34c759;
}

@media (min-width: 700px) {
  .enlarge-text-btn { display: none; }
}

/* 文字拡大ボタンを押した時: 見出し22px・本文18px(スマホでもPCと同じ見出しサイズ+本文はさらに大きく) */
.article.text-enlarged .article-title {
  font-size: 22px;
}
.article.text-enlarged .article-body {
  font-size: 18px;
}

.card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  margin-bottom: 16px;
  background: #ddd;
}

.card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  background: #ddd;
  transition: filter 0.2s ease;
}
.card:hover img,
.card:active img {
  filter: grayscale(1);
}

.card h2 {
  font-size: 17px;
  line-height: 1.35;
  text-transform: uppercase;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.card h2 a {
  transition: color 0.15s ease;
}
.card h2 a:hover,
.card h2 a:active,
.card h2 a:focus {
  color: var(--accent);
}

.read-more {
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.read-more:hover,
.read-more:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.read-more:active {
  transform: scale(0.96);
}

.load-more-wrap {
  text-align: center;
  padding: 40px 0;
}
.load-more {
  font-family: 'Lexend', sans-serif;
  font-size: 18px;
  border: 1px solid var(--ink);
  background: none;
  padding: 14px 40px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.load-more:hover,
.load-more:focus {
  color: var(--accent);
  border-color: var(--accent);
}
.load-more:active {
  transform: scale(0.96);
}

/* 主要なボタン・アイコンボタン全般に、押した時の軽いタップフィードバックを統一して付ける */
.icon-btn,
.hamburger,
.enlarge-text-btn,
.related-arrow {
  transition: transform 0.15s ease;
}
.icon-btn:active,
.hamburger:active,
.enlarge-text-btn:active,
.related-arrow:active {
  transform: scale(0.92);
}

footer.site-footer {
  text-align: center;
  padding: 48px 24px 28px;
  font-size: 13px;
  color: #ffffff;
  background: #1899b5;
  border-top: none;
}
.site-footer__logo {
  display: inline-flex;
  margin-bottom: 28px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.site-footer__logo:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
.site-footer__logo img {
  height: 28px;
  width: auto;
  display: block;
}
.site-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}
.site-footer__links a {
  color: #ffffff;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}
.site-footer__links a:hover,
.site-footer__links a:active,
.site-footer__links a:focus {
  opacity: 1;
  text-decoration: underline;
}
.site-footer__copy {
  color: #ffffff;
  opacity: 0.85;
}

/* ---------- カテゴリ一覧・検索結果のページネーション ---------- */
.nav-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
}
.nav-links a,
.nav-links span {
  padding: 8px 4px;
}
.nav-links .current {
  border-bottom: 2px solid var(--ink);
  font-weight: 700;
}

/* ---------- Related / Most Viewed / Latest タブ ---------- */
.related-tabs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  border-top: 1px solid var(--line);
}

.related-tabs__nav {
  display: flex;
  gap: 28px;
  margin-bottom: 24px;
}

.related-tabs__btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 0;
}

.related-tabs__btn {
  transition: color 0.15s ease;
}
.related-tabs__btn.is-active {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}

.related-tabs__panel {
  display: none;
  opacity: 0;
}
.related-tabs__panel.is-active {
  display: block;
  animation: purple-fade-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes purple-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .related-tabs__panel.is-active { animation: none; opacity: 1; }
}

.related-scroll-wrap {
  position: relative;
}

.related-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  /* スクロールバーを目立たせない */
  scrollbar-width: none;
}
.related-scroll::-webkit-scrollbar {
  display: none;
}

.related-card {
  flex: 0 0 260px;
  display: block;
  position: relative;
  z-index: 1;
  cursor: pointer;
}
.related-card,
.related-card * {
  pointer-events: auto;
}

.related-card img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  margin-bottom: 14px;
  background: #ddd;
  transition: filter 0.2s ease;
}
.related-card:hover img,
.related-card:active img {
  filter: grayscale(1);
}

.related-card__label {
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.related-card__excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  transition: color 0.15s ease;
}
.related-card:hover .related-card__excerpt,
.related-card:active .related-card__excerpt {
  color: var(--accent);
}

.related-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.related-arrow--left { left: -44px; }
.related-arrow--right { right: -44px; }

/* スマホ幅では、横スクロールのカードではなく「画像+テキスト」を縦に並べるリスト表示にする */
@media (max-width: 699px) {
  .related-scroll {
    flex-direction: column;
    overflow-x: visible;
    gap: 20px;
  }
  .related-card {
    flex: 0 0 auto;
    display: flex;
    gap: 14px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }
  .related-card img {
    width: 120px;
    height: auto;
    aspect-ratio: auto; /* 切り取らず、画像全体をそのまま見せる */
    object-fit: contain;
    background: #f2f2f2;
    flex-shrink: 0;
    margin-bottom: 0;
  }
  /* スマホでは画像とタイトルだけにする(カテゴリーラベルは非表示) */
  .related-card__label {
    display: none;
  }
  .related-card__excerpt {
    font-size: 14px;
    line-height: 1.5;
    align-self: center;
  }
  /* 縦積みリストになるので横スクロール用の矢印は不要 */
  .related-arrow {
    display: none;
  }
}
