:root {
  --cream: #fff6ea;
  --paper: #fffdf8;
  --pink: #f9b9cb;
  --pink-soft: #fde3ea;
  --pink-deep: #d96a8f;
  --mint: #c4ecda;
  --mint-soft: #e5f7ee;
  --butter: #ffe3a1;
  --sky: #d6e8fb;
  --lilac: #e6dcf6;
  --gold: #f4a925;
  --gold-foil: linear-gradient(135deg, #fff3c4, #fcc232 45%, #e39b12);
  --choc: #4a2a1a;
  --choc-soft: #75523f;
  --line: #f0dcc6;
  --ink: #4a2a1a;
  --cart-bg: #fffdf8;
  --dot-pink: #fbd5df;
  --dot-mint: #d3efe2;
  --theme-color: #fff6ea;
  --error: #a3262a;
  --bat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50'%3E%3Cpath d='M50 14 46 5 44 16C36 8 18 6 2 14 10 18 12 24 12 30 18 26 24 26 28 32 32 28 38 28 42 34 44 38 47 42 50 44 53 42 56 38 58 34 62 28 68 28 72 32 76 26 82 26 88 30 88 24 90 18 98 14 82 6 64 8 56 16L54 5Z'/%3E%3C/svg%3E");
  --display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --body: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --t-press: 70ms;
  --t-quick: 220ms;
  --t-enter: 460ms;
  --t-spring: 640ms;
  --t-idle: 3.2s;
  --stagger: 45ms;
  --t-theme: 700ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pop: cubic-bezier(0.3, 1.6, 0.5, 1);
  --ease-jelly: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

/* A sampled damped spring. Browsers without linear() keep the cubic-bezier above. */
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --ease-jelly: linear(0, 0.218, 0.644, 1.012, 1.204, 1.226, 1.148, 1.049, 0.976, 0.947, 0.952, 0.974, 0.996, 1.009, 1.013, 1.01, 1);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.45;
  color: var(--choc);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle, var(--dot-pink) 2px, transparent 2.6px),
    radial-gradient(circle, var(--dot-mint) 2px, transparent 2.6px);
  background-size: 46px 46px;
  background-position: 0 0, 23px 23px;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, .price, .btn, .tiles, .card-name, .mini-code, .stepper output {
  font-family: var(--display);
  font-weight: 800;
}

h1 { font-size: 1.9rem; line-height: 1.15; margin: 0 0 10px; }
h1:focus { outline: none; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }

a { color: inherit; }

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

button { font: inherit; color: inherit; cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 16px 6px;
}

.brand { justify-self: start; }

/* The day and night logos share one cell. --night fades from one to the other with the theme. */
.logo { display: grid; }
.logo img { grid-area: 1 / 1; opacity: calc(1 - var(--night)); }
.logo .night { opacity: var(--night); }

.brand img { display: block; height: 52px; }

.cart-link {
  position: relative;
  justify-self: end;
  display: grid;
  place-items: center;
  min-width: 60px;
  min-height: 52px;
  padding: 0 14px;
  border: 3px solid var(--choc);
  border-radius: 999px;
  background: var(--cart-bg);
  box-shadow: 0 4px 0 var(--line);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
}
.cart-link[aria-current] { background: var(--mint); }
.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 2px solid var(--choc);
  border-radius: 999px;
  background: var(--pink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
}
.cart-count[hidden] { display: none; }

.tag {
  justify-self: start;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--pink);
  font-weight: 800;
  font-size: 0.85rem;
}

.langs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid var(--line);
}

.langs button {
  min-width: 56px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 800;
  font-size: 1rem;
}

.langs button[aria-pressed="true"] {
  background: var(--choc);
  color: var(--cream);
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 24px;
  outline: none;
}

.foot {
  text-align: center;
  padding: 8px 16px max(24px, env(safe-area-inset-bottom));
}

.foot img { height: 40px; }
.foot .logo { opacity: calc(0.8 + 0.2 * var(--night)); }

.card {
  display: block;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 28px;
  padding: 20px;
  margin: 0 0 18px;
  box-shadow: 0 6px 0 var(--line);
  text-decoration: none;
}

.hello { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--choc-soft); }
.desc { font-size: 1.1rem; margin: 6px 0 14px; }
.center { text-align: center; }
.boot { margin: 28vh 0 0; text-align: center; font-size: 4rem; line-height: 1; }
.boot span { display: inline-block; }
.fine { margin: 12px 0 0; text-align: center; color: var(--choc-soft); font-size: 0.95rem; }

.link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  margin: 0 0 10px;
  border: 3px solid var(--choc);
  border-radius: 999px;
  background: var(--paper);
  color: var(--choc);
  box-shadow: 0 4px 0 var(--line);
  font-weight: 800;
  text-decoration: none;
}

.steps {
  display: flex;
  list-style: none;
  margin: 2px 0 14px;
  padding: 0;
}

.steps li {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--choc-soft);
  text-align: center;
}

.steps li + li::before, .steps li + li::after {
  content: "";
  position: absolute;
  top: 16px;
  right: calc(50% + 20px);
  left: calc(-50% + 20px);
  height: 4px;
  border-radius: 4px;
  background: var(--line);
}

.steps li + li::after { background: var(--mint); scale: 0 1; transform-origin: left; }
.steps li.done + li::after { scale: 1; }

.steps .dot {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--line);
  font-family: var(--display);
  font-size: 1rem;
}

.steps li.done .dot { background: var(--mint); border-color: var(--mint); }
.steps li[aria-current] { color: var(--choc); }
.steps li[aria-current] .dot {
  background: var(--pink);
  border-color: var(--choc);
  transform: scale(1.12);
}

/* The art is not clipped, so a boing can stretch the charm past the edge of its blob. */
.art {
  position: relative;
  aspect-ratio: 1;
  border-radius: 47% 53% 50% 50% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 50% 52%, #fffaf7 0 34%, var(--pink-soft) 62%, #f8c9d6);
  -webkit-user-select: none;
  user-select: none;
}

.art::after {
  content: "";
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: 12%;
  height: 5%;
  border-radius: 50%;
  background: rgba(74, 42, 26, 0.14);
}

.art img, .art .glint {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  pointer-events: none;
}

.art-big {
  width: min(78%, 300px);
  margin: 0 auto 6px;
  cursor: pointer;
}

.art-card { width: min(100%, 300px); margin: 0 auto 10px; }

/* The 3D page's stage. Its canvas takes over from the image once the model has loaded. Until then it is hidden,
   so neither a finger nor the keyboard can reach an empty canvas. touch-action only here, so the page scrolls elsewhere. */
.art-stage { width: min(78%, 300px); margin: 0 auto 6px; }
.art canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  border-radius: 50%;
  touch-action: none;
  cursor: grab;
  visibility: hidden;
  opacity: 0;
}
.art canvas:active { cursor: grabbing; }
.art.live canvas { visibility: visible; opacity: 1; }
.art.live img { visibility: hidden; opacity: 0; }

/* The way to the 3D page, a sticker on the art's corner. */
.turn-3d {
  position: absolute;
  z-index: 1;
  top: -6px;
  right: -10px;
  rotate: 5deg;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 3px solid var(--choc);
  border-radius: 999px;
  background: var(--butter);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--choc);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.ghost .turn-3d { display: none; }

.turn-hint { margin: 2px 0 14px; text-align: center; font-weight: 800; color: var(--choc-soft); visibility: hidden; opacity: 0; }
.live + .turn-hint:not(.done) { visibility: visible; opacity: 1; }
.view-3d > h1 { text-align: center; }
.view-3d > .blind, .view-3d .blind .fine { text-align: center; }
.view-3d .eye-dots { gap: 14px; }

