/*
Theme Name: ComicLounge Site
Theme URI: https://example.com/
Description: ComicLounge（コミック・小説のセルフホスト型ビューア）の紹介・配布サイト用テーマ。リリース（バージョン・zip・SHA-256・変更点）を管理画面から登録すると、ダウンロードと更新履歴のページに反映されます。
Version: 2.7.5
Requires at least: 6.4
Tested up to: 7.2
Requires PHP: 8.0
Author: YuchiCamp
Text Domain: comiclounge-site
*/

/* ==========================================================
   デザインの考え方: 漫画雑誌の「二色刷り」
   紙の白・墨・オレンジ（ブランドの色）の3つだけで組む。
   影やグラデーションは使わず、濃淡は網点（スクリーントーン）で出す。
   区切りはコマ枠（太い墨の線）。見出しは漫画の写植と同じアンチック体。
   赤は「やってはいけないこと」だけに使う。
   ========================================================== */
:root {
	--paper: #ffffff;
	--ink: #1a1612;
	--ink-2: #57504a;
	--spot: #ef8a3c;        /* オレンジ（ブランドのアクセント） */
	--spot-ink: #a94c0c;    /* 白地の上の文字・リンク用の濃いオレンジ */
	--spot-pale: #fdebd9;
	--rule: #d9d5cf;
	--ng: #b3261e;
	--ng-pale: #fbeae7;

	--antique: "Shippori Antique B1", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
	--gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
	--mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

	--frame: 3px;           /* コマ枠の太さ */
	--gutter: 10px;         /* コマとコマのあいだ */
	--wrap: 1160px;
	--gap: clamp(1.1rem, 3.2vw, 2rem);
	--tone: radial-gradient(circle, rgba(26, 22, 18, 0.28) 1.15px, transparent 1.35px);
	--tone-spot: radial-gradient(circle, rgba(239, 138, 60, 0.75) 1.5px, transparent 1.7px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
	margin: 0; background: var(--paper); color: var(--ink);
	font-family: var(--gothic); font-size: 1rem; line-height: 1.9; letter-spacing: 0;
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--spot-ink); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--spot); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--antique); font-weight: 400; line-height: 1.4; margin: 0 0 0.6em; letter-spacing: -0.01em; word-break: auto-phrase; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: 0.6rem 1rem; }
.skip-link:focus { top: 1rem; color: #fff; }
.site-main:focus { outline: none; }
.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }

/* 網点 */
.tone { background-image: var(--tone), var(--tone); background-size: 9px 9px; background-position: 0 0, 4.5px 4.5px; }

/* コマ */
.koma { border: var(--frame) solid var(--ink); background: var(--paper); overflow: hidden; }
.koma > img { display: block; width: 100%; }

