/* Layout: phone-first single column; template pages put the creator box above the fold.
   Visual idea: a "video booth" — phone frames with a moving colour field stand in for sample clips. */
:root {
  --bg: #f4f5fa; --surface: #ffffff; --ink: #14141c; --muted: #5c5f72; --line: #e2e4ee;
  --accent: #ff2d55; --accent-ink: #ffffff; --accent-soft: #ffe3ea; --cool: #2563ff;
  --ok: #16a36a; --bad: #d92d4a;
  --f-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d14; --surface: #171722; --ink: #f2f2f7; --muted: #a0a3b8; --line: #2a2a3a;
    --accent: #ff4d6d; --accent-ink: #12020a; --accent-soft: #3a1220; --cool: #6d8dff;
    --ok: #3fd18f; --bad: #ff6b81; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--f-body); }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 800; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.narrow { max-width: 760px; }
.section { padding-block: 40px; }
.muted { color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 58ch; }
.eyebrow { font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .6em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; border-radius: 6px; }

/* header / footer */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 1.05rem var(--f-display); text-decoration: none; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: conic-gradient(from 200deg, var(--accent), var(--cool), var(--accent)); }
.nav { display: flex; gap: 18px; font-weight: 600; font-size: .95rem; overflow-x: auto; }
.nav a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding-block: 36px; font-size: .93rem; }
.foot-in { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.foot-in > :first-child { grid-column: span 2; }
.foot-links { display: flex; flex-direction: column; gap: 6px; }
.foot-links a { text-decoration: none; color: var(--muted); }
.logo { white-space: nowrap; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-in > :first-child { grid-column: 1 / -1; } .nav { gap: 14px; font-size: .9rem; } }
/* On phones keep the two links people need; the rest live in the footer. */
@media (max-width: 560px) { .nav a[href="/how-it-works"], .nav a[href="/faq"] { display: none; } }

/* buttons, pills */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 14px 24px; background: var(--accent); color: var(--accent-ink); font: 700 1rem var(--f-body); text-decoration: none; cursor: pointer; }
.btn:hover, button:hover { filter: brightness(1.06); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .8rem; }
.price { font: 800 1.6rem var(--f-display); }
.price small { font: 500 .9rem var(--f-body); color: var(--muted); }
.price.big { font-size: 3.4rem; }

