/* Theme tokens */
:root {
	--color-base: #1a3d65;
	--color-green: #b8e300;
	--color-orange: #f07b06;
	--color-orange-hover: #d96805;
	--color-yellow: #f9d50c;
	--color-surface: #eef3f9;
	--color-surface-alt: #fef6dd;
	--color-white: #ffffff;
	--color-white-85: rgba(255, 255, 255, 0.85);
	--color-white-80: rgba(255, 255, 255, 0.8);
	--color-white-70: rgba(255, 255, 255, 0.7);
	--bs-primary: var(--color-orange);
	--bs-secondary: var(--color-green);
}

/* Base styles */
body {
	color: var(--color-base);
	background-color: var(--color-surface);
	font-family: 'Noto Sans JP', 'Hiragino Sans', 'Helvetica Neue', Arial, sans-serif;
	line-height: 1.7;
	letter-spacing: 0.01em;
	min-height: 100vh;
	/* 320pxはiPhone SE第1世代など最小クラスの幅。これより広い端末では従来通りフル幅を使う。 */
	min-width: 320px;
}

a { color: var(--color-orange); }
a:hover { color: var(--color-orange-hover); }
strong { color: var(--color-orange); }
::placeholder { color: rgba(26, 61, 101, 0.4) !important; }
.text-accent { color: var(--color-base) !important; }
.bg-sand,
.bg-accent {
	background-color: var(--color-surface) !important;
}
.bg-navy,
.bg-base {
	background-color: var(--color-base) !important;
}

/* Utilities */
.text-right { text-align: right; }
.w-150 { max-width: 150px; }
.w-720 { max-width: 720px; margin: 0 auto;}
.text-red { color: var(--color-orange) !important; }
.text-base { color: var(--color-base); }

/* Layout spacing */
main > section { padding: 4.5rem 0; }

