/* ═══════════════════════════════════════════════
   Parceiro Theme — flipbook.css
   デジタルカタログ（/catalog/）：本のようにめくるビューア
   動きは assets/js/flipbook.js。JS が動くと .pc-fb に .is-ready が付き、
   動かない環境ではページ画像を縦に並べて見せる。
═══════════════════════════════════════════════ */

.pc-catalog {
	background: var(--ink);
	padding-top: var(--header-h);
}

/* ───── ビューア全体（画面の高さいっぱい） ───── */
.pc-fb {
	position: relative;
	display: flex;
	flex-direction: column;
	height: calc(100vh - var(--header-h));
	height: calc(100svh - var(--header-h));
	min-height: 520px;
	background: var(--ink);
	color: var(--paper);
}

/* 上の帯：見出し＋いまのページ */
.pc-fb-top {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px 20px;
	padding: 14px clamp(16px, 3vw, 36px) 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.pc-fb-en {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0;
	font-family: var(--font-en);
	font-weight: 600;
	font-size: clamp(20px, 2.4vw, 28px);
	letter-spacing: 0.06em;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--paper);
}
.pc-fb-en span {
	font-size: 0.5em;
	font-weight: 500;
	letter-spacing: 0.14em;
	color: var(--orange);
}
.pc-fb-title {
	margin: 4px 0 0;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.5;
	color: rgba(244, 242, 238, 0.72);
}
.pc-fb-count {
	margin: 0;
	font-family: var(--font-en);
	font-size: clamp(18px, 2vw, 24px);
	font-weight: 500;
	letter-spacing: 0.08em;
	line-height: 1.1;
	white-space: nowrap;
	color: #fff;
}
.pc-fb-count-sep { margin: 0 0.35em; color: var(--orange); }
.pc-fb-count-all { color: rgba(244, 242, 238, 0.5); }

/* ───── 本を置く場所 ───── */
.pc-fb-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	background: radial-gradient(ellipse at 50% 45%, #2c2f2a 0%, var(--ink) 72%);
	touch-action: pan-y pinch-zoom;   /* 横の動きはめくりに、縦は画面のスクロールに */
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}
.pc-fb.is-zoomed .pc-fb-stage {
	overflow: auto;
	touch-action: pan-x pan-y pinch-zoom;
	cursor: grab;
}
.pc-fb-stage.is-dragging,
.pc-fb-stage.is-panning { cursor: grabbing !important; }
.pc-fb-canvas { position: relative; }

.pc-fb.is-ready .pc-fb-book {
	position: absolute;
	left: 0;
	top: 0;
}

/* ページ（JS が位置・切り抜き・向きを1コマずつ書く） */
.pc-fb.is-ready .pc-fb-page {
	position: absolute;
	left: 0;
	top: 0;
	margin: 0;
	width: var(--fb-w);
	height: var(--fb-h);
	overflow: hidden;
	background: #fff;
	visibility: hidden;
	transform-origin: 0 0;
}
.pc-fb-page img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	-webkit-user-drag: none;
	-webkit-user-select: none;
	user-select: none;
}
.pc-fb-page.is-l,
.pc-fb-page.is-r { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.pc-fb-page.is-turning { box-shadow: none; }

/* 綴じ目の陰り */
.pc-fb-page::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 1;
	width: 9%;
	pointer-events: none;
	opacity: 0;
}
.pc-fb-page.is-l::after {
	right: 0;
	opacity: 1;
	background: linear-gradient(to left, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
}
.pc-fb-page.is-r::after {
	left: 0;
	opacity: 1;
	background: linear-gradient(to right, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
}
.pc-fb-page.is-alone::after { opacity: 0; }   /* 表紙・裏表紙だけのときは綴じ目を出さない */
.pc-fb.is-single .pc-fb-page.is-r::after {
	width: 4%;
	background: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
}
.pc-fb-blank { background: #fbfaf7 !important; }   /* 1ページ表示でめくる紙の裏 */

/* 折り目の陰り（JS が幅・向き・濃さを決める） */
.pc-fb-shade {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 2;
	width: 0;
	height: 0;
	opacity: 0;
	transform-origin: 0 0;
	pointer-events: none;
	background: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.35) 35%, rgba(0, 0, 0, 0) 100%);
}
.pc-fb-shade-back {   /* 折れ返った紙の裏：折り目は暗く、少し先が丸みで明るい */
	background: linear-gradient(to right, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.08) 22%, rgba(255, 255, 255, 0.26) 48%, rgba(255, 255, 255, 0) 100%);
}
.pc-fb-shade-cast {   /* めくれた下のページに落ちる影 */
	background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0) 100%);
}
.pc-fb-cast {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 2;
	width: var(--fb-w);
	height: var(--fb-h);
	overflow: hidden;
	visibility: hidden;
	transform-origin: 0 0;
	pointer-events: none;
}
.pc-fb-flap {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 4;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
.pc-fb.is-spread .pc-fb-flap { filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3)); }

