/* One stylesheet for the marketing pages (server-rendered) and the app (React). */
:root {
  /* Mint & Cobalt */
  --bg: #DCF2E6;        /* soft mint page */
  --bg-2: #CBEBDA;      /* deeper mint for glows and tints */
  --panel: #FFFFFF;
  --panel-2: #F1F9F5;   /* inputs, drop zones, placeholders */
  --line: #B5DCC8;
  --fg: #10302A;        /* forest ink */
  --muted: #4A6B62;
  --accent: #2448FF;    /* cobalt: buttons, links, logo */
  --accent-ink: #FFFFFF;
  --pop: #FF8C42;       /* tangerine: tiny highlights only */
  --good: #1F8A5B;
  --danger: #C8372D;
  --shadow: 16 48 42;   /* rgb triplet for forest-tinted shadows */
  --radius: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { overflow-x: clip; }
::selection { background: var(--accent); color: var(--accent-ink); }
body { font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
img { max-width: 100%; }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.12; font-weight: 800; }

.page { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }

/* ---- header ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--fg); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none; }
.logo i { width: 4px; height: 11px; border-radius: 2px; background: var(--accent-ink); display: block; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 14.5px; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a.is-on { color: var(--fg); text-decoration: none; }
@media (max-width: 640px) { .hide-sm { display: none; } .nav { gap: 12px; } .nav a { white-space: nowrap; } }
/* In the app header on small phones, the logo alone identifies the brand. */
@media (max-width: 420px) { .app-top .brand { font-size: 0; gap: 0; } .app-top .credits-pill { padding: 5px 10px; } }

/* ---- buttons ---- */
.btn, .primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink) !important; font-weight: 650; font-size: 15px; text-decoration: none !important; }
.btn, .primary { box-shadow: 0 10px 22px -12px rgb(36 72 255 / .7); }
.btn:hover, .primary:not(:disabled):hover { transform: translateY(-1px); }
.btn-ghost { background: var(--panel); color: var(--fg) !important; box-shadow: 0 0 0 1.5px var(--line) inset; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn.is-disabled { opacity: 0.6; cursor: default; filter: none; }
.primary { width: 100%; margin-top: 18px; padding: 13px 16px; font-size: 15.5px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); }

/* ---- marketing ---- */
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section h1 { font-size: clamp(30px, 4vw, 40px); margin: 0 0 10px; }
.section h2 { font-size: clamp(24px, 3vw, 30px); margin: 0 0 10px; }
.section-lede { color: var(--muted); margin: 0 0 28px; max-width: 640px; }
.narrow-top { border-top: 0; padding-top: 24px; }

.examples { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.examples img { border-radius: 16px; aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; background: var(--panel-2); }
@media (max-width: 860px) { .examples { grid-template-columns: repeat(3, 1fr); } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps span { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: var(--panel-2); color: var(--accent); font-weight: 700; font-size: 14px; }
.steps h3 { margin: 12px 0 6px; font-size: 16px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.plan.is-featured { border-color: var(--accent); }
.plan h3 { margin: 0; font-size: 17px; }
.price { font-size: 34px; font-weight: 700; margin: 10px 0 0; letter-spacing: -0.02em; }
.per { color: var(--accent); margin: 2px 0 10px; font-size: 14px; }
.blurb { color: var(--muted); margin: 0 0 20px; flex: 1; }
.badge { position: absolute; top: -11px; right: 16px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.free-banner { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--good); padding: 14px 16px; border-radius: 12px; margin: 0 0 24px; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--muted); margin: 10px 0 0; max-width: 760px; }

.cta-band { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 20px; margin-top: 24px; }
.cta-band h2 { margin: 0 0 18px; font-size: 26px; }

.legal { max-width: 760px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; }
.legal p, .legal li { color: #23443D; }

.foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; text-align: center; }
.foot-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.foot-links a { color: var(--muted); }
.fine { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }

/* ---- app shell ---- */
.credits-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; color: var(--fg); white-space: nowrap; }
.credits-pill b { color: var(--accent); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; box-shadow: 0 1px 0 rgb(var(--shadow) / .04), 0 12px 30px -24px rgb(var(--shadow) / .35); }
.panel h1 { font-size: 24px; margin: 0 0 6px; }
.layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }
.center-card { max-width: 420px; margin: 40px auto; }
.notice { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 16px; font-size: 14px; }
.notice.good { border-left: 3px solid var(--good); }
.notice.warn { border-left: 3px solid var(--accent); }

