
:root { --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace; }
.account-api, .api-stack { display: grid; gap: 14px; min-width: 0; }
.api-section { display: grid; gap: 14px; min-width: 0; }
.api-section + .api-section { padding-top: 20px; border-top: 1px solid var(--color-border); }
.api-stack > .pay-btn, .api-locked > a { justify-self: start; }
.api-locked { padding: 8px 0 4px; gap: 16px; }
.api-lock-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--color-text-muted); background: var(--color-bg); border: 1px solid var(--color-border); }
.api-lock-icon svg { width: 20px; height: 20px; }
.api-locked > p { max-width: 46ch; font-size: 15px; }
.api-key-list { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.api-key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 12px 12px 12px 16px; border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); }
.api-key-row.is-new { border-color: var(--color-accent); background: linear-gradient(90deg, var(--color-accent-soft), var(--color-bg) 70%); }
.api-key-main { min-width: 0; display: grid; gap: 4px; }
.api-key-name { overflow-wrap: anywhere; line-height: 1.4; }
.api-key-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.api-key-meta code { font-family: var(--font-mono); padding: 1px 6px; border-radius: 6px; background: var(--color-surface-raised); color: var(--color-text); border: 1px solid var(--color-border); }
.api-label { font-size: 13px; font-weight: 600; }
.api-field { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border-radius: 10px; color: var(--color-text); background: var(--color-bg); border: 1px solid var(--color-border-strong); font: inherit; line-height: 1.45; }
.api-field:focus-visible { border-color: var(--color-accent); outline: 2px solid var(--color-accent); outline-offset: 2px; }
.api-url { font: 13px/1.55 var(--font-mono); resize: vertical; overflow-wrap: anywhere; max-height: 152px; }
.api-create { padding: 14px; border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); }
.api-create-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.api-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.api-reveal { padding: 16px; border-radius: 12px; border: 1px solid var(--color-accent); background: linear-gradient(180deg, var(--color-accent-soft), var(--color-bg) 80%); opacity: 1; transform: none; transition: opacity 220ms var(--ease-out-strong), transform 220ms var(--ease-out-strong); }
@starting-style { .api-reveal { opacity: 0; transform: translateY(6px) scale(.98); } }
.api-reveal h3 { margin: 0; font-size: 15px; font-weight: 600; }
.api-secret { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 8px 8px 14px; border-radius: 10px; background: var(--color-bg); border: 1px dashed var(--color-border-strong); }
.api-secret code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 500 14px/1.55 var(--font-mono); user-select: all; }
.api-secret button { flex: none; }
.api-warning { padding: 12px 14px; border-radius: 10px; background: var(--color-warning-soft); border: 1px solid var(--color-warning); font-size: 13px; overflow-wrap: anywhere; }
.api-code { min-width: 0; border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); overflow: hidden; }
.api-code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 4px 4px 4px 14px; border-bottom: 1px solid var(--color-border); }
.api-code pre { margin: 0; padding: 14px 16px; overflow: auto; font: 13px/1.65 var(--font-mono); tab-size: 2; }
.api-code code { font: inherit; }
.account-api .row-link > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.account-api .tabs { max-width: 100%; }
.account-api .pay-btn, .dev-layout .pay-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; min-height: 44px; cursor: pointer; }
.account-api .pay-btn:active:not(:disabled), .dev-layout .pay-btn:active:not(:disabled) { transform: scale(.97); transition-duration: 120ms; }
.account-api .pay-btn:focus-visible, .dev-layout :is(a,button,pre,summary):focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.api-confirm[open] { display: block; padding: 20px; max-width: min(440px, calc(100% - 32px)); }
.api-confirm h2 { overflow-wrap: anywhere; font-size: 17px; }
.api-danger { color: var(--color-danger); }
.acct > .tabs { max-width: 100%; }
.acct > .tabs button { min-height: 44px; height: auto; }
.acct .buy-title p { overflow-wrap: anywhere; }
.dev-layout { display: grid; grid-template-areas: "hero" "toc" "main"; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 32px 24px 64px; max-width: 1080px; margin: 0 auto; }
.dev-hero { grid-area: hero; min-width: 0; max-width: 760px; }
.dev-hero h1 { margin: 10px 0 12px; font-size: clamp(32px, 4vw, 42px); line-height: 1.1; letter-spacing: -.035em; font-weight: 750; }
.dev-hero .lead { margin: 0 0 22px; max-width: 48ch; color: var(--color-text-muted); font-size: 17px; line-height: 1.6; }
.dev-toc { grid-area: toc; min-width: 0; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); align-self: start; }
.dev-toc summary { min-height: 48px; padding: 12px 14px; cursor: pointer; font-weight: 600; }
.dev-toc nav { padding: 0 14px 14px; }
.dev-toc ol { list-style: none; margin: 0; padding: 0; }
.dev-toc a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--color-text-muted); text-decoration: none; font-size: 13px; }
.dev-toc a span { font: 11px var(--font-mono); color: var(--color-text-subtle); flex: none; }
.dev-main { grid-area: main; min-width: 0; }
.dev-main h2 { margin: 42px 0 16px; padding-top: 24px; border-top: 1px solid var(--color-border); scroll-margin-top: 90px; font-size: 25px; letter-spacing: -.025em; }
.dev-main h3 { margin: 24px 0 12px; }
.dev-main pre { max-width: 100%; overflow: auto; padding: 16px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-bg); font: 13px/1.65 var(--font-mono); tab-size: 2; }
.dev-main pre code { white-space: pre; background: transparent; border: 0; padding: 0; font: inherit; }
.dev-main :not(pre) > code { font-family: var(--font-mono); overflow-wrap: anywhere; }
.dev-main p, .dev-main li { overflow-wrap: anywhere; }
.dev-main .policy-table { max-width: 100%; overflow: auto; }
.dev-main table { min-width: 520px; }
.dev-layout .fine { font-size: 12px; color: var(--color-text-muted); }
.dev-layout .pay-btn { padding: 0 18px; border-radius: 10px; font: 600 14px var(--font-sans); transition: transform 120ms var(--ease-out-strong), opacity 160ms var(--ease-out-strong); }
.dev-layout .pay-btn-primary { color: var(--color-on-accent); background: linear-gradient(180deg, oklch(84% 0.15 165), var(--color-accent)); border: 1px solid transparent; box-shadow: inset 0 1px 0 oklch(100% 0 0 / .28), 0 1px 2px oklch(5% 0 0 / .5), 0 6px 18px -8px oklch(80% 0.15 165 / .55); }
.dev-layout .pay-btn-secondary { color: var(--color-text); background: linear-gradient(180deg, oklch(26% 0.016 255), var(--color-surface-raised)); border: 1px solid var(--color-border-strong); box-shadow: inset 0 1px 0 oklch(100% 0 0 / .06), 0 1px 2px oklch(5% 0 0 / .4); }
@media (hover: hover) and (pointer: fine) { .dev-toc a:hover { color: var(--color-text); } .dev-layout .pay-btn:hover { opacity: .9; } }
@media (min-width: 1024px) { .dev-layout { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "toc hero" "toc main"; column-gap: 56px; row-gap: 8px; padding-top: 40px; } .dev-toc { position: sticky; top: 90px; border: 0; background: transparent; } .dev-toc summary { display: none; } }
@media (max-width: 479px) { .api-create-row { grid-template-columns: 1fr 1fr; } .api-create-row input { grid-column: 1 / -1; } .api-secret { flex-wrap: wrap; } .api-secret code { flex-basis: 100%; } .acct > .tabs button { padding-inline: 8px; white-space: nowrap; } .dev-layout { padding: 24px 16px 48px; } }
@media (prefers-reduced-motion: reduce) { .api-reveal { transform: none; transition: opacity 150ms var(--ease-out-strong); } @starting-style { .api-reveal { transform: none; } } .account-api .pay-btn:active:not(:disabled), .dev-layout .pay-btn:active:not(:disabled) { transform: none; } }

