:root {
	color-scheme: dark;
	--realm-bg: #080b08;
	--realm-gold-strong: #f1c86c;
	--realm-text: #fff6dd;
	--realm-muted: #d7ccb5;
	--realm-border: rgba(255, 239, 194, 0.2);
}

* {
	box-sizing: border-box;
}

html {
	min-width: 320px;
	height: auto;
	overflow-x: hidden;
	overflow-y: auto;
	touch-action: pan-y;
	scroll-behavior: smooth;
	background: var(--realm-bg);
}

img,
a {
	-webkit-user-drag: none;
}

body {
	min-height: 100%;
	margin: 0;
	overflow-x: hidden;
	overflow-y: auto;
	touch-action: pan-y;
	background: var(--realm-bg);
	color: var(--realm-text);
	font-family:
		Inter,
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		sans-serif;
}

[hidden] {
	display: none !important;
}

.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;
}

.account-control {
	position: fixed;
	z-index: 20;
	top: 1rem;
	right: 1rem;
	display: flex;
	align-items: flex-end;
	flex-direction: column;
	gap: 0.5rem;
	text-align: left;
}

.account-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
}

.account-launch-button {
	min-height: 2.75rem;
	padding: 0 1rem;
	border: 1px solid var(--realm-gold-strong);
	border-radius: 6px;
	background: rgba(8, 11, 8, 0.94);
	color: var(--realm-text);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 900;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.34);
}

.notification-button {
	position: relative;
	display: grid;
	width: 2.75rem;
	height: 2.75rem;
	place-items: center;
	border: 1px solid var(--realm-gold-strong);
	border-radius: 6px;
	background: rgba(8, 11, 8, 0.94);
	color: var(--realm-text);
	cursor: pointer;
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.34);
}

.notification-button svg {
	width: 1.15rem;
	height: 1.15rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.notification-button span {
	position: absolute;
	top: -0.35rem;
	right: -0.35rem;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 0 0.25rem;
	border-radius: 999px;
	background: #db6262;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 900;
	line-height: 1.15rem;
	text-align: center;
}

.account-launch-button:hover,
.account-launch-button:focus-visible,
.account-launch-button.is-open,
.notification-button:hover,
.notification-button:focus-visible {
	background: var(--realm-gold-strong);
	color: #080b08;
	outline: none;
}

.notification-popover {
	display: grid;
	width: min(24rem, calc(100vw - 2rem));
	gap: 0.65rem;
	padding: 0.8rem;
	border: 1px solid var(--realm-border);
	border-radius: 8px;
	background: rgba(8, 11, 8, 0.96);
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.34);
}

.notification-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
}

.notification-header strong {
	color: var(--realm-gold-strong);
}

.notification-list {
	display: grid;
	gap: 0.45rem;
	max-height: 18rem;
	overflow: auto;
}

.notification-entry {
	display: grid;
	gap: 0.2rem;
	padding: 0.55rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.72);
}

.notification-entry strong {
	color: #fff;
	font-size: 0.82rem;
}

.notification-entry span {
	color: var(--realm-muted);
	font-size: 0.74rem;
}

.account-popover {
	display: grid;
	width: min(22rem, calc(100vw - 2rem));
	gap: 0.75rem;
	padding: 0.8rem;
	border: 1px solid var(--realm-border);
	border-radius: 8px;
	background: rgba(8, 11, 8, 0.94);
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.34);
}

.account-mode-tabs,
.dashboard-tabs {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: 0.35rem;
	padding: 0.25rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.74);
}

.account-mode-tabs button,
.dashboard-tabs button {
	min-height: 2.2rem;
	padding: 0 0.65rem;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--realm-muted);
	font: inherit;
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0;
	cursor: pointer;
}

.account-mode-tabs button:hover,
.account-mode-tabs button:focus-visible,
.account-mode-tabs button.is-active,
.dashboard-tabs button:hover,
.dashboard-tabs button:focus-visible,
.dashboard-tabs button.is-active {
	background: var(--realm-gold-strong);
	color: #080b08;
	outline: none;
}

.account-form {
	display: grid;
	gap: 0.45rem;
}

.account-form label,
.log-toolbar label {
	color: var(--realm-muted);
	font-size: 0.72rem;
	font-weight: 800;
}

.account-form input,
.log-toolbar select,
.ticket-reply-form textarea,
.ticket-create-form select,
.ticket-create-form textarea,
.account-service-panel select,
.rename-form input,
.staff-toolbar select,
.staff-search-form input,
.staff-action-form input,
.staff-duration-action select,
.staff-ticket-create textarea {
	width: 100%;
	min-width: 0;
	height: 2.4rem;
	padding: 0 0.7rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.96);
	color: #fff;
	font: inherit;
	font-size: 0.85rem;
	letter-spacing: 0;
	outline: none;
	-webkit-user-select: text;
	user-select: text;
}

.account-form input:focus,
.log-toolbar select:focus,
.ticket-reply-form textarea:focus,
.ticket-create-form select:focus,
.ticket-create-form textarea:focus,
.account-service-panel select:focus,
.rename-form input:focus,
.staff-toolbar select:focus,
.staff-search-form input:focus,
.staff-action-form input:focus,
.staff-duration-action select:focus,
.staff-ticket-create textarea:focus {
	border-color: var(--realm-gold-strong);
	box-shadow: 0 0 0 2px rgba(241, 200, 108, 0.14);
}

.account-primary-button,
.account-secondary-button,
.staff-danger-button {
	min-height: 2.4rem;
	padding: 0 0.8rem;
	border: 1px solid var(--realm-gold-strong);
	border-radius: 6px;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0;
	white-space: nowrap;
	cursor: pointer;
}

.account-primary-button {
	background: var(--realm-gold-strong);
	color: #080b08;
}

.account-secondary-button {
	background: transparent;
	color: var(--realm-text);
}

.staff-danger-button {
	border-color: #db6262;
	background: #db6262;
	color: #080b08;
}

