 :root {
 	--brand: #2563eb;
 	--brand-600: #1d4ed8;
 	--text: #1f2937;
 	--muted: #6b7280;
 	--bg: #f8fafc;
 	--card: #ffffff;
 	--line: #e5e7eb;
 	--ring: #c7d2fe;
 	--danger: #b45309;
 	--ok: #059669;
 }

 * {
 	box-sizing: border-box
 }

 html,
 body {
 	height: 100%
 }

 body {
 	font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Meiryo", sans-serif;
 	line-height: 1.7;
 	margin: 0;
 	color: var(--text);
 	background: var(--bg);
 }

 /* ===== Header ===== */
 header.site-header {
 	background: linear-gradient(180deg, #eff6ff 0%, #ffffff 80%);
 	border-bottom: 1px solid var(--line);
 	padding: 16px 20px;
 	top: 0;
 	z-index: 20;
 }

 .header-inner {
 	margin: 0 4%;
 	display: flex;
 	align-items: center;
 	justify-content: space-between;
 	gap: 16px;
 	flex-wrap: wrap;
 }

 .brand {
 	display: flex;
 	align-items: center;
 	gap: 12px;
 }

 .brand-badge {
 	width: 40px;
 	height: 40px;
 	border-radius: 12px;
 	background: var(--brand);
 	display: grid;
 	place-items: center;
 	color: #fff;
 	font-weight: 700;
 	box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
 	user-select: none;
 }

 .title-wrap h1 {
 	font-size: 1.28rem;
 	margin: 0 0 2px;
 	font-weight: 800;
 }

 .title-wrap p {
 	margin: 0;
 	color: var(--muted);
 	font-size: .95rem;
 }

 /* ===== Layout ===== */
 .container {
 	min-height: 100%;
 	margin: 0 auto;
 	padding: clamp(16px, 3vw, 28px);
 }

 .brand {
 	display: flex;
 	align-items: center;
 	gap: 14px;
 }

 h1 {
 	margin: 0;
 	font-size: clamp(1.4rem, 3.2vw, 1.9rem);
 }

 .sub {
 	margin: 6px 0 0;
 	color: #64748b;
 	font-size: .98rem;
 }

 /* ===== Main ===== */
 main {
 	margin: 3% 2%;
 	padding: 0 2%;
 }

 .card {
 	background: var(--card);
 	border: 1px solid var(--line);
 	border-radius: 14px;
 	box-shadow: 0 10px 32px rgba(0, 0, 0, .05);
 	padding: 2% 3% 2% 3%;
 }

 .top-card {
 	background: var(--card);
 	border: 1px solid var(--line);
 	border-radius: 16px;
 	padding: clamp(16px, 3vw, 22px);
 	box-shadow: 0 12px 36px rgba(0, 0, 0, .06);
 }

 .section-title {
 	margin: 2px 0 14px;
 	font-size: 1.05rem;
 	color: var(--muted);
 	display: flex;
 	align-items: center;
 	gap: 8px;
 }

 .section-title::before {
 	content: "";
 	width: 6px;
 	height: 18px;
 	border-radius: 3px;
 	background: var(--brand);
 	display: inline-block;
 }

 /* ===== Question Block ===== */
 .question {
 	margin: 16px 0 18px;
 	padding: 14px;
 	border: 1px solid var(--line);
 	border-radius: 12px;
 	background: #fff;
 	transition: box-shadow .15s ease, border-color .15s ease, transform .06s ease;
 }

 .question:hover {
 	border-color: #cbd5e1;
 	box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
 	transform: translateY(-1px);
 }

 .question h3 {
 	font-size: 1rem;
 	margin: 0 0 10px;
 }

 /* ラベル（左端/右端の説明） */
 .question-label {
 	display: flex;
 	justify-content: space-between;
 	align-items: flex-end;
 	margin-bottom: 8px;
 	color: var(--muted);
 	font-size: .92rem;
 }

 .right-label {
 	text-align: right
 }

 /* ===== Options: 0〜10 ラジオのUI ===== */
 .options {
 	display: flex;
 	//	flex-wrap: wrap;
 	justify-content: space-between;
 	align-items: center;
 	//	gap: 6px;
 	margin-top: 6px;
 	user-select: none;
 }

 /* 数字付きの2段目（0〜10）見た目を軽く整える */
 .option-num {
 	//width: 8.1%;
 	flex: 1;
 	text-align: center;
 	color: var(--muted);
 	font-size: .92rem;
 }

 /* 実際の選択セル */
 .option {
 	//width: 8.1%;
 	//max-width: 100%; 
 	//width: auto;
 	flex: 1;
 	text-align: center;
 	border-radius: 6px;
 	border: 1px solid var(--line);
 	background: #f9fafb;

 }

 .option:hover {
 	border-color: var(--ring);
 	background: #f3f7ff;
 	box-shadow: 0 0 0 3px rgba(199, 210, 254, .5) inset;
 	transform: translateY(-1px);
 }

 .option input[type="radio"] {
 	accent-color: var(--brand);
 	width: 16px;
 	height: 16px;
 }

 /* スマホ改行 */
 .sp-br {
 	display: none;
 }

 @media screen and (max-width: 768px) {
 	.sp-br {
 		display: block;
 	}

 	.option,
 	.option-num {
 		width: 8.8%;
 	}
 }

 @media screen and (max-width: 520px) {

 	.option,
 	.option-num {
 		width: 9.6%;
 	}
 }

 /* ===== Actions / Messages ===== */
 .actions {
 	gap: 12px;
 	align-items: center;
 	flex-wrap: wrap;
 	margin: 8px 0 4px;
 }

 button {
 	cursor: pointer;
 	padding: 10px 16px;
 	border-radius: 8px;
 	border: 1px solid var(--brand);
 	background: var(--brand);
 	color: #fff;
 	font-weight: 700;
 	letter-spacing: .02em;
 	transition: transform .02s ease, background .15s ease, box-shadow .15s ease;
 }

 button:hover {
 	background: var(--brand-600);
 }

 button:active {
 	transform: translateY(1px);
 }

 .btn-ghost {
 	background: #fff;
 	color: var(--brand);
 }

 .msg {
 	min-height: 1.6em;
 	color: var(--danger);
 	font-weight: 700;
 	margin-top: 4px;
 }

 /* ===== Result area (Chart + Summary) ===== */
 .resultBox {
 	display: flex;
 	flex-wrap: wrap;
 	justify-content: space-between;
 	gap: 16px;
 	margin-top: 12px;
 }

 .chartWrap {
 	border: 1px solid var(--line);
 	background: #fff;
 	padding: 14px;
 	border-radius: 12px;
 	width: 50%;
 	min-height: 380px;
 	display: flex;
 	align-items: center;
 	justify-content: center;
 }

 @media screen and (max-width: 768px) {
 	.chartWrap {
 		width: 100%;
 	}
 }

 #resultChart {
 	width: 320px;
 	height: 320px;
 }

 /* 見やすさ重視でやや大きめ */

 .summary {

 	border: 1px solid var(--line);
 	background: #fff;
 	padding: 2%;
 	border-radius: 12px;
 	width: 48%%;
 }

 @media screen and (min-width: 768px) {
 	.summary {
 		flex: 1;
 	}
 }

 @media screen and (max-width: 768px) {
 	.summary {
 		width: 100%;
 	}
 }

 table {
 	width: 100%;
 	border-collapse: collapse;
 }

 table th,
 table td {
 	;
 	padding: 8px;
 	border-bottom: 1px solid #eee;
 }

 table tfoot td {
 	font-weight: 800;
 }

 #PossibleDifficulty {
 	margin: 10px 0 0;
 	color: var(--danger);
 }

 #shareXBtn.enabled {
 	opacity: 1;
 	cursor: pointer;
 	border-color: #111827;
 	/* わずかに強調 */
 }

 .hidden {
 	display: none;
 }

 /* ===== Footer ===== */
 footer.site-footer {
 	width: 100%;
 	bottom: 0;
 	margin-top: 32px;
 	border-top: 1px solid var(--line);
 	background: #ffffff;
 }

 .footer-inner {
 	margin: 0 4%;
 	padding: 14px 16px;
 	display: flex;
 	align-items: center;
 	justify-content: space-between;
 	gap: 12px;
 	flex-wrap: wrap;
 	color: var(--muted);
 	font-size: .92rem;
 }

 .to-top {
 	padding: 8px 12px;
 	border-radius: 999px;
 	background: #f1f5f9;
 	color: var(--text);
 	text-decoration: none;
 	border: 1px solid var(--line);
 }

 .to-top:hover {
 	background: #e2e8f0;
 }
 
 a[target="_blank"]::after {
 	content: "";
 	display: inline-block;
 	width: 0.9em;
 	height: 0.9em;
 	margin-left: 0.3em;

 	background-color: currentColor;
 	mask-image: url("../img/external-link.svg");
 	mask-repeat: no-repeat;
 	mask-size: contain;
 	mask-position: center;

 	vertical-align: -0.05em;
}
``