@font-face {
	font-family: montserrat;
	src: url(../css/fonts/montserrat/Montserrat-Regular.otf);
	font-weight: 400;
}
@font-face {
	font-family: montserrat;
	src: url(../css/fonts/montserrat/Montserrat-Bold.otf);
	font-weight: 700;
}
@font-face {
	font-family: montserrat;
	src: url(../css/fonts/montserrat/Montserrat-ExtraBold.otf);
	font-weight: 800;
}

:root {
	--felt: #255500;
	--ink: #1a1a1a;
	--die-white: #ffffff;
	--die-red: #ff0000;
	--die-yellow: #ffcc00;
	--die-blue: #0055d4;
	/* Same light direction as the wheel's dice shadows */
	--shadow-x: -5px;
	--shadow-y: 8px;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	min-height: 100%;
}

body.spinit {
	background: var(--felt);
	color: white;
	font-family: montserrat, sans-serif;
	overflow-x: hidden;
}

a { color: inherit; }

.skip-link {
	position: absolute;
	left: 10px;
	top: -100px;
	z-index: 1000;
	padding: 10px 15px;
	background: white;
	color: var(--ink);
	border-radius: 4px;
}
.skip-link:focus { top: 10px; }
.si-main:focus { outline: none; }

/* ---------- Background wheel ---------- */
.wheel {
	position: fixed;
	z-index: 0;
	pointer-events: none;
	/* Mobile: rises from the bottom, top of the wheel showing */
	width: 150vw;
	height: 150vw;
	left: -25vw;
	top: calc(100svh - 48vw);
}
.wheel svg { width: 100%; height: 100%; display: block; }

/* ---------- Nav and footer ---------- */
.si-nav {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	display: flex;
	gap: 8px;
	padding: 8px 14px;
	background: white;
	color: var(--ink);
	border: 3px solid black;
	border-top: 0;
	border-right: 0;
	border-bottom-left-radius: 14px;
	font-size: 14px;
	font-weight: 700;
}
.si-nav a { text-decoration: none; }
.si-nav a:hover, .si-nav a:focus-visible { text-decoration: underline; }

.si-copyright {
	position: fixed;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 8px 14px;
	background: white;
	color: var(--ink);
	border: 3px solid black;
	border-right: 0;
	border-bottom: 0;
	border-top-left-radius: 14px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
}