/* ---------- ボタン ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 3.1rem; padding: 0.6rem 1.6rem;
	border: var(--frame) solid var(--ink); border-radius: 999px;
	font: 700 1rem/1.3 var(--gothic); letter-spacing: 0.06em; text-decoration: none; cursor: pointer;
	transition: background-color 0.12s, color 0.12s;
}
.btn-ember { background: var(--spot); color: var(--ink); }
.btn-ember:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-quiet { background: var(--paper); color: var(--ink); border-width: 2px; min-height: 2.5rem; padding: 0.3rem 1rem; font-size: 0.9rem; }
.btn-quiet:hover { background: var(--ink); color: #fff; }
.btn-small { min-height: 2.6rem; padding: 0.35rem 1.15rem; font-size: 0.9rem; border-width: 2px; }
.btn-large { min-height: 3.6rem; padding: 0.8rem 2.25rem; font-size: 1.1rem; }
.more { font-weight: 700; color: var(--ink); text-decoration-color: var(--spot); text-decoration-thickness: 3px; text-underline-offset: 0.3em; }
.more:hover { color: var(--spot-ink); text-decoration-thickness: 3px; }

/* ---------- ヘッダー ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: var(--frame) solid var(--ink); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.header-inner { width: min(100% - 2 * var(--gap), 1280px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-logo { display: block; height: 40px; width: auto; }
.brand-mark { display: block; width: 40px; height: 40px; }
.brand-name { font: 700 1.35rem/1 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", sans-serif; letter-spacing: -0.01em; color: var(--ink); }
.brand-name span { font-weight: 400; color: #e27b30; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-list { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 700; padding: 0.35rem 0; border-bottom: 3px solid transparent; }
.nav-list a:hover, .nav-list a[aria-current="page"], .nav-list .current-menu-item > a { border-bottom-color: var(--spot); color: var(--ink); }
.nav-list .nav-ng a { color: var(--ng); }
.nav-list .nav-ng a:hover, .nav-list .nav-ng a[aria-current="page"] { border-bottom-color: var(--ng); color: var(--ng); }
.nav-toggle { display: none; }
@media (max-width: 1140px) {
	.nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 1rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 0.9rem var(--gothic); cursor: pointer; }
	.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
	.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle-bars::before { top: -5px; }
	.nav-toggle-bars::after { top: 5px; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: var(--frame) solid var(--ink); padding: 0.25rem var(--gap) 1.25rem; }
	.site-nav.is-open { display: flex; }
	html:not(.js) .site-nav { display: flex; position: static; }
	html:not(.js) .nav-toggle { display: none; }
	.nav-list { flex-direction: column; gap: 0; }
	.nav-list a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
	.site-nav .btn { margin-top: 1rem; }
}

/* ---------- トップ: 最初の1ページ（コマ割り） ---------- */
.hero { padding-block: var(--gutter) clamp(3rem, 7vw, 5rem); }
.hero-page { width: min(100% - 2 * var(--gutter), 1280px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) clamp(150px, 17vw, 220px); gap: var(--gutter); }
.hero-ill { grid-column: 1; grid-row: 1; }
.hero-ill img { height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero-title-koma { grid-column: 2; grid-row: 1; background: var(--ink); color: #fff; display: flex; justify-content: center; align-items: flex-start; padding: clamp(1.25rem, 3vw, 2.25rem) 0.5rem; }
.hero-title { writing-mode: vertical-rl; font-size: clamp(2rem, 3.9vw, 3.5rem); line-height: 1.45; letter-spacing: 0.1em; margin: 0; }
.hero-title span { display: block; }
.hero-title span + span { margin-top: 1.4em; }
.hero-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); }
.hero-lead-koma { padding: clamp(1.5rem, 3.5vw, 2.75rem); display: flex; flex-direction: column; justify-content: center; }
.hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 2; font-weight: 700; word-break: auto-phrase; }
.hero-meta { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-shot { margin: 0; max-height: 26rem; }
.hero-shot img { height: 100%; object-fit: cover; object-position: 0 0; }
@media (prefers-reduced-motion: no-preference) {
	.hero-title span { animation: cls-write 1s cubic-bezier(0.6, 0, 0.2, 1) both; }
	.hero-title span + span { animation-delay: 0.5s; }
	@keyframes cls-write { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
}
@media (max-width: 820px) {
	.hero-page { grid-template-columns: minmax(0, 1fr) 6.2rem; }
	.hero-title { font-size: 1.85rem; }
	.hero-row { grid-template-columns: minmax(0, 1fr); }
	.hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- セクション共通 ---------- */
.sec { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sec-rule { border-top: var(--frame) solid var(--ink); }
.sec-title { font-size: clamp(1.9rem, 4.2vw, 3rem); margin-bottom: 0.5em; }
.sec-lead { max-width: 40rem; color: var(--ink-2); font-size: 1.05rem; }

/* ---------- しくみ（3コマ） ---------- */
.strip { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); counter-reset: koma; }
.strip > li { counter-increment: koma; display: flex; flex-direction: column; }
.strip-ill { border-bottom: var(--frame) solid var(--ink); aspect-ratio: 4 / 3; }
.strip-ill img { display: block; width: 100%; height: 100%; object-fit: contain; }
.strip-text { padding: 1.25rem 1.4rem 1.5rem; position: relative; flex: 1; }
.strip-text h3 { font-size: 1.35rem; margin-bottom: 0.35em; display: flex; align-items: center; gap: 0.6rem; }
.strip-text h3::before { content: counter(koma); flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--ink); color: #fff; font: 700 0.95rem/1 var(--gothic); }
.strip-text p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 800px) { .strip { grid-template-columns: minmax(0, 1fr); } .strip-ill { aspect-ratio: 16 / 9; } }

/* ---------- できること ---------- */
.feat { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.feat-flip .feat-shot { order: 2; }
.feat-shot { margin: 0; }
.feat-text h3 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
.feat-text > p { color: var(--ink-2); }
.feat-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feat-phone { display: flex; justify-content: center; padding: clamp(1.25rem, 3vw, 2.25rem); background-image: var(--tone-spot), var(--tone-spot); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.feat-phone img { width: auto; max-height: 30rem; border: 8px solid var(--ink); border-radius: 30px; background: var(--ink); }
.ticks { list-style: none; margin: 1rem 0 1.25rem; padding: 0; }
.ticks li { position: relative; padding-left: 1.5rem; margin-bottom: 0.35rem; }
.ticks li::before { content: ""; position: absolute; left: 0.1rem; top: 0.62em; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--spot); border: 2px solid var(--ink); }
.feat-note { font-size: 0.86rem; line-height: 1.75; color: var(--ink-2); border-left: 3px solid var(--rule); padding-left: 0.9rem; margin: 0 0 1.25rem; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(3rem, 7vw, 5rem); }
.trio-item { display: flex; flex-direction: column; }
.trio-item > img { border-bottom: var(--frame) solid var(--ink); aspect-ratio: 4 / 3; object-fit: contain; }
.trio-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.trio-body h3 { font-size: 1.3rem; }
.trio-body .ticks { font-size: 0.93rem; flex: 1; }
@media (max-width: 860px) {
	.feat, .feat-flip { grid-template-columns: minmax(0, 1fr); }
	.feat-flip .feat-shot { order: 0; }
	.trio { grid-template-columns: minmax(0, 1fr); }
	.trio-item > img { aspect-ratio: 16 / 9; }
}

/* 見出しは「、」のところでだけ折り返す（言葉の途中で切らない） */
.feat-text h3, .trio-body h3, .chap-side h2, .sec-title { word-break: keep-all; overflow-wrap: anywhere; }

/* ---------- はじめるまで ---------- */
.start { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); margin-top: 2.5rem; }
.start-ill { display: flex; align-items: center; }
.start-body { padding: clamp(1.5rem, 3.5vw, 2.5rem); }
.start-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; counter-reset: st; }
.start-steps li { counter-increment: st; position: relative; padding: 0 0 1.1rem 3rem; }
.start-steps li::before { content: counter(st); position: absolute; left: 0; top: 0.05rem; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--spot); border: 2px solid var(--ink); font: 700 0.95rem/1 var(--gothic); }
.start-steps strong { display: block; font-size: 1.08rem; }
.start-steps span { color: var(--ink-2); font-size: 0.93rem; }
@media (max-width: 800px) { .start { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 読めるアーカイブ形式（本棚） ---------- */
.shelf { display: flex; align-items: flex-end; justify-content: center; gap: 0; margin: 2.5rem auto 0; padding: 0 var(--gap); width: max-content; max-width: 100%; border-bottom: 12px solid var(--ink); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.shelf::after { content: ""; flex: 0 0 var(--gap); }
.spine { position: relative; flex: none; width: 72px; height: 260px; background: var(--paper); color: var(--ink); border: var(--frame) solid var(--ink); border-bottom: 0; margin-left: -3px; display: flex; flex-direction: column; align-items: center; padding: 1.6rem 0 2rem; }
.spine::before, .spine::after { content: ""; position: absolute; left: 7px; right: 7px; border-top: 2px solid currentColor; }
.spine::before { top: 0.7rem; }
.spine::after { bottom: 1rem; }
.spine.h1 { height: 232px; }
.spine.h2 { height: 252px; width: 64px; }
.spine.h3 { height: 284px; width: 80px; }
.spine.h4 { height: 304px; }
.spine-name { writing-mode: vertical-rl; text-orientation: upright; font: 400 1.2rem/1 var(--antique); letter-spacing: 0.14em; white-space: nowrap; }
.spine-sub { writing-mode: vertical-rl; font-size: 0.72rem; font-weight: 700; line-height: 1; letter-spacing: 0.08em; margin-top: 0.9rem; white-space: nowrap; }
.spine.c-spot { background: var(--spot); }
.spine.c-ink { background: var(--ink); color: #fff; }
.spine.c-tone { background-image: var(--tone), var(--tone); background-size: 9px 9px; background-position: 0 0, 4.5px 4.5px; }
.spine.c-tone .spine-name, .spine.c-tone .spine-sub { background: var(--paper); padding: 0.35rem 0.1rem; }
.spine.c-spot-tone { background-image: var(--tone-spot), var(--tone-spot); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.spine.c-spot-tone .spine-name, .spine.c-spot-tone .spine-sub { background: var(--paper); padding: 0.35rem 0.1rem; }
.spine.lean { transform: rotate(-9deg); transform-origin: left bottom; margin-left: 30px; margin-right: 14px; }
.formats-note { max-width: 40rem; color: var(--ink-2); margin-top: 2rem; font-size: 0.95rem; }
@media (max-width: 800px) { .shelf { justify-content: flex-start; width: 100%; padding-top: 1rem; } .spine { width: 60px; } .spine.h3 { width: 66px; } .spine.h2 { width: 56px; } }

/* ---------- 動作環境 ---------- */
.spec-list { margin: 2rem 0 0; max-width: 56rem; border-top: var(--frame) solid var(--ink); }
.spec-list > div { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 0.25rem 2rem; padding-block: 1.25rem; border-bottom: 1px solid var(--ink); }
.spec-list dt { font-weight: 700; grid-row: span 3; }
.spec-list dd { margin: 0; grid-column: 2; color: var(--ink-2); }
@media (max-width: 640px) { .spec-list > div { grid-template-columns: minmax(0, 1fr); } .spec-list dd { grid-column: 1; } }

/* ---------- NG の帯 ---------- */
.ng-band { background: var(--ng-pale); border-block: var(--frame) solid var(--ng); padding-block: clamp(2.5rem, 6vw, 4rem); }
.ng-inner { display: flex; gap: clamp(1.25rem, 4vw, 2.5rem); align-items: flex-start; max-width: 58rem; }
.ng-mark { flex: none; margin: 0; width: clamp(4.5rem, 10vw, 6rem); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--ng); color: #fff; font: 700 clamp(1.5rem, 3.4vw, 2rem)/1 var(--gothic); letter-spacing: 0.04em; }
.ng-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--ng); margin-bottom: 0.45em; }
.ng-band p { max-width: 40rem; }
.ng-link { font-weight: 700; color: var(--ng); }
.ng-link:hover { color: var(--ink); }
@media (max-width: 560px) { .ng-inner { flex-direction: column; } }

/* ---------- 締め ---------- */
.cta { background: var(--ink); color: #fff; padding-block: clamp(4rem, 9vw, 6.5rem); text-align: center; }
.cta-title { font-size: clamp(1.9rem, 4.4vw, 3.1rem); }
.cta p { color: rgba(255, 255, 255, 0.82); margin-bottom: 2rem; }
.cta .hero-actions { justify-content: center; }
.cta .btn { border-color: #fff; }
.cta .btn-ember { border-color: var(--spot); }
.cta .btn-ember:hover { background: #fff; color: var(--ink); border-color: #fff; }
.cta .btn-ghost { background: transparent; color: #fff; }
.cta .btn-ghost:hover { background: #fff; color: var(--ink); }

/* ---------- フッター ---------- */
.site-footer { border-top: var(--frame) solid var(--ink); padding-block: 3rem; font-size: 0.9rem; }
.footer-inner { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 2rem; }
.footer-brand p { margin: 0.75rem 0 0; font-family: var(--antique); }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 0.35rem; }
.footer-list a { color: var(--ink); }
.footer-note { color: var(--ink-2); }
.footer-note p { margin-bottom: 0.6rem; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 下層ページの見出し ---------- */
.page-head { border-bottom: var(--frame) solid var(--ink); background-image: var(--tone), var(--tone); background-size: 9px 9px; background-position: 0 0, 4.5px 4.5px; padding-block: clamp(2.25rem, 6vw, 4rem); }
.page-title { display: inline; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.5; margin: 0; background: var(--paper); box-shadow: 0.35em 0 0 var(--paper), -0.35em 0 0 var(--paper); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.page-sub { margin: 1rem 0 0; max-width: 40rem; }
.page-sub span { background: var(--paper); box-shadow: 0.4em 0 0 var(--paper), -0.4em 0 0 var(--paper); -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 2.1; font-weight: 700; }
.page-body { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(4rem, 8vw, 6rem); }

/* 長いページの目次 */
.toc { display: none; }
@media (min-width: 1100px) {
	.page-cols.has-toc { display: grid; grid-template-columns: minmax(0, 46rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
	.page-cols.has-toc .toc { display: block; position: sticky; top: 6.5rem; border: var(--frame) solid var(--ink); padding: 1.25rem 1.4rem; max-width: 20rem; justify-self: end; width: 100%; }
}
.toc-title { font-family: var(--antique); font-size: 1.1rem; margin: 0 0 0.6rem; }
.toc-list { list-style: none; margin: 0; padding: 0; counter-reset: toc; font-size: 0.9rem; line-height: 1.6; }
.toc-list li { border-top: 1px solid var(--rule); }
.toc-list a { display: block; padding: 0.5rem 0; color: var(--ink); text-decoration: none; }
.toc-list a:hover { color: var(--spot-ink); text-decoration: underline; }

/* ---------- 機能のページ ---------- */
.chap-index { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chap-index a { display: inline-block; padding: 0.35rem 1rem; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.93rem; background: var(--paper); }
.chap-index a:hover { background: var(--spot); }
.chap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: clamp(3rem, 7vw, 5rem); border-top: var(--frame) solid var(--ink); }
.chap:first-of-type { border-top: 0; }
.chap-side { align-self: start; position: sticky; top: 6rem; }
.chap-side h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 1.1rem 0 0.4em; }
.chap-side p { color: var(--ink-2); margin: 0; }
.items { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.25rem; }
.items > div { padding: 1.05rem 0; border-top: 1px solid var(--ink); break-inside: avoid; }
.items > div:nth-child(-n+2) { border-top: var(--frame) solid var(--ink); }
.items dt { font-weight: 700; font-size: 1.04rem; line-height: 1.6; margin-bottom: 0.2rem; }
.items dd { margin: 0; color: var(--ink-2); font-size: 0.93rem; line-height: 1.8; }
.chap-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin-top: 2rem; }
.chap-shots.one { grid-template-columns: minmax(0, 1fr); }
.chap-shots.phone-pair { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: start; }
.chap-shots figure { margin: 0; }
.chap-shots figcaption { font-size: 0.82rem; color: var(--ink-2); padding-top: 0.4rem; line-height: 1.6; }
.chap-note { font-size: 0.88rem; color: var(--ink-2); border-left: 3px solid var(--rule); padding-left: 0.9rem; margin: 1.5rem 0 0; }
@media (max-width: 900px) {
	.chap { grid-template-columns: minmax(0, 1fr); }
	.chap-side { position: static; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.25rem; align-items: center; }
	.chap-side h2 { margin-top: 0; }
}
@media (max-width: 600px) {
	.items { grid-template-columns: minmax(0, 1fr); }
	.items > div:nth-child(2) { border-top: 1px solid var(--ink); }
	.chap-side { grid-template-columns: minmax(0, 1fr); }
	.chap-shots, .chap-shots.phone-pair { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 本文（固定ページ） ---------- */
.entry { max-width: 46rem; }
.entry h2 { font-size: clamp(1.5rem, 2.8vw, 1.95rem); margin: 3.25rem 0 1rem; padding-top: 1rem; border-top: var(--frame) solid var(--ink); }
.entry > h2:first-child, .entry .wp-block-group h2 { margin-top: 0; }
.entry h3 { font: 700 1.12rem/1.6 var(--gothic); letter-spacing: 0.02em; margin: 2.25rem 0 0.75rem; }
.entry ul, .entry ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }
.entry ul { list-style: disc; }
.entry ol:not(.cl-steps) { list-style: decimal; }
.entry li { margin-bottom: 0.35rem; }
.entry strong { font-weight: 700; }
.entry code { background: var(--spot-pale); padding: 0.1em 0.4em; font-size: 0.9em; }
.entry td code { word-break: break-all; }
.entry pre, .wp-block-code { background: var(--ink); color: #f6f1ea; padding: 1.1rem 1.25rem; overflow-x: auto; font-size: 0.88rem; line-height: 1.7; margin: 0 0 1.5rem; }
.entry pre code, .wp-block-code code { background: none; padding: 0; color: inherit; font-size: inherit; }
.entry .wp-block-image { margin: 0 0 1.5rem; }
.entry .wp-block-image img { display: block; border: var(--frame) solid var(--ink); }
.entry .wp-block-image figcaption { font-size: 0.82rem; color: var(--ink-2); margin-top: 0.4rem; }

.entry ol.cl-steps { list-style: none; padding: 0; counter-reset: step; }
.entry ol.cl-steps > li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3.25rem; margin: 0; }
.entry ol.cl-steps > li::before { content: counter(step); position: absolute; left: 0; top: -0.1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--spot); border: 2px solid var(--ink); font: 700 1rem/1 var(--gothic); }
.entry ol.cl-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 1rem; top: 2.2rem; bottom: 0.2rem; border-left: 2px solid var(--ink); }

.wp-block-table { margin: 0 0 1.75rem; overflow-x: auto; }
.entry table, .older-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.entry th, .entry td, .older-table th, .older-table td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem 0.7rem 0; border: 0; border-bottom: 1px solid var(--ink); }
.entry thead th, .older-table thead th { border-bottom: var(--frame) solid var(--ink); font-weight: 700; }

.wp-block-details { border-bottom: 1px solid var(--ink); margin: 0; }
.wp-block-details:first-of-type, h2 + .wp-block-details { border-top: 0; }
.wp-block-details summary { cursor: pointer; list-style: none; position: relative; padding: 1rem 3rem 1rem 0; font-weight: 700; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: ""; position: absolute; right: 0.6rem; top: 50%; width: 0.6rem; height: 0.6rem; margin-top: -0.45rem; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); transition: transform 0.2s; }
.wp-block-details[open] summary::after { transform: rotate(225deg); margin-top: -0.1rem; }
.wp-block-details > :last-child:not(summary) { padding-bottom: 0.5rem; }

.entry .wp-block-group__inner-container > :last-child { margin-bottom: 0; }
.entry .cl-callout { border: var(--frame) solid var(--ink); padding: clamp(1.25rem, 4vw, 2rem); margin: 0 0 3rem; position: relative; }
.entry .cl-callout::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--spot); border-bottom: var(--frame) solid var(--ink); }
.entry .cl-callout h2 { border-top: 0; padding-top: 0.75rem; font-size: clamp(1.5rem, 3.2vw, 2rem); }
.entry .cl-ng-top { background: var(--ng-pale); border: var(--frame) solid var(--ng); padding: clamp(1.25rem, 4vw, 2rem); margin: 0 0 3rem; }
.entry .cl-ng-top > p:first-child, .entry .cl-ng-top > .wp-block-group__inner-container > p:first-child { color: var(--ng); font-weight: 700; margin-bottom: 0.25rem; }
.entry .cl-ng-top h2 { color: var(--ng); border-top: 0; margin: 0 0 0.75rem; padding: 0; font-size: clamp(1.7rem, 3.8vw, 2.4rem); }
.entry .cl-ng-top li::marker { color: var(--ng); }
.entry .cl-ng:not(.cl-ng-top) { border-left: 8px solid var(--ng); padding: 0.25rem 0 0.25rem 1.25rem; margin: 0 0 1.75rem; }
.entry .cl-ng h3 { margin: 0 0 0.4rem; color: var(--ng); font: 400 1.3rem/1.5 var(--antique); }
.entry .cl-ng h3::before { content: "× "; font-family: var(--gothic); font-weight: 700; }
.entry .cl-warn { background: var(--ng-pale); border-left: 8px solid var(--ng); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.entry .cl-warn a { color: var(--ng); font-weight: 700; }

/* ---------- ダウンロード ---------- */
.release-box { border: var(--frame) solid var(--ink); padding: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 3rem; max-width: 46rem; position: relative; }
.release-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--spot); border-bottom: var(--frame) solid var(--ink); }
.release-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.25rem; padding-top: 0.75rem; }
.release-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin: 0; }
.release-date { margin: 0; color: var(--ink-2); }
.release-facts { margin: 1.25rem 0 1.75rem; display: grid; gap: 0.25rem; font-size: 0.95rem; }
.release-facts div { display: flex; gap: 1rem; }
.release-facts dt { width: 5rem; flex: none; color: var(--ink-2); }
.release-facts dd { margin: 0; overflow-wrap: anywhere; }
.consent { padding: 1.25rem; background-image: var(--tone), var(--tone); background-size: 9px 9px; background-position: 0 0, 4.5px 4.5px; border: 2px solid var(--ink); }
.consent-label { display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer; margin-bottom: 1rem; background: var(--paper); padding: 0.75rem 0.9rem; border: 2px solid var(--ink); }
.consent-check { width: 1.35rem; height: 1.35rem; margin: 0.3rem 0 0; flex: none; accent-color: var(--ink); }
.consent-hint { margin: 0.75rem 0 0; font-size: 0.85rem; background: var(--paper); display: inline-block; padding: 0 0.5rem; }
html:not(.js) .consent-hint { display: none; }
.js .btn[aria-disabled="true"] { background: #e4e1dc; color: #77706a; border-color: #77706a; cursor: not-allowed; }
.consent.is-nudged .consent-label { animation: cls-nudge 0.35s; }
.link-button { padding: 0; border: 0; background: none; font: inherit; color: var(--spot-ink); text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px; cursor: pointer; }
.link-button:hover { color: var(--ink); }
@keyframes cls-nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .consent.is-nudged .consent-label { animation: none; } }
.dl-note { margin: 0.9rem 0 0; font-size: 0.8rem; line-height: 1.7; color: var(--ink-2); background: var(--paper); padding: 0.4rem 0.6rem; }
.hash { margin-top: 1.75rem; }
.hash-label { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 0.4rem; }
.hash-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.hash-value { flex: 1 1 18rem; min-width: 0; overflow-wrap: anywhere; background: var(--spot-pale); padding: 0.6rem 0.8rem; font-size: 0.82rem; line-height: 1.6; }
.hash-how, .release-notes { margin-top: 1rem; }
.hash-how summary, .release-notes summary { cursor: pointer; font-weight: 700; }
.hash-how pre { background: var(--ink); color: #f6f1ea; padding: 0.8rem 1rem; overflow-x: auto; font-size: 0.85rem; }
.release-notes .entry { margin-top: 1rem; }
.release-empty h2 { font-size: 1.7rem; padding-top: 0.75rem; }
.older { margin-top: 3.5rem; max-width: 56rem; }
.older h2 { font-size: 1.6rem; }
.older p { color: var(--ink-2); }
.hash-short { font-size: 0.8rem; }
.tag-pre { display: inline-block; margin-left: 0.5rem; padding: 0 0.55rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--spot); font: 700 0.75rem/1.7 var(--gothic); vertical-align: middle; }
@media (max-width: 640px) {
	.older-table thead { display: none; }
	.older-table tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--ink); padding-block: 0.4rem; }
	.older-table th, .older-table td { border: 0; padding: 0.2rem 0; }
}

