* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body.page-index {
	min-height: 100vh;
	background: #000;
	color: rgba(255, 255, 255, 0.86);
	font-family: 'Inter', sans-serif;
	--grad-peach: #fbe0d5;
	--grad-pink: #f7e2f1;
	--grad-blue: #c6d6f8;
	--grad-lime: #f2f3e1;
}

body.page-selection {
	min-height: 100vh;
	background: #000;
	color: rgba(255, 255, 255, 0.86);
	font-family: 'Inter', sans-serif;
}

.app-shell {
	position: relative;
	min-height: 100vh;
	width: 100%;
	overflow-x: hidden;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.github-link {
	position: absolute;
	top: 2.1rem;
	right: 2.65rem;
	display: inline-flex;
	align-items: center;
	gap: 0.72rem;
	color: rgba(255, 255, 255, 0.88);
	text-decoration: none;
	font-family: 'JetBrains Mono', monospace;
	font-size: 1rem;
	line-height: 1;
	letter-spacing: -0.01em;
}

.github-link img {
	width: 1.68rem;
	height: 1.68rem;
	display: block;
}

.github-link:hover,
.github-link:focus-visible {
	color: #fff;
}

.back-icon-btn {
	position: fixed;
	top: 14px;
	left: 14px;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.88);
	line-height: 1;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: none;
	cursor: pointer;
	transition:
		background-color 220ms ease,
		border-color 220ms ease,
		transform 220ms ease;
	z-index: 9;
}

.back-icon-btn:hover {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.24);
	transform: translateY(-1px);
}

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

.back-icon-btn:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.4);
	outline-offset: 2px;
}

.hero-search {
	position: absolute;
	top: 38.6%;
	left: 50%;
	width: min(74.6vw, 67.2rem);
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.quote-mark {
	width: clamp(7.6rem, 9.9vw, 10.45rem);
	height: auto;
	margin-bottom: 2.02rem;
	display: block;
}

#search {
	width: 100%;
	height: 2.86rem;
	border-radius: 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: linear-gradient(
		115deg,
		rgba(251, 224, 213, 0.2) 0%,
		rgba(247, 226, 241, 0.16) 34%,
		rgba(198, 214, 248, 0.18) 68%,
		rgba(242, 243, 225, 0.14) 100%
	);
	background-size: 220% 220%;
	color: rgba(255, 255, 255, 0.88);
	font-family: 'Inter', sans-serif;
	font-size: 1rem;
	padding: 0 1.15rem;
	outline: none;
	backdrop-filter: blur(2px);
	animation: search-gradient-drift 16s ease-in-out infinite;
}

.hero-search:has(.results:not(:empty)) #search,
.hero-search:has(.status:not(:empty)) #search {
	border-radius: 0.85rem 0.85rem 0 0;
	border-bottom-color: rgba(255, 255, 255, 0.16);
}

#search::placeholder {
	color: rgba(255, 255, 255, 0.43);
}

#search:focus-visible {
	border-color: rgba(255, 255, 255, 0.36);
}

.status {
	margin: 0.62rem 0 0;
	width: 100%;
	min-height: 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.875rem;
	text-align: center;
}

.status.loading {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.42rem;
}

.status:not(:empty) {
	margin-top: 0;
	padding: 0.85rem 0.9rem;
	min-height: 8.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-top: 0;
	border-radius: 0 0 0.85rem 0.85rem;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.1) 0%,
		rgba(255, 255, 255, 0.07) 100%
	);
	backdrop-filter: blur(2px);
}

.status.loading::before {
	content: '';
	width: 0.72rem;
	height: 0.72rem;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-top-color: rgba(255, 255, 255, 0.75);
	animation: spin 0.8s linear infinite;
}

.status:empty {
	min-height: 0;
	margin-top: 0;
	padding: 0;
	border: 0;
}

.results {
	width: 100%;
	margin-top: 0;
	padding: 0.42rem 0.72rem 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-top: 0;
	border-radius: 0 0 0.85rem 0.85rem;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.1) 0%,
		rgba(255, 255, 255, 0.07) 100%
	);
	backdrop-filter: blur(2px);
}

.results:empty {
	display: none;
}

.result-item {
	width: 100%;
	border: 0;
	border-radius: 0.45rem;
	background: transparent;
	color: rgba(255, 255, 255, 0.92);
	font: inherit;
	font-size: 0.95rem;
	text-align: left;
	padding: 0.42rem 0.5rem;
	cursor: pointer;
}

