/* Bibo's Crafts
   Colour placement: 60% cream, 30% lilac mist/stone, 10% deep lilac (buttons only).
   The lilac grade: --velvet is the accent token (kept for its name), now deep lilac #6B47A3 (6.4:1 on cream);
   soft lilac #CBB5F0 takes its place in dark mode. Neutrals are plum, so the lilac never fights them.
   Lily pink is decoration and large text only (4.4:1 on cream). */
:root {
  --cream: #FBF5EE;
  --blush: #F1E8F6;
  --stone: #E6DCEB;
  --ink: #2A1D36;
  --mauve: #5C4B6E;
  --velvet: #6B47A3;
  --velvet-dark: #573689;
  --lily: #DD1864;
  --butter: #F4E98C;
  --caramel: #B9772E;
  --white: #FFFFFF;
  --paper: #FFFFFF;          /* cards, inputs, panels */
  --header-bg: rgba(251,245,238,.92);
  --bar-bg: #F3ECF5;         /* Yarn Bar section */
  --bar-glow: #E6DAF0;
  --shelf-bg: #F8F3F9;
  --stage-1: #FFFDF8;
  --stage-2: #FBF5EE;
  --footer-bg: #2A1D36;
  --footer-ink: #FBF5EE;
  color-scheme: light;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1200px;
  --gutter: 20px;
  --radius: 28px;
  --scallop: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } .js .thread path { stroke-dashoffset: 0; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  padding-bottom: 88px; /* room for the sticky order bar on phones */
}
img { display: block; max-width: 100%; height: auto; }
main, .site-footer { overflow-x: clip; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--lily); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.nowrap { white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- type ---------- */
.h1, h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.6rem, 8.5vw, 4.8rem); line-height: 1.04; letter-spacing: -0.01em; }
.h1 em, h1 em { display: block; font-style: italic; color: var(--velvet); font-weight: 600; }
.h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.15; }
.lede { color: var(--mauve); font-size: 1.125rem; max-width: 34ch; }
.sub { font-family: var(--serif); font-style: italic; color: var(--mauve); font-size: 1.15rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 700 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 2px solid var(--velvet); transition: background .2s, color .2s, transform .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--velvet); color: var(--cream); }
.btn-primary:hover { background: var(--velvet-dark); border-color: var(--velvet-dark); }
.btn-ghost { background: transparent; color: var(--velvet); }
.btn-ghost:hover { background: var(--velvet); color: var(--cream); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px); }

/* ---------- hang tag (price labels, badges) ---------- */
.tag {
  position: relative; display: inline-flex; align-items: center;
  height: 30px; padding: 0 14px 0 26px;
  font: 700 .82rem/1 var(--sans); color: #2A1D36; background: var(--white);
  white-space: nowrap;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
}
.tag::before { content: ""; position: absolute; left: 11px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--cream); box-shadow: inset 0 0 0 1px rgba(42,29,54,.15); }
.tag-butter { background: var(--butter); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--stone); }
.header-inner { display: flex; align-items: center; gap: 10px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 52px; height: 52px; margin: -4px -4px -4px -6px; object-fit: contain; border-radius: 12px; }   /* The Bibo B (assets/images/brand/site) */
/* the logo in light and dark mode: lilac bow on cream, cream bow on the dark aubergine */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline-block; }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.55rem; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark em { color: var(--lily); font-style: italic; font-weight: 500; }   /* bibo's *crafts* */
.amp { font-style: italic; font-weight: 500; color: #F0A6C8; }   /* "crafts" in the footer wordmark */
.nav { display: none; gap: 30px; }
.nav a { text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--lily); }
.header-cta { display: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.icon-btn svg .dot { fill: var(--ink); stroke: none; }

/* ---------- hero ---------- */
.hero { padding: 28px 0 56px; }
.hero-grid { display: grid; gap: 32px; }
.hero-copy { position: relative; }
.hero-copy h1 { position: relative; z-index: 1; }
.thread { position: absolute; right: -6px; top: 8px; width: 150px; height: auto; fill: none; stroke: var(--lily); stroke-width: 3.5; stroke-linecap: round; opacity: .9; }
.hero-copy .lede { margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-actions .btn { flex: 1 1 0; padding: 0 14px; }
.hero-media { position: relative; }
.stitch-frame { position: relative; margin: 0; padding: 10px; border: 3px dashed var(--caramel); border-radius: calc(var(--radius) + 12px); }
.stitch-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.hero-tag { position: absolute; top: 30px; right: 30px; }
.hero-inset { display: none; }

/* ---------- categories ---------- */
.cats { padding-bottom: 44px; }
.cat-row { display: flex; gap: 14px; margin-top: 22px; overflow-x: auto; padding: 6px 4px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; font: 500 .9rem/1.2 var(--sans); color: var(--ink); }
.cat-img { width: 76px; height: 76px; border-radius: 50%; padding: 4px; box-shadow: inset 0 0 0 3px var(--stone); transition: box-shadow .2s; }
.cat-img img, .cat-img span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.cat-img span { display: flex; align-items: center; justify-content: center; background: var(--blush); font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--velvet); }
.cat[aria-selected="true"] .cat-img { box-shadow: inset 0 0 0 3px var(--lily); }
.cat[aria-selected="true"] { font-weight: 700; }
.cat:hover .cat-img { box-shadow: inset 0 0 0 3px var(--lily); }

/* ---------- scalloped bands (like the picot trim on the bows) ---------- */
.band { position: relative; padding: 56px 0 64px; margin: var(--scallop) 0; }
.band-blush { background: var(--blush); --band: var(--blush); }
.band::before, .band::after { content: ""; position: absolute; left: 0; right: 0; height: var(--scallop); background: radial-gradient(circle at 50% var(--pos), var(--band) calc(var(--scallop) - .5px), transparent var(--scallop)) 0 0 / calc(var(--scallop) * 2) var(--scallop) repeat-x; }
.band::before { top: calc(var(--scallop) * -1); --pos: 100%; }
.band::after { bottom: calc(var(--scallop) * -1); --pos: 0%; }

/* ---------- product grid ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 26px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card { background: var(--cream); border-radius: 24px; padding: 8px 8px 14px; display: flex; flex-direction: column; height: 100%; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(107,71,163,.10); }
.card-img { aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--stone); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
/* a piece with several photos: swipe on the photo, or tap a small one below the name */
.slides { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.slides:focus-visible { outline: 3px solid var(--lily); outline-offset: -3px; }
.dz-row { display: flex; gap: 6px; margin-top: -2px; overflow-x: auto; scrollbar-width: none; padding: 3px 2px; }
.dz-row::-webkit-scrollbar { display: none; }
.dz { flex: 0 0 auto; width: 36px; height: 45px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--stone); cursor: pointer; box-shadow: inset 0 0 0 2px var(--stone); }
.dz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dz[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--lily); }
.dz:focus-visible { outline: 3px solid var(--lily); outline-offset: 2px; }
.dz-name { margin-top: -6px; font: 600 .82rem/1.25 var(--sans); color: var(--mauve); }
.card-body { padding: 12px 6px 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font: 700 .98rem/1.25 var(--sans); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-order { font: 700 .85rem/1 var(--sans); color: var(--velvet); text-decoration: none; padding: 8px 2px; }
.card-order:hover { text-decoration: underline; text-underline-offset: 3px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--mauve); padding: 30px 0; }

/* ---------- bouquet feature ---------- */
.feature { display: grid; gap: 28px; padding-top: 56px; padding-bottom: 56px; align-items: center; }
.feature-media { position: relative; }
.feature-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.feature-tag { position: absolute; top: 8%; left: 2%; }
.feature-copy .lede { margin: 16px 0 24px; }

