/* sew: named for Stephen Earl Wilhite, who created the GIF.
   Concept: cross-stitch. GIFs are pixels, and cross-stitch is pixel art in thread.

   One material, one system:
   - The page is natural linen aida (a faint woven grid). Everything is made of that cloth:
     panels are a lighter layer of the same linen, joined to it by a dashed running stitch,
     not white cards floating on a shadow.
   - Ink is the dark thread: text, the primary button, focus rings and the GIF frame.
   - Mustard, rose and sage are floss: decoration only (wordmark, logo tile, step markers,
     selection). Never buttons or text.
   - One stitch (1.5px dash, ink at low alpha) draws every edge and divider on the page.
   Motion follows Emil Kowalski's rules: strong ease-out, press = scale(.97), UI under 300ms. */
:root {
  /* cloth */
  --cloth: #ece5d6;
  --cloth-hole: rgb(92 70 36 / .13);
  --cloth-thread: rgb(92 70 36 / .05);
  --panel: #f6f1e7;
  --well: #fdfbf6;            /* inputs: the lightest linen */
  --sunk: #e6dece;            /* skeletons, thumbnails, checkerboard */

  /* thread */
  --ink: #2b2722;
  --ink-muted: #655c50;
  --ink-hover: #423b33;
  --on-ink: #f6f1e7;
  --error: #9e3a26;

  /* floss (decoration only) */
  --floss-yellow: #c38b22;
  --floss-pink: #c06a80;
  --floss-mint: #5e8f76;

  --stitch: rgb(43 39 34 / .28);
  --line: rgb(43 39 34 / .14);
  --edge: rgb(43 39 34 / .22);
  --edge-strong: rgb(43 39 34 / .4);
  --frame-bg: #2b2722;        /* GIFs sit in ink, like framed media */
  --panel-shadow: 0 1px 0 rgb(92 70 36 / .08), 0 10px 28px -18px rgb(60 44 20 / .35);
  --focus: var(--ink);

  --font: "Reddit Sans", system-ui, sans-serif;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --r-panel: 18px; --r-md: 12px; --r-btn: 10px; --inset: 7px;
  --btn-h: 44px; --field-h: 48px;
  --nav: 64px; --gut: max(24px, env(safe-area-inset-left), env(safe-area-inset-right)); --maxw: 760px;

  --t-h1: clamp(34px, 2.6vw + 22px, 52px);
  --t-h2: clamp(22px, .8vw + 19px, 28px);
  --t-lead: clamp(17px, .4vw + 15.5px, 20px);
  --frame-max-h: min(52vh, 440px);

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-swap: cubic-bezier(.2, 0, 0, 1);
  color-scheme: light;
}