/* Gold is the rarest muffin, so its preview gets a gold stage with rays turning behind it. */
.art-gold {
  isolation: isolate;
  background: radial-gradient(circle at 50% 50%, #fffdf0 0 30%, #ffe9a8 62%, #fcd36a);
  box-shadow: 0 0 40px 8px rgba(252, 194, 50, 0.45);
}
.art-gold::before {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: -1;
  border-radius: 50%;
  background: repeating-conic-gradient(from 8deg, rgba(252, 194, 50, 0.55) 0 9deg, transparent 9deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 70%);
  mask-image: radial-gradient(circle, #000 35%, transparent 70%);
}
.art-gold img { filter: drop-shadow(0 0 10px rgba(252, 194, 50, 0.8)); }

/* Rare muffins get a softer stage tinted with their own eye color, and no rays. */
.art-rare {
  background: radial-gradient(circle at 50% 50%, #fff 0 30%, color-mix(in srgb, var(--eye) 22%, #fff) 62%, color-mix(in srgb, var(--eye) 42%, #fff));
  box-shadow: 0 0 30px 4px color-mix(in srgb, var(--eye) 35%, transparent);
}
.art-rare img { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--eye) 55%, transparent)); }

/* The Halloween special stands on a night sky with a warm glow behind it, so the orange pumpkin pops. */
.art-halloween {
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 196, 92, 0.9) 0 14%, rgba(255, 138, 31, 0.45) 34%, transparent 56%),
    radial-gradient(circle at 16% 58%, #fff 0 0.7%, transparent 1.2%),
    radial-gradient(circle at 30% 30%, #fff 0 0.5%, transparent 1%),
    radial-gradient(circle at 58% 14%, #fff 0 0.6%, transparent 1.1%),
    radial-gradient(circle at 86% 62%, #fff 0 0.5%, transparent 1%),
    radial-gradient(circle at 76% 84%, #fff 0 0.4%, transparent 0.9%),
    linear-gradient(165deg, #43207a, #2a1356 55%, #1a0b38);
  box-shadow: 0 0 30px 4px rgba(255, 138, 31, 0.3);
}
.art-halloween::after { background: rgba(0, 0, 0, 0.4); }
.art-halloween img { filter: drop-shadow(0 0 10px rgba(255, 160, 50, 0.6)); }
/* A full disc masked by an offset circle leaves a crescent. */
.moon {
  position: absolute;
  left: 68%;
  top: 9%;
  width: 15%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff1c1;
  -webkit-mask-image: radial-gradient(circle at 72% 30%, transparent 44%, #000 46%);
  mask-image: radial-gradient(circle at 72% 30%, transparent 44%, #000 46%);
  filter: drop-shadow(0 0 6px rgba(255, 241, 193, 0.7));
}
.bat {
  position: absolute;
  width: var(--w, 16%);
  aspect-ratio: 2;
  background: #120720;
  -webkit-mask: var(--bat) center / contain no-repeat;
  mask: var(--bat) center / contain no-repeat;
}
/* The moon is the first span in the art, so the bats are spans 2 to 4. */
.bat:nth-of-type(2) { left: 14%; top: 20%; rotate: -12deg; }
.bat:nth-of-type(3) { left: 30%; top: 9%; --w: 10%; rotate: 8deg; }
.bat:nth-of-type(4) { left: 78%; top: 34%; --w: 12%; rotate: 14deg; }

/* A narrow light band masked to the muffin. At rest it sits off the muffin, so without motion nothing is bleached. */
.glint {
  pointer-events: none;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
  mix-blend-mode: screen;
  background: linear-gradient(105deg, transparent 46%, rgba(255, 240, 190, 0.85) 50%, transparent 54%) 0 0 / 300% 100% no-repeat;
}

/* The base state is the visible one, so the stars stay when motion is reduced. */
.twinkle {
  position: absolute;
  translate: -50% -50%;
  color: #fcc232;
  text-shadow: 0 0 8px #fff3c4;
  font-size: calc(1.6rem * var(--s, 1));
  font-style: normal;
  line-height: 1;
  pointer-events: none;
}
.twinkle:nth-of-type(1) { left: 22%; top: 22%; }
.twinkle:nth-of-type(2) { left: 78%; top: 16%; --s: 1.15; }
.twinkle:nth-of-type(3) { left: 11%; top: 50%; --s: 0.8; }
.twinkle:nth-of-type(4) { left: 89%; top: 44%; }
.twinkle:nth-of-type(5) { left: 40%; top: 9%; --s: 0.7; }
.art-rare .twinkle, .prize-rare .twinkle { color: #fff; text-shadow: 0 0 6px var(--eye), 0 0 2px var(--eye); }
/* Rare has only three, so the third crosses to the right to balance the first two. */
.art-rare .twinkle:nth-of-type(3) { left: 89%; top: 44%; }

.product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.product-head h1 { margin: 0; font-size: 1.75rem; }

.price {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--butter);
  box-shadow: 0 3px 0 #e8c46c;
  font-size: 1.2rem;
  transform: rotate(-3deg);
  white-space: nowrap;
}

.price-big { font-size: 1.6rem; padding: 8px 18px; }

.buy { padding: 16px; }
.qty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
.qty-row .stepper { margin-left: auto; }
.added {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 3px solid var(--mint);
  border-radius: 22px;
  background: var(--mint-soft);
}
.added:empty { margin: 0; padding: 0; border: 0; }
.added-note { font-weight: 800; font-size: 1.15rem; }
.buy-label { font-weight: 800; font-size: 1.2rem; white-space: nowrap; }
.pickup-plan { margin: 14px 0 0; text-align: center; font-weight: 700; font-size: 1.05rem; text-wrap: pretty; }
.pickup-plan .when {
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--butter);
  color: var(--ink);
  font-weight: 800;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.round {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--choc);
  background: var(--mint);
  box-shadow: 0 5px 0 var(--choc);
  font-family: var(--display);
  font-size: 2.2rem;
  line-height: 1;
}
.round[aria-disabled="true"] { opacity: 0.35; cursor: default; }

.stepper output {
  min-width: 1.6em;
  font-size: 2.6rem;
  line-height: 1;
  text-align: center;
}

.btn-total {
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--paper);
  font-size: 1.1rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  padding: 10px 24px;
  border: 3px solid var(--choc);
  border-radius: 999px;
  background: var(--pink);
  color: var(--ink);
  box-shadow: 0 6px 0 var(--choc);
  font-size: 1.4rem;
  text-align: center;
  text-decoration: none;
}
.btn:disabled { opacity: 0.7; cursor: progress; }

.btn-soft { background: var(--paper); font-size: 1.15rem; min-height: 60px; margin: 6px 0 12px; }
.btn-small { width: auto; min-height: 56px; font-size: 1.1rem; padding: 6px 18px; box-shadow: 0 4px 0 var(--choc); }

.grid {
  display: grid;
  /* Two cards share a row from a 360 px phone up, so every charm is on the first screen. */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0 16px;
  margin-top: 12px;
}

.product-card { padding: 14px 16px 18px; container-type: inline-size; }
.card-name { display: block; font-size: 1.45rem; margin-bottom: 10px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* A half-width card is too narrow for price and pill side by side. min-height lines up the prices when one name wraps. */
@container (max-width: 240px) {
  .card-name { font-size: 1.1rem; min-height: 2.5em; }
  .card-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-row .pill { align-self: stretch; justify-content: center; min-height: 48px; padding: 0 12px; }
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 999px;
  border: 3px solid var(--choc);
  background: var(--pink);
  font-weight: 800;
  font-size: 1.1rem;
  white-space: nowrap;
}

.reservations ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reservations a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--cream);
  text-decoration: none;
  font-weight: 800;
}
.reservations a > :last-child { margin-left: auto; }
.mini-code { font-size: 1.4rem; letter-spacing: 0.14em; }

.lookup-row { display: flex; gap: 10px; }
.lookup input {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  padding: 0 18px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: #fff;
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--choc);
}
.lookup input::placeholder { color: #c9b2a2; }
.lookup input:focus { border-color: var(--choc); outline: none; box-shadow: 0 0 0 4px var(--pink-soft); }

.lines { list-style: none; margin: 0; padding: 0; }
.lines li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-weight: 700;
}
.thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--pink-soft);
}
.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  transform: scale(1.4) translateY(2%);
}
.line-name { flex: 1; font-size: 1.1rem; }
.line-price { white-space: nowrap; }

