/* The look of the three standalone pages — privacy, imprint, install. They are plain HTML
   served straight off the host rather than part of the app bundle, so they share a file
   instead of a build step. The app itself uses src/style.css and nothing from here. */
:root {
	color-scheme: dark light;
	/* The same column the app's start screen caps its top row to (src/style.css `--page-w`), so the
	   language control and the gear sit in one place across the whole site. */
	--page-w: 44rem;
}
body {
	margin: 0 auto;
	max-width: var(--page-w);
	/* 1.5rem, not 2.5: the header row now carries the top of the page, and 40px above it read as
	   the page not having started yet. */
	padding: 1.5rem 1.25rem 2.75rem;
	font:
		16px / 1.6 -apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		sans-serif;
	background: #0d3b2c;
	color: #f4ecd8;
}
h1 {
	font-size: 1.6rem;
	margin: 0 0 0.25rem;
}
h2 {
	font-size: 1.1rem;
	margin: 2.5rem 0 0.5rem;
	color: #d8a94a;
}
h3 {
	font-size: 1rem;
	margin: 1.75rem 0 0.25rem;
}
p,
li {
	margin: 0.75rem 0;
}
a {
	color: #d8a94a;
}
code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.95em;
}
strong {
	color: #fff;
}
/* install.html only, and small enough to keep with the rest. */
.cta {
	display: inline-block;
	margin: 0.5rem 0;
	padding: 0.7rem 1.2rem;
	border-radius: 0.6rem;
	background: #d8a94a;
	color: #10201a;
	font-weight: 700;
	text-decoration: none;
	transition:
		background 0.15s ease,
		transform 0.08s ease;
}
.quiet {
	opacity: 0.75;
	font-size: 0.95em;
}

/* The header on every generated page: a back chevron and the wordmark, one link, no label saying
   "home" — the chevron and the mark say it. These pages had no way back at all before; the
   browser's back button is nothing to somebody who arrived from a shared link. */
.pagebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 1.5rem;
}
.pagehead {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	/* 44px of height including the padding, since this is the page's one navigation control. */
	padding: 10px 10px 10px 0;
	color: #f4ecd8;
	text-decoration: none;
}
.pagehead-back {
	flex: 0 0 auto;
	opacity: 0.7;
}
.pagehead:hover .pagehead-back {
	opacity: 1;
}
/* The wordmark is an SVG whose M *is* the app's mark, so it scales as one thing. */
.pagehead-word svg {
	display: block;
	height: 28px;
	width: auto;
}
/* A real link to the other language's URL, not a toggle: that is what a crawler follows and what
   a reader can bookmark. The globe is here because "English" on a page somebody cannot read is
   not obviously a language control. */
.langpick {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 0;
	color: #d8a94a;
	text-decoration: none;
	font-size: 0.9rem;
	white-space: nowrap;
}
.langpick:hover {
	text-decoration: underline;
}
.langpick .globe {
	flex: 0 0 auto;
	opacity: 0.8;
}

/* One quiet document index. Home and language already live in the header, so repeating either
   down here would turn the footer into a second toolbar. The current page keeps its place in the
   row but is text rather than a self-link, which makes the layout stable across all five pages. */