/* ---------- how it works ---------- */
.how { padding-bottom: 64px; }
.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 20px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.num { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; background: var(--velvet); color: var(--cream); display: flex; align-items: center; justify-content: center; font: 600 1.25rem/1 var(--serif); }
.steps h3 { font: 700 1.1rem/1.3 var(--sans); }
.steps p { color: var(--mauve); }

/* ---------- footer ---------- */
.site-footer { position: relative; background: var(--footer-bg); color: var(--footer-ink); padding: 52px 0 28px; margin-top: var(--scallop); }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--scallop) * -1); height: var(--scallop); background: radial-gradient(circle at 50% 100%, var(--footer-bg) calc(var(--scallop) - .5px), transparent var(--scallop)) 0 0 / calc(var(--scallop) * 2) var(--scallop) repeat-x; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
.footer-mark { font: italic 600 2rem/1.1 var(--serif); }
.footer-tag { font-family: var(--serif); font-style: italic; color: #D8CCE6; margin-top: 6px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--butter); font-weight: 700; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copyright { margin-top: 32px; font-size: .85rem; color: #B3A6C2; }

/* ---------- sticky order bar (phones) ---------- */
.sticky-order { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--header-bg); border-top: 1px solid var(--stone); transform: translateY(110%); transition: transform .3s; }
.sticky-order.show { transform: none; }

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .cat-img { width: 96px; height: 96px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .steps li { flex-direction: column; }
  .hero-actions .btn { flex: 0 0 auto; padding: 0 26px; }
}

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .sticky-order { display: none; }
  .nav { display: flex; }
  .header-cta { display: inline-flex; }
  .header-ig { display: none; }
  .hero { padding: 56px 0 88px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; }
  .thread { width: 200px; right: 30px; top: 70px; }
  .hero-media { max-width: 480px; justify-self: center; width: 100%; }
  .hero-inset { display: block; position: absolute; right: -70px; bottom: -40px; width: 42%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 22px; border: 8px solid var(--cream); box-shadow: 0 14px 30px rgba(42,29,54,.16); }
  .cat-row { overflow: visible; gap: clamp(20px, 2.6vw, 36px); }
  .cat-img { width: clamp(100px, 10vw, 118px); height: clamp(100px, 10vw, 118px); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .feature { grid-template-columns: .9fr 1.1fr; gap: 72px; padding-top: 96px; padding-bottom: 88px; }
  .feature-media { max-width: 480px; }
  .how { padding-bottom: 96px; }
}

/* =====================================================================
   Additions: intro loader, trust row, ribbon, bag, builder, checkout, FAQ
   ===================================================================== */
.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; }
.kicker { font: 700 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--velvet); margin-bottom: 12px; }
.h2 em { font-style: italic; color: var(--velvet); }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.lede strong { color: var(--ink); font-weight: 700; }

/* ---------- intro loader: "Stitched in" ---------- */
.loader { display: none; }
.show-loader body { overflow: hidden; }
.show-loader .loader, .loader.lift {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: var(--cream); cursor: pointer;
  transition: transform .9s cubic-bezier(.7,0,.2,1);
}
.show-loader .loader { animation: loader-failsafe 0s 6s forwards; } /* if scripts never run, get out of the way */
.loader.lift { transform: translateY(calc(-100% - 40px)); }
.loader::after { content: ""; position: absolute; left: 0; right: 0; bottom: -20px; height: 20px; background: radial-gradient(circle at 50% 0%, var(--cream) 19.5px, transparent 20px) 0 0 / 40px 20px repeat-x; }
@keyframes loader-failsafe { to { visibility: hidden; } }
.loader-inner { text-align: center; width: min(86vw, 600px); }
.loader-art { position: relative; }
.loader-word-svg { width: 100%; height: auto; overflow: visible; display: block; }
.loader .draw { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.loader .d1 { animation: draw 1.05s .35s cubic-bezier(.45,0,.4,1) forwards; }
.loader .d2 { animation: draw .45s 1.3s cubic-bezier(.45,0,.4,1) forwards; }
.loader .d3 { animation: draw .9s 1.65s cubic-bezier(.45,0,.4,1) forwards; }
.loader .stitch path { fill: none; stroke: var(--velvet); stroke-width: 2.6; stroke-dasharray: 6 4.5; stroke-linecap: round; }
.loader .stitch .amp, .loader .fill .amp { stroke: var(--lily); fill: var(--lily); }
.loader .stitch .amp { fill: none; }
.loader .fill path { fill: var(--ink); opacity: 0; }
.loader .fill .amp { fill: var(--lily); }
.loader .f1 { animation: fill-in .5s 1.25s forwards; }
.loader .f2 { animation: fill-in .45s 1.65s forwards; }
.loader .f3 { animation: fill-in .5s 2.4s forwards; }
.loader .loader-thread { fill: none; stroke: var(--velvet); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .55; animation: draw 2.4s .1s cubic-bezier(.45,0,.4,1) forwards; }
.loader-ball { position: absolute; left: 0; bottom: -6%; width: 15%; height: auto; transform: translate(-130%, 0) rotate(0); animation: unravel 2.45s .05s cubic-bezier(.45,0,.4,1) forwards; filter: drop-shadow(0 8px 10px rgba(42,29,54,.25)); }
@keyframes unravel {
  0% { transform: translate(-130%, 0) rotate(-200deg) scale(1); }
  12% { transform: translate(-40%, 0) rotate(0deg) scale(1); }
  88% { opacity: 1; }
  100% { transform: translate(640%, 0) rotate(1080deg) scale(.35); opacity: 0; }
}
@keyframes fill-in { to { opacity: 1; } }
.loader-tag { font: italic 500 1.05rem/1.4 var(--serif); color: var(--mauve); margin-top: 18px; opacity: 0; transform: translateY(8px); animation: rise .6s 2.35s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* hero thread draws itself in once the intro lifts */
.js .thread path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s .3s ease-out forwards; }
.show-loader .thread path { animation-delay: 3.3s; }

/* ---------- trust row ---------- */
.trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font: 500 .92rem/1.3 var(--sans); color: var(--mauve); }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust li span { color: var(--lily); font-size: 1rem; }
.trust-price { background: var(--butter); color: #2A1D36 !important; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

/* ---------- ribbon ---------- */
.ribbon { background: var(--velvet); color: var(--cream); overflow: hidden; padding: 14px 0; transform: rotate(-1.2deg); margin: 6px -10px 52px; }
.ribbon-track { display: flex; align-items: center; gap: 22px; width: max-content; animation: ribbon 32s linear infinite; font: italic 600 1.25rem/1 var(--serif); white-space: nowrap; }
.ribbon-track i { font-style: normal; color: var(--butter); font-size: 1rem; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes ribbon { to { transform: translateX(-50%); } }

/* ---------- header bag ---------- */
.bag-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 700 .95rem/1 var(--sans); cursor: pointer; }
.bag-btn:hover { background: var(--ink); color: var(--cream); }
.bag-label { display: none; }
.bag-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--lily); color: #fff; font: 700 .75rem/22px var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--cream); }
.bag-btn.bump { animation: bump .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 40% { transform: scale(1.18) rotate(-6deg); } }

