/* =============================================================================
   The Elysian Fold: a reading table, the deck and its history.

   The table is a dark cloth inside a gold double rule with stepped corners, the
   way a deco card case is lined. Cards are 1186 by 2048, the deck's own
   proportion. Gold marks what can be done next; the cold teal marks XIII and
   whatever has the keyboard's attention, as everywhere else on the site.
   ========================================================================== */

.fold {
	--card-ratio: 1186 / 2048;
	/* The art's own corner, as a share of its width and height. The pale rim
	   round each picture is cropped by the scale below and clipped by this. */
	--card-round: 5.2% / 3%;
	--card-crop: scale(1.024);
	--teal: var(--eldritch);
	max-width: 76rem;
	margin: 0 auto;
	padding: 0 clamp(1rem, 4vw, 3rem) clamp(4rem, 10vw, 8rem);
}

/* ----------------------------------------------------------------- hero -- */

.fold-jump {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem 2rem;
	margin-top: 2rem;
}

.fold-jump a {
	color: var(--bone-dim);
	font-family: var(--f-mark);
	font-size: 0.56rem;
	letter-spacing: 0.26em;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.3s ease;
}

.fold-jump a::before {
	content: '';
	display: inline-block;
	width: 5px;
	height: 5px;
	margin-right: 0.8em;
	border: 1px solid var(--gold-lo);
	transform: translateY(-2px) rotate(45deg);
	transition: background 0.3s ease, border-color 0.3s ease;
}

.fold-jump a:hover,
.fold-jump a:focus-visible {
	color: var(--gold-hi);
}

.fold-jump a:hover::before,
.fold-jump a:focus-visible::before {
	background: var(--gold);
	border-color: var(--gold);
}

/* A section title between two rules that meet at a diamond. */
.fold-h2 {
	display: flex;
	align-items: center;
	gap: 1.2rem;
	margin: 0 0 1.6rem;
	color: var(--bone);
	font-family: var(--f-title);
	font-size: clamp(1.6rem, 3.6vw, 2.4rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1.1;
	text-align: center;
	text-wrap: balance;
}

.fold-h2::before,
.fold-h2::after {
	content: '';
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--hair-gold));
}

.fold-h2::after {
	background: linear-gradient(90deg, var(--hair-gold), transparent);
}

/* ---------------------------------------------------------------- table -- */

.fold-table {
	margin-top: clamp(1rem, 3vw, 2rem);
	scroll-margin-top: 80px;
}

.fold-surface {
	position: relative;
	display: grid;
	grid-template-columns: minmax(7rem, 11rem) 1fr;
	gap: clamp(1.2rem, 4vw, 3.5rem);
	align-items: center;
	padding: clamp(1.6rem, 4vw, 3.2rem) clamp(1rem, 4vw, 3.4rem);
	border: 1px solid var(--hair-gold);
	background:
		radial-gradient(ellipse 70% 90% at 50% 110%, rgba(216, 166, 84, 0.08), transparent 60%),
		repeating-conic-gradient(from -90deg at 50% 118%, rgba(216, 166, 84, 0.045) 0 1.2deg, transparent 1.2deg 7deg),
		radial-gradient(ellipse at 50% 30%, #140f22, #07050c 75%);
	box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.7), 0 30px 80px -40px rgba(42, 29, 74, 0.9);
}

/* The inner rule, with its corners stepped in twice. */
.fold-surface::before {
	content: '';
	position: absolute;
	inset: 9px;
	border: 1px solid rgba(216, 166, 84, 0.22);
	clip-path: polygon(14px 0, calc(100% - 14px) 0, calc(100% - 14px) 7px, calc(100% - 7px) 7px, calc(100% - 7px) 14px, 100% 14px, 100% calc(100% - 14px), calc(100% - 7px) calc(100% - 14px), calc(100% - 7px) calc(100% - 7px), calc(100% - 14px) calc(100% - 7px), calc(100% - 14px) 100%, 14px 100%, 14px calc(100% - 7px), 7px calc(100% - 7px), 7px calc(100% - 14px), 0 calc(100% - 14px), 0 14px, 7px 14px, 7px 7px, 14px 7px);
	pointer-events: none;
}