/* the same linen by lamplight */
@media (prefers-color-scheme: dark) {
  :root {
    --cloth: #1f1d1a;
    --cloth-hole: rgb(0 0 0 / .34);
    --cloth-thread: rgb(255 240 210 / .03);
    --panel: #2a2723;
    --well: #23201d;
    --sunk: #34302b;
    --ink: #ede6d8;
    --ink-muted: #b5ab98;
    --ink-hover: #ffffff;
    --on-ink: #1f1d1a;
    --error: #f09a84;
    --floss-yellow: #d9a93f;
    --floss-pink: #d98ea0;
    --floss-mint: #86b39a;
    --stitch: rgb(237 230 216 / .26);
    --line: rgb(237 230 216 / .12);
    --edge: rgb(237 230 216 / .2);
    --edge-strong: rgb(237 230 216 / .38);
    --frame-bg: #141311;
    --panel-shadow: 0 1px 0 rgb(0 0 0 / .3), 0 10px 28px -18px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-padding-top: calc(var(--nav) + var(--s-4)); scrollbar-color: var(--edge-strong) var(--cloth); accent-color: var(--ink); }
button, a, input { touch-action: manipulation; }
::selection { background: color-mix(in srgb, var(--floss-yellow) 45%, transparent); color: var(--ink); }
input { caret-color: var(--ink); }

/* linen aida: a hole at every crossing, faint threads between */
body {
  background-color: var(--cloth);
  background-image:
    radial-gradient(circle at 50% 50%, var(--cloth-hole) 0 .9px, transparent 1.5px),
    linear-gradient(var(--cloth-thread) 1px, transparent 1px),
    linear-gradient(90deg, var(--cloth-thread) 1px, transparent 1px);
  background-size: 8px 8px;
  background-attachment: fixed;
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: min(100%, var(--maxw) + 2 * var(--gut)); margin-inline: auto; padding-inline: var(--gut); }

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

/* ---------- header ---------- */
.nav { position: sticky; top: 0; z-index: 10; height: var(--nav); background: var(--cloth); }
.nav::after { content: ""; position: absolute; inset: auto 0 0; height: 1.5px; background: repeating-linear-gradient(90deg, var(--stitch) 0 6px, transparent 6px 11px); }
.nav__row { height: 100%; display: flex; align-items: center; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.wordmark { font: 650 22px/1 var(--font); letter-spacing: -0.04em; translate: 0 -1px; }
.mark { width: 30px; height: 30px; flex: none; }
.mark rect { fill: var(--floss-yellow); }
.mark__thread { fill: none; stroke: #2b2722; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; }
.mark__needle { stroke-width: 2.2; }
.mark__loop { stroke-width: 1.6; }
.skip-link {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  padding: var(--s-2) var(--s-4); border-radius: var(--r-btn);
  background: var(--ink); color: var(--on-ink); text-decoration: none; font-weight: 500;
  opacity: 0; pointer-events: none; z-index: 1;
}
.skip-link:focus-visible { opacity: 1; pointer-events: auto; }

/* ---------- hero ---------- */
.hero { padding: var(--s-7) 0 var(--s-8); }
.hero__art { width: clamp(190px, 26vw, 290px); margin: 0 0 var(--s-5) -2px; }
.xstitch { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 1px 0 rgb(60 44 20 / .22)); }
.xstitch path { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
/* first visit of a session: each X is sewn in, left to right, one leg then the other */
.xstitch.stitching path { stroke-dasharray: 9; animation: sew-in 160ms var(--ease-out) both; animation-delay: calc(var(--i) * 26ms); }
.xstitch.stitching path + path { animation-delay: calc(var(--i) * 26ms + 80ms); }
@keyframes sew-in { from { stroke-dashoffset: 9; } to { stroke-dashoffset: 0; } }

.hero h1 {
  margin: 0 0 var(--s-4);
  font: 550 var(--t-h1)/1.06 var(--font);
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 17ch;
}
.lead { margin: 0 0 var(--s-6); font-size: var(--t-lead); line-height: 1.55; max-width: 52ch; color: var(--ink-muted); text-wrap: pretty; }

/* ---------- panels: a lighter layer of the same linen, sewn on ---------- */
.patch {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--panel-shadow);
}
.patch::after {
  content: ""; position: absolute; inset: var(--inset); z-index: 3; pointer-events: none;
  border: 1.5px dashed var(--stitch);
  border-radius: calc(var(--r-panel) - var(--inset)); /* concentric with the panel edge */
}

.finder { padding: var(--s-5) var(--s-5) var(--s-4); }
.field-label { display: block; margin: 0 0 var(--s-2); font-size: 14px; font-weight: 600; }
.finder__row { display: flex; gap: var(--s-2); }
.field { position: relative; flex: 1; min-width: 0; display: flex; }
.finder input {
  flex: 1; min-width: 0; width: 100%;
  height: var(--field-h);
  padding: 0 var(--s-4);
  border: 1px solid var(--edge);
  border-radius: var(--r-btn);
  background: var(--well); color: var(--ink);
  font: 400 16px/1 var(--font);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.finder input::placeholder { color: var(--ink-muted); }
.finder input:hover { border-color: var(--edge-strong); }
.finder input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent); }
.finder input[aria-invalid="true"] { border-color: var(--error); }
.finder .btn { height: var(--field-h); }
.field:has(.field__clear:not([hidden])) input { padding-right: 48px; }
.field__clear {
  position: absolute; right: 2px; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--r-btn); background: transparent; color: var(--ink-muted); cursor: pointer;
  transition: color 150ms ease, transform 160ms var(--ease-out);
}
.field__clear[hidden] { display: none; }
.field__clear svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (hover: hover) and (pointer: fine) { .field__clear:hover { color: var(--ink); } }
.field__clear:active { transform: scale(.94); }

