/* FriendClient. Strictly monochrome (black, greys, white) with purple as the only accent, matching the
   in-game UI: Poppins, glassy rounded panels, letter-spaced purple labels, purple particles. */

/* Self-hosted Poppins (SIL Open Font License): no third-party requests. */
@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
	--bg: #08080b;
	--bg-2: #0d0d11;
	--panel: rgb(20 20 25 / 0.72);
	--panel-solid: #131318;
	--panel-hi: rgb(255 255 255 / 0.06);
	--border: rgb(255 255 255 / 0.09);
	--border-strong: rgb(255 255 255 / 0.16);
	--text: #f5f5f7;
	--muted: #a3a3ad;
	--faint: #6f6f7b;
	--accent: #a855f7;
	--accent-light: #c58cff;
	--accent-deep: #7c3aed;
	--accent-soft: rgb(168 85 247 / 0.14);
	--accent-glow: rgb(168 85 247 / 0.38);
	--ok: #c58cff;
	--warn: #e5e5e5;
	--danger: #ff6b81;
	--sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
	--radius: 18px;
	--radius-sm: 12px;
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
	margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
	background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--sans);
	-webkit-font-smoothing: antialiased;
}
main { flex: 1; overflow-x: clip; }
a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
kbd { padding: 1px 7px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--panel-hi); color: var(--text); font: 600 0.85em var(--mono); white-space: nowrap; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 40px; } }

/* letter-spaced purple caps, like "PREMIUM CLIENT" in game */
.label { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent-light); }
.pill { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background: var(--panel-hi); border: 1px solid var(--border); font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; text-transform: none; }

/* ---------- header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(8 8 11 / 0.78); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 7px; box-shadow: 0 4px 18px -4px var(--accent-glow); transition: transform 0.3s var(--ease); }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav a:not(.btn) { padding: 10px 0; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav .hide-sm { display: none; }
@media (min-width: 860px) { .nav { gap: 28px; } .nav .hide-sm { display: inline; } }

/* ---------- buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--radius-sm);
	font: 600 15px var(--sans); text-align: center; cursor: pointer;
	transition: transform 0.15s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; box-shadow: 0 10px 30px -12px var(--accent-glow), inset 0 1px 0 rgb(255 255 255 / 0.18); }
.btn-primary:hover:not([disabled]) { transform: translateY(-1px); box-shadow: 0 14px 36px -10px var(--accent-glow), inset 0 1px 0 rgb(255 255 255 / 0.22); }
.btn-primary:active:not([disabled]) { transform: translateY(1px); }
.btn-ghost { background: var(--panel-hi); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover:not([disabled]) { border-color: var(--accent); background: var(--accent-soft); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.btn-google:hover { background: #f2f2f5; }
/* Brand logos sit on the left edge, the label stays centred (Discord and Google brand guidelines). */
.btn-discord, .btn-google { position: relative; padding: 0 52px; box-shadow: none; }
.provider-icon { position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); }
.btn-discord .provider-icon { width: 24px; }

/* ---------- hero: the website version of the in-game main menu */
.hero { position: relative; isolation: isolate; padding: clamp(40px, 7vw, 96px) 0 28px; overflow: hidden; }
.hero-bg {
	position: absolute; inset: -40px; z-index: -2;
	background: url('/img/world.svg') center bottom / cover no-repeat;
	filter: blur(12px) brightness(0.85) saturate(0); transform: scale(1.06);
}
.hero::after {
	content: ''; position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(60% 50% at 82% 40%, rgb(168 85 247 / 0.16), transparent 70%),
		linear-gradient(180deg, rgb(8 8 11 / 0.35), rgb(8 8 11 / 0.65) 70%, var(--bg));
}
.particles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.particles i { position: absolute; width: var(--s, 4px); height: var(--s, 4px); border-radius: 50%; background: var(--accent-light); opacity: 0; animation: drift var(--t, 14s) linear var(--d, 0s) infinite; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 72px; } }

.identity { display: flex; align-items: center; gap: clamp(18px, 3vw, 30px); margin-bottom: 26px; }
.identity-logo { width: clamp(76px, 12vw, 120px); height: auto; border-radius: 22%; box-shadow: 0 18px 50px -14px var(--accent-glow), 0 0 0 1px rgb(255 255 255 / 0.08); }
.identity-name { margin: 0 0 6px; font-size: clamp(38px, 7vw, 68px); font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.identity-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; }
.identity-tag .label { font-size: clamp(12px, 1.6vw, 16px); }
.lead { max-width: 32em; margin: 0 0 28px; font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); }