.fold-surface::after {
	content: '';
	position: absolute;
	inset: 9px;
	background:
		linear-gradient(var(--gold-lo), var(--gold-lo)) 7px 7px / 7px 1px no-repeat,
		linear-gradient(var(--gold-lo), var(--gold-lo)) 7px 7px / 1px 7px no-repeat,
		linear-gradient(var(--gold-lo), var(--gold-lo)) calc(100% - 7px) 7px / 7px 1px no-repeat,
		linear-gradient(var(--gold-lo), var(--gold-lo)) calc(100% - 7px) 7px / 1px 7px no-repeat,
		linear-gradient(var(--gold-lo), var(--gold-lo)) 7px calc(100% - 7px) / 7px 1px no-repeat,
		linear-gradient(var(--gold-lo), var(--gold-lo)) 7px calc(100% - 7px) / 1px 7px no-repeat,
		linear-gradient(var(--gold-lo), var(--gold-lo)) calc(100% - 7px) calc(100% - 7px) / 7px 1px no-repeat,
		linear-gradient(var(--gold-lo), var(--gold-lo)) calc(100% - 7px) calc(100% - 7px) / 1px 7px no-repeat;
	pointer-events: none;
}

/* The deck. */
.fold-deck {
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: center;
	gap: 0.8rem;
}

.fold-deck__pile {
	display: grid;
	justify-items: center;
	gap: 1rem;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: var(--gold-hi);
	cursor: pointer;
}

.fold-deck__stack {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: var(--card-ratio);
}

.fold-deck__card {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: var(--card-round);
	background: #120d0a;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.6), 0 12px 30px -10px #000;
	transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease;
}

.fold-deck__card:nth-child(1) { transform: translate(-5px, 6px) rotate(-3deg); }
.fold-deck__card:nth-child(2) { transform: translate(3px, 3px) rotate(2deg); }

.fold-deck__card img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: var(--card-crop);
}

.fold-deck__pile:hover:not(:disabled) .fold-deck__card:nth-child(3),
.fold-deck__pile:focus-visible .fold-deck__card:nth-child(3) {
	transform: translateY(-10px);
	box-shadow: 0 0 0 1px var(--gold), 0 22px 40px -12px #000, 0 0 40px -6px rgba(216, 166, 84, 0.5);
}

.fold-deck__pile:focus-visible {
	outline: none;
}

.fold-deck__pile:focus-visible .fold-deck__label {
	outline: 1px solid var(--teal);
	outline-offset: 6px;
}

.fold-deck__label {
	font-family: var(--f-title);
	font-size: 1.25rem;
	font-style: italic;
	line-height: 1.1;
}

.fold-deck__pile:disabled {
	cursor: default;
	color: var(--bone-dim);
}

.fold-deck__pile:disabled .fold-deck__stack {
	opacity: 0.55;
}

.fold-deck__count {
	white-space: nowrap;
	color: var(--bone-dim);
	font-family: var(--f-text);
	font-size: 0.95rem;
	font-style: italic;
}

