/* Self-hosted fonts (SIL Open Font License — see assets/fonts/OFL-*.txt), latin subset */
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/barlow-condensed-latin-900-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0C0B09;
  --ivory: #F3E9D7;
  --charcoal: #292521;
  --ivory-dim: rgba(243, 233, 215, 0.62);
  --ink-dim: rgba(12, 11, 9, 0.62);

  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(20px, 4vw, 64px);

  /* Night (default) theme */
  --bg: var(--ink);
  --fg: var(--ivory);
  --fg-dim: var(--ivory-dim);
  --rule: var(--charcoal);
  color-scheme: dark;
}

/* Day theme: warm ivory page, near-black type, faint taupe rules (waves are baked into the day artwork) */
:root[data-theme="day"] {
  --bg: var(--ivory);
  --fg: var(--ink);
  --fg-dim: var(--ink-dim);
  --rule: #D9CCB6;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

/* Shared mono link style */
.nav a, .strip__link, .strip__btn, .lightbox__dl, .lightbox__btn {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

/* External labels (X, EVERMOR): plain text until their URL is configured */
.ext { text-decoration: none; }
.ext:not([href]) { cursor: default; }
.ext:not([href]) .ext__note { display: none; }
.ext[href]:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter);
  padding-top: max(20px, env(safe-area-inset-top));
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand__icon { width: 40px; height: 40px; border-radius: 8px; }
.brand__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.02em;
  line-height: 1;
  padding-top: 2px;
}

.nav { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav a { padding: 8px 0; }
.nav a[href]:hover, .strip__link:hover, .lightbox__dl:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "title"
    "more"
    "art";
  /* fill the screen, but never so tall that headline and cat drift apart on narrow/tall windows */
  min-height: min(calc(100vh - 80px - 64px), 960px, calc(30vw + 380px));
  padding: clamp(24px, 6vh, 72px) var(--gutter) clamp(32px, 6vh, 64px);
  overflow: hidden;
}
@supports (height: 100svh) {
  .hero { min-height: min(calc(100svh - 80px - 64px), 960px, calc(30vw + 380px)); }
}

.hero__title {
  grid-area: title;
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(4.5rem, 10.4vw, 12.5rem);
  line-height: 0.84;
  letter-spacing: -0.005em;
}

.hero__links {
  grid-area: more;
  justify-self: start;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin-top: clamp(16px, 2.6vw, 36px);
}
.hero__more {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 6px 0;
}
/* VIEW MEMES / MAKE YOUR OWN: a single shallow wave instead of an arrow — like one of the cat's stripes */
.hero__more--wave {
  position: relative;
  display: inline-block;
}
.hero__wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: calc(100% - 0.08em);   /* skip the trailing letter-spacing after the last letter */
  height: 6px;
  overflow: visible;
  pointer-events: none;
}
.hero__wave path {
  fill: none;
  stroke: currentColor;          /* ivory at night, near-black by day */
  stroke-width: 1.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.8;
  transition: stroke-width 150ms ease, opacity 150ms ease;
}
.hero__more--wave:hover .hero__wave path,
.hero__more--wave:focus-visible .hero__wave path {
  stroke-width: 2.2;
  opacity: 1;
}
.hero__more.hero__more--wave:hover { text-decoration: none; }   /* the wave replaces the hover underline */

.hero__more:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.hero__art {
  grid-area: art;
  pointer-events: none; /* only the cat button itself is interactive */
}

/* Desktop: artwork pinned to the right, waves running back under the headline */
@media (min-width: 761px) {
  .hero {
    grid-template-areas:
      "title"
      "more"
      ".";
  }
  .hero__art {
    position: absolute;
    right: 0;
    bottom: clamp(8px, 3vh, 40px);
    width: 84%;
    max-width: 1500px;
  }
}

