/* The front page at systemlog.gg. Plain CSS, drawn before any game code loads.
   It dresses a frame of the game (the Overlook at dusk, a spearman facing the sun) in the HUD look
   locked in research/hud-look: on wide screens the detailed status window, on phones the compact
   bars. The HUD here is a picture: decorative and hidden from assistive technology. */
:root {
	--glass: rgba(9, 15, 26, 0.58);
	--edge: rgba(150, 205, 255, 0.28);
	--edge-hi: rgba(150, 215, 255, 0.7);
	--sys: #8fdcff;
	--ink: #eaf2ff;
	--dim: #9fb0c6;
	--hp: #e0574f;
	--sp: #8fcf5a;
	--mp: #4f9ee8;
	--xp: #e6b450;
	--good: #a6f0b0;
	--warn: #ffcf7a;
	--display: 'Chakra Petch', system-ui, sans-serif;
	--body: 'Inter', system-ui, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, monospace;
}
html,
body {
	margin: 0;
	height: 100%;
	overflow: hidden;
	background: #0c0e12;
	color: var(--ink);
	font-family: var(--body);
	-webkit-font-smoothing: antialiased;
}
#front {
	position: fixed;
	inset: 0;
	z-index: 10;
	overflow: hidden;
	background:
		linear-gradient(to bottom, rgba(12, 14, 18, 0) 50%, rgba(12, 14, 18, 0.55) 75%, #0c0e12 100%),
		url('/front/spearman-1280.webp') 46% 42% / cover no-repeat,
		#1c1512;
}
#front[hidden] {
	display: none;
}
@media (min-width: 1100px) {
	#front {
		background:
			linear-gradient(to bottom, rgba(12, 14, 18, 0) 50%, rgba(12, 14, 18, 0.55) 75%, #0c0e12 100%),
			url('/front/spearman-2560.webp') 50% 46% / cover no-repeat,
			#1c1512;
	}
}

/* Title, line and Enter: bottom center, where they are easiest to read. */
.brand {
	position: absolute;
	left: 50%;
	bottom: max(5vh, 2rem);
	transform: translateX(-50%);
	width: min(92vw, 48rem);
	text-align: center;
}
.brand h1 {
	margin: 0;
	font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
	font-size: clamp(2.2rem, 4.4vw, 4.3rem);
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #f3eee4;
	text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}
.brand .pitch {
	margin: 0.9rem 0 0;
	font: 400 clamp(0.95rem, 1.1vw, 1.12rem) / 1.4 var(--body);
	color: #f1ece0;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
}
.brand button {
	margin-top: 1.2rem;
	padding: 0.75rem 2.8rem;
	font: 500 0.95rem/1 system-ui, 'Segoe UI', Roboto, sans-serif;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: #14110c;
	background: #e3b54e;
	border: 0;
	border-radius: 3px;
	box-shadow: 0 8px 30px rgba(227, 181, 78, 0.28);
	cursor: pointer;
}
.brand button:hover,
.brand button:focus-visible {
	background: #f0c560;
	outline: 2px solid rgba(255, 255, 255, 0.85);
	outline-offset: 3px;
}
.brand button:disabled {
	cursor: progress;
	opacity: 0.7;
}

