@charset "UTF-8";

/* ============================================================
   JA共済 交通安全クイズ（AKB48キャンペーン共通デザイン）
   PC (900px基準) をベースに組み、767px以下をSP上書きする。
   ============================================================ */

:root {
	--color-primary: #007c63;
	--color-accent: #ffe252;
	--color-bg-mint: #edfaf8;
	--color-card-shadow: #9edace;
	--color-wrong: #ffd7d7;
	--font-base: "Noto Sans JP", "Hiragino Kaku Gothic Pro", "メイリオ", sans-serif;
	--font-round: "M PLUS 1", "Noto Sans JP", sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	font-family: var(--font-base);
	margin: 0 auto;
	background: var(--color-bg-mint);
	color: var(--color-primary);
}

img {
	vertical-align: top;
	max-width: 100%;
}

a {
	text-decoration: none;
}

a:hover {
	opacity: 0.8;
}

#wrapper {
	min-height: 100vh;
	position: relative;
	padding-bottom: 60px;
	box-sizing: border-box;
}

/* ---------- Header / Footer ---------- */
.site-header {
	background: #fff;
	text-align: center;
	padding: 24px;
}

.site-header img {
	width: 176px;
	height: auto;
}

.site-footer {
	width: 100%;
	background: var(--color-bg-mint);
	padding: 24px;
	text-align: center;
	position: absolute;
	bottom: 0;
	box-sizing: border-box;
}

.site-footer small {
	display: block;
	font-size: 11px;
	line-height: 1.4em;
	color: var(--color-primary);
}

/* ---------- Quiz card ---------- */
.quiz-main {
	max-width: 900px;
	margin: 0 auto;
	padding: 48px 24px 50px;
}

.quiz-card {
	position: relative;
	background: #fff;
	border-radius: 24px;
	box-shadow: 8px 8px 0 var(--color-card-shadow);
	padding: 50px;
	display: flex;
	align-items: center;
	gap: 40px;
}

.quiz-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

.quiz-card__headline {
	display: block;
	max-width: 320px;
	margin: 0 auto 30px;
}

.quiz-card__number {
	font-family: var(--font-round);
	font-weight: 900;
	font-size: 28px;
	text-align: center;
	margin: 0 0 20px;
}

.quiz-card__question {
	font-family: var(--font-round);
	font-weight: 700;
	font-size: 18px;
	line-height: 2;
	text-align: left;
	margin: 0 0 30px;
}

.quiz-card__answers {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.quiz-answer {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--color-accent);
	border: 3px solid var(--color-accent);
	border-radius: 999px;
	padding: 19px 25px;
	font-family: var(--font-round);
	font-weight: 800;
	font-size: 16px;
	line-height: 1;
	color: var(--color-primary);
	text-align: left;
	cursor: pointer;
}

.quiz-answer__num {
	flex: 0 0 auto;
}

.quiz-card__photo {
	flex: 0 0 auto;
	align-self: flex-end;
	width: 260px;
	margin: 0 0 -50px;
}

.quiz-card__photo img {
	width: 100%;
	height: auto;
}

/* ---------- 正解/不正解モーダル ---------- */
.modal_overlay {
	position: fixed;
	inset: 0;
	background: rgba(13, 13, 13, 0.56);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 100;
}

.modal_overlay[hidden] {
	display: none;
}

.modal_box {
	position: relative;
	background: #fff;
	border-radius: 15px;
	max-width: 420px;
	width: 100%;
	padding: 40px;
	text-align: center;
	max-height: 90vh;
	overflow-y: auto;
}

.modal_number {
	font-family: var(--font-round);
	font-weight: 900;
	font-size: 20px;
	margin: 0 0 10px;
}

.modal_header_image {
	display: block;
	width: 100%;
	height: auto;
}

.correct_answer {
	position: relative;
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	text-align: left;
	gap: 10px;
	background: #fff;
	border: 3px solid var(--color-primary);
	border-radius: 999px;
	padding: 15px 20px;
	font-family: var(--font-round);
	font-weight: 800;
	font-size: 16px;
	margin: 0 0 20px;
}

.correct_answer::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 44px;
	height: 44px;
	background: url("../../img/diagnosis/ellipse-ring.webp") center / contain no-repeat;
	z-index: -1;
}

.correct_answer__num {
	position: relative;
}

.explanation_label {
	font-family: var(--font-round);
	font-weight: 500;
	font-size: 12px;
	text-align: left;
	margin: 0 0 4px;
}

.explanation_text {
	font-family: var(--font-round);
	font-weight: 500;
	font-size: 12px;
	line-height: 1.8;
	text-align: left;
	margin: 0 0 20px;
}

.modal_next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-round);
	font-weight: 800;
	font-size: 16px;
	padding: 14px 40px;
	border-radius: 999px;
}

/* ---------- 表紙 ---------- */
.cover-card {
	position: relative;
	max-width: 560px;
	margin: 0 auto;
	background: #fff;
	border-radius: 24px;
	box-shadow: 8px 8px 0 var(--color-card-shadow);
	overflow: hidden;
}

