/* =========================
   Reset
========================= */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html, body,
header, footer, main, nav, section, article, p,
h1, h2, h3, h4, h5, h6 {
	margin: 0;
	padding: 0;
}

/* =========================
   Base
========================= */
html, body {
	min-height: 100vh;
	background: #f2f3f5;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
	             "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
	color: #222;
}

ul {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

/* =========================
   Layout
========================= */
#layout {
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 16px;
}

#wrapper {
	width: 100%;
	max-width: 720px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.08);
	padding: 20px;

	display: flex;
	flex-direction: column;
	align-items: center;
	
	position:relative;
}

/* =========================
   Header
========================= */

/* =====================
   Header Login Button
===================== */

.top-login {
	position: absolute;
	top:20px;
	right:20px;
	
}

.top-login-btn {
	background-color: rgba(79, 143, 90, 0.15); /* 薄いグリーン */
	color: #2F5F3A;

	border: 1px solid rgba(79, 143, 90, 0.4);
	border-radius: 16px;

	padding: 6px 14px;

	font-size: 12px;
	font-weight: 600;

	cursor: pointer;

	/* no shadow = no sales feeling */
	box-shadow: none;

	transition:
		background-color 0.15s ease,
		border-color 0.15s ease,
		color 0.15s ease;
}

/* hover */
.top-login-btn:hover {
	background-color: rgba(79, 143, 90, 0.25);
	border-color: rgba(79, 143, 90, 0.6);
	color: #1F4A2C;
}

/* active */
.top-login-btn:active {
	background-color: rgba(79, 143, 90, 0.35);
}






header {
	width: 100%;
	text-align: center;
	margin-bottom: 16px;
}

.header_logo img {
	max-width: 300px;
	width: 100%;
	height: auto;
}

.header_logo p {
	margin-top: 4px;
	font-size: 13px;
}


.system-concept{
	padding:10px;
	margin:10px 20px;
	border: 1px solid #4F8F5A;
	border-radius: 20px;
	background-color: rgba(79, 143, 90, 0.08);
}



/* =========================
   Forms
========================= */
.forms {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 20px;
	text-align: center;
}

/* =========================
   Section header
========================= */
.form_titles {
	border-radius: 20px;
	padding: 10px 14px;
	background: #f5f6f8;

	display: flex;
	justify-content: space-between;
	align-items: center;
}

.form_title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.form_titles img,
.analyze-btn img {
	width: 28px;
	height: auto;
}

.form_titles h3 {
	font-size: 15px;
}

.industry_selected,
.target_selected,
.address_selected {
	font-size: 12px;
	color: #777;
}

/* =========================
   Block title
========================= */
.block-title {
	margin-top: 12px;
	font-size: 13px;
	color: #333;
	text-align: left;
	padding-left: 6px;
}

/* =========================
   Caution
========================= */
.caution {
	margin-top: 8px;
	padding-left: 6px;
	font-size: 13px;
	color: #999;
	text-align: left;

	min-height: 1.6em;

	opacity: 1;
	transform: translateX(0);

	transition:
		opacity 0.3s ease,
		transform 0.3s ease;
}

.caution.is-hidden {
	opacity: 0;
	transform: translateX(-16px);
	pointer-events: none;
}