.cat {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.cat:focus-visible { outline-offset: -6px; }

.cat__img {
  width: 100%;
  /* Soften the hard left edge where the waves leave the artwork */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
          mask-image: linear-gradient(to right, transparent 0, #000 22%);
  user-select: none;
  -webkit-user-drag: none;
}
.cat__img--day { display: none; }
:root[data-theme="day"] .cat__img--night { display: none; }
:root[data-theme="day"] .cat__img--day { display: block; }

/* Discovery hint + switch icon, on the floor left of the front paw (artwork pixel space) */
.cat__hint {
  position: absolute;
  left: calc(606 / 2172 * 100%);
  top: calc(618 / 724 * 100%);     /* leaves room for the switch when it hangs crooked */
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
  color: var(--fg-dim);
  transition: color 150ms ease;
}

.cat__switch {
  position: absolute;
  left: calc(606 / 2172 * 100%);
  top: calc(546 / 724 * 100%);
  width: calc(84 / 2172 * 100%);
  height: auto;
  color: var(--fg);
  overflow: visible;
  transform-origin: 12% 15%;
  transition: transform 450ms cubic-bezier(.2, .9, .3, 1), opacity 200ms ease;
}
.cat__knob { transition: transform 300ms ease; }
:root[data-theme="day"] .cat__knob { transform: translateX(38px); }

/* Paw layer: only shown while swatting; the hole patch hides the painted paw underneath */
.cat__paw, .cat__hole {
  position: absolute;
  left: calc(700 / 2172 * 100%);
  top: calc(470 / 724 * 100%);
  width: calc(250 / 2172 * 100%);
  height: auto;
  visibility: hidden;
  pointer-events: none;
}
.cat__paw--day, .cat__hole--day { display: none; }
:root[data-theme="day"] .cat__paw--night,
:root[data-theme="day"] .cat__hole--night { display: none; }
:root[data-theme="day"] .cat__paw--day,
:root[data-theme="day"] .cat__hole--day { display: block; }
.cat.is-swatting .cat__paw,
.cat.is-swatting .cat__hole { visibility: visible; }
.cat__paw { transform-origin: 85% 90%; }
.cat.is-swatting .cat__paw { animation: swat 380ms both; }
/* quick wind-up, fast strike (lands at ~150ms), brief hold on the hit, then back */
@keyframes swat {
  0%   { transform: none;                                  animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  22%  { transform: translate(-3%, -18%) rotate(12deg);    animation-timing-function: cubic-bezier(.6, 0, 1, 1); }
  40%  { transform: translate(-23%, 3%) rotate(-6deg);     animation-timing-function: linear; }   /* impact */
  60%  { transform: translate(-21%, 2%) rotate(-4deg);     animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  100% { transform: none; }
}

/* Broken: the switch hangs crooked and is unavailable for a few seconds */
.cat.is-broken { cursor: not-allowed; }
.cat.is-broken .cat__switch {
  transform: rotate(26deg) translate(6%, 14%);
  opacity: 0.6;
  animation: knock 520ms cubic-bezier(.2, .8, .3, 1) 150ms both;   /* starts on the paw's impact */
  transition: opacity 200ms ease 150ms;
}
@keyframes knock {
  0%   { transform: none; }
  22%  { transform: rotate(40deg) translate(10%, 20%); }   /* the hit */
  55%  { transform: rotate(19deg) translate(5%, 11%); }
  100% { transform: rotate(26deg) translate(6%, 14%); }    /* hangs crooked */
}
.cat.is-broken .cat__hint { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  .cat.is-swatting .cat__paw, .cat.is-swatting .cat__hole { visibility: hidden; animation: none; }
  .cat.is-broken .cat__switch { animation: none; }
  .cat__switch, .cat.is-broken .cat__switch, .cat__knob { transition: none; }
}
.cat:hover .cat__hint, .cat:focus-visible .cat__hint { color: var(--fg); }

/* Eyelids: ivory patches over the pupils, positioned in the artwork's own pixel space (2172×724) */
.cat__lid {
  position: absolute;
  top: calc(431 / 724 * 100%);
  height: calc(44 / 724 * 100%);
  background: var(--ivory);
  transform: scaleY(0);
  transform-origin: 50% 0;
  pointer-events: none;
}
.cat__lid--left  { left: calc(974 / 2172 * 100%);  width: calc(88 / 2172 * 100%); }
.cat__lid--right { left: calc(1177 / 2172 * 100%); width: calc(87 / 2172 * 100%); }

/* Eyes close (lids drop), stay shut while the theme changes, then reopen */
.cat__lid { transition: transform 520ms cubic-bezier(.3, 0, .2, 1); }
.cat.is-shut .cat__lid {
  transform: scaleY(1);
  transition: transform 420ms cubic-bezier(.5, 0, .7, 1);
}
@media (prefers-reduced-motion: reduce) {
  .cat__lid { transition: none; }
}

/* Mobile: headline → VIEW MEMES → cat, artwork reframed on the cat */
@media (max-width: 760px) {
  .hero {
    min-height: 0;
    padding-top: clamp(16px, 5vh, 40px);
    row-gap: 8px;
  }
  .hero__title { font-size: clamp(3.5rem, 17vw, 7.5rem); }
  .hero__art {
    margin: 0 calc(var(--gutter) * -1);
    overflow: hidden;
  }
  .cat {
    width: 134%;
    margin-left: -33%; /* crops the waves' far end; face and tail stay whole */
  }
  .cat__img { -webkit-mask-image: none; mask-image: none; }
  .cat__hint { top: calc(640 / 724 * 100%); }  /* small screens: the artwork is tiny, give the crooked switch more room */
}

/* ---------- Token strip ---------- */
.strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 40px;
  min-height: 64px;
  padding: 14px var(--gutter);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.strip__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
}
.strip__status { margin: 0; }
.strip__sep { color: var(--fg-dim); padding: 0 0.25em; }
.strip__label { color: var(--fg-dim); }

.strip__ca {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}
.strip__ca[hidden], .strip__link[hidden], .nav a[hidden] { display: none; }

.strip__address {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strip__btn {
  flex: none;
  border: 1px solid var(--rule);
  background: transparent;
  padding: 6px 10px;
  cursor: pointer;
  min-width: 76px;
}
@media (hover: hover) { .strip__btn:hover { border-color: var(--fg-dim); } }

/* Anti-scam line: pre-launch "no contract yet", live "this is the only contract" */
.strip__note {
  margin: 0 0 0 auto;
  font-weight: 400;
  color: var(--fg-dim);
}

/* Live: the warning drops to its own line under the contract; chart link keeps the main row */
.strip__inner.has-ca .strip__note { order: 1; flex-basis: 100%; margin-left: 0; }
.strip__inner.has-ca .strip__links { margin-left: auto; }

.strip__links { display: flex; gap: 12px 32px; }
.strip__links:not(:has(a:not([hidden]))) { display: none; }
.strip__link { padding: 6px 0; }
@media (max-width: 760px) {
  .strip__inner { flex-direction: column; align-items: flex-start; }
  .strip__ca { width: 100%; }
  .strip__btn { margin-left: auto; }
  .strip__note { margin-left: 0; }
  .strip__inner.has-ca .strip__links { margin-left: 0; }
}

/* ---------- Memes ---------- */
.memes {
  background: var(--bg);
  color: var(--fg);
  padding: clamp(56px, 9vw, 128px) var(--gutter) clamp(64px, 9vw, 128px);
}

/* Heading row */
.memes__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin: 0 0 clamp(32px, 5vw, 72px);
}

.memes__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(3rem, 8.2vw, 9.5rem);
  line-height: 0.86;
  letter-spacing: -0.005em;
  max-width: 12ch;
}

.memes__row {
  position: relative; /* keeps visually-hidden labels inside the scroller */
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 40px);
}

.poster { margin: 0; position: relative; }

.poster__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  /* hairline frame: charcoal at night, light taupe by day */
  box-shadow: 0 0 0 1px var(--rule);
  transition: box-shadow 200ms ease;
}
@media (hover: hover) {
  .poster__open:hover { box-shadow: 0 0 0 1px var(--fg-dim); }
}
.poster__open img { width: 100%; aspect-ratio: 1; }