/* ---------- Content ---------- */
.si-main {
	position: relative;
	z-index: 1;
	width: min(100%, 520px);
	margin: 0 auto;
	padding: 48px 20px 52vw;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.si-title {
	margin: 0;
	display: flex;
	justify-content: center;
	align-items: flex-end;
	gap: 3%;
}
.si-title img { height: 64px; width: auto; display: block; }

.si-byline {
	margin: 0;
	text-align: center;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.5;
}
.si-byline a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.si-byline a:hover { color: var(--die-yellow); }

.si-card {
	background: white;
	color: var(--ink);
	border: 4px solid black;
	border-radius: 24px;
	padding: 20px 24px;
	font-size: 17px;
	line-height: 1.6;
}
.si-card p { margin: 0 0 0.8em; text-wrap: pretty; }  /* avoids single words left on the last line */
.si-card p:last-child { margin-bottom: 0; }

/* Players, time and age along the bottom of the card */
.si-stats {
	list-style: none;
	margin: 1em 0 0;
	padding: 0.8em 0 0;
	border-top: 3px solid black;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	gap: 0.4em 1em;
	font-weight: 800;
}

/* ---------- Buttons: plain on mobile, dice on desktop ---------- */
.si-actions {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.die {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 64px;
	padding: 12px;
	border: 4px solid black;
	border-radius: 20px;
	font: 800 20px montserrat, sans-serif;
	text-decoration: none;
	color: var(--ink);
	cursor: pointer;
	box-shadow: var(--shadow-x) var(--shadow-y) 0 black;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.die:hover, .die:focus-visible {
	transform: translate(-2px, 3px);
	box-shadow: calc(var(--shadow-x) / 2) calc(var(--shadow-y) / 2) 0 black;
}
.die:focus-visible { outline: 4px solid white; outline-offset: 4px; }

.die-white  { background: var(--die-white); }
.die-red    { background: var(--die-red); color: white; }
.die-yellow { background: var(--die-yellow); }
.die-blue   { background: var(--die-blue); color: white; }

/* ---------- Desktop: one screen, content left, wheel off the right edge ---------- */
@media (min-width: 1000px) and (min-height: 600px) {
	.wheel {
		width: 125vh;
		height: 125vh;
		left: calc(100vw - 62.5vh * 0.95);
		top: -12.5vh;
	}

	.si-main {
		width: auto;
		max-width: none;
		min-height: 100vh;
		margin: 0 0 0 max(6vw, 60px);
		padding: 6vh 0;
		justify-content: center;
		align-items: flex-start;
		gap: 3vh;
	}

	.si-title { justify-content: flex-start; }
	.si-title img { height: clamp(90px, 17vh, 200px); }

	.si-byline {
		text-align: left;
		font-size: clamp(16px, 2.1vh, 24px);
		margin-top: -1vh;
	}

	.si-card {
		width: clamp(480px, 40vw, 760px);
		font-size: clamp(17px, 2.1vh, 23px);
		padding: 2.6vh 2.4vw;
	}

	.si-actions {
		flex-direction: row;
		gap: clamp(24px, 2.4vw, 44px);
		margin-top: 1vh;
	}

	/* Die-shaped buttons, tilted like the dice on the wheel */
	.die {
		width: clamp(120px, 14vh, 160px);
		height: clamp(120px, 14vh, 160px);
		min-height: 0;
		border-radius: 18%;
		font-size: clamp(16px, 2vh, 21px);
		text-align: center;
		line-height: 1.15;
		transform: rotate(var(--tilt, 0deg));
	}
	.die:hover, .die:focus-visible {
		transform: rotate(0deg) translate(-2px, 3px);
	}
	.si-actions li:nth-child(1) .die { --tilt: -7deg; }
	.si-actions li:nth-child(2) .die { --tilt: 5deg; }
	.si-actions li:nth-child(3) .die { --tilt: -3deg; }
	.si-actions li:nth-child(4) .die { --tilt: 8deg; }

	.die-label { padding: 0 10%; }
}

@media (prefers-reduced-motion: reduce) {
	.die, .die:hover, .die:focus-visible { transition: none; }
}

/* ---------- Video pop-up ---------- */
.si-video {
	width: min(92vw, 1200px);
	padding: 0;
	border: 4px solid black;
	border-radius: 18px;
	background: black;
	overflow: visible;
}
.si-video::backdrop { background: rgba(0, 0, 0, 0.8); }
.si-video-frame {
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	overflow: hidden;
}
.si-video-frame iframe, .si-video-frame video { width: 100%; height: 100%; border: 0; display: block; }
.si-video-soon { color: white; font: 700 22px montserrat, sans-serif; margin: 0; }
.si-video-close {
	position: absolute;
	top: -22px;
	right: -22px;
	width: 44px;
	height: 44px;
	border: 3px solid black;
	border-radius: 50%;
	background: white;
	color: var(--ink);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.si-video-close:focus-visible { outline: 3px solid var(--die-yellow); outline-offset: 2px; }
.si-video-play {
	width: 100%;
	height: 100%;
	border: 0;
	padding: 0;
	background: black center / cover no-repeat;
	cursor: pointer;
	position: relative;
}
.si-video-play::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0;
	height: 0;
	transform: translate(-35%, -50%);
	border-style: solid;
	border-width: 30px 0 30px 52px;
	border-color: transparent transparent transparent white;
	filter: drop-shadow(-3px 5px 0 black);
}

/* Thumbnail strip under the gallery lightbox (see gallery.js) */
.lb-thumbs {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 10px;
	display: flex;
	gap: 6px;
	max-width: 100%;
	overflow-x: auto;
	padding: 8px 16px;
	box-sizing: border-box;
	scrollbar-width: thin;
}
.lb-thumbs::before, .lb-thumbs::after {
	content: "";
	margin: auto;
}
.lb-thumb {
	flex: 0 0 auto;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 3px;
	background: none;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.2s;
}
.lb-thumb img {
	display: block;
	width: 96px;
	height: 54px;
	object-fit: cover;
	border-radius: 1px;
}
.lb-thumb:hover, .lb-thumb:focus-visible {
	opacity: 0.9;
}
.lb-thumb.active {
	opacity: 1;
	border-color: white;
}
@media only screen and (max-width: 600px) {
	.lb-thumb img {
		width: 64px;
		height: 36px;
	}
}
