/* FRAG Arena base visual system: tokens, layout, controls, dialogs. */

:root {
	--bg: #08080a;
	--bg-2: #050507;
	--panel: rgba(18, 16, 14, 0.78);
	--panel-solid: #12100e;
	--line: rgba(204, 50, 30, 0.24);
	--line-strong: rgba(204, 50, 30, 0.55);
	--text: #f0e8e0;
	--muted: rgba(240, 232, 224, 0.68);
	--faint: rgba(240, 232, 224, 0.40);
	--accent: #cc2200;
	--accent-bright: #ff4422;
	--accent-soft: rgba(204, 34, 0, 0.20);
	--accent-2: #ff8800;
	--accent-3: #00ccff;
	--ok: #33ff66;
	--warn: #ffcc00;
	--bad: #ff2244;
	--info: #00ccff;
	--frag: #ff6600;
	--font-display: "Teko", "Eurostile", "Bank Gothic", system-ui, sans-serif;
	--font-mono: "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--radius: 0.25rem;
	--radius-sm: 0.12rem;
	--bevel: inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 -1px 0 rgba(0, 0, 0, 0.7);
	--shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
	--scanline: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 0, 0, 0.09) 2px 4px);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	padding: 0;
	margin: 0;
	background: var(--bg);
	overflow: hidden;
	color: var(--text);
	font-family: var(--font-display), system-ui, sans-serif;
	font-weight: 500;
	letter-spacing: 0.01em;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	background-image: var(--scanline);
}

body::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
	z-index: 0;
}

[hidden] {
	display: none !important;
}

h1, h2, h3, .panel-title, .brand strong {
	font-family: "Impact", "Arial Black", "Helvetica Neue", "Segoe UI", sans-serif !important;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

#viewport-frame {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: #000;
}

#viewport-frame:focus {
	outline: none;
}

#viewport {
	width: 100%;
	height: 100%;
	background: #000;
}

#viewport-frame:-moz-full-screen,
#viewport:-moz-full-screen,
#viewport-frame:-webkit-full-screen,
#viewport:-webkit-full-screen {
	display: block;
	position: absolute;
	left: 0;
	top: 0;
	margin: 0;
	width: 100%;
	height: 100%;
}

#lobby {
	position: absolute;
	inset: 0;
	z-index: 20;
	overflow-y: auto;
	scroll-behavior: smooth;
		radial-gradient(1100px 560px at 82% -12%, rgba(99, 102, 241, 0.18), transparent 62%),
		radial-gradient(900px 500px at -10% 110%, rgba(82, 118, 255, 0.09), transparent 60%),
		linear-gradient(180deg, #060607 0%, #0a0a0c 100%);
}

#lobby::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	opacity: 0.32;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 48px 48px;
	-webkit-mask-image: radial-gradient(circle at 50% 26%, #000, transparent 82%);
	mask-image: radial-gradient(circle at 50% 26%, #000, transparent 82%);
}

.shell {
	position: relative;
	max-width: 1120px;
	margin: 0 auto;
	padding: 1.25rem 1.5rem 2rem;
}

.topbar {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid var(--line);
}

.brand {
	display: flex;
	align-items: center;
	padding-left: 0.65rem;
	border-left: 3px solid var(--accent);
	color: inherit;
	text-decoration: none;
	line-height: 1;
}

.brand strong {
	font-size: 1rem;
	font-weight: 800;
	letter-spacing: 0.16em;
}

.nav {
	display: flex;
	justify-content: center;
	gap: 0.15rem;
	flex-wrap: wrap;
}

.nav button {
	padding: 0.42rem 0.65rem;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 0.68rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	cursor: pointer;
}

.nav button:hover,
.nav button:focus {
	color: var(--text);
	border-color: var(--line);
}

.nav button[aria-current="page"] {
	color: var(--text);
	border-color: var(--accent);
	background: var(--accent-soft);
}

.topbar-status {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.identity-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.18rem 0.65rem;
	width: 15rem;
	max-width: 100%;
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--line);
	border-radius: 0.5rem;
	background: rgba(0, 0, 0, 0.38);
}

