:root {
	--cavern: #0b1119;
	--cavern-light: #131f2a;
	--stone: #263744;
	--glow: #8db7b3;
	--gold: #d5b77b;
	--game-muted: #aab8bf;
	--completed: #65c98f;
}
:root[data-theme="light"] {
	--cavern: #e9efef;
	--cavern-light: #f8fbfa;
	--stone: #ccd9d8;
	--glow: #2e6666;
	--gold: #81602b;
	--game-muted: #52666a;
	--completed: #27844d;
}
body {
	background:
		radial-gradient(ellipse at 50% 12%, rgb(70 104 112 / 20%), transparent 55%),
		var(--cavern);
}
.game-shell {
	display: grid;
	justify-items: center;
	align-content: start;
	gap: 28px;
	padding: 58px 0 48px;
}
.game-heading {
	max-width: 620px;
	text-align: center;
}
.eyebrow {
	margin: 0 0 10px;
	color: var(--gold);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
}
.game-heading h1 {
	margin: 0;
	color: var(--text);
	font-family: "Trajan Pro", Georgia, "Times New Roman", serif;
	font-size: clamp(1.35rem, 5vw, 3rem);
	font-weight: 400;
	letter-spacing: .025em;
	white-space: nowrap;
}
.game-intro {
	margin: 12px 0;
	color: var(--game-muted);
	font-size: 1rem;
}
.back-to-games {
	display: inline-block;
	margin-top: 16px;
	color: var(--glow);
	font-size: .9rem;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.back-to-games:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 3px;
}
.game-picker {
	display: grid;
	width: min(100%, 980px);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}
.game-picker > .game-edition:last-child {
	grid-column: 1 / -1;
	width: calc((100% - 20px) / 2);
	justify-self: center;
}
.game-edition {
	padding: 22px;
	border: 1px solid var(--stone);
	border-radius: 14px;
	background: linear-gradient(160deg, var(--cavern-light), var(--page-bg));
	box-shadow: 0 22px 70px rgb(0 0 0 / 18%);
}
.game-edition h2 {
	margin: 0;
	color: var(--gold);
	font-family: "Trajan Pro", Georgia, "Times New Roman", serif;
	font-size: 1.45rem;
	font-weight: 400;
	text-align: center;
}
.game-title-divider {
	display: block;
	width: 100%;
	height: auto;
	margin: 10px 0 14px;
}
.game-edition > p {
	margin: 8px 0 18px;
	color: var(--game-muted);
	font-size: .9rem;
}
.game-mode-list {
	display: grid;
	gap: 10px;
}
.game-edition-fleur {
	display: block;
	width: 100%;
	height: auto;
	margin-top: 18px;
}
:root[data-theme="light"] .game-edition-fleur, :root[data-theme="light"] .game-title-divider {
	filter: invert(1);
}
.game-mode-option {
	display: flex;
	min-width: 0;
	align-items: center;
	border: 2px solid var(--stone);
	border-radius: 8px;
	background: var(--cavern);
	transition: border-color .15s ease, background .15s ease;
}
.game-mode-option:hover {
	border-color: var(--glow);
	background: var(--surface-hover);
}
.game-mode-option.is-completed {
	border-color: var(--completed);
}
.game-mode-option.is-in-progress {
	border-color: var(--gold);
}
.game-mode-option.is-completed .game-mode-button {
	border-radius: 6px;
}
.game-mode-button {
	display: flex;
	min-width: 0;
	min-height: 48px;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 3px;
	padding: 10px 14px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--text);
	font: inherit;
	text-align: left;
	text-decoration: none;
	transition: color .15s ease;
}
.game-mode-button:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}
.game-mode-button .mode-completion-info {
	color: var(--game-muted);
	font-size: .75rem;
	font-weight: 400;
}
.game-mode-option.is-completed .mode-completion-info {
	color: var(--completed);
	font-weight: 600;
}
.game-mode-option.is-in-progress .mode-completion-info {
	color: var(--gold);
	font-weight: 600;
}
.game-mode-button small {
	font-size: .75rem;
}
.archive-page-link-wrap {
	width: min(100%, 280px);
	margin-inline: auto;
}
.archive-page-link-wrap .game-mode-button {
	align-items: center;
	text-align: center;
}
.archive-shell {
	gap: 24px;
}
.archive-calendar,
.archive-challenge-options {
	width: min(100%, 720px);
	padding: 22px;
	border: 1px solid var(--stone);
	border-radius: 14px;
	background: linear-gradient(160deg, var(--cavern-light), var(--page-bg));
	box-shadow: 0 22px 70px rgb(0 0 0 / 18%);
}
.archive-calendar-heading {
	display: grid;
	grid-template-columns: 44px 1fr 44px;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}
