/**
 * Shared FB escape gate styles (ATC modal + global endpoint).
 * Visual language aligned with templates/fb-escape-gate.php (checkout gate).
 */

.lsc-fb-corner-cue {
	position: fixed;
	top: max(2px, env(safe-area-inset-top, 0px));
	right: max(8px, env(safe-area-inset-right, 0px));
	z-index: 100001;
	display: none;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	padding: 0;
	margin: 0;
	background: transparent;
	border: none;
	box-shadow: none;
	color: #fff;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
}
.lsc-fb-corner-cue.is-visible {
	display: flex;
}
.lsc-fb-corner-svg {
	display: block;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.75)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
	animation: lsc-fb-arrow-drift 1.8s ease-in-out infinite;
	will-change: transform;
}
.lsc-fb-corner-arc {
	stroke-dasharray: 4 5;
	animation: lsc-fb-arc-flow 1.5s linear infinite;
}
.lsc-fb-corner-head {
	transform-origin: 68px 10px;
	animation: lsc-fb-head-nudge 1.8s ease-in-out infinite;
}
.lsc-fb-corner-label {
	margin: 0 4px 0 0;
	padding: 5px 10px;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.01em;
	line-height: 1.2;
	color: #fff;
	background: rgba(0, 0, 0, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	white-space: nowrap;
}
@keyframes lsc-fb-arrow-drift {
	0%, 100% { transform: translate(0, 0); }
	50% { transform: translate(5px, -5px); }
}
@keyframes lsc-fb-arc-flow {
	to { stroke-dashoffset: -18; }
}
@keyframes lsc-fb-head-nudge {
	0%, 100% { transform: translate(0, 0); opacity: 0.92; }
	50% { transform: translate(2px, -2px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.lsc-fb-corner-svg,
	.lsc-fb-corner-arc,
	.lsc-fb-corner-head { animation: none !important; }
	.lsc-fb-corner-dot { display: none; }
}

html.lsc-fb-escape-open,
html.lsc-fb-escape-open body {
	overflow: hidden !important;
	overscroll-behavior: none;
	height: 100%;
	width: 100%;
	position: relative;
}

.lsc-fb-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.78);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: max(22vh, calc(env(safe-area-inset-top, 0px) + 112px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
	overflow: hidden;
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lsc-fb-overlay.active {
	opacity: 1;
	visibility: visible;
}

.lsc-fb-popup {
	background: rgba(255, 250, 241, 0.97);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-radius: 20px;
	padding: 0;
	max-width: 400px;
	width: min(92%, calc(100% - 24px));
	max-height: min(96vh, 760px);
	max-height: min(96dvh, 760px);
	margin: 0 auto;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.3);
	transform: scale(0.96) translateY(12px);
	transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	text-align: center;
}
.lsc-fb-overlay.active .lsc-fb-popup {
	transform: scale(1) translateY(0);
}
.lsc-fb-popup-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-y;
	padding: 14px 14px 16px;
}

.lsc-fb-header {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	margin-bottom: 8px;
	text-align: center;
}
.lsc-fb-brand-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
	padding: 0 2px;
	box-sizing: border-box;
}
.lsc-fb-brand-main {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
}
.lsc-fb-logo {
	height: 40px;
	width: auto;
	max-width: 110px;
	object-fit: contain;
	display: block;
	flex-shrink: 0;
}
.lsc-fb-title {
	flex: 0 1 auto;
	min-width: 0;
	font-size: 17px;
	font-weight: 700;
	color: #333;
	margin: 0;
	line-height: 1.25;
	text-align: left;
}
.lsc-fb-intro {
	margin: 0 0 10px;
	padding: 0;
	font-size: 13px;
	line-height: 1.4;
	font-weight: 600;
	color: #6b4a52;
	text-align: center;
}

.lsc-fb-lang {
	position: static;
	align-self: auto;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 0;
	padding: 2px 3px;
	border-radius: 999px;
	background: #fff;
	border: 1.5px solid #82213e;
	box-shadow: 0 1px 4px color-mix(in srgb, #82213e 14%, transparent);
	line-height: 1;
	flex-shrink: 0;
}
.lsc-fb-lang-btn {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	background: transparent;
	margin: 0;
	padding: 4px 8px;
	font-size: 11px;
	font-weight: 700;
	color: #8a6570;
	cursor: pointer;
	border-radius: 999px;
	line-height: 1.2;
	-webkit-tap-highlight-color: transparent;
}
.lsc-fb-lang-btn.is-active {
	background: #82213e;
	color: #fff;
	font-weight: 800;
}
.lsc-fb-lang-sep {
	color: #d4c4c8;
	font-size: 10px;
	user-select: none;
	padding: 0 1px;
}

.lsc-fb-method-card {
	margin: 0 0 8px;
	padding: 10px 12px;
	border-radius: 14px;
	text-align: left;
}
.lsc-fb-method1-card {
	border: 2.5px solid #82213e;
	background: linear-gradient(180deg, color-mix(in srgb, #82213e 14%, #fff) 0%, #fff 65%);
	box-shadow: 0 10px 26px color-mix(in srgb, #82213e 22%, transparent);
	margin-bottom: 10px;
	padding: 16px;
}
.lsc-fb-do-now {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 800;
	color: #82213e;
	line-height: 1.25;
	text-align: left;
}
.lsc-fb-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.lsc-fb-step {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 0;
	pointer-events: none;
	user-select: none;
}
.lsc-fb-step-num {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border-radius: 50%;
	border: 1.5px solid #82213e;
	background: transparent;
	color: #82213e;
	font-size: 12px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
.lsc-fb-step--primary .lsc-fb-step-num {
	background: #82213e;
	color: #fff;
	border-color: #82213e;
}
.lsc-fb-step-body {
	flex: 1 1 auto;
	min-width: 0;
}
.lsc-fb-step-text {
	font-size: 15px;
	font-weight: 700;
	color: #3a2429;
	line-height: 1.35;
}

.lsc-fb-method3-copy {
	border: none;
	background: transparent;
	padding: 4px 2px 2px;
	margin-bottom: 0;
}
.lsc-fb-copy-kicker {
	margin: 0 0 7px;
	font-size: 12.5px;
	font-weight: 700;
	color: #5c3d45;
	line-height: 1.3;
	text-align: left;
}
.lsc-fb-backup-url {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 8px;
	padding: 10px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #f8fafc;
	font-size: 11px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: #64748b;
	word-break: break-all;
	line-height: 1.45;
	text-align: left;
}
.lsc-fb-backup-copy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 44px;
	padding: 12px 16px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--lsc-primary, #82213e) 0%, var(--lsc-primary-dark, #5c1529) 100%);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 18px color-mix(in srgb, var(--lsc-primary, #82213e) 40%, transparent);
	-webkit-tap-highlight-color: transparent;
}
.lsc-fb-backup-copy-btn .copy-icon {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-radius: 3px;
	position: relative;
	opacity: 0.95;
}
.lsc-fb-backup-copy-btn .copy-icon::after {
	content: '';
	position: absolute;
	left: 3px;
	top: -4px;
	width: 10px;
	height: 10px;
	border: 2px solid currentColor;
	border-radius: 2px;
	background: transparent;
}
.lsc-fb-backup-copy-btn.is-copied {
	background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}
.lsc-fb-copy-next {
	margin: 8px 0 0;
	font-size: 12.5px;
	font-weight: 600;
	color: #82213e;
	line-height: 1.35;
	text-align: center;
}
.lsc-fb-copy-next[hidden] {
	display: none !important;
}

.lsc-fb-method2-auto {
	border: none;
	background: transparent;
	opacity: 1;
	padding: 2px 4px 4px;
	margin: 4px 0 0;
}
.lsc-fb-method2-auto > summary.lsc-fb-method2-heading {
	margin: 0;
	padding: 6px 2px;
	font-size: 12px;
	font-weight: 600;
	color: #9a6b74;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
	list-style: none;
	-webkit-tap-highlight-color: transparent;
}
.lsc-fb-method2-auto > summary.lsc-fb-method2-heading::-webkit-details-marker {
	display: none;
}
.lsc-fb-method2-auto > summary.lsc-fb-method2-heading::before {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	margin-right: 6px;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 5px solid #9a6b74;
	vertical-align: 1px;
	transition: transform 0.15s ease;
}
.lsc-fb-method2-auto[open] > summary.lsc-fb-method2-heading::before {
	transform: rotate(90deg);
}
.lsc-fb-try-quiet {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 8px 12px;
	min-height: 36px;
	background: #fff;
	border: 1px solid #d4c4c8;
	border-radius: 9px;
	box-shadow: none;
	text-decoration: none;
	color: #6b4a52;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	box-sizing: border-box;
}
.lsc-fb-method2-hint {
	margin: 4px 0 0;
	font-size: 10.5px;
	font-weight: 500;
	color: #9a6b74;
	line-height: 1.35;
	text-align: center;
}

.lsc-fb-product {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	margin: 0 0 10px;
	text-align: left;
}
.lsc-fb-product img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
}
.lsc-fb-product-name {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.lsc-fb-copy-toast {
	position: fixed;
	left: 50%;
	bottom: max(24px, env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	z-index: 100002;
	padding: 10px 16px;
	border-radius: 999px;
	background: rgba(34, 34, 34, 0.92);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.lsc-fb-copy-toast[hidden] {
	display: none !important;
}

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

/* Standalone global page background */
.lsc-fb-escape-bg {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	z-index: 0;
}
.lsc-fb-escape-bg .lsc-background-overlay {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 20% 80%, color-mix(in srgb, var(--lsc-primary, #82213e) 10%, transparent) 0%, transparent 50%),
		radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--lsc-primary, #82213e) 8%, transparent) 0%, transparent 50%);
}