.drop { display: flex; align-items: center; justify-content: center; position: relative; min-height: 210px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--panel-2); cursor: pointer; overflow: hidden; transition: border-color .15s; margin-top: 18px; }
.drop:hover, .drop.is-drag { border-color: var(--accent); }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 24px; color: var(--muted); }
.drop-empty strong { color: var(--fg); font-size: 16px; }
.hint { font-size: 12.5px; margin-top: 6px; }
.drop.has-file img { width: 100%; max-height: 300px; object-fit: contain; display: block; }
.drop-change { position: absolute; bottom: 10px; right: 10px; background: rgb(var(--shadow) / .78); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; }

.field { border: 0; padding: 0; margin: 20px 0 0; display: block; }
.field legend, .label { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: block; padding: 0; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatch { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13.5px; text-align: left; }
.swatch span { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgb(var(--shadow) / .2); flex: none; }
.swatch.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.text { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); font: inherit; }
.text:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.error { color: var(--danger); margin: 14px 0 0; font-size: 14px; }

.result { display: flex; align-items: center; justify-content: center; min-height: 420px; }
.placeholder { text-align: center; color: var(--muted); }
.ghost { width: 120px; height: 120px; border-radius: 50%; background: var(--panel-2); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; gap: 20px; }
.ghost i { width: 10px; height: 26px; border-radius: 6px; background: var(--line); display: block; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.done { width: 100%; max-width: 420px; }
.avatar-holder { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--panel-2); display: flex; align-items: center; justify-content: center; }
.avatar-holder canvas { width: 100%; height: 100%; display: block; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 14px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.segmented button { border: 0; background: transparent; padding: 8px 6px; border-radius: 9px; font-size: 13.5px; color: var(--muted); }
.segmented button.is-on { background: var(--panel); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }

.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.thumb { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel-2); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12.5px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.is-on { border-color: var(--accent); }
.thumb .tag { position: absolute; left: 8px; bottom: 8px; background: rgb(var(--shadow) / .75); color: #fff; padding: 2px 8px; border-radius: 999px; }

.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ledger td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--good); }
.danger-zone { border-color: #F2C4BE; }
.btn-danger { background: var(--danger); color: #fff !important; }
.stack > * + * { margin-top: 20px; }

.try-again { margin-top: 16px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.chip:hover:not(:disabled) { border-color: var(--accent); }

/* ---- SEO pages ---- */
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 18px; }
.crumbs a { color: var(--muted); }
.landing-hero { max-width: 760px; padding: 8px 0 28px; }
.landing-hero h1 { font-size: clamp(32px, 4.5vw, 46px); margin: 0 0 14px; }
.landing-hero p { color: var(--muted); max-width: 680px; }
.examples-3 { grid-template-columns: repeat(3, 1fr); max-width: 760px; margin-bottom: 12px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose p, .prose li { color: #23443D; }
.prose ul, .howto { padding-left: 20px; }
.prose li, .howto li { margin: 6px 0; }
.related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.related li a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font-size: 14px; }
.related li a:hover { border-color: var(--accent); text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--fg); }
.card:hover { border-color: var(--accent); text-decoration: none; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; border-radius: 16px; display: block; }
.gallery figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.foot-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; text-align: left; margin-bottom: 28px; }
@media (max-width: 900px) { .foot-cols { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .foot-cols { grid-template-columns: repeat(2, 1fr); } }
.foot-cols h4 { color: var(--fg); font-size: 13px; margin: 0 0 10px; }
.foot-cols a { display: block; color: var(--muted); font-size: 13.5px; margin: 6px 0; }

.buy-list { margin-top: 12px; }
.buy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.buy-row.is-featured strong { color: var(--accent); }

/* ===================== Motion =====================
   Rules: animate transform/opacity only; the first frame is already the finished layout ("frame 0 is the
   poster"); every motion has one job; everything is static for prefers-reduced-motion. */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* Logo eyes */
.logo i { transform-origin: 50% 50%; }

/* Example tiles and cards: lift on hover */
.examples img, .gallery img, .card, .plan, .steps li { transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .2s; }
.examples img:hover, .gallery img:hover { transform: translateY(-6px) rotate(-1.5deg) scale(1.03); box-shadow: 0 18px 40px -12px rgb(var(--shadow) / .35); }
.examples img:nth-child(even):hover, .gallery figure:nth-child(even) img:hover { transform: translateY(-6px) rotate(1.5deg) scale(1.03); }
.card:hover, .plan:hover, .steps li:hover { transform: translateY(-4px); }
.btn, .primary, .chip, .swatch, .segmented button { transition: transform .18s var(--ease-out), filter .18s, background-color .2s, border-color .2s, box-shadow .2s; }
.btn:active, .primary:not(:disabled):active, .chip:active, .swatch:active { transform: scale(.97); }

/* App: "drawing" loader (blinking capsule eyes) and avatar pop-in */
.ghost.drawing { position: relative; }
.ghost.drawing::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--accent); opacity: .0; }