/* ---------- 更新履歴 ---------- */
.timeline { list-style: none; margin: 2rem 0 0; padding: 0; max-width: 46rem; }
.timeline-item { position: relative; padding: 0 0 2.5rem 2rem; border-left: var(--frame) solid var(--ink); margin-left: 0.5rem; }
.timeline-item::before { content: ""; position: absolute; left: -0.72rem; top: 0.55rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--spot); border: var(--frame) solid var(--ink); }
.timeline-item:last-child { border-left-color: transparent; }
.timeline-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.timeline-head h2 { font-size: 1.7rem; margin: 0; }
.timeline-head time { color: var(--ink-2); }
.timeline .entry h3 { margin-top: 1.25rem; }
.empty-note { color: var(--ink-2); }

/* ---------- お知らせ（投稿） ---------- */
.post-list { max-width: 46rem; }
.post-item { padding-block: 1.5rem; border-bottom: 1px solid var(--ink); }
.post-item time { color: var(--ink-2); font-size: 0.9rem; }
.post-item h2 { font-size: 1.4rem; margin: 0.25rem 0 0.5rem; }
.post-item h2 a { color: var(--ink); text-decoration: none; }

.alignwide { max-width: var(--wrap); }
.alignfull { max-width: none; }
.has-text-align-center { text-align: center; }

