/* =========================================================
 * 記事ページの枠（article-pc / article-sp）
 * 本文の中身とブロックは content.css にあります。
 * ======================================================= */

.single-wrap {
	padding: 20px var(--gutter) 56px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start;
}
.post { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

/* 読んだ量のバー */
.read-progress--pc { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width .1s; }
.read-progress--sp { display: none; }

/* 記事上部 */
.post-head { display: flex; flex-direction: column; gap: 14px; }
.post-head__tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tag { background: var(--bg1); color: var(--body); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 4px; }
.tag:hover { color: var(--ink); }
.tag--cat { background: var(--red-bg); color: var(--red-ink); font-weight: 900; }
.tag--cat:hover { color: var(--red-ink); }
.post-head__fav {
	margin-left: auto; border: 1.5px solid var(--gold); background: #fff; color: var(--amber); font-size: 12px; padding: 6px 14px;
}
.post-head__fav.is-fav { border-color: var(--gold); background: var(--gold); color: #fff; }
.post-head__title { margin: 0; font-size: clamp(23px, 2.6vw, 32px); font-weight: 900; line-height: 1.45; text-wrap: pretty; word-break: auto-phrase; }
.post-head__meta { display: flex; gap: 18px; align-items: center; font-size: 13px; color: var(--sub); flex-wrap: wrap; }
.post-head__author { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.post-head__avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-block; }
.post-head__updated { color: var(--red); font-weight: 700; }
.post-head__checked { display: flex; align-items: center; gap: 6px; }
.post-head__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.post-head__pr { font-size: 12px; color: var(--sub); background: var(--bg2); border-radius: 6px; padding: 8px 12px; }

.post-eyecatch { border-radius: 10px; }
.post-eyecatch__ph { font-size: 11px; bottom: 14px; left: 14px; }

/* 作品ハブへのカード */
.hubcard {
	display: flex; align-items: center; gap: 14px; border: 1px solid var(--bd); border-radius: 12px; padding: 12px 16px;
	color: var(--ink); line-height: normal;
}
.hubcard:hover { background: var(--hover); color: var(--ink); }
.hubcard__cover { width: 46px; border-radius: 4px; flex-shrink: 0; }
.hubcard__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.hubcard__eyebrow { font-size: 11px; font-weight: 900; color: var(--navy); }
.hubcard__title { font-size: 14px; font-weight: 900; line-height: 1.5; word-break: auto-phrase; }
.hubcard__go { font-size: 13px; font-weight: 900; color: var(--navy); white-space: nowrap; }

/* 目次（本文） */
.toc { border: 1px solid var(--bd2); border-radius: 10px; overflow: hidden; line-height: normal; }
.toc__head {
	width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--bg2);
	cursor: pointer; border: 0; font-family: inherit; color: var(--ink);
}
.toc__title { font-weight: 900; font-size: 15px; }
.toc__state { font-size: 13px; font-weight: 700; color: var(--navy); }
.toc__list, .entry-content .toc__list { margin: 0; padding: 14px 20px 18px 44px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; line-height: 1.6; }
.toc__item { font-weight: 700; color: var(--navy); }
.entry-content .toc__item + .toc__item { margin-top: 0; }
.toc__item a { color: var(--navy); text-decoration: none !important; }
.toc__item a:hover { color: var(--red); }
.toc.is-closed .toc__list { display: none; }
/* 記事の目次：番号は h2 だけ。h3 は親の h2 の下にたたみ、「＋」で開きます */
.toc__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.toc__sub-toggle {
	flex-shrink: 0; width: 24px; height: 24px; margin-top: 1px; border: 1px solid var(--bd2); border-radius: 50%; background: #fff;
	color: var(--navy); font-size: 13px; font-weight: 900; line-height: 1; cursor: pointer; font-family: inherit; padding: 0;
}
.toc__sub-toggle:hover { border-color: var(--navy); }
.toc__sub, .entry-content .toc__sub { list-style: none; margin: 6px 0 2px; padding: 0 0 0 2px; display: flex; flex-direction: column; gap: 6px; }
.toc__sub[hidden] { display: none; }
.toc__item--h3 { font-size: 13px; font-weight: 500; color: var(--body); display: flex; gap: 6px; }
.toc__item--h3::before { content: "–"; color: var(--sub); flex-shrink: 0; }
.entry-content .toc__item--h3 + .toc__item--h3 { margin-top: 0; }
.toc .toc__item--h3 a { color: var(--body); font-weight: 500; }

/* 次に読むなら */
.nextread { display: flex; flex-direction: column; gap: 14px; }
.nextread__h { margin: 0; font-size: 20px; font-weight: 900; border-bottom: 3px solid var(--red); padding-bottom: 10px; }
.nextread__card {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); border: 2px solid var(--red); border-radius: 14px;
	overflow: hidden; color: var(--ink); transition: transform .15s;
}
.nextread__card:hover { transform: translateY(-3px); color: var(--ink); }
/* アイキャッチ（16:9）の上下が切れないよう、PCでも16:9の枠にします。 */
.nextread__img { aspect-ratio: 16 / 9; align-self: center; }
.nextread__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.nextread__meta { display: flex; gap: 6px; align-items: center; }
.nextread__kind { font-size: 11px; font-weight: 900; color: var(--red); }
.nextread__title { font-size: 17px; font-weight: 900; line-height: 1.5; word-break: auto-phrase; }
.nextread__go { font-size: 13px; font-weight: 900; color: var(--red); }
.prevnext { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.prevnext__item { border: 1px solid var(--bd); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.prevnext__item:hover { background: var(--hover); color: var(--ink); }
.prevnext__item--next { text-align: right; grid-column: 2; }
.prevnext__dir { font-size: 11px; font-weight: 900; color: var(--navy); }
.prevnext__title { font-size: 13px; font-weight: 700; line-height: 1.5; word-break: auto-phrase; }
.eplinks { display: flex; flex-direction: column; gap: 8px; }
.eplinks__h { font-size: 13px; font-weight: 900; }
.eplinks__list { display: flex; gap: 6px; flex-wrap: wrap; }
.eplinks__item {
	min-width: 44px; text-align: center; border: 1.5px solid var(--bd2); background: #fff; color: var(--ink); font-size: 12px;
	font-weight: 900; padding: 7px 8px; border-radius: 8px; white-space: nowrap;
}
.eplinks__item.is-final { border-color: var(--red); background: var(--ebook-bg); color: var(--red); }
.eplinks__item.is-current { border-color: var(--navy); background: var(--navy); color: #fff; }
.eplinks__item.is-off { opacity: .45; cursor: default; }
a.eplinks__item:hover { border-color: var(--navy); }
.nextread__all { align-self: flex-start; font-size: 13px; font-weight: 900; color: var(--navy); text-decoration: underline; }
/* 作品に結びつかないイベント・トピック：カレンダー・同じ種類のトピックの一覧へ（2026-10-31） */
.nextread__card--nav { grid-template-columns: minmax(0, 1fr); }
.nextread__events { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.nextread__events a { display: flex; gap: 12px; align-items: baseline; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.nextread__events a:hover { color: var(--red); }
.nextread__date { flex: none; min-width: 6.5em; font-size: 12px; font-weight: 900; color: var(--navy); }

/* この作品が好きな人におすすめ */
.relworks { display: flex; flex-direction: column; gap: 16px; }
.relworks__h { margin: 0; font-size: 20px; font-weight: 900; border-bottom: 3px solid var(--navy); padding-bottom: 10px; }
.relworks__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.relworks__item { display: flex; flex-direction: column; gap: 6px; color: var(--ink); transition: transform .15s; }
.relworks__item:hover { transform: translateY(-3px); color: var(--ink); }
.relworks__cover { border-radius: 6px; }
.relworks__genre { font-size: 11px; color: var(--red); font-weight: 700; }
.relworks__title { font-size: 14px; font-weight: 700; line-height: 1.45; }
.relworks__why { font-size: 12px; color: var(--sub); }

/* 編集部・出典・更新履歴 */
.editorbox {
	background: var(--bg2); border-radius: 12px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px;
	font-size: 13px; line-height: 1.8; color: var(--body);
}
.editorbox b { font-weight: 700; color: var(--ink); }
.editorbox__who { display: flex; align-items: center; gap: 12px; }
.editorbox__avatar { width: 44px; height: 44px; border-radius: 50%; background: repeating-linear-gradient(135deg, #e9ecf2 0 4px, #dde1e9 4px 8px); }
.editorbox__names { display: flex; flex-direction: column; }
.editorbox__name { font-weight: 900; font-size: 15px; color: var(--ink); }
.editorbox__desc { font-size: 12px; }
.editorbox__links { font-weight: 700; }
.editorbox__links a, .editorbox__src a { color: var(--navy); text-decoration: underline; }
.editorbox__note a { color: var(--navy); font-weight: 700; text-decoration: underline; white-space: nowrap; }

/* サイドバー */
.post-side { display: flex; flex-direction: column; gap: 20px; }
.post-side__sticky { position: sticky; top: var(--stick-top, 20px); display: flex; flex-direction: column; gap: 20px; }
.side-pr { border: 2px solid var(--red); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.side-pr__eyebrow { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 900; color: var(--red); }
.side-pr__eyebrow .lbl-pr { font-size: 10px; padding: 2px 6px; }
.side-pr__banner {
	height: 120px; border-radius: 8px; overflow: hidden; display: flex; align-items: flex-start; padding: 8px;
	background: repeating-linear-gradient(135deg, #fbe1dd 0 8px, #f7d6d1 8px 16px); font-family: var(--mono); font-size: 10px;
	color: #a8766f; position: relative;
}
.side-pr__banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* バナーをもらうまでは、アプリのロゴを白地に切らずに出します */
.side-pr__banner.is-logo { background: #fff; border: 1px solid var(--bd); }
.side-pr__banner.is-logo img { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; }
.side-pr__name { font-size: 17px; font-weight: 900; }
.side-pr__text { font-size: 13px; color: var(--body); line-height: 1.6; }
.side-pr__btn { font-size: 14px; padding: 12px; }
.side-box { border: 1px solid var(--bd); border-radius: 12px; overflow: hidden; }
.side-box__h { padding: 12px 16px; font-weight: 900; font-size: 14px; background: var(--bg2); }
.side-toc__list { display: flex; flex-direction: column; padding: 6px 0; max-height: 50vh; overflow-y: auto; }
.side-toc__item {
	padding: 7px 16px; font-size: 13px; font-weight: 500; color: var(--body); border-left: 3px solid transparent; line-height: 1.5;
}
.side-toc__item.is-active { font-weight: 900; color: var(--red); border-left-color: var(--red); }
/* 右の目次：h2 に番号。h3 は今読んでいる h2 の下だけ開きます */
.side-toc__item--h2 { display: flex; gap: 4px; }
.side-toc__no { flex-shrink: 0; color: var(--sub); font-weight: 700; }
.side-toc__item--h2.is-active .side-toc__no { color: var(--red); }
.side-toc__sub { display: none; flex-direction: column; }
.side-toc__group.is-current .side-toc__sub { display: flex; }
.side-toc__item--h3 { padding: 5px 16px 5px 34px; font-size: 12px; }
.side-pop { display: flex; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--row); align-items: flex-start; }
.side-pop:hover { background: var(--hover); color: var(--ink); }
.side-pop__rank { font-weight: 900; color: var(--navy); width: 14px; flex-shrink: 0; }
.side-pop__t { font-size: 13px; font-weight: 700; line-height: 1.55; }

/* 少し狭いPC：サイドバーを下に回します */
@media (max-width: 1000px) and (min-width: 769px) {
	.single-wrap { grid-template-columns: 1fr; }
	.post-side__sticky { position: static; }
	.side-toc { display: none; }
	.relworks__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
 * スマホ
 * ======================================================= */
@media (max-width: 768px) {
	.single-wrap { display: block; padding: 0; }
	.read-progress--sp { display: block; height: 4px; background: var(--row); }
	.post { padding: 14px 16px 0; gap: 22px; }

	.post-head { gap: 10px; }
	.post-head__tags { gap: 6px; }
	.tag { font-size: 11px; padding: 3px 8px; }
	.post-head__fav { padding: 9px 12px; }
	.post-head__title { font-size: 22px; line-height: 1.5; }
	.post-head__meta { gap: 12px; font-size: 11px; }
	.post-head__author { font-weight: 700; }
	.post-head__pr { font-size: 11px; padding: 7px 10px; }
	.post-eyecatch { border-radius: 8px; }
	.post-eyecatch__ph { font-size: 10px; bottom: 10px; left: 10px; }

	.hubcard { gap: 12px; padding: 10px 12px; }
	.hubcard__cover { width: 40px; }
	.hubcard__eyebrow { font-size: 10px; }
	.hubcard__title { font-size: 13px; }
	.hubcard__go { font-size: 18px; }

	.entry-content > .spoil-range { margin-top: 14px; }

	.toc__head { padding: 0 16px; min-height: 48px; }
	.toc__list, .entry-content .toc__list { padding: 10px 16px 14px 36px; gap: 10px; line-height: 1.55; }

	.nextread { gap: 12px; }
	.nextread__h { font-size: 17px; padding-bottom: 8px; }
	.nextread__card { display: flex; flex-direction: column; border-radius: 12px; }
	.nextread__card:hover { transform: none; }
	.nextread__img { aspect-ratio: 16 / 9; min-height: 0; align-self: stretch; }
	.nextread__body { padding: 12px 14px; gap: 6px; }
	.nextread__kind { font-size: 10px; }
	.nextread__meta .lbl-spoil { font-size: 9px; }
	.nextread__title { font-size: 15px; }
	.prevnext { gap: 8px; }
	.prevnext__item { padding: 10px 12px; }
	.prevnext__dir { font-size: 10px; }
	.prevnext__title { font-size: 12px; }
	.eplinks__list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
	.eplinks__list::-webkit-scrollbar { display: none; }
	.eplinks__item { flex-shrink: 0; min-width: 48px; padding: 11px 8px; }
	.nextread__all { padding: 6px 0; text-decoration: none; }

	.relworks { gap: 12px; }
	.relworks__h { font-size: 17px; padding-bottom: 8px; }
	.relworks__grid { display: flex; overflow-x: auto; scrollbar-width: none; gap: 10px; margin: 0 -16px; padding: 0 16px 4px; }
	.relworks__grid::-webkit-scrollbar { display: none; }
	.relworks__item { flex-shrink: 0; width: 120px; gap: 5px; }
	.relworks__item:hover { transform: none; }
	.relworks__genre { font-size: 10px; }
	.relworks__title { font-size: 13px; line-height: 1.4; }
	.relworks__why { font-size: 11px; }

	.line-box { padding: 14px; }
	.line-box__btn { padding: 13px; }

	.editorbox { padding: 14px; gap: 8px; font-size: 12px; line-height: 1.75; }
	.editorbox__name { font-size: 14px; }
}

/* ---------- トピック・イベントの概要の枠 ---------- */
.info-box { margin-top: 20px; border: 1px solid var(--bd); border-radius: 12px; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; background: var(--bg2); }
.info-box__list { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.info-box__list > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; font-size: 14px; align-items: baseline; }
.info-box__list dt { font-weight: 900; color: var(--sub); font-size: 13px; }
.info-box__list dd { margin: 0; line-height: 1.6; }
.info-box__list dd a { color: var(--navy); font-weight: 700; text-decoration: underline; }
.info-box__st { display: inline-block; font-size: 12px; font-weight: 900; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.info-box__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.info-box__btns:empty { display: none; }
.info-box__btn { font-size: 14px; padding: 12px 26px; }
@media (max-width: 768px) {
	.info-box { margin: 14px 16px 0; padding: 14px; gap: 12px; }
	.info-box__list > div { grid-template-columns: 72px minmax(0, 1fr); font-size: 13px; gap: 8px; }
	.info-box__btns { flex-direction: column; }
	.info-box__btn { padding: 13px; }
}

/* ---------- シリーズの案内（記事に「シリーズ」を付けたときだけ） ---------- */
.series-box { margin-top: 28px; border: 1px solid var(--bd); border-radius: 12px; overflow: hidden; }
.series-box__h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg2); flex-wrap: wrap; }
.series-box__label { background: var(--navy); color: #fff; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 3px; }
.series-box__name { font-weight: 900; font-size: 15px; }
.series-box__n { font-size: 12px; color: var(--sub); margin-left: auto; }
.series-box__list { margin: 0; padding: 10px 16px 12px 40px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.6; }
.series-box__item a { color: var(--navy); text-decoration: underline; }
.series-box__item.is-current { font-weight: 900; }

/* ---------- PRの表示（記事の下に出すとき） ---------- */
.post-pr-bottom { margin-top: 24px; }

/* ---------- SNSのシェアボタン（設定画面でオンにしたときだけ） ---------- */
.share { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.share__h { font-size: 14px; font-weight: 900; }
.share__btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.share__btn {
	border: 0; border-radius: 999px; padding: 11px 6px; text-align: center; font-size: 13px; font-weight: 900; color: #fff; cursor: pointer;
	font-family: inherit; white-space: nowrap;
}
.share__btn:hover { color: #fff; filter: brightness(1.08); }
.share__btn--x { background: #000; }
.share__btn--line { background: var(--line); }
.share__btn--hb { background: #00a4de; }
.share__btn--copy { background: var(--bg1); color: var(--ink); }
.share__btn--copy:hover { color: var(--ink); }
@media (max-width: 768px) {
	.series-box, .share { margin-left: 16px; margin-right: 16px; }
	.share__btns { grid-template-columns: 1fr 1fr; }
}

/* 編集部メンバーの画像（丸く少し重ねる） */
.team-av { display: inline-flex; align-items: center; flex-shrink: 0; }
.team-av__img, .team-av__empty { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: #eef0f4; }
.team-av__img + .team-av__img { margin-left: -9px; }
.editorbox__team .team-av__img, .editorbox__team .team-av__empty { width: 40px; height: 40px; }
.editorbox__team .team-av__img + .team-av__img { margin-left: -12px; }
.post-head__team .team-av__img, .post-head__team .team-av__empty { width: 24px; height: 24px; }
.post-head__team .team-av__img + .team-av__img { margin-left: -8px; }
