:root {
	--bg: #000;
	--panel: rgba(10, 10, 14, 0.92);
	--panel-2: rgba(255, 255, 255, 0.03);
	--line: rgba(255, 255, 255, 0.08);
	--text: #f5eff2;
	--muted: rgba(245, 239, 242, 0.66);
	--accent: #cf151f;
	--accent-2: #6f0f13;
	--accent-3: #76ff6a;
	--accent-4: #8e4dff;
	--shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
	--radius-xl: 30px;
	--radius-lg: 22px;
	--radius-md: 16px;
}

* {
	box-sizing: border-box;
}

html {
	color-scheme: dark;
}

body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(circle at 20% 15%, rgba(207, 21, 31, 0.2), transparent 18%),
		radial-gradient(circle at 80% 10%, rgba(142, 77, 255, 0.12), transparent 18%),
		radial-gradient(circle at 50% 80%, rgba(118, 255, 106, 0.04), transparent 18%),
		linear-gradient(180deg, #050506 0%, #000 100%);
	color: var(--text);
	font-family:
		"Space Grotesk",
		system-ui,
		sans-serif;
}

body::before,
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
}

body::before {
	background:
		repeating-linear-gradient(
			to bottom,
			rgba(255, 255, 255, 0.035) 0,
			rgba(255, 255, 255, 0.035) 1px,
			transparent 1px,
			transparent 4px
		);
	opacity: 0.08;
}

body::after {
	background:
		linear-gradient(110deg, transparent 40%, rgba(207, 21, 31, 0.18) 50%, transparent 60%),
		radial-gradient(circle at 25% 20%, rgba(118, 255, 106, 0.06), transparent 20%),
		radial-gradient(circle at 80% 22%, rgba(142, 77, 255, 0.08), transparent 18%);
	background-size: auto, auto, auto;
	background-repeat: no-repeat, no-repeat, no-repeat;
	opacity: 0.55;
	mix-blend-mode: screen;
}

h1,
h2,
h3,
.eyebrow,
.section-label,
.gate-copy {
	margin: 0;
}

h1,
h2,
h3 {
	line-height: 0.95;
	letter-spacing: -0.03em;
	font-weight: 700;
}

h1 {
	font-family: "Rubik Wet Paint", "Bebas Neue", serif;
	font-size: clamp(3.2rem, 8vw, 7rem);
	text-transform: uppercase;
	text-shadow:
		-2px 0 0 rgba(118, 255, 106, 0.35),
		2px 0 0 rgba(142, 77, 255, 0.3),
		0 0 24px rgba(207, 21, 31, 0.32);
	transform: rotate(-1.5deg) skewX(-8deg);
}

h2 {
	font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
	font-size: clamp(1.3rem, 2.6vw, 2rem);
}

.eyebrow,
.section-label {
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.shell {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
	padding: 24px 0 56px;
}

.gate-screen {
	min-height: 100vh;
	display: grid;
	place-items: center;
}

.gate-card,
.workspace .panel,
.workspace-head {
	border: 1px solid var(--line);
	border-radius: var(--radius-xl);
	background: var(--panel);
	box-shadow: var(--shadow);
	backdrop-filter: blur(18px);
}

.gate-card {
	width: min(560px, 100%);
	padding: 0;
	text-align: center;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	backdrop-filter: none;
}

.gate-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	margin: 0;
}

.gate-error {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 14px;
	background: rgba(207, 21, 31, 0.12);
	border: 1px solid rgba(207, 21, 31, 0.28);
	color: #ffd8da;
}

.workspace {
	display: grid;
	gap: 18px;
	padding-top: 24px;
}

.mod-dock {
	position: fixed;
	left: 0;
	right: 0;
	top: 14px;
	z-index: 30;
	display: grid;
	justify-items: center;
	padding: 0 16px;
	pointer-events: none;
}

.panel {
	padding: 22px;
	display: grid;
	gap: 18px;
	background:
		linear-gradient(180deg, rgba(10, 10, 14, 0.94), rgba(4, 4, 6, 0.96)),
		var(--panel);
}

.panel-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.panel-head-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

.badge {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 12px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.badge-muted {
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.03);
	color: var(--muted);
}