.identity-card[data-tone="verified"] {
	border-color: rgba(88, 214, 141, 0.34);
}

.identity-kind {
	font-size: 0.54rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

.identity-card[data-tone="verified"] .identity-kind {
	color: var(--ok);
}

.identity-label {
	grid-column: 1;
	max-width: 9.5rem;
	overflow: hidden;
	font-size: 0.74rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.identity-card .btn {
	grid-column: 2;
	grid-row: 1 / span 2;
	padding: 0.32rem 0.5rem;
	font-size: 0.62rem;
	white-space: nowrap;
}

.identity-status {
	grid-column: 1 / -1;
	color: var(--muted);
	font-size: 0.6rem;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.view {
	padding-top: 2.1rem;
}

.eyebrow {
	margin: 0 0 0.55rem;
	color: var(--accent);
	font-size: 0.62rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

h1 {
	margin: 0;
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	line-height: 0.96;
	letter-spacing: -0.02em;
}

h1 span {
	color: var(--muted);
}

h2 {
	margin: 0;
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	letter-spacing: -0.01em;
}

h3 {
	margin: 0;
}

.lead {
	max-width: 42rem;
	margin: 1rem 0 0;
	color: var(--muted);
	font-size: 0.98rem;
	line-height: 1.65;
}

.lead.small {
	font-size: 0.86rem;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin: 1.5rem 0 0.75rem;
}

.home .lead {
	max-width: 38rem;
}

.home .hero-actions {
	margin-top: 1.35rem;
}

.home-brief {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.8rem;
	margin-top: 1.35rem;
}

.brief-card {
	display: grid;
	align-content: start;
	justify-items: start;
	gap: 0.5rem;
}

.brief-card h3 {
	font-size: 1rem;
}

.brief-card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.78rem;
	line-height: 1.55;
}

.brief-card .btn {
	margin-top: 0.15rem;
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.acquire-panel {
	margin-top: 0.8rem;
}

.btn {
	padding: 0.65rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text);
	font: inherit;
	font-size: 0.82rem;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.btn-primary {
	border-color: var(--accent);
	background: var(--accent);
	color: #fff;
	font-weight: 650;
}

.btn-primary:hover:not(:disabled) {
	background: var(--accent-bright);
}

.btn:hover:not(:disabled) {
	transform: translateY(-1px);
}

.btn:active:not(:disabled) {
	transform: translateY(1px);
}

.btn-ghost:hover:not(:disabled) {
	border-color: var(--accent);
}

.btn-danger {
	border-color: rgba(255, 107, 107, 0.5);
	color: #ffb3b3;
}

.btn-danger:hover:not(:disabled) {
	border-color: var(--bad);
	background: rgba(255, 107, 107, 0.1);
}

.btn-small {
	padding: 0.4rem 0.65rem;
	font-size: 0.7rem;
}

.hint {
	margin: 0.6rem 0 0;
	color: var(--muted);
	font-size: 0.74rem;
	line-height: 1.55;
}

.form-hint {
	margin: 0.7rem 0 0;
	color: var(--muted);
	font-size: 0.7rem;
	line-height: 1.5;
}

.badge {
	padding: 0.18rem 0.45rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--muted);
	font-size: 0.58rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
}

.badge-online,
.badge-paid {
	color: var(--ok);
	border-color: rgba(88, 214, 141, 0.42);
}

.badge-starting,
.badge-pending {
	color: var(--warn);
	border-color: rgba(245, 194, 107, 0.42);
}

.badge-failed {
	color: var(--bad);
	border-color: rgba(255, 107, 107, 0.42);
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.22rem 0.5rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--muted);
	font-size: 0.6rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.chip-test {
	color: var(--warn);
	border-color: rgba(245, 194, 107, 0.45);
	background: rgba(245, 194, 107, 0.08);
}

.chip-arena {
	color: var(--accent-bright);
	border-color: rgba(99, 102, 241, 0.5);
	background: rgba(99, 102, 241, 0.08);
}

.chip-verified {
	color: var(--ok);
	border-color: rgba(88, 214, 141, 0.45);
	background: rgba(88, 214, 141, 0.07);
}

.chip-warn {
	color: var(--warn);
	border-color: rgba(245, 194, 107, 0.45);
}

.chip-bad {
	color: var(--bad);
	border-color: rgba(255, 107, 107, 0.45);
}

.panel {
	padding: 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
}

.panel-title {
	margin: 0 0 0.6rem;
	font-size: 0.92rem;
}

.panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	margin-bottom: 0.7rem;
}

.panel-head .panel-title {
	margin: 0;
}

.panel-copy {
	margin: 0.6rem 0 0;
	color: var(--muted);
	font-size: 0.76rem;
	line-height: 1.6;
}

.flow-list {
	margin: 0.4rem 0 0;
	padding-left: 1.1rem;
	color: var(--muted);
	font-size: 0.78rem;
	line-height: 1.7;
}

.feature-list {
	margin: 1rem 0;
	padding-left: 1.1rem;
	color: var(--muted);
	font-size: 0.78rem;
	line-height: 1.7;
}

.tag-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.9rem;
}

.grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.8rem;
	margin-top: 0.8rem;
}