/* Approved referral, payout and leaderboard surfaces. */
/* Referral tab */
.rf { display: grid; gap: 16px; }
.rf-intro h2 { font-size: 18px; font-weight: 700; }
.rf-intro p { margin-top: 4px; font-size: 14px; color: var(--color-text-muted); }
.rf-rules { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rf-rules li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; font-size: 14px; }
.rf-rules li b { display: block; font-weight: 600; }
.rf-rules li span { color: var(--color-text-muted); font-size: 13px; }
.rf-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--color-accent); background: var(--color-accent-soft); }
.rf-ico svg { width: 16px; height: 16px; }
.rf-actions { display: grid; gap: 8px; justify-items: start; }
.rf-actions .button-primary { min-width: 180px; }
.rf-fine { font-size: 12px; color: var(--color-text-subtle); }
.rf-fine a { color: var(--color-text-muted); text-decoration: underline; text-underline-offset: 3px; }
.rf-ok { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--color-accent); }
.rf-ok svg { width: 16px; height: 16px; flex: none; }

.rf-share { display: grid; gap: 10px; padding: 16px; border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); }
.rf-share-label { font-size: 12px; color: var(--color-text-muted); }
.rf-share-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.rf-link { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 10px;
  background: var(--color-surface); border: 1px solid var(--color-border); font-size: 14px; overflow: hidden; }
.rf-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-muted); }
.rf-link b { font: 700 14px var(--font-mono); letter-spacing: .08em; color: var(--color-text); flex: none; }
.rf-share-row .button-primary, .rf-share-row .button-secondary { flex: none; min-height: 44px; }
.rf-counts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--color-text-muted); }
.rf-counts b { color: var(--color-text); font-variant-numeric: tabular-nums; }

.rf-points { display: grid; gap: 12px; }
.rf-points-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rf-points-num { font-size: 32px; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rf-points-num small { font-size: 14px; font-weight: 500; color: var(--color-text-muted); margin-left: 4px; }
.rf-cash { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; }
.rf-progress { display: grid; gap: 6px; }
.rf-progress .app-meter-row b { font-variant-numeric: tabular-nums; }
.rf-short { font-size: 13px; color: var(--color-text-muted); }

.rf-open { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); }
.rf-open-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rf-open-top b { font-size: 15px; font-variant-numeric: tabular-nums; }
.rf-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--color-warning); background: var(--color-warning-soft); }
.rf-pill.is-ok { color: var(--color-accent); background: var(--color-accent-soft); }
.rf-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rf-open p { font-size: 13px; color: var(--color-text-muted); }
.rf-open .button-secondary { justify-self: start; }

.rf-debt { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13px; color: var(--color-warning); background: var(--color-warning-soft); }
.rf-debt svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

.rf-section-title { font-size: 15px; font-weight: 600; }
.rf-prefs { display: grid; gap: 12px; }
.rf-field { display: grid; gap: 6px; }
.rf-field label { font-size: 13px; font-weight: 600; }
.rf-field small { font-size: 12px; color: var(--color-text-subtle); }
.rf-input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--color-text); background: var(--color-bg);
  border: 1px solid var(--color-border-strong); font: 500 15px var(--font-sans); }