.help-text { margin: var(--s-3) 0 0; font-size: 15px; color: var(--ink-muted); text-wrap: pretty; }
.link-btn { padding: 0; border: 0; font: inherit; color: var(--ink); background-color: transparent; }
.status { min-height: 1.6em; margin: var(--s-1) 0 0; font-size: 15px; color: var(--ink-muted); }
.status:empty { margin: 0; min-height: 0; }
.status.error { color: var(--error); }
/* success is announced, not shown: the card itself says who the GIF is from */
.status.quiet { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons: ink thread for the one primary, an outline for the rest ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--btn-h); padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--r-btn);
  font: 500 16px/1 var(--font); white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
}
.btn--primary { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--edge); }
/* the wide button holds its label still at the left; status and size change in place at the right */
.btn--wide { width: 100%; justify-content: flex-start; padding-inline: var(--s-5) var(--s-4); }
.btn__meta {
  margin-left: auto; flex: 0 1 14ch; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 400; opacity: .72; font-variant-numeric: tabular-nums; text-align: end;
}
.btn__meta:empty { display: none; }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--ink-hover); }
  .btn--secondary:hover { border-color: var(--edge-strong); background: color-mix(in srgb, var(--ink) 4%, transparent); }
}
.btn:active, .option:active { transform: scale(.97); }
.btn:disabled, .option:disabled { cursor: progress; opacity: .55; }
.btn:disabled:active, .option:disabled:active { transform: none; }

.label { display: inline-block; }
.label.swapping { animation: label-swap 220ms var(--ease-out); }
@keyframes label-swap { from { opacity: .3; filter: blur(2px); } }

@keyframes spin { to { transform: rotate(360deg); } }
.btn.busy .label::after {
  content: ""; display: inline-block;
  width: 12px; height: 12px; margin-left: var(--s-2);
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: -1px; animation: spin .6s linear infinite;
}

.i-check { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; animation: icon-in 300ms var(--ease-swap); }
@keyframes icon-in { from { opacity: 0; transform: scale(.25); filter: blur(4px); } }

/* ---------- link: faint hairline at rest, line draws on hover ---------- */
.link {
  color: inherit; text-decoration: none; cursor: pointer;
  background:
    linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat,
    linear-gradient(var(--edge), var(--edge)) 0 100% / 100% 1px no-repeat;
  transition: background-size 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .link:hover { background-size: 100% 1px, 100% 1px; background-position: 0 100%, 0 100%; }
}

/* ---------- result card ---------- */
.results { display: grid; gap: var(--s-6); }
.results:empty { display: none; }
.results:not(:empty) { margin-bottom: var(--s-8); }
.results__all { margin: calc(-1 * var(--s-3)) 0 0; font-size: 15px; }
.results__all .link-btn { min-height: 44px; cursor: pointer; }

.card {
  overflow: hidden;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), filter 300ms var(--ease-out);
}
@starting-style {
  .card:not(.card--skeleton) { opacity: 0; transform: translateY(8px); filter: blur(4px); }
}

.frame { position: relative; overflow: hidden; background: var(--frame-bg); display: grid; place-items: center; }
.frame__media { position: relative; width: 100%; } /* sized to the picture by app.js, so the toggle sits on the GIF */
.frame video { display: block; width: 100%; height: auto; max-height: var(--frame-max-h); object-fit: contain; cursor: pointer; }

.frame__toggle {
  position: absolute; right: var(--s-3); bottom: var(--s-3); z-index: 4;
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgb(43 39 34 / .72); color: #f6f1e7;
  cursor: pointer;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .frame__toggle:hover { background: rgb(43 39 34 / .9); } }
.frame__toggle:active { transform: scale(.94); }
.frame__toggle:focus-visible { outline-color: #f6f1e7; box-shadow: 0 0 0 4px #2b2722; }

.swap { display: grid; place-items: center; }
.swap svg {
  grid-area: 1 / 1;
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity 300ms var(--ease-swap), scale 300ms var(--ease-swap), filter 300ms var(--ease-swap);
}
.swap .i-play { fill: currentColor; stroke-width: 1.5; translate: 1px 0; }
.swap .i-play, .card.is-paused .swap .i-pause { opacity: 0; scale: .25; filter: blur(4px); }
.card.is-paused .swap .i-play { opacity: 1; scale: 1; filter: blur(0); }

.card__body { display: grid; gap: var(--s-5); padding: var(--s-6) var(--s-6) var(--s-5); }
.meta { margin: 0; font-size: 16px; }
.meta__who { margin: 0; font: 600 16px/1.5 var(--font); }
.meta > span { display: block; color: var(--ink-muted); overflow-wrap: anywhere; }

/* ---------- WhatsApp options: rows of the same linen, each showing what you'll get ---------- */
.wa { display: grid; gap: var(--s-2); }
.wa__title { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-1); font-size: 14px; font-weight: 600; }