/* ---------- product cards: badges, add button, skeleton ---------- */
.card-img { position: relative; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--butter); color: #2A1D36; font: 700 .72rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.badge-ink { background: var(--ink); color: var(--cream); left: auto; right: 10px; }
.card.is-sold .card-img img { filter: grayscale(.6) opacity(.75); }
.card-noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; color: var(--lily); background: var(--blush); }
.card-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--velvet); color: var(--cream); font: 700 .85rem/1 var(--sans); cursor: pointer; text-decoration: none; transition: background .2s, transform .15s; }
.card-btn .ico { width: 17px; height: 17px; }
.card-btn:hover { background: var(--velvet-dark); }
.card-btn:active { transform: scale(.95); }
.card-btn-ghost { background: transparent; color: var(--velvet); box-shadow: inset 0 0 0 2px var(--velvet); }
.card-btn-ghost:hover { background: var(--velvet); color: var(--cream); }
.skeleton .card-img { background: linear-gradient(100deg, var(--stone) 30%, #F3EAE0 50%, var(--stone) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite; }
.sk-line { height: 12px; margin: 14px 6px 0; border-radius: 6px; background: var(--stone); }
.sk-line.short { width: 50%; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- shared form bits (Yarn Bar + checkout) ---------- */
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--velvet); color: var(--cream); display: grid; place-items: center; font: 600 .95rem/1 var(--serif); flex: 0 0 auto; }
.swatch {
  position: relative; aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.55), transparent 42%), repeating-linear-gradient(58deg, rgba(0,0,0,.10) 0 2px, transparent 2px 6px), var(--c);
  box-shadow: inset 0 0 0 1px rgba(42,29,54,.14), 0 2px 4px rgba(42,29,54,.12);
}
.opt { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.opt legend { font: 700 .9rem/1.3 var(--sans); margin-bottom: 8px; padding: 0; }
.opt legend small { font-weight: 500; color: var(--mauve); }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--stone); background: var(--paper); color: var(--ink); font: 500 .9rem/1 var(--sans); cursor: pointer; transition: border-color .2s, background .2s; }
.pill small { color: var(--mauve); font-weight: 500; }
.pill.on { border-color: var(--velvet); background: var(--velvet); color: var(--cream); }
.pill.on small { color: #E2D6F2; }
.wrap-sw { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 8px; border-radius: 999px; border: 2px solid var(--stone); background: var(--paper); font: 500 .9rem/1 var(--sans); color: var(--ink); cursor: pointer; }
.wrap-sw i { width: 24px; height: 24px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.wrap-sw.on { border-color: var(--velvet); }
.field { display: block; margin-bottom: 14px; }
.field[hidden] { display: none; } /* e.g. no address box for pickup */
.field > span { display: block; font: 700 .9rem/1.3 var(--sans); margin-bottom: 6px; }
.field small { font-weight: 500; color: var(--mauve); }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--stone); background: var(--paper); font: 400 1rem/1.4 var(--sans); color: var(--ink); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lily); }