/* Navigation bar */
.navbar {
	background-color: transparent !important;
	backdrop-filter: none;
	position: absolute;
	inset: 0 auto auto 0;
	width: 100%;
	padding-top: 1.75rem;
	padding-bottom: 1.75rem;
	border-bottom: none;
	z-index: 10;
	/* bodyと同じ下限幅に合わせて横スクロールを防ぐ */
	min-width: 320px;
}
.navbar-brand,
.navbar-nav .nav-link {
	color: var(--color-base);
	font-weight: 600;
}
.navbar-brand:hover {
	color: var(--color-orange);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
	color: var(--color-orange);
}
.logo-icon {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

/* Buttons */
.btn-primary {
	background-color: var(--color-orange);
	border-color: var(--color-orange);
	color: var(--color-white);
	box-shadow: 0 12px 22px rgba(240, 123, 6, 0.25);
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
.btn-primary.active,
.btn-primary:focus-visible {
	background-color: var(--color-orange-hover) !important;
	border-color: var(--color-orange-hover) !important;
	color: var(--color-white);
	box-shadow: 0 14px 24px rgba(214, 104, 5, 0.3);
}
.btn-primary:disabled,
.btn-primary.disabled {
	background-color: rgba(26, 61, 101, 0.3);
	border-color: rgba(26, 61, 101, 0.3);
	color: rgba(255, 255, 255, 0.8);
	box-shadow: none;
}
.btn-outline-secondary {
	color: var(--color-base);
	border-color: var(--color-base);
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
	background-color: var(--color-base);
	border-color: var(--color-base);
	color: var(--color-white);
}
.btn-outline-primary {
	color: var(--color-green);
	border-color: var(--color-green);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
	background-color: var(--color-green);
	border-color: var(--color-green);
	color: var(--color-base);
}
.btn-outline-light {
	color: var(--color-white);
	border-color: rgba(255, 255, 255, 0.65);
}
.btn-outline-light:hover,
.btn-outline-light:focus {
	background-color: rgba(255, 255, 255, 0.12);
	border-color: var(--color-white);
	color: var(--color-white);
}

/* Headings and card styling */
.card-title,
h1,
h2,
h3 {
	color: var(--color-base);
}
h1 {
	font-size: 2.75rem;
	line-height: 1.2;
}
.card-header {
	color: var(--color-base);
	background-color: var(--color-surface-alt);
	border-bottom: 0;
}
.pricing-card-title { color: var(--color-orange); }

/* Footer base */
footer { background-color: var(--color-surface); }
footer .nav-link { color: var(--color-base); }
footer .nav-link:hover,
footer .nav-link:focus {
	color: var(--color-orange);
}

/* Footer: security badge */
.footer-security {
	position: relative;
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 0.9rem;
	padding: 1.1rem 1.25rem;
	margin: 0;
	border-radius: 0.4rem;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
	border: 1px solid rgba(255, 255, 255, 0.18);
	/* box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); */
}
.footer-security-icon {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	align-self: flex-start;
	border-radius: 4px;
	color: #6b7280;
	background: rgba(238, 242, 246, 0.8);
	border: 1px solid rgba(226, 232, 240, 0.6);
}
.footer-security-icon i { font-size: 1.1rem; }
.footer-security-copy {
	position: relative;
	z-index: 1;
}
.footer-security-title {
	margin: 0 0 0.65rem;
	color: var(--color-white-80);
	font-size: 1rem;
	letter-spacing: 0.04em;
	font-weight: 700;
	line-height: 1.2rem;
}
.footer-security-text {
	margin: 0;
	color: var(--color-white-80);
	font-size: 0.9rem;
	line-height: 1.7;
}

/* Footer: skill list layout */
.footer-skill-links {
	column-count: 2;
	column-gap: 1.25rem;
}
@media (min-width: 576px) {
	.footer-skill-links {
		column-count: 3;
	}
}
@media (min-width: 768px) {
	.footer-skill-links {
		column-count: 4;
	}
}
@media (min-width: 1200px) {
	.footer-skill-links {
		column-count: 5;
	}
}

/* Footer: titles and links */
.footer-skill-group {
	break-inside: avoid;
	margin: 0 0 2rem;
}
.footer-skill-level2 {
	margin: 0;
	padding: 0;
	list-style: none;
}
.footer-skill-level2-label,
.footer-skill-level2-link {
	display: inline-block;
	margin-bottom: 0.35rem;
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	font-weight: 600;
}
.footer-skill-level2-item { margin-bottom: 0.75rem; }
.footer-skill-level2-label { color: var(--color-white); }
.footer-skill-level2-link {
	color: var(--color-orange);
	text-decoration: none;
}
.footer-skill-level2-link:hover,
.footer-skill-level2-link:focus {
	color: var(--color-orange-hover);
	text-decoration: underline;
}
.footer-skill-sublist {
	margin: 0;
	padding-left: 0.75rem;
	list-style: none;
}
.footer-skill-sublist li { margin-bottom: 0.35rem; }
.footer-section-title {
	font-size: 1.2rem;
	color: var(--color-white);
}
.footer-program-title {
	font-size: 1.0625rem;
	letter-spacing: 0.1em;
	color: var(--color-white);
}
.footer-program-title + .footer-skill-links { margin-top: 0.75rem; }
.footer-industry-title {
	margin-bottom: 0.35rem;
	color: var(--color-white);
	font-size: 0.95rem;
	letter-spacing: 0.05em;
	display: inline-flex;
	align-items: center;
}
.footer-skill-group ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.footer-skill-group li { margin: 0 0 0.3rem; }
.footer-skill-group li:last-child { margin-bottom: 0; }
.footer-skill-link {
	display: inline-flex;
	align-items: center;
	color: var(--color-white-85);
	text-decoration: none;
	font-size: 0.75rem;
	padding-left: 0.5rem;
	transition: 0.2s;
}
.footer-skill-link:hover,
.footer-skill-link:focus {
	color: var(--color-white);
	text-decoration: none;
}
.footer-skill-link:hover { text-decoration: underline; }
footer.bg-base {
	background-color: var(--color-base) !important;
	background-image: linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.08) 25%,
		transparent 25%,
		transparent 50%,
		rgba(255, 255, 255, 0.08) 50%,
		rgba(255, 255, 255, 0.08) 75%,
		transparent 75%,
		transparent
	);
	background-size: 4px 4px;
}
footer.bg-base .text-muted { color: var(--color-white-70) !important; }

.grecaptcha-badge {
  z-index: 9999;
}

/* Pagination (ADO style) */
.ado-pagination {
	gap: 0.4rem;
	align-items: center;
}

.ado-pagination .page-item {
	margin: 0;
	display: flex;
	align-items: center;
}