.rf-input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.rf-input-row { display: flex; gap: 8px; }
.rf-input-row .rf-input { flex: 1; min-width: 0; }
.rf-input-row .button-secondary { flex: none; min-height: 44px; }
select.rf-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--color-text-subtle) 50%), linear-gradient(135deg, var(--color-text-subtle) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

/* Payout form inside the real checkout sheet styles */
.po-split { display: grid; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--color-border-strong); font-size: 13px; }
.po-split div { display: flex; justify-content: space-between; gap: 12px; color: var(--color-text-muted); }
.po-split b { color: var(--color-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.po-split .is-net b { color: var(--color-accent); font-size: 15px; }
.po-fields { display: grid; gap: 14px; }

/* Figure shell */
.rf-explainer { display: grid; gap: 10px; margin: 0; padding: 14px 14px 12px; border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); }
.ex-scene { display: block; width: 100%; height: auto; font-family: var(--font-sans); }
.ex-scene text { font-size: 11px; fill: var(--color-text); text-anchor: middle; }
.ex-card { fill: var(--color-surface-raised); stroke: var(--color-border); }
.ex-avatar { fill: var(--color-accent-soft); }
.ex-avatar-t { font-weight: 700; fill: var(--color-accent); }
.ex-scene .ex-name { text-anchor: start; font-weight: 600; font-size: 12px; }
.ex-link rect { fill: var(--color-accent-soft); }
.ex-link text { font-family: var(--font-mono); font-size: 10px; fill: var(--color-accent); }
.ex-arrow { fill: none; stroke: var(--color-text-subtle); stroke-width: 1.6; stroke-dasharray: 4 4; }
#ex-head path { fill: var(--color-text-subtle); }
.ex-order rect { fill: var(--color-surface); stroke: var(--color-border-strong); }
.ex-order text { font-size: 10.5px; fill: var(--color-text-muted); }
.ex-pill rect { fill: var(--color-accent); }
.ex-pill text { font-weight: 600; fill: var(--color-on-accent); }
.ex-points rect { fill: var(--color-surface); stroke: var(--color-border-strong); }
.ex-scene .ex-points-t { text-anchor: start; font-weight: 700; font-variant-numeric: tabular-nums; }
.ex-points-unit { font-weight: 500; font-size: 10px; fill: var(--color-text-muted); }
.ex-state text { font-size: 9.5px; font-weight: 600; }
.ex-state-hold rect { fill: var(--color-warning-soft); } .ex-state-hold text { fill: var(--color-warning); }
.ex-state-ok rect { fill: var(--color-accent-soft); } .ex-state-ok text { fill: var(--color-accent); }
.ex-friends rect { fill: var(--color-surface); stroke: var(--color-border); stroke-dasharray: 3 3; }
.ex-friends text { font-size: 10px; fill: var(--color-text-muted); }
.ex-scene .ex-cap-label { text-anchor: start; font-size: 10px; fill: var(--color-text-muted); }
.ex-scene .ex-cap-val { text-anchor: end; font-size: 10px; fill: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ex-track { fill: var(--color-surface-raised); stroke: var(--color-border); }
.ex-fill { fill: var(--color-accent); transform-origin: 16px 0; transform: scaleX(0); }
.ex-btn rect { fill: var(--color-surface-raised); stroke: var(--color-border-strong); }
.ex-btn text { font-size: 10.5px; font-weight: 600; fill: var(--color-text-muted); }

/* Default hidden; beats reveal. Transitions carry every state change. */
.ex-link, .ex-arrow, .ex-order, .ex-pill, .ex-points, .ex-state, .ex-friends { opacity: 0; }
.ex-link, .ex-arrow, .ex-order, .ex-pill, .ex-points, .ex-state, .ex-friends, .ex-fill, .ex-btn rect, .ex-btn text { transition: opacity 480ms ease, transform 640ms var(--ease-out-strong), fill 480ms ease, stroke 480ms ease; }
.ex-link { transform: translateX(0); }
.ex-pill, .ex-friends { transform: translateY(6px); }

/* Beat 1 */
.is-step-1 .ex-link { opacity: 1; transform: translateX(170px); transition-duration: 480ms, 1600ms; }
.is-step-1 .ex-arrow-r { opacity: 1; animation: ex-dash 900ms linear infinite; }
/* Beat 2 */
.is-step-2 .ex-arrow-l { opacity: 1; animation: ex-dash 900ms linear infinite; }
.is-step-2 .ex-order, .is-step-3 .ex-order { opacity: 1; }
.is-step-2 .ex-minh-gift, .is-step-3 .ex-minh-gift { opacity: 1; transform: translateY(0); }
.is-step-2 .ex-points, .is-step-3 .ex-points { opacity: 1; }
.is-step-2 .ex-state-hold { opacity: 1; }
/* Beat 3: points flip to available, more friends arrive, the balance fills, the two ways to spend light up. */
.is-step-3 .ex-state-hold { animation: ex-hold-fade 3200ms steps(1, end) forwards; }
.is-step-3 .ex-state-ok { opacity: 1; animation: ex-ok-late 3200ms steps(1, end) forwards; }
.is-step-3 .ex-friends { opacity: 1; transform: translateY(0); transition-delay: 1200ms; }
.is-step-3 .ex-fill { transform: scaleX(1); transition-duration: 480ms, 1400ms; transition-delay: 0ms, 1400ms; }
.is-step-3 .ex-btn rect { fill: var(--color-accent-soft); stroke: var(--color-accent); transition-delay: 2200ms; }
.is-step-3 .ex-btn text { fill: var(--color-accent); transition-delay: 2200ms; }
@keyframes ex-hold-fade { 0%, 29% { opacity: 1; } 30%, 100% { opacity: 0; } }
@keyframes ex-ok-late { 0%, 29% { opacity: 0; } 30%, 100% { opacity: 1; } }
@keyframes ex-dash { to { stroke-dashoffset: -16; } }
/* Text swaps have no half states. */
.ex-points-b, .ex-cap-3 { display: none; }
.is-step-3 .ex-points-a, .is-step-3 .ex-cap-0 { display: none; }
.is-step-3 .ex-points-b, .is-step-3 .ex-cap-3 { display: inline; }

/* Captions: one visible at a time, same height so the layout never jumps. */
.ex-captions { display: grid; min-height: 4.4em; }
.ex-cap { grid-area: 1 / 1; margin: 0; font-size: 13px; line-height: 1.45; color: var(--color-text-muted); opacity: 0; transition: opacity 320ms ease; }
.ex-cap b { color: var(--color-text); font-weight: 700; }
.is-step-1 .ex-cap-s1, .is-step-2 .ex-cap-s2, .is-step-3 .ex-cap-s3 { opacity: 1; }

/* Controls: dots jump to a beat; every control is a 44px target. */
.ex-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ex-dots { display: flex; gap: 6px; }
.ex-dots button { width: 32px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.ex-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-border-strong); transition: transform 200ms var(--ease-out-strong), background 200ms ease; }
.is-step-1 .ex-dots [data-step="1"]::before, .is-step-2 .ex-dots [data-step="2"]::before, .is-step-3 .ex-dots [data-step="3"]::before { background: var(--color-accent); transform: scale(1.35); }
.ex-toggle { min-height: 44px; padding: 0 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-button); background: transparent; color: var(--color-text-muted); font: 500 13px var(--font-sans); cursor: pointer; }
.ex-toggle[aria-pressed="true"] { color: var(--color-text); border-color: var(--color-accent); }