/* hero */
.hero { padding-block: 36px 24px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.hero-meta span { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.hero-stack { position: relative; height: 470px; }
.hero-stack > div { position: absolute; }
.stack-0 { left: 22%; top: 0; z-index: 3; }
.stack-1 { left: 0; top: 70px; transform: rotate(-8deg); z-index: 2; }
.stack-2 { right: 0; top: 80px; transform: rotate(8deg); z-index: 1; }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-stack { height: 330px; }
  .stack-0 { left: 50%; transform: translateX(-50%); }
  .stack-1 { left: 4%; top: 50px; } .stack-2 { right: 4%; top: 60px; }
}

/* phone mockup standing in for sample clips */
.phone { --h: 330; width: 170px; aspect-ratio: 9 / 18; border-radius: 30px; padding: 8px; background: #111; box-shadow: 0 24px 50px -20px rgb(0 0 0 / .45); max-width: 100%; }
.phone-big { width: 230px; }
.phone-screen { position: relative; height: 100%; border-radius: 23px; overflow: hidden; background: hsl(var(--h) 70% 18%); }
.blob { position: absolute; inset: -30%; background: radial-gradient(circle at 30% 30%, hsl(var(--h) 95% 62%), transparent 55%), radial-gradient(circle at 70% 65%, hsl(calc(var(--h) + 60) 95% 58%), transparent 50%); animation: drift 7s ease-in-out infinite alternate; }
.figure { position: absolute; left: 50%; bottom: 14%; width: 34%; height: 46%; transform: translateX(-50%); background: rgb(255 255 255 / .9); border-radius: 46% 46% 18% 18% / 30% 30% 14% 14%; animation: bob 1.1s ease-in-out infinite alternate; }
.figure::before { content: ""; position: absolute; left: 50%; top: -30%; width: 66%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: inherit; }
.figure::after { content: ""; position: absolute; left: -38%; right: -38%; top: 16%; height: 16%; border-radius: 999px; background: inherit; transform: rotate(-14deg); }
.phone-label { position: absolute; left: 10px; right: 10px; bottom: 10px; color: #fff; font: 700 .78rem var(--f-body); text-shadow: 0 1px 4px rgb(0 0 0 / .5); }
@keyframes drift { to { transform: translate(8%, -6%) rotate(25deg); } }
@keyframes bob { to { transform: translateX(-50%) translateY(-6%) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .blob, .figure { animation: none; } }

/* cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 20px; }
.card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.card .phone { width: 96px; border-radius: 20px; padding: 5px; }
.card .phone-screen { border-radius: 16px; }
.card .phone-label { display: none; }
.card-body { min-width: 0; }
.card-body p { font-size: .93rem; margin-bottom: .6em; }
.card-cta { font-weight: 700; color: var(--accent); font-size: .93rem; }
.card:hover { border-color: var(--accent); }

/* creator box */
.creator { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-top: 20px; box-shadow: 0 10px 30px -18px rgb(20 20 40 / .35); }
.creator-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.mini-steps { margin: 0 0 12px; padding-left: 20px; font-weight: 600; }
.waitlist { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.waitlist .form-msg { grid-column: 1 / -1; }
input, select, textarea { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 500 1rem var(--f-body); }
.form-msg { margin: 4px 0 0; font-weight: 600; font-size: .93rem; min-height: 1.2em; }
.form-msg.ok { color: var(--ok); } .form-msg.err { color: var(--bad); }
@media (max-width: 480px) { .waitlist { grid-template-columns: 1fr; } }

/* template page */
.crumbs { display: flex; gap: 8px; padding-top: 18px; font-size: .9rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.t-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; padding-block: 18px 12px; }
.t-visual { display: flex; justify-content: center; padding-top: 12px; }
.quick { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.quick span { font-size: .8rem; color: var(--muted); font-weight: 600; }
/* Phones: the creator box matters more than the mockup, so the mockup goes away. */
@media (max-width: 860px) { .t-hero { grid-template-columns: 1fr; } .t-visual { display: none; } }
.prose { max-width: 68ch; font-size: 1.05rem; }
.beats { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.beats li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-weight: 600; display: flex; gap: 12px; align-items: flex-start; }
.beat-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.steps { padding-left: 22px; display: grid; gap: 10px; }
.checks, .crosses { list-style: none; padding: 0; display: grid; gap: 8px; }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 10px; }
.crosses li::before { content: "✕"; color: var(--bad); font-weight: 800; margin-right: 10px; }

/* faq */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
details p { color: var(--muted); }

/* pricing, legal, forms */
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 6px; margin-bottom: 24px; }
.legal h2 { font-size: 1.25rem; margin-top: 1.4em; }
.report { display: grid; gap: 10px; max-width: 520px; }
.report label { font-weight: 600; }
.report button { justify-self: start; }

/* searchable home: search box + filter chips over the template grid */
.hero-search { padding-block: 34px 8px; }
.hero-search h1 { max-width: 14ch; }
.search { margin-top: 18px; max-width: 720px; display: grid; gap: 12px; }
.search input { padding: 16px 18px; font-size: 1.05rem; border-radius: 16px; background: var(--surface); box-shadow: 0 10px 30px -20px rgb(20 20 40 / .4); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.badge { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.badge-hot { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-new { background: color-mix(in srgb, var(--cool) 14%, transparent); color: var(--cool); border-color: transparent; }
.badge:empty { display: none; }
.card[hidden] { display: none; }
.empty { padding: 12px 0; }

/* template page: intro + mockup on the left, this template's uploader on the right (first on phones) */
.t-hero { grid-template-columns: .9fr 1.1fr; }
.t-intro .t-visual { justify-content: flex-start; padding-top: 18px; }
.t-make { display: grid; gap: 14px; }
.uploader { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: grid; gap: 14px; box-shadow: 0 18px 40px -26px rgb(20 20 40 / .5); }
.uploader-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 1.05rem; }
.drops { display: grid; gap: 10px; }
.drops-2 { grid-template-columns: 1fr 1fr; }
.drop { position: relative; display: grid; place-items: center; min-height: 200px; border: 2px dashed var(--line); border-radius: 16px; background: var(--bg); cursor: pointer; overflow: hidden; text-align: center; }
.drops-1 .drop { min-height: 240px; }
.drop:hover, .drop:focus-within { border-color: var(--accent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-empty { display: grid; gap: 4px; justify-items: center; padding: 16px; pointer-events: none; }
.drop-plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 800 1.6rem/1 var(--f-display); margin-bottom: 4px; }
.drop-empty small { color: var(--muted); }
.drop-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.drop-change { position: absolute; right: 8px; bottom: 8px; background: rgb(0 0 0 / .65); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.drop.has-img .drop-empty { visibility: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.consent input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.create { width: 100%; padding: 16px; font-size: 1.05rem; }
.create:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.uploader-note { font-size: .85rem; margin: 0; }
.uploader .form-msg:empty { display: none; }
.soon { background: var(--accent-soft); border-radius: 18px; padding: 16px; }
.soon p { margin-bottom: 10px; }
@media (max-width: 860px) {
  .t-hero { grid-template-columns: 1fr; gap: 16px; }
  .t-intro .t-visual { display: none; }
  .drop { min-height: 170px; }
  .drops-1 .drop { min-height: 200px; }
}

/* ---------- shared sections: pricing tiers, timeline, uses, closing ---------- */
.tiers { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 8px; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 4px; align-content: start; }
.tier-pop { border: 2px solid var(--accent); box-shadow: 0 16px 34px -24px var(--accent); }
.tier-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tier-pop .tier-label { color: var(--accent); }
.tier-n { font-size: 1.05rem; }
.tiers-note { font-size: .9rem; margin-top: 10px; }
.timeline { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.timeline li { padding: 16px; display: grid; gap: 6px; border-right: 1px solid var(--line); position: relative; }
.timeline li:last-child { border-right: 0; }
.tl-time { font: 800 .85rem var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.tl-text { font-weight: 600; }
.uses { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.uses li { padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.closing { text-align: center; padding-block: 48px; }
.closing .muted { margin-bottom: 18px; }
@media (max-width: 700px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline li { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: 64px 1fr; align-items: baseline; }
  .timeline li:last-child { border-bottom: 0; }
}

/* ---------- layout: stage (centered headline, wide uploader) ---------- */
.stage-hero { text-align: center; padding-block: 28px 8px; }
.stage-hero h1 { max-width: 18ch; margin-inline: auto; }
.stage-hero .lede { margin-inline: auto; }
.stage-make { max-width: 640px; margin: 22px auto 0; text-align: left; }
.stage-make .drops-1 .drop { min-height: 300px; }
.stage-make .drops-2 .drop { min-height: 260px; }

/* ---------- layout: story (timeline beside the mockup, then the uploader) ---------- */
.story-hero { padding-block: 26px 0; }
.story-grid { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; padding-block: 18px; }
.story-line .timeline { grid-template-columns: 1fr; }
.story-line .timeline li { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: 72px 1fr; align-items: baseline; }
.story-line .timeline li:last-child { border-bottom: 0; }
.story-make { max-width: 640px; display: grid; gap: 14px; }
@media (max-width: 860px) { .story-grid { grid-template-columns: 1fr; } .story-grid .t-visual { display: none; } }

/* ---------- themes (site.json "theme"); "pop" is the default token set at the top ---------- */
[data-preset="night"] {
  --bg: #0f1020; --surface: #181a30; --ink: #f3f1ea; --muted: #a7a8c4; --line: #2b2d4a;
  --accent: #ff8a3d; --accent-ink: #1a0d02; --accent-soft: #3a2414; --cool: #8fa2ff;
  --f-display: "Unbounded", "Manrope", system-ui, sans-serif; --f-body: "Manrope", system-ui, sans-serif;
  color-scheme: dark;
}
[data-preset="night"] h1 { font-weight: 800; letter-spacing: -0.02em; }
[data-preset="night"] .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
[data-preset="mint"] {
  --bg: #eef4f1; --surface: #ffffff; --ink: #0f2a22; --muted: #4f665e; --line: #d3e2db;
  --accent: #e8590c; --accent-ink: #ffffff; --accent-soft: #fde6d8; --cool: #0f766e;
  --f-display: "Fraunces", Georgia, serif; --f-body: "DM Sans", system-ui, sans-serif; --r: 10px;
}
@media (prefers-color-scheme: dark) {
  [data-preset="mint"] { --bg: #0c1b16; --surface: #12251e; --ink: #e7f3ee; --muted: #9db6ac; --line: #22392f; --accent: #ff7a2e; --accent-ink: #1b0b00; --accent-soft: #3b2010; --cool: #5eead4; color-scheme: dark; }
}
[data-preset="mint"] h1, [data-preset="mint"] h2 { font-weight: 900; letter-spacing: -0.015em; }
[data-preset="mint"] .btn, [data-preset="mint"] button { border-radius: 10px; }
[data-preset="mint"] .uploader, [data-preset="mint"] .drop { border-radius: 10px; }

/* original meme video: cover first, player on press */
.ref { margin: 0; display: grid; gap: 8px; }
.ref-play { position: relative; display: block; width: 100%; padding: 0; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 16 / 9; cursor: pointer; }
.ref-x .ref-play { aspect-ratio: 4 / 5; }
.ref-play img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.ref-icon { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; background: rgb(0 0 0 / .6); box-shadow: 0 0 0 3px rgb(255 255 255 / .85) inset; }
.ref-icon::after { content: ""; position: absolute; left: 26px; top: 20px; border-left: 18px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.ref-tag { position: absolute; left: 10px; top: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .75rem; padding: 3px 10px; border-radius: 999px; }
.ref figcaption { font-size: .85rem; color: var(--muted); }
.ref figcaption a { color: var(--accent); font-weight: 600; }
.ref iframe { width: 100%; border: 0; border-radius: var(--r); background: #000; aspect-ratio: 16 / 9; display: block; }
.ref .twitter-tweet { margin: 0 !important; }
.card-thumb { position: relative; width: 120px; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #000; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb .ref-icon { width: 38px; height: 38px; }
.card-thumb .ref-icon::after { left: 15px; top: 11px; border-left-width: 12px; border-top-width: 8px; border-bottom-width: 8px; }

/* booth layout: intro + video on the left, uploader on the right; phones: intro, uploader, video */
.t-hero { grid-template-areas: "intro make" "ref make"; grid-template-rows: auto 1fr; }
.t-intro { grid-area: intro; } .t-make { grid-area: make; } .t-ref { grid-area: ref; align-self: start; }
@media (max-width: 860px) { .t-hero { grid-template-areas: "intro" "make" "ref"; grid-template-rows: none; } }
.stage-ref { max-width: 640px; margin: 18px auto 0; text-align: left; }
.story-ref { width: min(420px, 100%); }
@media (max-width: 860px) { .story-grid .story-ref { display: block; } }

/* self-hosted template preview */
.ref-box { position: relative; border-radius: var(--r); overflow: hidden; background: #000; display: flex; justify-content: center; }
.ref-box video { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: #000; }
.ref-sound { position: absolute; right: 10px; bottom: 10px; padding: 7px 14px; font-size: .85rem; background: rgb(0 0 0 / .65); color: #fff; }
.ref-sound[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.card-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- theme: meme (paper, thick black outlines, hard shadows, Impact-style captions). Always light. ---------- */
[data-preset="meme"] {
  --bg: #fffbea; --surface: #ffffff; --ink: #111111; --muted: #4b4b4b; --line: #111111;
  --accent: #ff2e63; --accent-ink: #ffffff; --accent-soft: #ffe1ea; --cool: #2b5cff; --pop: #ffe234;
  --ok: #0f9d58; --bad: #d4183d;
  --f-display: "Anton", Impact, "Arial Narrow Bold", sans-serif; --f-body: "Archivo", system-ui, sans-serif;
  --r: 14px; --bd: 3px solid var(--line); --sh: 5px 5px 0 var(--line);
  color-scheme: light;
}
[data-preset="meme"] h1, [data-preset="meme"] h2 { font-weight: 400; letter-spacing: .01em; text-transform: uppercase; line-height: 1; }
[data-preset="meme"] h3 { font-family: var(--f-body); font-weight: 800; }
[data-preset="meme"] .eyebrow { color: var(--ink); }
[data-preset="meme"] .lede { color: var(--ink); }
[data-preset="meme"] .top { background: var(--pop); border-bottom: var(--bd); backdrop-filter: none; }
[data-preset="meme"] .logo { font: 400 1.35rem var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
[data-preset="meme"] .logo-mark { background: var(--accent); border: 3px solid var(--line); border-radius: 50%; }
[data-preset="meme"] .nav a { color: var(--ink); font-weight: 700; }
[data-preset="meme"] .nav a:hover { text-decoration: underline 3px; text-underline-offset: 4px; }
[data-preset="meme"] .btn, [data-preset="meme"] button { border: var(--bd); border-radius: 12px; box-shadow: 3px 3px 0 var(--line); font-weight: 800; transition: transform .08s, box-shadow .08s; }
[data-preset="meme"] .btn:hover, [data-preset="meme"] button:not(:disabled):hover { filter: none; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--line); }
[data-preset="meme"] .btn:active, [data-preset="meme"] button:not(:disabled):active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--line); }
[data-preset="meme"] input, [data-preset="meme"] select, [data-preset="meme"] textarea { border: var(--bd); border-radius: 12px; background: var(--surface); }
[data-preset="meme"] details, [data-preset="meme"] .tier, [data-preset="meme"] .quick li, [data-preset="meme"] .timeline, [data-preset="meme"] .uses li, [data-preset="meme"] .price-card { border: var(--bd); box-shadow: var(--sh); }
[data-preset="meme"] .timeline li { border-color: var(--line); border-width: 0 3px 0 0; }
[data-preset="meme"] .timeline li:last-child { border-right: 0; }
[data-preset="meme"] .tl-time { font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; color: var(--accent); }
[data-preset="meme"] .tier-pop { background: var(--pop); }
[data-preset="meme"] .tier-pop .tier-label { color: var(--ink); }
[data-preset="meme"] .price { font-weight: 400; }
[data-preset="meme"] details { margin-bottom: 12px; }
[data-preset="meme"] .foot { border-top: var(--bd); background: var(--surface); }
[data-preset="meme"] .crumbs { color: var(--ink); font-weight: 600; }
[data-preset="meme"] .soon { background: var(--pop); border: var(--bd); box-shadow: var(--sh); }
@media (max-width: 700px) {
  [data-preset="meme"] .timeline li { border-width: 0 0 3px 0; }
  [data-preset="meme"] .timeline li:last-child { border-bottom: 0; }
}

/* meme caption: white Impact-style letters with a black outline, like a classic meme */
.cap { font: 400 clamp(1.1rem, 2.4vw, 1.5rem)/1.05 var(--f-display); text-transform: uppercase; color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 2px 2px 0 #000; letter-spacing: .02em; text-wrap: balance; }
.sticker { display: inline-block; background: var(--pop); color: var(--ink); border: 3px solid var(--line); border-radius: 8px; padding: 2px 8px; font: 400 .95rem/1.2 var(--f-display); letter-spacing: .04em; transform: rotate(-4deg); box-shadow: 2px 2px 0 var(--line); }
.sticker-new { background: #8ff0c6; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--pop, #fff); font: 400 1rem/1 var(--f-display); flex: none; }

/* home hero: headline + the one box that does the job */
.m-hero { padding-block: 34px 26px; text-align: center; }
.m-title { font-size: clamp(2.6rem, 8vw, 5.2rem); margin-bottom: .25em; }
.m-hero .lede { margin-inline: auto; font-size: 1.15rem; font-weight: 500; }
.hl { background: var(--pop); border: 3px solid var(--line); padding: 0 .18em; display: inline-block; transform: rotate(-2deg); box-shadow: 4px 4px 0 var(--line); }
[data-preset="meme"] .uploader { border: var(--bd); box-shadow: 8px 8px 0 var(--line); border-radius: 20px; }
.studio { max-width: 920px; margin: 24px auto 0; text-align: left; padding: 20px; gap: 18px; }
.pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.pick legend, .studio-label { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; margin: 0 0 10px; padding: 0; }
.pick-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 6px 8px 2px; scroll-snap-type: x mandatory; }
.pick-item { position: relative; flex: 0 0 auto; width: 150px; display: grid; gap: 6px; cursor: pointer; scroll-snap-align: start; }
.pick-item input { position: absolute; opacity: 0; pointer-events: none; }
.pick-thumb { display: block; aspect-ratio: 4 / 3; border: 3px solid var(--line); border-radius: 12px; overflow: hidden; background: #000; transition: transform .1s, box-shadow .1s; }
.pick-thumb img, .pick-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-meta { font-size: .8rem; color: var(--muted, #6b6858); margin-top: -4px; }
/* Home studio: the picked meme's clip on the left, its own uploader on the right */
.studio { border: var(--bd, 3px solid #111); box-shadow: 8px 8px 0 var(--line); border-radius: 20px; background: var(--card, #fff); display: grid; }
.studio-panel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.studio-panel[hidden] { display: none; }
.studio-preview { display: grid; gap: 8px; }
.studio-preview .ref { margin: 0; }
.studio-more { font-weight: 700; font-size: .92rem; }
.studio .uploader { border: 0; box-shadow: none; padding: 0; background: none; }
@media (max-width: 760px) { .studio-panel { grid-template-columns: 1fr; } .studio-preview video { max-height: 52vh; } }
.pick-name { font-weight: 800; font-size: .92rem; line-height: 1.2; }
.pick-item input:checked + .pick-thumb { box-shadow: 0 0 0 4px var(--pop), 0 0 0 7px var(--line); transform: rotate(-2deg); }
.pick-item input:focus-visible + .pick-thumb { outline: 3px solid var(--cool); outline-offset: 6px; }
.studio-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.studio-go { display: grid; gap: 12px; }
.studio .drops-1 .drop, .studio .drop { min-height: 200px; }
[data-preset="meme"] .drop { border: 3px dashed var(--line); background: var(--bg); }
[data-preset="meme"] .drop:hover, [data-preset="meme"] .drop:focus-within { background: var(--pop); border-style: solid; }
[data-preset="meme"] .drop-plus { width: 52px; height: 52px; background: var(--accent); border: 3px solid var(--line); font: 800 2rem/1 var(--f-body); box-shadow: 3px 3px 0 var(--line); }
[data-preset="meme"] .create { background: var(--accent); font: 400 1.35rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; padding: 18px; }
[data-preset="meme"] .create:disabled { opacity: 1; background: #d9d6c8; color: #6b6858; box-shadow: none; }
.m-hero .soon { max-width: 920px; margin: 22px auto 0; text-align: left; }
@media (max-width: 760px) {
  .studio { padding: 14px; }
  .studio-row { grid-template-columns: 1fr; }
  .pick-item { width: 128px; }
  .studio .drop { min-height: 170px; }
}

/* scrolling meme-name strip */
.ticker { background: var(--ink); color: var(--pop); border-block: 3px solid var(--line); overflow: hidden; white-space: nowrap; }
.ticker-in { display: inline-flex; gap: 0; animation: tick 28s linear infinite; padding-block: 10px; }
.ticker span { font: 400 1.25rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .04em; padding-inline: 18px; }
.ticker span::after { content: "★"; margin-left: 36px; color: var(--accent); }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-in { animation: none; } }

/* meme wall */
.grid-head .search { margin: 0; max-width: 300px; width: 100%; }
.grid-head .search input { padding: 11px 14px; font-size: 1rem; box-shadow: 3px 3px 0 var(--line); }
@media (max-width: 600px) { .grid-head { flex-direction: column; align-items: stretch; } .grid-head .search { max-width: none; } }
.mgrid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.mcard { display: grid; grid-template-columns: none; gap: 0; padding: 0; overflow: hidden; border: var(--bd); border-radius: 18px; box-shadow: var(--sh); background: var(--surface); transition: transform .1s, box-shadow .1s; }
.mcard:hover { transform: translate(-2px, -2px) rotate(-.6deg); box-shadow: 8px 8px 0 var(--line); border-color: var(--line); }
.mcard-clip { position: relative; aspect-ratio: 3 / 4; background: #000; border-bottom: var(--bd); overflow: hidden; }
.mcard-clip video, .mcard-clip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mcard-clip .phone { width: 100%; height: 100%; border-radius: 0; padding: 0; aspect-ratio: auto; }
.mcard-clip .cap-top { position: absolute; left: 10px; right: 10px; top: 12px; text-align: center; }
.mcard-clip .sticker { position: absolute; right: 10px; bottom: 12px; }
.mcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.mcard-meta { font-weight: 700; font-size: .88rem; }
.mcard-btn { background: var(--ink); color: #fff; font-weight: 800; font-size: .9rem; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.mcard:hover .mcard-btn { background: var(--accent); }

/* three steps as stickers */
.m-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.m-steps li { border: var(--bd); border-radius: 16px; box-shadow: var(--sh); background: var(--surface); padding: 18px; display: grid; gap: 6px; }
.m-steps li:nth-child(2) { background: var(--pop); transform: rotate(-1deg); }
.m-steps strong { font: 400 1.5rem/1.05 var(--f-display); text-transform: uppercase; }
@media (max-width: 760px) { .m-steps { grid-template-columns: 1fr; } .m-steps li:nth-child(2) { transform: none; } }

/* meme template page: tall clip left, headline + uploader right; phones: headline, uploader, clip */
.m-t-hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-areas: "ref intro" "ref make"; grid-template-rows: auto 1fr; gap: 10px 36px; align-items: start; padding-block: 16px 20px; }
.m-t-hero .t-intro { grid-area: intro; } .m-t-hero .t-make { grid-area: make; display: grid; gap: 14px; } .m-t-hero .t-ref { grid-area: ref; position: sticky; top: 84px; }
.m-t-hero .m-title { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.sticker-line { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 14px; }
[data-preset="meme"] .ref-box { border: var(--bd); box-shadow: var(--sh); border-radius: 18px; }
[data-preset="meme"] .ref-box video { max-height: 78vh; }
[data-preset="meme"] .ref-tag { background: var(--pop); color: var(--ink); border: 3px solid var(--line); border-radius: 8px; font: 400 .95rem/1.2 var(--f-display); letter-spacing: .04em; text-transform: uppercase; transform: rotate(-3deg); }
[data-preset="meme"] .ref-sound { border: 3px solid #fff; box-shadow: none; }
[data-preset="meme"] .ref figcaption { color: var(--ink); }
[data-preset="meme"] .ref figcaption a { color: var(--ink); text-decoration: underline 2px; }
[data-preset="meme"] .uploader-head strong { font: 400 1.4rem/1.05 var(--f-display); text-transform: uppercase; }
@media (max-width: 860px) {
  .m-t-hero { grid-template-columns: 1fr; grid-template-areas: "intro" "make" "ref"; grid-template-rows: none; }
  .m-t-hero .t-ref { position: static; }
  [data-preset="meme"] .ref-box video { max-height: 70vh; }
}

/* ---------- pay sheet: the price appears here, after photo + Create. Bottom sheet on phones, card on desktop. ---------- */
.uploader-tag { font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.paysheet { text-align: left; width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px 20px; background: var(--surface); color: var(--ink); }
.paysheet::backdrop { background: rgb(10 10 20 / .55); }
.paysheet[open] { animation: ps-in .18s ease-out; }
@keyframes ps-in { from { transform: translateY(16px); opacity: 0; } }
.ps-close { position: absolute; right: 12px; top: 10px; width: 36px; height: 36px; padding: 0; border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 1.4rem; line-height: 1; }
.ps-head { display: flex; gap: 14px; align-items: center; margin: 0 36px 16px 0; }
.ps-photo { flex: none; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: var(--bg); }
.ps-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-photo:has(img[hidden]) { display: none; }
.ps-kicker { margin: 0 0 2px; font-weight: 700; font-size: .85rem; color: var(--accent); }
.ps-head h2 { font-size: 1.4rem; margin: 0; }
.ps-tiers { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.ps-tier { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.ps-tier input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.ps-tier-main { display: grid; gap: 2px; }
.ps-tier-main small { color: var(--muted); font-size: .83rem; }
.ps-tier-price { font: 800 1.2rem var(--f-display); }
.ps-tier:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ps-badge { position: absolute; top: -10px; right: 12px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--surface); }
.ps-points { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.ps-points li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 8px; }
.ps-go { width: 100%; padding: 16px; font-size: 1.05rem; }
.ps-soon p { margin-bottom: 12px; }
@media (max-width: 600px) {
  .paysheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 22px 22px 0 0; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .paysheet[open] { animation-name: ps-up; }
  @keyframes ps-up { from { transform: translateY(40px); } }
}
@media (prefers-reduced-motion: reduce) { .paysheet[open] { animation: none; } }
[data-preset="meme"] .uploader-tag { border: 2px solid var(--line); background: var(--pop); }
[data-preset="meme"] .paysheet { border: var(--bd); box-shadow: 8px 8px 0 var(--line); }
[data-preset="meme"] .ps-close { box-shadow: none; border-width: 2px; }
[data-preset="meme"] .ps-photo { border: 3px solid var(--line); transform: rotate(-3deg); }
[data-preset="meme"] .ps-kicker { color: var(--ink); background: var(--pop); display: inline-block; padding: 0 6px; border: 2px solid var(--line); border-radius: 6px; }
[data-preset="meme"] .ps-head h2 { font-size: 1.7rem; }
[data-preset="meme"] .ps-tier { border: 3px solid var(--line); box-shadow: 3px 3px 0 var(--line); }
[data-preset="meme"] .ps-tier:has(input:checked) { background: var(--pop); }
[data-preset="meme"] .ps-tier-price { font-weight: 400; font-size: 1.45rem; }
[data-preset="meme"] .ps-badge { background: var(--accent); color: #fff; border: 2px solid var(--line); border-radius: 6px; transform: rotate(2deg); }
[data-preset="meme"] .ps-go { background: var(--accent); font: 400 1.35rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; padding: 18px; }
@media (max-width: 600px) { [data-preset="meme"] .paysheet { box-shadow: 0 -4px 0 var(--line); border-width: 3px 0 0; } }

/* ---------- order page: status, progress bar, finished video ---------- */
.order .m-title { font-size: clamp(2rem, 6vw, 3.2rem); }
.order-wait { margin: 18px 0; }
.order-bar { height: 16px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); overflow: hidden; margin-bottom: 10px; }
.order-bar span { display: block; height: 100%; width: 3%; background: var(--accent); transition: width 1s linear; }
.order-done { display: grid; gap: 14px; justify-items: start; margin: 18px 0; }
.order-done video { width: min(420px, 100%); max-height: 75vh; border-radius: var(--r); background: #000; display: block; }
.order-keep a { word-break: break-all; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px currentColor; }
.acct-progress { margin: 0 0 22px; }
.acct-progress h2, .acct-h { font-size: 1.15rem; margin: 0 0 10px; }
.acct-busy { display: grid; gap: 8px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.acct-new { box-shadow: 0 0 0 3px var(--pop); }
.ps-cost { margin: 10px 0 0; font-size: .92rem; }
.order-dls { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.ps-secure { font-size: .82rem; text-align: center; margin: 10px 0 0; }
[data-preset="meme"] .order-bar { border: 3px solid var(--line); box-shadow: 3px 3px 0 var(--line); }
[data-preset="meme"] .order-done video { border: var(--bd); box-shadow: var(--sh); }

/* ---------- account and admin ---------- */
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; font-family: Roboto, Arial, sans-serif; font-weight: 500; }
.acct-google { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; }
.login { display: grid; grid-template-columns: 1fr auto; gap: 8px; max-width: 560px; margin-bottom: 14px; }
.login .form-msg { grid-column: 1 / -1; }
@media (max-width: 520px) { .login { grid-template-columns: 1fr; } }
.acct-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 16px 0; }
.acct-item { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.acct-item video, .acct-ph { width: 100%; aspect-ratio: 9 / 16; max-height: 360px; object-fit: contain; background: #000; border-radius: 10px; }
.acct-ph { display: grid; place-items: center; color: #fff; font-weight: 700; text-align: center; padding: 12px; }
.acct-meta { display: grid; gap: 4px; font-size: .92rem; }
.acct-links { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.acct-links .btn { padding: 8px 14px; font-size: .9rem; }
[data-preset="meme"] .acct-item { border: var(--bd); box-shadow: var(--sh); }
.admin-bar { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-bar select { width: auto; padding: 8px 10px; margin-left: 6px; }
.admin-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 18px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; }
.admin-card span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.admin-card strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.admin h2 { font-size: 1.15rem; margin-top: 22px; }
.admin-scroll { overflow-x: auto; }
.admin table { width: 100%; border-collapse: collapse; font-size: .86rem; background: var(--surface); }
.admin th, .admin td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin td:last-child { white-space: normal; min-width: 220px; }
.admin th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
[data-preset="meme"] .admin-card, [data-preset="meme"] .admin table { border: 2px solid var(--line); }

/* Admin host: the site's nav and footer links do not exist there. */
[data-page-type="admin"] .nav, [data-page-type="admin"] .foot { display: none; }

/* My videos as a dashboard: title left; credit balance and account menu top right; credit history in a dialog */
.acct-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.acct-top .m-title { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); }
.acct-tools { display: flex; align-items: center; gap: 10px; }
.acct-cr { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: var(--pop); color: var(--ink); border: 2px solid var(--line); font-weight: 800; font-size: .95rem; box-shadow: 3px 3px 0 var(--line); }
.acct-cr-ico { font-size: 1rem; }
.acct-menu { position: relative; }
.acct-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--line); font-weight: 800; }
.acct-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; display: grid; gap: 2px; padding: 10px; background: var(--surface, #fff); border: 2px solid var(--line); border-radius: 12px; box-shadow: 4px 4px 0 var(--line); }
.acct-pop a, .acct-pop button { display: block; text-align: left; padding: 8px 10px; border-radius: 8px; background: none; color: var(--ink); font: 600 .95rem var(--f-body); text-decoration: none; border: 0; box-shadow: none; }
.acct-pop a:hover, .acct-pop button:hover { background: var(--bg); filter: none; }
.acct-who { margin: 0 0 6px; padding: 4px 10px 10px; border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent); font-size: .85rem; color: var(--muted); word-break: break-all; }
.acct-empty { text-align: center; padding: 40px 0; }
.acct-dlg { width: min(460px, calc(100vw - 32px)); border: 3px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 8px 8px 0 var(--line); background: var(--surface, #fff); color: var(--ink); }
.acct-dlg::backdrop { background: rgb(0 0 0 / .45); }
.acct-dlg h2 { margin: 0 0 6px; }
.acct-dlg h3 { margin: 16px 0 6px; font-size: 1rem; }
.acct-dlg-x { position: absolute; top: 10px; right: 10px; }
.acct-bal { font-size: 1.1rem; margin: 0 0 8px; }
.acct-bal strong { font-size: 2.2rem; }
.acct-ledger { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
.acct-ledger li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); font-size: .92rem; }
.acct-ledger li span:first-child { display: grid; gap: 2px; }
.cr-plus { color: #13844a; font-weight: 800; }
.cr-minus { font-weight: 800; }
.acct-dlg-go { display: flex; gap: 14px; align-items: center; margin: 16px 0 0; }

.test-badge { margin-left: 8px; padding: 2px 7px; border-radius: 6px; background: #111; color: #fff; font: 800 .7rem/1.4 var(--f-body); letter-spacing: .06em; vertical-align: middle; }
.ad-tag { display: inline-block; padding: 1px 6px; border-radius: 6px; background: #eee; color: #555; font-size: .75rem; }
.admin-bar { align-items: center; }
.admin-bar label { white-space: nowrap; }
.ad-test { display: inline-flex; align-items: center; gap: 6px; }
.ad-test input { width: auto; margin: 0; }

/* Header right: Log in, or My videos + credit balance + account menu (signed in) */
.top-in { gap: 18px; }
.top-acct { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.top-acct > a[data-account] { font-weight: 700; color: var(--ink); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.top-credits { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--surface, #fff); border: 2px solid var(--line); color: var(--ink); font-weight: 800; font-size: .9rem; text-decoration: none; white-space: nowrap; box-shadow: 2px 2px 0 var(--line); }
.top-menu, [data-preset="meme"] .top-menu { position: relative; background: none; border: 0; box-shadow: none; padding: 0; margin: 0; border-radius: 0; }
.top-menu summary { padding: 0; }
.top-menu summary { list-style: none; cursor: pointer; display: block; }
.top-menu summary::-webkit-details-marker { display: none; }
.top-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--line); font-weight: 800; font-size: .95rem; }
.top-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 230px; display: grid; gap: 2px; padding: 10px; background: var(--surface, #fff); border: 2px solid var(--line); border-radius: 12px; box-shadow: 4px 4px 0 var(--line); }
.top-pop a, .top-pop button { display: block; text-align: left; padding: 8px 10px; border-radius: 8px; background: none; color: var(--ink); font: 600 .95rem var(--f-body); text-decoration: none; border: 0; box-shadow: none; }
.top-pop a:hover, .top-pop button:hover { background: var(--bg); filter: none; }
.top-who { margin: 0 0 6px; padding: 4px 10px 10px; border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent); font-size: .85rem; color: var(--muted); word-break: break-all; }
@media (max-width: 640px) {
  /* Phones: the header keeps the logo, the balance and the avatar; the page links live in the footer and the account menu. */
  .top-in .nav { display: none; }
  .top-acct.in > a[data-account] { display: none; }
  .top-credits { padding: 5px 9px; font-size: .82rem; }
  .top-cr-l { display: none; }
}

.tier-buy { margin-top: 10px; width: 100%; }
.acct-buy { display: grid; gap: 8px; }
.acct-buy .tier-buy { margin: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--surface, #fff); color: var(--ink); border: 2px solid var(--line); border-radius: 10px; box-shadow: 2px 2px 0 var(--line); font: 600 .95rem var(--f-body); }
.acct-added { padding: 8px 12px; border-radius: 10px; background: #e6f6ec; color: #13844a; font-weight: 700; }

/* ---------- shared: character cards, pay-sheet expectations, cross-site links, guides ---------- */
.nav-out::after { content: " \2197"; font-size: .85em; }
.drop-role { position: absolute; left: 8px; top: 8px; z-index: 1; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); pointer-events: none; }
.drop-optional .drop-role { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.cast { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.cast-card { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 10px 6px; border: 1px dashed var(--line); border-radius: 12px; font-size: .82rem; color: var(--muted); }
.cast-card strong { color: var(--ink); font-size: .9rem; }
.cast-ai { font: 800 .66rem/1 var(--f-body); letter-spacing: .08em; padding: 3px 6px; border-radius: 6px; background: var(--ink); color: var(--surface); margin-bottom: 2px; }
.consent a { color: var(--accent); font-weight: 700; }
.ps-expect { background: var(--bg); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; }
.ps-expect-h { margin: 0 0 4px; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ps-expect .ps-points { margin: 0; font-weight: 500; }
.sat-link { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.sat-link a { color: var(--accent); font-weight: 800; }
.grid-head > a { font-weight: 700; color: var(--accent); white-space: nowrap; }
.also-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-top: 16px; }
.also-card { display: grid; gap: 4px; text-decoration: none; align-content: start; }
.also-card img, .also-ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r); background: var(--line); display: block; margin-bottom: 4px; }
.also-card .muted { font-size: .85rem; }
.also-card:hover strong { color: var(--accent); }
.guide-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.guide-list a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; }
.guide-list a:hover { border-color: var(--accent); }
.guide-list .muted { font-size: .92rem; }
.guide { font-size: 1.06rem; }
.guide h1 { font-size: clamp(2rem, 5vw, 3rem); }
.guide h2 { margin-top: 1.6em; }
.guide h3 { margin-top: 1.3em; }
.guide ul, .guide ol { padding-left: 1.3em; display: grid; gap: 6px; margin: 0 0 1em; }
.guide a { color: var(--accent); font-weight: 600; }
.guide blockquote { margin: 0 0 1em; padding: 4px 16px; border-left: 4px solid var(--accent); color: var(--muted); }
.guide code { font-size: .9em; background: var(--bg); padding: 1px 5px; border-radius: 5px; }
.guide hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.guide-date { font-size: .9rem; }
.table-scroll { overflow-x: auto; margin: 0 0 1.2em; }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); }
.table-scroll th, .table-scroll td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table-scroll th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.guide-cta { margin: 2em 0; padding: 20px; border-radius: var(--r); background: var(--accent-soft); display: grid; gap: 6px; justify-items: start; }
.guide-cta strong { font: 400 1.4rem/1.15 var(--f-display); }
.guide-cta p { margin: 0 0 8px; }
.guide-cta .btn { color: var(--accent-ink); }
[data-preset="meme"] .cast-card { border: 2px dashed var(--line); color: var(--ink); }
[data-preset="meme"] .drop-role { border: 2px solid var(--line); }
[data-preset="meme"] .ps-expect { border: 2px solid var(--line); background: var(--surface); }
[data-preset="meme"] .sat-link { border: 3px solid var(--line); box-shadow: 3px 3px 0 var(--line); background: var(--pop); }
[data-preset="meme"] .sat-link a, [data-preset="meme"] .grid-head > a { color: var(--ink); text-decoration: underline 2px; }
[data-preset="meme"] .also-card img, [data-preset="meme"] .guide-list a, [data-preset="meme"] .guide-cta { border: var(--bd); box-shadow: var(--sh); }
[data-preset="meme"] .guide-cta { background: var(--pop); }
[data-preset="meme"] .guide a { color: var(--ink); text-decoration: underline 2px; }

/* ---------- theme: desk (Tiny Desk-style satellite): warm office wall, wooden shelf of records and books, burnt orange ---------- */
[data-preset="desk"] {
  --bg: #f6eee1; --surface: #fffaf2; --ink: #2a1d13; --muted: #6b5644; --line: #e2d2bb;
  --accent: #c2410c; --accent-ink: #ffffff; --accent-soft: #fbe3d2; --cool: #3f6212; --pop: #f2c14e;
  --wood: #9a6a40; --wood-dark: #5b3a1f; --ok: #3f7d20; --bad: #b42318;
  --f-display: "Young Serif", Georgia, serif; --f-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --r: 16px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  [data-preset="desk"] { --bg: #17110c; --surface: #221910; --ink: #f5e9d8; --muted: #c4ae95; --line: #3d2d1f; --accent: #f07a3a; --accent-ink: #1b0c03; --accent-soft: #3c2214; --cool: #a7c56f; --pop: #e9b949; --wood: #7a5232; --wood-dark: #3d2715; --ok: #8fcf6a; --bad: #ff8a7a; color-scheme: dark; }
}
[data-preset="desk"] h1, [data-preset="desk"] h2 { font-weight: 400; letter-spacing: -0.015em; }
[data-preset="desk"] h3 { font-family: var(--f-body); font-weight: 700; }
[data-preset="desk"] .top { background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 4px solid var(--wood); }
[data-preset="desk"] .logo { font: 400 1.12rem var(--f-display); letter-spacing: -0.01em; }
[data-preset="desk"] .logo-mark { width: 24px; height: 24px; border-radius: 5px; background: linear-gradient(90deg, var(--accent) 0 28%, var(--pop) 28% 50%, var(--cool) 50% 74%, var(--wood-dark) 74%); box-shadow: 0 3px 0 var(--wood); }
[data-preset="desk"] .nav a { color: var(--ink); }
[data-preset="desk"] .nav a:hover { color: var(--accent); }
[data-preset="desk"] .btn, [data-preset="desk"] button { border-radius: 12px; box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, #000); }
[data-preset="desk"] .btn:active, [data-preset="desk"] button:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000); }
[data-preset="desk"] .ref-sound, [data-preset="desk"] .ps-close, [data-preset="desk"] .top-pop button, [data-preset="desk"] .acct-buy .tier-buy { box-shadow: none; }
[data-preset="desk"] .top-credits { box-shadow: none; border-width: 1px; }
[data-preset="desk"] .top-pop { box-shadow: 0 18px 40px -20px rgb(60 35 15 / .45); border-width: 1px; }
[data-preset="desk"] .uploader { border-radius: 20px; box-shadow: 0 30px 60px -36px rgb(91 58 31 / .6); position: relative; }
/* A strip of tape on the uploader, like a setlist taped to the desk. */
[data-preset="desk"] .d-make .uploader::before { content: ""; position: absolute; top: -11px; left: 50%; width: 92px; height: 22px; transform: translateX(-50%) rotate(-2deg); background: color-mix(in srgb, var(--pop) 70%, transparent); border-radius: 3px; }
[data-preset="desk"] .uploader-head strong { font: 400 1.35rem/1.15 var(--f-display); }
[data-preset="desk"] .uploader-tag { background: var(--accent-soft); color: var(--accent); border: 0; }
[data-preset="desk"] .drop { border: 2px dashed color-mix(in srgb, var(--wood) 45%, var(--line)); background: var(--bg); }
[data-preset="desk"] .drop:hover, [data-preset="desk"] .drop:focus-within { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
[data-preset="desk"] .create { font-size: 1.12rem; }
[data-preset="desk"] .create:disabled { opacity: 1; background: var(--line); color: var(--muted); box-shadow: none; }
[data-preset="desk"] .cast-card { background: color-mix(in srgb, var(--bg) 70%, transparent); }
[data-preset="desk"] details { border-radius: 12px; }
[data-preset="desk"] summary { font-weight: 600; }
[data-preset="desk"] .tier-pop { border-color: var(--accent); background: var(--accent-soft); }
[data-preset="desk"] .price, [data-preset="desk"] .ps-tier-price { font-weight: 400; }
[data-preset="desk"] .tl-time { font-family: var(--f-body); font-weight: 800; }
[data-preset="desk"] .foot { border-top: 4px solid var(--wood); background: color-mix(in srgb, var(--wood) 8%, var(--bg)); }
[data-preset="desk"] .ref-tag { background: var(--pop); color: #2a1d13; }

/* ---------- layout: desk (one-meme studio): headline and uploader left, the clip in a wooden frame right; a shelf underneath ---------- */
.d-hero { position: relative; padding-top: 30px; overflow: hidden; background: radial-gradient(60% 70% at 12% 0%, color-mix(in srgb, var(--pop) 22%, transparent), transparent 70%); }
.d-hero-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-areas: "intro ref" "make ref"; grid-template-rows: auto 1fr; gap: 14px 44px; align-items: start; }
.d-intro { grid-area: intro; } .d-make { grid-area: make; padding-top: 8px; } .d-ref { grid-area: ref; }
.d-hero-in > * { min-width: 0; }
.d-kicker { font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .7em; }
.d-intro h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); margin-bottom: .3em; }
.d-intro .lede { color: var(--ink); opacity: .85; }
.d-facts { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.d-facts li { padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.d-ref .ref-box { border: 10px solid var(--wood-dark, #3d2715); border-radius: 20px; box-shadow: 0 26px 50px -30px rgb(40 22 8 / .8); }
.d-ref .ref-box video { max-height: 74vh; }
.shelf { height: 70px; margin-top: 34px;
  background:
    linear-gradient(var(--wood, #9a6a40), var(--wood-dark, #5b3a1f)) bottom / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 40px, #b5532a 40px 56px, #2f4f6f 56px 70px, #e3c48f 70px 90px, transparent 90px 96px, #6d7f3a 96px 110px, #8c2f39 110px 124px, transparent 124px 200px, #d98b3a 200px 214px, #3d3a5c 214px 232px, #c9b38c 232px 246px, transparent 246px 300px) left 0 bottom 12px / 100% 46px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 140px, #7a3b2e 140px 152px, #e0a33a 152px 166px, transparent 166px 260px, #355c4a 260px 274px, transparent 274px 300px) left 0 bottom 12px / 100% 56px no-repeat; }
#how, #pricing, #faq, #make { scroll-margin-top: 76px; }
@media (max-width: 860px) {
  .d-hero-in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "make" "ref"; grid-template-rows: none; gap: 14px; }
  .uploader-head { flex-wrap: wrap; }
  .d-hero { padding-top: 18px; }
  .d-ref .ref-box { border-width: 7px; }
  .d-ref .ref-box video { max-height: 70vh; }
}
.badges-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 24px; font-size: .85rem; }
.badges-zone img { display: block; max-width: 200px; height: auto; }
.drop:has(.drop-role) .drop-empty { padding-top: 34px; }
