:root {
	color-scheme: dark;
	--ink: #0c111a;
	--paper: #dce6f2;
	--muted: #9baec5;
	--silver: #91b6d5;
	--line: #425d7b;
	font-family: Georgia, "Times New Roman", serif;
	background: var(--ink);
	color: var(--paper);
}
* { box-sizing: border-box; }
body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(ellipse at 50% 0, #3e649635, transparent 65%),
		repeating-linear-gradient(90deg, transparent 0 72px, #91b6d504 73px 74px),
		var(--ink);
}
body::before {
	content: "";
	position: fixed;
	inset: 18px;
	border: 1px solid #91b6d532;
	outline: 1px solid #91b6d516;
	outline-offset: 5px;
	pointer-events: none;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button, input { transition: background-color .2s, border-color .2s, box-shadow .2s; }
:focus-visible { outline: 2px solid #bddfff; outline-offset: 5px; }
[hidden] { display: none !important; }
.portal { max-width: 1040px; padding: 58px 40px 36px; margin: auto; }
.masthead { text-align: center; }
.eyebrow {
	font-size: .7rem;
	font-weight: normal;
	letter-spacing: .22em;
	line-height: 1.7;
	text-transform: uppercase;
	color: var(--silver);
}
h1 { margin: 20px auto 12px; max-width: 510px; }
.logo-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; touch-action: manipulation; }
.logo-button:hover { filter: drop-shadow(0 0 12px #91b6d535); }
.logo {
	display: block;
	width: 100%;
	height: auto;
	mix-blend-mode: screen;
	filter: sepia(.2) hue-rotate(170deg) saturate(.6);
	user-select: none;
}
.ornament { display: flex; align-items: center; gap: 16px; max-width: 300px; margin: 20px auto; color: var(--silver); }
.ornament span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line)); }
.ornament span:last-child { transform: rotate(180deg); }
.ornament b { font-size: .65rem; font-weight: normal; }
.synopsis { max-width: 740px; margin: 24px auto; font-size: 1rem; line-height: 1.85; color: var(--paper); }
.synopsis p { margin: 0 0 16px; }
.intro { color: var(--muted); font-size: .9rem; margin-top: 0; line-height: 1.7; }
.editions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; margin-top: 38px; }
.edition {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 30px;
	border: 1px solid var(--line);
	background: linear-gradient(145deg, #1b2b3eb0, #101722);
	box-shadow: inset 0 0 0 5px var(--ink), inset 0 0 0 6px #91b6d520, 0 14px 36px #0004;
	transition: transform .25s, border-color .25s, box-shadow .25s;
	animation: arrive .65s ease-out both;
}
.edition-patreon { background: linear-gradient(145deg, #292b4ab0, #121525); animation-delay: .1s; }
.edition-poster {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 24px;
	border: 1px solid var(--line);
	box-shadow: 0 6px 20px #0004;
}
.edition-links .text-button { text-decoration-color: var(--line); }
.edition:hover, .edition:focus-within {
	transform: translateY(-4px);
	border-color: var(--silver);
	box-shadow: inset 0 0 0 5px var(--ink), inset 0 0 0 6px #91b6d530, 0 18px 42px #0006;
}
.edition-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.seal {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	border: 1px solid var(--line);
	border-radius: 50%;
	color: var(--silver);
	font-size: .85rem;
	box-shadow: inset 0 0 0 3px #101722, inset 0 0 0 4px #91b6d525;
}
h2 { font-size: 1.8rem; font-weight: normal; margin: 18px 0 12px; }
.edition-title { margin-top: 0; }
.description { color: var(--muted); line-height: 1.8; font-size: .95rem; margin: 0 0 24px; overflow-wrap: anywhere; }
.release-details { margin: auto 0 20px; border-top: 1px solid #91b6d526; padding-top: 20px; }
.release-details div { display: flex; align-items: baseline; gap: 6px; }
dt { font-size: .9rem; color: var(--muted); }
dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.status { font-size: .78rem; line-height: 1.6; min-height: 38px; margin: 20px 0 14px; color: var(--muted); }
.play-button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 48px;
	padding: 12px 18px;
	border: 1px solid #6285a8;
	background: linear-gradient(#243a54, #182537);
	color: var(--paper);
	letter-spacing: .04em;
}
.play-button:not(:disabled):hover { background: #304e70; border-color: #bddfff; box-shadow: 0 0 22px #91b6d51a; }
.text-button { color: var(--muted); background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; padding: 10px; font-size: .8rem; min-height: 44px; }
.text-button:not(:disabled):hover { color: var(--paper); }
.relock { align-self: center; }
.edition-links { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.edition .edition-links { margin-top: 8px; }
.walkthrough-button {
	min-height: 36px;
	padding: 7px 14px;
	border: 1px solid var(--line);
	background: #152131;
	color: var(--muted);
	font-size: .8rem;
}
.walkthrough-button:hover { background: #243a54; border-color: var(--silver); color: var(--paper); }
.edition-links a { display: inline-flex; align-items: center; }
.walkthrough-page { max-width: 840px; margin: 40px auto; padding: 30px; line-height: 1.8; }
.walkthrough-page h1 { max-width: none; margin: 0 0 20px; font-weight: normal; }
.walkthrough-notice { border-left: 2px solid var(--silver); padding-left: 16px; color: var(--muted); }
.walkthrough-page .edition-links { flex-wrap: wrap; margin-top: 28px; }
footer { text-align: center; padding-top: 28px; }
.community-links { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 24px; }
.community-links a { display: grid; place-items: center; width: 64px; height: 64px; padding: 10px; border: 1px solid transparent; }
.community-links a:hover { border-color: var(--line); background: #91b6d510; }
.community-links img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
#portal-notice { max-width: 580px; margin: 10px auto; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.notice { padding: 20px; border: 1px solid var(--silver); }
dialog {
	width: min(480px, calc(100% - 40px));
	max-height: calc(100dvh - 40px);
	padding: 32px;
	background: #121c2a;
	color: var(--paper);
	border: 1px solid var(--silver);
	box-shadow: 0 25px 100px #0009;
}
dialog.development-dialog { width: min(640px, calc(100% - 32px)); padding: 40px; }
dialog::backdrop { background: #000b; backdrop-filter: blur(5px); }
dialog h2 { margin-top: 10px; }
#password-hint { line-height: 1.6; color: var(--muted); font-size: .9rem; }
label { display: block; margin: 24px 0 8px; font-size: .85rem; }
dialog.development-dialog label { margin-top: 0; }
input { width: 100%; padding: 12px; background: #090e17; color: var(--paper); border: 1px solid var(--line); border-radius: 0; }
input[aria-invalid="true"] { border-color: #bc9ecf; }
.error { color: #d4b3e0; }
#password-error { min-height: 24px; font-size: .85rem; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; }
.dialog-actions .play-button { flex: 1; justify-content: center; }
.gate-note { color: var(--muted); font-size: .72rem; line-height: 1.6; margin: 24px 0 0; }
@keyframes arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1000px) {
	.portal {
		max-width: 1440px;
		min-height: 100svh;
		padding: clamp(32px, 4vh, 56px) 48px;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
	.masthead h1 { max-width: clamp(360px, 30vw, 460px); margin: 0 auto; }
	.ornament { max-width: 360px; margin: 16px auto; }
	.synopsis { max-width: 1240px; margin: 0 auto; font-size: 1.15rem; line-height: 1.7; color: var(--muted); }
	.synopsis p { margin-bottom: 12px; }
	.synopsis p:last-child { margin-bottom: 0; }
	.intro { margin: clamp(8px, 1.5vh, 18px) 0 0; font-style: italic; color: var(--paper); }
	.editions { gap: 36px; margin-top: 32px; }
	.edition { padding: 24px; background: linear-gradient(155deg, #1a2738e0, #0f1620); }
	.edition-patreon { background: linear-gradient(155deg, #24273de0, #111522); }
	.edition-poster { width: calc(100% + 36px); max-width: none; margin: -18px -18px 20px; border: 0; }
	.edition-title { font-size: 2rem; margin-bottom: 10px; }
	.seal { width: 42px; height: 42px; }
	.description { font-size: 1.05rem; margin-bottom: 18px; line-height: 1.6; }
	.release-details { padding-top: 16px; margin-bottom: 18px; }
	.release-details dt, .release-details dd { font-size: 1.05rem; }
	.edition .play-button { min-height: 56px; padding: 14px 20px; font-size: 1.15rem; }
	.edition .walkthrough-button { min-height: 44px; padding: 10px 18px; font-size: .95rem; }
	footer { padding-top: 24px; }
	.community-links { margin-top: 0; }
	.community-links a { width: 72px; height: 72px; padding: 10px; }
	#portal-notice:empty { display: none; }
}
@media (max-width: 640px) {
	body::before { inset: 9px; outline-offset: 3px; }
	.portal { padding: 40px 26px 28px; }
	.editions { grid-template-columns: 1fr; gap: 22px; margin-top: 28px; }
	.edition { padding: 24px; }
	h2 { font-size: 1.6rem; }
	.synopsis { font-size: .95rem; }
	dialog { padding: 24px; }
	.dialog-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.edition:hover, .edition:focus-within { transform: none; }
}