/* =========================
   Cards container
========================= */
.selecting_cards {
	margin-top: 12px;
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

/* =========================
   Card
========================= */
.selecting_card {
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 14px 10px;
	cursor: pointer;
	background: #fff;

	transition: background .2s, border-color .2s, box-shadow .2s;

	flex: 1 1 30%;
	max-width: 33.33%;
	min-width: 160px;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.selecting_card:hover {
	background: #f0f4ff;
	border-color: #5b7fff;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.selecting_card h4 {
	font-size: 14px;
}

.selecting_card h5 {
	font-size: 11px;
	color: #777;
	font-weight: normal;
	margin-top: 4px;
}

/* =========================
   Active
========================= */
.active {
	border-color: #5b7fff;
	background: #eef2ff;
}

/* =========================
   Disabled
========================= */
.disabled {
	opacity: 0.35;
	pointer-events: none;
}

.region-step {
	display: none;
}

.cards-target {
	display: none;
}





/* =========================
   Slide animation
========================= */
.slide-out-left {
	animation: slideOutLeft 0.28s ease forwards;
}

.slide-in-right {
	animation: slideInRight 0.32s ease forwards;
}

@keyframes slideOutLeft {
	from { transform: translateX(0); opacity: 1; }
	to   { transform: translateX(-22px); opacity: 0; }
}

@keyframes slideInRight {
	from { transform: translateX(22px); opacity: 0; }
	to   { transform: translateX(0); opacity: 1; }
}

.pre-slide {
	opacity: 0;
	transform: translateX(22px);
}

/* =========================
   Note
========================= */
.note {
	margin-top: 12px;
	font-size: 12px;
	color: #666;
	line-height: 1.6;
	text-align: left;
}

/* =========================
   Analyze button
========================= */
.analyze-wrapper {
	margin-top: 24px;
	width: 100%;
	display: flex;
	justify-content: center;
}

.analyze-btn {
	width: 100%;
	max-width: 360px;
	padding: 14px 0;

	background: linear-gradient(135deg, #ffd600, #ffb300);
	color: #222;

	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.05em;

	border: none;
	border-radius: 999px;
	cursor: pointer;

	box-shadow: 0 6px 18px rgba(0,0,0,0.15);
	transition: all .25s ease;

	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.analyze-btn:disabled {
	background: #ccc;
	color: #777;
	box-shadow: none;
	cursor: not-allowed;
}

.analyze-btn.loading {
	pointer-events: none;
	background: #ddd;
	color: #666;
}

.analyze-btn.loading .btn-text::after {
	content: "中…";
	margin-left: 4px;
	animation: dots 1.2s steps(3, end) infinite;
}

@keyframes dots {
	0%   { content: "中"; }
	33%  { content: "中."; }
	66%  { content: "中.."; }
	100% { content: "中..."; }
}

/* =========================
   Overlay
========================= */
.overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1000;

	justify-content: center;
	align-items: center;
	padding: 16px;
}

.overlay.open {
	display: flex;
}

/* =========================
   Overlay Content
========================= */
.overlay-content {
	position: relative;
	background: #fff;
	border-radius: 12px;

	width: 100%;
	max-width: 420px;

	max-height: 90vh;
	overflow-y: auto;

	padding: 24px 24px 32px;
	text-align: center;

	box-shadow: 0 12px 32px rgba(0,0,0,0.25);
	animation: overlayFadeIn 0.25s ease;
}

@keyframes overlayFadeIn {
	from {
		transform: translateY(10px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* =========================
   Overlay close button
========================= */
.overlay-close {
	position: absolute;
	top: 12px;
	right: 12px;

	width: 32px;
	height: 32px;

	border: none;
	border-radius: 50%;
	background: #f0f0f0;
	cursor: pointer;
}

.overlay-close::before,
.overlay-close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	background: #666;
}

.overlay-close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.overlay-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

/* =========================
   Analyzing
========================= */
.overlay.analyzing .overlay-content h3::after {
	content: "（分析中…）";
	display: block;
	margin-top: 8px;
	font-size: 13px;
	color: #999;
}

.overlay.analyzing .overlay-content::after {
	content: "";
	display: block;
	margin: 16px auto 0;
	width: 32px;
	height: 32px;
	border: 3px solid #ddd;
	border-top-color: #5b7fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* =========================
   免責事項
========================= */
.credit-area {
	border: 1px solid #ccc;
	border-radius: 10px;
	padding:20px;
	font-size: 12px;
	text-align:left;
}

.credit-area h5{
	margin-top:20px;
	margin-bottom:10px;
	font-size: 14px;
}

.credit-area ul {
	list-style: disc;
	padding-left: 20px;
	margin-left: 0;
}

.credit-area li {
	margin-bottom: 6px;
}




/* =========================
   オーバーレイ
========================= */
.score-rank {
	/* 背景はそのまま使い、文字の“映え”だけを強化 */
	text-shadow: none;
	display:flex;
	align-items:center;
	justify-content: center;
	text-align:center;
	margin:0 auto;
	font-size:100px;
	margin-bottom:30px;

}

.score-rank,
.score-rank * {
	color: #498E57;
	font-weight: 900;

	/* 白の輝き + 金の気配 */
	text-shadow:
		0 2px 0 rgba(0,0,0,0.35),          /* 立体感 */
		0 0 12px rgba(255,255,255,0.25),   /* 白の光 */
		0 0 22px rgba(255,215,120,0.35);   /* 金のきらめき */
}

/* 数字を“王紋”っぽく見せる微調整（任意だが効果大） */
.score-rank {
	font-variant-numeric: lining-nums;
}

.block{
	margin-bottom:50px;
}


.block h4{
	font-size: larger;
	font-weight: 700;
	letter-spacing: 0.06em;

	color: #E09E3E; /* 金系 */

	padding-bottom: 6px;
	margin-bottom: 12px;

	/* 下線を「装飾帯」に昇格 */
	border-bottom: 2px solid #498E57;

	/* 金属感・格式感 */
	text-shadow:
		0 1px 0 rgba(0,0,0,0.35),
		0 0 8px rgba(224,158,62,0.35);
}

.block p, .block ul li{
	font-size: smaller;
}

.s-rank-only-block p{
	text-align:left;
	font-weight: bold;
}

.s-rank-only-block{
	background: linear-gradient(
		135deg,
		#fff7cc 0%,
		#ffef9a 50%,
		#fff7cc 100%
	);
	border: 1px solid #e6d37a;
	border-radius: 12px;
	padding: 16px 20px;
	box-shadow: 0 4px 12px rgba(180, 150, 60, 0.50);
}



.explanation-block {
	text-align:left;
}

.explanation-block {
	margin-top:20px;
}


.explanation-section{
	margin-top:20px;
}


/* =====================
   ログイン誘導ブロック
===================== */

.to-login {
	margin-top: 24px;
	text-align: center;

	border: 1px solid #4F8F5A;
	border-radius: 20px;
	padding: 15px;

	background-color: rgba(79, 143, 90, 0.08);
}

.to-login-sub {
	color: #4F8F5A;
	font-weight: 600;
}

/* CTA Button */
.to-login-btn {
	background-color: #4F8F5A;
	color: #FFFFFF;

	border: none;
	border-radius: 8px;

	padding: 14px 28px;
	min-height: 48px;

	margin: 20px 0;

	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;

	cursor: pointer;

	/* matte + subtle shadow */
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);

	transition:
		box-shadow 0.15s ease,
		transform 0.15s ease;
}

/* hover */
.to-login-btn:hover {
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
	transform: translateY(-1px);
}

/* active */
.to-login-btn:active {
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	transform: translateY(0);
}

/* focus */
.to-login-btn:focus {
	outline: none;
	box-shadow:
		0 0 0 2px rgba(79, 143, 90, 0.35),
		0 4px 10px rgba(0, 0, 0, 0.18);
}







/* =========================
	footer
========================= */
footer{
	margin-top:20px;
}