.notice {
	margin-top: 1.6rem;
	padding: 0.8rem 0.9rem;
	border: 1px solid var(--line);
	border-left: 2px solid var(--accent);
	border-radius: var(--radius-sm);
	background: rgba(0, 0, 0, 0.3);
	color: var(--muted);
	font-size: 0.72rem;
	line-height: 1.6;
}

.notice[data-tone="warn"] { border-left-color: var(--warn); }
.notice[data-tone="ok"] { border-left-color: var(--ok); }

.arena-gate {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
}

.arena-gate p {
	flex: 1 1 14rem;
	margin: 0;
}

.arena-gate .btn {
	flex: 0 0 auto;
}

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.section-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.empty {
	padding: 1.2rem;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
	text-align: center;
}

.empty.compact {
	padding: 1rem;
}

.empty p {
	margin: 0 0 0.8rem;
	color: var(--muted);
	font-size: 0.82rem;
}

.error {
	margin: 0.8rem 0 0;
	padding: 0.7rem 0.8rem;
	border: 1px solid rgba(255, 107, 107, 0.4);
	border-radius: var(--radius-sm);
	background: rgba(255, 107, 107, 0.08);
	color: #ffb3b3;
	font-size: 0.74rem;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.form-card {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
	max-width: 58rem;
	margin-top: 0.5rem;
	padding: 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
}

.arena-form {
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	border-top-color: rgba(99, 102, 241, 0.55);
	gap: 1rem;
	background:
		linear-gradient(135deg, rgba(99, 102, 241, 0.045), transparent 32%),
		var(--panel);
	box-shadow: inset 0 1px 0 rgba(139, 143, 255, 0.12), var(--shadow);
}

.arena-form::after {
	content: "// RULESET CONFIG //";
	position: absolute;
	top: 0.7rem;
	right: 1.25rem;
	color: rgba(244, 241, 236, 0.22);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.56rem;
	letter-spacing: 0.14em;
	pointer-events: none;
}

.arena-form > .field {
	min-width: 0;
}

.arena-mode-field {
	grid-column: 1 / -1;
}

.arena-mode-field select {
	border-color: rgba(99, 102, 241, 0.55);
	background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), #0c0c0f 42%);
	font-weight: 650;
}

.arena-mode-hint {
	margin: -0.15rem 0 0.15rem;
	padding: 0.7rem 0.8rem;
	border-left: 2px solid var(--accent);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	background: rgba(99, 102, 241, 0.07);
}

