html,
body {
	background: #060515;
	overscroll-behavior: none;
}

.luna-starchart {
	position: relative;
	display: flex;
	justify-content: center;
	width: 100%;
	min-height: 100dvh;
	overflow: hidden;
	background: #060515;
	color: #ddd5ea;
	font-family: "Zen Kaku Gothic New", sans-serif;
}

.luna-starchart::before {
	content: "";
	position: absolute;
	inset: 0;
	max-width: 480px;
	margin: 0 auto;
	background: #0a0820;
}

.luna-starchart__bg,
.luna-starchart__stars,
.luna-starchart__pedestal,
.luna-starchart__canvas,
.luna-starchart__frame,
.luna-starchart__screen,
.luna-starchart__leave,
.luna-starchart__head {
	position: absolute;
	left: 50%;
	width: min(100%, 480px);
	transform: translateX(-50%);
}

.luna-starchart__bg {
	inset-block: 0;
	height: 100%;
	object-fit: cover;
	object-position: center bottom;
}

.luna-starchart__stars {
	inset-block: -20%;
	width: min(140%, 672px);
	background-image: var(--luna-starchart-stars);
	background-repeat: repeat;
	background-size: 540px;
	mix-blend-mode: screen;
	opacity: 0.5;
	pointer-events: none;
	animation: lunaStarchartDrift 60s linear infinite;
}

.luna-starchart__pedestal {
	top: 52%;
	width: min(82%, 394px);
	pointer-events: none;
}

.luna-starchart__canvas {
	inset-block: 0;
	height: 100%;
	pointer-events: none;
}

.luna-starchart__frame {
	inset-block: 0;
	height: 100%;
	pointer-events: none;
	z-index: 30;
}

.luna-starchart__frame span,
.luna-starchart__frame i {
	position: absolute;
	display: block;
}

.luna-starchart__frame span:first-child {
	inset: 8px;
	border: 1px solid rgba(203, 162, 78, 0.55);
}

.luna-starchart__frame span:nth-child(2) {
	inset: 12px;
	border: 1px solid rgba(203, 162, 78, 0.28);
}

.luna-starchart__frame i {
	width: 22px;
	height: 22px;
	border-color: #cba24e;
	border-style: solid;
}

.luna-starchart__frame i:nth-of-type(1) {
	top: 4px;
	left: 4px;
	border-width: 2px 0 0 2px;
}

.luna-starchart__frame i:nth-of-type(2) {
	top: 4px;
	right: 4px;
	border-width: 2px 2px 0 0;
}

.luna-starchart__frame i:nth-of-type(3) {
	bottom: 4px;
	left: 4px;
	border-width: 0 0 2px 2px;
}

.luna-starchart__frame i:nth-of-type(4) {
	right: 4px;
	bottom: 4px;
	border-width: 0 2px 2px 0;
}

/* ヘッダー：星図航路は luna-diagnosis.css を読み込まないため、共通ヘッダーの基本スタイルを
   このCSS内に一式持たせる（未定義だと <a> の既定下線・青リンク色・レイアウト崩れが出る）。金基調に統一。 */
.luna-starchart__head {
	top: 14px;
	z-index: 60;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 6px 20px;
}

.luna-starchart__head .luna-fortune-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	border: 0;
	background: transparent;
	padding: 0;
	text-decoration: none;
	cursor: pointer;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.luna-starchart__head .luna-fortune-brand__jp {
	font-family: "Shippori Mincho", "Shippori Mincho B1", serif;
	font-size: 22px;
	letter-spacing: 0.16em;
	color: #d4b46a;
}

.luna-starchart__head .luna-fortune-brand__en {
	font-family: "Cormorant Garamond", serif;
	font-style: italic;
	font-size: 18px;
	letter-spacing: 0.16em;
	color: #d4b46a;
}

.luna-starchart__head .luna-fortune-back {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 16px;
	border: 1px solid rgba(203, 162, 78, 0.7);
	border-radius: 999px;
	font-size: 13px;
	letter-spacing: 0.12em;
	color: #ecdfba;
	text-decoration: none;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
	white-space: nowrap;
}

@media (max-width: 375px) {
	.luna-starchart__head .luna-fortune-brand__jp { font-size: 20px; }
	.luna-starchart__head .luna-fortune-back { padding: 6px 12px; font-size: 12px; }
}

.luna-starchart__screen {
	inset-block: 0;
	z-index: 15;
	display: none;
	height: 100%;
	box-sizing: border-box;
}

.luna-starchart__screen.is-active {
	display: flex;
}

.luna-starchart__intro {
	flex-direction: column;
	justify-content: flex-start;
	padding: 112px 20px 22px;
}

