/*
Theme Name: Comipita
Theme URI: https://comipita.com/
Description: コミぴた（シチュエーションで探すTL・BLマンガ）のテーマ。「上品で落ち着いた書店」のトーン。作品データは Comipita Core プラグインが必要。
Version: 0.2.1
Requires at least: 6.4
Requires PHP: 7.4
Author: コミぴた
Text Domain: comipita
*/

/* ===============================================================
   色・文字
   =============================================================== */
:root {
	--base: #FAF7F2;
	--card: #FFFFFF;
	--surface: #F2ECE3;
	--border: #EAE2D9;
	--ink: #2A2326;
	--sub: #6B6064;
	--tl: #9E3B57;
	--tl-bg: #F6E8EC;
	--bl: #2F4A6D;
	--bl-bg: #E6ECF3;
	--common-bg: #EFE9E0;
	--common-ink: #594F53;
	--gold: #B8955A;
	--gold-text: #8A6A38;
	--serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
	--sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
	--radius: 16px;
	--shadow: 0 1px 2px rgba(42, 35, 38, .04), 0 4px 14px rgba(42, 35, 38, .04);
	--gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
html.cp-locked { overflow: hidden; }
body {
	margin: 0; background: var(--base); color: var(--ink);
	font-family: var(--sans); font-size: 16px; line-height: 1.9;
	-webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.has-sticky { padding-bottom: 76px; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
a:hover { color: var(--tl); }
:focus-visible { outline: 2px solid var(--tl); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.45; margin: 0; }
p { margin: 0; }
button { font: inherit; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.cp-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; }
.cp-skip:focus { left: 8px; color: #fff; }
.cp-icon { width: 20px; height: 20px; flex-shrink: 0; }

.cp-container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.cp-main { min-height: 60vh; padding-bottom: 56px; }
.cp-stack { display: flex; flex-direction: column; gap: 36px; padding-top: 24px; }

/* ===============================================================
   PR表記の帯・ヘッダー
   =============================================================== */
.cp-prbar { background: var(--ink); color: var(--base); font-size: 11px; line-height: 1; }
.cp-prbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 7px; padding-bottom: 7px; }
.cp-prbar__text { color: inherit; text-decoration: none; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-prbar__text:hover { color: #fff; text-decoration: underline; }
.cp-prbar__age { flex-shrink: 0; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 4px; font-size: 10px; letter-spacing: .08em; }

.cp-header {
	position: sticky; top: 0; z-index: 30;
	background: rgba(250, 247, 242, .95); border-bottom: 1px solid var(--border);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.cp-header__inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.cp-brand__mark { width: 36px; height: 36px; border-radius: 9px; overflow: hidden; border: 1px solid var(--border); flex-shrink: 0; display: block; }
.cp-brand__mark svg { display: block; }
.cp-brand__text { display: flex; flex-direction: column; min-width: 0; }
.cp-brand__name { font-family: var(--serif); font-size: 20px; font-weight: 800; letter-spacing: .14em; line-height: 1; }
.cp-brand:hover .cp-brand__name { color: var(--tl); }
.cp-brand__sub { font-size: 10.5px; color: var(--sub); letter-spacing: .03em; margin-top: 5px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-gnav { display: none; }
.cp-header__actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.cp-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.cp-iconbtn:hover { background: var(--surface); }

/* 重ねて開くパネル（検索・メニュー） */
.cp-overlay { position: fixed; inset: 0; z-index: 50; }
.cp-overlay__backdrop { position: absolute; inset: 0; background: rgba(42, 35, 38, .35); opacity: 0; transition: opacity .2s ease; }
.cp-overlay.is-open .cp-overlay__backdrop { opacity: 1; }
.cp-search {
	position: relative; margin: 64px var(--gutter) 0; max-width: 520px;
	background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
	box-shadow: 0 24px 48px rgba(42, 35, 38, .18); overflow: hidden;
	transform: translateY(-8px); opacity: 0; transition: transform .2s ease, opacity .2s ease;
}
.cp-overlay.is-open .cp-search { transform: none; opacity: 1; }
.cp-search__form { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--sub); }
.cp-search__form input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; color: var(--ink); background: transparent; }
.cp-search__close { border: 0; background: transparent; color: var(--sub); font-size: 12px; cursor: pointer; padding: 4px 6px; }
.cp-search__tags { padding: 14px 16px 16px; }
.cp-search__label { font-size: 11px; color: var(--sub); margin-bottom: 8px; }

.cp-drawer {
	position: absolute; top: 0; right: 0; bottom: 0; width: 288px; max-width: 85vw;
	background: var(--base); border-left: 1px solid var(--border); box-shadow: -12px 0 40px rgba(42, 35, 38, .16);
	display: flex; flex-direction: column; transform: translateX(100%); transition: transform .26s cubic-bezier(.22, 1, .36, 1);
}
.cp-overlay.is-open .cp-drawer { transform: none; }
.cp-drawer__head { height: 68px; padding: 0 12px 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.cp-drawer__name { font-family: var(--serif); font-weight: 800; letter-spacing: .12em; line-height: 1; }
.cp-drawer__sub { font-size: 10px; color: var(--sub); margin-top: 5px; line-height: 1; }
.cp-drawer__nav { padding: 14px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; font-size: 14px; }
.cp-drawer__nav a { display: block; padding: 11px 14px; border-radius: 12px; text-decoration: none; font-weight: 500; }
.cp-drawer__nav a:hover { background: var(--card); color: var(--ink); }
.cp-drawer__nav a.is-tl { color: var(--tl); }
.cp-drawer__nav a.is-bl { color: var(--bl); }
.cp-drawer__nav hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
.cp-drawer__foot { padding: 18px 20px; border-top: 1px solid var(--border); font-size: 11px; color: var(--sub); line-height: 1.7; }

/* ===============================================================
   共通パーツ
   =============================================================== */
.cp-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cp-section__note { font-size: 11px; color: var(--sub); margin-top: 2px; }
.cp-h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; }
.cp-h2__bar { display: inline-block; width: 4px; height: 18px; border-radius: 4px; background: var(--tl); flex-shrink: 0; }
.cp-h2__bar--gold { background: var(--gold); }
.cp-more { font-size: 12px; color: var(--sub); text-decoration: none; white-space: nowrap; }
.cp-more:hover { color: var(--tl); text-decoration: underline; text-underline-offset: 4px; }
.cp-panel, .cp-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.cp-note { font-size: 11.5px; color: var(--sub); line-height: 1.75; margin-top: 12px; }
.cp-checked { font-size: 11px; color: var(--sub); line-height: 1.6; }
.cp-eyebrow { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; color: var(--tl); margin-bottom: 4px; }
.cp-eyebrow--bl { color: var(--bl); }
.cp-empty { background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); padding: 28px 16px; text-align: center; color: var(--sub); font-size: 14px; }

/* ボタン */
.cp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 11px 18px; border-radius: 12px; border: 0; cursor: pointer;
	font-size: 14px; font-weight: 500; line-height: 1.3; letter-spacing: .02em; text-align: center;
	text-decoration: none; color: #fff; background: var(--ink); transition: opacity .2s ease;
}
.cp-btn:hover { color: #fff; opacity: .9; }
.cp-btn--tl { background: var(--tl); }
.cp-btn--bl { background: var(--bl); }
.cp-btn--ink { background: var(--ink); }
.cp-btn--sm { padding: 8px 12px; font-size: 12px; }
.cp-btn--block { display: flex; width: 100%; margin-top: 14px; }

/* バッジ・タグ */
.cp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-badge { font-size: 10px; font-weight: 500; line-height: 1.5; padding: 1px 8px; border-radius: 4px; border: 1px solid var(--border); background: var(--card); color: var(--sub); }
.cp-badge--tl { background: var(--tl-bg); color: var(--tl); border-color: rgba(158, 59, 87, .2); }
.cp-badge--bl { background: var(--bl-bg); color: var(--bl); border-color: rgba(47, 74, 109, .2); }
.cp-badge--adult { background: var(--ink); color: var(--base); border-color: var(--ink); }
.cp-badge--allages { background: var(--surface); color: var(--common-ink); }
.cp-badge--soft { background: var(--surface); border-color: transparent; }

.cp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-chips--sm { gap: 6px; margin-top: 10px; }
.cp-chip {
	display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
	font-size: 13px; line-height: 1.3; text-decoration: none; transition: background-color .2s ease;
	background: var(--common-bg); color: var(--common-ink);
}
.cp-chips--sm .cp-chip, .cp-chip--xs { padding: 3px 9px; font-size: 11px; }
.cp-chip--tl { background: var(--tl-bg); color: var(--tl); }
.cp-chip--tl:hover { background: #EED8DF; color: var(--tl); }
.cp-chip--bl { background: var(--bl-bg); color: var(--bl); }
.cp-chip--bl:hover { background: #D7E1ED; color: var(--bl); }
.cp-chip--common:hover { background: #E4DDD2; color: var(--common-ink); }
.cp-chip--check { cursor: pointer; border: 1px solid transparent; }
.cp-chip--check input { position: absolute; opacity: 0; pointer-events: none; }
.cp-chip--check:has(input:checked) { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; font-weight: 700; }
.cp-chip--check:has(input:focus-visible) { outline: 2px solid var(--tl); outline-offset: 2px; }
.cp-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--sub); }
.cp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.cp-dot--tl { background: var(--tl); }
.cp-dot--bl { background: var(--bl); }
.cp-dot--common { background: #B9AEA2; }

.cp-mini { font-size: 10px; line-height: 1.5; padding: 0 6px; border-radius: 4px; background: var(--surface); color: var(--sub); }
.cp-mini--tl { background: var(--tl-bg); color: var(--tl); }
.cp-mini--bl { background: var(--bl-bg); color: var(--bl); }
.cp-mini--adult { background: var(--ink); color: var(--base); }

/* 指標（ゴールドは指標とランキングだけ） */
.cp-bar { display: block; flex: 1; height: 6px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.cp-bar > span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.cp-metrics { margin: 0; }
.cp-metrics dd { margin: 0; }
.cp-metrics--compact { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; margin-top: 8px; }
.cp-metrics--compact .cp-metric { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--sub); line-height: 1.6; }
.cp-metrics--compact dt { width: 3.2em; flex-shrink: 0; white-space: nowrap; }
.cp-metrics--compact dd { flex: 1; display: flex; align-items: center; gap: 6px; }
.cp-metrics--compact b { color: var(--gold-text); font-weight: 700; width: .8em; text-align: right; }
.cp-metrics--full { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.cp-metrics--full dt { display: flex; align-items: baseline; gap: 8px; }
.cp-metric__label { font-weight: 500; font-size: 14px; }
.cp-metric__desc { font-size: 11px; color: var(--sub); }
.cp-metrics--full .cp-metric { display: grid; grid-template-columns: 1fr auto; row-gap: 6px; }
.cp-metrics--full dd { display: contents; }
.cp-metric__val { grid-column: 2; grid-row: 1; font-family: var(--serif); font-weight: 700; color: var(--gold-text); font-size: 14px; }
.cp-metric__val small { font-family: var(--sans); font-weight: 400; font-size: 11px; color: var(--sub); }
.cp-metrics--full .cp-bar { grid-column: 1 / -1; height: 8px; }

/* ランキングの順位 */
.cp-rank {
	position: absolute; top: -6px; left: -6px; z-index: 3;
	width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-family: var(--serif); font-size: 13px; font-weight: 700; color: #fff; border: 1px solid #9E7A38; background: var(--gold);
	box-shadow: 0 2px 6px rgba(42, 35, 38, .15);
}
.cp-rank--2 { background: #8F8578; border-color: #756C60; }
.cp-rank--3 { background: #A67C5B; border-color: #8A6345; }
.cp-rank--n { background: var(--card); color: var(--gold-text); border-color: var(--gold); }

/* ===============================================================
   表紙
   =============================================================== */
.cp-cover {
	position: relative; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden;
	background: var(--surface); box-shadow: 0 6px 16px rgba(42, 35, 38, .10), inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.cp-cover__inner { display: block; width: 100%; height: 100%; transition: filter .4s ease, transform .4s ease; }
.cp-cover__inner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-cover.is-blurred .cp-cover__inner { filter: blur(9px); transform: scale(1.08); }
.cp-cover__art {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
	width: 100%; height: 100%; padding: 14% 10%; text-align: center; color: #FAF7F2;
	background: linear-gradient(155deg, #5A2236 0%, #8E3754 52%, #3A1522 100%);
}
.cp-cover--bl .cp-cover__art { background: linear-gradient(155deg, #213652 0%, #375780 54%, #18273B 100%); }
.cp-cover__frame { position: absolute; inset: 6px; border: 1px solid rgba(245, 230, 216, .4); border-radius: 4px; }
.cp-cover__spine { position: absolute; top: 0; bottom: 0; left: 0; width: 10px; background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .16) 48%, transparent); }
.cp-cover__edition { position: absolute; bottom: 9%; left: 0; right: 0; font-size: 7px; letter-spacing: .18em; opacity: .7; }
.cp-cover__title {
	font-family: var(--serif); font-weight: 600; font-size: 12px; line-height: 1.5; letter-spacing: .06em;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .3);
	display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.cp-cover--lg .cp-cover__title { font-size: 17px; }
.cp-cover__author { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(245, 230, 216, .5); font-size: 9px; letter-spacing: .1em; opacity: .85; }
.cp-cover--lg .cp-cover__author { font-size: 12px; }
.cp-cover__veil {
	position: absolute; inset: 0; z-index: 2; border: 0; cursor: pointer;
	display: flex; align-items: center; justify-content: center; background: rgba(42, 35, 38, .28);
}
.cp-cover__veil span {
	display: flex; flex-direction: column; align-items: center; gap: 1px;
	background: rgba(42, 35, 38, .85); color: var(--base); border: 1px solid rgba(255, 255, 255, .15);
	border-radius: 6px; padding: 4px 8px; font-size: 10px; font-weight: 500; letter-spacing: .06em; line-height: 1.4;
}
.cp-cover__veil small { font-size: 8.5px; color: #E6D6C3; font-weight: 400; }

/* ===============================================================
   作品カード
   =============================================================== */
.cp-cards--grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
.cp-cards--list { display: flex; flex-direction: column; gap: 12px; }
.cp-card--grid { min-width: 0; }
.cp-card__meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.cp-card--grid .cp-card__title { font-size: 12.5px; font-weight: 700; line-height: 1.5; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-card__title a { text-decoration: none; }
.cp-card__author { font-size: 11px; color: var(--sub); line-height: 1.6; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-card--list {
	display: flex; gap: 14px; padding: 14px; background: var(--card); border: 1px solid var(--border);
	border-radius: var(--radius); box-shadow: var(--shadow);
}
.cp-card--list .cp-card__cover { position: relative; width: 88px; flex-shrink: 0; }
.cp-card__body { min-width: 0; flex: 1; }
.cp-card--list .cp-card__title { font-size: 14.5px; font-weight: 700; line-height: 1.55; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===============================================================
   トップ
   =============================================================== */
.cp-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: linear-gradient(155deg, #FAF7F2 0%, #F4EDE2 55%, #EBE1D4 100%); }
.cp-hero__art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cp-hero__art--pc { display: none; }
.cp-hero__veil { position: relative; z-index: 1; background: linear-gradient(90deg, rgba(250, 247, 242, .95) 0%, rgba(250, 247, 242, .82) 55%, rgba(250, 247, 242, .3) 100%); }
.cp-hero__inner { padding-top: 32px; padding-bottom: 36px; }
.cp-hero__eyebrow { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--tl); font-weight: 500; margin-bottom: 6px; }
.cp-hero__title { font-size: 26px; font-weight: 800; letter-spacing: .06em; line-height: 1.4; margin-bottom: 10px; }
.cp-hero__lead { font-size: 13px; color: var(--sub); line-height: 1.8; max-width: 340px; margin-bottom: 16px; }
.cp-hero__search {
	display: flex; align-items: center; gap: 8px; max-width: 380px; padding: 10px 14px;
	background: var(--card); border: 1px solid var(--border); border-radius: 12px; color: var(--sub); box-shadow: var(--shadow);
}
.cp-hero__search:focus-within { border-color: rgba(158, 59, 87, .5); }
.cp-hero__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.cp-combos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.cp-combos__label { font-size: 10.5px; color: var(--sub); }
.cp-combo { font-size: 11.5px; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .9); border: 1px solid var(--border); text-decoration: none; }
.cp-combo--tl:hover { background: var(--tl-bg); color: var(--tl); }
.cp-combo--bl:hover { background: var(--bl-bg); color: var(--bl); }
.cp-combo--all:hover { background: var(--surface); color: var(--ink); }
.cp-steam { animation: cpSteam 4.2s ease-in-out infinite; }
@keyframes cpSteam { 0%, 100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-2.5px); opacity: .78; } }

.cp-entrances { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cp-entrance { display: block; padding: 16px; border-radius: var(--radius); color: #fff; text-decoration: none; box-shadow: var(--shadow); transition: opacity .2s ease; }
.cp-entrance:hover { color: #fff; opacity: .94; }
.cp-entrance--tl { background: var(--tl); }
.cp-entrance--bl { background: var(--bl); }
.cp-entrance__en { display: flex; align-items: center; justify-content: space-between; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .82; }
.cp-entrance__en .cp-icon { width: 16px; height: 16px; }
.cp-entrance__name { display: block; font-family: var(--serif); font-size: 17px; font-weight: 700; margin-top: 2px; }
.cp-entrance__tags { display: block; font-size: 11px; opacity: .85; line-height: 1.6; margin-top: 4px; }

.cp-features { display: grid; gap: 12px; }
.cp-feature { display: block; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); }
.cp-feature__title { display: block; font-family: var(--serif); font-weight: 700; line-height: 1.55; }
.cp-feature__excerpt { display: block; font-size: 12px; color: var(--sub); margin-top: 6px; line-height: 1.7; }
.cp-storebanner { display: block; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; }
.cp-storebanner__en { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); }
.cp-storebanner__title { display: block; font-family: var(--serif); font-size: 18px; font-weight: 700; margin-top: 2px; }
.cp-storebanner__lead { display: block; font-size: 12.5px; color: var(--sub); margin-top: 4px; }

/* ===============================================================
   作品記事・固定ページ
   =============================================================== */
.cp-article { padding-top: 14px; display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.cp-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; color: var(--sub); line-height: 1.6; }
.cp-crumbs li:not(:last-child)::after { content: "›"; margin-left: 4px; opacity: .6; }
.cp-crumbs a { text-decoration: none; }
.cp-crumbs a:hover { text-decoration: underline; }
.cp-article__title { font-size: 20px; font-weight: 800; margin-top: 8px; line-height: 1.5; }
.cp-article__by { font-size: 12px; color: var(--sub); margin-top: 6px; }
.cp-article__by a { text-decoration: none; }
.cp-article__by a:hover { text-decoration: underline; }
.cp-article__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cp-article__aside { display: none; }
.cp-aside__head { display: flex; gap: 12px; align-items: flex-start; }
.cp-aside__cover { width: 64px; flex-shrink: 0; }
.cp-aside__text { min-width: 0; }
.cp-aside__title { font-family: var(--serif); font-weight: 700; font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cp-aside .cp-metrics--compact { margin-top: 14px; }
.cp-aside__stores { list-style: none; margin: 4px 0 0; padding: 0; }
.cp-aside__price { font-size: 12px; color: var(--sub); text-align: center; margin-top: 4px; }
.cp-aside .cp-checked { margin-top: 10px; }
.cp-pr { font-size: 11.5px; line-height: 1.7; color: var(--sub); background: var(--surface); border-radius: 10px; padding: 10px 12px; }

.cp-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.cp-overview__cover { width: 150px; margin: 0 auto; }
.cp-datatable { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.6; }
.cp-datatable th, .cp-datatable td { padding: 6px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cp-datatable th { width: 7.5em; color: var(--sub); font-weight: 400; padding-right: 8px; }
.cp-datatable a { text-decoration: none; color: var(--tl); }
.cp-overview .cp-checked { margin-top: 8px; }

.cp-prose { font-size: 15.5px; line-height: 1.95; }
.cp-prose > * + * { margin-top: 1em; }
.cp-box .cp-prose { margin-top: 12px; }
.cp-box.cp-prose { margin-top: 0; }
.cp-prose h2 { font-size: 19px; margin-top: 1.8em; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.cp-prose h3 { font-size: 16.5px; margin-top: 1.5em; }
.cp-prose a { color: var(--tl); }
.cp-prose ul, .cp-prose ol { padding-left: 1.4em; }
.cp-prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cp-prose th, .cp-prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.cp-prose th { background: var(--surface); font-weight: 500; width: 30%; }
.cp-prose figure { margin: 0; }

.cp-spoiler { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--base); }
.cp-spoiler summary { cursor: pointer; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--sub); list-style: none; }
.cp-spoiler summary::-webkit-details-marker { display: none; }
.cp-spoiler summary::before { content: "＋"; margin-right: 8px; color: var(--tl); }
.cp-spoiler[open] summary::before { content: "－"; }
.cp-spoiler .cp-prose { padding: 0 14px 14px; margin-top: 0; font-size: 14.5px; }

.cp-points { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.cp-point { display: flex; gap: 12px; }
.cp-point__num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); font-family: var(--serif); font-weight: 700; font-size: 14px; }
.cp-point p { font-size: 14.5px; line-height: 1.85; margin-top: 4px; }

.cp-fit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cp-fit__col { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.cp-fit__col h3 { display: flex; align-items: center; gap: 6px; font-size: 13.5px; margin-bottom: 8px; color: var(--sub); }
.cp-fit__col--tl h3 { color: var(--tl); }
.cp-fit__col--bl h3 { color: var(--bl); }
.cp-fit__col .cp-icon { width: 16px; height: 16px; }
.cp-fit__col ul { margin: 0; padding-left: 1.1em; font-size: 12.5px; line-height: 1.75; }
.cp-fit__col li + li { margin-top: 4px; }

.cp-buy { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cp-buy__row { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--base); }
.cp-buy__info { min-width: 0; }
.cp-buy__name { font-weight: 700; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cp-buy__badge { font-size: 10px; font-weight: 500; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--gold); color: var(--gold-text); background: var(--card); }
.cp-buy__price { font-size: 13px; margin-top: 2px; }
.cp-buy__benefit { font-size: 12px; color: var(--sub); line-height: 1.6; margin-top: 2px; }
.cp-buy__row .cp-btn { flex-shrink: 0; font-size: 14px; padding: 12px 14px; }

/* 画面下部に追従する購入ボタン */
.cp-sticky {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
	background: rgba(255, 255, 255, .97); border-top: 1px solid var(--border); box-shadow: 0 -6px 24px rgba(42, 35, 38, .08);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	transform: translateY(110%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s;
	padding-bottom: env(safe-area-inset-bottom);
}
.cp-sticky.is-visible { transform: none; visibility: visible; transition: transform .25s ease; }
.cp-sticky__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; max-width: 820px; }
.cp-sticky__text { min-width: 0; }
.cp-sticky__title { font-family: var(--serif); font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.cp-sticky__sub { font-size: 11px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }

/* ストア比較（[comipita_stores]） */
.cp-table-wrap { overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.cp-store-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; line-height: 1.6; }
.cp-prose .cp-store-table th, .cp-prose .cp-store-table td, .cp-store-table th, .cp-store-table td { border: 0; border-bottom: 1px solid var(--border); padding: 12px 8px; vertical-align: middle; background: none; width: auto; }
.cp-store-table thead th { font-size: 11px; color: var(--sub); font-weight: 400; }
.cp-store-table tbody th { font-weight: 700; white-space: nowrap; }
.cp-store-table .cp-checked { display: block; }
.cp-persona-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.cp-persona { border: 1px solid var(--border); border-left: 4px solid var(--ink); border-radius: 12px; padding: 14px 16px; background: var(--base); }
.cp-persona--tl { border-left-color: var(--tl); }
.cp-persona--bl { border-left-color: var(--bl); }
.cp-prose .cp-persona__name { margin: 0; font-size: 16px; }
.cp-persona__who { font-size: 13.5px; margin-top: 4px !important; }
.cp-persona__bonus { font-size: 12px; color: var(--sub); margin-top: 4px !important; }
.cp-persona .cp-btn { margin-top: 10px; font-size: 13px; }
.cp-prose .cp-btn { color: #fff; text-decoration: none; }
.cp-store-compare .cp-h2 { margin-top: 28px; border: 0; padding: 0; }

/* フォーム・お知らせ */
.cp-form p + p { margin-top: 14px; }
.cp-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.cp-form input[type="text"], .cp-form input[type="email"], .cp-form select, .cp-form textarea {
	width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--ink);
}
.cp-form__hp { position: absolute; left: -9999px; }
.cp-form__privacy { font-size: 12px; color: var(--sub); }
.cp-notice { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.cp-notice--ok { background: #EAF2EA; color: #2F5A35; }
.cp-notice--error { background: var(--tl-bg); color: var(--tl); }

/* ===============================================================
   一覧（ジャンル・タグ・条件検索）
   =============================================================== */
.cp-listing { padding-top: 14px; }
.cp-listing__head { margin: 10px 0 16px; }
.cp-listing__title { font-size: 21px; font-weight: 800; }
.cp-listing__lead { font-size: 13px; color: var(--sub); line-height: 1.8; margin-top: 6px; max-width: 640px; }
.cp-listing__count { font-size: 12px; color: var(--sub); margin: 14px 0 10px; }
.cp-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.cp-tab { flex: 1; max-width: 120px; text-align: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); text-decoration: none; font-size: 13px; font-weight: 500; }
.cp-tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cp-tab--tl.is-active { background: var(--tl); border-color: var(--tl); }
.cp-tab--bl.is-active { background: var(--bl); border-color: var(--bl); }

.cp-filter { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.cp-filter summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 500; font-size: 14px; list-style: none; }
.cp-filter summary::-webkit-details-marker { display: none; }
.cp-filter summary::after { content: "＋"; color: var(--sub); }
.cp-filter[open] summary::after { content: "－"; }
.cp-filter__on { margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--tl-bg); color: var(--tl); }
.cp-filter__form { padding: 4px 16px 16px; border-top: 1px solid var(--border); }
.cp-filter__group { border: 0; padding: 0; margin: 12px 0 0; }
.cp-filter__group legend { font-size: 12px; color: var(--sub); margin-bottom: 8px; padding: 0; }
.cp-filter__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.cp-field { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--sub); min-width: 0; }
.cp-field select { font: inherit; font-size: 14px; color: var(--ink); padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--base); width: 100%; }
.cp-filter__actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.cp-filter__reset { font-size: 12px; color: var(--sub); }

.navigation.pagination { margin-top: 24px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.page-numbers { min-width: 38px; padding: 6px 10px; text-align: center; border: 1px solid var(--border); border-radius: 10px; background: var(--card); text-decoration: none; font-size: 13px; }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.page-numbers.dots { border: 0; background: none; }

/* ===============================================================
   フッター
   =============================================================== */
.cp-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 36px 0 28px; }
.cp-footer__brand { text-align: center; }
.cp-footer__logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 20px; font-weight: 800; letter-spacing: .16em; }
.cp-footer__logo svg { border-radius: 6px; border: 1px solid var(--border); }
.cp-footer__sub { font-size: 11px; color: var(--sub); letter-spacing: .06em; margin-top: 4px; }
.cp-footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 20px; font-size: 12px; }
.cp-footer__nav a { color: var(--sub); text-decoration: none; }
.cp-footer__nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.cp-footer__reopen { text-align: center; margin-top: 10px; font-size: 11px; }
.cp-footer__reopen a { color: var(--sub); }
.cp-footer__legal { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 11px; color: var(--sub); line-height: 1.8; display: flex; flex-direction: column; gap: 6px; }
.cp-footer__copy { text-align: center; margin-top: 8px; opacity: .85; }

/* ===============================================================
   PC（768px以上）
   =============================================================== */
@media (min-width: 768px) {
	:root { --gutter: 24px; }
	.cp-gnav { display: flex; align-items: center; gap: 22px; font-size: 13px; font-weight: 500; }
	.cp-gnav a { text-decoration: none; }
	.cp-gnav a.cp-gnav__tl:hover { color: var(--tl); }
	.cp-gnav a.cp-gnav__bl:hover { color: var(--bl); }
	.cp-search { margin: 96px auto 0; }

	/* ヒーロー：PCは横長のイラストに差し替え、左に見出しを置く */
	.cp-hero__art--sp { display: none; }
	.cp-hero__art--pc { display: block; }
	.cp-hero__veil { background: linear-gradient(90deg, rgba(250, 247, 242, .96) 0%, rgba(250, 247, 242, .88) 36%, rgba(250, 247, 242, 0) 62%); }
	.cp-hero__inner { padding-top: 64px; padding-bottom: 68px; }
	.cp-hero__eyebrow { font-size: 11px; }
	.cp-hero__title { font-size: 36px; }
	.cp-hero__lead { max-width: 440px; font-size: 14.5px; }
	.cp-hero__search { max-width: 460px; padding: 12px 16px; }
	.cp-combos { max-width: 560px; }
	.cp-hero__frame { display: none; }
	.cp-stack { gap: 48px; padding-top: 36px; }
	.cp-entrance { padding: 22px 24px; }
	.cp-entrance__name { font-size: 21px; }
	.cp-panel, .cp-box { padding: 24px; }
	.cp-h2 { font-size: 20px; }

	.cp-cards--grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 16px; }
	.cp-cards--2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
	.cp-card--list .cp-card__cover { width: 100px; }
	.cp-features { grid-template-columns: 1fr 1fr; }

	.cp-article { margin: 0 auto; }
	.cp-article--page { max-width: 760px; }
	.cp-article__title { font-size: 26px; }
	.cp-overview { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
	.cp-overview__cover { width: auto; margin: 0; }
	.cp-datatable { font-size: 13.5px; }
	.cp-fit__col ul { font-size: 13.5px; }
	.cp-persona-list { display: grid; grid-template-columns: 1fr 1fr; }
	.cp-buy__row { flex-direction: row; align-items: center; justify-content: space-between; }
	.cp-buy__row .cp-btn { font-size: 13px; }

	.cp-listing__title { font-size: 26px; }
	.cp-filter__grid { grid-template-columns: repeat(3, 1fr); }
	.cp-table-wrap { margin: 0; padding: 0; }
}

@media (min-width: 1024px) {
	.cp-container { max-width: 1120px; }
	.cp-filter__grid { grid-template-columns: repeat(5, 1fr); }

	.cp-hero__inner { padding-top: 80px; padding-bottom: 84px; }
	.cp-hero__title { font-size: 42px; letter-spacing: .08em; }
	.cp-hero__lead { font-size: 15px; max-width: 480px; }

	/* 作品記事：本文＋右の追従カラム。下部の追従ボタンは使わない */
	.cp-article { max-width: 1120px; }
	.cp-article__layout { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 28px; align-items: start; }
	.cp-article__aside { display: block; position: sticky; top: 88px; }
	.cp-sticky { display: none; }
	body.has-sticky { padding-bottom: 0; }
}

@media (min-width: 1280px) {
	.cp-hero__frame { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
