/* Onboarding, paywall, sign-in and checkout: one full-screen flow above the app */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.ob {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: var(--bg);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	display: flex;
	flex-direction: column;
	padding-top: env(safe-area-inset-top, 0px);
}
.ob[hidden] { display: none !important; }
.ob::before {
	content: "";
	position: fixed;
	inset: -20% -10% auto;
	height: 70vh;
	background:
		radial-gradient(40% 50% at 20% 30%, color-mix(in srgb, var(--ring-post) 22%, transparent), transparent 70%),
		radial-gradient(40% 50% at 80% 20%, color-mix(in srgb, var(--ring-engage) 22%, transparent), transparent 70%),
		radial-gradient(40% 50% at 50% 60%, color-mix(in srgb, var(--ring-create) 16%, transparent), transparent 70%);
	filter: blur(30px);
	pointer-events: none;
	animation: ob-drift 14s ease-in-out infinite alternate;
}
@keyframes ob-drift { to { transform: translate3d(0, 4%, 0) scale(1.08); } }

.ob-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 0; max-width: 1080px; width: 100%; margin: 0 auto; min-height: 52px; }
.ob-back { border: 0; background: none; color: var(--muted); font-weight: 600; padding: 8px 4px; display: inline-flex; align-items: center; gap: 4px; }
.ob-back[hidden] { visibility: hidden; display: inline-flex !important; }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 22px; height: 5px; border-radius: 3px; background: var(--track); transition: background 0.3s, width 0.3s; }
.ob-dots i.on { background: var(--accent); width: 34px; }
.ob-skip[hidden] { visibility: hidden; display: inline-flex !important; }
.ob-skip { border: 0; background: none; color: var(--muted); font-size: 0.85rem; padding: 8px 4px; }

.ob-stage { position: relative; flex: 1; display: grid; width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 16px; padding-block: 12px 32px; }
.ob-screen { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; min-width: 0; animation: ob-in 0.5s cubic-bezier(.2, .8, .2, 1) both; }
.ob-screen.leaving { animation: ob-out 0.28s ease-in both; pointer-events: none; }
@keyframes ob-in { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.985); } }
@keyframes ob-out { to { opacity: 0; transform: translate3d(-28px, 0, 0); } }
.ob-screen > * { max-width: 520px; width: 100%; }
.ob-screen.wide > * { max-width: 1000px; }

.ob-eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--accent); }
.ob h1 { font-size: clamp(1.9rem, 6.5vw, 3rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; }
.ob .lead { color: var(--muted); font-size: 1.05rem; max-width: 42ch; margin-inline: auto; }
.ob .lead b { color: var(--ink); }

.ob-hero-rings { width: 132px; height: 132px; }
.ob-hero-rings circle { fill: none; stroke-linecap: round; stroke-width: 11; }
.ob-hero-rings .arc { animation: ob-ring 1.6s cubic-bezier(.2, .8, .2, 1) both; }
.ob-hero-rings .arc:nth-of-type(4) { animation-delay: 0.15s; }
.ob-hero-rings .arc:nth-of-type(6) { animation-delay: 0.3s; }
@keyframes ob-ring { from { stroke-dashoffset: var(--len); } }

.ob-choices { display: flex; flex-direction: column; gap: 10px; }
.ob-btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: 1.05rem; padding: 16px 20px; border-radius: 16px; cursor: pointer; width: 100%; transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s, background 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.ob-btn:hover { transform: translateY(-1px); border-color: var(--muted); }
.ob-btn:active { transform: scale(0.975); }
.ob-btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 28px -12px var(--accent); position: relative; overflow: hidden; }
.ob-btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%); transform: translateX(-120%); animation: ob-shine 3.2s ease-in-out 1s infinite; }
@keyframes ob-shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.ob-btn.ghost { background: transparent; border-color: transparent; color: var(--muted); font-weight: 600; }
.ob-btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }
.ob-btn:disabled::after { display: none; }

