/* Press & Hold Gate — light card style */
#phg-gate {
	--phg-accent: #1a73c4;
	--phg-bg: #f4f5f7;
	--phg-progress: 0;

	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	visibility: visible !important;
	background: var(--phg-bg);
	color: #555;
	font-family: Roboto, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
	line-height: 1.5;
	opacity: 1;
	transition: opacity .45s ease;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}
#phg-gate *, #phg-gate *::before, #phg-gate *::after { box-sizing: border-box; }
#phg-gate.phg-out { opacity: 0; pointer-events: none; }

#phg-gate .phg-card {
	width: 100%;
	max-width: 660px;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 6px 24px rgba(0, 0, 0, .06);
	overflow: hidden;
}

#phg-gate .phg-body {
	padding: 64px 32px 48px;
	text-align: center;
}

#phg-gate .phg-title {
	margin: 0 0 28px;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: clamp(1.6rem, 4.5vw, 2.4rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: #555;
}

#phg-gate .phg-msg {
	max-width: 18.5em;
	margin: 0 auto 32px;
	font-size: clamp(1rem, 2.6vw, 1.3rem);
	line-height: 1.5;
	color: #555;
}

/* Pill button */
#phg-gate .phg-btn {
	all: unset;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 420px;
	height: 84px;
	border-radius: 999px;
	overflow: hidden;
	cursor: pointer;
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
	background: var(--phg-accent);
	color: #fff;
	transition: transform .15s ease, box-shadow .2s ease;
}
#phg-gate .phg-btn:hover { box-shadow: 0 4px 14px color-mix(in srgb, var(--phg-accent) 35%, transparent); }
#phg-gate .phg-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--phg-accent) 45%, transparent); outline-offset: 4px; }
#phg-gate.phg-holding .phg-btn { transform: scale(.985); }

/* Progress fill — sweeps left to right while holding */
#phg-gate .phg-fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: calc(var(--phg-progress) * 100%);
	background: rgba(0, 0, 0, .22);
	pointer-events: none;
}

/* Idle label — swapped for the loading dots once pressed */
#phg-gate .phg-text {
	position: relative;
	font-size: 1.15rem;
	font-weight: 500;
	letter-spacing: .02em;
	transition: opacity .15s ease;
}
#phg-gate.phg-holding .phg-text,
#phg-gate.phg-done .phg-text { opacity: 0; }

/* Three animated dots (shown while holding) */
#phg-gate .phg-dots {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: inline-flex;
	gap: 8px;
	opacity: 0;
	transition: opacity .15s ease;
}
#phg-gate.phg-holding .phg-dots { opacity: 1; }
#phg-gate .phg-dots i {
	display: block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	opacity: .55;
	animation: phg-dot 1.2s ease-in-out infinite;
}
#phg-gate .phg-dots i:nth-child(2) { animation-delay: .2s; }
#phg-gate .phg-dots i:nth-child(3) { animation-delay: .4s; }


#phg-gate .phg-check {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(.4);
	opacity: 0;
	transition: opacity .25s ease, transform .3s ease;
}
#phg-gate.phg-done .phg-dots { opacity: 0; }
#phg-gate.phg-done .phg-check { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#phg-gate.phg-done .phg-fill { background: rgba(0, 0, 0, .12); }

#phg-gate .phg-status {
	min-height: 1.5em;
	margin: 14px 0 0;
	font-size: .9rem;
	color: #888;
}
#phg-gate.phg-done .phg-status { color: var(--phg-accent); }
#phg-gate.phg-shake .phg-btn { animation: phg-shake .35s ease; }

#phg-gate .phg-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@keyframes phg-dot {
	0%, 100% { opacity: .45; transform: scale(.85); }
	50%      { opacity: 1;   transform: scale(1); }
}
@keyframes phg-shake {
	0%, 100% { translate: 0; }
	25% { translate: -6px; }
	75% { translate: 6px; }
}

@media (max-width: 480px) {
	#phg-gate .phg-body { padding: 44px 20px 28px; }
	#phg-gate .phg-btn { height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
	#phg-gate, #phg-gate * { animation: none !important; transition: none !important; }
}
