:root {
	--night: #3b2a5c;
	--night-deep: #251a3d;
	--lavender: #a58fd0;
	--lavender-pale: #d9cdf0;
	--apricot: #ffcf7d;
	--apricot-deep: #f3a95c;
	--outline: #4a3c6b;
	--cream: #fff7ea;
	--ink: #2b2140;
}

* {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

html,
body {
	margin: 0;
	min-height: 100%;
	background: var(--night-deep);
	color: var(--cream);
	font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
	font-feature-settings: "palt";
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

.title-screen {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6vh;
	padding: 32px 16px;

	background:
		url("img/title-bg.png") center / cover no-repeat,
		radial-gradient(circle at 50% 8%, #ffd99a 0 9%, transparent 9.5%),
		linear-gradient(180deg, #4b3478 0%, #8b6bb5 55%, #d99a86 100%);
}

.title-heading {
	display: flex;
	flex-direction: column;
	align-items: center;
	transform: rotate(-3deg);
}

.title-sub {
	margin: 0;
	font-size: clamp(18px, 4vw, 40px);
	font-weight: 700;
	letter-spacing: .12em;
	color: var(--apricot);
	-webkit-text-stroke: 2px var(--outline);
	paint-order: stroke fill;
}

.title-logo {
	margin: 0;
	font-size: clamp(48px, 13vw, 132px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: .02em;
	color: #fff;
	-webkit-text-stroke: 3px var(--outline);
	paint-order: stroke fill;
}

.title-logo-image {
	display: none;
	width: min(760px, 80vw);
	max-height: 40vh;
	object-fit: contain;
}

.title-heading.has-logo {
	transform: none;
}

.title-heading.has-logo .title-logo-image {
	display: block;
}

.title-heading.has-logo .title-sub,
.title-heading.has-logo .title-logo {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.title-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
}

.title-button {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: clamp(96px, 26vw, 180px);
	aspect-ratio: 1;
	padding-top: 1em;
	border-radius: 50%;
	background: var(--apricot);
	border: 5px solid #fff;
	box-shadow: 0 6px 0 var(--apricot-deep);
	color: #fff;
	font-size: clamp(20px, 5.4vw, 40px);
	font-weight: 700;
	line-height: 1.15;
	text-align: center;
	text-decoration: none;
	-webkit-text-stroke: 1.5px var(--apricot-deep);
	paint-order: stroke fill;
	transition: transform .15s;
}

a.title-button:hover,
a.title-button:focus-visible {
	transform: translateY(-4px);
	outline: none;
}

.title-button-icon {
	position: absolute;
	top: 0.6em;
	left: 50%;
	width: 2.6em;
	height: 2.6em;
	transform: translate(-50%, -50%);
	background: center / contain no-repeat;
}

.title-button-icon.is-hito {
	background-image: url("img/title/hito.png");
}

.title-button-icon.is-mono {
	background-image: url("img/title/mono.png");
}

.title-button-icon.is-ji {
	background-image: url("img/title/ji.png");
}

.title-button-suffix {
	font-size: .6em;
}

.title-button.is-soon {
	opacity: .55;
	cursor: default;
}

.title-button small {
	font-size: 11px;
	-webkit-text-stroke: 0;
	color: var(--outline);
}

.global-footer {
	padding: 16px 12px;
	text-align: center;
	font-size: 11px;
	color: #888;
}

.global-footer a {
	color: inherit;
	text-decoration: none;
}

.global-footer a:hover {
	text-decoration: underline;
}

.global-footer .fiction-notice {
	font-size: 10px;
	opacity: 0.7;
	margin-top: 4px;
}

.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 500;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.modal {
	background: #fff;
	border-radius: 12px;
	padding: 32px 28px;
	max-width: 480px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
}

.modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	color: #888;
	cursor: pointer;
}

.modal-title {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 16px;
}

.modal-body {
	font-size: 13px;
	line-height: 2;
}

.modal-body h4 {
	font-size: 13px;
	font-weight: 700;
	margin-top: 16px;
	margin-bottom: 4px;
}

.modal-body a {
	text-decoration: underline;
}

.sub-footer {
	padding: 16px 12px;
	text-align: center;
	font-size: 11px;
	color: #888;
}

.sub-footer a {
	color: inherit;
	text-decoration: none;
}

.sub-footer a:hover {
	text-decoration: underline;
}

.sub-footer .fiction-notice {
	font-size: 10px;
	opacity: 0.7;
	margin-top: 4px;
}

.modal {
	color: var(--ink);
}

.modal a {
	color: var(--outline);
}

html.is-page-rotated {
	height: 100%;
	overflow: hidden;
}

html.is-page-rotated body {
	position: fixed;
	top: 0;
	left: var(--ph);
	width: var(--pw);
	height: var(--ph);
	min-height: 0;
	overflow-y: auto;
	transform-origin: 0 0;
	transform: rotate(90deg);
}

html.is-page-rotated .title-screen {
	gap: calc(var(--ph) * .06 + 24px);
}

html.is-page-rotated .title-sub {
	font-size: clamp(18px, calc(var(--pw) * .04), 40px);
}

html.is-page-rotated .title-logo {
	font-size: clamp(48px, calc(var(--pw) * .13), 132px);
}

html.is-page-rotated .title-logo-image {
	width: min(560px, calc(var(--pw) * .55));
	max-height: calc(var(--ph) * .24);
}

html.is-page-rotated .title-button {
	width: clamp(80px, calc(var(--ph) * .36), 160px);
	font-size: clamp(18px, calc(var(--ph) * .08), 32px);
	padding-top: 1.3em;
}

html.is-page-rotated .modal {
	max-height: calc(var(--ph) * .8);
}

@media (orientation: landscape) and (pointer: coarse) {
	.title-screen {
		gap: calc(6vh + 24px);
	}

	.title-logo-image {
		width: min(560px, 55vw);
		max-height: 24vh;
	}

	.title-button {
		width: clamp(80px, 36vh, 160px);
		font-size: clamp(18px, 8vh, 32px);
		padding-top: 1.3em;
	}
}
