/* ==========================================================
   JULKLAPPSSPELET — GAME FOUNDATION 1.0
   Mobile first.
   ========================================================== */

html:has(.jks-game-page),
body.jks-game-page {
	margin: 0;
	min-height: 100%;
	background: #17372f;
}

body.jks-game-page {
	min-height: 100svh;
	color: #f6efe4;
	font-family: var(--jks-sans, system-ui, sans-serif);
	-webkit-font-smoothing: antialiased;
}

body.jks-game-page * {
	box-sizing: border-box;
}

body.jks-game-page button {
	font: inherit;
}

.jks-game {
	--game-green: #17372f;
	--game-green-deep: #102a24;
	--game-cream: #f6efe4;
	--game-muted: rgba(246,239,228,.68);
	--game-gold: #d7b56d;
	--game-line: rgba(246,239,228,.15);

	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 100svh;
	overflow: hidden;
	background:
		radial-gradient(
			circle at 50% 4%,
			rgba(255,255,255,.055),
			transparent 31rem
		),
		var(--game-green);
}

.jks-game-topbar {
	position: relative;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding:
		max(1.1rem, env(safe-area-inset-top))
		1.2rem
		.8rem;
}

.jks-game-brand {
	color: var(--game-cream);
	font-size: .72rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .18em;
	text-decoration: none;
}

.jks-game-help {
	display: grid;
	place-items: center;
	width: 2.35rem;
	height: 2.35rem;
	padding: 0;
	border: 1px solid var(--game-line);
	border-radius: 50%;
	background: rgba(255,255,255,.025);
	color: var(--game-cream);
	cursor: pointer;
}

.jks-game-stage {
	position: relative;
	display: flex;
	flex: 1;
	width: 100%;
}

.jks-game-screen {
	width: 100%;
	min-height: 100%;
	padding: 1rem 1.25rem 2rem;
}

.jks-game-screen[hidden] {
	display: none !important;
}

.jks-game-screen.is-active {
	display: flex;
	flex-direction: column;
	animation: jksGameIn .36s ease both;
}