.archive-calendar-heading h2,
.archive-challenge-options h2 {
	margin: 0;
	color: var(--gold);
	font-family: "Trajan Pro", Georgia, "Times New Roman", serif;
	font-size: 1.25rem;
	font-weight: 400;
	text-align: center;
}
.archive-month-button {
	min-height: 40px;
	border: 1px solid var(--stone);
	border-radius: 8px;
	background: var(--cavern);
	color: var(--text);
	font: inherit;
	font-size: 1.4rem;
	cursor: pointer;
}
.archive-month-button:hover:not(:disabled),
.archive-month-button:focus-visible {
	border-color: var(--glow);
}
.archive-month-button:focus-visible,
.archive-day:focus-visible,
.archive-mode-link:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}
.archive-month-button:disabled {
	opacity: .45;
	cursor: default;
}
.archive-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: center;
}
.archive-weekdays {
	margin-bottom: 6px;
	color: var(--game-muted);
	font-size: .78rem;
	font-weight: 600;
}
.archive-day-empty,
.archive-day {
	min-height: 58px;
}
.archive-day {
	display: flex;
	width: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: 1px solid var(--stone);
	border-radius: 7px;
	background: var(--cavern);
	color: var(--text);
	font: inherit;
	cursor: pointer;
}
.archive-day:hover:not(:disabled),
.archive-day[aria-pressed="true"] {
	border-color: var(--glow);
	background: var(--surface-hover);
}
.archive-day[aria-pressed="true"] {
	box-shadow: inset 0 0 0 1px var(--glow);
}
.archive-day:disabled {
	opacity: .4;
	cursor: default;
}
.archive-day-number {
	font-variant-numeric: tabular-nums;
}
.archive-day small {
	color: var(--glow);
	font-size: .68rem;
}
.archive-date-status {
	min-height: 1.4em;
	margin: 14px 0 0;
	color: var(--game-muted);
	font-size: .9rem;
	text-align: center;
}
.archive-challenge-options h2 {
	font-size: 1.35rem;
}
.archive-challenge-options > p {
	margin: 10px 0 16px;
	color: var(--game-muted);
	text-align: center;
}
.archive-mode-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.archive-mode-list > .archive-mode-edition:last-child {
	grid-column: 1 / -1;
	width: calc((100% - 8px) / 2);
	justify-self: center;
}
.archive-mode-edition h3 {
	margin: 0 0 10px;
	color: var(--gold);
	font-family: "Trajan Pro", Georgia, "Times New Roman", serif;
	font-size: 1rem;
	font-weight: 400;
	text-align: center;
}
.archive-edition-modes {
	display: grid;
	gap: 8px;
}
.archive-mode-link {
	padding: 12px;
	border: 1px solid var(--stone);
	border-radius: 8px;
	background: var(--cavern);
	color: var(--text);
	text-decoration: none;
}
.archive-mode-link-status {
	display: block;
	margin-top: 4px;
	color: var(--game-muted);
	font-size: .75rem;
}
.archive-mode-link-status.is-completed {
	color: var(--completed);
	font-weight: 600;
}
.archive-mode-link-status.is-in-progress {
	color: var(--gold);
	font-weight: 600;
}
.archive-mode-link:hover {
	border-color: var(--glow);
	background: var(--surface-hover);
}
.archive-mode-link.is-completed {
	border-color: var(--completed);
}
.archive-mode-link.is-in-progress {
	border-color: var(--gold);
}
.archive-mode-link:focus-visible {
	outline-offset: 1px;
}
.game-card {
	width: min(100%, 620px);
	padding: 22px;
	border: 1px solid var(--stone);
	border-radius: 14px;
	background: linear-gradient(160deg, var(--cavern-light), var(--page-bg));
	box-shadow: 0 22px 70px rgb(0 0 0 / 25%);
}
.game-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	justify-content: space-between;
	color: var(--game-muted);
	font-size: .85rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.game-stats p { margin: 0; }
