/* ============================================================
   サイコパス動物診断 公開ページ
   ダーク基調。見出しは Shippori Mincho B1、本文は Zen Kaku Gothic New。
   ============================================================ */
:root {
	--bg: #0B0B0D;
	--card: #141418;
	--card-2: #1B1B21;
	--line: #2A2A31;
	--text: #EDEAE4;
	--muted: #9A968F;
	--accent: #C21E3A;
	--accent-2: #E2483D;
	--font-head: "Shippori Mincho B1", serif;
	--font-body: "Zen Kaku Gothic New", system-ui, sans-serif;
	--radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	line-height: 1.8;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
main { width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.visually-hidden {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.pre-line { white-space: pre-line; }

/* ---- ヘッダー・フッター ---- */
.site-header {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 14px 16px; border-bottom: 1px solid var(--line);
	position: sticky; top: 0; background: rgba(11, 11, 13, .9); backdrop-filter: blur(8px); z-index: 10;
}
.site-logo { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: .05em; }
.site-nav { display: flex; gap: 16px; align-items: center; font-size: .9rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta { color: var(--text); border: 1px solid var(--accent); padding: 4px 14px; border-radius: 999px; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 16px; text-align: center; color: var(--muted); font-size: .8rem; }
.footer-nav { display: flex; gap: 20px; justify-content: center; margin: 12px 0; }
.footer-nav a { text-decoration: none; }
.disclaimer { max-width: 640px; margin: 0 auto; }

/* ---- ボタン ---- */
.btn-primary {
	display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 1rem;
	padding: 12px 28px; border-radius: 999px;
	box-shadow: 0 6px 24px rgba(194, 30, 58, .35);
	transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(194, 30, 58, .5); }
.btn-large { font-size: 1.1rem; padding: 16px 44px; }
.btn-ghost {
	background: transparent; color: var(--muted); border: 1px solid var(--line);
	padding: 10px 20px; border-radius: 999px; cursor: pointer; font-family: inherit;
}

/* ---- 共通の見出し・セクション ---- */
.page-title, .section-title, .hero-title, .result-type { font-family: var(--font-head); font-weight: 800; line-height: 1.4; }
.page-title { font-size: 1.6rem; margin: 8px 0; }
.lead { color: var(--muted); margin-top: 0; }
.section { margin-top: 56px; }
.section-title { font-size: 1.3rem; margin: 0 0 18px; padding-left: 12px; border-left: 3px solid var(--accent); }
.section-cta { text-align: center; }
.prose p { margin: 0 0 1.2em; }
.alert { background: rgba(226, 72, 61, .12); border: 1px solid var(--accent-2); padding: 10px 14px; border-radius: 8px; }

/* ---- トップ ---- */
.hero { text-align: center; padding: 56px 0 40px; }
.hero-eyebrow { color: var(--muted); letter-spacing: .2em; font-size: .85rem; margin: 0; }
.hero-title { font-size: clamp(1.8rem, 6vw, 3rem); margin: 12px 0 18px; }
.hero-title .accent { color: var(--accent-2); text-shadow: 0 0 24px rgba(226, 72, 61, .5); }
.hero-lead { color: var(--muted); max-width: 560px; margin: 0 auto 32px; }

.axis-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.axis-list li { background: var(--card); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.axis-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--axis); box-shadow: 0 0 12px var(--axis); }
.axis-name { font-weight: 700; }
.axis-desc { width: 100%; color: var(--muted); font-size: .85rem; }

/* ---- タイプ一覧 ---- */
.type-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.type-card {
	display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none;
	background: var(--card); border-radius: var(--radius); padding: 16px 10px; text-align: center; height: 100%;
	transition: background .15s;
}
.type-card:hover { background: var(--card-2); }
.type-no { color: var(--muted); font-size: .75rem; letter-spacing: .1em; display: block; }
.type-name { font-family: var(--font-head); font-weight: 600; font-size: .95rem; line-height: 1.4; display: block; }

.type-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.type-row { display: flex; gap: 16px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 14px; text-decoration: none; }
.type-row:hover { background: var(--card-2); }
.type-axes { color: var(--muted); font-size: .8rem; display: block; }
.type-catch { font-size: .9rem; display: block; }

/* ---- キャラクター（画像が無いときは光る円で仮表示） ---- */
.character {
	--light: #888;
	position: relative; flex-shrink: 0; border-radius: 50%; overflow: hidden;
	background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--light) 35%, #111) 0%, #0d0d10 70%);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--light) 50%, transparent), 0 0 32px color-mix(in srgb, var(--light) 35%, transparent);
	display: flex; align-items: center; justify-content: center;
}
/* キャラ画像は縦長（4:5）。丸い小サイズでは顔が切れないよう上寄せで切り抜く */
.character img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.character-sm { width: 76px; height: 76px; }
.character-lg { width: min(320px, 72vw); height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius); }
.character-placeholder { font-family: var(--font-head); color: var(--light); font-size: .8rem; padding: 4px; text-align: center; }
.character-lg .character-placeholder { font-size: 1.4rem; }
.light-iridescent {
	--light: #6fd3b0;
	background: radial-gradient(circle at 50% 40%, rgba(80, 200, 160, .35), rgba(90, 120, 230, .25) 40%, rgba(160, 90, 220, .2) 60%, #0d0d10 80%);
}

/* ---- 質問画面 ---- */
.test-main { max-width: 720px; }
.progress { height: 6px; background: var(--card); border-radius: 999px; overflow: hidden; margin-top: 16px; display: none; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }
.progress-text { color: var(--muted); font-size: .85rem; text-align: right; margin: 6px 0 0; }
.js-step .progress { display: block; }

.question { border: 0; margin: 0 0 16px; padding: 24px 16px; background: var(--card); border-radius: var(--radius); }
.question legend { float: left; width: 100%; padding: 0; margin-bottom: 20px; }
.question legend + * { clear: both; }
.question-no { display: block; color: var(--accent-2); font-family: var(--font-head); font-weight: 800; }
.question-text { font-size: 1.1rem; font-weight: 500; }
.scale { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2vw, 14px); }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale-end { font-size: .75rem; color: var(--muted); width: 4.5em; text-align: center; line-height: 1.3; }
.scale-option {
	display: block; border-radius: 50%; cursor: pointer; border: 2px solid var(--line);
	transition: background .15s, border-color .15s, transform .1s;
}
.scale-option:hover { transform: scale(1.08); }
.scale-5, .scale-1 { width: 44px; height: 44px; }
.scale-4, .scale-2 { width: 36px; height: 36px; }
.scale-3 { width: 28px; height: 28px; }
.scale-5, .scale-4 { border-color: var(--accent-2); }
.scale-2, .scale-1 { border-color: #7FB8D8; }
.scale input:checked + .scale-5, .scale input:checked + .scale-4 { background: var(--accent-2); }
.scale input:checked + .scale-2, .scale input:checked + .scale-1 { background: #7FB8D8; }
.scale input:checked + .scale-3 { background: var(--muted); border-color: var(--muted); }
.scale input:focus-visible + .scale-option { outline: 2px solid var(--text); outline-offset: 3px; }

/* JSが動くときは1問ずつ表示する */
.js-step .question { display: none; }
.js-step .question.is-current { display: block; animation: fade-in .3s; }
.test-actions { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 20px; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- 結果 ---- */
.result-main { max-width: 860px; }
.result-card {
	display: flex; gap: 32px; align-items: flex-start;
	background: var(--card); border-radius: calc(var(--radius) + 6px); padding: 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.result-body { flex: 1; min-width: 0; }
.result-eyebrow { margin: 0; color: var(--muted); letter-spacing: .2em; font-size: .8rem; }
.result-type { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0; }
.result-axes { color: var(--muted); margin: 4px 0 0; }
.catchphrase { font-family: var(--font-head); font-size: 1.15rem; margin: 16px 0 8px; }
.summary { color: #cfcbc4; margin: 0 0 16px; }
.rate { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 12px; }
.rate-label { color: var(--muted); }
.rate-value { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; color: var(--accent-2); line-height: 1; }
.rate-value small { font-size: 1.2rem; }
.score-bars { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.score-bars li { display: grid; grid-template-columns: 4.5em 1fr 2.5em; align-items: center; gap: 10px; font-size: .85rem; }
.score-track { height: 8px; background: #26262c; border-radius: 999px; overflow: hidden; }
.score-fill { display: block; height: 100%; background: var(--axis); border-radius: 999px; box-shadow: 0 0 10px var(--axis); }
.score-value { text-align: right; color: var(--muted); }
.similar { font-size: .85rem; color: var(--muted); margin: 0; }

.share { text-align: center; margin: 28px 0; }
.share-title { color: var(--muted); font-size: .85rem; margin: 0 0 10px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.share-btn {
	display: inline-block; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 700;
	border: 0; cursor: pointer; font-family: inherit; color: #fff;
}
.share-x { background: #000; border: 1px solid #444; }
.share-line { background: #06C755; }
.share-threads { background: #222; border: 1px solid #444; }
.share-copy { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }

/* ---- 広告枠 ---- */
.ad-slot { margin: 32px auto; text-align: center; min-height: 50px; }
.ad-label { display: block; color: var(--muted); font-size: .7rem; letter-spacing: .1em; margin-bottom: 4px; }

.error-main { text-align: center; padding-top: 80px; }

/* ---- 固定ページ（この診断について・プライバシーポリシーなど） ---- */
.page-main { max-width: 760px; }
.page-main.prose h2.section-title { margin-top: 44px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--accent-2); }
.prose h3 { font-size: 1rem; margin: 1.6em 0 .4em; }
.table-wrap { overflow-x: auto; }
.page-table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .9rem; }
.page-table th, .page-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.page-table th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.page-table-dl th { width: 8em; }
.axis-defs dt { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-top: 14px; }
.axis-defs dd { margin: 4px 0 0 20px; color: #cfcbc4; }
.faq h3 { color: var(--text); }
.faq h3::before { content: "Q. "; color: var(--accent-2); font-family: var(--font-head); }
.page-date { color: var(--muted); font-size: .85rem; text-align: right; margin-top: 40px; }
.footer-nav-sub { font-size: .75rem; gap: 14px; flex-wrap: wrap; }

/* ---- 公開側のフォーム（お問い合わせ） ---- */
.public-form { background: var(--card); border-radius: var(--radius); padding: 24px 20px; margin-top: 16px; }
.public-form .form-group { margin-bottom: 18px; }
.public-form label { display: block; font-weight: 500; margin-bottom: 6px; }
.public-form input[type=text], .public-form input[type=email], .public-form select, .public-form textarea {
	width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
	background: var(--bg); color: var(--text); font: inherit;
}
.public-form input:focus, .public-form select:focus, .public-form textarea:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.required { font-size: .7rem; background: var(--accent); color: #fff; border-radius: 4px; padding: 1px 6px; margin-left: 8px; vertical-align: 2px; }
.field-error { color: #ff8a80; font-size: .85rem; margin: 4px 0 0; }
.field-error:empty { display: none; }
.form-note { color: var(--muted); font-size: .85rem; }
.form-note a { color: var(--accent-2); }

@media (max-width: 640px) {
	.result-card { flex-direction: column; align-items: center; padding: 20px; gap: 20px; }
	.result-body { width: 100%; }
	.site-nav { gap: 10px; }
	.scale-end { width: 3.2em; font-size: .7rem; }
	.scale-5, .scale-1 { width: 38px; height: 38px; }
	.scale-4, .scale-2 { width: 31px; height: 31px; }
	.scale-3 { width: 24px; height: 24px; }
}