.account-primary-button:hover,
.account-primary-button:focus-visible,
.account-secondary-button:hover,
.account-secondary-button:focus-visible,
.staff-danger-button:hover,
.staff-danger-button:focus-visible {
	border-color: #fff;
	outline: none;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.account-primary-button:disabled,
.account-secondary-button:disabled,
.staff-danger-button:disabled,
.account-form input:disabled,
.ticket-reply-form textarea:disabled {
	opacity: 0.55;
	cursor: wait;
}

.account-session {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	color: var(--realm-muted);
	font-size: 0.85rem;
}

.account-session p {
	grid-column: 1 / -1;
	margin: 0;
}

.account-session strong {
	color: var(--realm-gold-strong);
}

.account-message {
	min-height: 1rem;
	margin: 0;
	color: #9ee6ad;
	font-size: 0.72rem;
	line-height: 1.35;
}

.account-message.is-error,
.dashboard-message.is-error {
	color: #ff9c9c;
}

.player-dashboard {
	width: min(96vw, 82rem);
	max-width: none;
	height: min(92vh, 58rem);
	max-height: none;
	padding: 0;
	border: 1px solid var(--realm-gold-strong);
	border-radius: 8px;
	background: #080b08;
	color: var(--realm-text);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
}

.player-dashboard::backdrop {
	background: rgba(0, 0, 0, 0.84);
}

.dashboard-shell {
	display: grid;
	height: 100%;
	grid-template-rows: auto auto auto minmax(0, 1fr);
	gap: 0.75rem;
	padding: 1rem;
}

.dashboard-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.dashboard-header .realm-kicker {
	margin-bottom: 0.25rem;
}

.dashboard-header h2 {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.65rem;
	letter-spacing: 0;
}

.dashboard-close {
	display: grid;
	width: 2.25rem;
	height: 2.25rem;
	place-items: center;
	padding: 0;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: transparent;
	color: var(--realm-text);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.dashboard-close:hover,
.dashboard-close:focus-visible {
	border-color: var(--realm-gold-strong);
	color: var(--realm-gold-strong);
	outline: none;
}

.dashboard-tabs {
	display: flex;
	width: fit-content;
	max-width: 100%;
}

.dashboard-tabs button {
	min-width: 7.5rem;
}

.dashboard-message {
	min-height: 1.1rem;
	margin: 0;
	color: #9ee6ad;
	font-size: 0.78rem;
}

.dashboard-view {
	min-height: 0;
	overflow: auto;
	scrollbar-color: var(--realm-gold-strong) rgba(17, 23, 15, 0.8);
}

.character-layout {
	display: grid;
	min-height: 100%;
	grid-template-columns: 15rem minmax(0, 1fr);
	gap: 1rem;
}

.character-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding-right: 0.5rem;
	border-right: 1px solid var(--realm-border);
}

.character-list-button {
	display: grid;
	gap: 0.2rem;
	padding: 0.75rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.82);
	color: var(--realm-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.character-list-button:hover,
.character-list-button:focus-visible,
.character-list-button.is-active {
	border-color: var(--realm-gold-strong);
	outline: none;
}

.character-list-button strong {
	color: #fff;
	font-size: 0.95rem;
}

.character-list-button span {
	color: var(--realm-muted);
	font-size: 0.72rem;
}

.character-detail {
	min-width: 0;
}

.character-summary {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding-bottom: 0.9rem;
	border-bottom: 1px solid var(--realm-border);
}

.character-summary h3,
.staff-panel h3 {
	margin: 0;
	color: #fff;
	font-size: 1.05rem;
	letter-spacing: 0;
}

.character-summary p {
	margin: 0.25rem 0 0;
	color: var(--realm-muted);
	font-size: 0.82rem;
}

.character-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.character-facts span {
	padding: 0.35rem 0.55rem;
	border: 1px solid var(--realm-border);
	border-radius: 5px;
	background: rgba(17, 23, 15, 0.82);
	color: var(--realm-muted);
	font-size: 0.72rem;
}

.inventory-section {
	margin-top: 1rem;
}

.inventory-section h4 {
	margin: 0 0 0.55rem;
	color: var(--realm-gold-strong);
	font-size: 0.78rem;
	text-transform: uppercase;
}

.equipment-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.45rem;
}

.equipment-slot,
.inventory-item {
	display: grid;
	min-height: 3.3rem;
	grid-template-columns: 2.5rem minmax(0, 1fr);
	align-items: center;
	gap: 0.55rem;
	padding: 0.55rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.72);
}

.equipment-slot:has(.inventory-item-copy:only-child),
.inventory-item:has(.inventory-item-copy:only-child) {
	grid-template-columns: 1fr;
}

.item-icon {
	display: block;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--realm-border);
	border-radius: 4px;
	background: #050705;
	object-fit: cover;
}

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

.equipment-slot small,
.inventory-item small {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--realm-muted);
	font-size: 0.66rem;
	text-transform: uppercase;
}

.equipment-slot strong,
.inventory-item strong {
	display: block;
	color: #fff;
	font-size: 0.78rem;
	overflow-wrap: anywhere;
}

.equipment-slot span,
.inventory-item span {
	display: block;
	margin-top: 0.2rem;
	color: var(--realm-muted);
	font-size: 0.68rem;
}

.inventory-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.45rem;
}

.item-quality-2 strong {
	color: #66d36e;
}

.item-quality-3 strong {
	color: #5fa8ff;
}

.item-quality-4 strong {
	color: #c57cff;
}

.item-quality-5 strong {
	color: #ff9f43;
}

.ticket-list {
	display: grid;
	gap: 0.65rem;
}

.ticket-create-form {
	display: grid;
	grid-template-columns: minmax(10rem, 0.35fr) minmax(16rem, 1fr) auto;
	align-items: end;
	gap: 0.65rem;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--realm-border);
}

.ticket-create-form > div {
	display: grid;
	gap: 0.35rem;
}

.ticket-create-form label,
.account-service-panel label,
.rename-form label {
	color: var(--realm-muted);
	font-size: 0.72rem;
	font-weight: 800;
}

.ticket-create-form textarea {
	height: 4.5rem;
	padding-block: 0.55rem;
	resize: vertical;
}

.ticket-entry {
	padding: 0.8rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.72);
}

.ticket-entry-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ticket-entry h3 {
	margin: 0;
	color: #fff;
	font-size: 0.92rem;
}

.ticket-status {
	padding: 0.25rem 0.45rem;
	border: 1px solid var(--realm-border);
	border-radius: 4px;
	color: var(--realm-gold-strong);
	font-size: 0.66rem;
	font-weight: 900;
	text-transform: uppercase;
}

.ticket-entry-text {
	margin: 0.65rem 0 0;
	color: var(--realm-muted);
	font-size: 0.8rem;
	line-height: 1.55;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	-webkit-user-select: text;
	user-select: text;
}

.ticket-response {
	margin-top: 0.65rem;
	padding: 0.65rem;
	border-left: 3px solid var(--realm-gold-strong);
	background: rgba(241, 200, 108, 0.07);
}

.ticket-reply-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.ticket-reply-form textarea {
	height: 4rem;
	padding-block: 0.55rem;
	resize: vertical;
}

.account-changes-layout {
	display: grid;
	grid-template-columns: minmax(18rem, 0.75fr) minmax(22rem, 1.25fr);
	gap: 1rem;
}

.account-service-panel {
	min-width: 0;
	padding: 0.85rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.58);
}

.account-service-panel h3 {
	margin: 0 0 0.75rem;
	color: #fff;
	font-size: 1rem;
}

.account-service-panel > label {
	display: block;
	margin-bottom: 0.35rem;
}

.account-service-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	margin-top: 0.65rem;
}

.rename-form {
	display: grid;
	gap: 0.35rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--realm-border);
}

.rename-form > div {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.5rem;
}

.recovery-quota {
	margin: -0.2rem 0 0.75rem;
	color: var(--realm-muted);
	font-size: 0.74rem;
}

.recovery-list {
	display: grid;
	gap: 0.5rem;
}

.recovery-item {
	display: grid;
	grid-template-columns: 2.5rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.65rem;
	padding: 0.65rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.72);
}

.recovery-item-copy {
	display: grid;
	min-width: 0;
	gap: 0.2rem;
}

.recovery-item-copy strong {
	color: #fff;
	font-size: 0.82rem;
	overflow-wrap: anywhere;
}

.recovery-item-copy span {
	color: var(--realm-muted);
	font-size: 0.68rem;
}

.staff-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.staff-stat {
	padding: 0.7rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.72);
}

.staff-stat span {
	display: block;
	color: var(--realm-muted);
	font-size: 0.68rem;
	text-transform: uppercase;
}