.x {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper);
  font-size: 1.4rem;
}

.sum {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 10px 0 4px;
  padding-top: 10px;
  border-top: 3px dotted var(--line);
  font-weight: 800;
  font-size: 1.15rem;
}
.sum strong { font-family: var(--display); font-size: 1.5rem; }

.cart-lines li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "thumb name x" "step step price";
  gap: 10px 12px;
  padding: 12px 0;
}
.cart-lines li + li { border-top: 3px dotted var(--line); }
.cart-lines .thumb { grid-area: thumb; }
.cart-lines .line-name { grid-area: name; }
.cart-lines .x { grid-area: x; justify-self: end; }
.cart-lines .stepper { grid-area: step; }
.cart-lines .line-price { grid-area: price; justify-self: end; font-family: var(--display); font-size: 1.2rem; }
.cart-lines .round { width: 52px; height: 52px; font-size: 1.9rem; }
.cart-lines .stepper output { font-size: 2.1rem; }
.cart .pickup-plan { margin-top: 12px; }
.cart-empty { text-align: center; }
.cart-empty p { margin: 0 0 14px; font-weight: 800; font-size: 1.2rem; }
.cart-empty-icon { display: block; font-size: 3.4rem; line-height: 1.2; }

.field { display: grid; gap: 6px; margin-bottom: 20px; }
.field label { font-weight: 800; font-size: 1.15rem; }
.hint { color: var(--choc-soft); font-size: 0.95rem; margin-top: -4px; }

.field [type=text], .field textarea {
  width: 100%;
  min-height: 58px;
  padding: 12px 18px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--choc);
  font: inherit;
  font-size: 1.2rem;
}
.field textarea { resize: vertical; min-height: 96px; }
.field [type=text]::placeholder, .field textarea::placeholder { color: #b39a8a; }
.field [type=text]:focus, .field textarea:focus {
  outline: none;
  border-color: var(--choc);
  box-shadow: 0 0 0 5px var(--pink-soft);
}

.err { color: var(--error); font-weight: 800; }
.err:empty { display: none; }
.err::before { content: "🙈 "; }
.field.invalid [type=text], .field.invalid textarea, .field.invalid .check { border-color: var(--error); background: #fff5f3; }

.rules { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; font-weight: 800; font-size: 1.15rem; }
.rules li { display: flex; align-items: flex-start; gap: 12px; }
.rules li > span { flex-shrink: 0; font-size: 1.6rem; line-height: 1.1; }
.warn .field { margin-bottom: 0; }

.warn {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 22px;
  background: #fff3d1;
  border: 3px solid #e8c46c;
  box-shadow: 0 5px 0 #e8c46c;
}

.check {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 16px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
}
.check input { flex-shrink: 0; width: 30px; height: 30px; margin: 0; accent-color: var(--choc); cursor: pointer; }
.check:has(:focus-visible) { border-color: var(--choc); box-shadow: 0 0 0 5px var(--pink-soft); }
/* After the invalid rule, so ticking the box clears the red state before the next submit. */
.field .check:has(:checked) { border-color: var(--mint); background: var(--mint-soft); }
.field:has(:checked) .err { display: none; }

.banner {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 18px;
  background: #ffe9e4;
  color: var(--error);
  font-weight: 800;
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.ticket { text-align: center; position: relative; }
.ticket-fresh { border-color: var(--pink); box-shadow: 0 6px 0 var(--pink); }
.ticket-label { margin: 0 0 10px; font-weight: 800; color: var(--choc-soft); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.9rem; }
.ticket .lines { text-align: left; margin-top: 14px; padding-top: 10px; border-top: 3px dotted var(--line); }

.tiles { display: flex; justify-content: center; gap: 10px; }
.tiles span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 86px;
  border-radius: 20px;
  border: 3px solid var(--choc);
  box-shadow: 0 5px 0 var(--choc);
  font-size: 3.4rem;
  line-height: 1;
}
.tiles span:nth-child(1) { background: var(--pink); transform: rotate(-3deg); }
.tiles span:nth-child(2) { background: var(--mint); transform: rotate(2deg); --n: 1; }
.tiles span:nth-child(3) { background: var(--butter); transform: rotate(-2deg); --n: 2; }
.tiles span:nth-child(4) { background: var(--sky); transform: rotate(3deg); --n: 3; }

.hint-big { margin: 18px 0 0; font-weight: 800; font-size: 1.1rem; }
.pickup-day {
  display: inline-block;
  margin: 16px 0 0;
  padding: 8px 18px;
  border: 3px solid var(--choc);
  border-radius: 18px;
  background: var(--butter);
  box-shadow: 0 4px 0 var(--choc);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  text-wrap: balance;
}
.pay-note {
  margin: 0 0 14px;
  padding: 14px 18px;
  border-radius: 22px;
  background: var(--mint-soft);
  border: 3px solid var(--mint);
  text-align: center;
  font-weight: 800;
  font-size: 1.15rem;
}

.status-line { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
}
.status-line .badge { font-size: 1.2rem; min-height: 44px; padding: 6px 18px; }
.badge-making { background: var(--butter); }
.badge-ready { background: var(--mint); }
.badge-picked_up { background: var(--pink-soft); }
.badge-cancelled { background: #ece6e2; color: #5d4a40; }
.badge-paid { background: var(--sky); }
.badge-loading { background: var(--cream); color: var(--choc-soft); }

.sprinkles { position: fixed; width: 0; height: 0; pointer-events: none; z-index: 10; }
.sprinkles i {
  position: absolute;
  width: 6px;
  height: 16px;
  margin: -8px -3px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(74, 42, 26, 0.12);
  opacity: 0;
}
.sprinkles i.dot { width: 10px; height: 10px; margin: -5px; border-radius: 50%; }
.sprinkles i.treat { width: auto; height: auto; margin: -0.7rem; border-radius: 0; box-shadow: none; font-size: 1.4rem; font-style: normal; line-height: 1; }

.thumb-gift { display: grid; place-items: center; background: var(--butter); font-size: 1.8rem; }

/* Flags on the card and product page, and the blind box info. */

.blind {
  margin: 0 0 16px;
  padding: 12px 16px 14px;
  border: 3px dashed var(--line);
  border-radius: 22px;
  background: var(--paper);
}
.blind p { margin: 0 0 10px; font-weight: 700; }
.flag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: -4px 0 12px; }

.flag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--choc);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
  rotate: -3deg;
}
.flag-halloween { background: #ff8a1f; color: #1d1326; box-shadow: 0 3px 0 #1d1326; }
@container (max-width: 240px) {
  .flag-halloween { font-size: 0.75rem; padding: 2px 8px; }
}

.eye-dots { display: inline-flex; gap: 8px; vertical-align: middle; }
/* A dot with a glint, like the printed eyes. */
.eye-dots i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--choc);
  background: radial-gradient(circle at 34% 32%, #fff 0 16%, transparent 19%), var(--eye);
}
.flag-row .eye-dots { gap: 5px; }
.flag-row .eye-dots i { width: 18px; height: 18px; }