/* 読み込み中 */
.pc-fb-loading { display: none; }
.pc-fb.is-loading .pc-fb-loading {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 0;
	font-family: var(--font-en);
	font-size: 12px;
	letter-spacing: 0.3em;
	color: rgba(244, 242, 238, 0.7);
	pointer-events: none;
}
.pc-fb-loading span {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.25);
	border-top-color: var(--orange);
	border-radius: 50%;
	animation: pc-fb-spin 0.8s linear infinite;
}
@keyframes pc-fb-spin { to { transform: rotate(360deg); } }

/* ───── 下の操作の帯 ───── */
.pc-fb-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 10px clamp(12px, 3vw, 36px) calc(10px + env(safe-area-inset-bottom));
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	background: var(--ink);
}
.pc-fb-nav {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1 1 340px;
	min-width: 0;
	max-width: 640px;
}
.pc-fb-tools {
	display: flex;
	align-items: center;
	gap: 6px;
}
.pc-fb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 44px;
	height: 44px;
	padding: 0 10px;
	border: 1.5px solid rgba(255, 255, 255, 0.35);
	border-radius: var(--radius);
	background: transparent;
	color: #fff;
	font-family: var(--font-jp);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pc-fb-btn:hover:not(:disabled) {
	background: var(--orange);
	border-color: var(--orange);
	color: #fff;
}
.pc-fb-btn:disabled { opacity: 0.3; cursor: default; }
.pc-fb-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.pc-fb-btn[aria-expanded="true"],
.pc-fb-btn[aria-pressed="true"] {
	background: #fff;
	border-color: #fff;
	color: var(--ink);
}
.pc-fb-btn svg { flex-shrink: 0; }
.pc-fb-ico-exit { display: none; }
.pc-fb.is-fs .pc-fb-ico-enter,
.pc-fb.is-full .pc-fb-ico-enter { display: none; }
.pc-fb.is-fs .pc-fb-ico-exit,
.pc-fb.is-full .pc-fb-ico-exit { display: inline; }

/* ページのスライダー */
.pc-fb-range {
	flex: 1 1 auto;
	min-width: 80px;
	height: 44px;
	margin: 0 8px;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.pc-fb-range:disabled { opacity: 0.3; cursor: default; }
.pc-fb-range:focus { outline: none; }
.pc-fb-range:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.pc-fb-range::-webkit-slider-runnable-track {
	height: 3px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.3);
}
.pc-fb-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	margin-top: -7.5px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--orange);
}
.pc-fb-range::-moz-range-track {
	height: 3px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.3);
}
.pc-fb-range::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--orange);
}