.staff-stat strong {
	display: block;
	margin-top: 0.2rem;
	color: #fff;
	font-size: 1.1rem;
}

.staff-toolbar {
	display: grid;
	grid-template-columns: auto minmax(12rem, 20rem) auto;
	align-items: end;
	justify-content: start;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.staff-toolbar label {
	grid-column: 1 / -1;
	color: var(--realm-muted);
	font-size: 0.72rem;
	font-weight: 800;
}

.staff-operations {
	display: grid;
	grid-template-columns: minmax(24rem, 1fr) minmax(24rem, 1fr);
	gap: 1rem;
}

.staff-panel {
	min-width: 0;
	padding-top: 0.85rem;
	border-top: 1px solid var(--realm-border);
}

.staff-panel h3 {
	margin-bottom: 0.55rem;
}

.staff-ticket-entry {
	display: grid;
	gap: 0.65rem;
}

.staff-ticket-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	color: var(--realm-muted);
	font-size: 0.7rem;
}

.staff-ticket-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.staff-ticket-response-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.5rem;
}

.staff-ticket-response-form textarea,
.staff-ticket-create textarea {
	width: 100%;
	min-height: 4.5rem;
	padding: 0.55rem 0.7rem;
	resize: vertical;
}

.staff-search-form,
.staff-action-form,
.staff-ticket-create {
	display: grid;
	gap: 0.35rem;
}

.staff-search-form label,
.staff-action-form label,
.staff-ticket-create label {
	color: var(--realm-muted);
	font-size: 0.72rem;
	font-weight: 800;
}

.staff-search-form > div,
.staff-action-form > div {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.45rem;
}

.staff-search-form > div {
	grid-template-columns: minmax(0, 1fr) auto auto;
}

.ticket-archive-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.55rem;
	color: var(--realm-muted);
	font-size: 0.76rem;
	font-weight: 800;
}

.ticket-archive-toggle input {
	width: 1rem;
	height: 1rem;
	accent-color: var(--realm-gold-strong);
}

.staff-player-results {
	display: grid;
	gap: 0.4rem;
	margin-top: 0.65rem;
}

.staff-player-result {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(17, 23, 15, 0.72);
}

.staff-player-result strong,
.staff-selected-player strong {
	display: block;
	color: #fff;
	font-size: 0.82rem;
}

.staff-player-result span,
.staff-selected-player span {
	display: block;
	margin-top: 0.15rem;
	color: var(--realm-muted);
	font-size: 0.68rem;
}

.staff-selected-player {
	display: grid;
	gap: 0.75rem;
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--realm-border);
}

.staff-selected-player[hidden] {
	display: none;
}

.staff-player-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.staff-duration-action {
	grid-template-columns: 7rem minmax(0, 1fr) auto auto !important;
}

.staff-danger-form {
	padding-top: 0.7rem;
	border-top: 1px solid rgba(219, 98, 98, 0.34);
}

.staff-ticket-create {
	padding-top: 0.75rem;
	border-top: 1px solid var(--realm-border);
}

.staff-review-layout {
	display: grid;
	grid-template-columns: minmax(20rem, 0.75fr) minmax(24rem, 1.25fr);
	gap: 1rem;
	margin-top: 1rem;
}

.staff-audit-list {
	display: grid;
	max-height: 30rem;
	gap: 0.4rem;
	overflow: auto;
}

.staff-audit-entry {
	padding: 0.55rem;
	border-left: 2px solid var(--realm-gold-strong);
	background: rgba(17, 23, 15, 0.62);
}

.staff-audit-entry strong {
	display: block;
	color: #fff;
	font-size: 0.75rem;
}

.staff-audit-entry span {
	display: block;
	margin-top: 0.2rem;
	color: var(--realm-muted);
	font-size: 0.66rem;
	overflow-wrap: anywhere;
}

.log-viewer {
	min-width: 0;
}

.log-toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.4rem;
	margin-bottom: 0.5rem;
}

.log-toolbar label {
	grid-column: 1 / -1;
}

.log-viewer pre {
	height: 30rem;
	margin: 0;
	padding: 0.75rem;
	overflow: auto;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: #050705;
	color: #d7e2d3;
	font: 0.72rem/1.5 Consolas, "Courier New", monospace;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	-webkit-user-select: text;
	user-select: text;
}

.hero {
	display: grid;
	height: 100vh;
	height: 100svh;
	min-height: 100vh;
	min-height: 100svh;
	place-items: center;
	padding: 3rem 1.25rem;
	background-image:
		linear-gradient(
			90deg,
			rgba(8, 11, 8, 0.94) 0%,
			rgba(8, 11, 8, 0.62) 50%,
			rgba(8, 11, 8, 0.94) 100%
		),
		linear-gradient(180deg, rgba(8, 11, 8, 0.08), var(--realm-bg)),
		url("/assets/realm-hero.jpg");
	background-position: center;
	background-size: cover;
	text-align: center;
}

.hero-content {
	width: 100%;
	max-width: 980px;
	min-width: 0;
}

.realm-kicker {
	margin: 0 0 1rem;
	color: var(--realm-gold-strong);
	font-size: 0.82rem;
	font-weight: 900;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hero-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 6.5rem;
	font-weight: 900;
	line-height: 0.9;
	letter-spacing: 0;
}

.hero-copy {
	max-width: 650px;
	margin: 1.5rem auto 0;
	color: var(--realm-muted);
	font-size: 1.2rem;
	line-height: 1.65;
}

.hero-actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.download-button,
.install-button {
	display: inline-flex;
	min-height: 52px;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.5rem;
	border: 2px solid #fff;
	border-radius: 8px;
	background: #fff;
	color: #080b08;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	transition:
		transform 180ms ease,
		box-shadow 180ms ease,
		background-color 180ms ease,
		color 180ms ease;
}

.install-button {
	border-color: var(--realm-border);
	background: rgba(17, 23, 15, 0.86);
	color: var(--realm-text);
}

.download-button:hover,
.install-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.install-button:hover {
	border-color: var(--realm-gold-strong);
	background: var(--realm-gold-strong);
	color: #080b08;
}

.download-button:focus-visible,
.install-button:focus-visible,
.install-section a:focus-visible {
	outline: 3px solid var(--realm-gold-strong);
	outline-offset: 4px;
}

.hero-stats {
	display: grid;
	max-width: 980px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	margin: 2.25rem auto 0;
}

.stat-box {
	min-height: 86px;
	padding: 1rem;
	border: 1px solid var(--realm-border);
	border-radius: 8px;
	background: rgba(17, 23, 15, 0.9);
}

.stat-label {
	margin: 0 0 0.35rem;
	color: var(--realm-muted);
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
}

.stat-value {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	margin: 0;
	color: #fff;
	font-size: 1.05rem;
	font-weight: 900;
	overflow-wrap: anywhere;
	text-align: center;
}

.status-dot {
	width: 0.65rem;
	height: 0.65rem;
	flex: 0 0 auto;
	border-radius: 50%;
}

.status-dot--checking {
	background: #f1c86c;
	box-shadow: 0 0 0 3px rgba(241, 200, 108, 0.16);
}

.status-dot--online {
	background: #3dcc68 !important;
	box-shadow: 0 0 0 3px rgba(61, 204, 104, 0.16) !important;
}