/* The gold dot is foil with a glint sweeping across it, like the silk filament. */
.eye-dots i.shine {
  position: relative;
  overflow: hidden;
  border-color: #a8700c;
  background: radial-gradient(circle at 34% 32%, #fff 0 16%, transparent 19%), var(--gold-foil);
  box-shadow: 0 0 8px 1px rgba(244, 169, 37, 0.75);
}
.eye-dots i.shine::after {
  content: "";
  position: absolute;
  inset: -20% auto -20% -60%;
  width: 40%;
  rotate: 20deg;
  background: rgba(255, 255, 255, 0.85);
  animation: glint 2.8s ease-in-out 1.2s infinite;
}
@keyframes glint { 0%, 55% { translate: 0 0; } 100% { translate: 500% 0; } }

/* On the product page each dot sits in a button. Padding and negative margin make a 44px tap target around the 24px dot. */
.eye {
  padding: 10px;
  margin: -10px;
  border: 0;
  border-radius: 50%;
  background: none;
}
.eye i { display: block; }
.eye[aria-pressed="true"] i { scale: 1.15; box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--choc); }
.eye[aria-pressed="true"] i.shine { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--choc), 0 0 12px 6px rgba(244, 169, 37, 0.75); }

/* The previewed color under the charm. Empty instead of hidden, so screen readers already know the live region. */
.peek {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  width: max-content;
  margin: 0 auto;
  padding: 2px 12px;
  border: 3px solid var(--choc);
  border-radius: 999px;
  background: var(--paper);
  color: var(--choc);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
  pointer-events: none;
}
.peek:empty { opacity: 0; scale: 0.6; }
/* "Preview only" sits on the pill's top edge like a stamp, so nobody mistakes the color for a choice. */
.peek small {
  position: absolute;
  left: 50%;
  bottom: 100%;
  translate: -50% 40%;
  rotate: -3deg;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--choc);
  color: var(--cream);
  font-size: 0.75rem;
}

/* The published odds: one row per tier, dots in a fixed-width column so the text lines up.
   The gaps leave room for the pressed ring. */
.odds { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.odds li { display: flex; align-items: center; gap: 12px; }
.odds .eye-dots { flex-shrink: 0; gap: 14px; min-width: 138px; }
.odds b { font-family: var(--display); }
.blind .fine { margin-top: 12px; text-align: left; }

/* Rarity tag after a revealed line on the ticket. */
.tier {
  display: inline-block;
  padding: 0 8px;
  border: 2px solid var(--choc);
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
  vertical-align: 2px;
}
.tier-rare { background: var(--lilac); }
.tier-gold { background: var(--gold-foil); }

/* Blind boxes on the done and order pages. The box is drawn in CSS: lid with bow, body with ribbon and "?". */

.boxes { text-align: center; }
.boxes h2 { font-size: 1.4rem; }
.boxes ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}
.boxes li { width: min(150px, (100% - (var(--cols) - 1) * 12px) / var(--cols)); }

.boxes li { --box: var(--pink); --ribbon: var(--butter); }
.boxes li:nth-child(4n + 2) { --box: var(--mint); --ribbon: var(--pink); }
.boxes li:nth-child(4n + 3) { --box: var(--sky); --ribbon: var(--butter); }
.boxes li:nth-child(4n + 4) { --box: var(--butter); --ribbon: var(--pink); }

.gift {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: none;
  -webkit-user-select: none;
  user-select: none;
}
.gift-box, .prize { grid-area: 1 / 1; position: relative; aspect-ratio: 1; }
.gift-box { container-type: inline-size; transform-origin: 50% 92%; }

.gift-box::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 6%;
  border-radius: 50%;
  background: rgba(74, 42, 26, 0.14);
}

.gift-lid, .gift-body {
  position: absolute;
  z-index: 1;
  border: 3px solid var(--choc);
  background: var(--box);
}
.gift-lid { left: 8%; right: 8%; top: 34%; height: 18%; border-radius: 12px; z-index: 2; }
.gift-body { left: 14%; right: 14%; top: 48%; bottom: 5%; border-radius: 4px 4px 16px 16px; box-shadow: 0 4px 0 var(--choc); }

.gift-lid::before, .gift-body::before {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 22%;
  translate: -50% 0;
  border: solid var(--choc);
  border-width: 0 3px;
  background: var(--ribbon);
}

.gift-lid i {
  position: absolute;
  bottom: calc(100% - 2px);
  width: 30%;
  height: 120%;
  border: 3px solid var(--choc);
  background: var(--ribbon);
}
.gift-lid i:first-child { right: 49%; border-radius: 70% 30% 10% 70%; transform-origin: 100% 100%; rotate: -24deg; }
.gift-lid i:last-child { left: 49%; border-radius: 30% 70% 70% 10%; transform-origin: 0 100%; rotate: 24deg; }

.gift-body b {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -46%;
  display: grid;
  place-items: center;
  width: 42%;
  aspect-ratio: 1;
  border: 3px solid var(--choc);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  font-size: 22cqw;
  line-height: 1;
}

