/* playikou.com: the game's light theme (Assets/Toolkit/USS/Theme.uss), with a dark one. */
:root {
	--bg: #E2EBD2;
	--surface: #FAFBF1;
	--ink: #1F3324;
	--ink2: #4B5E47;
	--primary: #3E7D4A;
	--on-primary: #FAFBF1;
	--accent: #A8552B;
	--soft: #D3DDBF;
	--ok: #BFE59A;
	--bad: #F4BBA8;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #18241A;
		--surface: #213023;
		--ink: #E8EFDC;
		--ink2: #B5C4AC;
		--primary: #8CC596;
		--on-primary: #102014;
		--accent: #E3936B;
		--soft: #2D4030;
		--ok: #3C5F2C;
		--bad: #6B3326;
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 17px/1.55 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}

a { color: var(--primary); }

.top {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	align-items: baseline;
	justify-content: space-between;
	max-width: 760px;
	margin: 0 auto;
	padding: 18px 16px 0;
}

.brand {
	font-size: 22px;
	font-weight: 800;
	color: var(--ink);
	text-decoration: none;
}

.brand span { font-weight: 500; color: var(--ink2); font-size: 15px; }
nav { display: flex; gap: 16px; font-size: 15px; }

main {
	max-width: 760px;
	margin: 16px auto;
	padding: 24px 16px 32px;
	background: var(--surface);
	border-radius: 20px;
}

@media (min-width: 800px) { main { padding: 32px 40px 40px; } }

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 22px; margin: 32px 0 8px; }
h3 { font-size: 18px; margin: 24px 0 6px; }
.lead { font-size: 19px; color: var(--ink2); }
code { background: var(--soft); padding: 1px 5px; border-radius: 6px; font-size: 0.92em; }

.table { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--soft); }
th { color: var(--ink2); }

.links { padding-left: 20px; font-size: 18px; }

.card {
	display: grid;
	gap: 12px;
	margin-top: 24px;
	padding: 18px;
	border-radius: 16px;
	background: var(--soft);
}

label { font-weight: 600; }
.check { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { margin-top: 5px; }

input[type="text"], #code {
	width: 100%;
	padding: 12px 14px;
	font: 600 22px/1.2 ui-monospace, Consolas, monospace;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
	color: var(--ink);
	background: var(--surface);
	border: 2px solid var(--ink2);
	border-radius: 12px;
}

button {
	padding: 12px 18px;
	font: inherit;
	font-weight: 700;
	color: var(--on-primary);
	background: var(--accent);
	border: 0;
	border-bottom: 4px solid rgba(0, 0, 0, 0.25);
	border-radius: 14px;
	cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: default; }
#status { margin: 0; min-height: 1.5em; }
#status.ok, #status.bad { padding: 10px 12px; border-radius: 10px; }
#status.ok { background: var(--ok); }
#status.bad { background: var(--bad); }

footer { max-width: 760px; margin: 0 auto 32px; padding: 0 16px; font-size: 14px; color: var(--ink2); }

/* The early-access page (build.mjs --early): the name, one line and the Discord button, nothing else.
   The Discord mark is from simple-icons (Discord's own logo; Discord's brand guidelines allow it on a link to a
   server), in Discord's blurple. */
/* The main menu's yellow (Theme.uss .pal-kin) and the game's font, in both light and dark mode. */
@font-face { font-family: "IkouJP"; src: url("/ikou-jp.woff") format("woff"); font-weight: 700; font-display: swap; }
body:has(.early) {
	--bg: #F7E9C6; --surface: #FFFAEE; --ink: #3D2A12; --ink2: #735A38; --soft: #EEDDB5;
	color-scheme: light;
	background: var(--bg);
	color: var(--ink);
	font-family: "IkouJP", system-ui, sans-serif;
	font-weight: 700;
}
.early .icon {
	display: block;
	width: 160px;
	height: 160px;
	margin: 0 auto 22px;
	border-radius: 36px;
	border: 5px solid var(--ink);
	border-bottom-width: 10px;
}
main:has(.early) { background: none; min-height: calc(100vh - 120px); display: grid; place-items: center; }
.early { text-align: center; }
.early h1 { font-size: 56px; margin: 0 0 6px; letter-spacing: -0.01em; }
.early h1 span { font-weight: 700; color: var(--ink2); font-size: 0.5em; }
.early p { margin: 0 0 32px; color: var(--ink2); font-size: 19px; }
.discord {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 14px 26px;
	font-size: 19px;
	font-weight: 700;
	color: #fff;
	background: #5865F2;
	border-radius: 999px;
	text-decoration: none;
}
.discord svg { width: 26px; height: 26px; fill: currentColor; }
.discord:hover { background: #4752C4; }
.discord:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.early .note { margin: 12px 0 0; font-size: 15px; }
main:has(.early) + footer { text-align: center; }