.menu { display: grid; gap: 12px; max-width: 560px; }
.menu-btn {
	display: flex; align-items: center; gap: 16px; padding: 12px 18px 12px 12px;
	background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
	backdrop-filter: blur(10px); color: var(--text);
	transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.menu-btn:hover { text-decoration: none; border-color: rgb(168 85 247 / 0.55); background: rgb(28 24 38 / 0.8); transform: translateX(4px); }
.menu-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--panel-hi); color: var(--muted); transition: background 0.2s, color 0.2s; }
.menu-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-btn:hover .menu-icon, .menu-btn.is-primary .menu-icon { background: var(--accent-soft); color: var(--accent-light); }
.menu-btn.is-primary { border-color: rgb(168 85 247 / 0.45); box-shadow: 0 0 0 1px rgb(168 85 247 / 0.12), 0 16px 40px -22px var(--accent-glow); }
.menu-text { display: grid; line-height: 1.3; }
.menu-text strong { font-size: 18px; font-weight: 600; }
.menu-text small { font-size: 15px; color: var(--muted); }

.update-card { position: relative; padding: clamp(24px, 3vw, 34px); background: var(--panel); border: 1px solid var(--border); border-radius: 28px; backdrop-filter: blur(12px); box-shadow: 0 30px 80px -40px rgb(0 0 0 / 0.8); }
.update-head { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.update-icon { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), #6c5cf6); color: #fff; box-shadow: 0 10px 28px -10px var(--accent-glow); }
.update-icon svg { width: 26px; height: 26px; fill: currentColor; }
.update-head h2 { margin: 4px 0 0; font-size: clamp(18px, 2vw, 22px); font-weight: 600; }
.update-head h2 span { margin-left: 6px; }
.update-card ul { display: grid; gap: 14px; margin: 0 0 24px; padding: 0; list-style: none; }
.update-card li { position: relative; padding-left: 22px; color: #d9d9e0; }
.update-card li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-light); box-shadow: 0 0 10px var(--accent-glow); }
.pill-link { display: inline-flex; padding: 8px 18px; border-radius: 999px; background: var(--panel-hi); border: 1px solid var(--border); color: var(--text); font-weight: 500; }
.pill-link:hover { text-decoration: none; border-color: var(--accent); }
.hero-foot { margin: 48px auto 0; text-align: right; font-size: 14px; color: var(--faint); }

/* ---------- sections */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin: 10px 0 12px; font-size: clamp(30px, 4.6vw, 48px); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.section-head p:not(.label) { margin: 0; color: var(--muted); font-size: 17px; }

.stats { border-block: 1px solid var(--border); background: var(--bg-2); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.stats-grid > div { display: grid; gap: 2px; padding: 26px 8px; text-align: center; }
.stats-grid strong { font-size: clamp(28px, 4vw, 40px); font-weight: 600; line-height: 1.1; }
.stats-grid span { font-size: 14px; color: var(--muted); }
@media (max-width: 719px) { .stats-grid > div:nth-child(odd) { border-right: 1px solid var(--border); } .stats-grid > div:nth-child(-n + 2) { border-bottom: 1px solid var(--border); } }
@media (min-width: 720px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } .stats-grid > div + div { border-left: 1px solid var(--border); } }

/* modules: a little ClickGUI */
.module-browser { padding: clamp(16px, 2.5vw, 26px); background: var(--panel-solid); border: 1px solid var(--border); border-radius: 24px; }
.module-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: thin; }
.module-tabs button {
	flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
	border: 1px solid var(--border); border-radius: 12px; background: transparent; color: var(--muted);
	font: 600 14px var(--sans); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.module-tabs button span { padding: 1px 8px; border-radius: 999px; background: var(--panel-hi); font-size: 12px; color: var(--faint); }
.module-tabs button:hover { color: var(--text); border-color: var(--border-strong); }
.module-tabs button[aria-selected='true'] { background: var(--accent-soft); border-color: rgb(168 85 247 / 0.5); color: var(--text); }
.module-tabs button[aria-selected='true'] span { background: var(--accent); color: #fff; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.module-grid span {
	display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
	background: var(--panel-hi); border: 1px solid transparent; font-size: 14px; font-weight: 500;
	animation: fade-up 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms);
	transition: border-color 0.2s, background 0.2s;
}
.module-grid span::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); transition: background 0.2s, box-shadow 0.2s; }
.module-grid span:hover { border-color: rgb(168 85 247 / 0.4); background: var(--accent-soft); }
.module-grid span:hover::before { background: var(--accent-light); box-shadow: 0 0 8px var(--accent-glow); }

