@charset "UTF-8";

/* セクション背景と本文の間に、画面座標を共有する固定の星を表示 */
.starry-content {
	isolation: isolate;
	clip-path: inset(0);
}

footer.starry-content {
	position: relative;
}

.starry-section__stars {
	position: fixed;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

/* KVの絶対配置や重なり順は維持する */
.kv > .starry-section__stars {
	z-index: 6;
}

.kv > .lead {
	z-index: auto;
}

.kv .lead-item {
	position: relative;
	z-index: 5;
}

.kv .lead-content {
	z-index: 7;
}

main > .starry-content > :not(.starry-section__stars),
footer.starry-content > :not(.starry-section__stars) {
	position: relative;
	z-index: 1;
}

.star {
	position: absolute;
	width: var(--size);
	height: var(--size);
	border-radius: 50%;
	background: var(--star-color);
	color: var(--star-color);
	box-shadow: 0 0 3px currentColor;
	opacity: 0.1;
	animation: star-twinkle var(--duration) ease-in-out var(--delay) infinite;
	animation-play-state: paused;
}

.starry-section__stars.is-animating .star {
	animation-play-state: running;
}

.star--sparkle {
	background: #f2faff;
	box-shadow: 0 0 5px currentColor, 0 0 12px currentColor;
}

.star--sparkle::before,
.star--sparkle::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	border-radius: 50%;
	background: linear-gradient(transparent, currentColor, transparent);
	transform: translate(-50%, -50%);
}

.star--sparkle::before {
	width: 1px;
	height: calc(var(--size) * 5);
}

.star--sparkle::after {
	width: calc(var(--size) * 5);
	height: 1px;
	background: linear-gradient(90deg, transparent, currentColor, transparent);
}

@keyframes star-twinkle {
	0%, 100% { opacity: 0.05; transform: scale(0.65); }
	50% { opacity: var(--peak-opacity, 1); transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
	.star { animation: none; opacity: var(--peak-opacity, 0.5); }
}

.open-btn {
	display: block;
	margin: 100px auto;
	padding: 10px 20px;
}

.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.6);
	display: none;
	justify-content: center;
	align-items: center;
}

.modal {
	background: #fff;
	width: 600px;
	height: 600px;
	padding: 20px;
	border-radius: 8px;
	position: relative;
	box-sizing: border-box;
}

.close-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	cursor: pointer;
	font-size: 24px;
	line-height: 1;
}

.anchor-list {
	margin: 20px 0;
}

.anchor-list a {
	display: inline-block;
	padding: 10px 14px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	text-decoration: none;
	color: #333;
	font-size: 14px;
	cursor: pointer;
}

.anchor-list a:hover {
	background: #f5f5f5;
}

.anchor-list a.active {
	background: #007bff;
	color: #fff;
	border-color: #007bff;
}

.section {
	display: none;
	margin-top: 20px;
	padding: 20px;
	background: #f0f0f0;
	box-sizing: border-box;

	/* 内容が多い時にセクション内でスクロール */
	max-height: 450px;
	overflow-y: auto;
}

.section.active {
	display: block;
}

.section img {
	max-width: 100%;
	height: auto;
	display: block;
	margin-top: 15px;
}

.section p {
	margin: 0 0 1em;
	line-height: 1.8;
}