.cover-card__hero {
	display: block;
	width: 100%;
	height: auto;
}

.cover-card__body {
	padding: 30px 40px 40px;
	text-align: center;
}

.cover-card__lead {
	font-family: var(--font-round);
	font-weight: 900;
	font-size: 30px;
	margin: 0 0 16px;
}

.cover-card__desc {
	font-family: var(--font-round);
	font-weight: 700;
	font-size: 20px;
	line-height: 2;
	margin: 0 0 24px;
}

.cover-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-round);
	font-weight: 900;
	font-size: 20px;
	padding: 16px 40px;
	border-radius: 999px;
	box-shadow: 0 4px 0 var(--color-accent);
}

/* ---------- 結果発表 ---------- */
.result-card {
	position: relative;
	max-width: 560px;
	margin: 0 auto;
	background: #fff;
	border-radius: 24px;
	box-shadow: 8px 8px 0 var(--color-card-shadow);
	overflow: hidden;
}

.result-card__body {
	padding: 70px 60px 0;
	text-align: center;
}

.result-card__headline {
	display: block;
	max-width: 360px;
	margin: 0 auto 30px;
}

.result-card__title {
	font-family: var(--font-round);
	font-weight: 900;
	font-size: 28px;
	margin: 0 0 20px;
}

.result-card__lead {
	font-family: var(--font-round);
	font-weight: 900;
	font-size: 28px;
	margin: 0 0 10px;
}

.result-card__score {
	position: relative;
	z-index: 0;
	font-family: var(--font-round);
	font-weight: 900;
	font-size: 56px;
	letter-spacing: 2px;
	margin: 0 0 30px;
}

.result-card__score::before {
	content: "";
	position: absolute;
	top: 54%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100px;
	height: 100px;
	background: url("../../img/diagnosis/result/ellipse-41.webp") center / contain no-repeat;
	z-index: -1;
}

.result-card__photo {
	display: block;
	width: 100%;
	height: auto;
}

.result-card__desc {
	font-family: var(--font-round);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.9;
	text-align: left;
	margin: 0 0 40px;
}

.result-card__actions {
	background: var(--color-accent);
	padding: 30px 60px 40px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.result-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-family: var(--font-round);
	font-weight: 800;
	font-size: 16px;
	padding: 16px 24px;
	border-radius: 999px;
}

.result-btn--primary {
	background: var(--color-primary);
	color: #fff;
	box-shadow: 0 4px 0 #fff;
}

.result-btn--outline {
	background: #fff;
	color: var(--color-primary);
	border: 2px solid var(--color-primary);
}

.result-btn__icon {
	display: block;
	width: 12px;
	height: 12px;
}

/* ---------- SP (767px以下) ---------- */
@media screen and (max-width: 767px) {
	.site-header {
		padding: 16px;
	}

	.site-header img {
		width: 130px;
	}

	.quiz-main {
		padding: 24px 16px 80px;
	}

	.quiz-card {
		flex-direction: column;
		align-items: stretch;
		padding: 30px 20px 40px;
		gap: 0;
	}

	.quiz-card__headline {
		max-width: 240px;
		margin-bottom: 20px;
	}

	.quiz-card__number {
		font-size: 20px;
		margin-bottom: 10px;
	}

	.quiz-card__question {
		font-size: 14px;
		margin-bottom: 20px;
	}

	.quiz-card__answers {
		gap: 15px;
	}

	.quiz-answer {
		font-size: 14px;
		padding: 15px 20px;
	}

	.quiz-card__photo {
		width: 180px;
		margin: 20px 20px -40px;
	}

	.modal_box {
		padding: 32px 24px;
	}

	.cover-card {
		max-width: 420px;
	}

	.cover-card__body {
		padding: 20px 24px 30px;
	}

	.cover-card__lead {
		font-size: 20px;
		margin-bottom: 10px;
	}

	.cover-card__desc {
		font-weight: 700;
		font-size: 15px;
		margin-bottom: 20px;
	}

	.cover-card__cta {
		font-size: 20px;
		padding: 13px 25px;
	}

	.result-card {
		max-width: 420px;
	}

	.result-card__body {
		padding: 30px 20px 0;
	}

	.result-card__headline {
		max-width: 240px;
		margin-bottom: 20px;
	}

	.result-card__title,
	.result-card__lead {
		font-size: 20px;
	}

	.result-card__title {
		margin-bottom: 10px;
	}

	.result-card__score {
		font-size: 40px;
		margin-bottom: 20px;
	}

	.result-card__score::before {
		width: 80px;
		height: 80px;
	}

	.result-card__desc {
		font-size: 13px;
		margin-bottom: 30px;
	}

	.result-card__actions {
		padding: 20px 20px 25px;
		gap: 15px;
	}

	.result-btn {
		font-size: 15px;
		padding: 13px 20px;
	}
}