/* Member variant: collapsed details */
.rf-explainer-wrap { border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-bg); }
.rf-explainer-wrap > summary { cursor: pointer; padding: 14px 16px; font-size: 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.rf-explainer-wrap > summary::-webkit-details-marker { display: none; }
.rf-explainer-wrap > summary::after { content: "+"; color: var(--color-text-muted); }
.rf-explainer-wrap[open] > summary::after { content: "−"; }
.rf-explainer-wrap .rf-explainer { border: 0; border-top: 1px solid var(--color-border); border-radius: 0 0 12px 12px; }

/* Static variant: no motion at all, three frames stacked on phones, side by side when wide. */
.is-static .ex-scene *, .is-static .ex-fill, .is-static .ex-btn rect, .is-static .ex-btn text, .is-static .ex-cap, .is-static .ex-dots button::before { transition: none !important; animation: none !important; }
.ex-static-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.rf-explainer.is-static > .ex-scene, .rf-explainer.is-static > .ex-captions, .rf-explainer.is-static > .ex-controls { display: none; }
@media (min-width: 720px) { .ex-static-grid { grid-template-columns: repeat(3, 1fr); } }
.ex-static-slot { display: grid; gap: 6px; }
.ex-static-slot .ex-cap { grid-area: auto; opacity: 1; font-size: 12px; }
.ex-static-slot .ex-scene { border-radius: 8px; background: var(--color-surface); }
@media (prefers-reduced-motion: reduce) {
  .ex-scene *, .ex-fill, .ex-btn rect, .ex-btn text, .ex-cap, .ex-dots button::before { transition: none !important; animation: none !important; }
}


/* Public leaderboard */
.lb { max-width: 720px; margin: 0 auto; padding: 28px 0 32px; display: grid; gap: 20px; }
.lb-intro .eyebrow { font-size: 12px; font-weight: 600; color: var(--color-accent); }
.lb-intro h1 { margin-top: 6px; font-size: 28px; font-weight: 700; letter-spacing: -.015em; }
.lb-intro p { margin-top: 6px; color: var(--color-text-muted); font-size: 14px; max-width: 60ch; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lb-note { font-size: 12px; color: var(--color-text-subtle); }
.lb-list { display: grid; margin: 0; padding: 0; list-style: none; border-radius: 16px; background: var(--color-surface); border: 1px solid var(--color-border); overflow: hidden; }
.lb-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 56px; padding: 8px 16px; border-top: 1px solid var(--color-border); font-size: 15px; }
.lb-list li:first-child { border-top: 0; }
.lb-rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--color-text-muted); background: var(--color-surface-raised); }
.lb-list li:nth-child(-n+3) .lb-rank { color: var(--color-on-accent); background: var(--color-accent); }
.lb-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-buyers { font-size: 13px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-me { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px;
  background: var(--color-accent-soft); font-size: 14px; }
.lb-me b { font-variant-numeric: tabular-nums; }
.lb-empty { padding: 32px 16px; text-align: center; color: var(--color-text-muted); font-size: 14px; }
.lb-cta { display: grid; gap: 10px; justify-items: center; padding: 24px 16px; text-align: center; border-radius: 16px; border: 1px solid var(--color-border); }
.lb-cta p { color: var(--color-text-muted); font-size: 14px; }

/* Referral share and invitation components. */
.rf-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rf-share-actions button, .rf-actions > button { min-height: 44px; }
.rf-example, .rf-consent { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
.rf-friends { display: grid; gap: 10px; }
.rf-friend-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rf-friend { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border-radius: 10px; background: var(--color-bg); }
.rf-friend span { color: var(--color-text-muted); font-size: 13px; }
.ref-banner-slot[hidden] { display: none; }
.ref-banner, .share-nudge { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface-raised); }
.ref-banner-text, .share-nudge-text { flex: 1; font-size: 14px; }
.share-nudge { flex-wrap: wrap; row-gap: 10px; padding: 12px 14px; }
.share-nudge-text { flex: 1 1 180px; margin: 0; line-height: 1.5; }
.share-nudge .ref-banner-close { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.share-nudge .rf-share-actions { flex-basis: 100%; }
.share-nudge .rf-share-actions button { flex: 1 1 0; min-width: 88px; }
.share-nudge-live { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--color-text-muted); }
.share-nudge-live:empty { display: none; }
.ref-banner a { color: var(--color-accent); text-underline-offset: 3px; }
.pay-pack-list { max-height: min(52vh, 420px); overflow-y: auto; }
.pay-pack-list .pick-row { min-height: 64px; }
.pay-facts { display: grid; gap: 6px; padding-left: 20px; color: var(--color-text-muted); font-size: 13px; }
@media (max-width: 560px) { .rf-actions { grid-template-columns: 1fr 1fr; } .rf-actions > button { width: 100%; } .rf-friend { align-items: flex-start; flex-direction: column; } }

/* Checkout snippet */
.ck { max-width: 520px; display: grid; gap: 12px; padding: 24px 0; }
.ck-summary { padding: 18px; border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); }
.ck-code > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--color-text-muted); cursor: pointer; }
.ck-code > summary::-webkit-details-marker { display: none; }
.ck-code > summary svg { width: 16px; height: 16px; transition: transform 200ms var(--ease-out-strong); }
.ck-code[open] > summary svg { transform: rotate(180deg); }
.ck-bonus { color: var(--color-accent) !important; }

@media (max-width: 559px) {
  .rf-share-row { flex-wrap: wrap; }
  .rf-share-row .rf-link { flex-basis: 100%; }
  .rf-share-row .button-primary, .rf-share-row .button-secondary { flex: 1; }
  .rf-actions .button-primary { width: 100%; }
  .lb-intro h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .ck-code > summary svg { transition: none; transform: none; } }
