
/* ===== Reset & Base ===== */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
		"Yu Gothic", "Meiryo", sans-serif;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	background: #ffffff; /* 背景を白に */
	color: #0f172a;
}

/* ===== Hero Section ===== */
.hero {
	min-height: 100vh;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
}

.hero-content {
	max-width: 800px;
	width: 100%;
	text-align: center;
}

/* badge removed per design change */

/* ===== Hero Title ===== */
.hero-title {
	font-size: 42px;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.4;
	margin-bottom: 20px;
	letter-spacing: 0.02em;
}

.hero-title .highlight {
	-webkit-text-fill-color: #396de4;
	color: #396de4;
	font-weight: 900;
}

/* ===== Hero Description ===== */
.hero-description {
	font-size: 18px;
	color: rgba(15, 23, 42, 0.9);
	line-height: 1.8;
	margin-bottom: 48px;
}

/* powered-pill removed per design change */

/* ===== Search Card ===== */
.search-card {
	background: #396de4;
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(14, 72, 162, 0.25);
}

/* ヘッダー（ロゴ） */
.site-header {
	position: fixed;
	left: 20px;
	top: 16px;
	z-index: 1000;
}
.site-logo {
	display: block;
	width: 200px;
	height: 30px;
	object-fit: contain;
}

.card-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 28px 32px;
	text-align: left;
}

.card-icon {
	width: 52px;
	height: 52px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	flex-shrink: 0;
}

.card-header-text h2 {
	font-size: 20px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 4px;
}

.card-header-text p {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.75);
}

/* ===== Card Body (Form) ===== */
.card-body {
	background: #fff;
	padding: 28px 32px 36px 32px;
	text-align: left;
}

.input-field {
	border-radius: 12px;
}

.input-group { align-items: center }

.btn-generate { min-width: 140px }

.input-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 10px;
}

.input-group {
	display: flex;
	gap: 12px;
}

/* 入力ラッパーをカード幅の約80%に制限 */
.input-wrapper {
	display: flex;
	align-items: center;
	flex: 0 0 80%; /* 固定基準で80%幅 */
	max-width: 75%;
}

/* ボタンを入力欄の内側に重ねるための調整 */
.input-wrapper { position: relative; }
.input-wrapper .input-field { padding-right: 48px; }
.input-wrapper .btn-clear {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: none;
	background: rgba(0,0,0,0.06);
	color: #374151;
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.input-wrapper .btn-clear:focus { outline: 2px solid rgba(59,130,246,0.25); }

.input-field {
	flex: 1;
	padding: 14px 18px;
	font-size: 16px;
	border: 2px solid #1c73e8;
	border-radius: 12px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
	color: #1f2937;
}

.input-field::placeholder {
	color: #9ca3af;
}

.input-field:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn-generate {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px;
	background: #396de4;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.15s, box-shadow 0.15s;
	font-family: inherit;
}

.btn-generate:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-generate:active {
	transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
	.hero {
		padding: 40px 16px;
	}

	.hero-title {
		font-size: 28px;
	}

	.hero-description {
		font-size: 14px;
	}

	.hero-description br {
		display: none;
	}

	.input-group {
		flex-direction: column;
	}

	/* モバイルでは入力をフル幅に戻す */
	.input-wrapper {
		flex: 1 1 100%;
		max-width: 100%;
		width: 100%;
	}

	.card-header {
		padding: 20px 24px;
	}

	.card-body {
		padding: 24px;
	}

	.btn-generate {
		justify-content: center;
	}
}

/* ===== Password Overlay ===== */
.password-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.55);
	z-index: 9998;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease-in-out, visibility 180ms ease-in-out;
}
.password-overlay.active {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}
.password-card {
	background: white;
	border-radius: 20px;
	overflow: hidden;
	width: 90%;
	max-width: 520px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.password-card .card-header {
	background: #396de4;
	position: relative;
}
.password-close-btn {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}
.password-close-btn:hover {
	background: rgba(255, 255, 255, 0.35);
}
.password-card-body {
	background: #fff;
	padding: 28px 32px 36px 32px;
}
.password-input-group {
	align-items: stretch;
}
.password-input-group .btn-generate {
	min-width: 60px;
	padding-left: 16px;
	padding-right: 16px;
}
.password-input-wrapper {
	flex: 1;
	max-width: none;
}

/* shake アニメーション（バリデーション失敗時） */
@keyframes shake {
	0%, 100% { transform: translateX(0); }
	20%       { transform: translateX(-6px); }
	40%       { transform: translateX(6px); }
	60%       { transform: translateX(-4px); }
	80%       { transform: translateX(4px); }
}
.shake {
	animation: shake 0.4s ease-in-out;
}

/* Loading overlay */
.loading-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,0.85);
	z-index: 9999;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 160ms ease-in-out, visibility 160ms ease-in-out;
}
.loading-overlay.active {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}
.loading-content {
	text-align: center;
}
.loading-text {
	margin-top: 14px;
	font-size: 18px;
	color: #0f172a;
	font-weight: 700;
}

/* Loader from user */
.loader {
	width: 60px;
	aspect-ratio: 2;
	--_g: no-repeat radial-gradient(circle closest-side,#000 90%,#0000);
	background:
		var(--_g) 0%   50%,
		var(--_g) 50%  50%,
		var(--_g) 100% 50%;
	background-size: calc(100%/3) 50%;
	animation: l3 1s infinite linear;
}
@keyframes l3 {
		20%{background-position:0%   0%, 50%  50%,100%  50%}
		40%{background-position:0% 100%, 50%   0%,100%  50%}
		60%{background-position:0%  50%, 50% 100%,100%   0%}
		80%{background-position:0%  50%, 50%  50%,100% 100%}
}

/* ===== Error Banner ===== */
.error-message {
	display: flex;
	align-items: center;
	gap: 12px;
	background: linear-gradient(90deg, #fff1f2 0%, #fee2e2 100%);
 	border: 1px solid #fecaca;
 	color: #ff6262;
 	padding: 10px 16px;
 	border-radius: 10px;
 	font-weight: bold;
 	box-shadow: 0 6px 18px rgba(254, 202, 202, 0.28);
 	margin-bottom: 14px;
}
.error-message::before {
 	content: "⚠️";
 	font-size: 18px;
	margin-right: 5px;
}

/* マイナーなアニメーションで注意を促す */
.error-message.pulse {
 	animation: pulseErr 1.8s ease-in-out 1;
}
@keyframes pulseErr {
 	0% { transform: translateY(0); }
 	50% { transform: translateY(-4px); }
 	100% { transform: translateY(0); }
}