.ado-pagination .page-link {
	min-width: 44px;
	min-height: 44px;
	padding: 0.55rem 0.9rem;
	border: 1px solid rgba(26, 61, 101, 0.12);
	border-radius: 12px;
	background: #fff;
	color: var(--color-base);
	box-shadow: 0 10px 22px rgba(26, 61, 101, 0.08);
	font-weight: 700;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ado-pagination .page-item:first-child .page-link,
.ado-pagination .page-item:last-child .page-link {
	border-radius: 12px;
}

.ado-pagination .page-link:hover,
.ado-pagination .page-link:focus-visible {
	background: var(--color-orange);
	border-color: var(--color-orange);
	color: #fff;
	box-shadow: 0 14px 28px rgba(240, 123, 6, 0.22);
	text-decoration: none;
	transform: translateY(-1px);
	outline: none;
}

.ado-pagination .page-item.active .page-link {
	background: linear-gradient(145deg, var(--color-orange), var(--color-orange-hover));
	border-color: transparent;
	color: #fff;
	box-shadow: 0 14px 30px rgba(240, 123, 6, 0.28);
}

.ado-pagination .page-item.disabled .page-link {
	background: rgba(255, 255, 255, 0.7);
	color: rgba(26, 61, 101, 0.35);
	border-color: rgba(26, 61, 101, 0.08);
	box-shadow: none;
	transform: none;
}

.ado-pagination .page-link i {
	font-size: 0.95rem;
	line-height: 1;
}

@media (max-width: 576px) {
	.ado-pagination {
		gap: 0.25rem;
		flex-wrap: wrap;
	}

	.ado-pagination .page-link {
		min-width: 38px;
		min-height: 38px;
		padding: 0.4rem 0.6rem;
		border-radius: 10px;
	}
}


/* Estimate/consult shared styles */
.hero-section {
	background: image-set(
		url('/images/assets/hero-bg-wave.avif') type('image/avif'),
		url('/images/assets/hero-bg-wave.webp') type('image/webp'),
		url('/images/assets/hero-bg-wave.png') type('image/png')
	) center/cover no-repeat;
	color: var(--color-base);
	padding: 7rem 0 5.5rem;
	position: relative;
	overflow: hidden;
}
.hero-section--fill {
	flex: 1 0 auto;
	min-height: 0;
	box-sizing: border-box;
}
.hero-section::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(249, 213, 12, 0.18) 0%, transparent 65%);
	pointer-events: none;
}
.hero-section .container { position: relative; z-index: 1; }
.hero-section h1 { font-size: 3rem; }
.hero-section .lead { color: rgba(26, 61, 101, 0.75); max-width: 34rem; }

@media (max-width: 575px) {
	.hero-section h1 { font-size: 2.2rem; }
	.hero-section .lead { font-size: 1.05rem; }
}

.hero-form-card {
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(26, 61, 101, 0.12);
	border-radius: 1.5rem;
	padding: 2.4rem;
	padding-top: 28px;
	box-shadow: 0 26px 45px rgba(26, 61, 101, 0.12);
	backdrop-filter: blur(10px);
}
@media (max-width: 575px) {
	.hero-form-card {
		padding: 24px;
		padding-top: 28px;
	}
}
.hero-form-card .badge {
	background-color: rgba(26, 61, 101, 0.1);
	color: var(--color-base);
}
.hero-form-card .form-label {
	font-weight: 600;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.hero-form-card .form-label .badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: auto;
	margin: 0;
}
.hero-form-card .form-control,
.hero-form-card .form-select {
	border-radius: 0.95rem;
	padding: 0.65rem 1rem;
	border-color: rgba(26, 61, 101, 0.25);
}
.hero-form-card .form-control:focus,
.hero-form-card .form-select:focus {
	border-color: var(--color-orange);
	box-shadow: 0 0 0 0.2rem rgba(240, 123, 6, 0.18);
}

.consult-form .form-label { margin-bottom: 0.35rem; }
.consult-form .form-control,
.consult-form .form-select { min-height: 48px; }

.zip-loading-spinner {
	display: none;
	width: 0.9rem;
	height: 0.9rem;
	border-radius: 50%;
	border: 2px solid rgba(26, 61, 101, 0.25);
	border-top-color: var(--color-orange);
	animation: zip-loading-spin 0.8s linear infinite;
}
.zip-loading-spinner.is-visible { display: inline-flex; }
@keyframes zip-loading-spin { to { transform: rotate(360deg); } }

.wizard-summary {
	margin-top: 2rem;
	padding: 1.5rem;
	border: 1px solid rgba(26, 61, 101, 0.12);
	border-radius: 1.25rem;
	background: rgba(26, 61, 101, 0.04);
}
.wizard-summary-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: #1a3d65;
}
.wizard-summary-list { display: grid; gap: 0.85rem; }
.wizard-summary-item { display: grid; gap: 0.35rem; }
.wizard-summary-item dt {
	font-weight: 600;
	color: rgba(26, 61, 101, 0.75);
}
.wizard-summary-item dd {
	margin: 0;
	color: #1a3d65;
	white-space: pre-wrap;
	margin-left: 0.75em;
}

