/*
 * R Noir Rêve — skeleton styles. Mobile first (375 / 390 / 430px).
 */

/*
 * TODO:
 * Final brand colors are not decided.
 * The values below are provisional and must not be treated as official brand colors.
 */
:root {
	--rnr-color-bg: #0f0e11;
	--rnr-color-surface: #19171d;
	--rnr-color-border: #2c2832;
	--rnr-color-text: #ece9ef;
	--rnr-color-text-muted: #a59eac;
	--rnr-color-accent: #c2aed9;
	--rnr-color-accent-contrast: #151318;

	--rnr-font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
	--rnr-radius: 12px;
	--rnr-gutter: 16px;
	--rnr-max-width: 640px;
	--rnr-tap-size: 48px;
	--rnr-nav-height: 60px;
	--rnr-safe-bottom: env(safe-area-inset-bottom, 0px);

	color-scheme: dark;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--rnr-color-bg);
	color: var(--rnr-color-text);
	font-family: var(--rnr-font);
	font-size: 16px;
	line-height: 1.75;
	overflow-wrap: anywhere;
}

a {
	color: var(--rnr-color-accent);
}

:focus-visible {
	outline: 2px solid var(--rnr-color-accent);
	outline-offset: 2px;
}

code {
	font-size: 0.9em;
}

.rnr-skip-link {
	position: absolute;
	left: var(--rnr-gutter);
	top: -100px;
	padding: 8px 12px;
	background: var(--rnr-color-surface);
	color: var(--rnr-color-text);
	z-index: 100;
}

.rnr-skip-link:focus {
	top: 8px;
}

/* Buttons */

.rnr-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: var(--rnr-tap-size);
	padding: 12px 20px;
	border: 1px solid transparent;
	border-radius: var(--rnr-radius);
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.rnr-button--primary {
	background: var(--rnr-color-accent);
	color: var(--rnr-color-accent-contrast);
}

.rnr-button--secondary {
	background: transparent;
	border-color: var(--rnr-color-border);
	color: var(--rnr-color-text);
}

/* Age gate */

.rnr-gate {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: var(--rnr-gutter);
}

.rnr-gate__panel {
	width: 100%;
	max-width: 400px;
	padding: 32px 24px;
	background: var(--rnr-color-surface);
	border: 1px solid var(--rnr-color-border);
	border-radius: var(--rnr-radius);
	text-align: center;
}

.rnr-gate__brand {
	margin: 0 0 24px;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.rnr-gate__text {
	margin: 0 0 16px;
	font-size: 0.9375rem;
}

.rnr-gate__question {
	margin: 0 0 24px;
	font-weight: 700;
}

.rnr-gate__error {
	margin: 0 0 16px;
	color: var(--rnr-color-accent);
	font-size: 0.875rem;
}

.rnr-gate__form {
	display: grid;
	gap: 12px;
}

/* Layout */

.rnr-header {
	display: flex;
	align-items: center;
	height: 56px;
	padding: 0 var(--rnr-gutter);
	border-bottom: 1px solid var(--rnr-color-border);
}

.rnr-header__brand {
	color: var(--rnr-color-text);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: none;
}

.rnr-main {
	max-width: var(--rnr-max-width);
	margin: 0 auto;
	padding: 24px var(--rnr-gutter);
}

.rnr-card {
	margin: 0 0 24px;
	padding: 20px;
	background: var(--rnr-color-surface);
	border: 1px solid var(--rnr-color-border);
	border-radius: var(--rnr-radius);
}

.rnr-card > :first-child {
	margin-top: 0;
}

.rnr-card > :last-child {
	margin-bottom: 0;
}

/* HOME */

.rnr-hero {
	padding: 32px 0;
	text-align: center;
}

.rnr-hero__title {
	margin: 0 0 16px;
	font-size: 2rem;
	line-height: 1.3;
	letter-spacing: 0.04em;
}

.rnr-hero__lead {
	margin: 0 0 16px;
}

.rnr-hero__motto {
	margin: 0;
	color: var(--rnr-color-text-muted);
	font-style: italic;
	letter-spacing: 0.04em;
}

/* Pages */

.rnr-page__title {
	margin: 0 0 16px;
	font-size: 1.5rem;
	line-height: 1.4;
}

.rnr-page__lead {
	margin: 0 0 24px;
	color: var(--rnr-color-text-muted);
}

.rnr-page__heading {
	margin: 32px 0 8px;
	font-size: 1.125rem;
}

/* Footer */

.rnr-footer {
	max-width: var(--rnr-max-width);
	margin: 0 auto;
	padding: 24px var(--rnr-gutter) calc(var(--rnr-nav-height) + var(--rnr-safe-bottom) + 24px);
	border-top: 1px solid var(--rnr-color-border);
	color: var(--rnr-color-text-muted);
	font-size: 0.875rem;
	text-align: center;
}

.rnr-footer__brand {
	margin: 0 0 12px;
	color: var(--rnr-color-text);
	font-weight: 700;
}

.rnr-footer__links {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.rnr-footer__links a {
	display: inline-block;
	padding: 8px 4px;
	color: var(--rnr-color-text-muted);
}

.rnr-footer__copy {
	margin: 0;
}

/* Bottom navigation */

.rnr-bottom-nav {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 50;
	padding-bottom: var(--rnr-safe-bottom);
	background: var(--rnr-color-surface);
	border-top: 1px solid var(--rnr-color-border);
}

.rnr-bottom-nav__list {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	max-width: var(--rnr-max-width);
	height: var(--rnr-nav-height);
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.rnr-bottom-nav__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--rnr-color-text-muted);
	font-size: 0.6875rem;
	line-height: 1.3;
	text-decoration: none;
}

.rnr-bottom-nav__link[aria-current="page"] {
	color: var(--rnr-color-accent);
}

.rnr-bottom-nav__icon {
	font-size: 1.125rem;
	line-height: 1.2;
}