/* The spread. */
.fold-spread {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.6rem, 3vw, 2.4rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.fold-slot {
	display: grid;
	grid-template-rows: auto auto 1fr;
	justify-items: center;
	gap: 0.3rem;
	text-align: center;
}

.fold-slot__numeral {
	color: var(--gold);
	font-family: var(--f-title);
	font-size: clamp(1.1rem, 2.4vw, 1.6rem);
	font-style: italic;
	line-height: 1;
}

.fold-slot__label {
	margin-bottom: 0.9rem;
	color: var(--bone);
	font-family: var(--f-mark);
	font-size: clamp(0.56rem, 1.3vw, 0.7rem);
	letter-spacing: 0.3em;
	line-height: 1.4;
	text-transform: uppercase;
}

.fold-slot__place {
	position: relative;
	width: 100%;
	max-width: 15rem;
	aspect-ratio: var(--card-ratio);
	border-radius: var(--card-round);
	/* An empty place is a faint gold outline with a diamond at its heart. */
	background:
		linear-gradient(45deg, transparent 46%, rgba(216, 166, 84, 0.25) 46% 54%, transparent 54%) center / 14px 14px no-repeat,
		linear-gradient(-45deg, transparent 46%, rgba(216, 166, 84, 0.25) 46% 54%, transparent 54%) center / 14px 14px no-repeat;
	outline: 1px dashed rgba(216, 166, 84, 0.28);
	outline-offset: -1px;
}

.fold-slot__place:has(.fold-card) {
	background: none;
	outline-color: transparent;
}

/* A card on the table: a button that turns over. */
.fold-card {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: var(--card-round);
	background: none;
	cursor: pointer;
	perspective: 1100px;
}

.fold-card__inner {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transition: transform 0.95s cubic-bezier(0.3, 0.1, 0.2, 1);
}

.fold-card.is-turned .fold-card__inner {
	transform: rotateY(180deg);
}

.has-motion .fold-card__inner {
	transition: none;
}

/* A line of light crosses the face as it settles. */
.fold-face::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 236, 190, 0.45) 48%, rgba(255, 236, 190, 0.08) 54%, transparent 62%);
	background-size: 260% 100%;
	background-position: 120% 0;
	opacity: 0;
	pointer-events: none;
	mix-blend-mode: screen;
}

.fold-card.is-glint .fold-face::after {
	animation: fold-glint 1.3s 0.75s ease-out both;
}

@keyframes fold-glint {
	0% { opacity: 1; background-position: 120% 0; }
	100% { opacity: 1; background-position: -60% 0; }
}

.fold-card.is-glint.is-thirteenth .fold-face::after {
	background-image: linear-gradient(105deg, transparent 35%, rgba(143, 224, 207, 0.5) 48%, rgba(143, 224, 207, 0.08) 54%, transparent 62%);
}

.fold-card__back,
.fold-face {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: var(--card-round);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	background: #120d0a;
	box-shadow: 0 16px 36px -14px #000;
	transition: box-shadow 0.4s ease;
}

.fold-face {
	transform: rotateY(180deg);
}

.fold-card__back img,
.fold-face img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: var(--card-crop);
}

/* The card to turn next breathes; the others wait. */
.fold-card[aria-disabled='false']:not(.is-turned) .fold-card__back {
	animation: fold-next 2.4s ease-in-out infinite;
}

@keyframes fold-next {
	50% {
		box-shadow: 0 16px 36px -14px #000, 0 0 0 1px var(--gold), 0 0 34px -4px rgba(216, 166, 84, 0.55);
	}
}

.fold-card[aria-disabled='true'] {
	cursor: default;
}

.fold-card:focus-visible {
	outline: 1px solid var(--teal);
	outline-offset: 5px;
}

.fold-card.is-turned:hover .fold-face {
	box-shadow: 0 20px 40px -14px #000, 0 0 0 1px var(--gold-hi);
}

.fold-card.is-thirteenth .fold-face {
	box-shadow: 0 16px 36px -14px #000, 0 0 0 1px var(--teal), 0 0 46px -6px rgba(143, 224, 207, 0.55);
}

/* The card art has its own title, so the overlay stays out of sight and is
   there for assistive technology and for the status line. */
.fold-face__numeral,
.fold-face__name {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	overflow: hidden;
	white-space: nowrap;
}

/* Controls under the cloth: a choice of deck and one action, in the site's
   instrument lettering at a size that reads, each in a hairline pill like the
   catalogue's chips. */
.fold-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1rem 2.4rem;
	margin-top: 1.8rem;
}

.fold-printing {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin: 0;
	padding: 0;
	border: 0;
}

.fold-choices {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--hair-gold);
	border-radius: 999px;
}

