/*
Theme Name: Sakuga Anime
Description: 作画崩壊アニメ.com のオリジナルテーマ。作画崩壊記事（投稿）と規制解除記事（sakuhin）の2種類を、sakuga-core プラグインのデータから組み立てる。CSS 1本・JS なし。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: sakuga-anime
*/

:root {
	--bg: #fff;
	--tx: #1f2328;
	--mute: #6b7280;
	--ac: #d92b4b;      /* アクセント（ボタン・見出しの帯） */
	--ac-d: #b01f3a;
	--ln: #e3e5e8;      /* 罫線 */
	--s1: #f6f7f8;      /* 面 */
	--mark: #fff3a3;
	--w: 760px;
	/* アフィリエイトのクッションページ（aff-cushion）の色 */
	--affc-accent: var(--ac);
	--affc-line: var(--ln);
	--affc-surface: var(--s1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--tx);
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
	font-size: 16px;
	line-height: 1.8;
	overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; vertical-align: bottom; }
a { color: #0b62c4; }
a:hover { color: var(--ac); }
.wrap { max-width: calc(var(--w) + 32px); margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.site-header { border-bottom: 3px solid var(--ac); }
.site-header__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-top: 12px; padding-bottom: 10px; }
.site-title { color: var(--tx); font-size: 1.2rem; font-weight: 800; text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .86rem; }
.site-nav a { color: var(--tx); font-weight: 600; text-decoration: none; padding: 4px 0; }
.site-nav a:hover { color: var(--ac); }
.site-main { padding-top: 14px; padding-bottom: 48px; }

/* パンくず */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0 0 14px; padding: 0; list-style: none; color: var(--mute); font-size: .78rem; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }
.breadcrumb a { color: var(--mute); }