.acct > .tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; width: 100%; min-width: 0; }
.acct > .tabs button { white-space: nowrap; flex: none; }
.rf, .lb, .rf-field, .rf-prefs { min-width: 0; }
.rf-feedback:empty { display: none; }
.rf-feedback { font-size: 13px; color: var(--color-text-muted); }
.rf .row-link > span { min-width: 0; overflow-wrap: anywhere; }
.rf .button-primary, .rf .button-secondary, .lb .tabs button, .lb .button-primary, .po-fields ~ .button-primary { min-height: 44px; }
.lb .tabs button { white-space: nowrap; }
.lb-list .lb-empty { display: block; padding: 32px 16px; }
.ck-bonus { display: flex; align-items: center; gap: 6px; }
.ck-bonus svg { width: 16px; height: 16px; flex: none; }
.rf-debt span, .rf-open p, .lb-me > span { overflow-wrap: anywhere; min-width: 0; }
.rf-link b { user-select: all; }
.rf-link span { user-select: all; }
.rf .app-wallet-rows b { white-space: normal; text-align: right; min-width: 0; }
.rf .app-wallet-rows > div > span { flex: none; }
.lb-me.lb-member { display: grid; gap: 16px; min-width: 0; padding: 16px; border-radius: 16px; background: var(--color-surface); border: 1px solid var(--color-border); }
/* Only the private status line carries the accent tint; the controls below stay on the neutral card. */
.lb-member-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: -4px -4px 0; padding: 12px 14px; border-radius: 12px; background: var(--color-accent-soft); }
.lb-member-top > span { min-width: 0; overflow-wrap: anywhere; }
.lb-member .button-secondary { min-height: 44px; }

/* Approved long-video UI. */
/* Long badge next to the file name; Creator badge uses the same shape. */
.lv-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  color: var(--color-accent); background: var(--color-accent-soft); white-space: nowrap; }
.lv-badge.creator { color: oklch(82% 0.1 300); background: oklch(30% 0.06 300); }
.lv-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lv-name-row .file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A long name plus the badge must shrink the name, never widen the card track. */
.app-upload { grid-template-columns: minmax(0, 1fr); }
.app-upload .file-meta { min-width: 0; }

/* Credit line under each long file. */
.lv-credit { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--color-text); }
.lv-credit b { font-weight: 600; }
.lv-credit .muted { color: var(--color-text-muted); }
.lv-credit.short { color: var(--color-warning); }
.lv-credit.error { color: var(--color-danger); }
.selected-file.is-short { border-color: oklch(45% 0.08 80); }