.luna-starchart__intro-copy {
	text-align: center;
	animation: lunaStarchartFadeUp 0.8s ease both;
}

.luna-starchart h1,
.luna-starchart h2,
.luna-starchart h3 {
	font-family: "Shippori Mincho", serif;
	font-weight: 600;
}

.luna-starchart h1 {
	margin: 0;
	color: #f0e3c0;
	font-size: 34px;
	letter-spacing: 0.14em;
	text-shadow: 0 0 18px rgba(203, 162, 78, 0.55), 0 2px 8px rgba(0, 0, 0, 0.8);
}

.luna-starchart__intro-copy p {
	margin: 8px 0 0;
	color: #e7dcc2;
	font-family: "Shippori Mincho", serif;
	font-size: 13px;
	letter-spacing: 0.1em;
	line-height: 1.7;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.luna-starchart__intro-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: auto;
	animation: lunaStarchartFadeUp 0.8s 0.2s ease both;
}

.luna-starchart button {
	appearance: none;
	cursor: pointer;
	font-family: "Shippori Mincho", serif;
	-webkit-tap-highlight-color: transparent;
}

.luna-starchart__primary,
.luna-starchart__actions button,
.luna-starchart__leave button {
	min-height: 54px;
	border: 1px solid rgba(203, 162, 78, 0.4);
	border-radius: 28px;
	background: linear-gradient(180deg, rgba(16, 12, 44, 0.94), rgba(10, 8, 32, 0.96));
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
	color: #f0e3c0;
	font-size: 15px;
	letter-spacing: 0.14em;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.luna-starchart__primary {
	border: 2px solid #cba24e;
	background: linear-gradient(180deg, #2a1f4e, #191038);
	box-shadow: inset 0 0 0 2px rgba(10, 8, 32, 0.9), inset 0 0 0 3px rgba(212, 180, 106, 0.55), 0 6px 24px rgba(203, 162, 78, 0.3);
	font-size: 17px;
	letter-spacing: 0.18em;
}

.luna-starchart__primary:active,
.luna-starchart__actions button:active,
.luna-starchart__leave button:active {
	transform: scale(0.97);
}

.luna-starchart__link {
	align-self: center;
	min-height: 44px;
	padding: 6px 10px;
	border: 0;
	border-bottom: 1px solid rgba(212, 180, 106, 0.7);
	border-radius: 0;
	background: none;
	color: #ecdfba;
	font-size: 15px;
	letter-spacing: 0.14em;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.luna-starchart__flow {
	z-index: 35;
	overflow-y: auto;
	background: rgba(6, 5, 21, 0.9);
	-webkit-overflow-scrolling: touch;
}

.luna-starchart__flow-inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 22px;
	min-height: 100%;
	padding: 60px 24px 28px;
	box-sizing: border-box;
	animation: lunaStarchartFadeIn 0.4s ease both;
}

.luna-starchart__flow h2 {
	margin: 0;
	text-align: center;
	color: #f0e3c0;
	font-size: 26px;
	letter-spacing: 0.24em;
	text-shadow: 0 0 16px rgba(203, 162, 78, 0.5);
}

.luna-starchart__flow-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.luna-starchart__flow-list div {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.luna-starchart__flow-list span {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1.5px solid rgba(203, 162, 78, 0.65);
	border-radius: 50%;
	box-shadow: 0 0 16px rgba(203, 162, 78, 0.2);
	color: #d4b46a;
	font-size: 22px;
}

.luna-starchart__flow-list p {
	margin: 0;
	color: rgba(221, 213, 234, 0.85);
	font-size: 12.5px;
	line-height: 1.7;
}

.luna-starchart__flow-list b {
	display: block;
	margin: 0 0 3px;
	color: #f0e6cd;
	font-family: "Shippori Mincho", serif;
	font-size: 17px;
	letter-spacing: 0.06em;
}

.luna-starchart__question {
	flex-direction: column;
	justify-content: flex-end;
	padding: 0 16px 16px;
}

.luna-starchart__question-panel {
	padding: 14px 14px 12px;
	border: 1px solid rgba(203, 162, 78, 0.55);
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(16, 12, 44, 0.92), rgba(10, 8, 32, 0.95));
	box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.6);
	animation: lunaStarchartFadeUp 0.45s ease both;
}

.luna-starchart__step {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.luna-starchart__step span {
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(203, 162, 78, 0.6));
}

.luna-starchart__step span:last-child {
	background: linear-gradient(270deg, transparent, rgba(203, 162, 78, 0.6));
}

.luna-starchart__step b {
	color: #d4b46a;
	font-family: "Cormorant Garamond", serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.2em;
}

.luna-starchart__question-text {
	margin: 8px 0 10px;
	color: #f0e6cd;
	font-family: "Shippori Mincho", serif;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.05em;
	line-height: 1.6;
	text-align: center;
}

.luna-starchart__choices {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.luna-starchart__choice {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 8px 12px;
	border: 1px solid rgba(203, 162, 78, 0.34);
	border-radius: 14px;
	background: rgba(6, 5, 21, 0.48);
	color: #ddd5ea;
	font-family: "Zen Kaku Gothic New", sans-serif;
	font-size: 12.5px;
	line-height: 1.4;
	text-align: left;
	transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.luna-starchart__choice span:first-child {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	color: #d4b46a;
	font-size: 13px;
}

.luna-starchart__choice:active,
.luna-starchart__choice.is-selected {
	transform: scale(0.97);
	border-color: rgba(212, 180, 106, 0.9);
	background: rgba(42, 31, 78, 0.78);
}

.luna-starchart__weaving {
	bottom: 26px;
	top: auto;
	align-items: flex-end;
	justify-content: center;
	height: auto;
	pointer-events: none;
	text-align: center;
}

.luna-starchart__weaving p {
	margin: 0 0 26px;
	color: #e7dcc2;
	font-family: "Shippori Mincho", serif;
	font-size: 14px;
	letter-spacing: 0.22em;
	text-shadow: 0 0 12px rgba(203, 162, 78, 0.6);
	animation: lunaStarchartPulse 2s ease-in-out infinite;
}

.luna-starchart__result {
	flex-direction: column;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.luna-starchart__result-spacer {
	flex: none;
	height: 46dvh;
	pointer-events: none;
}

.luna-starchart__result-stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0 16px 20px;
	animation: lunaStarchartFadeUp 0.7s ease both;
}

.luna-starchart__panel,
.luna-starchart__routes {
	padding: 18px 16px;
	border: 1.5px solid #cba24e;
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(30, 22, 64, 0.95), rgba(16, 12, 44, 0.96));
	box-shadow: 0 0 26px rgba(203, 162, 78, 0.25), inset 0 0 30px rgba(203, 162, 78, 0.08);
}

.luna-starchart__date,
.luna-starchart__domain span {
	margin: 0;
	color: rgba(212, 180, 106, 0.8);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-align: center;
}

.luna-starchart__domain {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid rgba(203, 162, 78, 0.35);
	text-align: center;
}

.luna-starchart__domain h2 {
	margin: 2px 0 0;
	color: #ecdfba;
	font-size: 21px;
	letter-spacing: 0.14em;
	text-shadow: 0 0 14px rgba(203, 162, 78, 0.45);
}

.luna-starchart__panel h3,
.luna-starchart__routes h3 {
	margin: 0 0 8px;
	color: #d4b46a;
	font-size: 13.5px;
	letter-spacing: 0.12em;
	text-align: center;
}

.luna-starchart__panel p {
	margin: 0;
	color: #ddd5ea;
	font-size: 12.5px;
	line-height: 1.85;
}

.luna-starchart__panel .luna-starchart__future {
	color: #f0e6cd;
	font-family: "Shippori Mincho", serif;
	font-size: 14px;
	letter-spacing: 0.04em;
	line-height: 2;
	text-align: center;
}

.luna-starchart__signature {
	margin-top: 8px !important;
	color: rgba(212, 180, 106, 0.7) !important;
	font-size: 10.5px !important;
	letter-spacing: 0.14em;
	text-align: right;
}

.luna-starchart__routes {
	border-width: 1px;
	animation: lunaStarchartFadeUp 0.4s ease both;
}

.luna-starchart__route {
	margin-top: 10px;
	padding: 10px;
	border: 1px solid rgba(203, 162, 78, 0.28);
	border-radius: 12px;
	background: rgba(6, 5, 21, 0.32);
}

.luna-starchart__route-head {
	display: flex;
	align-items: center;
	gap: 8px;
}

.luna-starchart__route-dot {
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	box-shadow: 0 0 12px currentColor;
}

.luna-starchart__route-ord {
	color: rgba(212, 180, 106, 0.85);
	font-family: "Shippori Mincho", serif;
	font-size: 11px;
	letter-spacing: 0.14em;
}

.luna-starchart__route-title {
	color: #f0e6cd;
	font-family: "Shippori Mincho", serif;
	font-size: 14px;
	font-weight: 600;
}

.luna-starchart__route p {
	margin: 6px 0 0;
	color: #ddd5ea;
	font-size: 12px;
	line-height: 1.75;
}

.luna-starchart__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 2px;
}

.luna-starchart__notice {
	margin: 4px 0 0;
	color: rgba(221, 213, 234, 0.5);
	font-size: 10px;
	line-height: 1.7;
	text-align: center;
}

.luna-starchart__subblock {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid rgba(203, 162, 78, 0.28);
}

.luna-starchart__to-catalog {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	border: 1px solid rgba(203, 162, 78, 0.4);
	border-radius: 28px;
	background: linear-gradient(180deg, rgba(16, 12, 44, 0.94), rgba(10, 8, 32, 0.96));
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
	color: #f0e3c0;
	font-family: "Shippori Mincho", serif;
	font-size: 15px;
	letter-spacing: 0.14em;
	text-decoration: none;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.luna-starchart__to-catalog:active {
	transform: scale(0.97);
}

.luna-starchart__sharepop {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: none;
	align-items: flex-end;
	justify-content: center;
}

.luna-starchart__sharepop.is-active {
	display: flex;
}

.luna-starchart__sharepop-ov {
	position: absolute;
	inset: 0;
	background: rgba(6, 5, 21, 0.72);
	backdrop-filter: blur(2px);
}

.luna-starchart__sharepop-panel {
	position: relative;
	width: min(100%, 480px);
	box-sizing: border-box;
	padding: 26px 22px 30px;
	border-top: 1.5px solid #cba24e;
	border-radius: 20px 20px 0 0;
	background: linear-gradient(180deg, rgba(22, 16, 54, 0.98), rgba(10, 8, 32, 0.99));
	box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
	text-align: center;
	animation: lunaStarchartFadeUp 0.3s ease both;
}

.luna-starchart__sharepop-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 34px;
	height: 34px;
	border: 0;
	background: none;
	color: rgba(236, 223, 186, 0.8);
	font-size: 18px;
	line-height: 1;
}

.luna-starchart__sharepop-msg {
	margin: 6px 0 0;
	color: #f0e6cd;
	font-family: "Shippori Mincho", serif;
	font-size: 16px;
	letter-spacing: 0.08em;
}

.luna-starchart__sharepop-sub {
	margin: 8px 0 18px;
	color: rgba(221, 213, 234, 0.7);
	font-size: 12px;
	line-height: 1.7;
}

.luna-starchart__sharepop-x {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	border: 2px solid #cba24e;
	border-radius: 28px;
	background: linear-gradient(180deg, #2a1f4e, #191038);
	box-shadow: inset 0 0 0 2px rgba(10, 8, 32, 0.9), inset 0 0 0 3px rgba(212, 180, 106, 0.5);
	color: #f0e3c0;
	font-family: "Shippori Mincho", serif;
	font-size: 16px;
	letter-spacing: 0.16em;
	text-decoration: none;
}

.luna-starchart__sharepop-x:active {
	transform: scale(0.98);
}

.luna-starchart__leave {
	inset-block: 0;
	z-index: 40;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	background: rgba(6, 5, 21, 0.6);
}

.luna-starchart__leave[hidden] {
	display: none;
}

.luna-starchart__leave-panel {
	padding: 22px 20px 26px;
	border-top: 1.5px solid #cba24e;
	border-radius: 18px 18px 0 0;
	background: linear-gradient(180deg, rgba(22, 16, 54, 0.98), rgba(10, 8, 32, 0.99));
	animation: lunaStarchartFadeUp 0.3s ease both;
}

.luna-starchart__leave-panel p {
	margin: 0 0 16px;
	color: #f0e6cd;
	font-family: "Shippori Mincho", serif;
	font-size: 15px;
	letter-spacing: 0.08em;
	text-align: center;
}

.luna-starchart__leave-panel button {
	width: 100%;
	margin-top: 10px;
}

.luna-starchart__leave-panel button:first-of-type {
	border: 2px solid #cba24e;
	background: linear-gradient(180deg, #2a1f4e, #191038);
}

@keyframes lunaStarchartDrift {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -540px 320px;
	}
}

@keyframes lunaStarchartFadeUp {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes lunaStarchartFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes lunaStarchartPulse {
	0%,
	100% {
		opacity: 0.85;
	}
	50% {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.luna-starchart__stars,
	.luna-starchart__weaving p,
	.luna-starchart__intro-copy,
	.luna-starchart__intro-actions,
	.luna-starchart__question-panel,
	.luna-starchart__result-stack,
	.luna-starchart__routes,
	.luna-starchart__leave-panel,
	.luna-starchart__sharepop-panel {
		animation: none;
	}
}

@media (max-width: 359px) {
	.luna-starchart h1 {
		font-size: 30px;
	}

	.luna-starchart__choice {
		font-size: 12px;
	}
}