.form-section-label {
	position: relative;
	margin: 0.35rem 0 -0.2rem;
	padding-bottom: 0.45rem;
	border-bottom: 1px solid var(--line);
	color: var(--accent);
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.form-section-label::before {
	content: "▸";
	margin-right: 0.35rem;
	color: var(--accent-bright);
}

.arena-form .field .hint {
	margin-top: 0.35rem;
}

.form-span {
	grid-column: 1 / -1;
}

/* Host form: exact Tithe split, mirrored from the matchmaker catalog. */
.arena-pot-preview {
	margin: 0.15rem 0 0;
	padding: 0.75rem 0.85rem;
	border: 1px solid var(--line);
	border-left: 2px solid var(--accent);
	border-radius: var(--radius-sm);
	background: rgba(99, 102, 241, 0.05);
}

.arena-pot-preview .form-section-label {
	margin: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.arena-pot-preview-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.55rem;
	margin-top: 0.55rem;
}

.arena-pot-stat {
	display: grid;
	gap: 0.12rem;
	min-width: 0;
	padding: 0.5rem 0.55rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: rgba(0, 0, 0, 0.25);
}

.arena-pot-stat strong {
	font-size: 0.92rem;
	letter-spacing: -0.01em;
}

.arena-pot-stat.is-prize strong {
	color: var(--ok);
}

.arena-pot-stat.is-burn strong {
	color: var(--warn);
}

.arena-pot-preview .hint {
	margin: 0.55rem 0 0;
}

@media (max-width: 720px) {
	.arena-pot-preview-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.preset-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.preset-label {
	margin-right: 0.2rem;
	color: var(--muted);
	font-size: 0.6rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.create-summary {
	margin: 0;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--line);
	border-left: 2px solid var(--accent);
	border-radius: var(--radius-sm);
	background: rgba(0, 0, 0, 0.25);
	color: var(--text);
	font-size: 0.78rem;
	letter-spacing: 0.02em;
}

.quick-match-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.7rem;
	margin-top: 1rem;
}

.quick-match {
	display: grid;
	align-content: start;
	justify-items: start;
	gap: 0.45rem;
	padding: 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
}

.quick-match-featured {
	border-color: rgba(99, 102, 241, 0.45);
	background: linear-gradient(160deg, rgba(99, 102, 241, 0.1), var(--panel) 62%);
}

.quick-match-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	width: 100%;
}

.quick-match-tag {
	color: var(--accent);
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.quick-match-meta {
	color: var(--muted);
	font-size: 0.62rem;
	white-space: nowrap;
}

.quick-match h3 {
	font-size: 1rem;
}

.quick-match p {
	min-height: 2.2rem;
	margin: 0;
	color: var(--muted);
	font-size: 0.74rem;
	line-height: 1.5;
}

.quick-match .btn {
	margin-top: 0.15rem;
}

.custom-match {
	margin-top: 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: rgba(0, 0, 0, 0.18);
}

.custom-match summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	padding: 0.8rem 1rem;
	cursor: pointer;
	list-style: none;
}

.custom-match summary::-webkit-details-marker {
	display: none;
}

.custom-match summary span {
	font-size: 0.86rem;
	font-weight: 650;
}

.custom-match summary small {
	color: var(--muted);
	font-size: 0.7rem;
}

.custom-match summary::after {
	content: "+";
	color: var(--accent);
	font-size: 1.1rem;
	line-height: 1;
}

.custom-match[open] summary::after {
	content: "–";
}

.custom-match .form-card {
	max-width: none;
	margin: 0;
	padding: 1rem;
	border: 0;
	border-top: 1px solid var(--line);
	border-radius: 0;
	background: transparent;
}

.match-browser-head {
	margin-top: 1.9rem;
}

.match-browser-head h2 {
	font-size: 1.15rem;
}

.field {
	display: grid;
	gap: 0.3rem;
}