/* Batch total above the primary button: one row, numbers aligned right. */
.lv-total { display: grid; gap: 6px; margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--color-bg); border: 1px solid var(--color-border); font-size: 13px; }
.lv-total-row { display: flex; justify-content: space-between; gap: 12px; color: var(--color-text-muted); }
.lv-total-row b { color: var(--color-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.lv-total-row.after b { color: var(--color-accent); }
.lv-total-row.missing b { color: var(--color-warning); }
.app-upload .upload-actions .button-primary { width: 100%; }

/* Byte progress for a multipart upload. */
.lv-upload-progress { display: grid; gap: 6px; margin-top: 8px; }
.lv-bar { height: 6px; border-radius: 999px; background: var(--color-surface-raised); overflow: hidden; }
.lv-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--color-accent); }
.lv-bar-caption { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

/* Job item: segment progress replaces the indeterminate stripe for long jobs. */
.lv-seg { display: grid; gap: 6px; }
.lv-seg-caption { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.lv-seg-caption b { color: var(--color-text); font-weight: 600; }

/* Wallet history rows: one logical line per long job. */
.lv-ledger { list-style: none; margin: 0; padding: 0; border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; background: var(--color-bg); }
.lv-ledger li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
.lv-ledger li + li { border-top: 1px solid var(--color-border); }
.lv-ledger .what { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.lv-ledger .when { grid-column: 1; font-size: 12px; color: var(--color-text-subtle); }
.lv-ledger .amount { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lv-ledger .amount.plus { color: var(--color-accent); }

.app-upload .text-action { min-width: 44px; min-height: 44px; flex: none; }
.lv-badge { flex: none; }
.lv-bar-caption, .lv-seg-caption { flex-wrap: wrap; }
.lv-total[hidden], .lv-seg[hidden] { display: none; }


:root { --v-fast: #38bdf8; --v-pro1080: #f5b942; --v-pro4k: #f59e0b; --v-max: #a78bfa; --v-ultra: #d9e2ec; }
[data-identity="4k-fast"] { --version-color: var(--v-fast); }
[data-identity="1080p-pro"] { --version-color: var(--v-pro1080); }
[data-identity="4k-pro"] { --version-color: var(--v-pro4k); }
[data-identity="4k-max"] { --version-color: var(--v-max); }
[data-identity="4k-ultra"] { --version-color: var(--v-ultra); }
/* Fast is one slim row on top; the Pro tiers sit in one row of equal cards under a small label. */
.engine-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.engine-pro-group { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
/* Every card box is a grid so the labels stretch to one shared row height. */
.engine-fast, .engine-pro-option { min-width: 0; display: grid; }
.engine-option { position: relative; overflow: hidden; grid-template-columns: minmax(0, 1fr); min-width: 0; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: color-mix(in srgb, var(--color-text) 4%, transparent); transition: border-color 150ms ease, background-color 150ms ease; }
.engine-option:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.engine-option.engine-unfit { opacity: .45; cursor: not-allowed; }
.engine-option:has(input:checked) { border-color: var(--version-color); background: color-mix(in srgb, var(--version-color) 12%, var(--color-surface)); }
/* The chosen Ultra card: a bright platinum glint circles the border, a soft glow breathes around it, and a gloss sweeps across every few seconds. */
@property --ultra-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.engine-option[data-identity="4k-ultra"]:has(input:checked) { overflow: hidden; border-color: color-mix(in srgb, var(--v-ultra) 55%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--v-ultra) 22%, transparent); animation: ultra-glow 3.6s ease-in-out infinite; }
.engine-option[data-identity="4k-ultra"]:has(input:checked)::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ultra-angle), transparent 0deg, color-mix(in srgb, var(--v-ultra) 80%, transparent) 30deg, #fff 60deg, #fff 80deg, color-mix(in srgb, var(--v-ultra) 80%, transparent) 110deg, transparent 170deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: ultra-sheen 3.6s linear infinite; }
.engine-option[data-identity="4k-ultra"]:has(input:checked)::after { content: ""; position: absolute; top: -30%; bottom: -30%; left: 0; width: 55%; pointer-events: none; will-change: transform; filter: blur(6px);
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, #fff 3%, transparent) 25%, color-mix(in srgb, #fff 13%, transparent) 50%, color-mix(in srgb, #fff 3%, transparent) 75%, transparent 100%);
  animation: ultra-gloss 4.5s linear infinite; }
@keyframes ultra-sheen { to { --ultra-angle: 360deg; } }
@keyframes ultra-glow { 0%, 100% { box-shadow: 0 0 10px color-mix(in srgb, var(--v-ultra) 16%, transparent); } 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--v-ultra) 34%, transparent); } }
@keyframes ultra-gloss { from { transform: translateX(-140%) skewX(-14deg); } to { transform: translateX(300%) skewX(-14deg); } }
@media (prefers-reduced-motion: reduce) { .engine-option[data-identity="4k-ultra"]:has(input:checked) { animation: none; } .engine-option[data-identity="4k-ultra"]:has(input:checked)::before { animation: none; --ultra-angle: 300deg; } .engine-option[data-identity="4k-ultra"]:has(input:checked)::after { display: none; } }
.engine-option input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
.engine-option-copy, .engine-option-copy small { display: block; }
.engine-name { display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; }
.engine-name svg { width: 16px; height: 16px; flex: none; color: var(--version-color); }
.engine-option-copy small { margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--color-text-muted); }
.engine-pro-note { margin: -4px 2px 0; font-size: 12px; line-height: 1.45; color: var(--color-text-muted); }
.engine-switch-note { margin: -2px 2px 0; font-size: 12px; line-height: 1.45; color: oklch(78% 0.13 160); }
.engine-switch-note[hidden] { display: none; }
/* Pro cards are columns so the chip row lines up across cards whatever the tagline length. */
.engine-pro-option .engine-option-copy { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.engine-pro-option .engine-source { margin-top: auto; padding-top: 0; }
.engine-pro-option .engine-tagline { padding-bottom: 6px; }
/* Source chip and the "Nên chọn" badge sit on one line under the tagline. */
/* Chips size to their text and wrap instead of truncating, whatever the zoom level or card width. */
.engine-source { display: inline-block; width: fit-content; max-width: 100%; box-sizing: border-box; margin: 6px 4px 0 0; padding: 2px 8px; border-radius: 6px; font-size: 11px; line-height: 16px; white-space: normal; overflow-wrap: anywhere; color: var(--color-text-muted); background: color-mix(in srgb, var(--color-text) 7%, transparent); }
/* "Lựa chọn tốt nhất": a green band across the top of the recommended card that slides in and is swept by a shine every few seconds. */
.engine-option.engine-recommended { padding-top: 32px; }
.engine-best { position: absolute; top: 0; left: 0; right: 0; height: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 10px; font-weight: 700; letter-spacing: .08em; line-height: 1; text-transform: uppercase; white-space: nowrap; color: #fff; background: oklch(58% 0.15 160); animation: best-in 420ms cubic-bezier(.2, .8, .2, 1) both; }
.engine-best[hidden] { display: none; }
.engine-best-short { display: none; }
.engine-best::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: 0; width: 45%; pointer-events: none; will-change: transform; filter: blur(3px); background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .12) 25%, rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, .12) 75%, transparent 100%); animation: best-shine 2.6s linear infinite; }
@keyframes best-in { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes best-shine { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(340%) skewX(-18deg); } }
@media (prefers-reduced-motion: reduce) { .engine-best, .engine-best::after { animation: none; } }
.engine-soon { margin-top: 6px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-subtle, var(--color-text-muted)); }
.engine-maintenance { color: var(--color-warning); letter-spacing: .04em; text-wrap: balance; }
.engine-option input:disabled + .engine-option-copy { opacity: .55; }
/* The Fast row keeps name, tagline and chip on one line; its estimate sits at the right edge. */
.engine-fast .engine-option { padding: 10px 14px; }
.engine-fast .engine-option-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.engine-fast .engine-option-copy small { margin-top: 0; }
.engine-fast .engine-source { margin: 0; }
.engine-fast .engine-meta { margin-left: auto; }
.sharpness-advanced { margin-top: 10px; }
.sharpness-summary-row { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.sharpness-summary-row::-webkit-details-marker { display: none; }
.sharpness-summary-row::before { content: "▸"; width: 1em; color: var(--color-text-muted); }
.sharpness-advanced[open] .sharpness-summary-row::before { content: "▾"; }
.sharpness-summary-row span { flex: 1; }
.sharpness-summary-row a { min-width: 44px; min-height: 44px; display: grid; place-items: center; color: var(--color-text-muted); transition: color 150ms ease; }
.sharpness-summary-row a:hover { color: var(--color-text); }
.sharpness-summary-row a svg { display: block; }
/* One segmented bar for the five levels; the chosen level's hint sits underneath. */
.sharpness-options { --sharpness-index: 2; position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin-top: 6px; padding: 3px; border: 1px solid var(--color-border); border-radius: 10px; background: color-mix(in srgb, var(--color-text) 4%, transparent); }
/* A white thumb slides under the chosen level; its width is one column of the five (track minus padding and four gaps). */
.sharpness-options::before { content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px - 8px) / 5); border-radius: 8px; background: #fff; box-shadow: 0 1px 3px oklch(0% 0 0 / .4); transform: translateX(calc(var(--sharpness-index) * (100% + 2px))); transition: transform 260ms cubic-bezier(.2, .8, .2, 1); }
.sharpness-options:has(.sharpness-option:nth-child(1) input:checked) { --sharpness-index: 0; }
.sharpness-options:has(.sharpness-option:nth-child(2) input:checked) { --sharpness-index: 1; }
.sharpness-options:has(.sharpness-option:nth-child(3) input:checked) { --sharpness-index: 2; }
.sharpness-options:has(.sharpness-option:nth-child(4) input:checked) { --sharpness-index: 3; }
.sharpness-options:has(.sharpness-option:nth-child(5) input:checked) { --sharpness-index: 4; }
.sharpness-options .sharpness-option { display: block; min-width: 0; min-height: 36px; padding: 8px 2px; border: 0; border-radius: 8px; font-size: 12px; text-align: center; color: var(--color-text-muted); transition: color 200ms ease; }
.sharpness-options .sharpness-option:has(input:checked) { color: #0b0d12; background: transparent; border-color: transparent; }
@media (prefers-reduced-motion: reduce) { .sharpness-options::before, .sharpness-options .sharpness-option { transition: none; } }
.sharpness-options .sharpness-option input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
.sharpness-options .sharpness-option b { display: block; font-weight: 600; line-height: 1.3; }
.sharpness-hint { min-height: 20px; margin: 0 2px 4px; padding-top: 16px; font-size: 12px; line-height: 1.5; color: var(--color-text-muted); }
.pro-confirm-dialog { margin: auto; width: min(520px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--color-border); border-radius: 16px; color: var(--color-text); background: var(--color-surface); }
.pro-confirm-dialog::backdrop { background: #000b; }
.pro-confirm-dialog h2 { margin-top: 0; }
.pro-confirm-dialog p { line-height: 1.6; color: var(--color-text-muted); }
.pro-confirm-dialog > label { display: flex; gap: 8px; align-items: center; margin: 18px 0; }
.pro-confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.upload-eta { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 0; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: color-mix(in srgb, var(--color-text) 4%, transparent); font-size: 13px; }
.upload-eta[hidden] { display: none; }
.upload-eta > span:first-child { flex: none; margin-top: 2px; color: var(--color-accent); }
.upload-eta b { display: block; font-weight: 600; line-height: 1.4; }
.upload-eta small { display: block; margin-top: 2px; font-size: 12px; color: var(--color-text-muted); }
.job-engine { display: inline-flex; align-items: center; gap: 5px; }
.job-engine svg { width: 16px; height: 16px; }
.job-engine svg { color: var(--version-color); }
/* Stacked on phones: the Pro label becomes a normal row above its two cards. */
@media (max-width: 600px) { .engine-pro-group { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .engine-pro-group .engine-option { padding: 10px 8px; } .engine-pro-group .engine-option.engine-recommended { padding-top: 30px; } .engine-pro-group .engine-name { font-size: 13px; white-space: nowrap; } .engine-best-full { display: none; } .engine-best-short { display: inline; } .engine-fast .engine-meta { margin-left: 0; flex-basis: 100%; } }



/* Inline offers above the uploader (free-level change, unfinished order). */
.offer-banner { display: grid; gap: 10px; padding: 18px; border-color: color-mix(in oklch, var(--color-accent) 35%, var(--color-border)); }
.offer-banner .vfy-kicker { justify-self: start; margin: 0; }
.offer-banner-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.offer-banner-lead { margin: 0; color: var(--color-text-muted); font-size: 13px; line-height: 1.6; }
.offer-banner-promo { margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in oklch, var(--color-accent) 14%, transparent); color: var(--color-accent); font-size: 13px; font-weight: 600; }
.offer-banner .pay-btn-primary { box-shadow: 0 1px 0 #ffffff33 inset, 0 6px 16px -6px var(--color-accent); }
.offer-banner .cta-price { margin: 0; text-align: center; font-size: 12px; color: var(--color-text-subtle); }
.offer-banner-later { justify-self: center; }

/* ---------- Verify 99k popup ---------- */
dialog.vfy-sheet { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; margin: auto; padding: 32px 24px 20px;
  border-radius: 20px; color: var(--color-text); text-align: center;
  /* Accent glow from the top lifts the sheet off the dimmed page without a second accent color. */
  background: radial-gradient(120% 60% at 50% 0%, oklch(80% 0.15 165 / 0.22), transparent 70%), var(--color-surface-raised);
  border: 1px solid oklch(80% 0.15 165 / 0.35);
  box-shadow: 0 0 0 1px oklch(5% 0.01 255 / 0.6), 0 0 48px oklch(80% 0.15 165 / 0.16), 0 32px 80px oklch(3% 0.01 255 / 0.7); }
dialog.vfy-sheet[open] { display: grid; gap: 16px; animation: vfy-in 220ms var(--ease-out-strong); }
dialog.vfy-sheet::backdrop { background: oklch(6% 0.01 255 / 0.82); backdrop-filter: blur(6px); animation: vfy-fade 220ms var(--ease-out-strong); }
dialog.vfy-sheet.is-closing { animation: vfy-out 150ms var(--ease-out-strong) forwards; }
dialog.vfy-sheet.is-closing::backdrop { animation: vfy-fade 150ms var(--ease-out-strong) reverse forwards; }
.vfy-close { position: absolute; top: 8px; right: 8px; }
.vfy-badge { justify-self: center; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px;
  color: var(--color-on-accent); background: linear-gradient(180deg, oklch(86% 0.15 165), var(--color-accent));
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.35), 0 8px 24px oklch(80% 0.15 165 / 0.35); }
.vfy-badge svg { width: 32px; height: 32px; }
.vfy-kicker { justify-self: center; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 12px 5px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--color-accent); background: oklch(80% 0.15 165 / 0.12); border: 1px solid oklch(80% 0.15 165 / 0.3); }
.vfy-kicker svg { width: 16px; height: 16px; }
/* The price is the hook: one oversized figure, everything else steps back. */
.vfy-hero { display: grid; gap: 2px; margin: 0; font-weight: 600; }
.vfy-hero-pre { font-size: 15px; color: var(--color-text-muted); }
.vfy-price { font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; padding: 4px 0 6px;
  background: linear-gradient(180deg, oklch(92% 0.12 165), var(--color-accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 20px oklch(80% 0.15 165 / 0.35)); }
.vfy-price small { font-size: .5em; margin-left: 2px; letter-spacing: 0; }
.vfy-hero-post { font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--color-text); text-wrap: balance; }
.vfy-actions .pay-btn-primary { box-shadow: 0 8px 24px oklch(80% 0.15 165 / 0.3), inset 0 1px 0 oklch(100% 0 0 / 0.3); }
.vfy-lead { margin: -6px 0 0; color: var(--color-text-muted); text-wrap: pretty; }
.vfy-steps { display: grid; gap: 0; margin: 0; padding: 4px 16px; list-style: none; counter-reset: step; text-align: left;
  border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); }