.fold-choice {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.2rem;
	border: 1px solid transparent;
	border-radius: 999px;
	color: var(--bone-dim);
	cursor: pointer;
	transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.fold-choice input {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	cursor: inherit;
}

.fold-choice span {
	font-family: var(--f-mark);
	font-size: 0.64rem;
	letter-spacing: 0.16em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.fold-choice small {
	margin-left: 0.5em;
	font-family: var(--f-text);
	font-size: 0.92rem;
	font-style: italic;
	letter-spacing: 0;
	text-transform: none;
	opacity: 0.8;
}

.fold-choice:hover {
	color: var(--bone);
}

.fold-choice:has(input:checked) {
	border-color: var(--gold);
	background: rgba(216, 166, 84, 0.12);
	color: var(--gold-hi);
}

.fold-choice:has(input[value='full']:checked) {
	border-color: var(--teal);
	background: rgba(143, 224, 207, 0.1);
	color: var(--teal);
}

.fold-choice:has(input:focus-visible) {
	outline: 1px solid var(--teal);
	outline-offset: 3px;
}

.fold-choice:has(input:disabled) {
	cursor: default;
	opacity: 0.4;
}

/* The one action under the cloth, and the viewer's steps. */
.fold-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 1.4rem;
	border: 1px solid var(--hair-gold);
	border-radius: 999px;
	background: none;
	color: var(--bone);
	font-family: var(--f-mark);
	font-size: 0.64rem;
	letter-spacing: 0.18em;
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
	transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.fold-step:hover:not(:disabled),
.fold-step:focus-visible {
	border-color: var(--gold);
	background: rgba(216, 166, 84, 0.12);
	color: var(--gold-hi);
}

.fold-step:focus-visible {
	outline: 1px solid var(--teal);
	outline-offset: 3px;
}

.fold-step:disabled {
	cursor: default;
	opacity: 0.35;
}

.fold-status {
	min-height: 1.6em;
	margin: 1.4rem 0 0;
	color: var(--bone);
	font-family: var(--f-text);
	font-size: 1.1rem;
	font-style: italic;
	text-align: center;
}

/* The reading. */
.fold-reading {
	margin-top: clamp(2rem, 5vw, 3.2rem);
	outline: none;
	animation: fold-rise 0.9s var(--ease-out) both;
}

@keyframes fold-rise {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

.fold-reading__title {
	margin: 0 0 1.6rem;
	font-style: normal;
	color: var(--gold-hi);
	font-family: var(--f-mark);
	font-size: 0.6rem;
	font-weight: 400;
	letter-spacing: 0.32em;
	text-align: center;
	text-transform: uppercase;
}

.fold-reading__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.2rem, 3vw, 2.6rem);
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: read;
}

.fold-read {
	position: relative;
	padding-top: 1.2rem;
	border-top: 1px solid var(--hair-gold);
}

.fold-read::before {
	content: '';
	position: absolute;
	top: -4px;
	left: 0;
	width: 7px;
	height: 7px;
	background: var(--gold);
	transform: rotate(45deg);
}

.fold-read.is-thirteenth {
	border-top-color: rgba(143, 224, 207, 0.5);
}

.fold-read.is-thirteenth::before {
	background: var(--teal);
}

.fold-read__position {
	display: block;
	color: var(--bone-dim);
	font-family: var(--f-mark);
	font-size: 0.62rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

.fold-read__head {
	margin: 0.5rem 0 0.3rem;
	color: var(--bone);
	font-family: var(--f-title);
	font-size: clamp(1.25rem, 2.4vw, 1.6rem);
	font-style: italic;
	line-height: 1.15;
}

.fold-read__numeral {
	color: var(--gold);
	font-style: normal;
}

.fold-read.is-thirteenth .fold-read__numeral {
	color: var(--teal);
}

.fold-read__text {
	margin: 0;
	color: var(--bone);
	font-size: 1rem;
	line-height: 1.6;
}

.fold-herald {
	max-width: 44rem;
	margin: 2.2rem auto 0;
	padding: 1rem 1.4rem;
	border: 1px solid rgba(143, 224, 207, 0.35);
	background: linear-gradient(90deg, rgba(143, 224, 207, 0.07), transparent 70%);
	color: var(--bone);
}

.fold-herald p {
	margin: 0;
}

.fold-herald strong {
	color: var(--teal);
	font-weight: 500;
}

.fold-reading__coda {
	margin: 2.2rem 0 0;
	color: var(--bone-dim);
	font-family: var(--f-title);
	font-style: italic;
	text-align: center;
}

/* ---------------------------------------------------------------- codex -- */

.fold-codex {
	margin-top: clamp(4rem, 10vw, 7rem);
	scroll-margin-top: 80px;
}

.fold-codex__lede {
	max-width: 34rem;
	text-wrap: balance;
	margin: -0.6rem auto 2.4rem;
	color: var(--bone-dim);
	font-style: italic;
	text-align: center;
}

.fold-codex__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
	gap: clamp(1.8rem, 3vw, 2.8rem) clamp(1rem, 2.4vw, 2rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.fold-entry {
	display: grid;
	align-content: start;
	scroll-margin-top: 90px;
}

.fold-entry__art {
	display: block;
	overflow: hidden;
	aspect-ratio: var(--card-ratio);
	margin-bottom: 0.9rem;
	border-radius: var(--card-round);
	background: #120d0a;
	box-shadow: 0 16px 34px -18px #000;
	transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease;
}

.fold-entry__art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: var(--card-crop);
	transition: transform 0.9s var(--ease-out), filter 0.6s ease;
	filter: saturate(0.92);
}

.fold-entry__art:hover,
.fold-entry__art:focus-visible {
	transform: translateY(-6px);
	box-shadow: 0 0 0 1px var(--gold), 0 26px 44px -18px #000, 0 0 40px -10px rgba(216, 166, 84, 0.5);
}

.fold-entry__art:hover img,
.fold-entry__art:focus-visible img {
	transform: scale(1.07);
	filter: none;
}

.fold-entry__art:focus-visible {
	outline: 1px solid var(--teal);
	outline-offset: 5px;
}

.fold-entry.is-thirteenth .fold-entry__art {
	box-shadow: 0 0 0 1px rgba(143, 224, 207, 0.5), 0 16px 34px -18px #000, 0 0 36px -12px rgba(143, 224, 207, 0.6);
}

.fold-entry__numeral {
	margin: 0;
	color: var(--gold);
	font-family: var(--f-mark);
	font-size: 0.64rem;
	letter-spacing: 0.24em;
}

.fold-entry.is-thirteenth .fold-entry__numeral {
	color: var(--teal);
}

.fold-entry.is-thirteenth .fold-entry__numeral::after {
	content: '  Full decks only';
	color: var(--bone-dim);
	white-space: pre;
}

.fold-entry__name {
	margin: 0.2rem 0 0.4rem;
	color: var(--bone);
	font-family: var(--f-title);
	font-size: 1.3rem;
	font-style: italic;
	font-weight: 400;
	line-height: 1.15;
}

.fold-entry__reading {
	margin: 0;
	color: var(--bone-dim);
	font-size: 0.92rem;
	line-height: 1.55;
}

/* ----------------------------------------------------------------- lore -- */

.fold-lore {
	margin-top: clamp(4rem, 10vw, 7rem);
	scroll-margin-top: 80px;
}

.fold-lore__columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1.6rem, 5vw, 4.5rem);
	max-width: 64rem;
	margin: 0 auto;
}