.option {
  display: grid; grid-template-columns: 44px 1fr 20px; align-items: center; gap: var(--s-3);
  width: 100%; min-height: 64px; padding: 10px 14px 10px 10px;
  border: 1px solid var(--edge); border-radius: var(--r-md);
  background: transparent; color: var(--ink);
  font: inherit; text-align: start; cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .option:hover { border-color: var(--edge-strong); background: color-mix(in srgb, var(--ink) 3%, transparent); }
  .option:hover .option__arrow { translate: 2px 0; }
}
.option__thumb { position: relative; width: 44px; height: 44px; overflow: hidden; border-radius: 6px; background: var(--sunk); }
.option__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.option__thumb img:not([src]) { visibility: hidden; }
/* the sticker on a transparency checkerboard, as a tiny patch whose stitches run while it's being made */
.option__thumb--sticker {
  border-radius: 8px;
  background: repeating-conic-gradient(var(--sunk) 0 25%, var(--well) 0 50%) 0 0 / 8px 8px;
}
.option__thumb--sticker img { object-fit: contain; padding: 5px; }
.stitch { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.stitch rect { fill: none; stroke: var(--stitch); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 3 2; }
.option__thumb--sticker.is-loading .stitch rect { stroke: var(--ink); animation: sewing .5s linear infinite; }
@keyframes sewing { to { stroke-dashoffset: -5; } }
.option__thumb.is-loading::after { content: ""; position: absolute; inset: 0; }
.option__text { display: grid; gap: 2px; min-width: 0; }
.option__text .label { font-weight: 500; }
/* one line while it changes, so the row never grows or shrinks mid-conversion */
.option__meta { font-size: 14px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.option__meta.is-message { white-space: normal; }
.option__arrow { grid-column: 3; grid-row: 1; width: 20px; height: 20px; fill: none; stroke: var(--ink-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: translate 160ms var(--ease-out); }
.option.busy .option__arrow { opacity: 0; }
.option.busy::after {
  content: ""; grid-column: 3; grid-row: 1; justify-self: center;
  width: 14px; height: 14px;
  border: 2px solid var(--ink-muted); border-right-color: transparent; border-radius: 50%;
  animation: spin .6s linear infinite;
}
.option.is-unavailable { cursor: default; opacity: 1; border-style: dashed; }
.option.is-unavailable .option__arrow, .option.is-unavailable .option__thumb { opacity: .45; }
.option.is-unavailable .option__meta { color: var(--ink); }

.mp4 { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; margin-block: calc(-1 * var(--s-3)); font-size: 15px; color: var(--ink-muted); background-position: 100% calc(100% - 11px), 0 calc(100% - 11px); }
@media (hover: hover) and (pointer: fine) { .mp4:hover { background-position: 0 calc(100% - 11px), 0 calc(100% - 11px); } }

/* notes and alerts are part of the card, marked by a thread colour, not a grey box */
.card__note, .card__alert { margin: 0; font-size: 15px; padding: 0 0 0 var(--s-5); position: relative; }
.card__note:empty, .card__alert:empty { display: none; }
.card__note::before, .card__alert::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px;
  background:
    linear-gradient(45deg, transparent 42%, currentColor 42% 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, currentColor 42% 58%, transparent 58%);
}
.card__note { color: var(--ink); }
.card__note::before { color: var(--floss-mint); }
.card__alert { color: var(--error); }

/* placeholder while a post is looked up: the card's own shape, so nothing jumps */
.card--skeleton .frame { aspect-ratio: 4 / 3; max-height: 440px; background: var(--sunk); }
.shimmer, .bone, .option__thumb.is-loading::after {
  background: linear-gradient(90deg, transparent 30%, color-mix(in srgb, var(--panel) 70%, transparent) 50%, transparent 70%) 0 0 / 300% 100% var(--sunk);
  animation: shimmer 1.4s linear infinite;
}
.shimmer { position: absolute; inset: 0; }
.bone { display: block; border-radius: var(--r-btn); height: var(--btn-h); }
.bone--short { width: 40%; height: 18px; }
.bone--option { height: 64px; border-radius: var(--r-md); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* ---------- how it works: straight on the cloth, divided by the same stitch ---------- */
.how { padding: var(--s-7) 0 var(--s-8); position: relative; }
.how::before { content: ""; position: absolute; inset: 0 0 auto; height: 1.5px; background: repeating-linear-gradient(90deg, var(--stitch) 0 6px, transparent 6px 11px); }
.how h2 { margin: 0 0 var(--s-5); font: 550 var(--t-h2)/1.2 var(--font); letter-spacing: -0.02em; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 13.5rem 1fr; gap: var(--s-4); padding: var(--s-4) 0; position: relative; }
.rows li + li::before { content: ""; position: absolute; inset: 0 0 auto; height: 1.5px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px); }
.rows h3 { margin: 0; font: 600 17px/1.5 var(--font); display: flex; align-items: baseline; gap: 10px; }
/* each step gets one cross-stitch in its own floss colour */
.rows h3::before {
  content: ""; width: 12px; height: 12px; flex: none; translate: 0 1px;
  background:
    linear-gradient(45deg, transparent 40%, currentColor 40% 60%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, currentColor 40% 60%, transparent 60%);
  color: var(--floss-yellow);
}
.rows li:nth-child(2) h3::before { color: var(--floss-pink); }
.rows li:nth-child(3) h3::before { color: var(--floss-mint); }
.rows p { margin: 0; max-width: 62ch; color: var(--ink-muted); }

.legal { padding: 0 0 max(var(--s-6), env(safe-area-inset-bottom)); }
.legal .wrap { display: grid; gap: var(--s-2); }
.legal .wrap::before { content: ""; height: 1.5px; margin-bottom: var(--s-5); background: repeating-linear-gradient(90deg, var(--stitch) 0 6px, transparent 6px 11px); }
.legal p { margin: 0; font-size: 14px; color: var(--ink-muted); max-width: 62ch; }
.legal .tribute { font-size: 15px; color: var(--ink); }
.tribute strong { font-weight: 650; letter-spacing: -0.02em; }

/* ---------- page entrance: once, short, groups 80ms apart (the stitched art has its own) ---------- */
[data-enter] > :not(.hero__art) { animation: enter 320ms var(--ease-out) both; }
[data-enter] > :nth-child(3) { animation-delay: 80ms; }
[data-enter] > :nth-child(4) { animation-delay: 160ms; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); filter: blur(4px); } }