.field label {
	color: var(--muted);
	font-size: 0.6rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

input,
select {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55rem 0.6rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: #0c0c0f;
	color: var(--text);
	font: inherit;
	font-size: 0.82rem;
}

select {
	color-scheme: dark;
}

select option,
select optgroup {
	background: #101116;
	color: var(--text);
}

select option:checked {
	background: var(--accent);
	color: #fff;
}

select option:hover {
	background: #2a2d35;
	color: #fff;
}

input:focus,
select:focus {
	border-color: var(--accent);
	outline: 2px solid var(--accent-soft);
}

input[readonly] {
	background: rgba(255, 255, 255, 0.02);
	color: var(--muted);
	cursor: default;
}

.form-actions {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex-wrap: wrap;
}

.footer {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 2.4rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.66rem;
	line-height: 1.6;
}

.footer a {
	color: inherit;
}

.footer a:hover,
.footer a:focus {
	color: var(--text);
}

.overlay {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: grid;
	place-items: center;
	padding: 1.25rem;
	background: rgba(2, 2, 4, 0.78);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	overflow-y: auto;
}

.launch-overlay {
	z-index: 55;
	background:
		radial-gradient(720px 460px at 50% 42%, rgba(99, 102, 241, 0.16), transparent 68%),
		rgba(2, 2, 4, 0.94);
}

.launch-card {
	width: min(30rem, 100%);
	padding: 2rem;
	border: 1px solid rgba(99, 102, 241, 0.42);
	border-radius: 0.7rem;
	background: linear-gradient(180deg, rgba(20, 18, 18, 0.98), rgba(9, 9, 12, 0.98));
	box-shadow: var(--shadow);
	text-align: center;
}

.launch-brand {
	color: var(--accent);
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.22em;
}

.launch-scan {
	height: 2px;
	margin: 1.1rem auto;
	background: linear-gradient(90deg, transparent, var(--accent), transparent);
	animation: launch-scan 1.3s ease-in-out infinite;
}

.launch-card h2 {
	font-size: 1.35rem;
}

.launch-status {
	margin: 0.55rem 0 0;
	color: var(--accent-bright);
	font-size: 0.84rem;
}

.launch-hint {
	margin: 0.8rem 0 0;
	color: var(--muted);
	font-size: 0.72rem;
	line-height: 1.55;
}

@keyframes launch-scan {
	0%, 100% { transform: scaleX(0.25); opacity: 0.45; }
	50% { transform: scaleX(1); opacity: 1; }
}

.dialog {
	width: min(46rem, 100%);
	padding: 1.4rem;
	border: 1px solid var(--line-strong);
	border-radius: 0.7rem;
	background: linear-gradient(180deg, #121216 0%, #0a0a0d 100%);
	box-shadow: var(--shadow);
}

.dialog h2 {
	font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.dialog-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 1.2rem;
}

.arena-detail-dialog {
	width: min(52rem, 100%);
	border-color: rgba(99, 102, 241, 0.45);
}

.arena-detail-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.arena-detail-head .lead {
	margin-bottom: 0;
}

.arena-detail-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.55rem;
	margin-top: 1.2rem;
}

.arena-detail-stat {
	display: grid;
	gap: 0.2rem;
	padding: 0.75rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, 0.025);
}

.arena-detail-stat strong {
	font-size: 0.78rem;
}

.arena-detail-copy {
	margin-top: 1rem;
	padding: 0.85rem;
	border-left: 2px solid var(--accent);
	background: rgba(99, 102, 241, 0.06);
	color: var(--muted);
	font-size: 0.78rem;
	line-height: 1.55;
}

.arena-password-field {
	display: grid;
	gap: 0.45rem;
	margin-top: 1rem;
}

.arena-password-field label {
	font-size: 0.72rem;
	font-weight: 650;
}

@media (max-width: 620px) {
	.arena-detail-head { display: grid; }
	.arena-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 70;
	width: min(24rem, 94vw);
	height: 100%;
	padding: 1.1rem;
	border-left: 1px solid var(--line-strong);
	background: #0b0b0f;
	box-shadow: -24px 0 80px rgba(0, 0, 0, 0.6);
	overflow-y: auto;
}