@keyframes jksGameIn {
	from {
		opacity: 0;
		transform: translateY(7px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.jks-game-copy {
	width: 100%;
	max-width: 31rem;
	margin: auto;
}

.jks-game-eyebrow {
	display: block;
	margin: 0 0 .8rem;
	color: var(--game-gold);
	font-size: .69rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .17em;
	text-transform: uppercase;
}

.jks-game h1,
.jks-game h2 {
	margin: 0;
	color: var(--game-cream);
	font-family: var(--jks-serif, Georgia, serif);
	font-weight: 400;
	letter-spacing: -.035em;
	text-wrap: balance;
}

.jks-game h1 {
	max-width: 7ch;
	font-size: clamp(3.65rem, 17vw, 5.6rem);
	line-height: .89;
}

.jks-game h2 {
	max-width: 9ch;
	font-size: clamp(3rem, 13vw, 4.5rem);
	line-height: .92;
}

.jks-game-lead {
	max-width: 29rem;
	margin: 1.4rem 0 0;
	color: var(--game-muted);
	font-size: 1.04rem;
	line-height: 1.58;
}

.jks-game-lead--small {
	font-size: .94rem;
}

.jks-game-primary,
.jks-game-secondary {
	width: 100%;
	min-height: 3.75rem;
	margin-top: 2rem;
	border-radius: .2rem;
	cursor: pointer;
	transition:
		transform .18s ease,
		background-color .18s ease;
}

.jks-game-primary:active,
.jks-game-secondary:active {
	transform: scale(.985);
}

.jks-game-primary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .9rem 1.05rem .9rem 1.2rem;
	border: 0;
	background: var(--game-cream);
	color: var(--game-green-deep);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .075em;
	text-transform: uppercase;
}

.jks-game-primary i {
	font-size: 1.35rem;
	font-style: normal;
	font-weight: 400;
}

.jks-game-secondary {
	padding: .9rem 1rem;
	border: 1px solid var(--game-line);
	background: transparent;
	color: var(--game-cream);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.jks-game-microcopy {
	margin: .8rem 0 0;
	color: rgba(246,239,228,.48);
	font-size: .74rem;
	text-align: center;
}


/* START ART */

.jks-game-screen--start {
	justify-content: center;
}

.jks-game-start-art {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: auto auto 1.7rem;
	padding-top: 1rem;
}

.jks-game-die-mark {
	position: relative;
	width: clamp(7.2rem, 31vw, 9rem);
	aspect-ratio: 1;
	border: 1px solid rgba(246,239,228,.25);
	border-radius: 1.55rem;
	transform: rotate(8deg);
	box-shadow:
		0 1.5rem 4rem rgba(0,0,0,.12),
		inset 0 0 0 1px rgba(255,255,255,.025);
}

.jks-game-die-mark span {
	position: absolute;
	width: .72rem;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--game-gold);
}

.jks-game-die-mark span:nth-child(1) {
	top: 22%;
	left: 22%;
}

.jks-game-die-mark span:nth-child(2) {
	top: 22%;
	right: 22%;
}

.jks-game-die-mark span:nth-child(3) {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.jks-game-die-mark span:nth-child(4) {
	left: 22%;
	bottom: 22%;
}

.jks-game-die-mark span:nth-child(5) {
	right: 22%;
	bottom: 22%;
}


/* PROGRESS */

.jks-game-progress {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 31rem;
	margin: 0 auto 2rem;
	padding-bottom: .85rem;
	border-bottom: 1px solid var(--game-line);
	color: var(--game-muted);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.jks-game-progress small {
	font: inherit;
	color: var(--game-gold);
}


/* PLAYER PICKER */

.jks-player-picker {
	display: grid;
	grid-template-columns: 3.4rem 1fr 3.4rem;
	align-items: center;
	gap: .75rem;
	margin-top: 2rem;
	padding: 1rem;
	border: 1px solid var(--game-line);
	background: rgba(255,255,255,.025);
}

.jks-player-picker button {
	display: grid;
	place-items: center;
	width: 3.4rem;
	height: 3.4rem;
	padding: 0;
	border: 1px solid var(--game-line);
	border-radius: 50%;
	background: transparent;
	color: var(--game-cream);
	font-size: 1.7rem;
	cursor: pointer;
}

.jks-player-picker__value {
	text-align: center;
}

.jks-player-picker__value strong {
	display: block;
	color: var(--game-cream);
	font-family: var(--jks-serif, Georgia, serif);
	font-size: 3.1rem;
	font-weight: 400;
	line-height: .9;
}

.jks-player-picker__value span {
	display: block;
	margin-top: .45rem;
	color: var(--game-muted);
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}


/* CHOICES */

.jks-choice-grid,
.jks-choice-stack {
	display: grid;
	gap: .7rem;
	margin-top: 2rem;
}

.jks-choice-grid {
	grid-template-columns: 1fr 1fr;
}

.jks-choice {
	position: relative;
	min-height: 6.8rem;
	padding: 1rem;
	border: 1px solid var(--game-line);
	border-radius: .2rem;
	background: rgba(255,255,255,.018);
	color: var(--game-cream);
	text-align: left;
	cursor: pointer;
}

.jks-choice strong,
.jks-choice span {
	display: block;
}

.jks-choice strong {
	font-family: var(--jks-serif, Georgia, serif);
	font-size: 1.3rem;
	font-weight: 400;
	line-height: 1.1;
}

.jks-choice span {
	margin-top: .55rem;
	color: var(--game-muted);
	font-size: .76rem;
	line-height: 1.4;
}

.jks-choice em {
	display: inline-block;
	margin: 0 0 .65rem;
	color: var(--game-gold);
	font-size: .58rem;
	font-style: normal;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.jks-choice.is-selected {
	border-color: rgba(215,181,109,.78);
	background: rgba(215,181,109,.08);
	box-shadow: inset 0 0 0 1px rgba(215,181,109,.13);
}

.jks-choice.is-selected::after {
	content: "✓";
	position: absolute;
	top: .65rem;
	right: .7rem;
	color: var(--game-gold);
	font-size: .8rem;
}


/* SUMMARY */

.jks-game-summary-card {
	margin-top: 2rem;
	border-top: 1px solid var(--game-line);
}

.jks-game-summary-card > div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--game-line);
}

.jks-game-summary-card span {
	color: var(--game-muted);
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.jks-game-summary-card strong {
	color: var(--game-cream);
	font-family: var(--jks-serif, Georgia, serif);
	font-size: 1.05rem;
	font-weight: 400;
	text-align: right;
}


/* FOOTER */

.jks-game-footer {
	padding:
		.6rem
		1.25rem
		max(1rem, env(safe-area-inset-bottom));
	color: rgba(246,239,228,.28);
	font-size: .62rem;
	letter-spacing: .12em;
	text-align: center;
	text-transform: uppercase;
}


/* TABLET / DESKTOP */

@media (min-width: 769px) {

	.jks-game-topbar {
		padding: 1.5rem 2rem;
	}

	.jks-game-screen {
		padding: 2rem;
	}

	.jks-game-copy,
	.jks-game-progress {
		max-width: 34rem;
	}

	.jks-game h1 {
		font-size: clamp(4.8rem, 7vw, 6.5rem);
	}

	.jks-game h2 {
		font-size: clamp(4rem, 6vw, 5.3rem);
	}

	.jks-game-primary {
		max-width: 25rem;
	}

	.jks-choice:hover {
		border-color: rgba(215,181,109,.55);
	}

	.jks-game-primary:hover {
		background: #fffaf2;
	}
}


/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

	.jks-game-screen.is-active {
		animation: none;
	}

	.jks-game-primary,
	.jks-game-secondary {
		transition: none;
	}
}


/* ==========================================================
   GAME ENGINE 1.0 — PLAY MODE
   ========================================================== */

.jks-game-screen--play.is-active {
	justify-content: space-between;
}

.jks-play-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	max-width: 31rem;
	margin: 1rem auto 0;
}

.jks-play-top h2 {
	max-width: 7ch;
}

.jks-roll-counter {
	flex: 0 0 auto;
	margin-top: .15rem;
	padding: .55rem .7rem;
	border: 1px solid var(--game-line);
	color: var(--game-muted);
	font-size: .66rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.jks-dice-area {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 31rem;
	margin: auto;
	padding: 1.5rem 0;
}

.jks-die {
	position: relative;
	display: block;
	width: clamp(9rem, 42vw, 12rem);
	aspect-ratio: 1;
	padding: 0;
	border: 0;
	border-radius: 1.55rem;
	background: #f6efe4;
	box-shadow:
		0 1.5rem 4rem rgba(0,0,0,.22),
		0 .2rem .4rem rgba(0,0,0,.14);
	cursor: pointer;
	transform: rotate(-3deg);
	transition: transform .18s ease;
}

.jks-die:active {
	transform: rotate(3deg) scale(.96);
}

.jks-die.is-rolling {
	animation: jksDiceRoll .42s cubic-bezier(.2,.8,.2,1);
}

@keyframes jksDiceRoll {
	0%   { transform: rotate(-3deg) scale(1); }
	30%  { transform: rotate(13deg) scale(.92); }
	65%  { transform: rotate(-10deg) scale(1.04); }
	100% { transform: rotate(-3deg) scale(1); }
}

.jks-die-face {
	position: absolute;
	inset: 0;
}

.jks-die .pip {
	position: absolute;
	display: none;
	width: 13%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: #17372f;
	transform: translate(-50%, -50%);
}

.jks-die .p1 { left: 25%; top: 25%; }
.jks-die .p2 { left: 75%; top: 25%; }
.jks-die .p3 { left: 25%; top: 50%; }
.jks-die .p4 { left: 50%; top: 50%; }
.jks-die .p5 { left: 75%; top: 50%; }
.jks-die .p6 { left: 25%; top: 75%; }
.jks-die .p7 { left: 75%; top: 75%; }


/* Correct deterministic pip layouts */

.jks-die-face[data-jks-die-face="1"] .p4 {
	display: block;
}

.jks-die-face[data-jks-die-face="2"] .p1,
.jks-die-face[data-jks-die-face="2"] .p7 {
	display: block;
}

.jks-die-face[data-jks-die-face="3"] .p1,
.jks-die-face[data-jks-die-face="3"] .p4,
.jks-die-face[data-jks-die-face="3"] .p7 {
	display: block;
}

.jks-die-face[data-jks-die-face="4"] .p1,
.jks-die-face[data-jks-die-face="4"] .p2,
.jks-die-face[data-jks-die-face="4"] .p6,
.jks-die-face[data-jks-die-face="4"] .p7 {
	display: block;
}

.jks-die-face[data-jks-die-face="5"] .p1,
.jks-die-face[data-jks-die-face="5"] .p2,
.jks-die-face[data-jks-die-face="5"] .p4,
.jks-die-face[data-jks-die-face="5"] .p6,
.jks-die-face[data-jks-die-face="5"] .p7 {
	display: block;
}

.jks-die-face[data-jks-die-face="6"] .p1,
.jks-die-face[data-jks-die-face="6"] .p2,
.jks-die-face[data-jks-die-face="6"] .p3,
.jks-die-face[data-jks-die-face="6"] .p5,
.jks-die-face[data-jks-die-face="6"] .p6,
.jks-die-face[data-jks-die-face="6"] .p7 {
	display: block;
}

.jks-roll-result {
	margin: 1.4rem 0 0;
	color: var(--game-cream);
	font-family: var(--jks-serif, Georgia, serif);
	font-size: 1.35rem;
	line-height: 1.2;
}

.jks-roll-button {
	margin-top: 1.2rem;
}

.jks-play-rule {
	width: 100%;
	max-width: 31rem;
	margin: 0 auto 1rem;
	padding: 1rem 0;
	border-top: 1px solid var(--game-line);
	border-bottom: 1px solid var(--game-line);
}

.jks-play-rule span,
.jks-play-rule strong {
	display: block;
}

.jks-play-rule span {
	margin-bottom: .4rem;
	color: var(--game-gold);
	font-size: .62rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.jks-play-rule strong {
	color: var(--game-cream);
	font-family: var(--jks-serif, Georgia, serif);
	font-size: 1.15rem;
	font-weight: 400;
	line-height: 1.35;
}

@media (min-width: 769px) {

	.jks-play-top,
	.jks-dice-area,
	.jks-play-rule {
		max-width: 34rem;
	}

	.jks-die {
		width: 11rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jks-die.is-rolling {
		animation: none;
	}
}


/* ==========================================================
   COMPLETE GAME JOURNEY 1.0
   ========================================================== */

.jks-phase-badge {
	flex: 0 0 auto;
	margin-top: .15rem;
	padding: .55rem .7rem;
	border: 1px solid var(--game-line);
	color: var(--game-muted);
	font-size: .62rem;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.jks-action {
	width: 100%;
	margin-top: 1.4rem;
	text-align: center;
}

.jks-action > span,
.jks-action > strong,
.jks-action > p {
	display: block;
}

.jks-action > span {
	color: var(--game-gold);
	font-size: .68rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.jks-action > strong {
	margin-top: .4rem;
	color: var(--game-cream);
	font-family: var(--jks-serif, Georgia, serif);
	font-size: clamp(1.65rem, 7vw, 2.15rem);
	font-weight: 400;
	line-height: 1.05;
	text-wrap: balance;
}

.jks-action > p {
	max-width: 25rem;
	margin: .55rem auto 0;
	color: var(--game-muted);
	font-size: .88rem;
	line-height: 1.45;
}

.jks-round-complete {
	max-width: 31rem;
	margin: 0 auto;
}

.jks-game-screen--transition.is-active,
.jks-game-screen--finish.is-active {
	justify-content: center;
}

.jks-transition-copy,
.jks-finish-copy {
	margin-top: auto;
	margin-bottom: auto;
}

.jks-timer-setup {
	margin-top: 2rem;
	padding: 1.15rem 0;
	border-top: 1px solid var(--game-line);
	border-bottom: 1px solid var(--game-line);
}

.jks-timer-setup > span {
	display: block;
	color: var(--game-gold);
	font-size: .65rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.jks-timer-setup > small {
	display: block;
	margin-top: .7rem;
	color: var(--game-muted);
	font-size: .74rem;
	text-align: center;
}

.jks-timer-picker {
	display: grid;
	grid-template-columns: 3.3rem 1fr 3.3rem;
	align-items: center;
	gap: 1rem;
	margin-top: .8rem;
}

.jks-timer-picker button {
	display: grid;
	place-items: center;
	width: 3.3rem;
	height: 3.3rem;
	padding: 0;
	border: 1px solid var(--game-line);
	border-radius: 50%;
	background: transparent;
	color: var(--game-cream);
	font-size: 1.55rem;
	cursor: pointer;
}

.jks-timer-picker strong {
	color: var(--game-cream);
	font-family: var(--jks-serif, Georgia, serif);
	font-size: 3.4rem;
	font-weight: 400;
	line-height: 1;
	text-align: center;
}

.jks-timer-picker strong small {
	margin-left: .15rem;
	color: var(--game-muted);
	font-family: var(--jks-sans, system-ui, sans-serif);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.jks-live-timer {
	flex: 0 0 auto;
	color: var(--game-gold);
	font-family: var(--jks-serif, Georgia, serif);
	font-size: clamp(1.65rem, 8vw, 2.4rem);
	font-variant-numeric: tabular-nums;
	line-height: 1;
	letter-spacing: -.025em;
}

.jks-timer-toggle {
	display: block;
	width: auto;
	margin: 0 auto;
	padding: .7rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--game-line);
	background: transparent;
	color: var(--game-muted);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
}

.jks-finish-mark {
	margin: 0 0 1.1rem;
	color: var(--game-gold);
	font-size: 2rem;
}

.jks-finish-summary {
	margin-top: 1.7rem;
	padding: .9rem 0;
	border-top: 1px solid var(--game-line);
	border-bottom: 1px solid var(--game-line);
	color: var(--game-muted);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.jks-game-home-link {
	display: block;
	margin-top: 1.25rem;
	color: var(--game-muted);
	font-size: .72rem;
	text-align: center;
	text-decoration: underline;
	text-decoration-color: rgba(246,239,228,.25);
	text-underline-offset: .25rem;
}

@media (min-width: 769px) {

	.jks-round-complete {
		max-width: 34rem;
	}

	.jks-action > strong {
		font-size: 2.05rem;
	}
}


/* ==========================================================
   ENDGAME GIFT CHECK 1.0
   ========================================================== */

.jks-game-screen--gift-check.is-active,
.jks-game-screen--rebalance.is-active {
	justify-content: center;
}

.jks-endgame-copy {
	width: 100%;
	max-width: 34rem;
	margin-top: auto;
	margin-bottom: auto;
}

.jks-endgame-mark {
	margin: 0 0 1rem;
	color: var(--game-gold);
	font-size: 1.75rem;
	line-height: 1;
}

.jks-endgame-copy h2 {
	text-wrap: balance;
}

.jks-endgame-actions {
	display: grid;
	gap: .75rem;
	margin-top: 2rem;
}

.jks-endgame-actions .jks-game-primary,
.jks-endgame-actions .jks-game-secondary {
	width: 100%;
}

.jks-endgame-note {
	max-width: 27rem;
	margin: 1.15rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--game-line);
	color: var(--game-muted);
	font-size: .78rem;
	line-height: 1.55;
}

.jks-game-screen--rebalance .jks-game-primary {
	margin-top: 2rem;
}

@media (max-width: 480px) {

	.jks-endgame-copy {
		max-width: 100%;
	}

	.jks-endgame-actions {
		margin-top: 1.65rem;
	}
}

/* ==========================================================
   CONTEXT HELP 1.0
   ========================================================== */

body.jks-help-open {
	overflow: hidden;
}

.jks-help-overlay[hidden] {
	display: none !important;
}

.jks-help-overlay {
	position: fixed;
	z-index: 99999;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.jks-help-backdrop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: rgba(4, 13, 11, .72);
	opacity: 0;
	transition: opacity .22s ease;
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.jks-help-sheet {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: min(78vh, 46rem);
	padding: .65rem 1.2rem max(1.15rem, env(safe-area-inset-bottom));
	border: 1px solid rgba(246, 239, 228, .13);
	border-bottom: 0;
	border-radius: 1.35rem 1.35rem 0 0;
	background: #0c1d19;
	box-shadow: 0 -1.5rem 4rem rgba(0, 0, 0, .28);
	transform: translateY(102%);
	transition: transform .24s cubic-bezier(.2,.8,.2,1);
}

.jks-help-overlay.is-open .jks-help-backdrop {
	opacity: 1;
}

.jks-help-overlay.is-open .jks-help-sheet {
	transform: translateY(0);
}

.jks-help-handle {
	width: 2.6rem;
	height: .22rem;
	margin: 0 auto .85rem;
	border-radius: 99px;
	background: rgba(246, 239, 228, .22);
}

.jks-help-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--game-line);
}

.jks-help-header h2 {
	max-width: 16rem;
	margin: .28rem 0 0;
	color: var(--game-cream);
	font-family: var(--jks-serif, Georgia, serif);
	font-size: clamp(1.75rem, 8vw, 2.35rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: -.025em;
}

.jks-help-close {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 2.55rem;
	height: 2.55rem;
	padding: 0;
	border: 1px solid var(--game-line);
	border-radius: 50%;
	background: transparent;
	color: var(--game-cream);
	font-size: 1.45rem;
	cursor: pointer;
}

.jks-help-body {
	min-height: 0;
	padding: 1.2rem 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.jks-help-intro {
	max-width: 28rem;
	margin: 0;
	color: var(--game-cream);
	font-size: .96rem;
	line-height: 1.55;
}

.jks-help-rule {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .65rem .9rem;
	margin-top: 1.35rem;
	padding-top: 1.15rem;
	border-top: 1px solid var(--game-line);
}

.jks-help-rule strong {
	color: var(--game-gold);
	font-size: .72rem;
	font-weight: 800;
	line-height: 1.45;
	letter-spacing: .055em;
	text-transform: uppercase;
}

.jks-help-rule span {
	color: var(--game-muted);
	font-size: .82rem;
	line-height: 1.5;
}

.jks-help-meta {
	margin-top: 1.15rem;
	padding: .9rem 1rem;
	border: 1px solid rgba(207, 176, 112, .22);
	background: rgba(207, 176, 112, .055);
	color: var(--game-cream);
	font-size: .78rem;
	line-height: 1.5;
}

.jks-help-meta b {
	color: var(--game-gold);
	font-variant-numeric: tabular-nums;
}

.jks-help-done {
	width: 100%;
	min-height: 3.3rem;
	padding: .8rem 1rem;
	border: 1px solid rgba(207, 176, 112, .45);
	background: transparent;
	color: var(--game-cream);
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
}

@media (min-width: 769px) {
	.jks-help-overlay {
		align-items: center;
		padding: 2rem;
	}

	.jks-help-sheet {
		max-width: 34rem;
		max-height: min(80vh, 44rem);
		border-bottom: 1px solid rgba(246, 239, 228, .13);
		border-radius: 1.35rem;
		transform: translateY(1.5rem) scale(.985);
		opacity: 0;
		transition:
			transform .22s cubic-bezier(.2,.8,.2,1),
			opacity .18s ease;
	}

	.jks-help-overlay.is-open .jks-help-sheet {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jks-help-backdrop,
	.jks-help-sheet {
		transition: none;
	}
}
