/* Appromoter front end — by AppCrafta */

.apm-in-app .apm-ui,
.apm-in-app .apm-buttons,
.apm-in-app .apm-qr { display: none !important; }

.apm-ui, .apm-ui *, .apm-buttons, .apm-buttons * { box-sizing: border-box; }
.apm-ui {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	line-height: 1.35;
}

.apm-x {
	width: 30px; height: 30px; flex-shrink: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%;
	background: #f1f5f9; color: #475569;
	font-size: 19px; line-height: 1; cursor: pointer; padding: 0;
}
.apm-x:hover { background: #e2e8f0; color: #0f172a; }

/* Debug pill (?apm_debug=1) — shown even in app mode on purpose. */
.apm-debug {
	position: fixed; left: 8px; bottom: 8px; z-index: 2147483647;
	padding: 6px 10px; border-radius: 8px; background: #0f172a; color: #fff;
	font: 600 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Bottom sheet ---------- */
.apm-sheet-scrim {
	display: none; position: fixed; inset: 0; z-index: 2147483000;
	background: rgba(15, 23, 42, .45);
	opacity: 0; transition: opacity .3s ease;
}
.apm-sheet-scrim.is-open { opacity: 1; }

.apm-sheet {
	display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483001;
	max-width: 560px; margin: 0 auto;
	background: #fff; color: #0f172a;
	border-radius: 20px 20px 0 0;
	padding-bottom: max(12px, env(safe-area-inset-bottom));
	box-shadow: 0 -10px 40px rgba(15, 23, 42, .2);
	transform: translateY(105%);
	transition: transform .38s cubic-bezier(.32, .72, 0, 1);
}
.apm-sheet.is-open { transform: translateY(0); }
.apm-sheet:focus { outline: none; }
.apm-sheet__handle { width: 36px; height: 4px; margin: 10px auto 0; border-radius: 2px; background: #d1d5db; }
.apm-sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 20px 4px; }
.apm-sheet__headline { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: #0f172a; }
.apm-sheet__options { display: flex; flex-direction: column; gap: 10px; padding: 12px 20px 6px; }
.apm-sheet__row {
	display: flex; align-items: center; gap: 14px;
	padding: 12px 14px; border-radius: 14px;
	border: 1.5px solid var(--apm-border, #e2e8f0);
	background: #f8fafc; text-decoration: none !important; color: inherit;
	-webkit-tap-highlight-color: transparent;
}
.apm-sheet__row:active, .apm-sheet__row:hover { background: #f1f5f9; }
.apm-sheet__row:focus-visible { outline: 2px solid var(--apm-open-bg, #4338ca); outline-offset: 2px; }
.apm-sheet__icon {
	width: 52px; height: 52px; flex-shrink: 0; overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	border-radius: 12px; background: #eef2ff; color: var(--apm-open-bg, #4338ca);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .1); border: 1px solid rgba(0, 0, 0, .06);
}
.apm-sheet__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.apm-sheet__icon svg { width: 28px; height: 28px; }
.apm-sheet__icon--browser { background: #f1f5f9; color: #64748b; box-shadow: none; border: 1.5px solid #e2e8f0; }
.apm-sheet__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.apm-sheet__title { font-size: 15px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apm-sheet__sub { font-size: 12px; color: #64748b; margin-top: 2px; }
.apm-btn {
	flex-shrink: 0; display: inline-flex; align-items: center; white-space: nowrap;
	padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
}
.apm-btn--solid { background: var(--apm-open-bg, #4338ca); color: var(--apm-open-color, #fff); }
.apm-btn--outline { background: #fff; color: var(--apm-continue, #4338ca); border: 1.5px solid currentColor; padding: 6.5px 16.5px; }
.apm-sheet__foot { text-align: center; padding: 4px 20px 10px; }
.apm-sheet__stay {
	background: none; border: 0; padding: 6px; cursor: pointer; font: inherit;
	font-size: 12px; color: #64748b; text-decoration: underline; text-underline-offset: 2px;
}

/* ---------- Smart banner ---------- */
.apm-banner {
	display: none; position: fixed; left: 0; right: 0; z-index: 2147482990;
	align-items: center; gap: 10px;
	padding: 10px 12px 10px 8px;
	background: var(--apm-b-bg, #fff); color: var(--apm-b-text, #0f172a);
	box-shadow: 0 2px 14px rgba(15, 23, 42, .12);
	transition: transform .3s ease;
}
.apm-banner--top { top: 0; transform: translateY(-110%); border-bottom: 1px solid rgba(0, 0, 0, .06); }
.apm-banner--bottom { bottom: 0; transform: translateY(110%); padding-bottom: max(10px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(0, 0, 0, .06); }
.apm-banner.is-open { transform: translateY(0); }
.admin-bar .apm-banner--top { top: 46px; }
@media (min-width: 783px) { .admin-bar .apm-banner--top { top: 32px; } }

.apm-banner__close {
	width: 24px; height: 24px; flex-shrink: 0; border: 0; padding: 0; background: none;
	color: currentColor; opacity: .55; font-size: 20px; line-height: 1; cursor: pointer;
}
.apm-banner__icon {
	width: 54px; height: 54px; flex-shrink: 0; overflow: hidden; border-radius: 13px;
	display: flex; align-items: center; justify-content: center;
	background: #eef2ff; color: var(--apm-b-btn, #4338ca); border: 1px solid rgba(0, 0, 0, .08);
}
.apm-banner__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.apm-banner__icon svg { width: 28px; height: 28px; }
.apm-banner__info { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; line-height: 1.3; }
.apm-banner__name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apm-banner__dev, .apm-banner__tag, .apm-banner__count { opacity: .7; }
.apm-banner__rating { display: flex; align-items: center; gap: 4px; }
.apm-stars { display: inline-flex; letter-spacing: 0; font-size: 11px; }
.apm-star { color: #cbd5e1; }
.apm-star.is-full, .apm-star.is-half { color: #f59e0b; }
.apm-star.is-half { background: linear-gradient(90deg, #f59e0b 50%, #cbd5e1 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.apm-banner__btn {
	flex-shrink: 0; padding: 7px 16px; border-radius: 999px;
	background: var(--apm-b-btn, #4338ca); color: var(--apm-b-btn-text, #fff) !important;
	font-size: 13px; font-weight: 800; letter-spacing: .02em; text-decoration: none !important;
}
html.apm-push-top body { margin-top: var(--apm-banner-h, 76px) !important; transition: margin .3s ease; }
html.apm-push-bottom body { padding-bottom: var(--apm-banner-h, 76px) !important; }

/* ---------- Gate modal ---------- */
.apm-modal {
	display: none; position: fixed; inset: 0; z-index: 2147483002;
	align-items: center; justify-content: center; padding: 16px;
	background: rgba(15, 23, 42, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
	opacity: 0; transition: opacity .25s ease;
}
.apm-modal.is-open { opacity: 1; }
.apm-modal__card {
	position: relative; width: 100%; max-width: 400px;
	background: #fff; color: #0f172a; border-radius: 22px;
	padding: 36px 26px 28px; text-align: center;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .3);
	transform: scale(.96); transition: transform .25s ease;
}
.apm-modal.is-open .apm-modal__card { transform: scale(1); }
.apm-modal__close { position: absolute; top: 14px; right: 14px; }
.apm-modal__icon {
	width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 18px;
	display: flex; align-items: center; justify-content: center; background: #eef2ff; color: #4338ca;
}
.apm-modal__icon svg { width: 28px; height: 28px; }
.apm-modal__title { margin: 0 0 10px; font-size: 20px; font-weight: 800; line-height: 1.3; color: #0f172a; }
.apm-modal__desc { margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: #475569; }
.apm-modal__cta {
	display: block; padding: 15px; border-radius: 12px;
	background: #4338ca; color: #fff !important; text-decoration: none !important;
	font-size: 16px; font-weight: 800;
}
.apm-modal__cta:hover { background: #3730a3; }
.apm-modal__qr { width: 180px; height: 180px; margin: 0 auto; }
.apm-modal__scan { margin: 10px 0 0; font-size: 13px; color: #64748b; }

/* ---------- Store buttons shortcode ---------- */
.apm-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.apm-align-center { justify-content: center; }
.apm-align-right { justify-content: flex-end; }
.apm-store-btn {
	display: inline-flex; align-items: center; gap: 10px;
	min-width: 168px; padding: 8px 16px 8px 12px; border-radius: 10px;
	text-decoration: none !important; line-height: 1.1;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	transition: transform .15s ease, box-shadow .15s ease;
}
.apm-store-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 23, 42, .18); }
.apm-buttons--dark .apm-store-btn { background: #0f172a; color: #fff !important; border: 1px solid #0f172a; }
.apm-buttons--light .apm-store-btn { background: #fff; color: #0f172a !important; border: 1px solid #cbd5e1; }
.apm-store-btn__icon { display: inline-flex; }
.apm-store-btn__text { display: flex; flex-direction: column; }
.apm-store-btn__text small { font-size: 10px; letter-spacing: .04em; opacity: .85; text-transform: uppercase; }
.apm-store-btn__text strong { font-size: 17px; font-weight: 700; }

/* ---------- QR shortcode ---------- */
.apm-qr { margin: 12px 0; text-align: center; }
.apm-qr__code { background: #fff; border-radius: 12px; padding: 8px; }
.apm-qr__code svg { width: 100%; height: 100%; display: block; }
.apm-qr figcaption { margin-top: 8px; font-size: 13px; color: #64748b; }

/* ---------- Desktop landing page (smart link) ---------- */
body.apm-landing {
	margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
	padding: 24px 16px; box-sizing: border-box;
	background: #f1f5f9; color: #0f172a;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.apm-landing__card {
	width: 100%; max-width: 440px; background: #fff; border-radius: 24px;
	padding: 36px 28px; text-align: center; box-shadow: 0 20px 50px -20px rgba(15, 23, 42, .25);
}
.apm-landing__icon { border-radius: 18px; display: block; margin: 0 auto 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.apm-landing__app { margin: 0; font-size: 13px; font-weight: 700; color: #4338ca; text-transform: uppercase; letter-spacing: .06em; }
.apm-landing h1 { margin: 6px 0 8px; font-size: 26px; }
.apm-landing__text { margin: 0 0 20px; color: #475569; line-height: 1.55; }
.apm-landing .apm-buttons { margin-top: 22px; }
.apm-landing__back { display: inline-block; margin-top: 18px; font-size: 13px; color: #64748b; }

@media (prefers-reduced-motion: reduce) {
	.apm-sheet, .apm-sheet-scrim, .apm-banner, .apm-modal, .apm-modal__card { transition: none !important; }
}