.drawer-head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.drawer-head h2 {
	flex: 1;
	font-size: 1.1rem;
}

.drawer-copy,
.drawer-note {
	color: var(--muted);
	font-size: 0.72rem;
	line-height: 1.6;
}

.drawer-note {
	margin: 1rem 0 0;
	padding-top: 0.8rem;
	border-top: 1px solid var(--line);
}

.toasts {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 80;
	display: grid;
	gap: 0.5rem;
	max-width: min(24rem, 92vw);
}

.toast {
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--line-strong);
	border-left: 2px solid var(--accent);
	border-radius: var(--radius-sm);
	background: #111116;
	box-shadow: var(--shadow);
	color: var(--text);
	font-size: 0.76rem;
	line-height: 1.5;
	animation: toast-in 160ms ease-out;
}

.toast-ok {
	border-left-color: var(--ok);
}

.toast-bad {
	border-left-color: var(--bad);
}

@keyframes toast-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
	.topbar {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
	}

	.nav {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-content: flex-start;
	}
}

@media (max-width: 860px) {
	.identity-label {
		max-width: 7.5rem;
	}

	.home-brief,
	.quick-match-grid,
	.grid-2,
	.form-card {
		grid-template-columns: 1fr;
	}

	.quick-match p {
		min-height: 0;
	}

	.dialog {
		padding: 1.1rem;
	}
}

@media (max-width: 480px) {
	.identity-status,
	.identity-label {
		display: none;
	}

	.identity-card {
		grid-template-columns: auto auto;
		width: auto;
	}

	.identity-card .btn {
		grid-row: 1;
	}

	.custom-match summary small {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* ------------------------------------------------------------------ */
/* XRPL Arena theme: Quake III industrial + synthwave neon             */
/* Less is more: a few atmospheric touches over the dark base.          */
/* ------------------------------------------------------------------ */

/* Subtle CRT scanlines over the whole lobby. */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 9999;
	background: repeating-linear-gradient(
		0deg,
		rgba(255, 255, 255, 0.025) 0px,
		rgba(255, 255, 255, 0.025) 1px,
		transparent 1px,
		transparent 3px
	);
	mix-blend-mode: overlay;
	opacity: 0.35;
}

/* Quake-style chunky display headings. */
h1, h2, h3, .panel-title, .brand strong {
	font-family: "Impact", "Arial Black", "Helvetica Neue", "Segoe UI", sans-serif !important;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Brand wordmark. */
.brand strong {
	color: var(--accent-bright);
	font-family: "Impact", "Arial Black", "Helvetica Neue", "Segoe UI", sans-serif !important;
}

/* Neon glow on primary actions. */
.btn-primary {
	box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4), 0 6px 24px rgba(99, 102, 241, 0.25);
}
.btn-primary:hover:not(:disabled) {
	box-shadow: 0 0 0 1px rgba(139, 143, 255, 0.6), 0 8px 28px rgba(99, 102, 241, 0.4);
}

/* Chips glow softly. */
.chip-arena, .chip-verified {
	box-shadow: 0 0 10px rgba(99, 102, 241, 0.18);
}
.chip.chip-arena { color: var(--accent-bright); }

/* Panels: faint top highlight + subtle grid. */
.panel {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%),
		var(--panel);
	border: 1px solid var(--line);
}

/* Links/chips accent in synthwave cyan for info. */
a { color: var(--accent-3); }
a:hover { color: var(--accent-bright); }

/* Reduced motion: disable scanlines. */
@media (prefers-reduced-motion: reduce) {
	body::before { display: none; }
}