@media (max-width: 760px) {
  .memes { padding-left: 0; padding-right: 0; }
  .memes__head { padding: 0 var(--gutter); flex-direction: column; align-items: flex-start; gap: 14px; }
  .memes__row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    padding: 2px var(--gutter) 8px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .memes__row::-webkit-scrollbar { display: none; }
  .poster {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .poster:last-child { margin-right: var(--gutter); }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
}
.lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.lightbox::backdrop { background: var(--bg); }
.lightbox:focus { outline: none; }

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter);
  padding-top: max(16px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--rule);
}
.lightbox__count {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}
.lightbox__actions { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.lightbox__dl { padding: 8px 0; }
.lightbox__btn {
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
}

.lightbox__stage {
  margin: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vh, 48px) clamp(16px, 8vw, 120px);
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0 0 1px var(--rule); /* keeps the poster's edge visible on the day ivory */
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  min-width: 76px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  background: var(--bg);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
@media (hover: hover) { .lightbox__nav:hover { border-color: var(--fg-dim); } }
.lightbox__nav--prev { left: clamp(8px, 2vw, 32px); }
.lightbox__nav--next { right: clamp(8px, 2vw, 32px); }

@media (max-width: 760px) {
  .lightbox__stage { padding: 16px 12px 88px; }
  .lightbox__nav { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); translate: none; }
  .lightbox__nav--prev { left: var(--gutter); }
  .lightbox__nav--next { right: var(--gutter); }
  .lightbox__dl .dl-long { display: none; }
}