/* ---------- wide screens: GIF and actions side by side ---------- */
@media (min-width: 760px) {
  .card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .card .frame { min-height: 100%; }
  .card__body { align-content: center; }
}

/* ---------- phone ---------- */
@media (max-width: 639px) {
  :root { --nav: 56px; --r-panel: 16px; }
  .nav { position: relative; } /* on phones the logo bar scrolls away instead of costing height */
  html { scroll-padding-top: var(--s-4); }
  .hero { padding: var(--s-6) 0 var(--s-7); }
  .finder { padding: var(--s-5) var(--s-4) var(--s-4); }
  .finder__row { flex-wrap: wrap; }
  .field { flex-basis: 100%; }
  .finder .btn { flex: 1; }
  .rows li { grid-template-columns: 1fr; gap: var(--s-1); }
  .card__body { padding: var(--s-5) var(--s-5) var(--s-4); }
  .results:not(:empty) { margin-bottom: var(--s-7); }
}

/* reduced motion: fewer and gentler, not none. Fades stay, movement goes. */
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  [data-enter] > :not(.hero__art), .label.swapping, .i-check { animation-name: fade; }
  .xstitch.stitching path { animation: none; }
  .card { transition-property: opacity; }
  @starting-style { .card:not(.card--skeleton) { transform: none; filter: none; } }
  .swap svg { transition-property: opacity; scale: 1 !important; filter: none !important; }
  .btn:active, .option:active, .frame__toggle:active, .field__clear:active { transform: none; }
  .option:hover .option__arrow { translate: none; }
  .shimmer, .bone, .option__thumb.is-loading::after, .option__thumb--sticker.is-loading .stitch rect { animation: none; }
}

@media (forced-colors: active) {
  .patch::after { border-color: CanvasText; }
}

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