/* ==========================================================================
   Naked Joker — page-specific styles.
   Loaded on top of global.css (palette, base typography, headings).
   ========================================================================== */

:root {
	/* The table is a surface with its own colour, like a physical felt: it
	   does not invert with the theme. Same value in both dark-mode paths. */
	--felt: #0b6b2e;
	--felt-edge: #064a1f;
}

.nj-screen {
	flex: 1 0 auto;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 2rem 1rem;
}

.nj-screen h1 {
	font-size: clamp(2rem, 6vw, 3.25rem);
	letter-spacing: 0.01em;
}

.nj-lede {
	max-width: 520px;
	margin: 0 auto 1.5rem;
	text-align: center;
	color: var(--gray-dark);
}

.nj-table {
	width: 100%;
	background: var(--felt);
	border: 6px solid var(--felt-edge);
	border-radius: 10px;
	box-shadow: var(--box-shadow);
	line-height: 0;
}

#nj-canvas {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 8 / 5;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	image-rendering: pixelated;
	cursor: default;
}

.nj-bar {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.9rem;
}

#nj-status {
	flex: 1;
	min-height: 2.6em;
	color: var(--gray-dark);
	font-size: 0.95rem;
}

.nj-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.35rem;
	flex-shrink: 0;
}

#nj-seed {
	font-size: 0.75rem;
	color: var(--gray);
}

#nj-new-game {
	font-family: inherit;
	cursor: pointer;
	background: var(--accent-dark);
	color: var(--text-on-color);
	border: none;
	font-weight: bold;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 0.6rem 1.25rem;
	border-radius: 3px;
	transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

#nj-new-game:hover {
	background: var(--accent);
	color: var(--black);
	transform: translateY(-1px);
}

#nj-new-game:focus-visible {
	outline: 3px solid var(--accent-dark);
	outline-offset: 2px;
}

.nj-rules {
	width: 100%;
	max-width: var(--content-width);
	margin-top: 1.75rem;
	color: var(--gray-dark);
}

.nj-rules summary {
	cursor: pointer;
	font-weight: bold;
}

.nj-rules ul {
	margin: 0.75rem 0 0;
	padding-left: 1.25rem;
}

.nj-rules li {
	margin-bottom: 0.4rem;
}

@media (max-width: 600px) {
	.nj-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.nj-side {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}