.prize { isolation: isolate; }
.prize::before {
  content: "";
  position: absolute;
  inset: 4%;
  z-index: -1;
  border-radius: 47% 53% 50% 50% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 50% 52%, #fffaf7 0 34%, var(--pink-soft) 62%, #f8c9d6);
  background: radial-gradient(circle at 50% 52%, #fffaf7 0 34%, color-mix(in srgb, var(--eye) 22%, #fff) 62%, color-mix(in srgb, var(--eye) 38%, #fff));
}
/* The light burst behind the muffin. Only the opening animation shows it. */
.prize::after {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: -2;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fffdf5 0 26%, transparent 62%),
    repeating-conic-gradient(from 8deg, var(--butter) 0 11deg, transparent 11deg 30deg);
  -webkit-mask-image: radial-gradient(circle, #000 40%, transparent 70%);
  mask-image: radial-gradient(circle, #000 40%, transparent 70%);
  opacity: 0;
}
.prize img, .prize .glint { position: absolute; inset: -6%; width: 112%; height: 112%; pointer-events: none; }

/* Rare and gold badges sit on the revealed muffin like a sticker. */
.rarity {
  position: absolute;
  top: 0;
  right: -6%;
  z-index: 1;
  padding: 2px 10px;
  border: 3px solid var(--choc);
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
  rotate: 8deg;
}
.rarity-rare { background: var(--lilac); }
.rarity-gold { background: var(--gold-foil); box-shadow: 0 0 0 3px #fff3c4, 0 0 16px rgba(244, 169, 37, 0.8); }

/* Gold keeps a soft gold halo after opening. The opening animation flares it first. */
.prize-gold::after {
  background:
    radial-gradient(circle, #fffbe6 0 24%, transparent 62%),
    repeating-conic-gradient(from 8deg, #fcc232 0 9deg, transparent 9deg 20deg);
}
.gift.open .prize-gold::after { opacity: 0.6; }
.prize .twinkle { font-size: calc(1.15rem * var(--s, 1)); }
/* The badge covers the top right, so that star moves down the left side. */
.prize .twinkle:nth-of-type(2) { left: 13%; top: 74%; }
/* The rare badge reaches further left, so its other two sparkles sit below it too. */
.prize-rare .twinkle:nth-of-type(1) { left: 9%; top: 42%; }
.prize-rare .twinkle:nth-of-type(3) { left: 91%; top: 62%; }

.gold-caption {
  width: fit-content;
  margin: -4px auto 14px;
  padding: 6px 18px;
  border: 3px solid var(--choc);
  border-radius: 999px;
  background: var(--gold-foil);
  box-shadow: 0 0 0 4px #fff3c4, 0 0 22px rgba(244, 169, 37, 0.7);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  animation: stamp 520ms var(--ease-jelly) backwards;
}

.gift-name {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 2.5em;
  margin-top: 6px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
}
.gift-name::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--choc);
  background: var(--eye);
}

.gift:not(.open) .prize { display: none; }
.gift:not(.open) .gift-name { visibility: hidden; }
.gift.open:not(.opening) .gift-box { display: none; }

.wave, .tada, .heart, .spin { display: inline-block; }
.wave { margin-left: 0.25em; }
.spin { margin-left: 0.4em; }

/* The Halloween special's page is a night. render() copies the view's data-theme to <html>.
   The colors swap roles: --choc becomes the light text and --cream the night, so most rules follow without changes. */
:root[data-theme="halloween"] {
  --cream: #1b1036;
  --paper: #2d1b57;
  --pink: #ff9838;
  --pink-soft: #4a2a55;
  --mint: #9be26a;
  --mint-soft: #223b33;
  --butter: #ffd166;
  --choc: #fff0d9;
  --choc-soft: #d9c8f5;
  --line: #8063c6;
  --ink: #1d1326;
  --cart-bg: #fff0d9;
  --dot-pink: transparent;
  --dot-mint: transparent;
  --night: 1;
  --theme-color: #1b1036;
  color-scheme: dark;
}

/* Registered properties interpolate, so the page fades into the night and back instead of flipping.
   The header is rebuilt on every render, so its colors have to come from here and not from per-element transitions.
   --theme-color stays unregistered and never fades. render() copies it to <meta name="theme-color">, which needs the end color. */
@property --cream { syntax: "<color>"; inherits: true; initial-value: #fff6ea; }
@property --paper { syntax: "<color>"; inherits: true; initial-value: #fffdf8; }
@property --pink { syntax: "<color>"; inherits: true; initial-value: #f9b9cb; }
@property --pink-soft { syntax: "<color>"; inherits: true; initial-value: #fde3ea; }
@property --mint { syntax: "<color>"; inherits: true; initial-value: #c4ecda; }
@property --mint-soft { syntax: "<color>"; inherits: true; initial-value: #e5f7ee; }
@property --butter { syntax: "<color>"; inherits: true; initial-value: #ffe3a1; }
@property --choc { syntax: "<color>"; inherits: true; initial-value: #4a2a1a; }
@property --choc-soft { syntax: "<color>"; inherits: true; initial-value: #75523f; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #f0dcc6; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #4a2a1a; }
@property --cart-bg { syntax: "<color>"; inherits: true; initial-value: #fffdf8; }
@property --dot-pink { syntax: "<color>"; inherits: true; initial-value: #fbd5df; }
@property --dot-mint { syntax: "<color>"; inherits: true; initial-value: #d3efe2; }
@property --night { syntax: "<number>"; inherits: true; initial-value: 0; }
:root {
  transition-property: --cream, --paper, --pink, --pink-soft, --mint, --mint-soft, --butter, --choc, --choc-soft, --line,
    --ink, --cart-bg, --dot-pink, --dot-mint, --night;
  transition-duration: var(--t-theme);
  transition-timing-function: ease-in-out;
}

/* Filled accents keep dark text. At night --choc turns light and would vanish on orange, green and yellow. */
:is(.tag, .cart-count, .price, .round, .steps [aria-current] .dot) { color: var(--ink); }
:root[data-theme="halloween"] .btn-total { color: var(--choc); }
:root[data-theme="halloween"] .price { box-shadow: 0 3px 0 #c98a2a; }

/* A dark halo keeps text that sits right on the sky readable where it passes the moon or the fog. */
:root[data-theme="halloween"] :is(h1, .desc, .steps .label, .foot a, .center .link) { text-shadow: 0 0 3px var(--cream), 0 0 10px var(--cream); }
:root[data-theme="halloween"] .flag { text-shadow: none; }

/* On the night page the art gets a lighter sky and a glowing rim. The page sky has the moon. */
:root[data-theme="halloween"] .art-halloween {
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 196, 92, 0.9) 0 14%, rgba(255, 138, 31, 0.45) 34%, transparent 56%),
    linear-gradient(165deg, #6a3bb5, #4a2590 55%, #33186c);
  box-shadow: 0 0 0 5px rgba(255, 184, 102, 0.75), 0 0 46px 14px rgba(255, 138, 31, 0.4);
}
:root[data-theme="halloween"] .art-halloween .moon { display: none; }

/* The sky stays rendered so it can fade. Hidden, it neither paints nor runs its animations. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #120a2b, #1b1036 45%, #2a1650);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-theme) ease-in-out, visibility var(--t-theme);
}
:root[data-theme="halloween"] .sky { opacity: 1; visibility: visible; }
:root:not([data-theme="halloween"]) .sky *,
:root:not([data-theme="halloween"]) .sky *::before { animation-play-state: paused; }
.sky > * { position: absolute; font-style: normal; }
.sky-stars {
  inset: 0;
  background:
    radial-gradient(circle at 24px 40px, #fff6d8 0 1.2px, transparent 2px),
    radial-gradient(circle at 120px 90px, #fff6d8 0 1px, transparent 1.8px),
    radial-gradient(circle at 70px 170px, #fff6d8 0 1.5px, transparent 2.3px),
    radial-gradient(circle at 160px 210px, #fff6d8 0 1px, transparent 1.8px),
    radial-gradient(circle at 96px 12px, #fff6d8 0 0.8px, transparent 1.6px),
    radial-gradient(circle at 8px 128px, #fff6d8 0 1px, transparent 1.8px);
  background-size: 190px 240px;
}
.sky-stars + .sky-stars {
  background:
    radial-gradient(circle at 50px 60px, #fff 0 1.8px, transparent 2.8px),
    radial-gradient(circle at 180px 150px, #ffe2a8 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 110px 250px, #fff 0 1.2px, transparent 2px);
  background-size: 230px 290px;
  background-position: 30px 10px;
}
/* A full moon with soft craters. Its glow is a separate layer so only opacity animates. */
.sky-moon {
  top: max(10px, env(safe-area-inset-top));
  left: calc(45% - 32px);
  width: 64px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 60%, rgba(214, 170, 92, 0.35) 0 9%, transparent 10%),
    radial-gradient(circle at 64% 34%, rgba(214, 170, 92, 0.3) 0 7%, transparent 8%),
    radial-gradient(circle at 62% 70%, rgba(214, 170, 92, 0.25) 0 5%, transparent 6%),
    radial-gradient(circle at 36% 32%, #fffdf0, #ffeab0 60%, #f6cf7a);
}
.sky-moon::before {
  content: "";
  position: absolute;
  inset: -70%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 150, 0.45) 0 26%, rgba(255, 190, 110, 0.12) 46%, transparent 70%);
}
.sky-bat {
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: 2;
  filter: drop-shadow(0 0 1px #ffd68c) drop-shadow(0 0 6px rgba(255, 190, 110, 0.6));
}
/* The mask would cut off the glow, so the bat shape is a child of the glowing box. */
.sky-bat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0d061c;
  -webkit-mask: var(--bat) center / contain no-repeat;
  mask: var(--bat) center / contain no-repeat;
}
.sky-bat:nth-child(4) { --x: 66vw; --y: 140px; --w: 46px; }
.sky-bat:nth-child(5) { --x: 3vw; --y: 46%; --w: 34px; }
.sky-bat:nth-child(6) { --x: 86vw; --y: 60%; --w: 30px; }
.sky-ghost { line-height: 1; opacity: 0.85; }
/* The ghosts peek in from the edges, beside the text column. */
.sky-ghost:nth-child(7) { left: -14px; bottom: 90px; font-size: 2.4rem; rotate: 14deg; }
.sky-ghost:nth-child(8) { right: -12px; bottom: 240px; font-size: 1.9rem; rotate: -14deg; }
/* Two tiles wide, so sliding by half a width loops without a seam. */
.sky-fog {
  left: 0;
  bottom: -20px;
  width: 200%;
  height: 160px;
  background:
    radial-gradient(ellipse 30% 55% at 25% 70%, rgba(214, 196, 255, 0.2), transparent 70%),
    radial-gradient(ellipse 26% 45% at 72% 80%, rgba(214, 196, 255, 0.16), transparent 70%);
  background-size: 50% 100%;
}
.sky-fog + .sky-fog { bottom: -50px; height: 130px; opacity: 0.8; background-position: 25% 0; }

/* Motion. Only transform, opacity, scale, translate and rotate move. Durations and easings live in :root. */

.btn, .round, .pill, .link, .back, .x, .cart-link, .langs button, .product-card, .reservations a, .turn-3d {
  transition: scale var(--t-spring) var(--ease-jelly), translate var(--t-spring) var(--ease-jelly);
}
.btn:active:not(:disabled), .round:active:not([aria-disabled="true"]), .pill:active, .link:active, .back:active, .x:active, .cart-link:active,
.langs button:active, .product-card:active, .product-card:active .pill, .reservations a:active {
  transition-duration: var(--t-press);
  transition-timing-function: var(--ease-out);
}
.btn:active:not(:disabled) { translate: 0 5px; scale: 0.97 0.93; box-shadow: 0 1px 0 var(--choc); }
.round:active:not([aria-disabled="true"]) { translate: 0 4px; scale: 0.92; box-shadow: 0 1px 0 var(--choc); }
.pill:active, .link:active, .back:active, .cart-link:active, .langs button:active, .turn-3d:active { scale: 0.9; }
.x:active { scale: 0.85; }
.product-card:active, .reservations a:active { scale: 0.97; }
.product-card:active .pill { translate: 6px 0; }

.enter > * {
  --delay: calc(var(--i) * var(--stagger));
  animation: rise var(--t-enter) var(--ease-out) var(--delay) backwards;
}
.swap { animation: swap var(--t-quick) var(--ease-out); }
/* The delay keeps a fast load from flashing the boot emoji. */
.boot { animation: pop-in var(--t-spring) var(--ease-jelly) 300ms backwards; }
.boot span { animation: hop 0.9s var(--ease-pop) infinite; }
.langs .picked { animation: pick var(--t-spring) var(--ease-jelly); }

.enter .steps .just-done .dot { animation: check-pop var(--t-spring) var(--ease-jelly) calc(var(--delay) + 80ms) backwards; }
.enter .steps .just-done + li::after { animation: fill-line 360ms var(--ease-out) calc(var(--delay) + 200ms) backwards; }
.enter .steps .just-done + [aria-current] .dot { animation: pick var(--t-spring) var(--ease-jelly) calc(var(--delay) + 480ms) backwards; }

.art::after { animation: shadow var(--t-idle) ease-in-out infinite; }
.art img { animation: bob var(--t-idle) ease-in-out infinite; }
.art-big.boing img { animation: bob var(--t-idle) ease-in-out infinite, boing 0.6s var(--ease-pop); }
.art-gold::before { animation: spin 24s linear infinite; }
.art .glint, .prize .glint { animation: bob var(--t-idle) ease-in-out infinite, sweep 3.2s ease-in-out infinite; }
.art-big.boing .glint, .prize.boing .glint { animation: bob var(--t-idle) ease-in-out infinite, sweep 3.2s ease-in-out infinite, boing 0.6s var(--ease-pop); }
.twinkle { animation: twinkle 1.8s ease-in-out infinite; }
.bat { animation: flap 0.9s ease-in-out infinite; }
.bat:nth-of-type(3) { animation-delay: -0.3s; }
.bat:nth-of-type(4) { animation-delay: -0.6s; }
.twinkle:nth-of-type(2) { animation-delay: -0.4s; }
.twinkle:nth-of-type(3) { animation-delay: -1.1s; }
.twinkle:nth-of-type(4) { animation-delay: -0.7s; }
.twinkle:nth-of-type(5) { animation-delay: -1.5s; }
.art canvas, .art-stage img, .turn-hint { transition: opacity var(--t-quick) var(--ease-out), visibility var(--t-quick); }
.enter > :is(.art-big, .art-stage) { animation: land var(--t-spring) var(--ease-out) var(--delay) backwards; }
.enter .price { animation: swing-in var(--t-spring) var(--ease-jelly) calc(var(--delay) + 120ms) backwards; }
.enter .grid > * { animation: card-in var(--t-spring) var(--ease-jelly) calc(var(--delay) + var(--j) * 90ms) backwards; }
.enter .reservations li { animation: rise var(--t-enter) var(--ease-out) calc(var(--delay) + 60ms + var(--j) * var(--stagger)) backwards; }
.wave { transform-origin: 70% 80%; animation: wave 4s ease-in-out 0.8s infinite; }

.stepper output[data-dir="up"] { --roll-from: 55%; }
.stepper output[data-dir="down"] { --roll-from: -55%; }
.stepper output.roll { animation: roll 300ms var(--ease-pop); }
.btn-total.tick, .cart .tick { animation: tick 320ms var(--ease-pop); }
.round.nope { animation: nope 380ms ease-in-out; }
.btn-go { animation: nudge 5s ease-in-out 3s infinite; }

.ghost { position: fixed; margin: 0; z-index: 20; pointer-events: none; transform-origin: 0 0; animation: fly 520ms var(--ease-out) forwards; }
.cart-link.landing { animation: tick 360ms var(--ease-pop) 440ms; }
.cart-link.landing .cart-count { animation: pop-in 420ms var(--ease-jelly) 440ms backwards; }
.added.pop { animation: rise var(--t-enter) var(--ease-out) 300ms backwards; }

.field:focus-within label { animation: hop 380ms var(--ease-pop); }
.field.shake [type=text], .field.shake textarea, .field.shake .check { animation: shake 420ms ease-in-out; }
.field.shake .err, .banner { animation: err-in 320ms var(--ease-out); }
.spin { animation: spin 0.9s linear infinite; }

.enter .ticket { animation: ticket-in var(--t-spring) var(--ease-jelly) var(--delay) backwards; }
.enter .tiles span { animation: drop var(--t-spring) var(--ease-jelly) calc(var(--delay) + 200ms + var(--n, 0) * 90ms) backwards; }
.tiles span.hop { animation: hop 500ms var(--ease-pop); }
.enter .status-line .badge { animation: stamp 420ms var(--ease-jelly) calc(var(--delay) + 560ms) backwards; }
.enter .pickup-day { animation: stamp 420ms var(--ease-jelly) calc(var(--delay) + 640ms) backwards; }
.reservations .badge { animation: stamp 420ms var(--ease-jelly) backwards; }
.reservations .badge-loading { animation: breathe 1.4s ease-in-out infinite; }
.enter.lost > h1 {
  transform-origin: 50% 100%;
  animation: rise var(--t-enter) var(--ease-out) var(--delay) backwards, puzzle 900ms ease-in-out calc(var(--delay) + 300ms);
}

.enter.party > h1 { animation: jelly-in var(--t-spring) var(--ease-out) var(--delay) backwards; }
.tada { transform-origin: 30% 90%; animation: tada 3.6s ease-in-out 1.2s infinite; }
.enter.party > .pay-note { animation: card-in var(--t-spring) var(--ease-jelly) calc(var(--delay) + 640ms) backwards; }
.heart { animation: beat 1.6s ease-in-out 1.8s infinite; }

.enter .flag-row .eye-dots i, .enter .blind .eye-dots i {
  animation: pop-in var(--t-spring) var(--ease-jelly) calc(var(--delay) + 240ms + var(--k) * 60ms) backwards;
}
.eye i { transition: scale var(--t-quick) var(--ease-jelly); }
.peek { transition: opacity var(--t-quick) var(--ease-out), scale var(--t-spring) var(--ease-jelly); }
.enter .grid .eye-dots i { animation-delay: calc(var(--delay) + var(--j) * 90ms + 300ms + var(--k) * 60ms); }
.enter .gift { animation: drop var(--t-spring) var(--ease-jelly) calc(var(--delay) + 160ms + var(--j) * 90ms) backwards; }
.gift:not(.open) .gift-box { animation: wobble var(--t-idle) ease-in-out calc(900ms + var(--j) * 350ms) infinite; }
.gift:not(.open):active .gift-box { scale: 0.94; transition: scale var(--t-press) var(--ease-out); }
.gift.opening .gift-box { animation: rattle 440ms ease-in-out; }
.gift.opening .gift-lid { animation: lid-off 560ms var(--ease-out) 400ms forwards; }
.gift.opening .gift-body { transform-origin: 50% 100%; animation: body-out 380ms ease-in 480ms forwards; }
.gift.opening .prize { animation: jump-out 680ms var(--ease-out) 440ms backwards; }
.gift.opening .prize::after { animation: light 1100ms var(--ease-out) 440ms; }
.gift.opening .gift-name { animation: stamp 420ms var(--ease-jelly) 760ms backwards; }
.gift.opening .rarity { animation: stamp 420ms var(--ease-jelly) 900ms backwards; }
.gift.opening .prize-gold::after { animation: light-gold 2600ms var(--ease-out) 440ms backwards; }
.prize img { animation: bob var(--t-idle) ease-in-out infinite; }
.prize.boing img { animation: bob var(--t-idle) ease-in-out infinite, boing 0.6s var(--ease-pop); }
.lines.reveal li { animation: rise var(--t-enter) var(--ease-out) backwards; }
.sprinkles i { animation: burst 1.6s cubic-bezier(0.15, 0.7, 0.3, 1) var(--delay) forwards; }

@keyframes rise { from { opacity: 0; translate: 0 14px; } }
@keyframes swap { from { opacity: 0.25; translate: 0 6px; } }
@keyframes pick { from { scale: 0.5; } }
@keyframes pop-in { from { opacity: 0; scale: 0.3; } }
@keyframes check-pop { from { opacity: 0; scale: 0.3; rotate: -90deg; } }
@keyframes fill-line { from { scale: 0 1; } }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-3%) rotate(2deg); }
}
@keyframes shadow {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.82); opacity: 0.6; }
}
@keyframes sweep { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }
@keyframes flap { 50% { scale: 1 0.6; translate: 0 -2px; } }
@keyframes twinkle { 50% { opacity: 0.3; scale: 0.5; rotate: 45deg; } }
@keyframes boing {
  30% { scale: 1.12 0.88; translate: 0 4%; }
  60% { scale: 0.94 1.08; translate: 0 -6%; }
}
@keyframes land {
  0% { opacity: 0; translate: 0 -40px; scale: 0.8; }
  55% { opacity: 1; translate: 0 0; scale: 1.08 0.9; }
  78% { scale: 0.97 1.04; }
}
@keyframes swing-in { from { opacity: 0; scale: 0.4; rotate: 30deg; } }
@keyframes card-in { from { opacity: 0; translate: 0 28px; scale: 0.9; } }
@keyframes wave {
  0%, 26%, 100% { rotate: 0deg; }
  5% { rotate: 18deg; }
  10% { rotate: -10deg; }
  15% { rotate: 16deg; }
  20% { rotate: -6deg; }
}
@keyframes roll { from { opacity: 0; translate: 0 var(--roll-from); scale: 0.6; } }
@keyframes tick { 40% { scale: 1.2; } }
@keyframes nope {
  20% { translate: -6px 0; }
  45% { translate: 5px 0; }
  70% { translate: -3px 0; }
}
@keyframes nudge {
  0%, 86%, 100% { rotate: 0deg; }
  89% { rotate: -2.5deg; }
  92% { rotate: 2.5deg; }
  95% { rotate: -1.5deg; }
  98% { rotate: 0.5deg; }
}
@keyframes fly {
  45% { translate: calc(var(--tx) * 0.5) calc(var(--ty) * 0.5 - 50px); scale: calc((1 + var(--ts)) / 2); }
  85% { opacity: 1; }
  100% { translate: var(--tx) var(--ty); scale: var(--ts); opacity: 0; }
}
@keyframes hop { 40% { translate: 0 -6px; } }
@keyframes shake {
  15% { translate: -7px 0; }
  35% { translate: 6px 0; }
  55% { translate: -4px 0; }
  75% { translate: 2px 0; }
}
@keyframes err-in { from { opacity: 0; translate: 0 -6px; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes ticket-in { from { opacity: 0; scale: 0.85; rotate: -2deg; } }
@keyframes drop { from { opacity: 0; translate: 0 -60px; scale: 0.5; } }
@keyframes stamp { from { opacity: 0; scale: 1.8; rotate: -12deg; } }
@keyframes breathe { 50% { opacity: 0.45; } }
@keyframes puzzle {
  0%, 100% { rotate: 0deg; }
  25% { rotate: -3deg; }
  55% { rotate: 2.5deg; }
  80% { rotate: -1deg; }
}
@keyframes jelly-in {
  0% { opacity: 0; scale: 0.6; }
  50% { opacity: 1; scale: 1.08 0.94; }
  72% { scale: 0.97 1.03; }
}
@keyframes tada {
  0%, 20%, 100% { rotate: 0deg; scale: 1; }
  4% { rotate: -14deg; scale: 1.2; }
  9% { rotate: 12deg; scale: 1.2; }
  14% { rotate: -6deg; scale: 1.1; }
}
@keyframes beat {
  0%, 36%, 100% { scale: 1; }
  10% { scale: 1.25; }
  20% { scale: 1; }
  28% { scale: 1.15; }
}
@keyframes wobble {
  0%, 72%, 100% { rotate: 0deg; }
  77% { rotate: -5deg; }
  83% { rotate: 4deg; }
  89% { rotate: -2deg; }
  95% { rotate: 1deg; }
}
@keyframes rattle {
  15% { rotate: -8deg; scale: 1.03; }
  30% { rotate: 8deg; }
  45% { rotate: -10deg; scale: 1.07; }
  60% { rotate: 10deg; }
  78% { rotate: -5deg; scale: 1.12 0.9; }
}
@keyframes lid-off {
  35% { translate: 4% -70%; rotate: 12deg; opacity: 1; }
  100% { translate: 28% -190%; rotate: 48deg; opacity: 0; }
}
@keyframes body-out { to { opacity: 0; scale: 0.8 0.3; } }
@keyframes jump-out {
  0% { opacity: 0; scale: 0.2; translate: 0 38%; }
  45% { opacity: 1; scale: 1.08 0.94; translate: 0 -16%; }
  72% { scale: 0.96 1.04; translate: 0 2%; }
}
@keyframes light {
  0% { opacity: 0; scale: 0.3; rotate: 0deg; }
  25% { opacity: 1; }
  100% { opacity: 0; scale: 1.2; rotate: 50deg; }
}
@keyframes light-gold {
  0% { opacity: 0; scale: 0.3; rotate: 0deg; }
  18% { opacity: 1; scale: 1.7; }
  100% { opacity: 0.6; scale: 1; rotate: 140deg; }
}
@keyframes burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(0.6); }
  55% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 140px)) rotate(calc(var(--rot) * 1.4)) scale(1); }
}

/* Über uns */
.about-link {
  display: inline-block;
  padding: 12px 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--choc-soft);
}
.about-link[aria-current] { color: var(--choc); text-decoration: none; }
.foot { display: flex; flex-direction: column; align-items: center; }

.view-about { max-width: 760px; margin-inline: auto; }
.about-hero { position: relative; text-align: center; padding: 18px 0 8px; isolation: isolate; }
.about-hero h1 { font-size: 2.1rem; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.big-11y { display: inline-flex; gap: 0.06em; font-size: 5.6rem; line-height: 1; }
.big-11y span {
  display: inline-block;
  min-width: 0.78em;
  padding: 0.04em 0.12em 0.1em;
  border: 4px solid var(--choc);
  border-radius: 0.24em;
  background: var(--pink);
  box-shadow: 0 7px 0 var(--choc);
  rotate: -6deg;
}
.big-11y span:nth-child(2) { background: var(--mint); rotate: 4deg; translate: 0 -6px; }
.big-11y span:nth-child(3) { background: var(--butter); rotate: -2deg; }
.orbit { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.orbit i { position: absolute; font-style: normal; font-size: 1.9rem; }
.orbit i:nth-child(1) { left: 4%; top: 18%; }
.orbit i:nth-child(2) { right: 5%; top: 14%; }
.orbit i:nth-child(3) { left: 12%; top: 64%; }
.orbit i:nth-child(4) { right: 12%; top: 66%; }
.orbit i:nth-child(5) { left: 26%; top: 2%; font-size: 1.4rem; }
.orbit i:nth-child(6) { right: 26%; top: 0; font-size: 1.4rem; }
.orbit i:nth-child(7) { left: 0; top: 88%; font-size: 1.5rem; }
.orbit i:nth-child(8) { right: 0; top: 90%; font-size: 1.5rem; }

.about-outro { margin-top: 22px; text-align: center; background: var(--pink-soft); border-color: var(--pink); box-shadow: 0 6px 0 var(--pink); }
.about-outro p { font-size: 1.1rem; max-width: 34em; margin: 0 auto 16px; text-wrap: pretty; }
.outro-art { display: flex; justify-content: center; gap: 4px; margin: -6px 0 4px; }
.outro-art img { width: 108px; height: auto; }
.outro-art img:last-child { rotate: 8deg; }
.outro-art img:first-child { rotate: -8deg; scale: 1.25; }

.big-11y span { animation: drop var(--t-spring) var(--ease-jelly) calc(160ms + var(--n, 0) * 110ms) backwards; }
.big-11y span:nth-child(2) { --n: 1; }
.big-11y span:nth-child(3) { --n: 2; }
.orbit i { animation: float var(--t-idle) ease-in-out infinite; }
.orbit i:nth-child(odd) { animation-duration: 4.1s; animation-delay: -1.3s; }
.orbit i:nth-child(3n) { animation-duration: 3.6s; animation-delay: -2.2s; }
.outro-art img { animation: bob var(--t-idle) ease-in-out infinite; }
.outro-art img:last-child { animation-delay: -1.6s; }
@keyframes float { 50% { translate: 0 -10px; rotate: 8deg; } }

.sky-stars + .sky-stars { animation: breathe 2.6s ease-in-out infinite; }
.sky-stars:first-child { animation: breathe 3.8s ease-in-out -1.7s infinite; }
.sky-moon::before { animation: breathe 5s ease-in-out infinite; }
.sky-bat {
  animation: bat-fly var(--fly, 22s) linear var(--late, 0s) infinite, bat-dip 2.4s ease-in-out infinite alternate, wing 0.4s ease-in-out infinite;
}
.sky-bat:nth-child(4) { --late: -15s; }
.sky-bat:nth-child(5) { --fly: 30s; --late: -6s; }
.sky-bat:nth-child(6) { --fly: 38s; --late: -30s; }
.sky-ghost { animation: float 4.6s ease-in-out infinite; }
.sky-ghost:nth-child(8) { animation-duration: 5.8s; animation-delay: -2s; }
.sky-fog { animation: fog 48s linear infinite; }
.sky-fog + .sky-fog { animation-duration: 70s; animation-direction: reverse; }
@keyframes bat-fly {
  from { translate: calc(-1 * var(--x) - var(--w) - 20px) 0; }
  to { translate: calc(100vw - var(--x) + 20px) 0; }
}
@keyframes bat-dip { to { transform: translateY(-36px); } }
@keyframes fog { to { translate: -50% 0; } }
@keyframes wing { 50% { scale: 1 0.55; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 700px) {
  body { font-size: 18px; }
  .top { padding-top: 28px; }
  main { padding-bottom: 40px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (min-width: 900px) {
  .big-11y { font-size: 7.5rem; }
  .about-hero h1 { font-size: 2.6rem; }
}

@media (min-width: 900px) {
  .top, main { max-width: 1144px; padding-inline: 32px; }
  .top { grid-template-columns: auto 1fr auto auto; column-gap: 16px; padding-bottom: 14px; }
  .cart-link { order: 1; }
  .brand img { height: 64px; }
  .steps { width: 100%; max-width: 560px; margin-inline: auto; }
  h1 { font-size: 2.4rem; }

  .view-home { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .view-home > * { grid-column: 1 / -1; }
  .view-home > .hello, .view-home > h1 { text-align: center; }
  .view-home > .reservations { grid-column: 1; }
  .view-home > .lookup { justify-self: center; width: min(100%, 528px); }
  .view-home > .reservations + .lookup { grid-column: 2; width: 100%; }
  /* auto-fit drops empty tracks, so a lone product sits in the middle instead of at the left edge. */
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; gap: 0 24px; margin-top: 16px; }

  /* The empty 1fr rows above and below the text center it against the art that spans them. */
  .view-product {
    display: grid;
    grid-template-columns: minmax(300px, 440px) minmax(420px, 520px);
    grid-template-rows: auto auto 1fr auto auto auto auto auto 1fr;
    justify-content: center;
    column-gap: 48px;
  }
  .view-product > * { grid-column: 2; }
  .view-product > .back, .view-form > .back { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
  .view-product > .steps { grid-column: 1 / -1; grid-row: 2; margin-bottom: 24px; }
  .view-product > .art-big { grid-column: 1; grid-row: 3 / -1; align-self: center; width: 100%; margin: 0; }
  .view-product > .product-head { grid-row: 4; }
  .view-product > .desc { grid-row: 5; }
  .view-product > .blind { grid-row: 6; }
  .view-product > .buy { grid-row: 7; }
  .view-product > .center { grid-row: 8; }
  .product-head h1 { font-size: 2.6rem; }
  .view-product .desc { font-size: 1.25rem; }

  .view-form {
    display: grid;
    grid-template-columns: minmax(0, 400px) minmax(0, 560px);
    justify-content: center;
    column-gap: 40px;
    align-items: start;
  }
  .view-form > .steps { grid-column: 1 / -1; grid-row: 2; margin-bottom: 24px; }
  .view-form > h1 { grid-column: 2; grid-row: 3; }
  .view-form > .summary { grid-column: 1; grid-row: 4; position: sticky; top: 24px; }
  .view-form > .form { grid-column: 2; grid-row: 4; }
  .summary .thumb { width: 72px; height: 72px; border-radius: 22px; }

  .view-narrow { max-width: 640px; margin-inline: auto; }
  .view-3d { max-width: 640px; margin-inline: auto; }
  .view-3d > .art-stage { width: 440px; }
  .view-narrow > h1, .view-narrow > .hello, .view-narrow > .desc { text-align: center; }
  .tiles { gap: 14px; }
  .tiles span { width: 96px; height: 116px; border-radius: 24px; font-size: 4.4rem; }
}