.result-item:hover,
.result-item:focus-visible {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.brand-lockup {
	position: absolute;
	left: 50%;
	bottom: 2.92rem;
	transform: translateX(-50%);
}

.type-logo {
	margin: 12px 0 0 0;
	font-family: 'Inter';
	font-style: normal;
	font-weight: 700;
	font-size: 22px;
	line-height: 26px;
	position: relative;
	background:
		radial-gradient(
			106.26% 106.26% at 50% -6.26%,
			rgba(251, 224, 213, 0.5) 0%,
			rgba(247, 226, 241, 0.5) 30.29%,
			rgba(198, 214, 248, 0.5) 60.1%,
			rgba(242, 243, 225, 0.5) 100%
		),
		#ffffff;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	text-shadow: 0px 0px 1.28976px rgba(255, 255, 255, 0.48);
}

.version {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 300;
	font-size: 12px;
	line-height: 16px;
	color: #888888;
	position: absolute;
	top: 0;
	right: -24px;
}

.app-shell-selection {
	padding: 6.5rem 1.5rem 6.4rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.selection-shell {
	width: min(74.6vw, 67.2rem);
	max-height: calc(100vh - 14rem);
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	padding: 1.2rem;
	border-radius: 1.1rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.08) 0%,
		rgba(255, 255, 255, 0.03) 100%
	);
	backdrop-filter: blur(2px);
}

.selection-header {
	display: grid;
	gap: 0.35rem;
}

.selection-title {
	margin: 0;
	font-size: 1.16rem;
	font-weight: 600;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.96);
}

.muted {
	margin: 0;
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.7);
}

.page-selection .status {
	margin: 0;
	min-height: 1.2rem;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.55);
}

.lyric-form {
	display: grid;
	gap: 0.5rem;
	overflow: auto;
	padding-right: 0.22rem;
	flex: 1;
	min-height: 8rem;
}

.lyric-form::-webkit-scrollbar {
	width: 8px;
}

.lyric-form::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.22);
	border-radius: 999px;
}

.lyric-option {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	padding: 0.72rem 0.76rem;
	border-radius: 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.05);
	cursor: pointer;
	transition:
		border-color 0.15s ease,
		background-color 0.15s ease,
		opacity 0.15s ease;
}

.lyric-option:hover {
	border-color: rgba(255, 255, 255, 0.24);
	background: rgba(255, 255, 255, 0.08);
}

.lyric-line {
	margin-top: 0.16rem;
	accent-color: #d6d7ee;
	cursor: pointer;
	display: none;
}

.lyric-text {
	font-size: 0.95rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.91);
	word-break: break-word;
}

.lyric-option.is-selected {
	border-color: rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.12);
}

.lyric-option.is-disabled {
	opacity: 0.46;
	cursor: not-allowed;
}

.error {
	margin: 0;
	font-size: 0.85rem;
	color: rgba(255, 150, 170, 0.98);
}

.actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 0.15rem;
}

#generate {
	height: 2.5rem;
	padding: 0 1.08rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.2) 0%,
		rgba(255, 255, 255, 0.12) 100%
	);
	color: rgba(255, 255, 255, 0.93);
	font-family: 'Inter', sans-serif;
	font-size: 0.92rem;
	font-weight: 500;
	cursor: pointer;
}

#generate:hover,
#generate:focus-visible {
	border-color: rgba(255, 255, 255, 0.3);
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.25) 0%,
		rgba(255, 255, 255, 0.16) 100%
	);
}

#generate:disabled,
#generate.loading {
	opacity: 0.6;
	cursor: progress;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes search-gradient-drift {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.page-index #search {
		animation: none;
	}
}

@media (max-width: 980px) {
	.github-link {
		top: 1.5rem;
		right: 1.45rem;
		font-size: 0.95rem;
		gap: 0.58rem;
	}

	.github-link img {
		width: 1.25rem;
		height: 1.25rem;
	}

	.hero-search {
		top: 40.8%;
		width: min(84vw, 43rem);
	}

	#search {
		height: 2.72rem;
		font-size: 0.98rem;
	}

	.quote-mark {
		width: clamp(5.7rem, 11vw, 8.4rem);
		margin-bottom: 1.45rem;
	}

	.brand-lockup {
		bottom: 1.9rem;
	}

	.app-shell-selection {
		padding-top: 5rem;
		padding-bottom: 5.25rem;
	}

	.selection-shell {
		width: min(84vw, 43rem);
		max-height: calc(100vh - 11.2rem);
		padding: 1rem;
	}
}

@media (max-width: 600px) {
	.github-link {
		top: 1.05rem;
		right: 0.95rem;
		font-size: 0.84rem;
		gap: 0.45rem;
	}

	.github-link img {
		width: 1.02rem;
		height: 1.02rem;
	}

	.hero-search {
		top: 41.7%;
		width: calc(100% - 2rem);
	}

	#search {
		height: 2.45rem;
		font-size: 0.92rem;
		padding-inline: 0.95rem;
	}

	.status {
		font-size: 0.8rem;
	}

	.app-shell-selection {
		padding-inline: 1rem;
		padding-top: 4.1rem;
		padding-bottom: 4.7rem;
	}

	.selection-shell {
		width: 100%;
		max-height: calc(100vh - 9.2rem);
		padding: 0.85rem;
		gap: 0.75rem;
	}

	.selection-title {
		font-size: 1rem;
	}

	.muted,
	.lyric-text,
	#generate {
		font-size: 0.88rem;
	}

	.lyric-option {
		padding: 0.62rem 0.66rem;
		gap: 0.58rem;
	}

	.actions {
		justify-content: stretch;
	}

	#generate {
		width: 100%;
	}
}