.updated {
	margin: 3rem 0 0;
	color: #f4ecd899;
	font-size: 0.85rem;
}
.pagefoot {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid rgb(244 236 216 / 0.13);
	font-size: 0.85rem;
}
.updated + .pagefoot {
	margin-top: 0.75rem;
}
.pagefoot ul {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pagefoot li {
	display: inline-flex;
	align-items: center;
	margin: 0;
	color: #f4ecd899;
}
.pagefoot li:not(:last-child):not(.pagefoot-break)::after {
	content: "·";
	margin: 0 0.25rem;
	opacity: 0.5;
}
.pagefoot-break {
	display: none;
}
.pagefoot a,
.pagefoot [aria-current="page"] {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.25rem;
}
.pagefoot a {
	color: #d8a94acc;
	text-decoration: none;
}
.pagefoot [aria-current="page"] {
	color: #f4ecd8;
	opacity: 0.72;
}

@media (max-width: 34rem) {
	/* Keep either half together: three useful pages, then the two legal pages. Letting flex choose
	   on text width left "Impressum" alone on a second line at common phone widths. */
	.pagefoot-break {
		display: block;
		flex: 0 0 100%;
		height: 0;
	}
	.pagefoot li:nth-child(3)::after {
		display: none;
	}
}

/* These pages are read on a desktop as often as on a phone — the privacy policy in particular is
   opened from the Play listing in a browser. Guarded on a real pointer, because a touch browser
   paints a tap as a hover and leaves it there. */
@media (hover: hover) and (pointer: fine) {
	a:hover {
		color: #f0cd7c;
	}
	.cta:hover {
		background: #e8bd60;
		color: #10201a;
		transform: translateY(-1px);
	}
}

/* ---------------------------------------------------------------------------------------------
   /info's figures. Scoped to their own classes because this stylesheet is shared with privacy,
   imprint, install and rules, none of which has a picture on it.

   The artwork is the app's own card SVG, inlined at build time by vite.config.ts — so these rules
   size and arrange it and nothing else. Everything degrades to "all of it visible, stacked" with
   JavaScript off: the explorers only fold once page.js has marked the document, which is the same
   rule the language sections already follow. A legal page that needs JS to be read is broken; a
   page ABOUT a card game is no different.
   --------------------------------------------------------------------------------------------- */
.info-card {
	margin: 0;
	width: 132px;
	flex: 0 0 auto;
}
.info-card svg {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
	box-shadow: 0 6px 18px rgb(0 0 0 / 0.35);
}

/* The trailer. Self-hosted rather than a YouTube embed: an embed sets cookies, and the privacy
   page promises none. `preload="none"` keeps its 2.8 MB off the wire until somebody presses play. */
.info-video {
	margin: 1.25rem 0 0.5rem;
}
.info-video video {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 10px;
	box-shadow: 0 6px 18px rgb(0 0 0 / 0.35);
	background: #0d3b2c;
}
.info-video figcaption {
	margin-top: 0.4rem;
	text-align: center;
}

/* The opening spread. Overlapped and tilted, because a row of three upright cards reads as a
   product shot and a fan reads as a hand somebody is holding. */
.info-fan {
	display: flex;
	justify-content: center;
	padding: 1.5rem 0 0.5rem;
}
.info-fan .info-card {
	width: 116px;
}
.info-fan .fan-a {
	transform: rotate(-9deg) translateY(6px);
}
.info-fan .fan-b {
	margin: 0 -22px;
	z-index: 1;
}
.info-fan .fan-c {
	transform: rotate(9deg) translateY(6px);
}

.info-explorer {
	margin: 1.25rem 0;
}
.info-suits {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.info-suit {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	/* 44px, the same floor the app holds every target to. */
	min-height: 44px;
	padding: 0.4rem 0.75rem;
	font: inherit;
	color: inherit;
	background: rgb(255 255 255 / 0.06);
	border: 1px solid rgb(216 169 74 / 0.35);
	border-radius: 4px;
	cursor: pointer;
}
.info-suit[aria-expanded="true"] {
	background: rgb(216 169 74 / 0.16);
	border-color: #d8a94a;
}
.info-suit:focus-visible,
.info-deckbtn:focus-visible {
	outline: 2px solid #d8a94a;
	outline-offset: 2px;
}
.info-sign svg {
	width: 22px;
	height: 22px;
	display: block;
}
.info-panel {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	margin-top: 1rem;
}
.info-panel-text p {
	margin: 0 0 0.5rem;
}
.info-cast {
	color: #cbbe9d;
	font-size: 0.9rem;
}

.info-pair {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 0.5rem 0;
}
.info-toggle {
	display: flex;
	gap: 0.5rem;
	margin: 0.5rem 0;
}
.info-deckbtn {
	min-width: 56px;
	min-height: 44px;
	font: inherit;
	color: inherit;
	background: rgb(255 255 255 / 0.06);
	border: 1px solid rgb(216 169 74 / 0.35);
	border-radius: 4px;
	cursor: pointer;
}
.info-deckbtn[aria-pressed="true"] {
	background: rgb(216 169 74 / 0.16);
	border-color: #d8a94a;
}

/* WITH JavaScript: fold the explorers down to one panel at a time. Without it, every rule above
   still applies and every panel stays on the page — which is why this lives behind `.js` rather
   than the panels being hidden by default and revealed. */
.js .info-explorer .info-panel[hidden],
.js .info-explorer .info-deck-note[hidden] {
	display: none;
}
.info-six {
	transition: opacity 0.2s ease;
}
.js .info-explorer[data-deck="33"] .info-six {
	opacity: 0.25;
}

@media (max-width: 30rem) {
	.info-panel {
		flex-wrap: wrap;
	}
	.info-fan .info-card {
		width: 96px;
	}
}

/* /install's three phones. Drawn from the app's own card code (see [[FIG:phones]] in
   vite.config.ts), so they cannot go stale against the real felt the way a screenshot does — and
   they add no bitmap to a page that release.sh strips out of the APK anyway. */
.ph-row {
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
	margin: 1.75rem 0 0.5rem;
}
.ph {
	margin: 0;
	width: 150px;
	flex: 0 0 auto;
}
.ph-screen {
	position: relative;
	height: 266px;
	border: 7px solid #1d2621;
	border-radius: 22px;
	background: radial-gradient(120% 90% at 50% 0%, #17513c 0%, #0d3b2c 45%, #07271e 100%);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
	overflow: hidden;
}
.ph figcaption {
	margin: 0.5rem 0 0;
	font-size: 0.8rem;
	opacity: 0.75;
	text-align: center;
}
.ph-card svg {
	display: block;
	width: 100%;
	height: auto;
}
/* The hand: a fan at the bottom edge, the way the app draws it. */
.ph-hand {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	display: flex;
	justify-content: center;
	align-items: flex-end;
}
.ph-hand .ph-card {
	width: 50px;
}
.ph-card-0 {
	transform: rotate(-11deg) translateY(6px);
}
.ph-card-1 {
	margin: 0 -12px;
	transform: translateY(-4px);
	z-index: 1;
}
.ph-card-2 {
	transform: rotate(11deg) translateY(6px);
}
/* The trick: two cards met in the middle, with the line the app puts under a finished one. */
.ph-trick {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ph-trick .ph-card {
	width: 56px;
}
.ph-t-0 {
	transform: rotate(-8deg) translateX(10px);
}
.ph-t-1 {
	transform: rotate(9deg) translateX(-10px);
}
.ph-note {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 14px;
	padding: 7px 0;
	border: 1px solid rgba(216, 169, 74, 0.35);
	border-radius: 9px;
	font-size: 0.65rem;
	color: #d8a94a;
	text-align: center;
}
.ph-single {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ph-single svg {
	display: block;
	width: 74px;
	height: auto;
	transform: rotate(-5deg);
}

@media (max-width: 30rem) {
	/* Three 308px phone figures stacked to 953px and pushed the first useful install heading below
	   y=1400 on a 320px screen. The instructions now precede them; the pictures share one row that
	   can be swiped instead of consuming another screen and a half vertically. This override lives
	   after the base phone rules so `flex-wrap: wrap` cannot silently win in the cascade. */
	.ph-row {
		justify-content: flex-start;
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		overscroll-behavior-inline: contain;
		padding: 0 1rem 0.75rem;
		margin-right: -1.25rem;
		margin-left: -1.25rem;
	}
	.ph {
		scroll-snap-align: center;
	}
}