/* features from the 3.1.0 notes */
.feature-grid { display: grid; gap: 18px; }
@media (min-width: 860px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 22px 22px 26px; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 22px; transition: border-color 0.25s, transform 0.25s var(--ease); }
.feature:hover { border-color: rgb(168 85 247 / 0.4); transform: translateY(-4px); }
.feature h3 { margin: 20px 0 6px; font-size: 20px; font-weight: 600; }
.feature p { margin: 0; color: var(--muted); }
.viz { position: relative; height: 150px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.viz-hud i { position: absolute; border: 1.5px dashed var(--border-strong); border-radius: 8px; }
.viz-hud i:nth-child(1) { left: 8%; top: 12%; width: 34%; height: 22%; }
.viz-hud i:nth-child(2) { right: 10%; top: 30%; width: 38%; height: 30%; border: 1.5px solid var(--accent); background: var(--accent-soft); animation: nudge 3.2s var(--ease) infinite; }
.viz-hud i:nth-child(2)::after { content: ''; position: absolute; right: -5px; bottom: -5px; width: 9px; height: 9px; border-radius: 3px; background: var(--accent-light); }
.viz-hud i:nth-child(3) { left: 12%; bottom: 12%; width: 50%; height: 16%; }
.viz-join { display: flex; align-items: center; gap: 14px; padding: 0 20px; }
.viz-join .avatar { flex: none; width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, #3a3a44, #22222a); box-shadow: inset 0 0 0 4px #2c2c35; }
.viz-join .lines { flex: 1; display: grid; gap: 8px; }
.viz-join .lines i { display: block; height: 10px; border-radius: 6px; background: var(--border-strong); }
.viz-join .lines i + i { width: 60%; background: var(--border); }
.viz-join .join { padding: 7px 16px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 8px 22px -8px var(--accent-glow); animation: pulse 2.4s ease-in-out infinite; }
.viz-theme { display: flex; align-items: center; justify-content: center; gap: 12px; }
.viz-theme i { width: 34px; height: 34px; border-radius: 50%; background: #2a2a31; box-shadow: inset 0 0 0 1px var(--border-strong); }
.viz-theme i:nth-child(1) { background: #f2f2f5; }
.viz-theme i:nth-child(2) { background: #6b6b75; }
.viz-theme i:nth-child(4) { background: #3b3b44; }
.viz-theme .on { background: var(--accent); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-light); transform: scale(1.15); }
.viz-theme .on2 { background: var(--accent-deep); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--border-strong); }

.steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { padding: 24px; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 20px; }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 18px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-light); font-weight: 600; }
.steps h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; }
.steps p { margin: 0; color: var(--muted); }

/* pricing */
.plans { display: grid; gap: 18px; align-items: stretch; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px 26px; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 22px; transition: border-color 0.25s, transform 0.25s var(--ease); }
.plan:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.plan-best { border-color: rgb(168 85 247 / 0.55); background: linear-gradient(180deg, rgb(168 85 247 / 0.1), var(--panel-solid) 55%); box-shadow: 0 24px 70px -40px var(--accent-glow); }
.plan-best:hover { border-color: var(--accent); }
.plan-badge { position: absolute; top: -13px; left: 26px; padding: 4px 12px; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.plan h3 { margin: 0; font-size: 20px; font-weight: 600; }
.plan .tagline { margin: 2px 0 18px; font-size: 14px; color: var(--muted); }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 20px; min-height: 52px; }
.amount { font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.per { font-size: 15px; color: var(--muted); }
.skeleton { display: inline-block; width: 120px; height: 42px; border-radius: 10px; background: linear-gradient(90deg, var(--panel-hi), rgb(255 255 255 / 0.12), var(--panel-hi)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.plan ul { display: grid; gap: 10px; flex: 1; margin: 0 0 24px; padding: 0; list-style: none; font-size: 15px; }
.plan li { position: relative; padding-left: 22px; }
.plan li::before { content: ''; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-light); }
.save { color: var(--accent-light); font-weight: 600; }
.notice { max-width: 760px; margin: 28px auto 0; text-align: center; font-size: 14px; color: var(--faint); }
.notice.error { color: var(--danger); }

/* FAQ */
.faq-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: 0.7fr 1.3fr; gap: 64px; } .faq-grid .section-head { position: sticky; top: 110px; align-self: start; } }
.faq { display: grid; gap: 10px; }
.faq details { padding: 0 22px; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 16px; transition: border-color 0.2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--panel-hi); color: var(--accent-light); font-size: 18px; transition: rotate 0.25s var(--ease), background 0.2s; }
.faq details[open] summary::after { rotate: 45deg; background: var(--accent-soft); }
.faq details p { margin: 0 0 20px; color: var(--muted); }
.faq details[open] p { animation: fade-up 0.3s var(--ease) both; }