@media print {
	.site-header, .site-footer, .cta, .nav-toggle { display: none; }
	.chap-side { position: static; }
}

/* ------------------------------------------------------------------ 画面で見る（page-screens.php） */
.screens-intro { display: grid; gap: 1.1rem; }
.screens-note { margin: 0; max-width: 46rem; font-size: 0.9rem; color: var(--ink-2); border-left: 3px solid var(--spot); padding-left: 0.9rem; }
.screens-note.shots-fiction { margin-top: 1.25rem; }
.screens-sec { margin-top: clamp(3rem, 7vw, 5rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: var(--frame) solid var(--ink); scroll-margin-top: 5rem; }
.screens-head { margin-bottom: clamp(1.25rem, 3vw, 2rem); max-width: 46rem; }
.screens-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 0.35em; word-break: keep-all; overflow-wrap: anywhere; }
.screens-head p { margin: 0; color: var(--ink-2); }
.screens-head .more { display: inline-block; margin-top: 0.6rem; font-size: 0.93rem; }

/* 1段のコマ: 画像の縦横の比（--r）を flex-grow にして、同じ段の画像の高さをそろえる */
.shot-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--gutter); }
.shot-row + .shot-row { margin-top: calc(var(--gutter) * 2.4); }
.shot-row.is-tablet { max-width: 46rem; }
.shot { flex: var(--r) 1 0; min-width: min(100%, 17rem); margin: 0; }
.shot-phone, .shot-tablet { min-width: 8.5rem; }
.shot-link { display: block; cursor: zoom-in; }
.shot-link > img { display: block; width: 100%; height: auto; aspect-ratio: var(--r); }
.shot-link:hover { border-color: var(--spot); }
.shot figcaption { padding-top: 0.55rem; font-size: 0.84rem; line-height: 1.7; color: var(--ink-2); }
.shot figcaption strong { display: block; color: var(--ink); font-size: 0.98rem; line-height: 1.5; margin-bottom: 0.1rem; }
.shot-note { display: block; margin-top: 0.35rem; font-size: 0.8rem; line-height: 1.65; color: var(--ink-2); padding-left: 1em; text-indent: -1em; }
@media (max-width: 640px) {
	.shot-pc { flex-basis: 100%; }
	.shot-phone, .shot-tablet { flex: 0 0 calc(50% - var(--gutter) / 2); min-width: 0; }
}

