/* Two-phase boot overlay: Espada logo (silent download) → Bot Smash splash + bar. */

#espada-status {
	position: fixed;
	inset: 0;
	z-index: 100002;
	background: #000;
	opacity: 1;
	transition: opacity 0.55s ease-out;
}

#espada-status.espada-status--hidden {
	opacity: 0;
	pointer-events: none;
}

.espada-phase {
	position: absolute;
	inset: 0;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.espada-phase.is-active {
	display: flex;
}

/* Phase 1 — Espada logo only (download progress not shown). */
#espada-phase-logo {
	background: #000;
}

#espada-logo-wrap {
	width: min(58vmin, 480px);
	max-width: 88%;
	opacity: 0;
	transform: scale(0.86);
	transition: opacity 850ms ease-out, transform 850ms ease-out;
}

#espada-logo-wrap.espada-logo--animate {
	opacity: 1;
	transform: scale(1);
}

#espada-logo {
	width: 100%;
	height: auto;
	display: block;
}

/* Phase 2 — Bot Smash splash + chunky loading bar. */
#espada-phase-game {
	background: #000;
	justify-content: flex-end;
	padding: 0 0 max(5vh, env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
}

#espada-splash {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center center;
	pointer-events: none;
}

#espada-bar-host {
	position: relative;
	z-index: 2;
	width: 80vw;
	max-width: 960px;
	margin-bottom: 4vh;
}

#espada-bar-track {
	position: relative;
	height: 52px;
	background: rgba(0, 0, 0, 0.45);
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

#espada-bar-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #e85d04 0%, #f48c06 45%, #ffba08 100%);
	border-radius: 10px;
	transition: width 140ms linear;
}

#espada-bar-label {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Barlow Condensed', system-ui, sans-serif;
	font-size: clamp(1rem, 3.2vw, 1.35rem);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #ffffff;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
	pointer-events: none;
	white-space: nowrap;
	padding: 0 12px;
}

#espada-notice {
	display: none;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
	max-width: min(520px, 90vw);
	padding: 1rem;
	border-radius: 0.5rem;
	border: 1px solid #9b3943;
	background: #5b3943;
	color: #e0e0e0;
	font-family: 'Barlow Condensed', system-ui, sans-serif;
	line-height: 1.3;
	text-align: center;
}

#espada-build-id {
	position: absolute;
	bottom: max(10px, env(safe-area-inset-bottom, 0px));
	left: 50%;
	transform: translateX(-50%);
	z-index: 4;
	font-family: 'Barlow Condensed', system-ui, sans-serif;
	font-size: 0.5rem;
	font-weight: 400;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.28);
	text-align: center;
	pointer-events: none;
	white-space: nowrap;
}