/* HUD pieces, kept in a centered column so wide screens do not push them to the edges */
.hud {
	position: absolute;
	inset: 0;
	max-width: 1500px;
	margin: 0 auto;
}
.hud > * {
	position: absolute;
}
.panel {
	background: var(--glass);
	border: 1px solid var(--edge);
	border-radius: 4px;
	backdrop-filter: blur(10px) saturate(120%);
	box-shadow:
		0 10px 40px rgba(0, 0, 0, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.panel::before,
.panel::after {
	content: '';
	position: absolute;
	width: 12px;
	height: 12px;
	border: 2px solid var(--edge-hi);
}
.panel::before {
	left: -1px;
	top: -1px;
	border-right: 0;
	border-bottom: 0;
	border-top-left-radius: 4px;
}
.panel::after {
	right: -1px;
	bottom: -1px;
	border-left: 0;
	border-top: 0;
	border-bottom-right-radius: 4px;
}
.ph {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px 10px;
	border-bottom: 1px solid rgba(150, 205, 255, 0.16);
	font: 600 14px/1 var(--display);
	letter-spacing: 0.22em;
	color: var(--sys);
	text-transform: uppercase;
}
.ph .gem {
	width: 8px;
	height: 8px;
	transform: rotate(45deg);
	background: var(--sys);
	box-shadow: 0 0 10px var(--sys);
}
.ph .right {
	margin-left: auto;
	color: var(--dim);
	letter-spacing: 0.1em;
	font: 500 12px/1 var(--mono);
}
.track {
	height: 8px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
}
.track.thin {
	height: 4px;
}
.fill {
	height: 100%;
	border-radius: 2px;
}
.fill.hp {
	background: linear-gradient(90deg, #a8332d, var(--hp));
	box-shadow: 0 0 12px rgba(224, 87, 79, 0.55);
}
.fill.sp {
	background: linear-gradient(90deg, #5e9a35, var(--sp));
	box-shadow: 0 0 12px rgba(143, 207, 90, 0.45);
}
.fill.mp {
	background: linear-gradient(90deg, #2f6fb3, var(--mp));
	box-shadow: 0 0 12px rgba(79, 158, 232, 0.5);
}
.fill.xp {
	background: linear-gradient(90deg, #a87a26, var(--xp));
	box-shadow: 0 0 10px rgba(230, 180, 80, 0.5);
}

/* Detailed status window (wide screens) */
.status {
	left: 34px;
	top: 34px;
	width: 360px;
	display: none;
}
.status .pb {
	padding: 14px 16px 16px;
}
.who {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}
.name {
	font: 600 22px/1.1 var(--display);
	letter-spacing: 0.04em;
}
.lvl {
	font: 600 13px/1 var(--mono);
	color: var(--xp);
}
.sub {
	margin-top: 4px;
	color: var(--dim);
	font-size: 13px;
}
.bar {
	margin-top: 12px;
}
.bar .lab {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
	font: 500 12px/1 var(--mono);
	letter-spacing: 0.04em;
	color: var(--dim);
}
.bar .lab b {
	color: var(--ink);
	font-weight: 600;
}
.bar.xp-top {
	margin: 12px 0 4px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(150, 205, 255, 0.14);
}
.stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px 22px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid rgba(150, 205, 255, 0.14);
}
.stat {
	display: flex;
	justify-content: space-between;
	font-size: 13.5px;
	color: var(--dim);
}
.stat b {
	font: 600 14px/1 var(--mono);
	color: var(--ink);
}
.free {
	grid-column: 1 / -1;
	display: flex;
	justify-content: space-between;
	margin-top: 4px;
	font: 500 12px var(--mono);
	letter-spacing: 0.06em;
	color: var(--sys);
}

/* Compact bars (phones and narrow screens; the default in play) */
.vitals {
	left: 16px;
	top: 16px;
	width: min(62vw, 330px);
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.vitals .who {
	justify-content: flex-start;
	gap: 10px;
	align-items: center;
	font: 600 12.5px var(--display);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.lv-tag {
	padding: 3px 6px 2px;
	border: 1px solid rgba(230, 180, 80, 0.6);
	border-radius: 2px;
	font: 600 11px/1 var(--mono);
	letter-spacing: 0.04em;
	color: var(--xp);
	background: rgba(9, 15, 26, 0.45);
}
.vitals .row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 7px;
	font: 600 11.5px var(--mono);
}
.vitals .row .k {
	width: 20px;
	color: var(--dim);
}
.vitals .row .track {
	flex: 1;
	height: 6px;
}
.vitals .row .track.thin {
	height: 3px;
}
.vitals .row .n {
	width: 50px;
	text-align: right;
}

/* Compass */
.compass {
	left: 50%;
	top: 26px;
	width: 620px;
	height: 40px;
	transform: translateX(-50%);
	display: none;
	-webkit-mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
	mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.compass .rail {
	position: absolute;
	left: 0;
	right: 0;
	top: 18px;
	height: 1px;
	background: rgba(234, 242, 255, 0.4);
}
.compass .t {
	position: absolute;
	top: 0;
	transform: translateX(-50%);
	font: 600 13px/1 var(--display);
	letter-spacing: 0.1em;
	text-align: center;
}
.compass .t i {
	display: block;
	width: 1px;
	height: 8px;
	margin: 6px auto 0;
	background: rgba(234, 242, 255, 0.6);
}
.compass .t.minor i {
	height: 5px;
	margin-top: 19px;
	opacity: 0.6;
}
.compass .t.sun {
	color: var(--xp);
}
.compass .needle {
	position: absolute;
	left: 50%;
	top: 28px;
	transform: translateX(-50%);
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-bottom: 8px solid var(--sys);
	filter: drop-shadow(0 0 6px var(--sys));
}

/* Minimap */
.map {
	right: 16px;
	top: 16px;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	overflow: hidden;
	border: 1px solid var(--edge-hi);
	box-shadow:
		0 0 0 4px rgba(9, 15, 26, 0.5),
		0 0 0 5px var(--edge),
		0 12px 40px rgba(0, 0, 0, 0.45);
}
.map svg {
	display: block;
	width: 100%;
	height: 100%;
}
.map-cap {
	display: none;
	right: 44px;
	top: 280px;
	width: 230px;
	text-align: center;
	font: 500 12px/1.5 var(--mono);
	letter-spacing: 0.06em;
	color: var(--dim);
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.map-cap b {
	display: block;
	font: 600 13px var(--display);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ink);
}

/* Level-up System notice: centered in the sky */
.notice {
	left: 50%;
	top: max(150px, 17vh);
	width: min(88vw, 520px);
	transform: translateX(-50%);
}
.notice .title {
	padding: 22px 0 6px;
	text-align: center;
	font: 700 clamp(28px, 7vw, 40px) / 1 var(--display);
	letter-spacing: 0.32em;
	color: var(--ink);
	text-shadow: 0 0 24px rgba(143, 220, 255, 0.65);
}
.notice .line {
	padding-bottom: 16px;
	text-align: center;
	font: 500 13px var(--mono);
	letter-spacing: 0.04em;
	color: var(--sys);
}
.notice .delta {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px 0;
	padding: 14px 18px 18px;
	border-top: 1px solid rgba(150, 205, 255, 0.16);
}
.notice .delta div {
	text-align: center;
}
.notice .delta small {
	display: block;
	font: 500 11px var(--display);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--dim);
}
.notice .delta span {
	font: 600 18px var(--mono);
}
.notice .delta em {
	margin-left: 4px;
	font-style: normal;
	font-size: 13px;
	color: #9ff0a8;
}

/* Notifications: right side, under the minimap; no panel, no timestamps */
.log {
	display: none;
	right: 40px;
	top: 300px;
	width: 340px;
	text-align: right;
	font: 400 12.5px/1.75 var(--mono);
	text-shadow:
		0 1px 6px rgba(0, 0, 0, 0.85),
		0 0 2px rgba(0, 0, 0, 0.6);
}
.log .l:nth-child(1) {
	opacity: 0.5;
}
.log .tag {
	color: var(--sys);
}
.log .good {
	color: var(--good);
}

/* Phones: everything a size smaller */
@media (max-width: 599px) {
	.vitals,
	.map,
	.notice {
		zoom: 0.85;
	}
	.notice {
		top: 160px;
	}
	.notice .title {
		padding-top: 16px;
		letter-spacing: 0.26em;
	}
	.notice .delta {
		padding: 10px 10px 14px;
	}
	.notice .delta span {
		font-size: 15px;
	}
	.notice .ph {
		font-size: 12px;
	}
}

/* Large screens: the detailed HUD. Smaller laptops get the compact bars, like phones. */
@media (min-width: 1400px) and (min-height: 780px) {
	.status,
	.compass,
	.map-cap,
	.log {
		display: block;
	}
	.vitals {
		display: none;
	}
	.map {
		right: 44px;
		top: 38px;
		width: 230px;
		height: 230px;
		box-shadow:
			0 0 0 5px rgba(9, 15, 26, 0.5),
			0 0 0 6px var(--edge),
			0 12px 40px rgba(0, 0, 0, 0.45);
	}
	.notice {
		top: 150px;
	}
	.status,
	.notice,
	.map,
	.map-cap,
	.compass {
		zoom: 0.8;
	}
}
@media (min-width: 600px) and (max-width: 1399px), (min-width: 1400px) and (max-height: 779px) {
	.vitals {
		left: 28px;
		top: 28px;
	}
	.map {
		right: 28px;
		top: 28px;
		width: 150px;
		height: 150px;
	}
	.notice {
		top: 112px;
	}
	.vitals,
	.map,
	.notice {
		zoom: 0.85;
	}
}
