/* Simple Paper — Mobile / Desktop chooser */

:root {
	--sp-bg: #2e2e2e;
	--sp-accent: #f0c040;
	--sp-card: #3d3d3d;
	--sp-card-border: #555;
	--sp-text: #ffffff;
	--sp-text-muted: #aaaaaa;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	background: #1a1a1a;
	color: var(--sp-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

body.sp-choose-page nav.navbar,
body.sp-choose-page header.header_wrap,
body.sp-choose-page .top-header,
body.sp-choose-page footer,
body.sp-choose-page .scrollup,
body.sp-choose-page .web-footer {
	display: none !important;
}

.sp-choose {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 32px 20px;
	background:
		radial-gradient(ellipse 80% 50% at 50% 0%, rgba(240, 192, 64, 0.12), transparent),
		linear-gradient(180deg, #222 0%, #1a1a1a 100%);
}

.sp-choose-brand {
	width: 72px;
	height: 72px;
	border-radius: 18px;
	background: var(--sp-accent);
	color: #1a1a1a;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 0.02em;
}

.sp-choose-title {
	margin: 18px 0 0;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--sp-text);
}

.sp-choose-sub {
	margin: 8px 0 0;
	font-size: 0.95rem;
	color: var(--sp-text-muted);
}

.sp-choose-user {
	margin: 6px 0 0;
	font-size: 0.8rem;
	color: var(--sp-text-muted);
	opacity: 0.85;
}

.sp-choose-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	width: 100%;
	max-width: 560px;
	margin-top: 36px;
}

.sp-choose-btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 28px 22px;
	border: 1px solid var(--sp-card-border);
	border-radius: 14px;
	background: var(--sp-card);
	color: var(--sp-text);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.sp-choose-btn:hover {
	border-color: var(--sp-accent);
	background: #454545;
	transform: translateY(-1px);
}

.sp-choose-btn:focus-visible {
	outline: 2px solid var(--sp-accent);
	outline-offset: 3px;
}

.sp-choose-btn.is-last {
	border-color: var(--sp-accent);
	box-shadow: inset 0 0 0 1px rgba(240, 192, 64, 0.35);
}

.sp-choose-btn-label {
	font-size: 1.2rem;
	font-weight: 700;
}

.sp-choose-btn-hint {
	font-size: 0.82rem;
	color: var(--sp-text-muted);
	line-height: 1.35;
}

.sp-choose-last {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 3px 8px;
	border-radius: 6px;
	background: rgba(240, 192, 64, 0.2);
	color: var(--sp-accent);
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

@media (max-width: 520px) {
	.sp-choose-actions {
		grid-template-columns: 1fr;
	}
}

.sp-install-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	padding: 10px 18px;
	border: none;
	border-radius: 999px;
	background: #25d366;
	color: #073b1a;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s, transform 0.15s;
}

.sp-install-cta:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.sp-install-cta:focus-visible {
	outline: 2px solid #25d366;
	outline-offset: 3px;
}

.sp-install-cta-icon {
	font-size: 0.9rem;
}

.sp-install-modal {
	position: fixed;
	inset: 0;
	z-index: 70;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.65);
	padding: 20px;
}

.sp-install-modal[hidden] {
	display: none !important;
}

.sp-install-card {
	background: var(--sp-card);
	border-radius: 16px;
	padding: 20px;
	width: min(340px, 100%);
	text-align: left;
}

.sp-install-card h3 {
	margin: 0 0 12px;
	color: var(--sp-accent);
}

.sp-install-card ol {
	margin: 0 0 16px;
	padding-left: 20px;
	color: var(--sp-text);
	line-height: 1.6;
}