.fold-lore__part h3,
.fold-warn h3 {
	margin: 0 0 1rem;
	font-style: normal;
	color: var(--gold-hi);
	font-family: var(--f-mark);
	font-size: 0.58rem;
	font-weight: 400;
	letter-spacing: 0.3em;
	text-transform: uppercase;
}

.fold-lore__part p {
	margin: 0 0 1rem;
	color: var(--bone);
}

.fold-lore__part p:first-of-type::first-letter {
	float: left;
	margin: 0.08em 0.12em 0 0;
	color: var(--gold);
	font-family: var(--f-title);
	font-size: 3.6em;
	font-style: italic;
	line-height: 0.8;
}

.fold-lore strong {
	color: var(--gold-hi);
	font-weight: 500;
}

.fold-warn {
	position: relative;
	max-width: 46rem;
	margin: clamp(2.4rem, 6vw, 4rem) auto 0;
	padding: clamp(1.4rem, 4vw, 2.4rem) clamp(1.2rem, 4vw, 2.6rem);
	overflow: hidden;
	border: 1px solid rgba(143, 224, 207, 0.3);
	background: radial-gradient(ellipse at 100% 0, rgba(143, 224, 207, 0.08), transparent 60%), rgba(4, 3, 6, 0.6);
}

.fold-warn::after {
	content: 'XIII';
	position: absolute;
	right: -0.06em;
	bottom: -0.3em;
	color: rgba(143, 224, 207, 0.07);
	font-family: var(--f-title);
	font-size: clamp(6rem, 18vw, 11rem);
	font-style: italic;
	line-height: 1;
	pointer-events: none;
}

