/*
	- The look of Assume the End: a living elven manuscript.
	- Parchment and ink on mossy velvet, with an elven display face for titles and a book face for the tale.
	- Sizes on the storybook scale with the screen, so it reads from across a room; the phone uses thumb-sized controls.
*/


/* #region Colors and faces */
:root
{
	--velvet: #16261b;
	--velvetDeep: #0c170f;
	--moss: #3f5f2e;
	--leaf: #5e8a3a;
	--parchment: #f3e8cc;
	--parchmentShade: #e2d2a8;
	--ink: #2b1d0e;
	--inkFaded: #7a6748;
	--gold: #b8892a;
	--goldBright: #e4b94a;
	--display: 'Uncial Antiqua', 'Palatino Linotype', serif;
	--book: 'IM Fell English', 'Palatino Linotype', Georgia, serif;
}

*
{
	box-sizing: border-box;
}

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

body
{
	background: radial-gradient(ellipse at 50% 30%, var(--velvet), var(--velvetDeep) 75%);
	color: var(--ink);
	font-family: var(--book);
	-webkit-tap-highlight-color: transparent;
}
/* #endregion */


/* #region Screens */
/* Only the screen named on the body shows. */
.titleCard, .storybook, .phone
{
	display: none;
}

body[data-screen="title"] .titleCard,
body[data-screen="storybook"] .storybook,
body[data-screen="phone"] .phone
{
	display: flex;
}

[hidden]
{
	display: none !important;
}
/* #endregion */


/* #region Shared pieces */
.gameTitle
{
	margin: 0;
	font-family: var(--display);
	font-weight: normal;
	color: var(--ink);
	letter-spacing: 0.02em;
}

.tagline
{
	margin: 0.3em 0 0;
	font-style: italic;
	color: var(--inkFaded);
}