.sp-install-close {
	display: block;
	width: 100%;
	padding: 10px 14px;
	border-radius: 8px;
	border: none;
	background: var(--sp-accent);
	color: #222;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}

.sp-install-progress {
	position: fixed;
	inset: 0;
	z-index: 95;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(8, 8, 12, 0.88);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.sp-install-progress[hidden] {
	display: none !important;
}

.sp-install-progress-card {
	width: min(300px, 86vw);
	text-align: center;
}

.sp-install-progress-ring {
	width: 52px;
	height: 52px;
	margin: 0 auto 22px;
	border-radius: 50%;
	border: 2px solid rgba(240, 192, 64, 0.18);
	position: relative;
}

.sp-install-progress-ring::before {
	content: "";
	position: absolute;
	inset: -2px;
	border-radius: 50%;
	border: 2px solid transparent;
	border-top-color: var(--sp-accent);
	border-right-color: var(--sp-accent);
	animation: sp-install-spin 0.85s linear infinite;
}

@keyframes sp-install-spin {
	to {
		transform: rotate(360deg);
	}
}

.sp-install-progress-bar {
	position: relative;
	height: 4px;
	border-radius: 999px;
	background: rgba(240, 192, 64, 0.12);
	overflow: hidden;
	margin-bottom: 16px;
}

.sp-install-progress-bar span {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -40%;
	width: 40%;
	border-radius: 999px;
	background: linear-gradient(90deg, transparent, var(--sp-accent), transparent);
	box-shadow: 0 0 14px 2px rgba(240, 192, 64, 0.7);
	animation: sp-install-scan 1.1s ease-in-out infinite;
}

@keyframes sp-install-scan {
	0% {
		left: -40%;
	}
	100% {
		left: 100%;
	}
}

.sp-install-progress-msg {
	margin: 0;
	color: var(--sp-text);
	font-size: 0.9rem;
	letter-spacing: 0.02em;
}

.sp-install-success-card {
	text-align: center;
}

.sp-install-success-card h3 {
	margin: 0 0 8px;
}

.sp-install-success-icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: rgba(240, 192, 64, 0.15);
	color: var(--sp-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4rem;
	font-weight: 700;
	box-shadow: 0 0 0 4px rgba(240, 192, 64, 0.08);
}

.sp-install-success-msg {
	margin: 0 0 18px;
	color: var(--sp-text-muted);
	font-size: 0.85rem;
}

.sp-install-options-sub {
	margin: 0 0 16px;
	color: var(--sp-text-muted);
	font-size: 0.85rem;
}

.sp-install-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 14px;
}

.sp-install-option {
	width: 100%;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid var(--sp-card-border);
	background: transparent;
	color: var(--sp-text);
	font-size: 0.9rem;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.sp-install-option:hover {
	border-color: #25d366;
	background: rgba(37, 211, 102, 0.1);
}

.sp-install-cancel {
	background: transparent;
	border: 1px solid var(--sp-card-border);
	color: var(--sp-text-muted);
}

.sp-ref { margin: 14px 0; padding: 14px; border: 1px solid var(--sp-card-border, #ddd); border-radius: 12px; text-align: left; }
.sp-ref-title { margin: 0 0 10px; font-size: 15px; }
.sp-ref-bar { height: 10px; border-radius: 6px; background: rgba(128,128,128,.25); overflow: hidden; }
.sp-ref-bar span { display: block; height: 100%; background: #f0c040; }
.sp-ref-line { margin: 8px 0 4px; font-size: 14px; }
.sp-ref-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 8px; font-size: 13px; opacity: .85; }
.sp-ref-link { margin: 0 0 10px; font-size: 12px; word-break: break-all; }
.sp-ref-link a { color: var(--sp-accent); text-decoration: underline; }
.sp-ref-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-ref-btn { padding: 9px 14px; border: 1px solid var(--sp-card-border); border-radius: 8px; background: var(--sp-card); color: var(--sp-text); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.sp-ref-btn:hover { border-color: var(--sp-accent); }
.sp-ref-wa { background: #25d366; border-color: #25d366; color: #073b1a; font-weight: 600; }