.status-dot--offline {
	background: #dc5a5a !important;
	box-shadow: 0 0 0 3px rgba(220, 90, 90, 0.16) !important;
}

.status-dot--unavailable {
	background: #a59d8e;
	box-shadow: 0 0 0 3px rgba(165, 157, 142, 0.16);
}

.phase-value {
	font-size: 0.92rem;
	line-height: 1.3;
}

.realm-disclaimer {
	max-width: 760px;
	margin: 1.25rem auto 0;
	color: rgba(215, 204, 181, 0.72);
	font-size: 0.75rem;
	line-height: 1.5;
}

.install-section {
	display: grid;
	height: 100vh;
	height: 100svh;
	scroll-margin-top: 1rem;
	place-items: center;
	padding: 2rem 1.25rem;
	background:
		radial-gradient(circle at top, rgba(241, 200, 108, 0.08), transparent 35rem),
		#0c100c;
}

.install-content {
	width: 100%;
	max-width: 780px;
	min-width: 0;
	margin: 0 auto;
	text-align: center;
}

.install-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2.5rem, 7vw, 4rem);
	line-height: 1;
}

.install-intro {
	margin: 1rem 0 2rem;
	color: var(--realm-muted);
	font-size: 1.05rem;
}

.install-steps {
	display: grid;
	width: 100%;
	min-width: 0;
	gap: 1rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
	text-align: left;
	counter-reset: install-step;
}

.install-steps li {
	display: grid;
	width: 100%;
	min-width: 0;
	grid-template-columns: 3rem minmax(0, 1fr) 2.75rem;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem;
	border: 1px solid var(--realm-border);
	border-radius: 10px;
	background: rgba(17, 23, 15, 0.9);
	counter-increment: install-step;
}

.install-steps li[hidden] {
	display: none;
}

.install-steps li::before {
	display: grid;
	width: 3rem;
	height: 3rem;
	place-items: center;
	border-radius: 50%;
	background: var(--realm-gold-strong);
	color: #080b08;
	font-size: 1.1rem;
	font-weight: 900;
	content: counter(install-step);
}

.install-steps h3 {
	margin: 0 0 0.4rem;
	color: #fff;
	font-size: 1.05rem;
	overflow-wrap: anywhere;
}

.install-steps p {
	margin: 0;
	color: var(--realm-muted);
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.install-steps li > div {
	min-width: 0;
}

.step-image-button {
	position: relative;
	display: grid;
	width: 2.75rem;
	height: 2.75rem;
	place-items: center;
	padding: 0;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: rgba(8, 11, 8, 0.7);
	color: var(--realm-gold-strong);
	cursor: pointer;
}

.step-image-button:hover,
.step-image-button:focus-visible {
	border-color: var(--realm-gold-strong);
	background: rgba(241, 200, 108, 0.12);
	outline: none;
}

.picture-icon {
	position: relative;
	width: 1.15rem;
	height: 0.95rem;
	border: 2px solid currentColor;
	border-radius: 2px;
}

.picture-icon::before {
	position: absolute;
	top: 0.14rem;
	right: 0.16rem;
	width: 0.2rem;
	height: 0.2rem;
	border-radius: 50%;
	background: currentColor;
	content: "";
}

.picture-icon::after {
	position: absolute;
	right: 0.1rem;
	bottom: 0.08rem;
	left: 0.1rem;
	height: 0.42rem;
	background: currentColor;
	clip-path: polygon(0 100%, 32% 28%, 50% 65%, 70% 18%, 100% 100%);
	content: "";
}

.step-image-preview {
	position: absolute;
	z-index: 10;
	right: -0.5rem;
	bottom: calc(100% + 0.75rem);
	display: none;
	width: min(28rem, 55vw);
	aspect-ratio: 16 / 9;
	padding: 0.35rem;
	border: 1px solid var(--realm-gold-strong);
	border-radius: 6px;
	background: #080b08;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
	pointer-events: none;
}

.step-image-preview::after {
	position: absolute;
	right: 1.15rem;
	bottom: -0.45rem;
	width: 0.75rem;
	height: 0.75rem;
	border-right: 1px solid var(--realm-gold-strong);
	border-bottom: 1px solid var(--realm-gold-strong);
	background: #080b08;
	content: "";
	transform: rotate(45deg);
}

.step-image-preview img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 3px;
	object-fit: cover;
}

@media (hover: hover) {
	.step-image-button:hover .step-image-preview,
	.step-image-button:focus-visible .step-image-preview {
		display: block;
	}
}

.image-modal {
	width: min(94vw, 78rem);
	max-width: none;
	max-height: 92vh;
	padding: 0;
	border: 1px solid var(--realm-gold-strong);
	border-radius: 8px;
	background: #080b08;
	color: var(--realm-text);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
}

.image-modal::backdrop {
	background: rgba(0, 0, 0, 0.88);
}

.image-modal-header {
	display: flex;
	min-height: 3rem;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0.75rem 0.5rem 1rem;
	border-bottom: 1px solid var(--realm-border);
}

.image-modal-header p {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 800;
}

.image-modal-close {
	display: grid;
	width: 2.25rem;
	height: 2.25rem;
	place-items: center;
	padding: 0;
	border: 1px solid var(--realm-border);
	border-radius: 6px;
	background: transparent;
	color: var(--realm-text);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.image-modal-close:hover,
.image-modal-close:focus-visible {
	border-color: var(--realm-gold-strong);
	color: var(--realm-gold-strong);
	outline: none;
}

.image-modal > img {
	display: block;
	width: 100%;
	max-height: calc(92vh - 3rem);
	object-fit: contain;
}

.install-steps a {
	color: var(--realm-gold-strong);
	font-weight: 700;
}

.install-steps code {
	padding: 0.15rem 0.35rem;
	border: 1px solid rgba(241, 200, 108, 0.18);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.3);
	color: var(--realm-text);
	font-size: 0.9em;
	overflow-wrap: anywhere;
}

.install-pagination {
	display: grid;
	grid-template-columns: minmax(7rem, 1fr) auto minmax(7rem, 1fr);
	align-items: center;
	gap: 1rem;
	margin: 0 0 1rem;
}

.install-pagination p {
	min-width: 8.5rem;
	margin: 0;
	color: var(--realm-muted);
	font-size: 0.9rem;
	font-weight: 800;
}