/* A leaf-green button with parchment lettering, the game's one kind of button. */
.leafButton
{
	border: 2px solid #2f4a20;
	border-radius: 999px;
	padding: 0.6em 1.4em;
	background: linear-gradient(#6f9c45, var(--moss));
	color: var(--parchment);
	font-family: var(--book);
	font-size: 1.15rem;
	cursor: pointer;
	box-shadow: 0 2px 0 #24391a, 0 4px 10px rgba(0, 0, 0, 0.25);
	transition: transform 0.12s, filter 0.12s;
}

.leafButton:hover:not(:disabled)
{
	filter: brightness(1.08);
}

.leafButton:active:not(:disabled)
{
	transform: translateY(2px);
	box-shadow: 0 0 0 #24391a, 0 2px 6px rgba(0, 0, 0, 0.25);
}

.leafButton:disabled
{
	opacity: 0.45;
	cursor: default;
}

.leafButton.wide
{
	width: 100%;
}

/* Parchment fields with ink lettering. */
.codeInput, .nameInput
{
	border: 2px solid var(--inkFaded);
	border-radius: 0.5em;
	padding: 0.5em 0.7em;
	background: #fbf5e4;
	color: var(--ink);
	font-family: var(--book);
	font-size: 1.3rem;
}

.codeInput
{
	width: 6em;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-family: var(--display);
}
/* #endregion */


/* #region The title card */
.titleCard
{
	min-height: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.4rem;
	padding: 2rem;
	text-align: center;
}

.titleCard .gameTitle
{
	font-size: clamp(2.6rem, 9vw, 5.5rem);
	color: var(--parchment);
	text-shadow: 0 3px 18px rgba(0, 0, 0, 0.5);
}

.titleCard .tagline
{
	color: var(--parchmentShade);
	font-size: 1.25rem;
}

.joinForm
{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	color: var(--parchmentShade);
	font-style: italic;
}

.codeRow
{
	display: flex;
	gap: 0.6rem;
}
/* #endregion */


/* #region The storybook lobby */
.storybook
{
	position: relative;
	height: 100%;
	overflow: hidden;
	font-size: clamp(12px, 1.6vmin, 30px);
}

/* The lobby sits on one big parchment sheet, laid out like a party game's join screen: the call at the top, flowers at both sides, and the game's mark between. */
.lobby
{
	position: absolute;
	inset: 3vmin;
	display: grid;
	grid-template-columns: 1fr 1.4fr 1fr;
	grid-template-rows: auto 1fr auto;
	grid-template-areas:
		"qr call ."
		"left mark right"
		"status status status";
	gap: 2vmin;
	padding: 3vmin 4vmin;
	border-radius: 1.5vmin;
	background: radial-gradient(ellipse at 50% 40%, #fbf3dc, var(--parchment) 60%, var(--parchmentShade));
	box-shadow: 0 2vmin 6vmin rgba(0, 0, 0, 0.55), inset 0 0 6vmin rgba(122, 103, 72, 0.35);
}

.lobbyCall
{
	grid-area: call;
	text-align: center;
}

.lobbyCall p
{
	margin: 0;
}

.lobbyAddressLine
{
	font-size: 2.4em;
}

.lobbyAddress
{
	color: var(--leaf);
	font-weight: bold;
}

.lobbyCodeLabel
{
	font-size: 1.6em;
	color: var(--inkFaded);
}

.lobbyCode
{
	font-family: var(--display);
	font-size: 7em;
	line-height: 1.3;
	letter-spacing: 0.12em;
	color: var(--gold);
	text-shadow: 0 0.04em 0 #7a5a12;
}

.lobbyQr
{
	grid-area: qr;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.3em;
	font-style: italic;
	color: var(--inkFaded);
	font-size: 1.3em;
}

.lobbyQrCode svg
{
	width: 9em;
	height: 9em;
	display: block;
}

.lobbyMark
{
	grid-area: mark;
	align-self: center;
	text-align: center;
}

.lobbyMark .gameTitle
{
	font-size: 5em;
}

.lobbyMark .tagline
{
	font-size: 1.8em;
}

/* The lobby's three short rules, teaching the game before the first tale. */
.lobbyRules
{
	margin: 1.2em auto 0;
	padding: 0;
	max-width: 30em;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	font-size: 1.45em;
	line-height: 1.3;
	text-align: left;
}

.lobbyRules li::before
{
	content: '❦';
	margin-right: 0.45em;
	color: var(--leaf);
}

.lobbyHint
{
	margin: 1em 0 0;
	font-size: 1.15em;
	font-style: italic;
	color: var(--inkFaded);
}

/* A newly joined player's flower opens into its spot. */
.lobbySpot.isArriving svg
{
	animation: bloomOpen 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lobbySpots
{
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-content: center;
	gap: 1.5em;
}

.lobbySpotsLeft
{
	grid-area: left;
}

.lobbySpotsRight
{
	grid-area: right;
}

.lobbySpot
{
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.lobbySpot svg
{
	width: 8em;
	height: 8em;
	filter: drop-shadow(0 0.3em 0.4em rgba(43, 29, 14, 0.25));
}

.lobbySpot.isEmpty svg
{
	opacity: 0.55;
}

.lobbySpot.isAway svg
{
	opacity: 0.4;
	filter: grayscale(0.6);
}

.lobbySpotName
{
	margin: 0.3em 0 0;
	font-size: 1.6em;
	font-weight: bold;
}

.lobbySpot.isEmpty .lobbySpotName
{
	color: var(--inkFaded);
	font-weight: normal;
	font-style: italic;
}

.vipMark
{
	margin-left: 0.4em;
	padding: 0.05em 0.4em;
	border-radius: 0.3em;
	background: var(--gold);
	color: #fff8e6;
	font-size: 0.6em;
	vertical-align: middle;
}

.lobbyStatus
{
	grid-area: status;
	text-align: center;
	font-size: 1.8em;
	font-style: italic;
	color: var(--inkFaded);
}
/* #endregion */


/* #region The manuscript */
/* The storybook while a tale is told: a phase header, the open book, and the score ribbon. */
.manuscript
{
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 1.5vmin;
	padding: 2vmin 3vmin;
}

.phaseHeader
{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1em;
	color: var(--parchment);
}

.phaseTitle
{
	margin: 0;
	font-family: var(--display);
	font-weight: normal;
	font-size: 3em;
	text-shadow: 0 0.1em 0.5em rgba(0, 0, 0, 0.6);
}

/* The phase timer: a ring of vine that withers as time runs out, with the seconds in its middle. */
.phaseTimer
{
	position: relative;
	width: 4.4em;
	height: 4.4em;
	flex: none;
}

.phaseTimer svg
{
	width: 100%;
	height: 100%;
	overflow: visible;
}

.timerTrack
{
	fill: rgba(12, 23, 15, 0.6);
	stroke: rgba(243, 232, 204, 0.12);
	stroke-width: 5;
}

.timerVine
{
	fill: none;
	stroke: #7fb04f;
	stroke-width: 5;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.25s linear, stroke 1.2s;
	filter: drop-shadow(0 0 0.15em rgba(127, 176, 79, 0.6));
}

.timerLeaf
{
	fill: #7fb04f;
	transition: fill 1.2s;
}

.phaseTimer.isWithering .timerVine
{
	stroke: #9c7a3c;
	filter: none;
}

.phaseTimer.isWithering .timerLeaf
{
	fill: #9c7a3c;
}

.timerSeconds
{
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--display);
	font-size: 1.6em;
	color: var(--parchment);
}

.phaseTimer.isRunningOut .timerSeconds
{
	color: #ff9a7a;
	animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat
{
	0%, 100% { transform: scale(1); }
	15% { transform: scale(1.18); }
}

/* The open book: two parchment pages on a spine, with a stack of page edges beneath and the warm light falling on them. */
.book
{
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1.25fr;
	min-height: 0;
	border-radius: 1vmin;
	box-shadow:
		0 0.4vmin 0 #d9c69a,
		0 0.8vmin 0 #cdb888,
		0 1.2vmin 0 #bfa877,
		0 2.5vmin 6vmin rgba(0, 0, 0, 0.65);
}

.book::after
{
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(100% / 2.25);
	width: 0.5vmin;
	transform: translateX(-50%);
	background: linear-gradient(rgba(60, 40, 18, 0.35), rgba(60, 40, 18, 0.55), rgba(60, 40, 18, 0.35));
	pointer-events: none;
}

.page
{
	position: relative;
	min-height: 0;
	font-size: calc(1em * var(--pageScale, 1));
	overflow: hidden;
	padding: 4.5vmin 5.5vmin;
	background:
		radial-gradient(ellipse at 50% 0%, rgba(255, 236, 190, 0.55), transparent 60%),
		radial-gradient(ellipse at 50% 45%, #fbf3dc, var(--parchment) 60%, var(--parchmentShade));
}

/* A faint grain over the parchment, drawn from a tiny noise pattern. */
.page::before
{
	content: '';
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.1 0 0 0 0.09 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
	pointer-events: none;
}

.stagePage
{
	border-radius: 1vmin 0 0 1vmin;
	box-shadow: inset -2.5vmin 0 3vmin -2vmin rgba(43, 29, 14, 0.5);
	display: flex;
	flex-direction: column;
	gap: 1em;
}

.talePage
{
	border-radius: 0 1vmin 1vmin 0;
	box-shadow: inset 2.5vmin 0 3vmin -2vmin rgba(43, 29, 14, 0.5);
	display: flex;
	flex-direction: column;
}

/* The vines framing both pages, growing with each inked line; leaves open as the vine reaches them. */
.vineFrame
{
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	overflow: visible;
}

.vineStem
{
	fill: none;
	stroke: #4f7a2f;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	filter: drop-shadow(0 1px 1px rgba(30, 50, 15, 0.35));
}

.vineLeaf
{
	fill: #6f9c45;
	stroke: #3f6324;
	stroke-width: 0.8;
	transform: scale(0);
	transform-box: fill-box;
	transform-origin: left center;
	transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vineLeaf.isOpen
{
	transform: scale(1);
}

/* Each new phase's page fades in, each part a moment after the one above it. */
.stagePage.isTurning > *
{
	animation: rise 0.7s ease-out both;
}

.stagePage.isTurning > :nth-child(2)
{
	animation-delay: 0.1s;
}

.stagePage.isTurning > :nth-child(n + 3)
{
	animation-delay: 0.2s;
}

.stageLead
{
	margin: 0;
	font-size: 2.4em;
	line-height: 1.2;
}

.stageNote
{
	margin: 0;
	font-size: 1.7em;
	font-style: italic;
	color: var(--inkFaded);
}

.stageList
{
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5em 1em;
	font-size: 1.8em;
}

.stageList li
{
	transition: opacity 0.5s;
}

.stageList .isWaiting
{
	opacity: 0.4;
}

.personName
{
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	font-weight: bold;
}

.inlineBloom
{
	width: 1.3em;
	height: 1.3em;
	flex: none;
}

.ballot, .tally, .ranking
{
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.6em;
	font-size: 1.8em;
}

.ballot li
{
	display: flex;
	gap: 0.5em;
}

.ballotNumber
{
	flex: none;
	min-width: 1.2em;
	font-family: var(--display);
	color: var(--gold);
}

.tally li
{
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0 0.6em;
	opacity: 0.55;
}

.tally li.isInked
{
	opacity: 1;
}

.tallyVotes
{
	grid-row: span 2;
	font-family: var(--display);
	color: var(--gold);
	font-size: 0.8em;
	white-space: nowrap;
}

.tallyWriter
{
	font-size: 0.8em;
}

.unmaskFlower .stageBloom
{
	width: 8em;
	height: 8em;
}

.stagePage.isTurning .stageBloom
{
	animation: bloomOpen 1.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.revealedSeed
{
	margin: 0;
	font-family: var(--display);
	font-size: 5em;
	line-height: 1;
}

@keyframes rise
{
	from { opacity: 0; transform: translateY(0.3em); }
	to { opacity: 1; transform: none; }
}

/* The final scores: each grows as a vine beside its name, and the winner wears a crown of their own flower. */
.ranking li
{
	display: grid;
	grid-template-columns: 9em 1fr auto;
	align-items: center;
	gap: 0.6em;
}

.rankName
{
	position: relative;
}

.scoreVine
{
	height: 0.55em;
	width: var(--vineWidth);
	border-radius: 999px;
	background:
		radial-gradient(circle at 30% 50%, #8fbf5a 0 0.18em, transparent 0.2em) 0 0 / 1.1em 100% repeat-x,
		linear-gradient(#5e8a3a, #3f6324);
	transform-origin: left center;
	animation: vineGrow 1.6s cubic-bezier(0.22, 1, 0.36, 1) var(--vineDelay) both;
}

@keyframes vineGrow
{
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

.rankScore
{
	min-width: 3em;
	font-family: var(--display);
	color: var(--gold);
	text-align: right;
}

.ranking .isWinner
{
	font-size: 1.25em;
}

.flowerCrown
{
	position: absolute;
	left: -0.15em;
	top: -0.75em;
	display: flex;
	gap: 0;
	pointer-events: none;
}

.crownBloom
{
	width: 0.7em;
	height: 0.7em;
	margin-right: -0.2em;
	animation: bloomOpen 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s both;
}

.crownBloom:nth-child(2), .crownBloom:nth-child(4)
{
	transform: translateY(-0.15em);
}

.crownBloom:nth-child(3)
{
	transform: translateY(-0.25em);
}

/* The tale itself: its lines, with buds and blooms in the margin, and the ending at the foot of the page. */
.taleLines
{
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45em;
	font-size: 2.1em;
	line-height: 1.35;
}

.taleLine
{
	display: grid;
	grid-template-columns: 1.5em 1fr;
	align-items: start;
	border-radius: 0.3em;
	transition: background 0.6s, box-shadow 0.6s;
}

/* A newly chosen line writes itself in from left to right, as if by an unseen quill. */
.taleLine.isInking .lineText
{
	animation: inkIn 2.4s steps(40, end) both;
}

@keyframes inkIn
{
	from { clip-path: inset(0 100% 0 0); }
	to { clip-path: inset(0 0 0 0); }
}

/* The first line opens with an illuminated capital, wreathed in leaves. */
.taleLine:first-child .lineText::first-letter
{
	float: left;
	margin: 0.08em 0.12em 0 0;
	padding: 0.06em 0.16em 0;
	border: 0.06em solid var(--gold);
	border-radius: 0.12em;
	background:
		radial-gradient(circle at 15% 20%, #6f9c45 0 0.09em, transparent 0.1em),
		radial-gradient(circle at 85% 80%, #6f9c45 0 0.09em, transparent 0.1em),
		radial-gradient(circle at 85% 15%, #8fbf5a 0 0.07em, transparent 0.08em),
		linear-gradient(#2f4a20, #1f3315);
	font-family: var(--display);
	font-size: 2.6em;
	line-height: 0.9;
	color: var(--goldBright);
	text-shadow: 0 0.03em 0 #7a5a12;
}

.taleLine.isQuiet .lineText
{
	font-style: italic;
	color: var(--inkFaded);
}

.marginMarks
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0;
	padding-top: 0.1em;
}

.marginBud, .marginBloom
{
	width: 1.15em;
	height: 1.15em;
}

.marginBud
{
	animation: budRise 1s ease-out 1.8s both;
}

.marginBloom
{
	animation: bloomOpen 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
	filter: drop-shadow(0 0 0.15em rgba(255, 230, 160, 0.9));
}

@keyframes budRise
{
	from { opacity: 0; transform: translateY(0.3em) scale(0.4); }
	to { opacity: 1; transform: none; }
}

@keyframes bloomOpen
{
	from { opacity: 0; transform: scale(0.2) rotate(-80deg); }
	to { opacity: 1; transform: none; }
}

.litSeed
{
	font-weight: bold;
	border-bottom: 0.08em solid;
	animation: seedGlow 2s ease-out;
}

@keyframes seedGlow
{
	from { text-shadow: 0 0 0.6em currentColor; }
	to { text-shadow: none; }
}

/* The line being read aloud at the finale glows warm. */
.taleLine.isBeingRead, .taleEnding.isBeingRead
{
	background: rgba(255, 226, 150, 0.35);
	box-shadow: 0 0 0 0.25em rgba(255, 226, 150, 0.35);
}

.taleEnding
{
	margin: auto 0 0;
	padding-top: 1em;
	font-size: 2.1em;
	font-style: italic;
	color: var(--gold);
	opacity: 0.55;
	border-radius: 0.3em;
	transition: opacity 2s, color 2s, background 0.6s, box-shadow 0.6s, text-shadow 2s;
}

.taleEnding.hasComeTrue
{
	opacity: 1;
	color: var(--ink);
	text-shadow: 0 0 0.8em rgba(228, 185, 74, 0.6);
}

.scoreRibbon
{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6em 2em;
	font-size: 1.7em;
	color: var(--parchment);
}

.ribbonEntry
{
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

.ribbonEntry .personName
{
	filter: brightness(1.9) saturate(0.8);
}

.ribbonEntry b
{
	font-family: var(--display);
	color: var(--goldBright);
}

.ribbonEntry.isAway
{
	opacity: 0.45;
}
/* #endregion */


/* #region The storybook's surroundings */
/* Warm light falling on the velvet from above, under everything else on the storybook screen. */
.storybook::before
{
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(255, 214, 140, 0.16), transparent 70%);
	pointer-events: none;
}

.lobby, .manuscript
{
	z-index: 1;
}

/* Fireflies drifting slowly at the edges of the velvet, each on its own path and glow. */
.fireflies
{
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.fireflies span
{
	position: absolute;
	width: 0.5vmin;
	height: 0.5vmin;
	border-radius: 50%;
	background: #fff3a8;
	box-shadow: 0 0 1vmin 0.4vmin rgba(255, 236, 120, 0.75);
	animation:
		fireflyDrift var(--driftSeconds) ease-in-out infinite alternate,
		fireflyGlow var(--glowSeconds) ease-in-out infinite alternate;
}

@keyframes fireflyDrift
{
	from { transform: translate(0, 0); }
	to { transform: translate(var(--driftX), var(--driftY)); }
}

@keyframes fireflyGlow
{
	from { opacity: 0.1; }
	to { opacity: 0.95; }
}

/* The round mute button in the storybook's corner. */
.muteButton
{
	position: absolute;
	right: 1.6vmin;
	bottom: 1.6vmin;
	z-index: 2;
	width: 5vmin;
	height: 5vmin;
	min-width: 36px;
	min-height: 36px;
	border: 2px solid rgba(243, 232, 204, 0.4);
	border-radius: 50%;
	background: rgba(12, 23, 15, 0.6);
	color: var(--parchment);
	font-size: clamp(16px, 2.4vmin, 32px);
	cursor: pointer;
}

.muteButton.isMuted
{
	opacity: 0.55;
	text-decoration: line-through;
}
/* #endregion */


/* #region The phone */
.phone
{
	min-height: 100%;
	flex-direction: column;
	align-items: stretch;
	max-width: 32rem;
	margin: 0 auto;
	padding: max(1rem, env(safe-area-inset-top)) 1rem 1.5rem;
	background: linear-gradient(#fbf3dc, var(--parchment) 40%, var(--parchmentShade));
	font-size: 1.1rem;
}

.phoneCrest
{
	display: flex;
	flex-direction: column;
	align-items: center;
}

.crestBloom
{
	width: 4.5rem;
	height: 4.5rem;
}

.crestName
{
	margin: 0.2em 0 0.6em;
	font-family: var(--display);
	font-size: 1.6rem;
}

.phoneScreen
{
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.phoneBanner
{
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	padding: 0.6em;
	background: var(--ink);
	color: var(--parchment);
	text-align: center;
	font-style: italic;
	z-index: 10;
}

.phoneNote
{
	margin: 0.4em 0;
	text-align: center;
	font-size: 1.3rem;
}

.phoneLabel
{
	margin: 0;
	font-style: italic;
	color: var(--inkFaded);
}

.phoneHint
{
	margin: 0;
	text-align: center;
	font-style: italic;
	color: var(--inkFaded);
	font-size: 0.95rem;
}

.phoneProblem
{
	margin: 0;
	text-align: center;
	color: #9b1b30;
}

.phoneForm
{
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.phoneForm .codeInput, .phoneForm .nameInput
{
	width: 100%;
}

.flowerChoices
{
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.flowerGrid
{
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.4rem;
}

.flowerChoice
{
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.3rem 0.1rem;
	border: 2px solid transparent;
	border-radius: 0.7rem;
	background: rgba(255, 255, 255, 0.35);
	font-family: var(--book);
	font-size: 0.85rem;
	color: var(--ink);
	cursor: pointer;
}

.flowerChoice svg
{
	width: 3.2rem;
	height: 3.2rem;
}

.flowerChoice.isPicked
{
	border-color: var(--gold);
	background: rgba(228, 185, 74, 0.25);
}

.flowerChoice:disabled
{
	opacity: 0.25;
	cursor: default;
}

.playerList
{
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.3rem 0.8rem;
	font-weight: bold;
}

.playerList li
{
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.listBloom
{
	width: 1.8rem;
	height: 1.8rem;
	flex: none;
}

.vipControls
{
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	margin-top: 0.6rem;
	padding-top: 1rem;
	border-top: 1px dashed var(--inkFaded);
}

.lengthChoices
{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.4rem;
}

.lengthChoice
{
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.5rem 0.2rem;
	border: 2px solid var(--parchmentShade);
	border-radius: 0.7rem;
	background: rgba(255, 255, 255, 0.4);
	font-family: var(--book);
	font-size: 1.05rem;
	color: var(--ink);
	cursor: pointer;
}

.lengthChoice small
{
	color: var(--inkFaded);
	font-size: 0.8rem;
}

.lengthChoice.isPicked
{
	border-color: var(--gold);
	background: rgba(228, 185, 74, 0.25);
}

/* The phone during a tale: a timer, the phase's body, and a footer with the secret seed and the score. */
.phoneTimer
{
	position: fixed;
	top: max(0.6rem, env(safe-area-inset-top));
	right: 1rem;
	margin: 0;
	font-family: var(--display);
	font-size: 1.6rem;
	color: var(--gold);
}

.phoneTimer.isRunningOut
{
	color: #c0391b;
}

.phaseBody
{
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.phoneFooter
{
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1rem;
	padding-top: 0.7rem;
	border-top: 1px dashed var(--inkFaded);
	font-size: 0.95rem;
	color: var(--inkFaded);
}

.seedWord
{
	color: var(--ink);
}

.phoneScore
{
	font-family: var(--display);
	color: var(--gold);
	white-space: nowrap;
}

.endingText
{
	margin: 0;
	font-style: italic;
	font-size: 1.25rem;
	color: var(--gold);
}

.bigSeed
{
	margin: 0;
	text-align: center;
	font-family: var(--display);
	font-size: 2.8rem;
	color: var(--ink);
}

.storySoFar
{
	padding: 0.6rem 0.8rem;
	border-left: 3px solid var(--leaf);
	background: rgba(255, 255, 255, 0.35);
}

.storyLine
{
	margin: 0 0 0.3rem;
	font-size: 1.15rem;
}

.storyGap
{
	margin: 0;
	color: var(--inkFaded);
}

.openingWords
{
	margin: 0;
	font-style: italic;
}

.lineInput
{
	width: 100%;
	border: 2px solid var(--inkFaded);
	border-radius: 0.5em;
	padding: 0.6em 0.7em;
	background: #fbf5e4;
	color: var(--ink);
	font-family: var(--book);
	font-size: 1.2rem;
	resize: none;
}

.pointsNote
{
	margin: 0;
	text-align: center;
	font-family: var(--display);
	font-size: 1.5rem;
	color: var(--leaf);
}

.ballotChoices, .seedChoices
{
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.seedChoices
{
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.ballotChoice, .seedChoice
{
	padding: 0.7rem 0.8rem;
	border: 2px solid var(--parchmentShade);
	border-radius: 0.7rem;
	background: rgba(255, 255, 255, 0.5);
	color: var(--ink);
	font-family: var(--book);
	font-size: 1.1rem;
	text-align: left;
	cursor: pointer;
}

.seedChoice
{
	text-align: center;
	font-size: 1.25rem;
}

.ballotChoice small
{
	display: block;
	color: var(--inkFaded);
	font-style: italic;
}

.ballotChoice.isPicked
{
	border-color: var(--gold);
	background: rgba(228, 185, 74, 0.3);
}

.ballotChoice:disabled:not(.isPicked)
{
	opacity: 0.5;
	cursor: default;
}

.guessBloom
{
	width: 5rem;
	height: 5rem;
	align-self: center;
}

.finalRanking
{
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-weight: bold;
}

.finalRanking li
{
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.finalRanking b
{
	margin-left: auto;
	font-family: var(--display);
	color: var(--gold);
}

.wholeTale
{
	max-height: 40vh;
	overflow-y: auto;
	padding: 0.6rem 0.8rem;
	border-left: 3px solid var(--leaf);
	background: rgba(255, 255, 255, 0.35);
}

.wholeTale p
{
	margin: 0 0 0.4rem;
}

.wholeTale p:last-child
{
	font-style: italic;
	color: var(--gold);
}
/* #endregion */