/* footer */
.site-footer { padding: 44px 0 40px; border-top: 1px solid var(--border); font-size: 14px; color: var(--faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-grid { align-items: flex-start; }
.footer-brand { display: grid; gap: 8px; }
.footer-brand .label { font-size: 11px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-meta { width: 100%; margin: 12px 0 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; }
.disclaimer { width: 100%; font-size: 12px; }

/* ---------- narrow pages: success, download, login, account, legal */
.page { padding: clamp(40px, 8vw, 96px) 0 clamp(72px, 10vw, 120px); }
.panel { position: relative; max-width: 540px; margin: 0 auto; padding: clamp(24px, 5vw, 40px); background: var(--panel-solid); border: 1px solid var(--border); border-radius: 26px; box-shadow: 0 40px 90px -50px var(--accent-glow); animation: fade-up 0.5s var(--ease) both; }
.panel h1 { margin: 0 0 8px; font-size: clamp(26px, 5vw, 32px); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.panel h2 { font-weight: 600; }
.panel > p, .panel .sub { margin: 0 0 24px; color: var(--muted); }
.status-icon { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-light); }
.status-icon.ok { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; box-shadow: 0 12px 30px -10px var(--accent-glow); }
.status-icon.bad { background: rgb(255 107 129 / 0.14); color: var(--danger); }
.status-icon svg { width: 26px; height: 26px; }
.spinner { width: 22px; height: 22px; border: 3px solid rgb(255 255 255 / 0.15); border-top-color: var(--accent-light); border-radius: 50%; animation: spin 0.8s linear infinite; }

.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-light); opacity: 0; animation: burst 0.9s var(--ease) 0.15s both; }
.burst i:nth-child(1) { --x: -64px; --y: -30px; }
.burst i:nth-child(2) { --x: 70px; --y: -26px; background: #fff; }
.burst i:nth-child(3) { --x: -40px; --y: 52px; }
.burst i:nth-child(4) { --x: 54px; --y: 46px; background: #fff; }
.burst i:nth-child(5) { --x: 6px; --y: -70px; }
.burst i:nth-child(6) { --x: 96px; --y: 10px; }
.burst i:nth-child(7) { --x: -92px; --y: 14px; background: #fff; }
.burst i:nth-child(8) { --x: 22px; --y: 74px; }

.keybox { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.keybox code {
	flex: 1 1 250px; min-width: 0; display: flex; align-items: center; padding: 14px 16px;
	overflow-x: auto; white-space: nowrap; user-select: all;
	background: var(--bg); border: 1px dashed rgb(168 85 247 / 0.6); border-radius: var(--radius-sm); color: var(--text);
	font: 700 clamp(14px, 4.2vw, 18px) var(--mono); letter-spacing: 0.05em;
}
.hint { margin: 0 0 24px; font-size: 14px; color: var(--faint); }
.hint.below { margin: 22px 0 0; }
.hint.req { margin: 0; }
.hint.req:empty { display: none; }
.field-hint { margin: 8px 0 0; }
.meta { display: grid; gap: 8px; margin: 0 0 24px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; font-size: 15px; }
.meta div { display: flex; justify-content: space-between; gap: 12px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; font-weight: 600; text-align: right; }
ol.howto { display: grid; gap: 6px; margin: 0 0 28px; padding-left: 22px; color: var(--muted); }
ol.howto strong { color: var(--text); }
.stack { display: grid; gap: 12px; }

label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
input[type='text'], input[type='email'], input[type='password'], select {
	width: 100%; min-height: 50px; padding: 0 16px; border-radius: var(--radius-sm);
	background: var(--bg); color: var(--text); border: 1px solid var(--border-strong);
	font: 400 16px var(--sans); transition: border-color 0.2s, box-shadow 0.2s;
}
input[type='text'] { font: 700 16px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select {
	padding-right: 44px; appearance: none; cursor: pointer;
	background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23c58cff' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.alert { margin-bottom: 20px; padding: 12px 14px; border: 1px solid; border-radius: var(--radius-sm); font-size: 14px; }
.alert-error { color: #ffd2da; background: rgb(255 107 129 / 0.08); border-color: rgb(255 107 129 / 0.45); }
.alert-info { color: var(--text); background: var(--accent-soft); border-color: rgb(168 85 247 / 0.45); }

/* login */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 22px; padding: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; }
.tabs button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 600 14px var(--sans); cursor: pointer; transition: background 0.2s, color 0.2s; }
.tabs button[aria-selected='true'] { background: var(--panel-hi); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.providers { margin-bottom: 4px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; font-size: 13px; color: var(--faint); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* dialog */
.dialog { width: min(440px, calc(100vw - 32px)); padding: 32px 26px 26px; border: 1px solid var(--border-strong); border-radius: 24px; background: var(--panel-solid); color: var(--text); box-shadow: 0 40px 100px -30px rgb(0 0 0 / 0.8); }
.dialog[open] { animation: pop 0.3s var(--ease) both; }
.dialog::backdrop { background: rgb(3 3 5 / 0.7); backdrop-filter: blur(4px); }
.dialog h2 { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.dialog p { margin: 0 0 22px; color: var(--muted); }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.dialog-close:hover { background: var(--panel-hi); color: var(--text); }

/* account */
.account { max-width: 820px; }
.account-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; }
.account-head h1 { margin: 0 0 4px; font-size: clamp(30px, 5vw, 42px); font-weight: 600; line-height: 1.1; }
.account-head .sub { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.keys { display: grid; gap: 16px; }
.keycard { padding: clamp(20px, 3vw, 26px); background: var(--panel-solid); border: 1px solid var(--border); border-radius: 22px; transition: border-color 0.2s; animation: fade-up 0.5s var(--ease) both; }
.keycard:hover { border-color: var(--border-strong); }
.keycard header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.keycard h2 { margin: 0; font-size: 20px; font-weight: 600; }
.keycard .meta { margin-bottom: 18px; }
.keycard-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.keycard-actions form { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; background: var(--panel-hi); font-size: 13px; font-weight: 500; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-active { color: var(--accent-light); }
.badge-expired { color: var(--muted); }
.badge-revoked { color: var(--danger); }
.empty { max-width: none; margin: 0; text-align: center; }
.empty h2 { margin: 0 0 8px; }
.account-note { margin-top: 28px; }
.save-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 24px; padding: 16px; background: var(--accent-soft); border: 1px solid rgb(168 85 247 / 0.4); border-radius: 16px; }
.save-box p { flex: 1 1 220px; margin: 0; font-size: 15px; }

/* legal */
.legal { max-width: 780px; margin: 0 auto; }
.legal h1 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 46px); font-weight: 600; line-height: 1.1; }
.legal .updated { margin: 0 0 32px; font-size: 14px; color: var(--faint); }
.legal h2 { margin: 44px 0 10px; scroll-margin-top: 90px; font-size: 20px; font-weight: 600; }
.legal p, .legal li { color: #d6d6dd; }
.legal ul { display: grid; gap: 6px; padding-left: 22px; }
.legal .summary { padding: 22px 26px; background: var(--panel-solid); border: 1px solid rgb(168 85 247 / 0.4); border-radius: 20px; }
.legal .summary h2 { margin-top: 0; font-size: 16px; }
.legal .summary ul { margin: 0; }
.legal table { width: 100%; margin: 12px 0; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.legal th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.todo { padding: 0 4px; background: #fff; color: #000; font-weight: 700; }

/* ---------- motion: hero plays on load; [data-reveal] slides in as it scrolls into view (site.js adds .is-in) */
.d1 { --delay: 0.08s; }
.d2 { --delay: 0.16s; }
.d3 { --delay: 0.24s; }
.d4 { --delay: 0.32s; }
.d5 { --delay: 0.4s; }
.rise { animation: fade-up 0.7s var(--ease) var(--delay, 0s) both; }
html.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); transition-delay: var(--delay, 0s); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes drift { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: var(--o, 0.6); } 85% { opacity: var(--o, 0.6); } 100% { opacity: 0; transform: translate(var(--dx, 20px), -120px); } }
@keyframes nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-10px, 8px); } }
@keyframes pulse { 50% { box-shadow: 0 8px 30px -4px var(--accent-glow); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes burst {
	0% { opacity: 1; transform: translate(-50%, -50%); }
	100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0.5); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
	html.js [data-reveal] { opacity: 1; transform: none; }
	.particles { display: none; }
}

/* Small phones: keep inputs at 16px (stops iOS zooming on focus) but let a full key fit. */
@media (max-width: 420px) {
	input[type='text'] { padding: 0 12px; letter-spacing: 0.01em; }
	.menu-icon { width: 46px; height: 46px; }
	.menu-text strong { font-size: 17px; }
	.menu-text small { font-size: 14px; }
}