.ob-pills { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.ob-pills button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-weight: 700; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all 0.2s; }
.ob-pills button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.ob-number { position: relative; }
.ob-number input { width: 100%; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 12vw, 4.2rem); letter-spacing: -0.03em; text-align: center; color: var(--ink); background: transparent; border: 0; border-bottom: 3px solid var(--line); padding: 4px 0 8px; outline: none; transition: border-color 0.2s; font-variant-numeric: tabular-nums; }
.ob-number input:focus { border-bottom-color: var(--accent); }
.ob-number input::placeholder { color: var(--track); }
.ob-number .unit { display: block; margin-top: 8px; color: var(--muted); font-weight: 600; }
.ob-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ob-chips button { border: 1px dashed var(--line); background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: 0.9rem; padding: 7px 13px; border-radius: 999px; cursor: pointer; transition: all 0.2s; }
.ob-chips button:hover { border-color: var(--accent); color: var(--accent); }
.ob-chips button[aria-pressed="true"] { border-style: solid; border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.ob-multiple { min-height: 1.5em; font-weight: 700; color: var(--accent); transition: opacity 0.2s; }
.ob-note { color: var(--muted); font-size: 0.9rem; }
.ob-error { color: var(--bad); font-size: 0.9rem; font-weight: 600; min-height: 1.3em; }

/* Building */
.ob-build { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.ob-build svg { width: 150px; height: 150px; }
.ob-build circle { fill: none; stroke-linecap: round; stroke-width: 12; }
.ob-build .arc { transition: stroke-dashoffset 1.9s cubic-bezier(.5, 0, .2, 1); }
.ob-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; width: fit-content; margin-inline: auto; }
.ob-steps li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); opacity: 0.35; transition: opacity 0.35s, color 0.35s; }
.ob-steps li.done { opacity: 1; color: var(--ink); }
.ob-steps svg { width: 22px; height: 22px; flex: none; }
.ob-steps circle { fill: var(--track); transition: fill 0.3s; }
.ob-steps li.done circle { fill: var(--good); }
.ob-steps path { fill: none; stroke: var(--surface); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; stroke-dashoffset: 14; transition: stroke-dashoffset 0.35s 0.1s; }
.ob-steps li.done path { stroke-dashoffset: 0; }

/* Paywall */
.pw-head { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.pw-summary { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pw-toggle { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; width: min(100%, 340px); margin-inline: auto; }
.pw-toggle button { position: relative; z-index: 1; border: 0; background: none; font: inherit; font-weight: 700; padding: 9px 10px; color: var(--muted); cursor: pointer; transition: color 0.25s; white-space: nowrap; }
.pw-toggle button[aria-pressed="true"] { color: var(--accent-ink); }
.pw-toggle .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--accent); transition: transform 0.35s cubic-bezier(.3, 1.4, .5, 1); }
.pw-toggle[data-interval="yearly"] .thumb { transform: translateX(100%); }
.pw-toggle small { font-size: 0.72rem; opacity: 0.9; }

.pw-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; text-align: left; }
.pw-plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; border-radius: 20px; background: var(--surface); border: 2px solid var(--line); cursor: pointer; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; animation: ob-in 0.55s cubic-bezier(.2, .8, .2, 1) both; min-width: 0; font: inherit; color: inherit; }
.pw-plan:nth-child(2) { animation-delay: 0.08s; }
.pw-plan:nth-child(3) { animation-delay: 0.16s; }
.pw-plan:hover { transform: translateY(-3px); }
.pw-plan[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 18px 40px -22px var(--accent); }
.pw-plan.featured { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, conic-gradient(from var(--spin), var(--ring-post), var(--ring-engage), var(--ring-create), var(--ring-post)) border-box; animation: ob-in 0.55s cubic-bezier(.2, .8, .2, 1) 0.08s both, pw-spin 6s linear infinite; }
.pw-plan.featured[aria-checked="true"] { box-shadow: 0 22px 48px -20px var(--ring-engage); }
@keyframes pw-spin { to { --spin: 360deg; } }
.pw-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.pw-plan-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pw-plan h3 { font-size: 1.25rem; }
.pw-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: border-color 0.2s; }
.pw-radio::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1); }
.pw-plan[aria-checked="true"] .pw-radio { border-color: var(--accent); }
.pw-plan[aria-checked="true"] .pw-radio::after { transform: scale(1); }
.pw-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-height: 3.2rem; }
.pw-price .amount { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.pw-price .per { color: var(--muted); font-weight: 600; }
.pw-price .was { color: var(--muted); text-decoration: line-through; font-size: 0.9rem; }
.pw-price.flip .amount { animation: pw-flip 0.45s cubic-bezier(.2, .8, .2, 1); }
@keyframes pw-flip { from { opacity: 0; transform: translateY(10px); } }
.pw-sub { font-size: 0.85rem; color: var(--muted); min-height: 1.3em; }
.pw-save { display: inline-block; background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); font-weight: 800; font-size: 0.75rem; padding: 3px 8px; border-radius: 6px; animation: pw-pop 0.4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pw-pop { from { transform: scale(0.6); opacity: 0; } }
.pw-slots { font-weight: 800; font-size: 0.95rem; }
.pw-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }
.pw-features li { display: flex; gap: 8px; align-items: flex-start; }
.pw-features svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }

