/* JEJE GREETING CARDS: black and yellow, set in STUDIO (the studio face) with CHARLIE for big headlines.
 * Flat and square: no tilted or dancing cards, no rounded cards, no eyebrow labels, no text shadows. */

@font-face { font-family: 'Charlie'; src: url('/assets/brand/CHARLIE-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Charlie'; src: url('/assets/brand/CHARLIE-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Charlie'; src: url('/assets/brand/CHARLIE-Black.otf') format('opentype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Charlie Outline'; src: url('/assets/brand/CHARLIE-Outline.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'Studio'; src: url('/assets/brand/STUDIO-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Studio'; src: url('/assets/brand/STUDIO-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Studio'; src: url('/assets/brand/STUDIO-Black.otf') format('opentype'); font-weight: 900; font-display: swap; }

:root {
  --black: #080808; --black2: #161616; --green: #3ccc60; --green2: #3bdc68; --pink: #ff35c8; --pink2: #ff55d0;
  --white: #fffceb; --muted: #d8d4bf;
  --maxw: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* hidden always wins over a layout display rule */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--black); color: var(--white);
  font-family: 'Studio', 'Helvetica Neue', Arial, sans-serif; font-weight: 400; font-size: 19px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, canvas { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- grain */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  animation: grainshift 700ms steps(1) infinite;
}
@keyframes grainshift {
  0% { background-position: 0 0 } 20% { background-position: -34px 22px }
  40% { background-position: 26px -31px } 60% { background-position: -22px -18px }
  80% { background-position: 31px 12px } 100% { background-position: 0 0 }
}

/* ------------------------------------------------------- the boiled frame */
.boilframe { position: absolute; inset: 0; z-index: 27; pointer-events: none; }
.boilframe svg { width: 100%; height: 100%; overflow: visible; display: block; }
.boilframe path { fill: none; stroke: var(--green); stroke-width: 5; stroke-linejoin: round; opacity: 0; animation: boilcut .36s steps(1) infinite; }
.boilframe path:nth-child(2) { animation-delay: -.12s; }
.boilframe path:nth-child(3) { animation-delay: -.24s; }
.boilframe.ink path { stroke: var(--black); }
.boilframe.thin path { stroke-width: 3.5; }
@keyframes boilcut { 0%, 33.33% { opacity: 1 } 33.34%, 100% { opacity: 0 } }
.boil-text { animation: tboil .42s steps(1) infinite; }
@keyframes tboil { 0% { filter: url(#tboil1) } 33% { filter: url(#tboil2) } 66% { filter: url(#tboil3) } }

@media (prefers-reduced-motion: reduce) {
  .grain, .boil-text, .marquee div, .scroll-cue { animation: none !important; }
  .boilframe path { animation: none; opacity: 0; }
  .boilframe path:first-child { opacity: 1; }
}

/* ---------------------------------------------------------------- layout */
.wrap { width: min(var(--maxw), 90vw); margin: 0 auto; }
h1, h2, h3 { font-family: 'Charlie', 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; margin: 0; line-height: .95; color: var(--green); }
.lead { max-width: 780px; margin: 0 auto; text-align: center; }
.lead h2 { font-size: clamp(2.3rem, 6.4vw, 4.6rem); display: inline-flex; align-items: center; gap: .3em; }
.lead p { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--white); margin: 1rem auto 0; max-width: 46ch; }
.num {
  display: inline-grid; place-items: center; width: 1.15em; height: 1.15em;
  background: var(--green); color: var(--black); font-size: .7em; flex: none;
}

/* ------------------------------------------------------------------ nav */
.nav { position: sticky; top: 0; z-index: 200; background: var(--green); border-bottom: 4px solid var(--black); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 62px; }
.nav a { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; color: var(--black); text-decoration: none; white-space: nowrap; }
/* on the green bar the highlight shows as bright green on a black chip */
.nav a:not(.brand):hover { background: var(--black); color: var(--green2); box-shadow: 0 0 0 6px var(--black); }
.nav .brand { margin-right: auto; display: flex; align-items: center; gap: 12px; }
.nav .brand img { height: 48px; width: auto; display: block; }
.nav .brand span { font-size: 18px; }
@media (max-width: 520px) { .nav .brand img { height: 36px; } .nav .brand span { font-size: 14px; } .nav .wrap { gap: 14px; } }

/* ----------------------------------------------------------------- bands */
.band { padding: clamp(64px, 9vh, 110px) 0; position: relative; overflow: hidden; }
.band.yellow { background: var(--green); color: var(--black); }
.band.yellow h1, .band.yellow h2, .band.yellow h3 { color: var(--black); }
.band.yellow .lead p { color: var(--black); }
.band.yellow .num { background: var(--black); color: var(--green); }
.band-inner { position: relative; z-index: 2; }
/* hero: the reel fills the background; it stops short of the fold so the next section peeks in */
.hero { position: relative; min-height: 76svh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: 70px 0 64px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; background: #000; }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: rgba(13, 13, 13, .58); }
.hero-in { position: relative; z-index: 2; }
.scroll-cue { position: absolute; left: 50%; bottom: 12px; z-index: 3; color: var(--green); transform: translateX(-50%); animation: cue 1.6s ease-in-out infinite; line-height: 0; }
@keyframes cue { 0%, 100% { transform: translate(-50%, 0) } 50% { transform: translate(-50%, 7px) } }
.hero h1 { font-size: clamp(2.6rem, 9vw, 6.4rem); max-width: 12ch; margin: 0 auto; }
.hero h1 .hot { color: var(--pink); display: block; }
.hero p { font-size: clamp(1.15rem, 2.4vw, 1.45rem); max-width: 34ch; margin: 1.2rem auto 0; }

/* --------------------------------------------------------------- marquee */
.marquee { overflow: hidden; background: var(--green); color: var(--black); border-top: 4px solid var(--black); border-bottom: 4px solid var(--black); }
.marquee div { display: inline-block; white-space: nowrap; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 22px; padding: 12px 0; animation: slide 30s linear infinite; }
.marquee span { padding: 0 22px; }
@keyframes slide { from { transform: translateX(0) } to { transform: translateX(-50%) } }

/* ------------------------------------------------------------------- cta */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; text-decoration: none;
  background: var(--green); color: var(--black); font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: .02em;
  font-size: clamp(1.05rem, 2.3vw, 1.3rem); padding: .75em 1.6em; border: 3px solid var(--black);
  transition: background .15s ease, color .15s ease;
}
.cta:hover { background: var(--green2); border-color: var(--green2); }
.cta.dark:hover { background: var(--black); color: var(--green2); }
.cta.ghost:hover { background: transparent; color: var(--pink2); border-color: var(--pink2); }
.cta.dark { background: var(--black); color: var(--green); border-color: var(--black); }
.cta.ghost { background: transparent; color: var(--pink); border-color: var(--pink); }
.cta.red { background: var(--pink); color: var(--white); border-color: var(--black); }
.cta:disabled { opacity: .5; cursor: progress; transform: none; }
.cta[hidden] { display: none; }
.btnrow { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 2rem; }

/* ----------------------------------------------------------- the library */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 1.6rem; }
.chip { cursor: pointer; background: transparent; color: var(--green); border: 3px solid var(--green); padding: .4em 1em; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 1rem; }
.chip.on { background: var(--green); color: var(--black); }
.chip:hover { background: var(--green2); border-color: var(--green2); color: var(--black); }
.group { margin-top: clamp(40px, 6vw, 70px); }
.group h3 { font-size: clamp(1.8rem, 4.4vw, 3rem); text-align: center; }
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); margin-top: clamp(22px, 3vw, 34px); }
@media (max-width: 980px) { .shelf { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .shelf { grid-template-columns: 1fr; } }
.tile {
  position: relative; display: block; text-align: left; padding: 0; cursor: pointer; color: var(--black);
  background: var(--green); border: 4px solid var(--green); overflow: hidden; transition: border-color .15s ease;
}
.tile:hover, .tile:focus-visible { border-color: var(--green2); }
.tile.on { border-color: var(--pink); }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tile.tall img { object-fit: contain; background: var(--black2); }
.tile h4 { margin: 0; padding: 12px 16px 14px; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1; }
.pin { position: absolute; top: 0; right: 0; z-index: 3; font-weight: 900; text-transform: uppercase; font-size: 15px; background: var(--pink); color: var(--white); padding: 6px 14px; }
.tile:not(.on) .pin { display: none; }

/* ---------------------------------------------------------------- faces */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; cursor: pointer;
  max-width: 640px; margin: 2.2rem auto 0; padding: 40px 22px; border: 4px solid var(--black);
}
.dropzone.over { background: rgba(0, 0, 0, .08); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone small { max-width: 40ch; font-size: 1.05rem; }
.status { min-height: 1.5em; margin: 1rem auto 0; text-align: center; font-size: 1.1rem; }
.status.bad { color: var(--pink); }
.band.yellow .status.bad { color: #b3000c; }
.pool-head { display: flex; align-items: baseline; justify-content: center; gap: 18px; margin-top: 1.6rem; }
.pool-head span { font-weight: 900; text-transform: uppercase; font-size: 1.15rem; }
.link { background: none; border: none; cursor: pointer; color: inherit; font-weight: 900; text-transform: uppercase; font-size: 1rem; border-bottom: 3px solid currentColor; padding: 0 0 2px; }
.pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 1rem; }
.face, .pick canvas, .slot-face { border-radius: 50%; background: var(--pink); border: 4px solid var(--black); }
.face { width: 70px; height: 70px; }
.cast { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 2.4vw, 28px); margin-top: 2.2rem; }
.slot { position: relative; width: 196px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 16px 20px; border: 4px solid var(--black); }
.slot-label { font-weight: 900; text-transform: uppercase; font-size: 1.15rem; }
.slot-face { width: 112px; height: 112px; }
.slot-big { position: relative; padding: 0; border: none; background: none; cursor: pointer; }
.slot-big:disabled { cursor: default; }
.slot-big .fnum { left: auto; right: 2px; top: 2px; }
.picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pick { position: relative; padding: 0; border: none; background: none; cursor: pointer; }
.pick canvas { width: 54px; height: 54px; border-width: 3px; }
.pick.on canvas { border-color: var(--pink); border-width: 5px; }
.pick:hover canvas { border-color: var(--green2); }
.fnum { position: absolute; left: -4px; top: -4px; min-width: 22px; height: 22px; padding: 0 4px; display: grid; place-items: center;
  background: var(--black); color: var(--green); font-family: 'Studio', sans-serif; font-weight: 900; font-size: .8rem; line-height: 1; }
.slot-links { display: flex; gap: 14px; }
.cast-bar { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 2rem; text-align: center; }
.cast-bar[hidden] { display: none; }
.cast-bar p { margin: 0; max-width: 46ch; font-size: 1.05rem; }
.cast-bar + .cast { margin-top: 1.4rem; }

/* ---------------------------------------------------------------- names */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; max-width: 720px; margin: 2.2rem auto 0; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-weight: 900; text-transform: uppercase; font-size: 1.1rem; color: var(--green); }
.fields .wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } }
input[type=text], input[type=password], input[type=email], input:not([type]), .fields textarea, .fields select {
  font-family: 'Studio', sans-serif; font-weight: 700; font-size: 1.2rem;
  border: 3px solid var(--green); padding: 12px 14px; background: var(--black2); color: var(--white); width: 100%;
}
input::placeholder { color: #8d866d; }
input:focus { outline: 4px solid var(--pink); outline-offset: 2px; }

/* ---------------------------------------------------------------- stage */
.stage { position: relative; max-width: 980px; margin: 2.4rem auto 0; }
.stage-in { position: relative; overflow: hidden; background: #000; border: 4px solid var(--green); }
.stage canvas { width: 100%; height: auto; aspect-ratio: 16 / 9; cursor: pointer; }
.bigplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: 92px; height: 92px; border: 4px solid var(--black); background: var(--green); color: var(--black);
  display: grid; place-items: center; cursor: pointer;
}
.bigplay[hidden] { display: none; }
.progress { max-width: 520px; margin: 1.4rem auto 0; height: 16px; border: 3px solid var(--green); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--green); }

/* --------------------------------------------------------------- footer */
footer.foot { background: var(--green); color: var(--black); padding: 56px 0 44px; position: relative; text-align: center; }
footer.foot img { width: min(380px, 80vw); height: auto; margin: 0 auto 1rem; }
footer.foot small { display: block; font-weight: 700; font-size: 1rem; }
footer.foot a { color: var(--black); }
#bgvideo { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- login */
.login-page { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; }
.login { position: relative; width: min(460px, 100%); padding: 46px 36px 40px; border: 4px solid var(--green); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login img { width: min(340px, 80%); height: auto; margin: 0 auto .6rem; }
.login h1 { font-size: clamp(2.4rem, 8vw, 3.4rem); }
.login p { margin: 0 0 .4rem; }
.login label { display: flex; flex-direction: column; gap: 6px; text-align: left; font-weight: 900; text-transform: uppercase; color: var(--green); }
.login .cta { margin-top: .6rem; }

/* ---------------------------------------------------------------- cutout editor */
.face-edit { position: relative; padding: 0; border: none; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: inherit; }
.face-edit span { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .8rem; background: var(--black); color: var(--green); padding: 2px 8px; }
.slot .link { font-size: .9rem; }
/* the editors are a fixed frame: the picture never scrolls away, the tools sit beside it (computer) or under it (phone),
   and Cancel / Done are always on screen */
dialog.editor { width: min(1080px, 96vw); height: min(92vh, 860px); max-width: none; max-height: none; padding: 0; border: 4px solid var(--green); background: var(--black); color: var(--white); overflow: hidden; }
dialog.editor[open] { display: flex; flex-direction: column; }
dialog.editor::backdrop { background: rgba(0, 0, 0, .8); }
.ed-top { flex: none; padding: 14px 20px 8px; }
.ed-top h3 { font-size: 1.6rem; }
.ed-top p { margin: .35rem 0 0; font-size: .98rem; }
.ed-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.ed-stage { min-height: 0; min-width: 0; padding: 8px 16px; display: grid; place-items: center; container-type: size; }
.ed-wrap { position: relative; display: block; line-height: 0; }
/* the picture fills the space it has, at its own shape (--r = width / height, set by the script) */
.ed-stage canvas.fit { display: block; width: min(calc(100cqw - 6px), calc((100cqh - 6px) * var(--r, 1))); height: auto; touch-action: none; cursor: none; border: 3px solid var(--green); background: #222; }
.ed-panel { min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-left: 3px solid var(--black2); padding: 6px 0 12px; }
.ed-ring { position: absolute; pointer-events: none; transform: translate(-50%, -50%); border-radius: 50%;
  border: 2px solid var(--green); box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000; }
.ed-ring::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px #000; }
.ed-stage canvas.moving { cursor: grab; }
.ed-stage canvas.moving.dragging { cursor: grabbing; }
.ed-top .ed-note { color: var(--green); font-weight: 900; }
.ed-top .ed-note:empty { display: none; }
.ed-ring.erase { border-color: var(--pink); }
.ed-ring.erase::after { background: var(--pink); }
.ed-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 16px; }
.ed-modes { display: flex; width: 100%; }
.ed-modes .ed-btn { flex: 1; }
.ed-btn { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 1rem; padding: .5em 1em; min-height: 44px; background: transparent; color: var(--green); border: 3px solid var(--green); cursor: pointer; }
.ed-modes .ed-btn + .ed-btn { border-left: none; }
.ed-btn.on { background: var(--green); color: var(--black); }
.ed-size { display: flex; align-items: center; gap: 10px; width: 100%; font-weight: 900; text-transform: uppercase; color: var(--green); }
.ed-size input { accent-color: var(--green); flex: 1; min-width: 0; height: 32px; }
.ed-acts { display: flex; gap: 8px; width: 100%; }
.ed-acts .ed-btn { flex: 1; padding-left: .4em; padding-right: .4em; }
.ed-foot { flex: none; display: flex; justify-content: flex-end; gap: 12px; padding: 10px 16px 14px; border-top: 3px solid var(--black2); }

/* ---------------------------------------------------------------- checkout */
dialog.paybox { width: min(560px, 94vw); max-height: 94vh; padding: 0; border: 4px solid var(--green); background: #fff; color: var(--black); overflow: auto; }
dialog.paybox::backdrop { background: rgba(0, 0, 0, .8); }
.paybox-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--black); }
.paybox-top h3 { font-size: 1.5rem; }
.paybox-top .link { color: var(--green); }
#paybox-mount { min-height: 420px; }


/* ---------------------------------------------------------------- phones */
@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap { width: calc(100vw - 32px); }
  .hero { min-height: 70svh; padding: 54px 0 52px; }
  .hero p { font-size: 1.05rem; }
  .band { padding: 52px 0; }
  .lead h2 { font-size: 2.1rem; }
  .marquee div { font-size: 17px; padding: 9px 0; }
  .chips { gap: 8px; }
  .chip { font-size: .85rem; padding: .35em .8em; }
  .group h3 { font-size: 1.6rem; }
  .tile h4 { font-size: 1.15rem; padding: 10px 12px 12px; }
  .dropzone { padding: 26px 14px; }
  .cast { gap: 12px; }
  .slot { width: calc(50% - 6px); min-width: 150px; padding: 16px 10px; }
  .slot-face { width: 88px; height: 88px; }
  .btnrow { gap: 10px; }
  .btnrow .cta { flex: 1 1 100%; }
  .bigplay { width: 70px; height: 70px; }
  .nav .wrap { gap: 12px; height: 54px; }
  .nav a { font-size: 13px; }
  dialog.paybox { width: 100vw; max-width: 100vw; max-height: 100svh; height: 100svh; margin: 0; border-width: 0; }
}