.install-page-button {
	min-height: 44px;
	padding: 0.65rem 1rem;
	border: 1px solid var(--realm-border);
	border-radius: 8px;
	background: rgba(17, 23, 15, 0.9);
	color: var(--realm-text);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.install-page-button:hover:not(:disabled),
.install-page-button:focus-visible {
	border-color: var(--realm-gold-strong);
	color: var(--realm-gold-strong);
}

.install-page-button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.back-to-top {
	min-height: 44px;
}

@media (max-width: 760px) {
	.account-control {
		top: 0.75rem;
		right: 0.75rem;
	}

	.player-dashboard {
		width: 100vw;
		height: 100vh;
		height: 100svh;
		border: 0;
		border-radius: 0;
	}

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

	.character-list {
		flex-direction: row;
		overflow-x: auto;
		padding: 0 0 0.5rem;
		border-right: 0;
		border-bottom: 1px solid var(--realm-border);
	}

	.character-list-button {
		min-width: 11rem;
	}

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

	.inventory-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.staff-operations,
	.staff-review-layout {
		grid-template-columns: 1fr;
	}

	.staff-search-form > div {
		grid-template-columns: 1fr;
	}

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

	.ticket-create-form {
		grid-template-columns: 1fr;
	}

	.hero {
		padding: 4.5rem 1.25rem 2.5rem;
	}

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

	.hero-title {
		font-size: 4.5rem;
	}

	.hero-copy {
		font-size: 1.05rem;
	}
}

@media (max-width: 520px) {
	.hero {
		padding: 4.5rem 1rem 2rem;
	}

	.dashboard-shell {
		padding: 0.75rem;
	}

	.dashboard-tabs {
		width: 100%;
		overflow: hidden;
	}

	.dashboard-tabs button {
		min-width: 0;
		flex: 1 1 0;
		padding-inline: 0.25rem;
		font-size: 0.68rem;
		white-space: normal;
	}

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

	.ticket-reply-form {
		grid-template-columns: 1fr;
	}

	.staff-toolbar,
	.staff-search-form > div,
	.staff-action-form > div,
	.staff-ticket-response-form,
	.staff-duration-action {
		grid-template-columns: 1fr !important;
	}

	.staff-toolbar label {
		grid-column: auto;
	}

	.rename-form > div,
	.account-service-actions {
		grid-template-columns: 1fr;
	}

	.recovery-item {
		grid-template-columns: 2.5rem minmax(0, 1fr);
	}

	.recovery-item .account-primary-button {
		grid-column: 1 / -1;
	}

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

	.hero-title {
		font-size: 2.8rem;
	}

	.hero-copy {
		font-size: 1rem;
	}

	.download-button {
		width: 100%;
		max-width: 20rem;
	}

	.install-button {
		width: 100%;
		max-width: 20rem;
	}

	.hero-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.65rem;
		margin-top: 1.5rem;
	}

	.stat-box {
		min-height: 74px;
		padding: 0.75rem 0.5rem;
	}

	.stat-label {
		font-size: 0.68rem;
	}

	.stat-value {
		font-size: 0.92rem;
	}

	.phase-value {
		font-size: 0.82rem;
	}

	.install-section {
		padding: 1.5rem 1rem;
	}

	.install-steps li {
		position: relative;
		grid-template-columns: 2.5rem minmax(0, 1fr);
		gap: 0.75rem;
		padding: 1rem 4rem 1rem 1rem;
	}

	.install-steps li::before {
		width: 2.5rem;
		height: 2.5rem;
	}

	.step-image-button {
		position: absolute;
		top: 50%;
		right: 0.75rem;
		width: 2.5rem;
		height: 2.5rem;
		transform: translateY(-50%);
	}

	.install-title {
		font-size: 2.25rem;
	}

	.install-intro {
		margin: 0.75rem 0 1.25rem;
	}

	.install-pagination {
		grid-template-columns: 1fr 1fr;
		gap: 0.65rem;
	}

	.install-pagination p {
		grid-column: 1 / -1;
		grid-row: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.download-button,
	.install-button {
		transition: none;
	}
}

.error-page {
	display: grid;
	min-height: 100vh;
	min-height: 100svh;
	place-items: center;
	padding: 2rem 1rem;
	background-image:
		linear-gradient(rgba(8, 11, 8, 0.82), rgba(8, 11, 8, 0.95)),
		url("/assets/realm-hero.jpg");
	background-position: center;
	background-size: cover;
	text-align: center;
}

.error-code {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 8rem;
	line-height: 0.9;
	letter-spacing: 0;
}

.error-copy {
	max-width: 35rem;
	margin: 1.5rem auto;
	color: var(--realm-muted);
	font-size: 1.1rem;
	line-height: 1.7;
}

@media (max-width: 520px) {
	.error-code {
		font-size: 5rem;
	}

	.error-copy {
		font-size: 1rem;
	}
}

/* Modern portal redesign */
:root {
	--realm-bg: #050807;
	--realm-surface: rgba(11, 17, 15, 0.74);
	--realm-surface-strong: rgba(9, 13, 12, 0.92);
	--realm-gold: #d7ad57;
	--realm-gold-strong: #f0cf7a;
	--realm-teal: #42d8d0;
	--realm-red: #b6493d;
	--realm-blue: #4a80d8;
	--realm-text: #f8f1df;
	--realm-muted: #b9c0b4;
	--realm-border: rgba(248, 241, 223, 0.18);
	--realm-border-strong: rgba(240, 207, 122, 0.44);
	--portal-progress: 0;
	--portal-center-x: 68%;
	--portal-center-y: 42%;
	--portal-approach-x: 0vw;
	--portal-approach-y: 0vh;
	--portal-approach-opacity: 1;
	--portal-arrival-opacity: 0;
	--portal-approach-scale: 1;
	--portal-arrival-scale: 1.08;
	--portal-camera-roll: 0deg;
	--portal-arrival-roll: 0deg;
	--portal-scene-blur: 0px;
	--portal-ring-scale: 0.62;
	--portal-ring-opacity: 0.92;
	--portal-glow-opacity: 0.52;
	--portal-stage-opacity: 1;
	--portal-tunnel-opacity: 0;
	--portal-tunnel-scale: 0.7;
	--portal-tunnel-rotate: 0deg;
	--portal-tunnel-counter-rotate: 0deg;
	--portal-vignette-opacity: 1;
	--portal-approach-copy-opacity: 1;
	--portal-approach-copy-y: 0rem;
	--portal-threshold-copy-opacity: 0;
	--portal-threshold-copy-y: 2rem;
	--portal-threshold-copy-scale: 1;
	--portal-arrival-copy-opacity: 0;
	--portal-arrival-copy-y: 2rem;
	--portal-arrival-copy-scale: 0.98;
}

* {
	-webkit-user-select: auto;
	user-select: auto;
}

html {
	height: auto;
	overflow-x: hidden;
	overflow-y: auto;
	scroll-behavior: smooth;
	background: var(--realm-bg);
	scrollbar-color: var(--realm-gold) #101614;
}

body {
	min-height: 100%;
	height: auto;
	overflow-x: hidden;
	overflow-y: auto;
	background:
		linear-gradient(180deg, #050807 0%, #07100f 46%, #0a0d0b 100%);
	color: var(--realm-text);
	font-family:
		Inter,
		"Segoe UI",
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		sans-serif;
	line-height: 1.5;
}

body::selection {
	background: rgba(66, 216, 208, 0.3);
}

button,
a,
input,
textarea,
select {
	font: inherit;
}

.site-header {
	position: fixed;
	z-index: 50;
	top: 1rem;
	right: 1rem;
	left: 1rem;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding: 0.6rem;
	border: 1px solid rgba(248, 241, 223, 0.14);
	border-radius: 8px;
	background: rgba(5, 8, 7, 0.66);
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
	backdrop-filter: blur(18px);
	text-align: left;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	gap: 0.7rem;
	color: var(--realm-text);
	text-decoration: none;
}

.site-brand-mark {
	display: grid;
	width: 2.45rem;
	height: 2.45rem;
	place-items: center;
	border: 1px solid var(--realm-border-strong);
	border-radius: 7px;
	background:
		linear-gradient(135deg, rgba(182, 73, 61, 0.54), rgba(74, 128, 216, 0.5)),
		rgba(8, 12, 11, 0.88);
	color: #fff;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.3rem;
	font-weight: 900;
}

.site-brand strong,
.site-brand small {
	display: block;
	letter-spacing: 0;
	white-space: nowrap;
}

.site-brand strong {
	font-size: 0.88rem;
	line-height: 1.1;
}

.site-brand small {
	margin-top: 0.1rem;
	color: var(--realm-muted);
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
}

.site-nav {
	display: flex;
	justify-content: center;
	gap: 0.35rem;
	min-width: 0;
}

.site-nav a {
	display: inline-flex;
	min-height: 2.25rem;
	align-items: center;
	padding: 0 0.75rem;
	border-radius: 6px;
	color: var(--realm-muted);
	font-size: 0.78rem;
	font-weight: 850;
	text-decoration: none;
	white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
	background: rgba(248, 241, 223, 0.1);
	color: var(--realm-text);
	outline: none;
}

.account-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
}

.account-launch-button,
.notification-button,
.account-primary-button,
.account-secondary-button,
.staff-danger-button,
.install-page-button {
	border-radius: 7px;
	letter-spacing: 0;
	transition:
		border-color 160ms ease,
		background-color 160ms ease,
		color 160ms ease,
		transform 160ms ease,
		box-shadow 160ms ease;
}

.account-launch-button,
.notification-button {
	border-color: rgba(248, 241, 223, 0.22);
	background: rgba(8, 12, 11, 0.78);
	box-shadow: none;
}

.account-launch-button {
	min-height: 2.45rem;
	padding: 0 0.9rem;
	font-size: 0.78rem;
}

.notification-button {
	width: 2.45rem;
	height: 2.45rem;
}

.account-launch-button:hover,
.account-launch-button:focus-visible,
.account-launch-button.is-open,
.notification-button:hover,
.notification-button:focus-visible {
	border-color: var(--realm-gold-strong);
	background: var(--realm-gold-strong);
	color: #07100f;
	transform: translateY(-1px);
}

.account-popover,
.notification-popover {
	position: absolute;
	top: calc(100% + 0.65rem);
	right: 0;
	border-color: rgba(248, 241, 223, 0.16);
	background: rgba(7, 11, 10, 0.96);
	box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(18px);
}

.account-popover {
	width: min(23rem, calc(100vw - 2rem));
}

.notification-popover {
	width: min(26rem, calc(100vw - 2rem));
}

.realm-kicker {
	margin: 0 0 0.9rem;
	color: var(--realm-gold-strong);
	font-size: 0.74rem;
	font-weight: 900;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.portal-story {
	position: relative;
	z-index: 1;
	min-height: 340vh;
	background: #030505;
	isolation: isolate;
}

.portal-stage {
	position: fixed;
	z-index: 0;
	inset: 0;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
	background: #030505;
	opacity: var(--portal-stage-opacity);
	pointer-events: none;
}

.portal-scene,
.portal-vignette,
.portal-glow,
.portal-ring,
.portal-tunnel {
	position: absolute;
	pointer-events: none;
}

.portal-scene {
	inset: -8vh -7vw;
	background-position: center;
	background-size: cover;
	filter: blur(var(--portal-scene-blur)) saturate(1.05);
	will-change: opacity, transform;
}

.portal-scene--approach {
	background-image:
		linear-gradient(
			90deg,
			rgba(3, 5, 5, 0.92) 0%,
			rgba(3, 5, 5, 0.34) 47%,
			rgba(3, 5, 5, 0.08) 72%,
			rgba(3, 5, 5, 0.52) 100%
		),
		url("/assets/realm-hero.jpg");
	background-position: center;
	opacity: var(--portal-approach-opacity);
	transform:
		translate3d(var(--portal-approach-x), var(--portal-approach-y), 0)
		scale(var(--portal-approach-scale))
		rotate(var(--portal-camera-roll));
	transform-origin: var(--portal-center-x) var(--portal-center-y);
}

.portal-scene--arrival {
	background-image:
		linear-gradient(
			90deg,
			rgba(3, 5, 5, 0.82) 0%,
			rgba(3, 5, 5, 0.18) 34%,
			rgba(3, 5, 5, 0.18) 66%,
			rgba(3, 5, 5, 0.82) 100%
		),
		linear-gradient(180deg, rgba(3, 5, 5, 0.08), rgba(3, 5, 5, 0.72)),
		url("/assets/portal-welcome.png");
	opacity: var(--portal-arrival-opacity);
	transform:
		scale(var(--portal-arrival-scale))
		rotate(var(--portal-arrival-roll));
}

.portal-glow {
	top: var(--portal-center-y);
	left: var(--portal-center-x);
	width: min(36rem, 42vw);
	height: min(36rem, 42vw);
	border-radius: 50%;
	background:
		radial-gradient(circle, rgba(111, 255, 241, 0.72), rgba(66, 216, 208, 0.24) 38%, transparent 69%);
	filter: blur(10px);
	opacity: var(--portal-glow-opacity);
	transform:
		translate(-50%, -50%)
		scale(var(--portal-ring-scale))
		rotate(var(--portal-camera-roll));
}

.portal-ring {
	top: var(--portal-center-y);
	left: var(--portal-center-x);
	width: min(30rem, 34vw);
	aspect-ratio: 1;
	border: 2px solid rgba(116, 255, 243, 0.58);
	border-radius: 50%;
	box-shadow:
		0 0 22px rgba(66, 216, 208, 0.54),
		0 0 70px rgba(66, 216, 208, 0.34),
		inset 0 0 36px rgba(66, 216, 208, 0.38);
	opacity: var(--portal-ring-opacity);
	transform:
		translate(-50%, -50%)
		scale(var(--portal-ring-scale))
		rotate(var(--portal-camera-roll));
}

.portal-tunnel {
	inset: -18vmax;
	background:
		radial-gradient(
			circle at var(--portal-center-x) var(--portal-center-y),
			rgba(224, 255, 250, 0.86) 0 4%,
			rgba(88, 237, 224, 0.55) 8%,
			rgba(33, 127, 122, 0.4) 20%,
			rgba(3, 5, 5, 0.82) 42%,
			rgba(3, 5, 5, 0.96) 70%
		);
	filter: saturate(1.15) blur(0.5px);
	mix-blend-mode: screen;
	opacity: var(--portal-tunnel-opacity);
	transform:
		scale(var(--portal-tunnel-scale))
		rotate(var(--portal-tunnel-rotate));
	will-change: opacity, transform;
}

.portal-tunnel::before,
.portal-tunnel::after {
	position: absolute;
	inset: 0;
	content: "";
	pointer-events: none;
}

.portal-tunnel::before {
	background:
		repeating-radial-gradient(
			circle at var(--portal-center-x) var(--portal-center-y),
			transparent 0 5.6%,
			rgba(141, 255, 244, 0.4) 5.9% 6.35%,
			transparent 6.7% 10.5%
		),
		radial-gradient(
			circle at var(--portal-center-x) var(--portal-center-y),
			rgba(220, 255, 250, 0.28),
			transparent 54%
		);
	opacity: 0.78;
	transform: rotate(var(--portal-tunnel-counter-rotate));
}

.portal-tunnel::after {
	background:
		repeating-conic-gradient(
			from var(--portal-tunnel-rotate) at var(--portal-center-x) var(--portal-center-y),
			transparent 0deg 8deg,
			rgba(198, 255, 249, 0.18) 8.4deg 9.1deg,
			transparent 9.5deg 18deg
		);
	mask-image:
		radial-gradient(
			circle at var(--portal-center-x) var(--portal-center-y),
			transparent 0 10%,
			#000 18%,
			#000 58%,
			transparent 72%
		);
	opacity: 0.9;
}

.portal-vignette {
	inset: 0;
	background:
		radial-gradient(circle at var(--portal-center-x) var(--portal-center-y), transparent 0 18%, rgba(3, 5, 5, 0.1) 32%, rgba(3, 5, 5, 0.64) 78%),
		linear-gradient(180deg, rgba(3, 5, 5, 0.15), rgba(3, 5, 5, 0.28) 54%, rgba(3, 5, 5, 0.82));
	opacity: var(--portal-vignette-opacity);
}

.portal-panel {
	position: relative;
	z-index: 2;
	display: grid;
	min-height: 100vh;
	min-height: 100svh;
	align-items: center;
	padding: clamp(6rem, 12vh, 8rem) clamp(1.1rem, 5vw, 5rem) 4rem;
}

.portal-panel--approach {
	justify-items: start;
	margin-top: 0;
}

.portal-panel--threshold {
	justify-items: center;
	min-height: 120vh;
	min-height: 120svh;
	text-align: center;
}

.portal-panel--arrival {
	justify-items: center;
	min-height: 120vh;
	min-height: 120svh;
	text-align: center;
}

.hero-content,
.portal-copy {
	width: min(100%, 66rem);
	min-width: 0;
}

.portal-panel--approach .portal-copy {
	max-width: 44rem;
	opacity: var(--portal-approach-copy-opacity);
	transform: translate3d(0, var(--portal-approach-copy-y), 0);
	will-change: opacity, transform;
}

.portal-copy--threshold {
	max-width: 42rem;
	padding-top: 14vh;
	opacity: var(--portal-threshold-copy-opacity);
	transform:
		translate3d(0, var(--portal-threshold-copy-y), 0)
		scale(var(--portal-threshold-copy-scale));
	will-change: opacity, transform;
}

.portal-copy--arrival {
	max-width: 58rem;
	margin-top: 4vh;
	opacity: var(--portal-arrival-copy-opacity);
	transform:
		translate3d(0, var(--portal-arrival-copy-y), 0)
		scale(var(--portal-arrival-copy-scale));
	will-change: opacity, transform;
}

.hero-title,
.portal-title,
.portal-heading {
	margin: 0;
	color: #fff9ea;
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 900;
	letter-spacing: 0;
	text-wrap: balance;
	text-shadow: 0 14px 45px rgba(0, 0, 0, 0.72);
}

.hero-title {
	max-width: 12ch;
	font-size: clamp(3.6rem, 9vw, 8rem);
	line-height: 0.9;
}

.portal-title {
	max-width: none;
	font-size: clamp(3.1rem, 8vw, 7rem);
}

.portal-heading {
	font-size: clamp(2.5rem, 6vw, 5.6rem);
	line-height: 0.95;
}

.hero-copy,
.portal-copy--threshold p {
	max-width: 42rem;
	margin: 1.25rem 0 0;
	color: rgba(248, 241, 223, 0.82);
	font-size: clamp(1rem, 1.6vw, 1.22rem);
	line-height: 1.7;
	text-shadow: 0 10px 32px rgba(0, 0, 0, 0.7);
}

.portal-copy--arrival .hero-copy {
	margin-inline: auto;
}

.scroll-cue {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-height: 2.8rem;
	margin-top: 1.8rem;
	padding: 0 1rem;
	border: 1px solid rgba(248, 241, 223, 0.3);
	border-radius: 7px;
	background: rgba(5, 8, 7, 0.42);
	color: var(--realm-text);
	font-size: 0.8rem;
	font-weight: 900;
	text-decoration: none;
	text-transform: uppercase;
	backdrop-filter: blur(14px);
}

.scroll-cue::after {
	width: 0.48rem;
	height: 0.48rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	content: "";
	transform: rotate(45deg) translateY(-0.08rem);
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
	border-color: var(--realm-teal);
	background: rgba(66, 216, 208, 0.12);
	outline: none;
}

.hero-actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.6rem;
}

.download-button,
.install-button {
	display: inline-flex;
	min-height: 3rem;
	align-items: center;
	justify-content: center;
	padding: 0.8rem 1.15rem;
	border: 1px solid rgba(248, 241, 223, 0.22);
	border-radius: 7px;
	color: var(--realm-text);
	font-size: 0.86rem;
	font-weight: 900;
	line-height: 1;
	text-decoration: none;
	transition:
		transform 160ms ease,
		box-shadow 160ms ease,
		background-color 160ms ease,
		border-color 160ms ease,
		color 160ms ease;
}

.download-button {
	border-color: rgba(240, 207, 122, 0.72);
	background: linear-gradient(180deg, #f0cf7a, #c99034);
	color: #11110b;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
}

.install-button {
	background: rgba(5, 8, 7, 0.56);
	backdrop-filter: blur(14px);
}

.download-button:hover,
.install-button:hover,
.download-button:focus-visible,
.install-button:focus-visible,
.install-section a:focus-visible {
	transform: translateY(-2px);
	outline: none;
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.install-button:hover,
.install-button:focus-visible {
	border-color: var(--realm-teal);
	background: rgba(66, 216, 208, 0.12);
	color: #fff;
}

.hero-stats {
	display: grid;
	max-width: 58rem;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 1.6rem auto 0;
}

.stat-box {
	min-height: 5.2rem;
	padding: 0.85rem;
	border: 1px solid rgba(248, 241, 223, 0.16);
	border-radius: 8px;
	background: rgba(5, 8, 7, 0.56);
	backdrop-filter: blur(14px);
}

.stat-label {
	margin: 0 0 0.35rem;
	color: rgba(248, 241, 223, 0.62);
	font-size: 0.68rem;
	font-weight: 900;
	text-transform: uppercase;
}

.stat-value {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	color: #fff;
	font-size: clamp(0.84rem, 1vw, 1rem);
	font-weight: 900;
	text-align: center;
	overflow-wrap: anywhere;
}

.status-dot {
	width: 0.62rem;
	height: 0.62rem;
	flex: 0 0 auto;
	border-radius: 999px;
}

.realm-disclaimer {
	max-width: 52rem;
	margin: 1.15rem auto 0;
	color: rgba(248, 241, 223, 0.56);
	font-size: 0.72rem;
	line-height: 1.55;
	text-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.install-section {
	position: relative;
	z-index: 3;
	display: grid;
	min-height: 100vh;
	min-height: 100svh;
	height: auto;
	scroll-margin-top: 6rem;
	place-items: center;
	padding: clamp(5rem, 10vh, 7rem) clamp(1rem, 5vw, 4rem);
	background:
		linear-gradient(180deg, rgba(3, 5, 5, 0.1), #080d0c 12%, #0b0f0d 100%),
		radial-gradient(circle at 20% 10%, rgba(182, 73, 61, 0.14), transparent 24rem),
		radial-gradient(circle at 78% 18%, rgba(74, 128, 216, 0.16), transparent 24rem);
}

.install-content {
	width: min(100%, 62rem);
	margin: 0 auto;
	text-align: left;
}

.install-title {
	margin: 0;
	color: #fff;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2.5rem, 6vw, 4.8rem);
	line-height: 0.95;
	letter-spacing: 0;
	text-wrap: balance;
}

.install-intro {
	max-width: 38rem;
	margin: 0.8rem 0 1.5rem;
	color: var(--realm-muted);
	font-size: 1rem;
}

.install-steps {
	display: grid;
	gap: 0.75rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
	counter-reset: install-step;
}

.install-steps li {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr) 2.75rem;
	align-items: center;
	gap: 0.85rem;
	padding: 0.95rem;
	border: 1px solid rgba(248, 241, 223, 0.14);
	border-radius: 8px;
	background: rgba(5, 8, 7, 0.48);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	counter-increment: install-step;
	backdrop-filter: blur(12px);
}

.install-steps li::before {
	display: grid;
	width: 2.55rem;
	height: 2.55rem;
	place-items: center;
	border: 1px solid rgba(240, 207, 122, 0.4);
	border-radius: 7px;
	background: rgba(240, 207, 122, 0.12);
	color: var(--realm-gold-strong);
	font-size: 0.95rem;
	font-weight: 900;
	content: counter(install-step);
}

.install-steps h3 {
	margin: 0 0 0.25rem;
	color: #fff;
	font-size: 1rem;
}

.install-steps p {
	margin: 0;
	color: var(--realm-muted);
	line-height: 1.55;
}

.step-image-button,
.image-modal-close,
.dashboard-close {
	border-radius: 7px;
}

.step-image-button {
	border-color: rgba(248, 241, 223, 0.18);
	background: rgba(255, 255, 255, 0.04);
}

.step-image-button:hover,
.step-image-button:focus-visible {
	border-color: var(--realm-teal);
	background: rgba(66, 216, 208, 0.12);
	color: var(--realm-teal);
}

.install-pagination {
	display: grid;
	grid-template-columns: minmax(7rem, 1fr) auto minmax(7rem, 1fr);
	align-items: center;
	gap: 0.8rem;
	margin: 0 0 1rem;
}

.install-page-button {
	border-color: rgba(248, 241, 223, 0.18);
	background: rgba(255, 255, 255, 0.05);
	color: var(--realm-text);
}

.install-page-button:hover:not(:disabled),
.install-page-button:focus-visible {
	border-color: var(--realm-gold-strong);
	color: #fff;
	transform: translateY(-1px);
}

.back-to-top {
	min-height: 2.75rem;
}

.player-dashboard,
.image-modal {
	border-color: rgba(248, 241, 223, 0.18);
	border-radius: 8px;
	background: rgba(7, 11, 10, 0.98);
}

.dashboard-shell {
	gap: 0.9rem;
	background:
		radial-gradient(circle at 10% 0%, rgba(182, 73, 61, 0.1), transparent 20rem),
		radial-gradient(circle at 90% 0%, rgba(74, 128, 216, 0.12), transparent 20rem);
}

.dashboard-tabs,
.account-mode-tabs {
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
}

.dashboard-tabs button,
.account-mode-tabs button {
	border-radius: 6px;
}

.ticket-entry,
.account-service-panel,
.staff-stat,
.staff-player-result,
.recovery-item,
.character-list-button,
.equipment-slot,
.inventory-item {
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.045);
}

@media (max-width: 900px) {
	.site-header {
		grid-template-columns: auto auto;
	}

	.site-nav {
		display: none;
	}

	.site-brand strong {
		font-size: 0.8rem;
	}

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

@media (max-width: 760px) {
	.site-header {
		top: 0.75rem;
		right: 0.75rem;
		left: 0.75rem;
		gap: 0.6rem;
		padding: 0.5rem;
	}

	.site-brand small {
		display: none;
	}

	.site-brand-mark {
		width: 2.2rem;
		height: 2.2rem;
	}

	.account-launch-button {
		min-height: 2.25rem;
		padding: 0 0.7rem;
		font-size: 0.72rem;
	}

	.notification-button {
		width: 2.25rem;
		height: 2.25rem;
	}

	.portal-panel {
		padding: 5.5rem 1rem 3rem;
	}

	.portal-panel--approach,
	.portal-panel--threshold,
	.portal-panel--arrival {
		justify-items: center;
		text-align: center;
	}

	.portal-panel--approach .portal-copy,
	.portal-copy--threshold,
	.portal-copy--arrival {
		max-width: 38rem;
	}

	.hero-title {
		max-width: none;
		font-size: clamp(3rem, 16vw, 5.4rem);
	}

	.portal-title {
		font-size: clamp(2.7rem, 13vw, 5.2rem);
	}

	.portal-glow,
	.portal-ring {
		top: 45%;
		left: 50%;
	}

	.portal-scene--approach {
		background-position: 66% center;
	}

	.portal-scene--arrival {
		background-image:
			linear-gradient(
				90deg,
				rgba(3, 5, 5, 0.5) 0%,
				rgba(3, 5, 5, 0.12) 30%,
				rgba(3, 5, 5, 0.12) 70%,
				rgba(3, 5, 5, 0.5) 100%
			),
			linear-gradient(180deg, rgba(3, 5, 5, 0.02), rgba(3, 5, 5, 0.68)),
			url("/assets/portal-welcome.png");
		background-position:
			center,
			center,
			center 5.25rem;
		background-repeat: no-repeat;
		background-size:
			cover,
			cover,
			150vw auto;
	}

	.install-content {
		text-align: left;
	}
}

@media (max-width: 520px) {
	.site-brand strong {
		max-width: 8rem;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.account-popover,
	.notification-popover {
		right: -0.25rem;
	}

	.portal-story {
		min-height: 320vh;
	}

	.hero-actions {
		display: grid;
		justify-items: center;
	}

	.download-button,
	.install-button {
		width: min(100%, 19rem);
	}

	.hero-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.55rem;
	}

	.stat-box {
		min-height: 4.7rem;
		padding: 0.65rem 0.45rem;
	}

	.stat-label {
		font-size: 0.62rem;
	}

	.stat-value,
	.phase-value {
		font-size: 0.78rem;
	}

	.install-section {
		padding: 4.5rem 1rem 2.5rem;
	}

	.install-steps li {
		grid-template-columns: 2.35rem minmax(0, 1fr) 2.4rem;
		padding: 0.75rem;
	}

	.install-steps li::before,
	.step-image-button {
		width: 2.35rem;
		height: 2.35rem;
	}

	.install-pagination {
		grid-template-columns: 1fr 1fr;
	}

	.install-pagination p {
		grid-column: 1 / -1;
		grid-row: 1;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--portal-approach-opacity: 0;
		--portal-arrival-opacity: 1;
		--portal-approach-scale: 1;
		--portal-arrival-scale: 1;
		--portal-ring-scale: 1;
		--portal-ring-opacity: 0.2;
		--portal-glow-opacity: 0.2;
		--portal-tunnel-opacity: 0;
		--portal-tunnel-scale: 1;
		--portal-vignette-opacity: 1;
	}

	html {
		scroll-behavior: auto;
	}

	.portal-scene,
	.portal-ring,
	.portal-glow,
	.download-button,
	.install-button,
	.scroll-cue {
		transition: none;
	}
}