/* ───── ページ一覧 ───── */
.pc-fb-thumbs {
	position: absolute;
	inset: 0;
	z-index: 6;
	overflow-y: auto;
	padding: 24px clamp(16px, 3vw, 36px);
	background: rgba(29, 31, 28, 0.95);
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
}
.pc-fb-thumbs[hidden] { display: none; }
.pc-fb-thumbs-inner {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
	gap: 20px 14px;
	max-width: 1100px;
	margin: 0 auto;
}
.pc-fb-thumb {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: rgba(244, 242, 238, 0.8);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.pc-fb-thumb-img {
	display: block;
	aspect-ratio: 1200 / 1697;
	overflow: hidden;
	background: #fff;
	outline: 1px solid rgba(255, 255, 255, 0.2);
	outline-offset: 0;
}
.pc-fb-thumb-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.pc-fb-thumb:hover .pc-fb-thumb-img { outline: 2px solid #fff; }
.pc-fb-thumb.is-current .pc-fb-thumb-img { outline: 3px solid var(--orange); }
.pc-fb-thumb:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.pc-fb-thumb-label {
	font-size: 11.5px;
	letter-spacing: 0.06em;
	line-height: 1.45;
}
.pc-fb-thumb-label b {
	margin-right: 7px;
	font-family: var(--font-en);
	font-size: 13px;
	font-weight: 600;
	color: var(--orange);
}

/* 読み上げ用（画面には出さない） */
.pc-fb-live {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.pc-fb-empty {
	margin: 0;
	padding: 80px 20px;
	text-align: center;
	color: rgba(244, 242, 238, 0.7);
}

/* ───── 全画面 ───── */
.pc-fb:fullscreen { width: 100%; height: 100vh; min-height: 0; }
.pc-fb:-webkit-full-screen { width: 100%; height: 100vh; min-height: 0; }
.pc-fb.is-full {
	position: fixed;
	inset: 0;
	z-index: 2000;   /* 固定ヘッダー（1000）・モバイルメニュー（1100）より上 */
	height: 100%;
	min-height: 0;
}
.pc-fb.is-fs .pc-fb-stage,
.pc-fb.is-full .pc-fb-stage { touch-action: none; }
.pc-fb.is-fs.is-zoomed .pc-fb-stage,
.pc-fb.is-full.is-zoomed .pc-fb-stage { touch-action: pan-x pan-y pinch-zoom; }
html.pc-fb-lock,
html.pc-fb-lock body { overflow: hidden; }

/* ───── 狭い画面 ───── */
@media (max-width: 760px) {
	.pc-fb-btn span { display: none; }
	.pc-fb-btn[data-fb="first"],
	.pc-fb-btn[data-fb="last"] { display: none; }
	.pc-fb-title { font-size: 11.5px; }
}
@media (max-width: 520px) {
	.pc-fb { min-height: 460px; }
	.pc-fb-range { display: none; }    /* 一覧から選べるので、狭い画面では省いて1列に収める */
	.pc-fb-nav { flex: 0 0 auto; }
	.pc-fb-bar { gap: 6px; padding-left: 12px; padding-right: 12px; }
	.pc-fb-tools { gap: 5px; }
}

/* ───── JS が動かないとき：ページを縦に並べる ───── */
.pc-fb:not(.is-ready) { height: auto; min-height: 0; }
.pc-fb:not(.is-ready) .pc-fb-stage { overflow: visible; padding: 24px 16px 48px; }
.pc-fb:not(.is-ready) .pc-fb-book {
	display: flex;
	flex-direction: column;
	gap: 18px;
	max-width: 760px;
	margin: 0 auto;
}
.pc-fb:not(.is-ready) .pc-fb-page { margin: 0; background: #fff; }
.pc-fb:not(.is-ready) .pc-fb-page img { height: auto; }
.pc-fb:not(.is-ready) .pc-fb-bar,
.pc-fb:not(.is-ready) .pc-fb-count { display: none; }

/* ───── ビューアの下：説明とボタン ───── */
.pc-catalog-info {
	background: var(--paper);
	padding: clamp(48px, 7vw, 88px) 0;
}
.pc-catalog-info-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: clamp(28px, 5vw, 64px);
	align-items: start;
}
.pc-catalog-lead {
	margin: 0 0 26px;
	font-size: clamp(15px, 1.5vw, 17px);
	font-weight: 500;
	line-height: 2;
	text-align: justify;
	text-justify: inter-character;
}
.pc-catalog-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}
.pc-btn-line {
	background: transparent;
	border-color: var(--ink);
	color: var(--ink);
}
.pc-btn-line:hover { background: var(--ink); color: #fff; }
.pc-catalog-howto h2 {
	margin: 0 0 4px;
	padding-bottom: 10px;
	border-bottom: var(--border);
	font-size: 14px;
	font-weight: 900;
	letter-spacing: 0.14em;
}
.pc-catalog-howto dl { margin: 0; }
.pc-catalog-howto dl > div {
	display: grid;
	grid-template-columns: 5.5em minmax(0, 1fr);
	gap: 12px;
	padding: 12px 2px;
	border-bottom: 1px solid var(--line);
	font-size: 13.5px;
	line-height: 1.85;
}
.pc-catalog-howto dt { font-weight: 700; letter-spacing: 0.08em; }
.pc-catalog-howto dd {
	margin: 0;
	color: var(--ink-soft);
	text-align: justify;
	text-justify: inter-character;
}
@media (max-width: 820px) {
	.pc-catalog-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.pc-catalog-lead br { display: none; }
}
