:root {
	color-scheme: light;
}

* {
	box-sizing: border-box;
}

html {
	background: #f2f6f0;
	height: 100%;
}

body {
	color: #111827;
	font-family: Arial, sans-serif;
	margin: 0;
	min-height: 100%;
}

body.play-page {
	background: #f6f1e5;
	height: 100%;
	overflow: hidden;
	touch-action: none;
	width: 100%;
}

body.site-page {
	background:
		linear-gradient(180deg, rgba(31, 138, 112, 0.1), rgba(31, 138, 112, 0) 260px),
		#f2f6f0;
	overflow-x: hidden;
}

a {
	color: #1f6b5c;
	font-weight: 800;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

.play-page canvas {
	display: block;
	height: 100vh;
	height: 100dvh;
	width: 100vw;
}

.site-header {
	align-items: center;
	background: rgba(255, 250, 242, 0.94);
	border-bottom: 1px solid rgba(17, 24, 39, 0.12);
	display: flex;
	gap: 18px;
	justify-content: space-between;
	min-height: 68px;
	padding: 12px clamp(16px, 4vw, 44px);
	position: sticky;
	top: 0;
	z-index: 5;
}

.brand {
	align-items: center;
	color: #111827;
	display: inline-flex;
	font-size: 22px;
	gap: 10px;
	letter-spacing: 0;
	line-height: 1;
	white-space: nowrap;
}

.brand:hover {
	text-decoration: none;
}

.brand-mark {
	align-items: center;
	background: #263238;
	border-radius: 8px;
	color: #f8fbf8;
	display: inline-flex;
	font-size: 18px;
	height: 36px;
	justify-content: center;
	width: 36px;
}

.primary-nav,
.account-nav,
.account-panel-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.primary-nav {
	margin-left: auto;
}

.account-nav,
.account-panel-actions {
	color: #40515a;
	font-size: 14px;
	justify-content: flex-end;
}

.account-panel-actions {
	justify-content: flex-start;
	margin-top: 12px;
}

.account-summary {
	align-items: center;
	display: inline-flex;
	gap: 8px;
	min-width: 0;
}

.account-name {
	color: #111827;
	font-weight: 800;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.account-pearls {
	background: #fff7d6;
	border: 1px solid rgba(149, 107, 16, 0.28);
	border-radius: 999px;
	color: #6f4e08;
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	padding: 5px 8px;
	white-space: nowrap;
}

.account-nav a.unread-messages {
	color: #b3261e;
}

.site-main {
	margin: 0 auto;
	max-width: 1120px;
	min-width: 0;
	padding: clamp(28px, 5vw, 58px) clamp(16px, 4vw, 44px) 64px;
	width: 100%;
}

.site-footer {
	border-top: 1px solid rgba(17, 24, 39, 0.12);
	color: #40515a;
	font-size: 13px;
	margin: 0 auto;
	max-width: 1120px;
	padding: 22px clamp(16px, 4vw, 44px) 32px;
	width: 100%;
}

.site-footer p {
	margin: 0;
}

.page-title {
	border-bottom: 1px solid rgba(17, 24, 39, 0.12);
	margin-bottom: 30px;
	padding-bottom: 24px;
}

.eyebrow {
	color: #1f6b5c;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.page-title h1 {
	color: #111827;
	font-size: clamp(38px, 7vw, 72px);
	letter-spacing: 0;
	line-height: 0.95;
	margin: 0;
}

.page-title p:last-of-type {
	color: #40515a;
	font-size: clamp(16px, 2vw, 20px);
	font-weight: 700;
	line-height: 1.45;
	margin: 16px 0 0;
	max-width: 680px;
}

.title-action {
	align-items: center;
	background: #1f8a70;
	border: 1px solid #146655;
	border-radius: 8px;
	color: #ffffff;
	display: inline-flex;
	font-size: 14px;
	font-weight: 900;
	height: 44px;
	justify-content: center;
	margin-top: 18px;
	padding: 0 18px;
	text-align: center;
}

.title-action:hover {
	background: #146655;
	text-decoration: none;
}

.profile-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.home-grid {
	align-items: start;
	display: grid;
	gap: clamp(28px, 5vw, 56px);
	grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
	min-width: 0;
}

.news-section,
.home-links,
.link-section,
.puzzle-list-section,
.puzzle-solves-page,
.leaderboard-section {
	min-width: 0;
}

.news-section h2,
.link-section h2,
.puzzle-list-section h2,
.puzzle-solves-page h2,
.leaderboard-section h2 {
	color: #111827;
	font-size: 22px;
	line-height: 1.15;
	margin: 0 0 16px;
}

.announcement-list,
.puzzle-list {
	display: grid;
	gap: 14px;
}

.puzzle-list-header {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	justify-content: space-between;
	margin: 0 0 16px;
}

.puzzle-list-header h2 {
	margin: 0;
}

.puzzle-sort-control {
	align-items: center;
	display: inline-flex;
	gap: 10px;
}

.puzzle-sort-control span {
	color: #40515a;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.puzzle-sort-control select {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.2);
	border-radius: 8px;
	color: #111827;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	min-height: 40px;
	min-width: 180px;
	padding: 0 34px 0 12px;
}

.announcement-card,
.puzzle-card {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	min-width: 0;
}

.announcement-card {
	padding: 22px;
}

.announcement-date {
	color: #7c3f12;
	font-size: 12px;
	font-weight: 900;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.announcement-card h3,
.puzzle-card h3 {
	color: #111827;
	font-size: 22px;
	line-height: 1.15;
	margin: 0;
}

.announcement-message,
.announcement-text p,
.link-section p {
	color: #40515a;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
	margin: 10px 0 0;
	overflow-wrap: anywhere;
}

.announcement-text {
	display: grid;
	gap: 8px;
	margin-top: 10px;
}

.announcement-text p,
.announcement-message {
	margin: 0;
}

.announcement-message {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	padding: 18px;
}

.home-links {
	display: grid;
	gap: 28px;
}

.link-section {
	border-top: 3px solid #263238;
	padding-top: 16px;
}

.primary-action,
.puzzle-action {
	align-items: center;
	background: #1f8a70;
	border: 1px solid #146655;
	border-radius: 8px;
	color: #ffffff;
	display: inline-flex;
	font-size: 14px;
	font-weight: 900;
	height: 44px;
	justify-content: center;
	margin-top: 16px;
	padding: 0 18px;
	text-align: center;
}

.primary-action:hover,
.puzzle-action:hover {
	background: #146655;
	text-decoration: none;
}

.puzzle-list {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.puzzle-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 176px;
	padding: 22px;
}

.puzzle-card.is-solved {
	border-color: rgba(31, 138, 112, 0.55);
	box-shadow: 0 12px 26px rgba(31, 138, 112, 0.13);
}

.puzzle-card-text {
	display: grid;
	gap: 10px;
}

.puzzle-card-heading {
	align-items: flex-start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	min-width: 0;
}

.puzzle-card-heading h3 {
	min-width: 0;
	overflow-wrap: anywhere;
}

.puzzle-solved-badge {
	background: #e6f6ef;
	border: 1px solid rgba(31, 138, 112, 0.3);
	border-radius: 999px;
	color: #146655;
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	padding: 6px 8px;
	text-transform: uppercase;
}

.puzzle-solver-count {
	color: #40515a;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.4;
	margin: 18px 0 0;
}

.puzzle-card-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

.puzzle-action {
	align-self: flex-start;
}

.puzzle-card-actions .puzzle-action,
.puzzle-card-actions .puzzle-solves-link {
	align-self: auto;
	margin-top: 0;
}

.puzzle-solves-link {
	align-items: center;
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.22);
	border-radius: 8px;
	color: #146655;
	display: inline-flex;
	font-size: 14px;
	font-weight: 900;
	height: 44px;
	justify-content: center;
	padding: 0 18px;
	text-align: center;
}

.puzzle-solves-link:hover {
	background: #edf7f2;
	text-decoration: none;
}

.puzzle-solves {
	border-top: 1px solid rgba(17, 24, 39, 0.12);
	margin-top: 18px;
	padding-top: 16px;
}

.puzzle-solves h4 {
	color: #111827;
	font-size: 14px;
	line-height: 1.2;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.solve-list {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0;
	max-height: 340px;
	overflow: auto;
	padding: 0;
}

.solve-entry {
	align-items: start;
	display: grid;
	gap: 4px 10px;
	grid-template-columns: minmax(0, 1fr) auto;
	min-width: 0;
}

.solve-player {
	color: #111827;
	font-size: 14px;
	font-weight: 800;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.solve-meta {
	color: #40515a;
	font-size: 12px;
	font-weight: 700;
	grid-column: 1 / -1;
	line-height: 1.35;
}

.solve-analysis-link {
	font-size: 12px;
	grid-column: 2;
	grid-row: 1;
	white-space: nowrap;
}

.solve-message {
	color: #40515a;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}

.solve-toolbar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin: 0 0 16px;
}

.solve-sort-label {
	color: #40515a;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.solve-sort-toggle {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.14);
	border-radius: 8px;
	display: inline-grid;
	gap: 3px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 3px;
}

.solve-sort-toggle button {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: #40515a;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 900;
	min-height: 34px;
	padding: 0 14px;
}

.solve-sort-toggle button.active {
	background: #1f8a70;
	color: #ffffff;
}

.puzzle-solves-page .solve-list {
	max-height: none;
	overflow: visible;
}

.puzzle-solves-page .solve-entry {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	padding: 16px;
}

.site-main > .leaderboard-section {
	margin-top: 34px;
}

.leaderboard-panel {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	min-width: 0;
	overflow: hidden;
}

.leaderboard-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.leaderboard-entry {
	align-items: center;
	border-bottom: 1px solid rgba(17, 24, 39, 0.1);
	display: grid;
	gap: 12px;
	grid-template-columns: 32px minmax(0, 1fr) auto;
	min-height: 54px;
	padding: 12px 14px;
}

.leaderboard-entry:last-child {
	border-bottom: 0;
}

.leaderboard-rank,
.leaderboard-count {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.leaderboard-rank {
	color: #7c3f12;
	font-size: 14px;
	font-weight: 900;
	text-align: center;
}

.leaderboard-name {
	color: #111827;
	font-size: 15px;
	font-weight: 800;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.leaderboard-count {
	color: #1f6b5c;
	font-size: 13px;
	font-weight: 900;
	text-align: right;
}

.leaderboard-message {
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
	padding: 18px;
}

.profile-main {
	max-width: 1180px;
}

.profile-status {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 18px;
	padding: 14px 16px;
}

.profile-status[hidden] {
	display: none;
}

.profile-status.error {
	color: #b3261e;
}

.profile-stats {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-bottom: 30px;
}

.profile-stat,
.profile-card,
.profile-message {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	min-width: 0;
}

.profile-stat {
	display: grid;
	gap: 6px;
	padding: 18px;
}

.profile-stat:focus-within {
	border-color: rgba(31, 107, 92, 0.45);
}

.profile-stat strong {
	color: #111827;
	font-size: 30px;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.profile-stat span {
	color: #40515a;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.25;
	text-transform: uppercase;
}

.profile-stat-link {
	color: #1f6b5c;
	text-decoration: underline;
	text-transform: none;
}

.profile-stat-link:hover {
	color: #164b40;
}

.profile-layout {
	align-items: start;
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.profile-section {
	min-width: 0;
}

.profile-badges-section {
	margin-bottom: 30px;
}

.profile-section h2 {
	color: #111827;
	font-size: 22px;
	line-height: 1.15;
	margin: 0 0 16px;
}

.profile-list {
	display: grid;
	gap: 14px;
}

.profile-badge-list {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.profile-badge-card {
	align-items: center;
	background:
		linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(26, 44, 54, 0.96) 54%, rgba(22, 64, 59, 0.98));
	border: 1px solid rgba(245, 200, 76, 0.42);
	border-radius: 8px;
	box-shadow: 0 14px 30px rgba(17, 24, 39, 0.16);
	color: #f8fbf8;
	display: grid;
	gap: 16px;
	grid-template-columns: 88px minmax(0, 1fr);
	min-width: 0;
	overflow: hidden;
	padding: 16px;
	position: relative;
}

.profile-badge-card::after {
	background: linear-gradient(90deg, rgba(245, 200, 76, 0), rgba(245, 200, 76, 0.2), rgba(245, 200, 76, 0));
	content: "";
	height: 1px;
	left: 14px;
	position: absolute;
	right: 14px;
	top: 12px;
}

.profile-badge-body {
	min-width: 0;
}

.profile-badge-body h3 {
	color: #ffffff;
	font-size: 20px;
	line-height: 1.15;
	margin: 0;
	overflow-wrap: anywhere;
}

.profile-badge-tier {
	color: #f5c84c;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 7px 0 0;
	text-transform: uppercase;
}

.profile-badge-detail {
	color: #d8f4ee;
	font-size: 13px;
	font-weight: 750;
	line-height: 1.35;
	margin: 8px 0 0;
	overflow-wrap: anywhere;
}

.empty-enigmas-badge-icon {
	display: block;
	height: auto;
	max-width: 92px;
	width: 100%;
}

.empty-enigmas-badge-icon .badge-shadow {
	fill: rgba(0, 0, 0, 0.24);
	transform: translateY(3px);
}

.empty-enigmas-badge-icon .badge-rim {
	fill: #b8842f;
}

.empty-enigmas-badge-icon .badge-face {
	fill: #10202a;
}

.empty-enigmas-badge-icon .badge-void {
	fill: #061016;
	stroke: #29a88e;
	stroke-width: 3;
}

.empty-enigmas-badge-icon .badge-maze,
.empty-enigmas-badge-icon .badge-rays {
	fill: none;
	stroke: #d9fff5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 5;
}

.empty-enigmas-badge-icon .badge-gem,
.empty-enigmas-badge-icon .badge-crown {
	fill: #f5c84c;
	stroke: #fff1a6;
	stroke-linejoin: round;
	stroke-width: 2;
}

.empty-enigmas-badge-icon.badge-tier-entry .badge-rim {
	fill: #8d948f;
}

.empty-enigmas-badge-icon.badge-tier-entry .badge-void {
	stroke: #79d9c8;
}

.empty-enigmas-badge-icon.badge-tier-half .badge-rim {
	fill: #29a88e;
}

.empty-enigmas-badge-icon.badge-tier-half .badge-gem {
	fill: #7be0cf;
	stroke: #d9fff5;
}

.empty-enigmas-badge-icon.badge-tier-complete .badge-rim {
	fill: #f5c84c;
}

.empty-enigmas-badge-icon.badge-tier-complete .badge-face {
	fill: #162133;
}

.empty-enigmas-badge-icon.badge-tier-complete .badge-void {
	stroke: #e95f7a;
}

.profile-card {
	padding: 18px;
}

.profile-card-header {
	align-items: start;
	display: flex;
	gap: 14px;
	justify-content: space-between;
}

.profile-card h3 {
	color: #111827;
	font-size: 21px;
	line-height: 1.15;
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.profile-meta {
	border-top: 1px solid rgba(17, 24, 39, 0.12);
	display: grid;
	gap: 8px 14px;
	grid-template-columns: auto minmax(0, 1fr);
	margin: 14px 0 0;
	padding-top: 14px;
}

.profile-meta dt {
	color: #40515a;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.profile-meta dd {
	color: #111827;
	font-size: 14px;
	font-weight: 800;
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.profile-message {
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
	padding: 18px;
}

.inventory-main,
.quest-main {
	max-width: 980px;
}

.inventory-list,
.quest-list {
	display: grid;
	gap: 14px;
}

.inventory-item-card,
.quest-card {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	min-width: 0;
	padding: 18px;
}

.inventory-item-card {
	align-items: start;
	display: grid;
	gap: 16px;
	grid-template-columns: 68px minmax(0, 1fr);
}

.item-icon-canvas {
	background: #eef6f2;
	border: 1px solid rgba(31, 107, 92, 0.18);
	border-radius: 8px;
	display: block;
	height: 64px;
	width: 64px;
}

.inventory-item-body {
	min-width: 0;
}

.inventory-item-body h3,
.quest-card h3 {
	color: #111827;
	font-size: 22px;
	line-height: 1.15;
	margin: 0;
	overflow-wrap: anywhere;
}

.inventory-item-body p,
.quest-title-block p {
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	margin: 8px 0 0;
}

.inventory-item-meta {
	margin-top: 14px;
}

.quest-card {
	display: grid;
	gap: 16px;
}

.quest-card-header,
.quest-reward {
	align-items: start;
	display: flex;
	gap: 14px;
	justify-content: space-between;
	min-width: 0;
}

.quest-title-block {
	min-width: 0;
}

.quest-state {
	border: 1px solid rgba(31, 107, 92, 0.22);
	border-radius: 999px;
	color: #1f6b5c;
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	padding: 7px 9px;
	text-transform: uppercase;
	white-space: nowrap;
}

.quest-state.ready {
	background: #e7f4ef;
}

.quest-state.collected {
	background: #263238;
	border-color: #263238;
	color: #f8fbf8;
}

.quest-objective-list {
	display: grid;
	gap: 8px;
}

.quest-objective {
	align-items: center;
	background: #fffdf8;
	border: 1px solid rgba(17, 24, 39, 0.1);
	border-radius: 8px;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	min-width: 0;
	padding: 12px 14px;
}

.quest-objective span {
	color: #111827;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.3;
	min-width: 0;
	overflow-wrap: anywhere;
}

.quest-objective strong {
	color: #40515a;
	flex: 0 0 auto;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.quest-objective.complete {
	border-color: rgba(31, 107, 92, 0.34);
}

.quest-objective.complete strong {
	color: #1f6b5c;
}

.quest-reward {
	border-top: 1px solid rgba(17, 24, 39, 0.12);
	padding-top: 16px;
}

.quest-reward-detail {
	align-items: center;
	display: flex;
	gap: 12px;
	min-width: 0;
}

.quest-reward-label {
	color: #40515a;
	display: block;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.2;
	text-transform: uppercase;
}

.quest-reward-detail strong {
	color: #111827;
	display: block;
	font-size: 18px;
	line-height: 1.2;
	margin-top: 3px;
	overflow-wrap: anywhere;
}

.quest-collect-action {
	flex: 0 0 auto;
}

.discuss-main {
	max-width: 1180px;
}

.discuss-layout {
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr);
}

.discuss-section,
.discuss-compose {
	min-width: 0;
}

.discuss-section h2,
.discuss-compose h2 {
	color: #111827;
	font-size: 22px;
	line-height: 1.15;
	margin: 0 0 16px;
}

.discussion-topic-list,
.discussion-comment-list {
	display: grid;
	gap: 14px;
}

.discussion-comment-thread,
.discussion-reply-list {
	display: grid;
	gap: 10px;
}

.discussion-reply-list {
	border-left: 3px solid rgba(31, 107, 92, 0.18);
	margin-left: 22px;
	padding-left: 14px;
}

.discussion-topic-card,
.discussion-comment-card,
.discussion-message,
.discuss-compose {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	min-width: 0;
}

.discussion-topic-card,
.discussion-comment-card,
.discuss-compose {
	padding: 18px;
}

.discussion-reply-card {
	background: #fffdf8;
	box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

.discussion-topic-header {
	align-items: start;
	display: flex;
	gap: 14px;
	justify-content: space-between;
	min-width: 0;
}

.discussion-topic-badges {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.discussion-topic-card h3 {
	color: #111827;
	font-size: 22px;
	line-height: 1.15;
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.discussion-comment-count {
	background: #eef6f2;
	border: 1px solid rgba(31, 107, 92, 0.2);
	border-radius: 999px;
	color: #1f6b5c;
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	padding: 7px 9px;
	white-space: nowrap;
}

.hidden-discussion-post {
	background: #f6f3ec;
	border-color: rgba(79, 70, 60, 0.26);
}

.discussion-moderation-badge {
	background: #f4e9dc;
	border: 1px solid rgba(132, 75, 36, 0.22);
	border-radius: 999px;
	color: #7a3f1d;
	display: inline-flex;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.2;
	margin: 10px 0 0;
	padding: 6px 9px;
	width: fit-content;
}

.discussion-meta,
.discussion-message,
.discussion-status,
.discussion-markdown,
.discussion-preview-placeholder {
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

.discussion-meta {
	font-size: 13px;
	margin: 10px 0 0;
}

.discussion-post-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.secondary-action.discussion-like-action {
	gap: 6px;
	min-height: 34px;
	padding: 0 10px;
}

.secondary-action.discussion-like-action[aria-pressed="true"],
.secondary-action.discussion-like-action.liked {
	background: #eef6f2;
	border-color: rgba(31, 107, 92, 0.34);
	color: #1f6b5c;
}

.discussion-topic-badges .discussion-like-action {
	font-size: 12px;
	min-height: 31px;
}

.discussion-moderation-action {
	border-color: rgba(122, 63, 29, 0.4);
	color: #7a3f1d;
}

.discussion-message {
	margin: 0;
	padding: 18px;
}

.discussion-status {
	margin: 0 0 12px;
}

.discussion-status.error {
	color: #b3261e;
}

.discussion-form {
	display: grid;
	gap: 14px;
}

.discussion-form label,
.discussion-field > label {
	color: #30434b;
	display: grid;
	font-size: 13px;
	font-weight: 800;
	gap: 7px;
}

.discussion-field,
.discussion-markdown-editor {
	display: grid;
	gap: 8px;
	min-width: 0;
}

.discussion-form input,
.discussion-form textarea {
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.22);
	border-radius: 8px;
	color: #111827;
	font: 600 16px Arial, sans-serif;
	line-height: 1.35;
	min-height: 44px;
	padding: 0 12px;
	width: 100%;
}

.discussion-form textarea {
	padding: 10px 12px;
	resize: vertical;
}

.discussion-markdown-toolbar {
	align-items: center;
	background: #f7fbf8;
	border: 1px solid rgba(17, 24, 39, 0.14);
	border-radius: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 6px;
}

.discussion-toolbar-button {
	align-items: center;
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.2);
	border-radius: 6px;
	color: #111827;
	cursor: pointer;
	display: inline-flex;
	font: 900 14px Arial, sans-serif;
	height: 34px;
	justify-content: center;
	min-width: 34px;
	padding: 0 9px;
}

.discussion-toolbar-button:hover,
.discussion-toolbar-button[aria-pressed="true"] {
	background: #edf4f1;
	border-color: rgba(31, 107, 92, 0.36);
}

.discussion-toolbar-button[data-discussion-markdown-command="italic"] {
	font-style: italic;
}

.discussion-toolbar-button[data-discussion-markdown-command="code"] {
	font-family: Consolas, Monaco, monospace;
}

.discussion-preview-toggle {
	margin-left: auto;
	min-width: 94px;
}

.discussion-markdown-preview {
	background: #ffffff;
	border: 1px dashed rgba(17, 24, 39, 0.24);
	border-radius: 8px;
	min-height: 80px;
	padding: 12px;
}

.discussion-markdown-preview .discussion-markdown {
	margin-top: 0;
}

.discussion-preview-placeholder {
	margin: 0;
}

.discussion-form .primary-action {
	border: 1px solid #146655;
	cursor: pointer;
	font: 900 14px Arial, sans-serif;
	margin-top: 0;
}

.discussion-form button:disabled {
	cursor: wait;
	opacity: 0.68;
}

.discussion-edit-form {
	margin-top: 14px;
}

.discussion-reply-form {
	margin-top: 14px;
}

.discussion-edit-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.discussion-edit-actions .primary-action {
	cursor: pointer;
	font: 900 14px Arial, sans-serif;
	margin-top: 0;
}

.discussion-markdown {
	display: grid;
	gap: 10px;
	margin-top: 14px;
	overflow-wrap: anywhere;
}

.discussion-markdown p,
.discussion-markdown ul {
	margin: 0;
}

.discussion-markdown ul {
	padding-left: 22px;
}

.discussion-markdown code {
	background: #edf4f1;
	border: 1px solid rgba(31, 107, 92, 0.16);
	border-radius: 5px;
	color: #111827;
	font: 700 0.95em Consolas, Monaco, monospace;
	padding: 1px 5px;
}

.discussion-edit-history {
	border-top: 1px solid rgba(17, 24, 39, 0.12);
	margin-top: 16px;
	padding-top: 12px;
}

.discussion-edit-history summary {
	color: #111827;
	cursor: pointer;
	font-size: 13px;
	font-weight: 900;
}

.discussion-edit-history-list {
	display: grid;
	gap: 12px;
	margin-top: 12px;
}

.discussion-edit-history-entry {
	border-left: 3px solid rgba(31, 107, 92, 0.26);
	padding-left: 12px;
}

.discussion-edit-history-entry .discussion-meta {
	margin-top: 0;
}

.discussion-edit-history-title {
	color: #111827;
	font-size: 15px;
	font-weight: 900;
	line-height: 1.35;
	margin: 8px 0 0;
	overflow-wrap: anywhere;
}

.discussion-comments-section,
.discussion-comment-compose {
	margin-top: 24px;
}

.contest-section,
.rules-section,
.guide-section,
.admin-form-section,
.admin-list-section,
.settings-section {
	min-width: 0;
}

.contest-section h2,
.rules-section h2,
.guide-section h2,
.admin-form-section h2,
.admin-list-section h2,
.settings-section h2 {
	color: #111827;
	font-size: 22px;
	line-height: 1.15;
	margin: 0 0 16px;
}

.rules-main {
	max-width: 960px;
}

.guide-main {
	max-width: 1000px;
}

.guide-layout {
	display: grid;
	gap: 34px;
}

.guide-steps {
	color: #40515a;
	display: grid;
	font-size: 16px;
	font-weight: 700;
	gap: 12px;
	line-height: 1.5;
	margin: 0;
	padding-left: 22px;
}

.guide-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-card {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	min-width: 0;
	padding: 18px;
}

.guide-card h3 {
	color: #111827;
	font-size: 19px;
	line-height: 1.2;
	margin: 0;
}

.guide-card p,
.guide-copy {
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	margin: 8px 0 0;
}

.guide-copy {
	margin-top: 0;
	max-width: 760px;
}

.guide-table-wrap {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	overflow-x: auto;
}

.guide-table {
	border-collapse: collapse;
	min-width: 560px;
	width: 100%;
}

.guide-table th,
.guide-table td {
	border-bottom: 1px solid rgba(17, 24, 39, 0.1);
	line-height: 1.45;
	padding: 13px 16px;
	text-align: left;
	vertical-align: top;
}

.guide-table tr:last-child th,
.guide-table tr:last-child td {
	border-bottom: 0;
}

.guide-table thead th {
	background: #263238;
	color: #f8fbf8;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.guide-table tbody th {
	color: #111827;
	font-size: 14px;
	font-weight: 900;
	white-space: nowrap;
	width: 180px;
}

.guide-table tbody td {
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
}

.rules-list {
	counter-reset: rules;
	display: grid;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.rule-item {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	counter-increment: rules;
	display: grid;
	gap: 8px;
	grid-template-columns: 34px minmax(0, 1fr);
	min-width: 0;
	padding: 18px;
}

.rule-item::before {
	align-items: center;
	background: #263238;
	border-radius: 8px;
	color: #f8fbf8;
	content: counter(rules);
	display: flex;
	font-size: 14px;
	font-weight: 900;
	height: 34px;
	justify-content: center;
	width: 34px;
}

.rule-item h3 {
	color: #111827;
	font-size: 19px;
	line-height: 1.2;
	margin: 0;
}

.rule-item p {
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
	grid-column: 2;
	line-height: 1.5;
	margin: 0;
}

.contest-list,
.admin-announcement-list,
.admin-contest-list {
	display: grid;
	gap: 18px;
}

.contest-list-section {
	display: grid;
	gap: 12px;
}

.contest-list-section h3 {
	color: #111827;
	font-size: 18px;
	line-height: 1.2;
	margin: 0;
}

.contest-list-items {
	display: grid;
	gap: 18px;
}

.contest-card,
.admin-announcement-card,
.admin-contest-card,
.admin-form-section,
.admin-list-section {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	min-width: 0;
}

.contest-card,
.admin-form-section,
.admin-list-section {
	padding: 22px;
}

.contest-card-header {
	align-items: start;
	display: flex;
	gap: 16px;
	justify-content: space-between;
}

.contest-title-group {
	min-width: 0;
}

.contest-card h3,
.admin-announcement-card h3,
.admin-contest-card h3 {
	color: #111827;
	font-size: 24px;
	line-height: 1.15;
	margin: 0;
	overflow-wrap: anywhere;
}

.contest-status {
	border: 1px solid rgba(17, 24, 39, 0.14);
	border-radius: 999px;
	color: #111827;
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 900;
	padding: 7px 10px;
	text-transform: uppercase;
}

.contest-status.active {
	background: #dff3e6;
	color: #175c38;
}

.contest-status.upcoming {
	background: #e8eef7;
	color: #244a7a;
}

.contest-status.ended {
	background: #f1e7df;
	color: #7c3f12;
}

.contest-status.pending {
	background: #fff1c7;
	color: #835400;
}

.contest-status.finalized {
	background: #e7f5ef;
	color: #1f6b5c;
}

.contest-status.hidden {
	background: #fff2ef;
	color: #b3261e;
}

.contest-meta {
	border-top: 1px solid rgba(17, 24, 39, 0.12);
	display: grid;
	gap: 8px 16px;
	grid-template-columns: auto minmax(0, 1fr);
	margin: 18px 0 0;
	padding-top: 16px;
}

.contest-meta dt {
	color: #40515a;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.contest-meta dd {
	color: #111827;
	font-size: 14px;
	font-weight: 800;
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

[data-contest-countdown] {
	font-variant-numeric: tabular-nums;
}

.contest-puzzles,
.contest-scoreboard,
.contest-clarifications {
	border-top: 1px solid rgba(17, 24, 39, 0.12);
	margin-top: 18px;
	padding-top: 16px;
}

.contest-puzzles h4,
.contest-scoreboard h4,
.contest-clarifications h4,
.admin-fieldset-header h3 {
	color: #111827;
	font-size: 14px;
	line-height: 1.2;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.contest-puzzle-list,
.contest-scoreboard-list {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.contest-puzzle-entry,
.contest-scoreboard-entry {
	align-items: center;
	display: grid;
	gap: 8px 12px;
	min-width: 0;
}

.contest-puzzle-entry {
	grid-template-columns: minmax(0, 1fr) auto auto;
}

.contest-scoreboard-entry {
	border-bottom: 1px solid rgba(17, 24, 39, 0.1);
	grid-template-columns: 32px minmax(0, 1fr) auto auto;
	padding-bottom: 10px;
}

.contest-scoreboard-entry:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.contest-puzzle-name {
	color: #111827;
	font-size: 14px;
	font-weight: 800;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.contest-puzzle-points,
.contest-pearl-count,
.contest-rank-time {
	color: #40515a;
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

.contest-pearl-count {
	color: #7c3f12;
}

.contest-puzzle-action {
	font-size: 12px;
	white-space: nowrap;
}

.contest-rank-time {
	grid-column: 2 / -1;
}

.contest-scoreboard-solves {
	display: grid;
	gap: 6px;
	grid-column: 2 / -1;
	list-style: none;
	margin: 2px 0 0;
	padding: 0;
}

.contest-scoreboard-solve {
	align-items: center;
	background: rgba(31, 107, 92, 0.07);
	border: 1px solid rgba(31, 107, 92, 0.14);
	border-radius: 6px;
	display: grid;
	gap: 6px 10px;
	grid-template-columns: minmax(0, 1fr) auto auto;
	min-width: 0;
	padding: 8px 10px;
}

.contest-scoreboard-solve-name {
	color: #111827;
	font-size: 12px;
	font-weight: 900;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.contest-scoreboard-solve-meta {
	color: #40515a;
	font-size: 12px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.contest-scoreboard-solve-analysis {
	font-size: 12px;
	white-space: nowrap;
}

.contest-clarification-header {
	align-items: start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.contest-clarification-status {
	color: #40515a;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.35;
	margin: 0;
	text-align: right;
}

.contest-clarification-status.error {
	color: #b3261e;
}

.contest-clarification-panel {
	display: grid;
	gap: 14px;
}

.contest-clarification-form {
	display: grid;
	gap: 10px;
}

.contest-clarification-form label {
	color: #30434b;
	display: grid;
	font-size: 13px;
	font-weight: 800;
	gap: 7px;
}

.contest-clarification-form textarea {
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.22);
	border-radius: 8px;
	color: #111827;
	font: 600 16px Arial, sans-serif;
	line-height: 1.35;
	min-height: 96px;
	padding: 10px 12px;
	resize: vertical;
	width: 100%;
}

.contest-clarification-actions {
	display: flex;
	justify-content: start;
}

.contest-clarification-list {
	display: grid;
	gap: 12px;
}

.contest-clarification-item {
	border-top: 1px solid rgba(17, 24, 39, 0.1);
	display: grid;
	gap: 7px;
	padding-top: 12px;
}

.contest-clarification-item h5,
.admin-clarification-card h4 {
	color: #111827;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.2;
	margin: 0;
	text-transform: uppercase;
}

.contest-clarification-meta {
	color: #64737b;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.35;
	margin: 0;
}

.contest-clarification-body,
.admin-clarification-body {
	color: #111827;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	margin: 0;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.contest-message,
.admin-status {
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
}

.contest-message {
	padding: 18px 0 0;
}

.contest-reward-summary {
	background: #fff7df;
	border: 1px solid rgba(124, 63, 18, 0.18);
	border-radius: 8px;
	color: #7c3f12;
	font-size: 14px;
	font-weight: 900;
	line-height: 1.4;
	margin: 0 0 12px;
	padding: 12px;
}

.contest-reward-summary.pending {
	background: #f7efe8;
	color: #40515a;
}

[data-contest-list] > .contest-message,
[data-admin-announcement-list] > .contest-message,
[data-admin-contest-clarification-list] > .contest-message,
[data-admin-contest-email-list] > .contest-message,
[data-admin-contest-list] > .contest-message,
[data-admin-puzzle-list] > .contest-message {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	padding: 18px;
}

.admin-status {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	margin-bottom: 18px;
	padding: 14px 16px;
}

.admin-section-header .admin-status {
	margin: 0;
}

.admin-status.error {
	color: #b3261e;
}

.admin-main {
	max-width: 1180px;
}

.admin-announcement-section,
.admin-email-section,
.admin-clarification-section,
.admin-visibility-section {
	border-bottom: 1px solid rgba(17, 24, 39, 0.12);
	margin-bottom: 28px;
	padding-bottom: 28px;
}

.admin-section-header {
	align-items: start;
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
	margin-bottom: 16px;
}

.admin-section-header h2 {
	font-size: 24px;
	line-height: 1.15;
	margin: 0;
}

.admin-section-header p:not(.admin-status) {
	color: #40515a;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.45;
	margin: 8px 0 0;
}

.admin-puzzle-list {
	display: grid;
	gap: 10px;
}

.admin-puzzle-visibility-row {
	align-items: center;
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	display: grid;
	gap: 14px;
	grid-template-columns: minmax(0, 1fr) auto auto auto auto;
	padding: 14px;
}

.admin-puzzle-visibility-row.hidden-puzzle {
	border-color: rgba(179, 38, 30, 0.32);
}

.admin-puzzle-visibility-text {
	min-width: 0;
}

.admin-puzzle-visibility-text h3 {
	font-size: 17px;
	line-height: 1.2;
	margin: 0;
	overflow-wrap: anywhere;
}

.admin-puzzle-visibility-text p {
	color: #40515a;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	margin: 6px 0 0;
	overflow-wrap: anywhere;
}

.admin-puzzle-state {
	background: #eef6f2;
	border: 1px solid rgba(31, 107, 92, 0.2);
	border-radius: 8px;
	color: #1f6b5c;
	font-size: 12px;
	font-weight: 900;
	min-width: 68px;
	padding: 8px 10px;
	text-align: center;
	text-transform: uppercase;
}

.hidden-puzzle .admin-puzzle-state {
	background: #fff2ef;
	border-color: rgba(179, 38, 30, 0.24);
	color: #b3261e;
}

.admin-puzzle-visibility-row .secondary-action {
	text-decoration: none;
}

.admin-announcement-layout,
.admin-email-layout,
.admin-contest-layout {
	align-items: start;
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(300px, 1fr) minmax(260px, 380px);
}

.admin-form {
	display: grid;
	gap: 14px;
}

.admin-form label {
	color: #30434b;
	display: grid;
	font-size: 13px;
	font-weight: 800;
	gap: 7px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.22);
	border-radius: 8px;
	color: #111827;
	font: 600 16px Arial, sans-serif;
	line-height: 1.35;
	min-height: 44px;
	padding: 0 12px;
	width: 100%;
}

.admin-form textarea {
	padding: 10px 12px;
	resize: vertical;
}

.admin-form .checkbox-field {
	align-items: center;
	display: flex;
	gap: 10px;
}

.admin-form .checkbox-field input {
	min-height: auto;
	width: auto;
}

.admin-puzzle-fieldset {
	border-top: 1px solid rgba(17, 24, 39, 0.12);
	margin-top: 4px;
	padding-top: 16px;
}

.admin-fieldset-header {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 12px;
}

.admin-fieldset-header h3 {
	margin: 0;
}

.admin-puzzle-rows {
	display: grid;
	gap: 10px;
}

.admin-puzzle-row {
	align-items: end;
	display: grid;
	gap: 10px;
	grid-template-columns: minmax(0, 1fr) 120px 40px;
}

.admin-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.admin-form-actions .primary-action {
	margin-top: 0;
}

.admin-clarification-filters {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	display: grid;
	gap: 14px;
	grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) auto;
	margin-bottom: 16px;
	padding: 16px;
}

.admin-clarification-filters .admin-form-actions {
	align-items: end;
}

.admin-email-preview {
	background: #eef6f2;
	border: 1px solid rgba(31, 107, 92, 0.18);
	border-radius: 8px;
	color: #1f6b5c;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.4;
	margin: 0;
	padding: 12px;
}

.admin-badge-preview {
	background: #f8fbf8;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	display: grid;
	gap: 12px;
	padding: 12px;
}

.admin-badge-preview-group {
	display: grid;
	gap: 10px;
}

.admin-badge-preview-title {
	color: #111827;
	font-size: 13px;
	font-weight: 900;
	line-height: 1.25;
	margin: 0;
	text-transform: uppercase;
}

.admin-badge-preview-list {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-badge-preview-item {
	align-items: center;
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	display: grid;
	gap: 8px;
	justify-items: center;
	min-width: 0;
	padding: 10px;
	text-align: center;
}

.admin-badge-preview-item .empty-enigmas-badge-icon {
	max-width: 70px;
}

.admin-badge-preview-item h4 {
	color: #111827;
	font-size: 13px;
	line-height: 1.2;
	margin: 0;
	overflow-wrap: anywhere;
}

.admin-badge-preview-item p {
	color: #40515a;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
	overflow-wrap: anywhere;
}

.admin-email-list {
	display: grid;
	gap: 12px;
}

.admin-clarification-list {
	display: grid;
	gap: 12px;
}

.admin-announcement-card,
.admin-contest-card {
	display: grid;
	gap: 12px;
	padding: 18px;
}

.admin-contest-card.hidden-contest {
	border-color: rgba(179, 38, 30, 0.32);
}

.admin-contest-card-header {
	align-items: start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.admin-contest-statuses {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: end;
}

.admin-contest-meta {
	color: #40515a;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
}

.admin-contest-badge-field {
	color: #30434b;
	display: grid;
	font-size: 13px;
	font-weight: 800;
	gap: 7px;
}

.admin-contest-badge-field select {
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.22);
	border-radius: 8px;
	color: #111827;
	font: 700 14px Arial, sans-serif;
	min-height: 40px;
	padding: 0 10px;
	width: 100%;
}

.admin-contest-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.admin-contest-actions .primary-action {
	cursor: pointer;
	font: 900 13px Arial, sans-serif;
	margin-top: 0;
}

.admin-clarification-answer-form {
	border-top: 1px solid rgba(17, 24, 39, 0.1);
	padding-top: 12px;
}

.secondary-action,
.icon-action {
	align-items: center;
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.18);
	border-radius: 8px;
	color: #111827;
	cursor: pointer;
	display: inline-flex;
	font: 900 13px Arial, sans-serif;
	justify-content: center;
	min-height: 40px;
	padding: 0 14px;
}

.icon-action {
	background: #263238;
	color: #f8fbf8;
	font-size: 18px;
	padding: 0;
	width: 40px;
}

.secondary-action:disabled,
.icon-action:disabled,
.primary-action:disabled,
.admin-form button:disabled {
	cursor: wait;
	opacity: 0.68;
}

.messages-main {
	max-width: 1180px;
}

.messages-layout {
	align-items: start;
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.messages-section {
	min-width: 0;
}

.messages-section-header,
.messages-thread-header {
	align-items: start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 14px;
}

.messages-section h2,
.messages-thread-header h2 {
	color: #111827;
	font-size: 22px;
	line-height: 1.15;
	margin: 0;
}

.messages-thread-header p {
	color: #40515a;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	margin: 6px 0 0;
}

.message-conversation-list,
.message-thread-list {
	display: grid;
	gap: 12px;
}

.message-thread-list {
	align-content: start;
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	max-height: 560px;
	min-height: 260px;
	overflow: auto;
	padding: 16px;
}

.message-conversation-card {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	color: #111827;
	display: grid;
	gap: 8px;
	padding: 16px;
}

.message-conversation-card:hover {
	text-decoration: none;
}

.message-conversation-card.selected {
	border-color: rgba(31, 107, 92, 0.48);
	box-shadow: 0 12px 28px rgba(31, 107, 92, 0.14);
}

.message-conversation-header {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: space-between;
	min-width: 0;
}

.message-conversation-header h3 {
	font-size: 18px;
	line-height: 1.15;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.message-unread-badge {
	background: #b3261e;
	border-radius: 999px;
	color: #ffffff;
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	padding: 5px 8px;
}

.message-preview,
.message-time {
	color: #40515a;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
	overflow-wrap: anywhere;
}

.message-time {
	color: #64737b;
	font-size: 12px;
}

.message-bubble {
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 12px;
	display: grid;
	gap: 6px;
	max-width: min(78%, 620px);
	padding: 12px 14px;
}

.message-bubble.received {
	background: #ffffff;
	justify-self: start;
}

.message-bubble.sent {
	background: #e9f5ef;
	border-color: rgba(31, 107, 92, 0.22);
	justify-self: end;
}

.message-bubble-meta {
	color: #64737b;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.3;
	margin: 0;
}

.message-bubble-body {
	color: #111827;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	margin: 0;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.message-compose-form {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	margin-top: 16px;
	padding: 18px;
}

.settings-main {
	max-width: 760px;
}

.settings-section {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	padding: 22px;
}

.settings-form .checkbox-field {
	align-items: center;
	display: flex;
	gap: 10px;
}

.settings-form .checkbox-field input {
	min-height: auto;
	width: auto;
}

.danger-action {
	color: #b3261e;
}

.auth-modal {
	align-items: center;
	background: rgba(17, 24, 39, 0.64);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 18px;
	position: fixed;
	touch-action: manipulation;
	z-index: 10;
}

.auth-modal[hidden] {
	display: none;
}

.auth-dialog {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.18);
	border-radius: 8px;
	box-shadow: 0 18px 54px rgba(17, 24, 39, 0.28);
	color: #111827;
	display: flex;
	flex-direction: column;
	font-family: Arial, sans-serif;
	gap: 14px;
	max-width: 380px;
	padding: 22px;
	width: min(100%, 380px);
}

.auth-header {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: space-between;
}

.auth-header h1 {
	font-size: 24px;
	line-height: 1;
	margin: 0;
}

#auth-close {
	align-items: center;
	background: #263238;
	border: 0;
	border-radius: 8px;
	color: #f8fbf8;
	cursor: pointer;
	display: flex;
	font-size: 24px;
	font-weight: 800;
	height: 38px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	width: 38px;
}

.auth-message {
	color: #40515a;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
	min-height: 19px;
}

.auth-message.error {
	color: #b3261e;
}

.auth-dialog label {
	color: #30434b;
	display: flex;
	flex-direction: column;
	font-size: 13px;
	font-weight: 800;
	gap: 7px;
}

.auth-dialog label[hidden] {
	display: none;
}

.auth-dialog input {
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.22);
	border-radius: 8px;
	color: #111827;
	font: 600 16px Arial, sans-serif;
	height: 44px;
	padding: 0 12px;
	touch-action: manipulation;
	width: 100%;
}

.auth-actions {
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr 1fr;
}

.auth-actions button {
	border: 1px solid rgba(17, 24, 39, 0.18);
	border-radius: 8px;
	cursor: pointer;
	font: 800 14px Arial, sans-serif;
	height: 44px;
	touch-action: manipulation;
}

#auth-submit {
	background: #1f8a70;
	color: #ffffff;
}

#auth-mode {
	background: #ffffff;
	color: #111827;
}

.auth-dialog button:disabled {
	cursor: wait;
	opacity: 0.68;
}

.analysis-main {
	display: grid;
	gap: 10px;
	grid-template-rows: auto minmax(0, 1fr);
	height: calc(100vh - 52px);
	height: calc(100dvh - 52px);
	max-width: none;
	min-height: 0;
	padding: 10px clamp(10px, 2vw, 24px) 12px;
}

body.analysis-page {
	height: 100%;
	overflow: hidden;
	touch-action: none;
	width: 100%;
}

.analysis-page .site-header {
	min-height: 52px;
	padding-bottom: 8px;
	padding-top: 8px;
	position: static;
}

.analysis-page .brand {
	font-size: 18px;
}

.analysis-page .primary-nav,
.analysis-page .account-nav,
.analysis-page .site-footer {
	display: none;
}

.analysis-page .page-title {
	align-items: baseline;
	border-bottom: 0;
	display: flex;
	gap: 12px;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.analysis-page .page-title .eyebrow {
	display: none;
}

.analysis-page .page-title h1 {
	font-size: clamp(20px, 3vw, 30px);
	line-height: 1.1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.analysis-page .page-title p:last-of-type {
	font-size: 13px;
	line-height: 1.2;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.analysis-status {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	color: #40515a;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
	padding: 18px;
}

.analysis-layout {
	align-items: stretch;
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(320px, 1fr) minmax(260px, 340px);
	height: 100%;
	min-height: 0;
}

.analysis-board-panel,
.analysis-sidebar {
	background: #fffaf2;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
	height: 100%;
	min-width: 0;
}

.analysis-board-panel {
	display: flex;
	min-height: 0;
	overflow: hidden;
	padding: 0;
}

.analysis-canvas {
	display: block;
	flex: 1;
	height: 100%;
	min-height: 0;
	min-width: 0;
	width: 100%;
}

.analysis-cell {
	align-items: center;
	border-bottom: 1px solid rgba(17, 24, 39, 0.42);
	border-right: 1px solid rgba(17, 24, 39, 0.42);
	color: #18212f;
	display: flex;
	font-size: 28px;
	font-weight: 600;
	justify-content: center;
	line-height: 1;
	min-height: 0;
	min-width: 0;
	position: relative;
}

.analysis-cell.given {
	background: rgba(24, 33, 47, 0.06);
	color: #0f172a;
	font-weight: 900;
}

.analysis-cell.box-right {
	border-right: 3px solid #111827;
}

.analysis-cell.box-bottom {
	border-bottom: 3px solid #111827;
}

.analysis-center-notes {
	color: #30434b;
	font-size: 13px;
	font-weight: 800;
	left: 50%;
	line-height: 1;
	max-width: 72%;
	overflow-wrap: anywhere;
	position: absolute;
	text-align: center;
	top: 50%;
	transform: translate(-50%, -50%);
}

.analysis-corner-notes {
	color: #455a64;
	font-size: 10px;
	font-weight: 800;
	inset: 8%;
	line-height: 1;
	pointer-events: none;
	position: absolute;
}

.analysis-corner-notes span {
	max-width: 44%;
	overflow: hidden;
	position: absolute;
	text-overflow: clip;
	white-space: nowrap;
}

.analysis-corner-notes span:nth-child(1) {
	left: 0;
	top: 0;
}

.analysis-corner-notes span:nth-child(2) {
	right: 0;
	text-align: right;
	top: 0;
}

.analysis-corner-notes span:nth-child(3) {
	bottom: 0;
	left: 0;
}

.analysis-corner-notes span:nth-child(4) {
	bottom: 0;
	right: 0;
	text-align: right;
}

.analysis-sidebar {
	display: grid;
	gap: 14px;
	min-height: 0;
	overflow: hidden;
	padding: 16px;
}

.analysis-summary dl {
	display: grid;
	gap: 8px 14px;
	grid-template-columns: auto minmax(0, 1fr);
	margin: 0;
}

.analysis-summary dt {
	color: #40515a;
	font-size: 13px;
	font-weight: 900;
	text-transform: uppercase;
}

.analysis-summary dd {
	color: #111827;
	font-size: 14px;
	font-weight: 800;
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.analysis-step {
	border-top: 1px solid rgba(17, 24, 39, 0.12);
	padding-top: 12px;
}

.analysis-step-label {
	color: #111827;
	font-size: 16px;
	font-weight: 900;
	line-height: 1.25;
	margin: 0;
	overflow-wrap: anywhere;
}

.analysis-step-time,
.analysis-count {
	color: #1f6b5c;
	font-size: 14px;
	font-weight: 900;
	margin: 8px 0 0;
}

.analysis-controls {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analysis-controls button {
	background: #1f8a70;
	border: 1px solid #146655;
	border-radius: 8px;
	color: #ffffff;
	cursor: pointer;
	font: 900 13px Arial, sans-serif;
	height: 38px;
	touch-action: manipulation;
}

.analysis-controls button:disabled {
	background: #dfe6e1;
	border-color: rgba(113, 128, 121, 0.2);
	color: #718079;
	cursor: default;
}

.analysis-range-label {
	color: #30434b;
	display: grid;
	font-size: 13px;
	font-weight: 900;
	gap: 8px;
	text-transform: uppercase;
}

.analysis-range-label input {
	accent-color: #1f8a70;
	touch-action: manipulation;
	width: 100%;
}

@media (max-width: 760px) {
	.site-header {
		align-items: flex-start;
		display: grid;
		grid-template-columns: 1fr;
	}

	.primary-nav {
		margin-left: 0;
	}

	.account-nav {
		justify-content: flex-start;
	}

	.home-grid {
		grid-template-columns: 1fr;
	}

	.page-title h1 {
		font-size: 42px;
		line-height: 1;
	}

	.analysis-page .site-header {
		display: none;
	}

	.analysis-main {
		gap: 6px;
		height: 100vh;
		height: 100dvh;
		padding: 8px;
	}

	.analysis-page .page-title {
		display: block;
	}

	.analysis-page .page-title h1 {
		font-size: 18px;
		line-height: 1.1;
	}

	.analysis-page .page-title p:last-of-type {
		display: none;
	}

	.analysis-layout {
		gap: 6px;
		grid-template-columns: 1fr;
		grid-template-rows: minmax(0, 1fr) auto;
	}

	.profile-layout {
		grid-template-columns: 1fr;
	}

	.inventory-item-card {
		grid-template-columns: 56px minmax(0, 1fr);
	}

	.item-icon-canvas {
		height: 52px;
		width: 52px;
	}

	.quest-card-header,
	.quest-reward,
	.quest-objective {
		align-items: stretch;
		display: grid;
	}

	.quest-collect-action {
		width: 100%;
	}

	.discuss-layout {
		grid-template-columns: 1fr;
	}

	.discussion-topic-header {
		display: grid;
	}

	.discussion-topic-badges {
		justify-content: flex-start;
	}

	.discussion-comment-count {
		justify-self: start;
	}

	.discussion-reply-list {
		margin-left: 10px;
		padding-left: 10px;
	}

	.profile-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.profile-badge-card {
		grid-template-columns: 72px minmax(0, 1fr);
	}

	.admin-badge-preview-list {
		grid-template-columns: 1fr;
	}

	.guide-grid {
		grid-template-columns: 1fr;
	}

	.guide-table {
		min-width: 0;
	}

	.guide-table th,
	.guide-table td {
		padding: 12px;
	}

	.guide-table tbody th {
		white-space: normal;
		width: 130px;
	}

	.admin-announcement-layout,
	.admin-email-layout,
	.admin-contest-layout,
	.messages-layout {
		grid-template-columns: 1fr;
	}

	.admin-clarification-filters {
		grid-template-columns: 1fr;
	}

	.message-bubble {
		max-width: 100%;
	}

	.admin-section-header,
	.admin-puzzle-visibility-row {
		grid-template-columns: 1fr;
	}

	.admin-puzzle-state {
		text-align: left;
	}

	.admin-puzzle-row {
		grid-template-columns: 1fr;
	}

	.icon-action {
		width: 100%;
	}

	.contest-card-header,
	.admin-contest-card-header,
	.contest-clarification-header {
		display: grid;
	}

	.contest-clarification-status {
		text-align: left;
	}

	.profile-card-header {
		display: grid;
	}

	.contest-puzzle-entry {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.contest-puzzle-action {
		grid-column: 1 / -1;
	}

	.contest-scoreboard-solve {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.contest-scoreboard-solve-analysis {
		grid-column: 1 / -1;
	}

	.analysis-sidebar {
		gap: 8px;
		padding: 8px;
	}

	.analysis-summary {
		display: none;
	}

	.analysis-step {
		border-top: 0;
		padding-top: 0;
	}

	.analysis-step-label {
		font-size: 14px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.analysis-step-time,
	.analysis-count {
		font-size: 12px;
		margin: 0;
	}

	.analysis-controls {
		gap: 6px;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.analysis-controls button {
		font-size: 12px;
		height: 34px;
	}

	.analysis-range-label {
		font-size: 11px;
		gap: 4px;
	}

	.analysis-cell {
		font-size: 24px;
	}

	.analysis-center-notes {
		font-size: 11px;
	}

	.analysis-corner-notes {
		font-size: 9px;
	}

}