.fold-warn h3 {
	color: var(--teal);
}

.fold-warn p {
	position: relative;
	margin: 0 0 1rem;
}

.fold-warn p:last-child {
	margin-bottom: 0;
}

.fold-warn strong {
	color: var(--teal);
}

/* --------------------------------------------------------------- viewer -- */

.fold-dialog {
	position: fixed;
	inset: 0;
	margin: auto;
	width: min(62rem, calc(100vw - 2rem));
	height: fit-content;
	max-height: calc(100vh - 2rem);
	padding: 0;
	border: 1px solid var(--hair-gold);
	background: radial-gradient(ellipse at 20% 0, #17112a, #07050c 70%);
	color: var(--bone);
	box-shadow: 0 40px 120px -20px #000;
}

.fold-dialog::backdrop {
	background: rgba(4, 3, 6, 0.82);
	backdrop-filter: blur(6px);
}

.fold-dialog[open] {
	animation: fold-rise 0.5s var(--ease-out) both;
}

.fold-dialog.is-thirteenth {
	border-color: rgba(143, 224, 207, 0.45);
}

.fold-dialog__frame {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(1.2rem, 4vw, 3rem);
	align-items: center;
	padding: clamp(1rem, 3vw, 2.2rem);
}

.fold-dialog__art {
	width: min(100%, calc((100vh - 6rem) * 1186 / 2048));
	aspect-ratio: var(--card-ratio);
	margin: 0 auto;
	overflow: hidden;
	border-radius: var(--card-round);
	background: #120d0a;
	box-shadow: 0 30px 60px -20px #000;
}

.fold-dialog__art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: var(--card-crop);
}

.fold-dialog__numeral {
	margin: 0;
	color: var(--gold);
	font-family: var(--f-mark);
	font-size: 0.6rem;
	letter-spacing: 0.3em;
}

.fold-dialog.is-thirteenth .fold-dialog__numeral {
	color: var(--teal);
}

.fold-dialog__name {
	margin: 0.4rem 0 0.8rem;
	font-family: var(--f-title);
	font-size: clamp(2rem, 4.4vw, 3rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1;
}

.fold-dialog__reading {
	margin: 0.6rem 0 1.8rem;
	font-size: 1.08rem;
	line-height: 1.65;
}

.fold-dialog__controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.8rem;
}

.fold-step--close {
	margin-left: auto;
}

/* --------------------------------------------------------------- narrow -- */

@media (max-width: 760px) {
	.fold-surface {
		grid-template-columns: 1fr;
		justify-items: center;
	}

	.fold-deck {
		width: 6.4rem;
	}

	.fold-spread {
		width: 100%;
	}

	.fold-controls {
		flex-direction: column;
		gap: 1rem;
	}

	.fold-printing {
		flex-direction: column;
		gap: 0.5rem;
	}

	.fold-choice {
		padding: 0 0.9rem;
	}

	.fold-choice small {
		display: none;
	}

	.fold-reading__list,
	.fold-lore__columns {
		grid-template-columns: 1fr;
	}

	.fold-dialog__frame {
		grid-template-columns: 1fr;
	}

	.fold-dialog__art {
		width: min(72%, calc(52vh * 1186 / 2048));
	}

	.fold-dialog__controls {
		flex-wrap: nowrap;
		gap: 0.5rem;
	}

	.fold-dialog .fold-step {
		padding: 0 0.9rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fold-card.is-glint .fold-face::after,
	.fold-card[aria-disabled='false']:not(.is-turned) .fold-card__back,
	.fold-reading,
	.fold-dialog[open] {
		animation: none;
	}

	.fold-card__inner,
	.fold-deck__card,
	.fold-entry__art,
	.fold-entry__art img {
		transition: none;
	}
}