/* ---------- The Yarn Bar ---------- */
.yarnbar { position: relative; padding: 72px 0 80px; background: var(--bar-bg); color: var(--ink); overflow: hidden; }
.yarnbar::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 25% 30%, rgba(255,226,170,.35), transparent 70%), radial-gradient(40% 40% at 90% 90%, rgba(221,24,100,.08), transparent 70%); pointer-events: none; }
.yarnbar .wrap { position: relative; }
.yb-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.yb-head .h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
.yb-head .h1 em { display: inline; }
.yb-head .lede { margin: 14px auto 0; max-width: 46ch; }
.yb { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.yb > * { min-width: 0; }

/* counter + stage */
.yb-counter { position: relative; }
.yb-stage-wrap { position: relative; aspect-ratio: 1; max-width: 520px; margin: 0 auto; border-radius: 36px;
  background: radial-gradient(70% 60% at 50% 38%, var(--stage-1) 0%, var(--stage-2) 55%, var(--bar-glow) 100%);
  box-shadow: 0 30px 60px -30px rgba(42,29,54,.35), inset 0 0 0 1px rgba(185,119,46,.18); overflow: hidden; }
.yb-stage-wrap::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 9%; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, rgba(42,29,54,.16), transparent); pointer-events: none; }
.yb-stage { position: absolute; inset: 0; }
.yb-made { position: absolute; top: 18px; left: 18px; z-index: 40; }
.yb-garment { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; object-position: center; transition: filter .45s ease; user-select: none; -webkit-user-drag: none; }
.yb-layer { position: absolute; height: auto; transform: translate(-50%, -50%) rotate(var(--r)); transition: filter .45s ease; user-select: none; -webkit-user-drag: none; }
.opt-instruction { margin: -2px 0 9px; color: var(--mauve); font: 500 .82rem/1.35 var(--sans); }
.yb-stage.stitch .yb-garment { animation: yb-garment-in .45s cubic-bezier(.3,1.2,.5,1) both; }
@keyframes yb-garment-in { from { opacity: 0; transform: scale(.96); } }
.yb-stage.stitch .yb-layer { animation: yb-in .55s cubic-bezier(.3,1.4,.5,1) both; animation-delay: var(--d); }
@keyframes yb-in { from { opacity: 0; transform: translate(-50%, -42%) rotate(var(--r)) scale(.9); } }
.yb-stage[data-kind="bouquet"] .yb-wrap { filter: brightness(.94); }
.yb-card { position: absolute; right: 8%; bottom: 13%; max-width: 40%; padding: 10px 14px; border-radius: 10px; background: #FFFDF8; box-shadow: 0 6px 16px rgba(42,29,54,.16), inset 0 0 0 1px #E8DCCD; font: italic 500 .95rem/1.25 var(--serif); color: var(--ink); transform: rotate(-5deg); }
.yb-treat { position: absolute; top: 28%; width: 11%; height: 30%; border-radius: 6px; box-shadow: 0 4px 8px rgba(42,29,54,.2); }
.yb-treat-chocolate { left: 22%; transform: rotate(-20deg); background: linear-gradient(#5A3A2A 0 32%, #C21E2E 32% 62%, #5A3A2A 62%); }
.yb-treat-sweets { right: 22%; transform: rotate(18deg); background: radial-gradient(circle at 35% 28%, #F6E27A 12%, transparent 13%), radial-gradient(circle at 65% 48%, #8EC3E6 12%, transparent 13%), radial-gradient(circle at 38% 70%, #F4B6C2 12%, transparent 13%), #C21E2E; }
.yb-treat-fairy-lights { left: 14%; right: 14%; top: 64%; width: auto; height: 10%; border-radius: 0; box-shadow: none; background: radial-gradient(circle, #FFE9A8 0 18%, rgba(255,210,90,.45) 30%, transparent 46%) 0 50% / 9% 100% repeat-x; z-index: 33 !important; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .55; } }

/* ticket */
.yb-ticket { position: relative; max-width: 420px; margin: -26px auto 0; padding: 22px 22px 18px; background: #FFFDF8; color: #2A1D36; border-radius: 6px; box-shadow: 0 12px 24px -12px rgba(42,29,54,.35); text-align: center; z-index: 2;
  -webkit-mask: radial-gradient(circle 7px at 50% 0, transparent 98%, #000) 0 0 / 22px 100%; mask: radial-gradient(circle 7px at 50% 0, transparent 98%, #000) 0 0 / 22px 100%; }
.yb-ticket p { color: #5C4B6E; font-size: .9rem; line-height: 1.45; }
.yb-ticket .yb-ticket-title { font: 600 1.25rem/1.2 var(--serif); color: #2A1D36; margin-bottom: 4px; }
.yb-ticket-yarns { list-style: none; padding: 10px 0 0; margin: 10px 0 0; border-top: 1px dashed #E2D6EA; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font: 500 .85rem/1 var(--sans); color: #2A1D36; }
.yb-ticket-yarns li { display: inline-flex; align-items: center; gap: 6px; }
.yb-ticket-yarns i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }

/* shelf */
.yb-shelf { background: var(--paper); border-radius: 28px; padding: 22px 18px; box-shadow: 0 20px 50px -30px rgba(42,29,54,.3); }
.yb-counter { scroll-margin-top: 86px; }
.yb-step { display: flex; align-items: center; gap: 10px; margin: 24px 0 12px; }
.yb-step:first-child { margin-top: 0; }
.yb-step h3 { font: 700 1.02rem/1.3 var(--sans); }
.yb-pieces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.yb-piece { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 10px; border-radius: 20px; border: 2px solid var(--stone); background: var(--cream); color: var(--ink); cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.yb-piece-img { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.yb-piece-img img { width: 82%; height: 82%; object-fit: contain; transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.yb-piece:hover .yb-piece-img img { transform: scale(1.08) rotate(-4deg); }
.yb-piece-name { font: 700 .85rem/1.1 var(--sans); }
.yb-piece-price { font: 500 .72rem/1 var(--sans); color: var(--mauve); }
.yb-piece.on { border-color: var(--velvet); box-shadow: 0 8px 20px -10px rgba(107,71,163,.45); transform: translateY(-2px); }
.yb-slots { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: hidden; scrollbar-width: none; }
.yb-slot { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; border: 2px solid var(--stone); background: var(--cream); color: var(--ink); cursor: pointer; text-align: left; font: 700 .88rem/1.15 var(--sans); }
.yb-slot > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.yb-slot small { display: block; font: 700 .66rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mauve); margin-bottom: 3px; }
.yb-slot-ball { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.5), transparent 45%), repeating-linear-gradient(58deg, rgba(0,0,0,.12) 0 2px, transparent 2px 5px), var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.yb-slot.on { border-color: var(--velvet); background: var(--paper); }
.yb-yarns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px 4px; padding: 14px 8px 18px; border-radius: 18px;
  background: linear-gradient(transparent calc(100% - 14px), #C99B6B calc(100% - 14px), #A87A4C calc(100% - 4px), rgba(42,29,54,.12) 100%), linear-gradient(transparent 49%, rgba(0,0,0,0) 49%), var(--shelf-bg); }
.yb-yarn { position: relative; aspect-ratio: 1; border: 0; padding: 4px; background: none; cursor: pointer; border-radius: 50%; transition: transform .25s cubic-bezier(.3,1.5,.5,1); }
.yb-yarn .yb-ball { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.yb-yarn:hover { transform: translateY(-4px) rotate(-6deg); }
.yb-yarn.on { transform: translateY(-6px) scale(1.06); }
.yb-yarn.on::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--velvet); }
.yb-clear { min-height: 36px; margin: 0 0 10px; padding: 0 14px; border: 2px solid var(--stone); border-radius: 999px; background: transparent; color: var(--mauve); font: 600 .82rem/1 var(--sans); cursor: pointer; }
.yb-clear:hover, .yb-clear.on { border-color: var(--velvet); color: var(--velvet); background: var(--mist); }
.yb-yarn.roll .yb-ball { animation: roll .5s cubic-bezier(.3,1.4,.5,1); }
@keyframes roll { 40% { transform: rotate(-200deg) scale(1.15); } }
.yb-yarn-name { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: 10px 2px 4px; font: 500 .92rem/1.2 var(--sans); color: var(--mauve); }
.yb-yarn-name strong { color: var(--ink); }
.yb-yarn-name i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.yb-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px -18px -22px; padding: 16px 18px 18px; border-top: 2px dashed var(--stone); background: var(--paper); border-radius: 0 0 28px 28px; z-index: 3; }

/* ---------- FAQ ---------- */
.faq { padding-bottom: 72px; }
.faq-list { margin-top: 22px; display: grid; gap: 10px; max-width: 760px; }
.faq-item { background: var(--paper); border-radius: 18px; box-shadow: inset 0 0 0 2px var(--stone); }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font: 700 1rem/1.35 var(--sans); position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--blush); color: var(--velvet); display: grid; place-items: center; font: 600 1.2rem/1 var(--sans); transition: transform .25s; }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 20px 18px; color: var(--mauve); }
.faq-more { margin-top: 18px; color: var(--mauve); }
.faq-more a { color: var(--velvet); font-weight: 700; }

/* ---------- drawer (bag + checkout) ---------- */
.drawer-open { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(42,29,54,0); transition: background .3s; }
.drawer.open { background: rgba(42,29,54,.45); }
.drawer-panel { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; min-width: 0; max-height: 92vh; display: flex; flex-direction: column; background: var(--cream); border-radius: 28px 28px 0 0; transform: translateY(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -10px 40px rgba(42,29,54,.2); }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; border-bottom: 1px solid var(--stone); }
.drawer-head h2 { font: 600 1.5rem/1.2 var(--serif); }
.drawer-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--stone); font: 400 1.6rem/1 var(--sans); color: var(--ink); cursor: pointer; }
.drawer-body { width: 100%; min-width: 0; box-sizing: border-box; padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-y: auto; }
.co-steps { list-style: none; padding: 0; margin: 0 0 18px; display: flex; gap: 6px; }
.co-steps li { flex: 1; text-align: center; font: 700 .75rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mauve); padding-top: 10px; border-top: 4px solid var(--stone); }
.co-steps li.done { border-color: var(--lily); color: var(--ink); }
.co-steps li.now { border-color: var(--velvet); color: var(--velvet); }
.co-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.co-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; background: var(--paper); border-radius: 18px; padding: 10px; }
.co-thumb { width: 64px; height: 80px; border-radius: 12px; overflow: hidden; background: var(--blush); display: grid; place-items: center; }
.co-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-mark { color: var(--lily); font-size: 1.6rem; }
.thumb-yarn { display: flex; flex-direction: column; gap: 4px; }
.thumb-yarn i { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.5), transparent 45%), repeating-linear-gradient(58deg, rgba(0,0,0,.1) 0 2px, transparent 2px 6px), var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.co-name { font: 700 .98rem/1.3 var(--sans); }
.co-detail { font-size: .84rem; color: var(--mauve); line-height: 1.4; margin-top: 2px; }
.co-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.co-price { font-weight: 700; font-size: .95rem; }
.qty { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--stone); }
.qty button { width: 34px; height: 34px; border: 0; background: none; font: 600 1.1rem/1 var(--sans); color: var(--ink); cursor: pointer; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.co-remove { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--stone); color: var(--ink); font: 400 1.2rem/1 var(--sans); cursor: pointer; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 8px; font-size: 1.05rem; }
.co-total strong { font: 600 1.35rem/1 var(--serif); }
.co-note { font-size: .88rem; color: var(--mauve); margin-bottom: 14px; }
.co-empty { text-align: center; padding: 30px 0 10px; display: grid; gap: 12px; justify-items: center; }
.co-empty-mark { font-size: 2.6rem; color: var(--lily); }
.co-form { display: block; }
.deliv, .pay-list { display: grid; gap: 10px; }
.deliv-card, .pay-card { display: block; position: relative; padding: 14px 16px; border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--stone); cursor: pointer; transition: box-shadow .2s; }
.deliv-card input, .pay-card input { position: absolute; opacity: 0; pointer-events: none; }
.deliv-card.on, .pay-card.on { box-shadow: inset 0 0 0 2px var(--velvet); background: #F7F1FC; }
.deliv-card:focus-within, .pay-card:focus-within { outline: 3px solid var(--lily); outline-offset: 2px; }
.deliv-top, .pay-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.deliv-top span { font-weight: 700; color: var(--velvet); white-space: nowrap; }
.deliv-note { display: block; font-size: .86rem; color: var(--mauve); margin-top: 4px; }
.pay-badge { background: var(--butter); font: 700 .7rem/1 var(--sans); padding: 5px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.co-summary { background: var(--paper); border-radius: 18px; padding: 14px 16px; margin-bottom: 18px; display: grid; gap: 8px; font-size: .95rem; }
.co-summary div { display: flex; justify-content: space-between; gap: 12px; }
.co-sum-total { border-top: 1px dashed var(--stone); padding-top: 10px; font-size: 1.05rem; }
.co-sum-total strong { font: 600 1.3rem/1 var(--serif); }
.till { background: #F1F8EE; border-radius: 18px; padding: 16px; margin-top: 4px; box-shadow: inset 0 0 0 2px #CFE5C6; }
.till-label { font: 700 .75rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #2F6B3A; margin-bottom: 10px; }
.till-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #CFE5C6; }
.till-row strong { font: 700 1.3rem/1 var(--sans); letter-spacing: .04em; }
.till-copy { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: #2F6B3A; color: #fff; font: 700 .8rem/1 var(--sans); cursor: pointer; }
.till-name { font-size: .86rem; color: var(--mauve); margin: 10px 0 12px; }
.payment-instructions { width: 100%; min-width: 0; box-sizing: border-box; }
.payment-steps { margin: 14px 0; padding-left: 22px; text-align: left; line-height: 1.55; }
.payment-steps li { margin: 4px 0; padding-left: 2px; overflow-wrap: anywhere; }
.mpesa-confirmation-form { margin: 16px 0 0; }
.payment-confirmation-actions { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--stone); }
.whatsapp-confirmation { display: flex; align-items: center; justify-content: center; gap: 8px; }
.whatsapp-confirmation .ico { width: 20px; height: 20px; flex: 0 0 20px; }
.form-error { color: var(--velvet); font-weight: 700; font-size: .92rem; min-height: 1.2em; margin: 6px 0; }
.co-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 8px; }
.co-done { width: 100%; min-width: 0; text-align: center; display: grid; gap: 14px; padding: 6px 0 4px; }
.co-done > * { min-width: 0; max-width: 100%; }
.co-done p { overflow-wrap: anywhere; }
.done-mark svg { width: 140px; height: 70px; fill: none; stroke: var(--lily); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s .1s ease-out forwards; }
.done-code { font: 600 2rem/1 var(--serif); letter-spacing: .04em; }
.done-lead { color: var(--mauve); }
.done-next { text-align: left; color: var(--mauve); font-size: .92rem; padding-left: 22px; margin: 6px 0 0; display: grid; gap: 6px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 70; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 12px 12px 12px 18px; border-radius: 999px; background: var(--ink); color: var(--cream); font: 500 .92rem/1.3 var(--sans); box-shadow: 0 10px 30px rgba(42,29,54,.3); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { flex: 0 0 auto; height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--butter); color: #2A1D36; font: 700 .85rem/1 var(--sans); cursor: pointer; }

/* ---------- layout tweaks for the new pieces ---------- */
#sticky-cta .ico { width: 20px; height: 20px; }
@media (min-width: 640px) {
  .yb-yarns { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .drawer-panel { left: auto; top: 0; bottom: 0; width: 460px; max-height: none; border-radius: 28px 0 0 28px; transform: translateX(100%); }
  .drawer.open .drawer-panel { transform: none; }
}
@media (max-width: 639px) {
  .drawer-body { padding-inline: 16px; }
  .till { padding: 14px 12px; }
  .till-row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 6px; }
  .till-row > span { min-width: 0; line-height: 1.25; }
  .till-row strong { min-width: 0; font-size: 1.05rem; line-height: 1.25; text-align: right; overflow-wrap: anywhere; }
  .till-copy { grid-column: 2; justify-self: end; }
  .co-done { gap: 10px; }
  .done-lead { font-size: 1.15rem; line-height: 1.35; }
  .co-done > p:not(.done-code) { font-size: 0.96rem; line-height: 1.55; }
  .done-code { font-size: clamp(1.55rem, 8vw, 2rem); }
  .payment-steps { padding-left: 20px; }
  .payment-steps li { font-size: 0.94rem; }
}
@media (min-width: 960px) {
  .bag-label { display: inline; }
  .toast { bottom: 32px; }
  .yb { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
  .yb-counter { position: sticky; top: 96px; }
  .yb-shelf { padding: 30px; }
  .yb-foot { margin: 18px -30px -30px; padding: 18px 30px 22px; }
  .yb-yarns { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .yb-pieces { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .ribbon { margin-bottom: 72px; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .yb { grid-template-columns: minmax(0, 1fr) minmax(390px, 1fr); gap: 32px; }
  .yb-shelf { padding: 24px; }
  .yb-foot { margin: 18px -24px -24px; padding: 18px 24px 22px; }
  .yb-yarns { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .yb-pieces { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .yb-piece { padding-inline: 2px; }
  .yb-piece-name { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
  .yb-piece-price { max-width: 100%; text-align: center; }
}
@media (max-width: 639px) {
  .yarnbar { padding-top: 44px; }
  .yb { gap: 14px; }
  .yb-counter { position: sticky; top: 72px; z-index: 4; background: var(--bar-bg); padding-bottom: 10px; }
  .yb-stage-wrap { max-width: 330px; aspect-ratio: 1; border-radius: 24px; }
  .yb-ticket { margin-top: 8px; }
  .yb-shelf { border-radius: 22px; padding: 16px 14px; }
  .yb-shelf .yb-step { margin-top: 16px; }
  .yb-pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yb-piece { min-height: 76px; }
  .yb-yarns { grid-template-columns: repeat(5, minmax(44px, 1fr)); max-height: 230px; overflow-y: auto; }
}

/* ---------- hero photo always fits the screen (no scrolling to see the bottom) ----------
   The frame is 4:5, so its width follows the space left under the header. */
.hero-media { width: min(100%, max(260px, calc((100vh - 72px - 64px) * .8))); justify-self: center; }
@supports (height: 100svh) {
  .hero-media { width: min(100%, max(260px, calc((100svh - 72px - 64px) * .8))); }
}
@media (min-width: 960px) {
  .hero { padding: 24px 0 40px; }
  .hero-grid { min-height: calc(100vh - 72px - 64px); }
  .hero-media { width: min(460px, max(300px, calc((100vh - 72px - 64px - 26px) * .8))); max-width: none; }
  @supports (height: 100svh) {
    .hero-grid { min-height: calc(100svh - 72px - 64px); }
    .hero-media { width: min(460px, max(300px, calc((100svh - 72px - 64px - 26px) * .8))); }
  }
  .hero-inset { bottom: 28px; right: -64px; width: 40%; }
}

/* =====================================================================
   Dark theme, "Lilac night": deep aubergine, the darkest step of the lilac grade.
   Deep aubergine page with a soft lilac sheen, pale text, soft lilac accents and buttons,
   white and butter hang tags. Same palette roles as light, so nothing breaks.
   ===================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --cream: #1D1426;          /* page: deep aubergine */
  --blush: #281C34;          /* product band: aubergine catching the light */
  --stone: #3D2D4F;          /* borders, rings */
  --ink: #F5EFFA;            /* text: cream */
  --mauve: #D6C8E4;          /* soft text */
  --velvet: #CBB5F0;         /* buttons + accent text: soft lilac (9.7:1 both ways) */
  --velvet-dark: #DDCEF8;
  --lily: #FF8DB3;
  --caramel: #E0A866;
  --paper: #281C34;
  --header-bg: rgba(29,20,38,.86);
  --bar-bg: #22182D;
  --bar-glow: #150E1C;
  --shelf-bg: #2C2039;
  --stage-1: #3A2B4C;
  --stage-2: #20172B;
  --footer-bg: #120C18;
  --footer-ink: #F5EFFA;
}
/* a soft lilac sheen across the page */
:root[data-theme="dark"] body {
  background:
    radial-gradient(1100px 700px at 15% -5%, rgba(203,181,240,.07), transparent 60%),
    radial-gradient(900px 900px at 110% 40%, rgba(203,181,240,.05), transparent 60%),
    var(--cream);
}
:root[data-theme="dark"] .ribbon { background: var(--ink); color: #6B47A3; }
:root[data-theme="dark"] .ribbon-track i { color: #DD1864; }
:root[data-theme="dark"] .till { background: #14241A; box-shadow: inset 0 0 0 2px #2C4A33; }
:root[data-theme="dark"] .till-label { color: #9FD3A6; }
:root[data-theme="dark"] .till-row { border-color: #2C4A33; }
:root[data-theme="dark"] .deliv-card.on, :root[data-theme="dark"] .pay-card.on { background: #3A2A55; }
:root[data-theme="dark"] .skeleton .card-img { background: linear-gradient(100deg, var(--stone) 30%, #4C3966 50%, var(--stone) 70%) 0 0 / 300% 100%; }
:root[data-theme="dark"] .stitch-frame { border-color: var(--caramel); }
:root[data-theme="dark"] .card { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
:root[data-theme="dark"] .card:hover { box-shadow: 0 14px 30px rgba(0,0,0,.45); }
:root[data-theme="dark"] .yarnbar::before { background: radial-gradient(60% 50% at 25% 30%, rgba(255,200,215,.08), transparent 70%), radial-gradient(40% 40% at 90% 90%, rgba(244,233,140,.05), transparent 70%); }
:root[data-theme="dark"] .bag-count { color: #1D1426; }
:root[data-theme="dark"] .moment-bar { background: #F5EFFA; color: #1D1426; }

/* ---------- theme toggle ---------- */
.theme-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; display: inline-grid; place-items: center; overflow: hidden; }
.theme-btn svg { width: 22px; height: 22px; transition: transform .5s cubic-bezier(.3,1.4,.5,1), opacity .3s; }
.theme-btn .sun { position: absolute; }
.theme-btn .sun circle, .theme-btn .sun path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .moon path { fill: currentColor; }
:root:not([data-theme="dark"]) .theme-btn .sun { transform: rotate(-90deg) scale(.4); opacity: 0; }
:root[data-theme="dark"] .theme-btn .moon { transform: rotate(90deg) scale(.4); opacity: 0; }

/* ---------- ink-bleed theme change (View Transitions) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
::view-transition-old(root) { z-index: 1; }
html.ink-fade, html.ink-fade * { transition: background-color .45s ease, color .45s ease, border-color .45s ease, box-shadow .45s ease !important; }

/* =====================================================================
   Poster moments: big glowing text in the back, the piece in the middle
   ===================================================================== */
.yb-stage-wrap { --p-text: #6B47A3; --p-aura: #F4B6C2; --p-main: #6B47A3; --p-accent: #F4B6C2;
  background:
    radial-gradient(55% 50% at 50% 46%, color-mix(in srgb, var(--p-aura) 34%, var(--stage-1)) 0%, transparent 70%),
    radial-gradient(90% 80% at 85% 100%, color-mix(in srgb, var(--p-accent) 26%, var(--stage-2)) 0%, transparent 70%),
    radial-gradient(70% 60% at 50% 38%, var(--stage-1) 0%, var(--stage-2) 55%, var(--bar-glow) 100%);
  transition: background .5s ease; }
.yb-aura { position: absolute; left: 50%; top: 47%; width: 70%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--p-aura) 70%, transparent) 0%, color-mix(in srgb, var(--p-accent) 35%, transparent) 45%, transparent 70%);
  filter: blur(28px); opacity: .85; animation: breathe 5s ease-in-out infinite; z-index: 0; }
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.12); opacity: .65; } }
.yb-bigtext, .moment-text {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-family: var(--serif); font-style: italic; font-weight: 600; line-height: .86; letter-spacing: -.045em; white-space: nowrap;
  color: color-mix(in srgb, var(--p-text) 88%, transparent);
  text-shadow: 0 0 .04em color-mix(in srgb, var(--p-aura) 90%, transparent), 0 0 .18em color-mix(in srgb, var(--p-aura) 70%, transparent), 0 0 .5em color-mix(in srgb, var(--p-aura) 55%, transparent);
  pointer-events: none; user-select: none; z-index: 0;
}
.yb-bigtext span, .moment-text span { display: block; }
.yb-bigtext { opacity: .92; padding-bottom: 4%; }
.yb-stage-wrap[data-kind="bouquet"] .yb-bigtext { justify-content: flex-end; padding-bottom: 5%; }
.yb-bigtext.swap span { animation: big-in .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes big-in { from { opacity: 0; transform: translateY(.18em) scale(1.06); filter: blur(10px); } }
.yb-stage { z-index: 1; inset: 11% 11% 13%; }
.yb-made { z-index: 40; }

.moment { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background:
    radial-gradient(60% 55% at 50% 45%, color-mix(in srgb, var(--p-aura) 45%, var(--cream)) 0%, transparent 70%),
    radial-gradient(80% 70% at 100% 100%, color-mix(in srgb, var(--p-accent) 40%, var(--cream)) 0%, transparent 70%),
    radial-gradient(80% 70% at 0% 0%, color-mix(in srgb, var(--p-main) 26%, var(--cream)) 0%, transparent 70%),
    var(--cream);
  opacity: 0; transition: opacity .35s ease; }
.moment.in { opacity: 1; }
.moment.out { opacity: 0; transition: opacity .55s ease .15s; }
.moment-aura { position: absolute; left: 50%; top: 46%; width: min(90vw, 90vh); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--p-aura) 80%, transparent) 0%, color-mix(in srgb, var(--p-accent) 40%, transparent) 40%, transparent 68%);
  filter: blur(40px); animation: breathe 3.5s ease-in-out infinite; }
.moment-text span { opacity: 0; transform: translateY(.25em) scale(1.08); filter: blur(14px); }
.moment.in .moment-text span { animation: big-in .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * 90ms); opacity: 1; transform: none; filter: none; }
.moment-subject { position: relative; z-index: 2; width: min(56vw, 52vh, 420px); transform: scale(.6) rotate(-6deg); opacity: 0; transition: transform .6s cubic-bezier(.2,1.5,.4,1) .12s, opacity .3s ease .12s; }
.moment.in .moment-subject { transform: none; opacity: 1; }
.moment-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; display: block;
  box-shadow: 0 0 0 6px var(--cream), 0 30px 60px -20px rgba(42,29,54,.5), 0 0 80px color-mix(in srgb, var(--p-aura) 70%, transparent); transform: rotate(-3deg); }
.moment-piece { position: relative; width: 100%; aspect-ratio: 1; filter: drop-shadow(0 24px 30px rgba(42,29,54,.3)); }
.moment-piece .yb-layer { animation: none !important; }
.moment-bar { position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); z-index: 3; transform: translate(-50%, 30px); opacity: 0;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 999px; background: var(--ink); color: var(--cream);
  box-shadow: 0 14px 30px rgba(42,29,54,.3); transition: transform .5s cubic-bezier(.2,1.4,.4,1) .35s, opacity .3s ease .35s; white-space: nowrap; font: 700 .95rem/1 var(--sans); }
.moment.in .moment-bar { transform: translate(-50%, 0); opacity: 1; }
.moment-check { width: 30px; height: 30px; border-radius: 50%; background: var(--butter); display: grid; place-items: center; }
.moment-check svg { width: 18px; height: 18px; fill: none; stroke: #2A1D36; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.moment.in .moment-check svg { animation: tick .4s .55s ease-out forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
.moment-view { height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--butter); color: #2A1D36; font: 700 .88rem/1 var(--sans); cursor: pointer; }
.moment.is-photo .moment-subject { width: min(40vw, 40vh, 300px); }
.moment.is-photo .moment-photo img { transform: rotate(-6deg); }
.moment .moment-text { color: color-mix(in srgb, var(--p-text) 92%, #2A1D36); }
:root[data-theme="dark"] .moment .moment-text { color: color-mix(in srgb, var(--p-text) 85%, #FFFFFF); }
@media (max-width: 459px) {
  .header-ig { display: none; }
  .wordmark { font-size: 1.4rem; }
  .brand-mark { width: 40px; height: 40px; }
}

/* ---------- optional accounts (header button, checkout notes) ---------- */
.account-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); color: var(--ink); display: inline-grid; place-items: center; text-decoration: none; flex: 0 0 auto; }
.account-btn .ico { width: 21px; height: 21px; }
.account-btn:hover { background: var(--ink); color: var(--cream); }
.account-btn.signed-in { background: var(--velvet); border-color: var(--velvet); color: var(--cream); font: 700 1.05rem/1 var(--serif); }
.co-who { background: var(--blush); border-radius: 14px; padding: 10px 14px; margin: -4px 0 16px; font-size: .9rem; color: var(--ink); }
.co-who a, .co-track { color: var(--velvet); font-weight: 700; }
.co-track { display: block; text-align: center; margin-top: 4px; text-decoration: none; }

/* ---------- hero scroll cue (desktop) ---------- */
.hero { position: relative; }
.scroll-cue { display: none; }
@media (min-width: 960px) and (min-height: 640px) {
  .scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
    color: var(--mauve); text-decoration: none; font: 500 .82rem/1 var(--sans); letter-spacing: .04em; }
  .scroll-cue svg { width: 18px; height: 30px; fill: none; stroke: var(--velvet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: cue 2.2s ease-in-out infinite; }
  .scroll-cue .cue-loop { stroke: var(--lily); }
  .scroll-cue:hover { color: var(--velvet); }
  @keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
}

/* hero: the pink thread loops beside "Made by hand." instead of over "kept." */
.thread { top: -22px; right: 2px; width: 104px; transform: rotate(-10deg); }
@media (min-width: 640px) { .thread { right: 18%; width: 120px; } }
@media (min-width: 960px) {
  .thread { top: -6px; right: 6%; width: 150px; }
  .hero { padding-bottom: 64px; }
  .scroll-cue { bottom: 10px; }
}
@media (max-width: 420px) { .thread { right: -6px; width: 82px; top: -16px; } }

/* keep the scroll cue on screen: it sits in the hero's bottom padding */
@media (min-width: 960px) and (min-height: 640px) {
  .scroll-cue { bottom: 14px; gap: 2px; }
  .scroll-cue svg { height: 24px; }
  .hero-grid { min-height: calc(100vh - 72px - 96px); }
  @supports (height: 100svh) { .hero-grid { min-height: calc(100svh - 72px - 96px); } }
}

/* ---------- hero copy fit (5-second headline) ---------- */
.trust #yarn-count { color: inherit; font-size: inherit; }
.hero h1 { font-size: clamp(2rem, 10.2vw, 4.8rem); }
@media (min-width: 960px) { .thread { top: -26px; right: 0; width: 118px; } }
@media (max-width: 380px) {
  .thread { display: none; }
  :root { --gutter: 14px; }
  .header-inner { gap: 6px; }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .wordmark { font-size: 1.15rem; }
  .theme-btn, .account-btn, .bag-btn { width: 38px; height: 38px; }
  .bag-btn { padding: 0; justify-content: center; }
}

/* =====================================================================
   Phone-first layout: wordmark, bag and menu; stacked hero with thumb-sized
   buttons; one heading pattern for every section (eyebrow, heading, line);
   every tap target 44px or more.
   ===================================================================== */
section[id], #top { scroll-margin-top: 84px; }   /* in-page links land below the sticky header */

/* ---------- header ---------- */
.menu-btn { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 50%; background: none; color: var(--ink); cursor: pointer; transition: background .2s, color .2s; }
.menu-bars { position: relative; display: block; width: 20px; height: 13px; }
.menu-bars i { position: absolute; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s cubic-bezier(.3,1.3,.5,1), width .3s, top .3s; }
.menu-bars i:first-child { top: 1.5px; width: 20px; }
.menu-bars i:last-child { top: 9.5px; width: 13px; }
.menu-btn[aria-expanded="true"] .menu-bars i { top: 5.5px; width: 19px; }
.menu-btn[aria-expanded="true"] .menu-bars i:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-bars i:last-child { transform: rotate(-45deg); }
@media (max-width: 959px) {
  .site-header, .site-header.scrolled { border-bottom-color: transparent; }
  .header-inner { gap: 2px; border-bottom: 1px solid var(--stone); }
  .site-header .brand-mark { display: none !important; }
  .wordmark { font-size: 1.65rem; }
  .bag-btn { width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; justify-content: center; }
  .bag-btn .ico { width: 26px; height: 26px; }
  .bag-btn:hover { background: none; color: var(--ink); }
  .bag-count { top: 3px; right: 1px; }
  .menu-btn { width: 48px; height: 48px; margin-right: -10px; border: 0; }
  .menu-bars { width: 26px; height: 16px; }
  .menu-bars i { height: 2.5px; }
  .menu-bars i:first-child { top: 2px; width: 26px; }
  .menu-bars i:last-child { top: 11.5px; width: 17px; }
  .menu-btn[aria-expanded="true"] .menu-bars i { top: 6.75px; width: 24px; }
}
@media (min-width: 960px) {
  .header-inner { gap: 12px; }
  .nav { gap: 34px; margin-right: 22px; }
  .menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--cream); }
}

/* ---------- the menu ---------- */
.menu[hidden] { display: none; }
.menu { position: absolute; left: 0; right: 0; top: 100%; opacity: 0; transform: translateY(-8px); transition: opacity .22s, transform .28s cubic-bezier(.2,.9,.3,1); }
.menu.open { opacity: 1; transform: none; }
.menu-links { display: flex; flex-direction: column; }
.menu-links a { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 10px 0; border-bottom: 1px solid var(--stone);
  font: 600 1.65rem/1.15 var(--serif); color: var(--ink); text-decoration: none; }
.menu-links a::after, .chev { content: ""; flex: 0 0 auto; width: 9px; height: 9px; margin: 0 6px 0 auto; border-top: 2px solid var(--velvet); border-right: 2px solid var(--velvet); transform: rotate(45deg); }
.menu-links small { margin-left: auto; font: 500 .82rem/1 var(--sans); color: var(--mauve); }
.menu-links a:has(small)::after { margin-left: 0; }
.menu-links a:active { color: var(--velvet); }
/* account and dark mode: one grouped card */
.menu-card { border-radius: 20px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--stone); overflow: hidden; }
.menu-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 0 18px; border: 0; background: none; color: var(--ink);
  font: 700 1rem/1.2 var(--sans); text-align: left; text-decoration: none; cursor: pointer; }
.menu-row .ico { width: 22px; height: 22px; color: var(--velvet); }
.menu-row-text { flex: 1; min-width: 0; }
.menu-initial { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--velvet); color: var(--cream); font: 600 .95rem/1 var(--serif); }
.menu .menu-theme { width: 100%; height: auto; border: 0; border-radius: 0; overflow: visible; display: flex; }
.menu .menu-card .menu-theme { border-top: 1px solid var(--stone); }
.menu-theme-ico { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; color: var(--velvet); }
.when-dark, :root[data-theme="dark"] .when-light { display: none; }
:root[data-theme="dark"] .when-dark { display: inline; }
.menu-switch { position: relative; flex: 0 0 auto; width: 46px; height: 28px; border-radius: 999px; background: var(--stone); transition: background .25s; }
.menu-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(42,29,54,.25); transition: transform .25s cubic-bezier(.3,1.3,.5,1); }
:root[data-theme="dark"] .menu-switch { background: var(--velvet); }
:root[data-theme="dark"] .menu-switch::after { transform: translateX(18px); background: var(--cream); }
/* contact: two small buttons side by side */
.menu-contact { display: flex; gap: 10px; }
.menu-chip { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--stone); color: var(--ink); font: 700 .95rem/1 var(--sans); text-decoration: none; transition: box-shadow .2s; }
.menu-chip .ico { width: 20px; height: 20px; color: var(--velvet); }
.menu-chip:hover { box-shadow: inset 0 0 0 2px var(--velvet); }
html:not(.has-whatsapp) .menu-wa { display: none; }

/* phones and tablets: a full sheet; sections on top, account and contact down in thumb reach */
@media (max-width: 959px) {
  .menu { height: calc(100vh - 72px); overflow-y: auto; overscroll-behavior: contain; background: var(--cream); }
  @supports (height: 100dvh) { .menu { height: calc(100dvh - 72px); } }
  .menu-inner { display: flex; flex-direction: column; gap: 14px; min-height: 100%; padding-top: 10px; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .menu-card { margin-top: auto; }
  html.menu-open body { overflow: hidden; }
  html.menu-open .sticky-order { transform: translateY(110%); }
}
/* desktop: a small dropdown under the menu button (the sections are already in the header) */
@media (min-width: 960px) {
  .menu { left: auto; right: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); top: calc(100% + 6px); width: 300px;
    border-radius: 22px; background: var(--paper); box-shadow: 0 18px 44px rgba(42,29,54,.16), inset 0 0 0 1px var(--stone); }
  .menu-inner { display: grid; gap: 10px; padding: 8px 8px 10px; }
  .menu-links { display: none; }
  .menu-card { box-shadow: none; border-radius: 16px; }
  .menu-row { min-height: 52px; padding: 0 14px; border-radius: 14px; }
  .menu-row:hover { background: var(--cream); }
  .menu .menu-card .menu-theme { border-top-color: transparent; }
  .menu-contact { padding: 8px 6px 0; border-top: 1px solid var(--stone); }
  .menu-chip { min-height: 44px; font-size: .9rem; }
}

/* ---------- hero ---------- */
.hero h1 { text-wrap: balance; }                 /* never leave one word alone on a line */
/* "crochet" in deep lilac italic, with a running stitch sewn underneath */
.hero h1 em { display: inline; position: relative; font-style: italic; color: var(--velvet); white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 3%; right: 6%; bottom: -.1em; height: .2em; background: var(--lily);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8C25 3 45 10 62 6S100 3 117 6' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-dasharray='9 6' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8C25 3 45 10 62 6S100 3 117 6' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-dasharray='9 6' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  animation: stitch-in .9s .35s cubic-bezier(.4,0,.2,1) both; }
.show-loader .hero h1 em::after { animation-delay: 3.4s; }
@keyframes stitch-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
/* the products read first: ink and bold, the rest of the line in soft mauve */
.hero .lede strong { color: var(--ink); font-weight: 700; }
/* trust row: small drawn icons in blush circles */
.trust .trust-ico { display: inline-grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--blush); color: var(--velvet); }
.trust-ico .ico { width: 15px; height: 15px; stroke-width: 1.7; }
:root[data-theme="dark"] .trust .trust-ico { background: var(--stone); }
@media (min-width: 640px) and (max-width: 959px) { .hero-media { width: min(100%, 520px); } }
.btn-arrow { width: 20px; height: 20px; transition: transform .2s; }
.btn:hover .btn-arrow { transform: translateX(3px); }
@media (max-width: 959px) {
  .thread { display: none; }
  .hero-grid { gap: 28px; }
  .stitch-frame { border: 0; padding: 0; }
  .hero-tag { top: 18px; right: 18px; }
}
@media (max-width: 639px) {
  .hero { padding-top: 34px; }
  .hero h1 { font-size: min(3.2rem, calc((100vw - 40px) / 9.3)); }    /* one line on every phone ("Handmade crochet." is ~9em wide) */
  .hero-copy .lede { margin-top: 22px; font-size: 1.12rem; line-height: 1.6; max-width: none; }
  .hero-actions { flex-direction: column; gap: 14px; margin-top: 28px; }
  .hero-actions .btn { flex: none; width: 100%; min-height: 58px; font-size: 1.08rem; }
  /* three even columns, never a ragged wrap */
  .trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 26px; padding: 16px 0; border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone); }
  .trust li { flex-direction: column; justify-content: flex-start; gap: 8px; padding: 0 6px; text-align: center; font: 500 .84rem/1.3 var(--sans); color: var(--ink); }
  .trust li + li { border-left: 1px solid var(--stone); }
  .trust .trust-ico { width: 38px; height: 38px; }
  .trust-ico .ico { width: 20px; height: 20px; }
}

/* ---------- section heads ---------- */
.section-head { display: block; margin-bottom: 24px; }
.section-head .sub { margin-top: 6px; }
@media (max-width: 959px) {
  .yb-head { text-align: left; margin: 0 0 28px; }
  .yb-head .lede { margin: 12px 0 0; }
  .feature-copy .btn { width: 100%; }
}

/* hover colours only where there is a real pointer: on phones a tap would leave them stuck on */
@media (hover: hover) and (max-width: 959px) {
  .bag-btn:hover, .menu-btn:hover { background: var(--blush); color: var(--ink); }
}

/* ---------- Yarn Bar choices and the wordmark: 44px touch targets ---------- */
.pill, .wrap-sw { min-height: 44px; }
.pill { min-width: 44px; }
.brand { min-height: 44px; }

/* ---------- bag drawer: 44px touch targets ---------- */
.drawer-close { width: 44px; height: 44px; }
.qty button { width: 44px; height: 44px; }
.co-remove { position: relative; }
.co-remove::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }

/* ---------- product cards: the price, then a full-width button ---------- */
.card-foot { flex-direction: column; align-items: stretch; gap: 10px; }
.card-foot > .tag, .card-foot > .price-row { align-self: flex-start; }
/* sale: the real price on its tag, the was price crossed out beside it */
.price-row { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.was { color: var(--mauve); font: 500 .86rem/1 var(--sans); text-decoration-thickness: 1.5px; text-decoration-color: var(--lily); }
.badge-sale { background: #B3134F; color: #fff; left: auto; right: 10px; }   /* 6:1 with white, same in both themes */
.co-price { white-space: nowrap; text-align: right; }
.co-price .was { display: block; font-size: .8rem; margin-bottom: 3px; }
.co-save { margin: -6px 0 14px; padding: 8px 12px; border-radius: 12px; background: var(--blush); color: var(--velvet); font: 700 .9rem/1.3 var(--sans); text-align: center; }
.card-btn { width: 100%; height: 44px; justify-content: center; font-size: .9rem; }

/* ---------- the app: install buttons appear only when the phone can install ---------- */
.menu-install, .hello-install { display: none; }
.can-install .menu-install { display: flex; }
.can-install .hello-install { display: inline-flex; }
.install-help .hello-install { display: inline-flex; } /* the admin's: always offered, with steps if the browser has no prompt */
.is-app [data-install] { display: none !important; }
.menu .menu-card .menu-install { border: 0; border-top: 1px solid var(--stone); border-radius: 0; background: none; }
/* iPhone: how to add it to the home screen */
.install-tip { position: fixed; z-index: 80; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto; padding: 18px 18px 16px;
  border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 18px 44px rgba(42,29,54,.28), inset 0 0 0 1px var(--stone); animation: tip-up .3s cubic-bezier(.2,.9,.3,1); }
.install-tip-title { font: 600 1.25rem/1.2 var(--serif); }
.install-tip ol { margin: 10px 0 14px; padding-left: 20px; display: grid; gap: 6px; color: var(--mauve); }
.install-tip b { color: var(--ink); }
.install-tip-alt { margin: -4px 0 12px; font: 500 .9rem/1.4 var(--sans); color: var(--mauve); }
.install-tip svg { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--velvet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install-tip-close { width: 100%; min-height: 48px; border: 0; border-radius: 999px; background: var(--velvet); color: var(--cream); font: 700 1rem/1 var(--sans); cursor: pointer; }
.install-tip-go { display: grid; place-items: center; text-decoration: none; }
.install-tip-later { width: 100%; min-height: 44px; margin-top: 6px; border: 0; background: none; color: var(--velvet); font: 700 .95rem/1 var(--sans); cursor: pointer; }
@keyframes tip-up { from { transform: translateY(20px); opacity: 0; } }
/* installed: leave room for the phone's status bar */
.is-app .site-header { padding-top: env(safe-area-inset-top); }