/* トップ・一覧 */
.hero { margin: 8px 0 28px; padding: 20px 16px; background: var(--s1); border-radius: 8px; }
.hero h1 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.4; }
.hero p { margin: 0; color: var(--mute); font-size: .9rem; }
.section { margin: 36px 0 0; }
.section__title { margin: 0 0 14px; padding-left: 10px; border-left: 5px solid var(--ac); font-size: 1.2rem; line-height: 1.4; }
.section__title span { display: block; color: var(--mute); font-size: .75rem; font-weight: 400; }
.page-title { margin: 0 0 10px; font-size: 1.5rem; line-height: 1.4; }
.page-lead { margin: 0 0 20px; color: var(--mute); font-size: .9rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px 12px; }
.card { display: flex; flex-direction: column; color: var(--tx); text-decoration: none; }
.card__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--s1); }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__noimg { display: flex; align-items: center; justify-content: center; height: 100%; padding: 8px; background: linear-gradient(135deg, #2b2d42, #5a1e33); color: #fff; font-size: .85rem; font-weight: 700; line-height: 1.4; text-align: center; }
.card__label { align-self: flex-start; margin-top: 8px; padding: 0 8px; border-radius: 3px; background: var(--s1); color: var(--mute); font-size: .68rem; font-weight: 700; }
.card--kisei .card__label { background: var(--ac); color: #fff; }
.card__title { margin-top: 4px; font-size: .86rem; font-weight: 600; line-height: 1.5; }
.card:hover .card__title { color: var(--ac); }

.more-link { margin: 18px 0 0; text-align: right; font-weight: 700; }
.more-link a::after { content: " →"; }

.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0 0; padding: 0; list-style: none; }
.pagination a, .pagination span { display: block; min-width: 40px; padding: 6px 10px; border: 1px solid var(--ln); border-radius: 4px; color: var(--tx); text-align: center; text-decoration: none; }
.pagination .current { border-color: var(--ac); background: var(--ac); color: #fff; }

/* 記事 */
.article__title { margin: 0 0 8px; font-size: 1.55rem; line-height: 1.45; }
.article__meta { margin: 0; color: var(--mute); font-size: .8rem; }
.pr-note { display: inline-block; margin: 6px 0 0; padding: 0 8px; border: 1px solid var(--ln); border-radius: 3px; color: var(--mute); font-size: .72rem; }
.article__head { margin-bottom: 20px; }
.article__thumb img { border-radius: 8px; }

.prose > * { margin-top: 0; margin-bottom: 1.3em; }
.prose h2 { margin: 2.4em 0 1em; padding: 12px 14px; border-radius: 4px; background: var(--tx); color: #fff; font-size: 1.22rem; line-height: 1.5; scroll-margin-top: 12px; }
.prose h3 { margin: 2em 0 .8em; padding: 0 0 6px 10px; border-left: 5px solid var(--ac); border-bottom: 1px solid var(--ln); font-size: 1.08rem; line-height: 1.5; }
.prose h4 { margin: 1.6em 0 .6em; font-size: 1rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 14px 16px; border-left: 4px solid var(--ln); background: var(--s1); font-size: .94rem; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { padding: 9px 10px; border: 1px solid var(--ln); vertical-align: top; text-align: left; }
.prose table.info th { width: 32%; background: var(--s1); font-weight: 700; }
.prose .note { color: var(--mute); font-size: .8rem; }
.prose iframe { max-width: 100%; }
.scene { margin-bottom: 2em; }

.versions { padding: 14px 16px 14px 2.4em !important; border: 2px solid var(--ln); border-radius: 6px; font-weight: 700; }
.toc { padding: 14px 16px; border-radius: 6px; background: var(--s1); font-size: .92rem; }
.toc__title { margin: 0 0 4px; font-weight: 700; }
.toc ol { margin: 0; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--s1); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ボタン・送客 */
.btn { display: block; max-width: 460px; margin: 0 auto; padding: 14px 18px; border-radius: 999px; background: var(--ac); color: #fff !important; font-weight: 800; line-height: 1.4; text-align: center; text-decoration: none; box-shadow: 0 3px 0 var(--ac-d); }
.btn:hover { background: var(--ac-d); }
.cta { text-align: center; }
.cta__note { margin: 8px 0 0; color: var(--mute); font-size: .78rem; }
.service-box { padding: 16px; border: 2px solid var(--ac); border-radius: 8px; }
.service-box__name { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; }
.service-box__body { margin-bottom: 14px; font-size: .92rem; }
.service-box__body ul { margin: 0; }
.kisei-banner { padding: 18px 16px; border-radius: 8px; background: linear-gradient(135deg, #2b2d42, #5a1e33); text-align: center; }
.kisei-banner__lead { margin: 0 0 12px; color: #fff; font-weight: 700; }

/* 旧本文の装飾 */
.memo { padding: 12px 16px; border: 2px dashed var(--ln); border-radius: 6px; }
.memo > :last-child { margin-bottom: 0; }
.keiko_yellow, .label_yellow { background: linear-gradient(transparent 55%, var(--mark) 55%); }
.red { color: #d00; }
.b { font-weight: 700; }
.al_c, .aligncenter { text-align: center; }
img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 16px; }
.wp-block-column { flex: 1 1 240px; min-width: 0; }
.wp-block-column > :last-child { margin-bottom: 0; }

/* フッター */
.site-footer { padding: 28px 0 32px; background: var(--s1); font-size: .86rem; }
.search { display: flex; gap: 6px; max-width: 420px; margin: 0 auto 18px; }
.search input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--ln); border-radius: 4px; font-size: 1rem; }
.search button { padding: 8px 16px; border: 0; border-radius: 4px; background: var(--tx); color: #fff; font-weight: 700; cursor: pointer; }
.site-footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.site-footer__nav a { color: var(--tx); }
.site-footer__copy { margin: 14px 0 0; color: var(--mute); text-align: center; font-size: .78rem; }

/* お問い合わせフォーム（Contact Form 7） */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--ln); border-radius: 4px; font: inherit; }
.wpcf7 input[type="submit"] { padding: 10px 28px; border: 0; border-radius: 999px; background: var(--ac); color: #fff; font-weight: 700; cursor: pointer; }

@media (max-width: 600px) {
	.article__title { font-size: 1.3rem; }
	.prose h2 { font-size: 1.1rem; }
	.cards { grid-template-columns: repeat(2, 1fr); }
	.prose table.info th { width: 36%; }
}