.wizard-loading-overlay {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.wizard-loading-overlay.is-visible {
	opacity: 1;
	pointer-events: all;
}
.wizard-loading-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.9rem;
	color: #1a3d65;
	text-align: center;
}
.wizard-loading-spinner {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: 6px solid rgba(26, 61, 101, 0.16);
	border-top-color: var(--color-orange);
	animation: wizard-loading-spin 0.9s linear infinite;
}
.wizard-loading-text { font-weight: 600; margin: 0; }
@keyframes wizard-loading-spin { to { transform: rotate(360deg); } }

/* Wizard / consent (ported from estimate styles) */
.wizard-option {
	position: relative;
	display: block;
	border: 1px solid rgba(26, 61, 101, 0.16);
	border-radius: 1rem;
	padding: 1rem 1.25rem;
	background: #ffffff;
	box-shadow: 0 14px 30px rgba(26, 61, 101, 0.08);
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.wizard-option:hover {
	border-color: rgba(240, 123, 6, 0.6);
	box-shadow: 0 16px 32px rgba(26, 61, 101, 0.12);
	transform: translateY(-2px);
}
.wizard-option input {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: auto;
	z-index: 1;
	cursor: pointer;
}
.wizard-option a {
	position: relative;
	z-index: 2;
}
.wizard-option span {
	display: block;
	font-weight: 600;
	color: #1a3d65;
}
.wizard-option input:checked ~ span { color: var(--color-orange); }
.wizard-option input:focus-visible ~ span {
	outline: 3px solid rgba(240, 123, 6, 0.35);
	outline-offset: 4px;
	border-radius: 0.9rem;
}
.wizard-field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 1rem;
}
.wizard-field-label {
	font-weight: 600;
	color: #1a3d65;
	margin: 0;
}
.wizard-note {
	margin-top: 1rem;
	margin-bottom: 0;
	color: rgba(26, 61, 101, 0.65);
	font-size: 0.9rem;
}
.consent-text {
	display: inline-flex;
	align-items: center;
	line-height: 1.6;
}
.consent-check-icon,
.consent-uncheck-icon {
	margin-right: 8px;
	font-size: 1rem;
}

.consent-check-icon {
	display: none;
	color: var(--color-orange);
}

.consent-uncheck-icon {
	display: inline-block;
	color: #999;
}

.wizard-option input[type="checkbox"]:checked + span .consent-check-icon {
	display: inline-block;
}

.wizard-option input[type="checkbox"]:checked + span .consent-uncheck-icon {
	display: none;
}

/* System toast (session expired) */
#liveToastContainer {
	position: fixed;
	top: 0;
	right: 0;
	padding-top: 2.5rem;
	margin-right: 1rem;
	z-index: 2100;
	display: flex;
	justify-content: flex-end;
	pointer-events: none;
}

#liveToastContainer .toast {
	pointer-events: auto;
}

#liveToast {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 320px;
	background: linear-gradient(135deg, #fffaf1 0%, #fff3e1 100%);
	color: #5c3200;
	border: 1px solid rgba(240, 123, 6, 0.45);
	border-radius: 0.75rem;
	box-shadow: 0 12px 28px rgba(26, 61, 101, 0.18);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

#liveToast.show,
#liveToast.showing {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	animation: toast-slide 0.2s ease-out;
}

#liveToast > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.85rem 0.95rem;
	border-bottom: 1px solid #d1d5db;
	gap: 0.75rem;
}

#liveToast p {
	margin: 0;
	font-weight: 600;
	line-height: 1.5;
	color: #5c3200;
}

#liveToast button {
	margin-left: auto;
	color: #6b7280;
	border: none;
	border-radius: 999px;
	padding: 0.4rem;
	background: transparent;
	transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

#liveToast button:hover {
	color: #111827;
	background: rgba(0, 0, 0, 0.04);
}

#liveToast button:active {
	transform: scale(0.96);
}

#liveToast svg {
	width: 12px;
	height: 12px;
}

@media (max-width: 640px) {
	#liveToastContainer {
		width: 100%;
		margin-right: 0;
		padding-inline: 0.75rem;
	}
	#liveToast {
		max-width: none;
	}
}

@keyframes toast-slide {
	from {
		transform: translateY(-10px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}
.back-top-level {
	color: var(--color-base);
	border-color: var(--color-base);
}
.back-top-level:hover,
.back-top-level:focus-visible {
	background-color: var(--color-base);
	color: #fff;
	border-color: var(--color-base);
}