.badge-live {
	border: 1px solid rgba(207, 21, 31, 0.28);
	background: rgba(207, 21, 31, 0.12);
	color: #ffd9dd;
}

.stack {
	display: grid;
	gap: 14px;
}

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

.choice {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 12px;
	align-items: start;
	padding: 16px;
	border-radius: var(--radius-lg);
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
	cursor: pointer;
}

.choice strong,
.choice small {
	display: block;
}

.choice strong {
	margin-bottom: 6px;
	font-size: 1rem;
}

.choice small {
	color: var(--muted);
	line-height: 1.45;
}

.helper-note {
	margin: -2px 0 0;
	color: rgba(245, 239, 242, 0.58);
	font-size: 0.9rem;
	line-height: 1.5;
}

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

input,
button {
	font: inherit;
}

input,
button,
.status-box {
	border-radius: 16px;
}

input {
	width: 100%;
	min-height: 48px;
	padding: 0 15px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
	outline: none;
}

input::placeholder {
	color: rgba(245, 239, 242, 0.42);
}

input:focus {
	border-color: rgba(207, 21, 31, 0.6);
	box-shadow: 0 0 0 4px rgba(207, 21, 31, 0.14);
}

textarea {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
	resize: vertical;
	min-height: 92px;
}

textarea:focus {
	border-color: rgba(207, 21, 31, 0.6);
	box-shadow: 0 0 0 4px rgba(207, 21, 31, 0.14);
	outline: none;
}

button {
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid transparent;
	color: #fff6f7;
	background:
		linear-gradient(135deg, #250506 0%, #cf151f 58%, #f0b9bc 100%);
	cursor: pointer;
	transition:
		transform 160ms ease,
		filter 160ms ease;
}

.button-secondary {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.12);
	color: var(--text);
}

button:hover {
	transform: translateY(-1px);
	filter: brightness(1.05);
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.status-box {
	min-height: 62px;
	padding: 14px 16px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
	color: rgba(245, 239, 242, 0.78);
	white-space: pre-wrap;
}

.status-box[data-tone="good"] {
	border-color: rgba(118, 255, 106, 0.22);
	background: rgba(118, 255, 106, 0.08);
	color: #d9ffd7;
}

.status-box[data-tone="warn"] {
	border-color: rgba(207, 21, 31, 0.24);
	background: rgba(207, 21, 31, 0.1);
	color: #ffd8da;
}

.status-box[data-tone="neutral"] {
	color: rgba(245, 239, 242, 0.74);
}

.mod-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.52);
	border: 1px solid rgba(255, 77, 88, 0.22);
	color: #ff4d58;
	font-family: "Metal Mania", "Bebas Neue", serif;
	font-size: 1.2rem;
	letter-spacing: 0.08em;
	text-transform: lowercase;
	text-shadow: 0 0 16px rgba(207, 21, 31, 0.36);
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
	pointer-events: auto;
}

.mod-header-btn {
	min-height: 34px;
	padding: 0 12px;
	font-size: 0.98rem;
}

.chat-mod-panel {
	position: fixed;
	inset: 0;
	z-index: 20;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.78);
	backdrop-filter: blur(18px);
}

.chat-mod-card {
	width: min(1040px, 100%);
	max-height: min(88vh, 980px);
	overflow: hidden;
	display: grid;
	gap: 16px;
	padding: 22px;
	border-radius: 26px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background:
		linear-gradient(180deg, rgba(12, 8, 10, 0.98), rgba(4, 4, 6, 0.98)),
		var(--panel);
	box-shadow: var(--shadow);
}

.chat-mod-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.chat-mod-list {
	display: grid;
	gap: 14px;
	overflow: auto;
	padding-right: 4px;
}

.chat-mod-item {
	display: grid;
	gap: 10px;
	padding: 16px;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
}

.chat-mod-item-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

@media (max-width: 840px) {
	.choice-grid,
	.field-grid,
	.gate-form {
		grid-template-columns: 1fr;
	}

	.workspace-head,
	.panel-head,
	.chat-mod-head,
	.chat-mod-item-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.chat-mod-card {
		max-height: 92vh;
		padding: 18px;
	}
}