.vfy-steps li { position: relative; display: grid; gap: 2px; padding: 12px 0 12px 38px; counter-increment: step; }
.vfy-steps li + li { border-top: 1px solid var(--color-border); }
.vfy-steps li::before { content: counter(step); position: absolute; left: 0; top: 12px; display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-text); background: var(--color-surface-raised);
  border: 1px solid var(--color-border-strong); }
.vfy-steps li:last-child::before { color: var(--color-on-accent); background: var(--color-accent); border-color: transparent; }
.vfy-steps b { font-weight: 600; }
.vfy-steps span { color: var(--color-text-muted); font-size: 13px; }
.vfy-actions { display: grid; gap: 8px; }
.vfy-actions .pay-btn-ghost { border-color: transparent; }
.vfy-actions a.pay-btn { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .vfy-actions a.pay-btn-primary:hover { color: var(--color-on-accent); } }
.vfy-foot { margin: 0; font-size: 13px; color: var(--color-text-subtle); }
.vfy-foot a { color: var(--color-text-muted); text-decoration: underline; text-underline-offset: 3px; }

@keyframes vfy-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes vfy-out { to { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes vfy-fade { from { opacity: 0; } }

/* Phones: a bottom sheet the thumb can reach. */
@media (max-width: 560px) {
  dialog.vfy-sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 20px 20px 0 0; border-bottom: 0;
    padding: 24px 20px calc(16px + env(safe-area-inset-bottom)); }
  dialog.vfy-sheet[open] { animation: vfy-up 280ms var(--ease-out-strong); }
  dialog.vfy-sheet.is-closing { animation: vfy-down 200ms var(--ease-out-strong) forwards; }
  dialog.vfy-sheet::before { content: ""; justify-self: center; width: 36px; height: 4px; margin: -12px 0 -4px; border-radius: 2px; background: var(--color-border-strong); }
}
/* Short screens: keep the price and the main button in view without scrolling. */
@media (max-height: 720px) {
  dialog.vfy-sheet[open] { gap: 12px; padding-top: 24px; }
  .vfy-price { font-size: 46px; }
  .vfy-steps li { padding: 8px 0 8px 38px; }
  .vfy-steps li::before { top: 8px; }
  .vfy-steps span, .vfy-lead { display: none; }
}
@keyframes vfy-up { from { transform: translateY(100%); } }
@keyframes vfy-down { to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  dialog.vfy-sheet[open], dialog.vfy-sheet.is-closing, dialog.vfy-sheet::backdrop { animation: vfy-fade 150ms linear; }
}


/* ---------- Sales popup pieces ---------- */
/* Pain-led headline: the problem is the hero, not the price. */
.cta-title { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
.cta-title-lg { font-size: 26px; }
.cta-lead { margin: -4px 0 0; }
.cta-kicker-warn { color: oklch(84% 0.13 75); background: oklch(84% 0.13 75 / 0.12); border-color: oklch(84% 0.13 75 / 0.3); }
.cta-countdown { display: inline-flex; align-items: baseline; gap: 6px; justify-self: center; margin: -4px auto 0; font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.cta-countdown small { font-size: 12px; font-weight: 500; color: var(--color-text-muted); }
.cta-countdown.is-final { color: oklch(84% 0.13 75); }
/* The one number sits right under the button that spends it. */
.cta-price { margin: -2px 0 2px; font-size: 13px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

/* The customer's own waiting video makes "this video" concrete. */
.cta-file { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 12px; padding: 10px; text-align: left;
  border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); }
.cta-thumb { width: 56px; height: 42px; border-radius: 8px; filter: blur(1.2px) saturate(.8);
  background: linear-gradient(135deg, oklch(55% 0.12 20), oklch(40% 0.08 300) 60%, oklch(30% 0.05 255)); }
.cta-file-text { display: grid; gap: 2px; min-width: 0; }
.cta-file-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cta-file-text span { font-size: 13px; color: var(--color-text-muted); }

/* 16/11: where the customer's clip falls against the free limit. */
.cta-bar { display: grid; gap: 10px; margin: 4px 0 0; padding: 30px 14px 12px; border-radius: 12px; background: var(--color-bg); border: 1px solid var(--color-border); }
.cta-bar-track { position: relative; display: grid; grid-template-columns: 11fr 24fr; gap: 3px; height: 10px; }
.cta-bar-free { border-radius: 5px 0 0 5px; background: var(--color-border-strong); }
.cta-bar-paid { border-radius: 0 5px 5px 0; background: var(--color-accent); }
.cta-bar-pin { position: absolute; left: var(--at); top: -4px; width: 2px; height: 18px; border-radius: 1px; background: var(--color-text); }
.cta-bar-pin > span { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--color-text); }
.cta-bar-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 12px; color: var(--color-text-muted); }
.cta-bar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cta-bar-legend i { width: 8px; height: 8px; border-radius: 2px; }
.cta-bar-legend .is-free { background: var(--color-border-strong); }
.cta-bar-legend .is-paid { background: var(--color-accent); }

/* ---------- Low credits: a corner notice, never a modal ---------- */
.cta-toast { position: fixed; z-index: 50; right: 20px; bottom: 20px; display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 12px;
  width: min(440px, calc(100% - 32px)); padding: 12px 8px 12px 14px; border-radius: 16px; color: var(--color-text);
  background: var(--color-surface-raised); border: 1px solid var(--color-border-strong);
  box-shadow: 0 0 0 1px oklch(5% 0.01 255 / 0.6), 0 16px 48px oklch(3% 0.01 255 / 0.6); animation: cta-toast-in 240ms var(--ease-out-strong); }
.cta-toast[hidden] { display: none; }
.cta-toast.is-closing { animation: cta-toast-out 160ms var(--ease-out-strong) forwards; }
.cta-toast-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: oklch(84% 0.13 75); background: oklch(84% 0.13 75 / 0.12); }
.cta-toast-icon svg { width: 22px; height: 22px; }
.cta-toast-body { display: grid; gap: 1px; min-width: 0; }
.cta-toast-body b { font-weight: 600; }
.cta-toast-body span { font-size: 13px; color: var(--color-text-muted); }
.cta-toast-cta { text-decoration: none; white-space: nowrap; }
@keyframes cta-toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes cta-toast-out { to { opacity: 0; transform: translateY(8px); } }
@media (max-width: 560px) {
  .cta-toast { left: 16px; right: 16px; width: auto; bottom: calc(16px + env(safe-area-inset-bottom)); grid-template-columns: 36px 1fr auto; }
  .cta-toast-close { grid-row: 1; grid-column: 3; }
  .cta-toast-cta { grid-column: 1 / -1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .cta-toast, .cta-toast.is-closing { animation: none; } }

@media (max-height: 720px) {
  .cta-title { font-size: 20px; }
  .cta-title-lg { font-size: 23px; }
  .cta-file { padding: 8px; }
  /* The 99k sheet hides its lead on short screens; here the lead carries the pain, so it stays. */
  .cta-sheet .cta-lead { display: block; }
}