@media (prefers-reduced-motion: no-preference) {
  /* Scroll reveal (only when JS is running, so content is never hidden without it) */
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: var(--delay, 0ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  .logo i { animation: blink 5.5s ease-in-out infinite; }
  .ghost.drawing i { animation: blink 2.6s ease-in-out infinite; }
  .ghost.drawing::after { animation: ring 1.8s var(--ease-out) infinite; }
  .ghost.drawing { animation: bob 2.6s ease-in-out infinite; }
  .avatar-holder canvas[style*="block"] { animation: pop .6s var(--ease-spring) both; }

  .plan.is-featured { animation: glow 3.5s ease-in-out infinite; }
  .badge { animation: badge-bob 3.5s ease-in-out infinite; }
}

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes ring { 0% { opacity: .55; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(36,72,255,0); } 50% { box-shadow: 0 0 0 6px rgba(36,72,255,.14); } }
@keyframes badge-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* Loader eyes need to read clearly against the ghost face */
.ghost.drawing i { background: var(--fg); opacity: .85; }

/* ===================== Hero: centered copy, avatars floating on both sides =====================
   One orchestrated moment: avatars fly in from the edges once, then drift on their own rhythms and
   follow the pointer at different depths. */
.hero { position: relative; margin-inline: calc(50% - 50vw); min-height: 660px; display: grid; place-items: center; padding: 56px 20px 120px; isolation: isolate; overflow: hidden; --mx: 0; --my: 0; }
.hero::before { content: ""; position: absolute; inset: -10% 0 auto; height: 110%; background: radial-gradient(55% 50% at 50% 42%, var(--bg-2), transparent 72%); z-index: -1; }
.hero-copy { text-align: center; width: min(100%, 640px); min-width: 0; position: relative; z-index: 3; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 6px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.pill b { background: var(--pop); color: #2A1405; border-radius: 999px; padding: 3px 9px; font-size: 12px; }
.hero h1 { font-size: clamp(44px, 7vw, 78px); line-height: 1.02; letter-spacing: -0.04em; margin: 0 0 18px; }
.lede { font-size: 18.5px; color: var(--muted); margin: 0 auto 28px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn { padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.hero .fine { margin-top: 14px; }

.orbit { position: absolute; inset: 48px 32px; z-index: 1; pointer-events: none; max-width: 1360px; margin: 0 auto; }
.av { position: absolute; width: var(--s); aspect-ratio: 1; left: calc((100% - var(--s)) * var(--x)); top: calc((100% - var(--s)) * var(--y)); pointer-events: auto;
  transform: translate3d(calc(var(--mx) * var(--d)), calc(var(--my) * var(--d)), 0); transition: transform .9s cubic-bezier(.23, 1, .32, 1); }
.av .float { width: 100%; height: 100%; }
.av img { width: 100%; height: 100%; display: block; border-radius: 26%; transform: rotate(var(--r)); box-shadow: 0 24px 44px -18px rgb(var(--shadow) / .5), 0 0 0 4px var(--panel); transition: transform .35s cubic-bezier(.23, 1, .32, 1); }
.av .tag { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); background: var(--panel); color: var(--fg); font-size: 11.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .av:hover img { transform: rotate(0deg) scale(1.06); } }
/* --x/--y are fractions of the free space (0 = left/top edge, 1 = right/bottom edge). --d is parallax depth. */
.l1 { --x: .02; --y: .02; --s: 132px; --r: -9deg; --d: 16px; --t: 6.5s; --delay: 0s;    --in: .15s; }
.l2 { --x: .12; --y: .5;  --s: 168px; --r: 5deg;  --d: 22px; --t: 7.5s; --delay: -2s;   --in: .3s; }
.l3 { --x: .01; --y: .98; --s: 112px; --r: -4deg; --d: 12px; --t: 5.8s; --delay: -1s;   --in: .45s; }
.r1 { --x: .97; --y: 0;   --s: 150px; --r: 8deg;  --d: 20px; --t: 7s;   --delay: -3s;   --in: .2s; }
.r2 { --x: .87; --y: .52; --s: 124px; --r: -6deg; --d: 14px; --t: 6.2s; --delay: -1.5s; --in: .35s; }
.r3 { --x: .99; --y: .96; --s: 140px; --r: 4deg;  --d: 18px; --t: 8s;   --delay: -.5s;  --in: .5s; }

/* What you get, overlapping the bottom of the hero */
.strip { max-width: 1100px; margin: -64px auto 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; position: relative; z-index: 4; }
.strip div { background: var(--panel); border-radius: 18px; padding: 18px; box-shadow: 0 0 0 1px var(--line), 0 16px 32px -24px rgb(var(--shadow) / .4); }
.strip b { display: block; font-size: 15px; margin-bottom: 4px; }
.strip span { color: var(--muted); font-size: 13.5px; }

@media (max-width: 900px) {
  .hero { min-height: 0; padding: 200px 16px 190px; }
  .orbit { inset: 28px 14px; }
  .l1 { --x: 0;   --y: .02; --s: 92px; }  .l2 { --x: .5; --y: 0;   --s: 104px; } .r1 { --x: 1;  --y: .03; --s: 96px; }
  .l3 { --x: 0;   --y: .97; --s: 88px; }  .r2 { --x: .5; --y: 1;   --s: 92px; }  .r3 { --x: 1;  --y: .96; --s: 96px; }
  .strip { grid-template-columns: 1fr 1fr; margin-top: 0; }
  .lede { font-size: 16.5px; }
  .hero-cta .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .8s cubic-bezier(.22, 1, .36, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .05s; } .hero-copy > :nth-child(3) { animation-delay: .1s; }
  .hero-copy > :nth-child(4) { animation-delay: .15s; } .hero-copy > :nth-child(5) { animation-delay: .2s; }
  .av { animation: fly-l .9s cubic-bezier(.22, 1, .36, 1) var(--in) backwards; }
  .av.r { animation-name: fly-r; }
  .av .float { animation: drift var(--t) ease-in-out var(--delay) infinite alternate; }
}
@keyframes drift { from { transform: translateY(-9px) rotate(-1.2deg); } to { transform: translateY(9px) rotate(1.2deg); } }
@keyframes fly-l { from { opacity: 0; transform: translate3d(-120px, 20px, 0) scale(.92); } }
@keyframes fly-r { from { opacity: 0; transform: translate3d(120px, 20px, 0) scale(.92); } }

/* ===== Hero CTA: a tiny bot face with blinking eyes, a "Free" chip, an occasional sheen ===== */
.btn-hero { position: relative; overflow: hidden; gap: 12px; padding: 12px 18px 12px 12px !important; font-size: 17px !important; border-radius: 16px !important;
  box-shadow: 0 16px 32px -14px rgb(36 72 255 / .85), inset 0 -2px 0 rgb(0 0 0 / .14); transition: transform .2s cubic-bezier(.23, 1, .32, 1), box-shadow .25s; }
.btn-face { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none; }
.btn-face i { width: 4.5px; height: 12px; border-radius: 3px; background: var(--accent); display: block; transition: translate .25s cubic-bezier(.23, 1, .32, 1); }
.btn-free { background: var(--pop); color: #2A1405; font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 4px 9px; border-radius: 999px; }
.btn-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .38) 50%, transparent 65%); transform: translateX(-130%); pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-hero:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -14px rgb(36 72 255 / .95), inset 0 -2px 0 rgb(0 0 0 / .14); }
  .btn-hero:hover .btn-face i { translate: 3px 0; }
}
.btn-hero:active { transform: scale(.97); }
@media (prefers-reduced-motion: no-preference) {
  .btn-face i { animation: blink 4.2s ease-in-out 1.6s infinite; }
  .btn-hero::after { animation: sheen 7s ease-in-out 2.5s infinite; }
}
@keyframes sheen { 0%, 78% { transform: translateX(-130%); } 92%, 100% { transform: translateX(130%); } }
@media (max-width: 900px) { .btn-hero { justify-content: center; } }

/* ===== Admin dashboard (owner only) ===== */
.admin h1 { font-size: 26px; margin: 0 0 4px; }
.admin h2 { font-size: 16px; margin: 0 0 12px; }
.admin > * + * { margin-top: 20px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-row h2 { margin: 0; }
.admin-range { grid-template-columns: repeat(4, auto); margin: 0; }
.admin-metric { grid-template-columns: repeat(3, auto); margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi b { font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi-warn { border-color: var(--danger); }
.kpi-warn b { color: var(--danger); }
.bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 120px; align-items: end; }
.bar { height: 100%; display: flex; align-items: flex-end; }
.bar i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.bar:hover i { opacity: 1; }
.bars-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 6px; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 104px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.feed-main { min-width: 0; overflow-wrap: anywhere; }
.feed-detail { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.feed time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.kind { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-align: center; white-space: nowrap; }
.k-blue { background: #E3E9FF; color: #1834C8; }
.k-green { background: #DDF3E7; color: #17704A; }
.k-red { background: #FBE3E1; color: #A42B22; }
.k-orange { background: #FFE9D9; color: #9A4A12; }
.k-gray { background: var(--panel-2); color: var(--muted); }
.admin-search, .adjust input { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font: inherit; color: var(--fg); }
.admin-search { margin-bottom: 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.admin-table td.pos { color: var(--good); font-weight: 700; }
.adjust { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.adjust label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.adjust-note { grid-column: 1 / -1; }
.adjust .btn { grid-column: 1 / -1; justify-self: start; }
.admin-gens { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.admin-gens figure { margin: 0; font-size: 12px; color: var(--muted); }
.admin-gens img, .gen-ph { width: 100%; aspect-ratio: 1; border-radius: 12px; display: block; background: var(--panel-2); object-fit: cover; }
.gen-ph { display: flex; align-items: center; justify-content: center; font-size: 12px; }
.gen-ph.is-failed { background: #FBE3E1; color: #A42B22; }
.admin-gens figcaption { margin-top: 4px; }
@media (max-width: 900px) {
  .admin-cols { grid-template-columns: 1fr; }
  .admin-range { grid-template-columns: repeat(4, 1fr); width: 100%; }
  .feed li { grid-template-columns: 1fr auto; }
  .feed .kind { grid-column: 1 / -1; justify-self: start; }
}