/* ---------- Meme kit ---------- */
.memes__kit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: clamp(40px, 5vw, 72px);
}
.kit-link, .make__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--fg);
  padding: 14px 18px;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
/* hover fills only on devices with a real pointer; on iPhone a tap would leave the button stuck filled */
@media (hover: hover) {
  .kit-link:hover, .make__btn:hover { background: var(--fg); color: var(--bg); }
}
.kit-meta {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}
@media (max-width: 760px) {
  .memes__kit { padding: 0 var(--gutter); }
}

/* ---------- Make your own ---------- */
.make {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  padding: clamp(56px, 9vw, 128px) var(--gutter) clamp(64px, 9vw, 128px);
  border-top: 1px solid var(--rule);
}
.make__title {
  margin: 0 0 clamp(28px, 4vw, 56px);
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(3rem, 8.2vw, 9.5rem);
  line-height: 0.86;
  letter-spacing: -0.005em;
}
.make__form { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 520px; }
.make__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}
.make__input {
  width: 100%;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--fg);
  border-radius: 0;
  padding: 6px 0 10px;
  outline: none;
}
.make__input:focus-visible { border-bottom-color: var(--fg); box-shadow: 0 2px 0 0 var(--fg); }
.make__check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;             /* comfortable tap target */
  margin: -6px 0 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  user-select: none;
}
.make__check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--fg);
  background: transparent;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.make__check input::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--fg);
  transform: scale(0);
  transition: transform 120ms ease;
}
.make__check input:checked::before { transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .make__check input::before { transition: none; } }

.make__help {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--fg-dim);
}
.make__preview canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  box-shadow: 0 0 0 1px var(--rule);
}
@media (max-width: 760px) {
  .make { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  /* phones: title → live preview → form, so the poster stays visible while typing */
  .make__controls { display: contents; }
  .make__title { order: 1; margin-bottom: 0; }
  .make__preview { order: 2; }
  .make__form { order: 3; }
  .make__form { max-width: none; }
  .make__btn { width: 100%; justify-content: center; }
}

/* ---------- 404: WRONG DOOR ---------- */
.nf-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.nf {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(24px, 5vh, 64px) var(--gutter) clamp(48px, 8vh, 96px);
}
.nf__title {
  margin: 0 0 clamp(24px, 3vw, 40px);
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(4.5rem, 12vw, 12.5rem);
  line-height: 0.84;
  letter-spacing: -0.005em;
}

/* Doorway drawn in CSS; the cat sleeps across its threshold, spilling past the frame */
.nf__scene {
  position: relative;
  width: 100%;
  max-width: 620px;
  justify-self: center;
  aspect-ratio: 1 / 1.05;
}
.nf__door {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 0;
  bottom: 9%;
  border: clamp(6px, 1.2vw, 10px) solid var(--fg);
  border-bottom: 0;
  background: var(--rule);
}
.nf__floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9%;
  height: 2px;
  background: var(--fg);
}
.nf__cat {
  position: absolute;
  left: 0;
  width: 100%;
  bottom: calc(9% - 2px);
  height: auto;
}
.nf__cat--day { display: none; }
:root[data-theme="day"] .nf__cat--night { display: none; }
:root[data-theme="day"] .nf__cat--day { display: block; }

@media (max-width: 760px) {
  .nf { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .nf__text { display: contents; }
  .nf__title { order: 1; margin-bottom: 0; font-size: clamp(3.5rem, 19vw, 7.5rem); }
  .nf__scene { order: 2; }
  .nf__home { order: 3; justify-self: start; width: 100%; justify-content: center; }
}

/* ---------- Footer ---------- */
.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(140px, 220px));
  gap: 24px clamp(32px, 6vw, 96px);
  align-items: start;
  padding: clamp(32px, 4vw, 48px) var(--gutter);
  padding-bottom: max(clamp(32px, 4vw, 48px), env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
}
.foot [hidden] { display: none; }
.foot__brand { align-self: start; }
.foot__col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.foot__head {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}
.foot__link {
  padding: 6px 0;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.foot__link:not([href]) { cursor: default; }
@media (hover: hover) {
  .foot__link[href]:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
  }
}

@media (max-width: 760px) {
  .foot { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .foot__link { padding: 10px 0; }   /* comfortable tap targets */
}