/* ---------------------------------------------------------------- library filters + badges */
.filters { max-width: 980px; margin: 1.8rem auto 0; display: grid; gap: 12px; }
.filters input[type=search] { font-family: 'Studio', sans-serif; font-weight: 700; font-size: 1.15rem; border: 3px solid var(--green); padding: 12px 14px; background: var(--black2); color: var(--white); width: 100%; border-radius: 0; }
.frow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.frow label { display: flex; flex-direction: column; gap: 4px; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .8rem; color: var(--green); }
.frow select { font-family: 'Studio', sans-serif; font-weight: 700; font-size: 1rem; padding: 10px 12px; border: 3px solid var(--green); background: var(--black2); color: var(--white); border-radius: 0; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #3ccc60 50%), linear-gradient(135deg, #3ccc60 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.results { text-align: center; margin: 1rem 0 0; font-weight: 900; text-transform: uppercase; color: var(--green); min-height: 1.2em; }
.empty { text-align: center; margin: 2rem 0; }
#groups > .shelf { margin-top: 1.6rem; }
.badges { position: absolute; top: 0; left: 0; z-index: 3; display: flex; gap: 0; }
.badge { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 13px; padding: 5px 10px; }
.badge.new { background: var(--pink); color: var(--black); }
.badge.hot { background: var(--black); color: var(--green); }
@media (max-width: 600px) { .frow { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- head size, captions, mouth picker */
.tune { max-width: 980px; margin: 1.4rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.tune label { display: flex; flex-direction: column; gap: 6px; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .85rem; color: var(--green); }
.tune input[type=range] { accent-color: var(--green); width: 100%; }
.tune select { font-family: 'Studio', sans-serif; font-weight: 700; font-size: 1rem; padding: 10px 12px; border: 3px solid var(--green); background: var(--black2); color: var(--white); border-radius: 0; }
#head-size-val { color: var(--white); font-size: .95rem; }
@media (max-width: 600px) { .tune { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- mouth editor */
/* the talking preview rides in the corner of the paint view, so both stay in sight while you paint */
.mo-pip { position: absolute; right: 0; top: 0; width: 34%; border: 3px solid var(--green); border-top: 0; border-right: 0; background: #222; pointer-events: none; line-height: 0; }
.mo-pip canvas { width: 100%; height: auto; display: block; }
.mo-pip span { position: absolute; left: 0; bottom: 0; line-height: 1; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .62rem; padding: 3px 5px; background: var(--green); color: var(--black); }
.mo-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 16px 4px; }
.mo-style { padding: 0; border: 3px solid var(--black2); background: var(--black2); color: var(--white); cursor: pointer; display: flex; flex-direction: column; }
.mo-style.on { border-color: var(--green); }
.mo-style:hover { border-color: var(--green2); }
.mo-style canvas { width: 100%; height: auto; display: block; background: #222; }
.mo-style span { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .66rem; padding: 5px 4px; }
.mo-note { margin: 6px 16px 0; font-size: .92rem; color: var(--muted); }
.mo-sliders { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 10px 16px; }
.mo-sliders label { display: flex; flex-direction: column; gap: 4px; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .85rem; color: var(--green); }
.mo-sliders label.off { opacity: .35; }
.mo-sliders input { accent-color: var(--green); width: 100%; height: 30px; }
.mo-ends { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); }

/* phones and narrow tablets: full screen, picture on top, tools scroll underneath it */
@media (max-width: 760px) {
  dialog.editor { width: 100vw; height: 100svh; max-width: 100vw; margin: 0; border-width: 0; }
  .ed-top { padding: 10px 14px 4px; }
  .ed-top h3 { font-size: 1.25rem; }
  .ed-top p { font-size: .84rem; }
  .ed-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .ed-stage { height: min(48svh, 100vw); padding: 6px 10px; }
  dialog.mouthed .ed-stage { height: min(34svh, 64vw); }
  .ed-panel { border-left: 0; border-top: 3px solid var(--black2); padding-top: 2px; }
  .ed-tools { padding: 8px 12px; gap: 8px; }
  .mo-styles { display: flex; overflow-x: auto; gap: 8px; padding: 8px 12px 4px; scroll-snap-type: x proximity; }
  .mo-style { flex: 0 0 104px; scroll-snap-align: start; }
  .mo-sliders { padding: 8px 12px; }
  .mo-note { margin: 6px 12px 0; }
  .ed-foot { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
  .ed-foot .cta { flex: 1; }
}

/* ---------------------------------------------------------------- 9:16 cards */
.stage.tall .stage-in { width: fit-content; max-width: 100%; margin: 0 auto; }
.stage.tall canvas { aspect-ratio: 9 / 16; width: auto; height: min(80svh, 820px); max-width: 100%; }
.badge.phone { background: var(--green); color: var(--black); }

/* ---------------------------------------------------------------- remix tab (owner only) */
.libtabs { display: flex; justify-content: center; margin: 2rem auto 0; }
.libtabs[hidden] { display: none; }
.libtabs button { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 1.05rem; padding: .6em 1.4em;
  background: transparent; color: var(--green); border: 3px solid var(--green); cursor: pointer; }
.libtabs button + button { border-left: none; }
.libtabs button.on { background: var(--green); color: var(--black); }
.remixpanel[hidden] { display: none; }
.remix-head { max-width: 760px; margin: 1.6rem auto 1.2rem; text-align: center; }
.remix-head h3 { font-size: 2rem; margin: 0; }
.remix-head p { margin: .5rem 0 0; }
.remix-tags { display: flex; gap: 8px; justify-content: center; }
.remix-card { display: flex; flex-direction: column; }
.remix-card .tile { flex: 1; }
.remix-src { font-size: .8rem; color: var(--muted); padding: 6px 2px 0; }
.remix-act { display: flex; gap: 8px; padding-top: 8px; align-items: center; flex-wrap: wrap; }
.remix-act button { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .9rem; padding: .45em 1em; cursor: pointer;
  border: 3px solid var(--green); background: transparent; color: var(--green); }
.remix-act button.yes { background: var(--green); color: var(--black); }
.remix-note { max-width: 760px; margin: 0 auto 1.2rem; padding: .6rem 1rem; border: 3px solid var(--green); display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; font-weight: 900; }
.remix-note[hidden] { display: none; }
.filters[hidden], #groups[hidden], .results[hidden] { display: none; }
.tile .ppl { display: block; padding: 0 16px 14px; margin-top: -6px; font-family: 'Studio', sans-serif; font-weight: 700; text-transform: uppercase; font-size: .85rem; color: var(--black); }

/* ---------------------------------------------------------------- faces found: edit each person once */
.face-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.face-pic { position: relative; }
.face-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.face-acts button { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .75rem; padding: 4px 8px;
  background: var(--black); color: var(--green); border: none; cursor: pointer; }
.pool { gap: 18px; }
.slot-tip { font-family: 'Studio', sans-serif; font-weight: 700; text-transform: uppercase; font-size: .8rem; }
@media (max-width: 600px) { .face-acts { flex-direction: column; } .face-acts button { width: 100%; } .pool { gap: 14px; } }
.face-acts button.out { background: transparent; color: var(--black); border: 2px solid var(--black); padding: 2px 6px; }

/* ---------------------------------------------------------------- fine-tune a face, take a photo */
.fit { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto; gap: 12px 18px; align-items: end; }
.fit[hidden] { display: none; }
.fit .link { color: var(--green); justify-self: start; margin-bottom: 6px; }
@media (max-width: 760px) { .fit { grid-template-columns: 1fr 1fr; } }
.camrow { display: flex; justify-content: center; margin-top: 14px; }
dialog.camerabox { width: min(720px, 96vw); }
.cam-stage { padding: 10px 20px; display: grid; place-items: center; }
.cam-stage video { width: 100%; max-height: 62vh; background: #000; border: 3px solid var(--green); transform: scaleX(-1); }
.cam-count { font-family: 'Charlie', 'Studio', sans-serif; font-size: 5rem; color: var(--green); position: absolute; }

/* ---------------------------------------------------------------- share a finished card */
.sharebox { max-width: 860px; margin: 2rem auto 0; padding: 22px; border: 4px solid var(--green); }
.sharebox[hidden] { display: none; }
.sharebox h3 { font-size: 2rem; margin: 0 0 .4rem; }
.sharebox > p { margin: 0 0 1rem; }
.share-row, .share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-made { margin-top: 1.2rem; display: grid; gap: 12px; }
.share-made[hidden] { display: none; }
.share-url { display: flex; gap: 8px; }
.share-url input { flex: 1; min-width: 0; }
.share-email { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: .4rem; }
.share-email label { display: flex; flex-direction: column; gap: 4px; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .8rem; color: var(--green); }
.share-email .wide { grid-column: 1 / -1; }
.share-email textarea { font-family: 'Studio', sans-serif; font-weight: 700; font-size: 1.05rem; border: 3px solid var(--green); padding: 10px 12px; background: var(--black2); color: var(--white); min-height: 70px; resize: vertical; }
@media (max-width: 600px) { .share-email { grid-template-columns: 1fr; } .sharebox { padding: 16px; } }
/* the public page a share link opens */
.sharepage { background: var(--black); }
.sp { max-width: 980px; margin: 0 auto; padding: 28px 16px 60px; text-align: center; }
.sp-logo img { width: min(300px, 70vw); height: auto; margin: 0 auto 14px; }
.sp h1 { font-size: clamp(2rem, 6vw, 3.6rem); margin: 0; }
.sp-from { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; color: var(--green); margin: .4rem 0 1.2rem; }
.sp-video { border: 4px solid var(--green); background: #000; }
.sp-video video { display: block; width: 100%; height: auto; }
.sp-video.tall { width: fit-content; max-width: 100%; margin: 0 auto; }
.sp-video.tall video { height: min(78svh, 860px); width: auto; max-width: 100%; }
.sp-share { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 1.4rem 0 2.2rem; }
.sp-make { border-top: 3px solid var(--black2); padding-top: 1.8rem; }
.sp-make h2 { margin: 0 0 .4rem; }

/* ---------------------------------------------------------------- hover highlight (the brighter green) */
.ed-btn:not(.on):hover { color: var(--green2); border-color: var(--green2); }
.ed-btn.on:hover { background: var(--green2); border-color: var(--green2); }
.remix-act button.yes:hover { background: var(--green2); border-color: var(--green2); color: var(--black); }
button.link:hover, a.link:hover, .link:hover { color: var(--pink2); border-color: var(--pink2); }
.face-acts button:hover { color: var(--green2); text-decoration: underline; text-underline-offset: 3px; }
.remix-act button:not(.yes) { border-color: var(--pink); color: var(--pink); }
.remix-act button:not(.yes):hover { background: var(--pink2); border-color: var(--pink2); color: var(--black); }

/* ---------------------------------------------------------------- request a card */
.fields textarea { resize: vertical; min-height: 6.5em; line-height: 1.35; }
.fields select { appearance: none; cursor: pointer; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
#request .btnrow { justify-content: center; }

/* ---------------------------------------------------------------- coupon codes */
.codebox { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 14px; }
.code-on { display: flex; gap: 14px; align-items: center; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; color: var(--pink); }
.code-form { display: flex; gap: 10px; }
.code-form input { width: 12em; text-transform: uppercase; letter-spacing: .08em; }

/* ---------------------------------------------------------------- content pages (affiliates, admin, blog) */
.page-hero { padding-top: clamp(70px, 12vh, 140px); }
.page-hero h1, .page h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); color: var(--green); }
h1 .outline { color: var(--pink); }  /* solid pink word, no stroke font */
.steps { max-width: 760px; margin: 2rem auto 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; font-size: 1.15rem; }
.steps li::before { content: counter(s); font-family: 'Charlie', sans-serif; font-weight: 900; font-size: 1.8rem; background: var(--black); color: var(--green); width: 56px; height: 56px; display: grid; place-items: center; }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; max-width: 980px; margin: 2rem auto 0; }
.numbers > div { border: 4px solid var(--green); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.numbers .big { font-family: 'Charlie', sans-serif; font-weight: 900; font-size: 2.8rem; color: var(--pink); line-height: 1; }
.fine { color: var(--muted); font-size: .95rem; text-align: center; max-width: 60ch; margin: 1.2rem auto 0; }
.band.yellow .fine { color: var(--black); }
.who { max-width: 820px; margin: 1.6rem auto 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.who li { background: var(--black); color: var(--green); padding: .5em 1em; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .9rem; }
.faq { max-width: 780px; }
.faq details { border-bottom: 3px solid var(--black); padding: 14px 0; }
.faq summary { cursor: pointer; font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 1.1rem; }
.faq summary:hover { color: var(--pink); }
.faq p { margin: .6rem 0 0; font-size: 1.05rem; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .95rem; }
.admin-table th, .admin-table td { border-bottom: 2px solid var(--black2); padding: 8px 10px; text-align: left; white-space: nowrap; }
.admin-table th { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .8rem; color: var(--green); }
.admin-table tr.off td { opacity: .45; }
.admin-table .acts { display: flex; gap: 12px; }
.ad-h { font-size: 2rem; color: var(--green); margin: 2.6rem 0 .6rem; }
.app-card { border: 4px solid var(--green); padding: 16px; margin-top: 12px; }
.app-card.focus { border-color: var(--pink); }
.app-card h3 { font-size: 1.2rem; }
.app-card p { margin: .4rem 0; }
.app-act { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.app-act input { width: 10em; text-transform: uppercase; }
.stats-link { display: flex; gap: 10px; max-width: 640px; margin: 2rem auto; }

/* ---------------------------------------------------------------- blog */
.post-in { max-width: 760px; }
.post-meta { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .85rem; color: var(--muted); }
.post-meta a { color: var(--green); }
.post h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin-top: .6rem; }
.post-lede { font-size: 1.3rem; color: var(--white); margin: 1rem 0 2rem; }
.post-body { font-size: 1.12rem; line-height: 1.65; }
.post-body h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--green); margin: 2.4rem 0 .8rem; }
.post-body h3 { font-size: 1.35rem; color: var(--pink); margin: 1.8rem 0 .6rem; }
.post-body a { color: var(--green); }
.post-body a:hover { color: var(--pink2); }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: 1rem; }
.post-body th, .post-body td { border: 3px solid var(--green); padding: 10px 12px; text-align: left; vertical-align: top; }
.post-body th { background: var(--green); color: var(--black); font-family: 'Studio', sans-serif; text-transform: uppercase; font-size: .9rem; }
.post-body blockquote { border-left: 6px solid var(--pink); margin: 1.4rem 0; padding: .2rem 0 .2rem 1.2rem; color: var(--white); }
.post-body img { max-width: 100%; height: auto; }
.post-h { font-size: 2rem; color: var(--green); margin: 3rem 0 1rem; }
.blog-shelf { margin: 1.4rem 0; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; gap: 8px; border: 4px solid var(--green); padding: 18px; color: var(--white); text-decoration: none; }
.post-card:hover { border-color: var(--green2); }
.post-card time { font-family: 'Studio', sans-serif; font-weight: 900; text-transform: uppercase; font-size: .8rem; color: var(--pink); }
.post-card h3 { font-size: 1.4rem; color: var(--green); }
.post-card p { margin: 0; color: var(--muted); }
.read-list { font-size: 1.1rem; line-height: 1.8; }
.read-list a { color: var(--green); }
.cta-band .lead p { color: var(--black); }

.page h1, .post h1, .lead h2 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 600px) {
  .page-hero h1, .page h1 { font-size: clamp(1.9rem, 9.5vw, 3rem); }
  .post h1 { font-size: clamp(1.8rem, 8.5vw, 2.6rem); }
  .post-lede { font-size: 1.1rem; }
  .post-body { font-size: 1.02rem; }
  .post-body table { display: block; overflow-x: auto; }
  .nav .wrap { flex-wrap: wrap; row-gap: 6px; }
}

/* ---------------------------------------------------------------- phones: filters fit, two cards per row */
.filters, .frow { min-width: 0; }
.filters input[type=search], .frow select { width: 100%; min-width: 0; box-sizing: border-box; }
.frow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) {
  .frow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { border-width: 3px; }
  .tile h4 { font-size: .82rem; padding: 8px 9px 4px; line-height: 1.15; }
  .tile .ppl { font-size: .68rem; padding: 0 9px 9px; margin-top: 0; }
  .tile .badge { font-size: 10px; padding: 3px 6px; }
  .tile .pin { font-size: 10px; }
}

/* ---------------------------------------------------------------- the lime */
.nav .brand { gap: 10px; }
.nav .brand img.mascot { height: 46px; width: auto; }
@media (max-width: 520px) { .nav .brand img.mascot { height: 36px; } }
footer.foot img.foot-mascot, .login img.login-mascot { width: 110px; height: auto; display: block; margin: 0 auto .4rem; }
.sp-logo { display: flex; flex-direction: column; align-items: center; }
.sp-logo img.sp-mascot { width: 84px; height: auto; margin: 0 auto 6px; }

/* ---------------------------------------------------------------- pale yellow bars so the green lime stands out */
.nav { background: var(--pink); }
footer.foot { background: var(--white); color: var(--black); }
footer.foot a { color: var(--black); }
footer.foot a:hover { color: var(--pink); }
@media (max-width: 600px) {
  .nav .wrap { height: auto; min-height: 58px; flex-wrap: wrap; row-gap: 4px; padding-top: 6px; padding-bottom: 6px; }
  .nav a { font-size: 13px; }
}

/* ---------------------------------------------------------------- header: just the logo, centered */
.nav .wrap { justify-content: center; }
.nav .brand { margin: 0 auto; }