.game-stats strong {
	margin-left: 7px;
	color: var(--gold);
	font-variant-numeric: tabular-nums;
}
.ready-button {
	min-width: 140px;
	min-height: 48px;
	padding: 10px 20px;
	border: 1px solid var(--gold);
	border-radius: 8px;
	background: var(--gold);
	color: #17212a;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}
:root[data-theme="light"] .ready-button { color: #fff; }
.ready-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgb(0 0 0 / 20%);
}
.ready-button:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 3px;
}
.sprite-frame {
	position: relative;
	display: grid;
	min-height: 270px;
	margin: 20px 0;
	place-items: center;
	overflow: hidden;
	border: 1px solid var(--stone);
	border-radius: 10px;
	background:
		radial-gradient(ellipse at 50% 76%, rgb(141 183 179 / 12%), transparent 55%),
		linear-gradient(180deg, rgb(5 9 14 / 10%), rgb(5 9 14 / 65%));
}
.sprite-frame::before,
.sprite-frame::after {
	position: absolute;
	width: 1px;
	height: 70%;
	background: linear-gradient(transparent, rgb(141 183 179 / 18%), transparent);
	content: "";
}
.sprite-frame::before { left: 14%; top: 10%; transform: rotate(16deg); }
.sprite-frame::after { right: 17%; bottom: 2%; transform: rotate(-20deg); }
.sprite-frame img {
	z-index: 1;
	width: min(68%, 250px);
	height: 220px;
	object-fit: contain;
	filter: brightness(0);
	opacity: 0;
	transition: opacity .6s ease;
}
.sprite-frame img.is-visible {
	opacity: 1;
}
.sprite-frame img.is-revealed {
	filter: none;
	transition: filter .25s ease, opacity .6s ease;
}
.sprite-frame img.is-eva {
	transition: opacity .5s ease;
}
.sprite-frame img.is-eva.is-revealed {
	transition: filter .25s ease, opacity .5s ease;
}
.sprite-frame img:not([src]) { display: none; }
.sprite-caption {
	position: absolute;
	bottom: 12px;
	z-index: 2;
	margin: 0;
	color: var(--game-muted);
	font-size: .65rem;
	letter-spacing: .24em;
}
.game-status {
	min-height: 1.5em;
	margin: 0 0 14px;
	color: var(--game-muted);
	text-align: center;
}
.revealed-name {
	color: var(--gold);
	font-weight: 700;
}
.character-name-link {
	color: var(--gold);
	cursor: pointer;
	font-weight: 700;
	text-decoration-color: var(--gold);
	text-underline-offset: 3px;
}
.character-name-link:hover {
	color: var(--gold);
}
.character-name-with-aliases {
	display: inline-flex;
	align-items: baseline;
	gap: .25em;
}
.character-alias-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--gold);
	font: inherit;
	line-height: 1;
	cursor: pointer;
}
.character-alias-button:hover {
	color: var(--text);
}
.character-alias-button:focus-visible {
	border-radius: 2px;
	outline: 2px solid var(--gold);
	outline-offset: 3px;
}
.character-alias-icon {
	font-size: .85em;
}
.character-name-aliases {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 5;
	width: max-content;
	max-width: min(280px, 80vw);
	padding: 8px 10px;
	border: 1px solid var(--stone);
	border-radius: 7px;
	background: var(--cavern-light);
	box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
	color: var(--text);
	font-size: .82rem;
	font-weight: 400;
	line-height: 1.4;
	text-align: left;
	white-space: normal;
	overflow-wrap: anywhere;
	opacity: 0;
	pointer-events: auto;
	visibility: hidden;
	transition: opacity .12s ease, visibility .12s ease;
}
.character-name-aliases.is-visible {
	opacity: 1;
	visibility: visible;
}
.guess-form label,
.name-pattern-panel h2 {
	display: block;
	margin: 0 0 8px;
	color: var(--game-muted);
	font-size: .85rem;
	font-weight: 600;
}
.guess-controls {
	display: flex;
	gap: 8px;
}
.guess-controls input {
	min-width: 0;
	min-height: 48px;
	flex: 1;
	padding: 10px 12px;
	border: 1px solid var(--stone);
	border-radius: 8px;
	background: var(--page-bg);
	color: var(--text);
	font: inherit;
}
.guess-controls input:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}
.guess-button,
.next-button {
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--stone);
	border-radius: 8px;
	background: var(--cavern-light);
	color: var(--text);
	font: inherit;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.guess-button {
	scroll-margin-block: 160px 0;
}
.guess-button:hover:not(:disabled),
.next-button:hover {
	transform: translateY(-1px);
	border-color: var(--glow);
	background: var(--surface-hover);
}
.guess-button:focus-visible,
.next-button:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}
.guess-button:disabled,
.name-button:disabled { cursor: default; opacity: .6; }
.name-pattern-panel {
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid var(--stone);
}
.name-pattern-line {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 12px;
}
.name-pattern-panel h2 {
	margin: 0;
	color: var(--gold);
	text-transform: uppercase;
	letter-spacing: .1em;
}
.name-pattern-display {
	margin: 0;
	color: var(--glow);
	font-weight: 700;
	font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
	letter-spacing: .08em;
	white-space: pre;
}
.name-button {
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid var(--stone);
	border-radius: 8px;
	background: transparent;
	color: var(--glow);
	font: inherit;
	cursor: pointer;
}
.reveal-name-button {
	margin-left: 8px;
	border-color: #8b5555;
	color: #e49b9b;
}
.reveal-name-button:hover:not(:disabled) {
	border-color: #c97878;
	background: rgb(126 50 50 / 20%);
}
.name-button:hover:not(:disabled) {
	border-color: var(--glow);
	background: var(--surface-hover);
}
.name-button:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}
.next-button {
	display: block;
	width: 100%;
	margin-top: 14px;
	border-color: var(--gold);
	color: var(--gold);
}
.next-button[hidden] { display: none; }
.setup-note {
	max-width: 590px;
	margin: -8px 0 0;
	color: var(--game-muted);
	font-size: .88rem;
	line-height: 1.7;
	text-align: center;
}
.setup-note code {
	color: var(--glow);
	font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
	font-size: .9em;
}
.daily-summary {
	width: min(100%, 760px);
	padding: 24px;
	border: 1px solid var(--stone);
	border-radius: 14px;
	background: linear-gradient(160deg, var(--cavern-light), var(--page-bg));
	box-shadow: 0 22px 70px rgb(0 0 0 / 25%);
}
.daily-summary h2 {
	margin: 0;
	color: var(--gold);
	font-family: "Trajan Pro", Georgia, "Times New Roman", serif;
	font-size: clamp(1.6rem, 5vw, 2.2rem);
	font-weight: 700;
	text-align: center;
}
.summary-date,
.no-replay-note {
	color: var(--game-muted);
	text-align: center;
}
.summary-share-text {
	margin: 20px 0;
	color: var(--text);
	font: inherit;
	font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
	line-height: 1.6;
	text-align: center;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.summary-copy {
	margin: 0 0 18px;
	text-align: center;
}
.copy-summary-button {
	min-height: 42px;
	padding: 9px 16px;
	border: 1px solid var(--gold);
	border-radius: 8px;
	background: var(--cavern-light);
	color: var(--gold);
	font: inherit;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.copy-summary-button:hover {
	transform: translateY(-1px);
	border-color: var(--glow);
	background: var(--surface-hover);
}
.copy-summary-button:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}
.back-to-games {
	display: flex;
	justify-content: center;
	margin: 18px 0;
	padding-bottom: 8px;
}
.summary-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--stone);
	border-radius: 8px;
}
.summary-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}
.summary-table th,
.summary-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--stone);
	white-space: nowrap;
}
.summary-table th {
	color: var(--gold);
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .06em;
}
.summary-table td { color: var(--text); }
.summary-table .character-name-link {
	color: var(--gold);
	font-weight: 700;
	text-decoration: none;
}
.summary-table .character-name-link:hover { text-decoration: underline; }
.summary-table tbody tr:last-child td { border-bottom: 0; }
.disclaimer,
.alias-note {
	margin: 12px 0 0;
	text-align: center;
}
.alias-note .character-alias-icon {
	color: var(--gold);
}
.no-replay-note {
	margin: 18px 0 0;
	font-size: .9rem;
}
@media (max-width: 600px) {
	.game-shell { gap: 22px; padding: 38px 0 32px; }
	.game-picker { grid-template-columns: 1fr; gap: 14px; }
	.game-picker > .game-edition:last-child { width: 100%; }
	.game-edition { padding: 18px; }
	.game-card { padding: 16px; }
	.archive-calendar,
	.archive-challenge-options { padding: 16px 12px; }
	.archive-calendar-grid { gap: 4px; }
	.archive-day-empty,
	.archive-day { min-height: 48px; }
	.archive-mode-list { grid-template-columns: 1fr; }
	.archive-mode-list > .archive-mode-edition:last-child { width: 100%; }
	.daily-summary { padding: 18px 14px; }
	.sprite-frame { min-height: 235px; }
	.sprite-frame img { height: 190px; }
}