/* ---- Retro XRPL Arena polish ---- */
.panel, .dialog, .admin-setting-card, .lpa-account-panel {
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.4)) , var(--panel-solid);
	box-shadow: var(--bevel), 0 12px 40px rgba(0,0,0,0.55);
	backdrop-filter: blur(6px);
	position: relative;
}
.panel::before, .dialog::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--warn));
	opacity: 0.9;
	pointer-events: none;
}
.panel-head, .drawer-head {
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.panel-title, .panel h3, .dialog h2 {
	font-family: "Impact", "Arial Black", "Helvetica Neue", "Segoe UI", sans-serif !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.btn {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
	border-radius: var(--radius-sm);
	border: 1px solid var(--line-strong);
	transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.btn-primary {
	background: linear-gradient(180deg, var(--accent-bright), var(--accent));
	color: #fff;
	border-color: var(--accent);
	box-shadow: var(--bevel), 0 0 18px rgba(204, 34, 0, 0.45);
}
.btn-primary:hover {
	transform: translateY(-1px);
	background: linear-gradient(180deg, #ff7755, var(--accent-bright));
	box-shadow: var(--bevel), 0 0 26px rgba(204, 34, 0, 0.65);
}
.btn-ghost {
	background: rgba(0,0,0,0.35);
	color: var(--text);
}
.btn-ghost:hover {
	background: var(--accent-soft);
	border-color: var(--accent);
	color: var(--accent-bright);
	transform: translateY(-1px);
}
.chip {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.62rem;
	font-weight: 700;
	border-radius: 2px;
	border: 1px solid var(--line-strong);
	padding: 0.15rem 0.5rem;
}
.chip-verified { background: rgba(50,230,133,0.16); color: var(--ok); border-color: rgba(50,230,133,0.4); }
.chip-warn { background: rgba(255,204,0,0.14); color: var(--warn); border-color: rgba(255,204,0,0.4); }
.chip-bad, .chip-danger { background: rgba(255,77,109,0.16); color: var(--bad); border-color: rgba(255,77,109,0.4); }
input, select, textarea {
	background: #06070d;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: var(--font-display);
	font-size: 0.9rem;
	padding: 0.45rem 0.6rem;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px var(--accent-soft), var(--bevel);
}
.progress-track {
	background: rgba(0,0,0,0.5);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	overflow: hidden;
}
.progress-fill {
	background: repeating-linear-gradient(90deg, var(--accent) 0 8px, var(--accent-2) 8px 16px);
	box-shadow: 0 0 12px rgba(204, 34, 0, 0.5);
}
.stat-tile {
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.35));
	box-shadow: var(--bevel);
}
.stat-tile strong, .stat-value {
	font-family: var(--font-mono);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}
.stat-label {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.62rem;
	color: var(--muted);
}
.overlay .dialog {
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: linear-gradient(180deg, rgba(20,22,40,0.96), rgba(8,9,18,0.98));
	box-shadow: var(--bevel), 0 30px 100px rgba(0,0,0,0.8);
	background-image: var(--scanline);
}
.overlay .dialog::before {
	height: 3px;
	background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--warn));
}
.lpa-pool-tier {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.35rem 0.5rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	margin-bottom: 0.35rem;
	background: rgba(0,0,0,0.3);
}
.lpa-pool-tier strong { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
/* ---- Account page tabbed layout ---- */
.account-quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.75rem; }
.account-quick-stat { display: grid; gap: 0.15rem; padding: 0.4rem 0.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0,0,0,0.3); }
.account-quick-stat strong { font-family: var(--font-mono); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.account-quick-stat-ok strong { color: var(--ok); }
.account-quick-stat-warn strong { color: var(--warn); }
.account-quick-stat-info strong { color: var(--info); }
.account-tabs { margin-top: 0.75rem; }
.account-tab-bar { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); padding-bottom: 0.25rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.account-tab { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; font-weight: 600; padding: 0.35rem 0.85rem; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; transition: color 120ms ease, background 120ms ease, border-color 120ms ease; }
.account-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.account-tab.is-active { color: var(--accent-bright); background: var(--accent-soft); border-color: var(--line-strong); }
.account-tab-panel { display: block; }
.memepad-token-row { display: flex; justify-content: space-between; align-items: center; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 0.35rem; background: rgba(0,0,0,0.3); gap: 0.5rem; }
@media (max-width: 640px) { .account-quick-stats { grid-template-columns: repeat(2, 1fr); } }
/* ---- Tooltip system ---- */
.tooltip-trigger { cursor: help; border-bottom: 1px dotted var(--accent); color: var(--accent-bright); }
.tooltip-popup { position: absolute; z-index: 1000; max-width: 280px; padding: 0.5rem 0.7rem; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 0.78rem; line-height: 1.4; color: var(--text); box-shadow: var(--shadow); pointer-events: none; }

/* ---- About / White Paper page ---- */
.about-hero { padding: 1.5rem 0; text-align: center; }
.about-hero h1 { font-size: 2.5rem; margin: 0.5rem 0; }
.about-tagline { font-size: 1.1rem; color: var(--muted); max-width: 40rem; margin: 0 auto; }
.about-toc { margin: 1.5rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-solid); }
.about-toc h3 { margin: 0 0 0.5rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.about-toc-list { columns: 2; column-gap: 1.5rem; margin: 0; padding-left: 1.2rem; }
.about-toc-list li { margin-bottom: 0.25rem; font-size: 0.85rem; }
.about-toc-list a { color: var(--accent-bright); text-decoration: none; }
.about-toc-list a:hover { text-decoration: underline; }
.about-section { margin: 2rem 0; scroll-margin-top: 1rem; }
.about-heading { font-size: 1.4rem; margin: 0 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--line); }
.about-para { margin: 0.6rem 0; line-height: 1.6; color: var(--text); }
.about-list { margin: 0.6rem 0; padding-left: 1.2rem; }
.about-list li { margin-bottom: 0.3rem; line-height: 1.5; }
.about-kv { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0.6rem 0; }
.about-kv dt { font-weight: 600; color: var(--accent-bright); font-size: 0.85rem; }
.about-kv dd { margin: 0; font-size: 0.85rem; color: var(--muted); }
.glossary-list { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
.glossary-term { font-weight: 700; color: var(--accent-bright); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.glossary-def { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.glossary-container { max-height: 400px; overflow-y: auto; }
@media (max-width: 640px) { .about-toc-list { columns: 1; } }
/* Smooth scroll for about page TOC */
.about-body, #about-body { scroll-behavior: smooth; }
.about-section { scroll-margin-top: 1rem; }
/* ---- About page author's note ---- */
.about-author-note { border-left: 3px solid var(--accent); padding-left: 1.25rem; margin: 2rem 0; }
.about-author-note .about-para:first-of-type { font-size: 1.15rem; font-weight: 700; color: var(--accent-bright); }
.about-author-note .about-para:last-of-type { font-style: italic; color: var(--muted); }
/* ---- Clan coming soon overlay ---- */
.clan-preview-wrapper { position: relative; }
.clan-preview { opacity: 0.4; pointer-events: none; filter: grayscale(0.3); }
.clan-coming-soon { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); border-radius: var(--radius-sm); gap: 0.5rem; }
.clan-coming-soon p { color: var(--muted); font-size: 0.85rem; }
/* ---- Play to earn banner ---- */
.play-to-earn-banner { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.9rem; margin-bottom: 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--accent-soft), rgba(255,102,0,0.1)); }
.play-to-earn-banner p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.play-to-earn-banner strong { color: var(--frag); }
.play-to-earn-banner .chip { flex-shrink: 0; }
/* ---- Home screenshot gallery ---- */
.home-screenshots { margin-top: 1.25rem; }
.home-screenshots-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 0.5rem; font-family: var(--font-display); }
.home-screenshot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.home-screenshot-grid img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--bevel), 0 4px 16px rgba(0,0,0,0.5); transition: transform 180ms ease, box-shadow 180ms ease; cursor: pointer; }
.home-screenshot-grid img:hover { transform: scale(1.02); box-shadow: var(--bevel), 0 8px 24px rgba(204,34,0,0.25); }
@media (max-width: 640px) { .home-screenshot-grid { grid-template-columns: 1fr; } }