.ob-screen.wide > .pw-cta { max-width: 460px; }
.pw-cta { position: sticky; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 30%); max-width: 520px; margin-inline: auto; }
.pw-fine { font-size: 0.78rem; color: var(--muted); }
.pw-fine button { border: 0; background: none; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }

/* Sign in */
.au-card { display: flex; flex-direction: column; gap: 12px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px 20px; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.5); }
.au-provider { justify-content: flex-start; padding: 13px 16px; font-size: 1rem; }
.au-provider .logo { width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.au-provider .logo svg { width: 22px; height: 22px; }
.au-provider span:last-child { flex: 1; text-align: center; margin-right: 22px; }
.au-provider.tiktok { background: #000000; color: #FFFFFF; border-color: #000000; }
.au-provider.apple { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.au-provider.google { background: #FFFFFF; color: #1F1F1F; border-color: #DADCE0; }
.au-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.au-field { display: flex; flex-direction: column; gap: 5px; }
.au-field label { font-weight: 600; font-size: 0.88rem; }
.au-field input { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; }
.au-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.au-legal { font-size: 0.78rem; color: var(--muted); text-align: center; }

.au-code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 360px; margin-inline: auto; }
.au-code input { width: 100%; aspect-ratio: 0.85; max-height: 64px; text-align: center; font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; transition: border-color 0.2s, transform 0.15s; padding: 0; }
.au-code input:focus { outline: none; border-color: var(--accent); transform: translateY(-2px); }
.au-code.shake { animation: au-shake 0.4s; }
@keyframes au-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.au-dev { font-size: 0.85rem; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--ink); border-radius: 10px; padding: 10px 12px; }
.au-dev a { color: var(--accent); font-weight: 700; }

/* Checkout */
.co-card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.co-row { display: flex; justify-content: space-between; gap: 10px; }
.co-row.total { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 800; font-size: 1.1rem; }
.co-test { font-size: 0.82rem; font-weight: 700; color: var(--warn); }

/* Success */
.ob-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; width: 100%; height: 100%; }
.ob-success-badge { font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: 0.04em; padding: 8px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); width: fit-content !important; margin-inline: auto; animation: pw-pop 0.6s cubic-bezier(.3, 1.6, .5, 1) 0.2s both; }

/* Header account */
.account { display: flex; align-items: center; gap: 8px; }
.plan-chip { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.plan-chip.paid { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.avatar-btn { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-2); padding: 0; overflow: hidden; display: grid; place-items: center; font-weight: 800; color: var(--ink); cursor: pointer; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.account-menu { position: absolute; right: 16px; top: 64px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; min-width: 220px; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 4px; animation: ob-in 0.25s both; }
.account-menu p { padding: 6px 10px; font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.account-menu button { text-align: left; border: 0; background: none; font: inherit; font-weight: 600; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.account-menu button:hover { background: var(--surface-2); }

@media (max-width: 860px) {
	.pw-plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; gap: 18px; }
	.pw-plan.featured { order: -1; }
}
@media (max-width: 560px) {
	.ob-stage { padding-block: 4px 24px; }
	.ob-screen { gap: 18px; justify-content: flex-start; padding-top: 4vh; }
	.pw-plan { padding: 18px 16px; }
	.au-card { padding: 20px 16px; }
	.top { row-gap: 10px; }
	.top .brand { order: 0; }
	.account { order: 1; margin-left: auto; }
	.platforms { order: 2; }
	.save-state { order: 3; }
}
@media (prefers-reduced-motion: reduce) {
	.ob *, .ob::before, .ob-screen { animation: none !important; transition: none !important; }
}
@media (max-width: 420px) {
	.top .brand { font-size: 1.3rem; gap: 8px; }
	.top .brand-mark { width: 24px; height: 24px; }
	.account { gap: 6px; }
	.account .btn { padding: 6px 10px; font-size: 0.85rem; }
}

/* Locked paid feature */
.locked-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--ring-engage) 10%, var(--surface)), var(--surface)); }
.locked-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.locked-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.locked-copy { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* Account screens: delete account, forgot password, menu errors */
.ob-btn.primary.danger { background: var(--bad); color: #FFFFFF; box-shadow: 0 10px 28px -14px var(--bad); }
.ob-btn.primary.danger::after { display: none; }
.au-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }
.au-list li { display: flex; gap: 10px; align-items: flex-start; }
.au-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); margin-top: 0.55em; flex: none; }
.account-menu .ob-error { padding: 4px 10px; font-size: 0.82rem; }
#auForgot { width: auto; align-self: flex-start; padding: 4px 0; font-size: 0.88rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pw-legal { font-size: 0.72rem; color: var(--muted); text-align: center; max-width: 46ch; margin: 0 auto; }
.pw-legal a { color: var(--muted); text-decoration: underline; }