/* 大きく表示 */
html.is-viewing { overflow: hidden; }
.shot-viewer { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #1a1612; color: #fff; overflow: hidden; }
.shot-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.shot-viewer::backdrop { background: rgba(26, 22, 18, 0.6); }
.shot-viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem clamp(0.75rem, 3vw, 1.5rem); }
.shot-viewer-count { margin: 0; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.shot-viewer-fig { margin: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 0.75rem; padding: 0 clamp(4rem, 8vw, 6rem) 1.25rem; }
.shot-viewer-fig img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border: var(--frame) solid #fff; background: #000; min-height: 0; }
.shot-viewer.is-tall .shot-viewer-fig img { max-height: 100%; }
.shot-viewer-fig figcaption { max-width: 46rem; font-size: 0.9rem; line-height: 1.75; text-align: center; color: rgba(255, 255, 255, 0.86); }
.shot-viewer-fig figcaption strong { display: block; color: #fff; font-size: 1rem; }
.shot-viewer-fig figcaption small { display: block; margin-top: 0.3rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.72); }
.shot-viewer-fiction { margin: 0 auto 0 1rem; font-size: 0.78rem; color: rgba(255, 255, 255, 0.65); }
@media (max-width: 640px) { .shot-viewer-fiction { margin-left: 0.6rem; font-size: 0.72rem; line-height: 1.4; } }
.shot-viewer button { font: 700 0.9rem/1 var(--gothic); color: #fff; background: transparent; border: 2px solid #fff; border-radius: 999px; min-height: 2.75rem; padding: 0 1.1rem; cursor: pointer; }
.shot-viewer button:hover { background: var(--spot); border-color: var(--spot); color: var(--ink); }
.shot-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.shot-viewer-nav.prev { left: clamp(0.5rem, 1.5vw, 1.25rem); }
.shot-viewer-nav.next { right: clamp(0.5rem, 1.5vw, 1.25rem); }
@media (max-width: 640px) {
	.shot-viewer[open] { grid-template-rows: auto minmax(0, 1fr) auto; }
	.shot-viewer-fig { padding: 0 0.75rem 0.5rem; }
	.shot-viewer-fig figcaption { font-size: 0.82rem; text-align: left; }
	.shot-viewer-nav { position: static; transform: none; }
	.shot-viewer[open] { grid-template-columns: minmax(0, 1fr); }
	.shot-viewer-bar, .shot-viewer-fig { grid-column: 1; }
	.shot-viewer-nav.prev { grid-row: 3; grid-column: 1; justify-self: start; margin: 0 0 0.9rem 0.75rem; }
	.shot-viewer-nav.next { grid-row: 3; grid-column: 1; justify-self: end; margin: 0 0.75rem 0.9rem 0; }
}
