/*
  Pearl Pocket: bubble tea shop website (Screenery template)
  A kawaii sticker world: pastel candy grounds with white polka dots and scalloped edges, everything outlined in thick plum ink,
  stickers with white die-cut borders and soft shadows, speech bubbles, sparkles, and a drawn cup that fills in layers.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. Stickers, speech bubbles, buttons, chips, fields
   4. Header
   5. Hero
   6. Bands (section grounds with scalloped tops)
   7. Builder: options, cup, sums
   8. Pickup order: slots, name, loading, error, ticket
   9. Menu favourites
  10. Stamp card
  11. Shops
  12. Questions
  13. Footer, toast
  14. Motion
  15. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Ink: every outline and every piece of text */
  --ink: #3a1f45;
  --ink-soft: #5b3a66;        /* secondary text, 7:1+ on every pastel below */
  --white: #ffffff;

  /* Candy pastels (grounds) */
  --pink: #ffe1ec;
  --lilac: #ece3ff;
  --mint: #dcf6e8;
  --butter: #fff1c4;
  --sky: #dcefff;

  /* Stronger candy (fills, never under small text unless ink) */
  --bubblegum: #ff9fc0;
  --bubblegum-deep: #ff7aa6;
  --taro: #c9b3f0;
  --matcha: #9fe3c4;
  --lemon: #ffd36b;
  --paper: #fffafc;

  /* Type */
  --display: "Mochiy Pop One", "Zen Maru Gothic", system-ui, sans-serif;
  --body: "Zen Maru Gothic", system-ui, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-h3: clamp(1.25rem, 1rem + 0.8vw, 1.6rem);
  --fs-h2: clamp(2rem, 1.2rem + 3vw, 3.4rem);
  --fs-h1: clamp(2.5rem, 1.1rem + 5vw, 5.2rem);

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 112px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;

  /* Shape */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-pill: 999px;
  --line: 3px;          /* the ink outline on HTML stickers */
  --cut: 6px;           /* the white die-cut border */

  /* Depth: one soft, offset shadow family */
  --shadow: 0 10px 22px -8px rgb(58 31 69 / 0.30), 0 2px 4px rgb(58 31 69 / 0.10);
  --shadow-lift: 0 16px 30px -10px rgb(58 31 69 / 0.36), 0 3px 6px rgb(58 31 69 / 0.12);
  --sticker: 0 0 0 var(--cut) var(--white), var(--shadow);
  --sticker-lift: 0 0 0 var(--cut) var(--white), var(--shadow-lift);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; scrollbar-color: var(--bubblegum) var(--pink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--fs-md);
  line-height: 1.6;
  font-weight: 500;
  color: var(--ink);
  background: var(--pink);
  caret-color: var(--bubblegum-deep);
  accent-color: var(--bubblegum-deep);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--bubblegum); color: var(--ink); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--pink); }
::-webkit-scrollbar-thumb { background: var(--bubblegum); border: 3px solid var(--pink); border-radius: 999px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--bubblegum-deep); }
a:hover { text-decoration-color: var(--ink); }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 12px; box-shadow: 0 0 0 7px var(--lemon); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s-4); top: -60px; z-index: 50; padding: var(--s-3) var(--s-4); background: var(--ink); color: var(--white); border-radius: var(--r-sm); }
.skip:focus { top: var(--s-4); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ---------- 3. Stickers, speech bubbles, buttons, chips, fields ---------- */
/* A sticker: ink outline, white die-cut border, soft drop shadow */
.sticker {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--sticker);
}

/* Speech bubble with a tail. Text in ink on white. */
.bubble {
  position: relative;
  max-width: 36ch;
  padding: var(--s-3) var(--s-4);
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.bubble::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-top: 0; border-left: 0;
  border-bottom-right-radius: 5px;
}
.bubble--left::after { left: -11px; top: 50%; transform: translateY(-50%) rotate(135deg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px;
  padding: 10px 22px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--body);
  font-weight: 900;
  font-size: var(--fs-md);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 4px var(--white), var(--shadow);
  transition: transform .35s var(--ease-bounce), box-shadow .3s var(--ease-out), background-color .2s;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 0 0 4px var(--white), var(--shadow-lift); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--pink { background: var(--bubblegum); color: var(--ink); }
.btn--pink:hover { background: var(--bubblegum-deep); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: #4d2a5b; }
.btn--white { background: var(--white); color: var(--ink); }
.btn--white:hover { background: var(--butter); }
.btn--big { min-height: 56px; padding: 12px 28px; font-size: var(--fs-lg); }
.btn--small { min-height: 44px; padding: 6px 16px; font-size: var(--fs-sm); }
.btn--wide { width: 100%; }
.btn[disabled] { cursor: not-allowed; opacity: .7; transform: none; }

/* Chips: radio and checkbox stickers. The input stays in the label, visually hidden but focusable. */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: inherit; }
.chip > span {
  display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-2);
  min-height: 46px;
  padding: 8px 16px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-pill);
  font-weight: 700;
  line-height: 1.25;
  transition: transform .35s var(--ease-bounce), background-color .2s, box-shadow .25s var(--ease-out);
}
.chip small { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-soft); }
.chip:hover > span { transform: translateY(-2px); }
.chip input:checked + span { background: var(--bubblegum); box-shadow: 0 0 0 4px var(--white), var(--shadow); transform: rotate(-1.5deg); }
.chip input:checked + span small { color: var(--ink); }
.chip input:checked + span::before {
  content: ""; width: 16px; height: 16px; flex: none;
  background: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.5l4 4L16 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.5l4 4L16 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 4px; box-shadow: 0 0 0 7px var(--lemon); }
.chip input:disabled + span { background: repeating-linear-gradient(-45deg, #f4eef6 0 8px, #ffffff 8px 16px); border-style: dashed; cursor: not-allowed; transform: none; }
.chip:has(input:disabled) { cursor: not-allowed; }
.chip--out > span { color: var(--ink-soft); }
.chip--out small { color: var(--ink); font-weight: 700; }

.sw { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); flex: none; }

.field { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--s-2); }
.field legend, .field__label { font-weight: 900; font-size: var(--fs-md); padding: 0; margin-bottom: var(--s-2); }
.input {
  width: 100%;
  min-height: 52px;
  padding: 10px 18px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: var(--fs-lg);
}
.input::placeholder { color: var(--ink-soft); font-weight: 500; opacity: 1; }
.input:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.input[aria-invalid="true"] { background: #fff0f4; border-color: #a3123f; border-width: 3px; border-style: dashed; }
.hint { font-size: var(--fs-sm); color: var(--ink-soft); }
.err {
  display: flex; gap: var(--s-2); align-items: center;
  font-size: var(--fs-sm); font-weight: 900; color: #8a0f36;
}
.err::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #c01b4c; flex: none; }

/* ---------- 4. Header ---------- */
.top {
  position: sticky; top: 12px; z-index: 30;
  display: flex; align-items: center; gap: var(--s-5);
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin: 12px auto 0;
  padding: 8px 10px 8px 14px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow);
}
.logo { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--display); font-size: 1.25rem; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: var(--s-1); margin-left: auto; }
.nav a { padding: 10px 14px; border-radius: var(--r-pill); font-weight: 700; text-decoration: none; transition: background-color .2s; }
.nav a:hover { background: var(--pink); }
.top__cta { min-height: 46px; }
.menu-btn { display: none; }

/* ---------- 5. Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s-6); align-items: center;
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: var(--s-8) 0 var(--s-9);
}
/* Polka dots behind everything in the hero */
body::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1100px; z-index: -1;
  background: radial-gradient(circle, rgb(255 255 255 / 0.75) 4px, transparent 4.5px) 0 0 / 34px 34px;
  mask: linear-gradient(#000 60%, transparent);
}
.hero h1 { font-size: var(--fs-h1); line-height: 1.08; max-width: 13ch; }
.hl { background: linear-gradient(transparent 58%, var(--bubblegum) 58% 92%, transparent 92%); padding: 0 .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lede { margin-top: var(--s-5); font-size: var(--fs-lg); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); }
.hero__open { display: inline-flex; align-items: center; gap: var(--s-2); margin-top: var(--s-5); padding: 6px 14px; background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-pill); font-weight: 700; font-size: var(--fs-sm); }
.hero__open.is-closed { background: var(--butter); }
.hero__art { position: relative; justify-self: center; width: min(100%, 470px); }
.hero__svg { width: 100%; height: auto; overflow: visible; }
.bubble--hero { position: absolute; top: 2%; right: -2%; z-index: 2; font-size: var(--fs-md); transform: rotate(3deg); }
.bubble--hero::after { left: 26%; bottom: -11px; transform: rotate(45deg); }
.sticker-tag {
  display: inline-block; padding: 8px 16px;
  background: var(--lemon); border: var(--line) solid var(--ink); border-radius: var(--r-pill);
  box-shadow: var(--sticker); font-weight: 900; font-size: var(--fs-sm);
}
.sticker-tag--hero { position: absolute; left: 4%; bottom: 2%; transform: rotate(-5deg); }

/* ---------- 6. Bands ---------- */
.band { position: relative; padding: var(--s-8) var(--gutter) var(--s-9); background: var(--bg); }
/* scalloped top edge in the band's own colour */
.band::before {
  content: ""; position: absolute; left: 0; right: 0; top: -21px; height: 22px;
  background: radial-gradient(circle at 22px 22px, var(--bg) 21px, transparent 22px) 0 0 / 44px 22px repeat-x;
}
.band--lilac { --bg: var(--lilac); }
.band--mint { --bg: var(--mint); }
.band--butter { --bg: var(--butter); }
.band--sky { --bg: var(--sky); }
.band--pink { --bg: var(--pink); }
.band > * { width: min(var(--max), 100%); margin-inline: auto; }
.band__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5) var(--s-7); margin-bottom: var(--s-7); }
.band__head h2 { font-size: var(--fs-h2); }

/* ---------- 7. Builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr); gap: var(--s-7); align-items: start; }
.opts { display: grid; gap: var(--s-6); }
.opt { margin: 0; padding: var(--s-5) var(--s-5) var(--s-5); min-width: 0; }
.opt legend {
  float: left; width: 100%;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-3);
  margin-bottom: var(--s-4);
  font-family: var(--display); font-size: var(--fs-xl);
}
.opt legend + * { clear: both; }
.count, .sweet-out {
  font-family: var(--body); font-weight: 900; font-size: var(--fs-sm);
  padding: 2px 12px; background: var(--butter); border: 2px solid var(--ink); border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}
.count.is-full { background: var(--bubblegum); }
.opt .hint { margin-top: var(--s-3); }
#topMsg.is-warn { color: var(--ink); font-weight: 900; }

/* Sweetness slider: a fat candy track with a pearl thumb */
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; margin: 0; }
.slider::-webkit-slider-runnable-track { height: 18px; border: var(--line) solid var(--ink); border-radius: 999px; background: linear-gradient(90deg, var(--bubblegum) var(--fill, 50%), var(--white) var(--fill, 50%)); }
.slider::-moz-range-track { height: 12px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--white); }
.slider::-moz-range-progress { height: 12px; border-radius: 999px; background: var(--bubblegum); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -11px; border-radius: 50%; background: var(--ink); border: 4px solid var(--white); box-shadow: 0 0 0 3px var(--ink), var(--shadow); }
.slider::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); border: 4px solid var(--white); box-shadow: 0 0 0 3px var(--ink); }
.slider:focus-visible { outline: none; box-shadow: none; }
.slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--ink), 0 0 0 8px var(--lemon); }
.slider:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--ink), 0 0 0 8px var(--lemon); }
.ticks { display: flex; justify-content: space-between; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); padding: 0 4px; font-variant-numeric: tabular-nums; }

/* Cup column */
.cupcol { position: sticky; top: 100px; }
.cupcard { padding: var(--s-5); display: grid; gap: var(--s-4); background: var(--white); }
.cupstage { position: relative; display: grid; place-items: center; padding: var(--s-4) 0 var(--s-1); background: radial-gradient(circle, rgb(201 179 240 / .35) 3px, transparent 3.5px) 0 0 / 22px 22px, var(--lilac); border-radius: var(--r-md); border: 2px solid var(--ink); overflow: hidden; }
.cup { width: min(190px, 56%); height: auto; overflow: visible; transition: transform .6s var(--ease-bounce); transform-origin: 50% 100%; }
.cup.is-large { transform: scale(1.1); }
.cup.is-wiggle { animation: wiggle .6s var(--ease-out); }
.bubble--cup { position: absolute; top: 12px; left: 12px; max-width: 15ch; font-size: var(--fs-xs); padding: 6px 12px; z-index: 2; }
.bubble--cup::after { right: 16px; bottom: -11px; transform: rotate(45deg); width: 14px; height: 14px; }
.size-tag { position: absolute; right: 14px; bottom: 14px; padding: 4px 12px; background: var(--lemon); border: 2px solid var(--ink); border-radius: var(--r-pill); font-weight: 900; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 3px var(--white); }
.drink-name { font-size: var(--fs-h3); }
.drink-detail { color: var(--ink-soft); font-weight: 700; margin-top: calc(-1 * var(--s-2)); }

/* SVG layers: each liquid layer grows up from the bottom; toppings drop in */
#cupLiquid .layer, #cupFoam > * { transform-box: fill-box; transform-origin: 50% 100%; }
#cupLiquid rect { transition: fill .5s var(--ease-out), y .5s var(--ease-out), height .5s var(--ease-out); }
.piece { transform-box: fill-box; transform-origin: 50% 100%; }
.face .blink { transform-box: fill-box; transform-origin: 50% 60%; }
#cupMouth { transition: d .3s var(--ease-out); }

.sums { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.sum { padding: var(--s-3) 0 0; border-top: 4px solid var(--ink); min-width: 0; }
.sum__total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-2); }
.sum__label { font-weight: 900; font-size: var(--fs-sm); }
.sum__total strong { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sum__lines { list-style: none; margin: var(--s-3) 0 0; padding: var(--s-3) 0 0; border-top: 2px dashed var(--ink); display: grid; gap: 4px; font-size: var(--fs-xs); font-weight: 700; }
.sum__lines li { display: flex; justify-content: space-between; gap: var(--s-2); font-variant-numeric: tabular-nums; }
.sum__lines li span:last-child { white-space: nowrap; }
.sum__lines li.is-total { border-top: 2px solid var(--ink); padding-top: 4px; margin-top: 2px; font-weight: 900; }

/* Minibar: only on narrow screens, sticks to the bottom while the options scroll past */
.minibar { display: none; }
@media (max-width: 960px) {
  .minibar {
    position: sticky; bottom: 12px; z-index: 5;
    display: flex; align-items: center; gap: var(--s-3);
    padding: 8px 10px 8px 12px;
    background: var(--ink); color: var(--white);
    border-radius: var(--r-pill); box-shadow: 0 0 0 4px var(--white), var(--shadow-lift);
  }
  .minibar__sw { width: 30px; height: 30px; border-radius: 50%; background: var(--liq); border: 3px solid var(--white); flex: none; transition: background-color .4s; }
  .minibar__vals { display: flex; gap: var(--s-3); align-items: baseline; font-variant-numeric: tabular-nums; font-weight: 700; }
  .minibar__vals strong { font-family: var(--display); font-weight: 400; font-size: 1.2rem; }
  .minibar a { margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; background: var(--bubblegum); color: var(--ink); border-radius: var(--r-pill); font-weight: 900; text-decoration: none; white-space: nowrap; }
}

/* ---------- 8. Pickup order ---------- */
.pickup { margin-top: var(--s-8); padding: clamp(20px, 3vw, 40px); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-6) var(--s-7); background: var(--white); }
.pickup__intro h3 { font-size: var(--fs-h2); font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); }
.pickup__intro p { margin-top: var(--s-4); max-width: 46ch; }
.shelf { width: min(100%, 340px); height: auto; margin-top: var(--s-6); overflow: visible; }
.pickup__drink { display: flex; gap: var(--s-2); align-items: center; font-weight: 900; font-size: var(--fs-lg); }
.pickup__fields { display: grid; gap: var(--s-5); align-content: start; }
.slot-day { font-weight: 700; color: var(--ink-soft); margin-left: var(--s-2); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: var(--s-3); }
.chip--slot > span { width: 100%; justify-content: center; font-variant-numeric: tabular-nums; flex-direction: column; row-gap: 0; padding: 6px 8px; border-radius: var(--r-sm); }
.chip--slot input:checked + span::before { display: none; }
.chip--slot small { font-size: 0.75rem; }
.slots.is-invalid .chip > span { border-style: dashed; border-color: #a3123f; }

#sendBtn { position: relative; }
.spin { width: 26px; height: 26px; fill: var(--bubblegum); display: none; }
#sendBtn.is-loading .spin { display: block; animation: spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) { #sendBtn.is-loading .spin { animation: none; } }

.pick-error { grid-column: 2; padding: var(--s-5); background: #fff0f4; border: var(--line) dashed #a3123f; border-radius: var(--r-md); display: grid; gap: var(--s-3); justify-items: start; }
.pick-error h4 { font-size: var(--fs-xl); }

.ticket { grid-column: 2; position: relative; padding: var(--s-6) var(--s-5) var(--s-5); background: var(--mint); border: var(--line) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sticker); display: grid; gap: var(--s-3); justify-items: start; }
.ticket:focus { outline: none; }
.ticket__pearl { position: absolute; right: 18px; top: -26px; width: 64px; height: 64px; filter: drop-shadow(0 0 0 #fff) drop-shadow(0 6px 8px rgb(58 31 69 / .3)); }
.ticket h4 { font-size: var(--fs-xl); padding-right: 64px; }
.ticket__big { font-family: var(--display); font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); line-height: 1.2; font-variant-numeric: tabular-nums; }
.ticket__list { margin: 0; display: grid; gap: var(--s-2); width: 100%; padding: var(--s-3) 0; border-block: 2px dashed var(--ink); }
.ticket__list div { display: flex; justify-content: space-between; gap: var(--s-4); }
.ticket__list dt { font-weight: 700; }
.ticket__list dd { margin: 0; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.ticket__note { font-size: var(--fs-sm); }
.pickup.is-done .pickup__fields { display: none; }

/* ---------- 9. Menu favourites ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-7); }
.pill {
  min-height: 46px; padding: 8px 20px;
  background: var(--white); border: var(--line) solid var(--ink); border-radius: var(--r-pill);
  font-weight: 900; cursor: pointer;
  transition: transform .35s var(--ease-bounce), background-color .2s;
}
.pill:hover { transform: translateY(-2px); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--white); box-shadow: 0 0 0 4px var(--white), var(--shadow); }
.filters__count { margin-left: auto; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.drinks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s-7) var(--s-6); }
.drink { position: relative; padding: var(--s-5); display: grid; grid-template-rows: auto auto 1fr auto auto; gap: var(--s-3); transform: rotate(var(--tilt, 0deg)); transition: transform .45s var(--ease-bounce), box-shadow .3s var(--ease-out); }
.drink:nth-child(4n+1) { --tilt: -1.5deg; }
.drink:nth-child(4n+2) { --tilt: 1deg; }
.drink:nth-child(4n+3) { --tilt: -0.5deg; }
.drink:nth-child(4n) { --tilt: 1.75deg; }
.drink:hover { transform: rotate(0deg) translateY(-4px); box-shadow: var(--sticker-lift); }
.drink__cup { width: 76px; height: auto; margin-top: -48px; filter: drop-shadow(0 0 0 #fff); }
.drink__cup { filter: url(#diecut); }
.drink h3 { font-size: var(--fs-h3); }
.drink p { font-size: var(--fs-sm); }
.drink__tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.drink__tags span { padding: 2px 10px; border: 2px solid var(--ink); border-radius: var(--r-pill); font-weight: 700; font-size: var(--fs-xs); background: var(--mint); }
.drink__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); border-top: 2px dashed var(--ink); }
.drink__foot strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.drink.is-hidden { display: none; }

/* ---------- 10. Stamp card ---------- */
.stamps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: center; }
.stamps > * { width: auto; margin: 0; }
.stamps { padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); }
.stamps__copy h2 { font-size: var(--fs-h2); max-width: 14ch; }
.stamps__copy p { margin-top: var(--s-4); max-width: 50ch; }
.stamps__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); }
.card { width: 100%; max-width: 480px; justify-self: end; padding: var(--s-5); background: var(--white); transform: rotate(-2deg); background-image: radial-gradient(circle, var(--pink) 3px, transparent 3.5px); background-size: 26px 26px; }
.card__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-4); padding-bottom: var(--s-4); margin-bottom: var(--s-4); border-bottom: 2px dashed var(--ink); background: var(--white); padding: var(--s-2) var(--s-3); }
.card__brand { font-family: var(--display); font-size: var(--fs-lg); }
.card__count { font-weight: 700; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.card__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.slot {
  position: relative; aspect-ratio: 1; border: var(--line) dashed var(--ink); border-radius: 50%; background: var(--white);
  display: grid; place-items: center;
}
.slot::after { content: ""; position: absolute; inset: 0; background: center / 82% no-repeat; }
.slot--last { border-style: solid; background: var(--lemon); }
.slot--last::before { content: "FREE"; font-family: var(--display); font-size: clamp(0.85rem, 0.6rem + 1vw, 1.2rem); }
.slot.is-on { border-style: solid; background: var(--bubblegum); }
.slot.is-on::before { content: none; }
.slot.is-on::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='26' fill='%233a1f45'/%3E%3Cellipse cx='19' cy='18' rx='6' ry='4' fill='%23fff' opacity='.35' transform='rotate(-30 19 18)'/%3E%3Ccircle cx='22' cy='31' r='3.500' fill='%23fff'/%3E%3Ccircle cx='38' cy='31' r='3.500' fill='%23fff'/%3E%3Cellipse cx='16' cy='38' rx='4' ry='2.500' fill='%23ff9fc0'/%3E%3Cellipse cx='44' cy='38' rx='4' ry='2.500' fill='%23ff9fc0'/%3E%3Cpath d='M26 38q4 4 8 0' fill='none' stroke='%23fff' stroke-width='2.500' stroke-linecap='round'/%3E%3C/svg%3E");
  transform: rotate(var(--r, -8deg));
}
.slot.is-new::after { animation: stamp .55s var(--ease-bounce); }
.slot:nth-child(2n) { --r: 10deg; }
.slot:nth-child(3n) { --r: -14deg; }
.reward { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); background: var(--mint); border: var(--line) solid var(--ink); border-radius: var(--r-md); display: grid; gap: var(--s-3); justify-items: start; }
.reward__title { font-family: var(--display); font-size: var(--fs-xl); }
.card.is-full { transform: rotate(0deg); }

/* ---------- 11. Shops ---------- */
.shop-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); }
.shop { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.shop:nth-child(2) { transform: rotate(0.8deg); }
.shop:nth-child(1) { transform: rotate(-0.8deg); }
.shop__map { width: 100%; height: auto; border-bottom: var(--line) solid var(--ink); }
.shop__body { padding: var(--s-5); display: grid; gap: var(--s-3); align-content: start; }
.shop h3 { font-size: var(--fs-h3); }
.shop__status { justify-self: start; padding: 4px 14px; border: 2px solid var(--ink); border-radius: var(--r-pill); font-weight: 900; font-size: var(--fs-sm); background: var(--white); }
.shop__status.is-open { background: var(--matcha); }
.shop__status.is-closed { background: var(--butter); }
.shop__line { display: flex; gap: var(--s-2); align-items: flex-start; }
.shop__line .ico { margin-top: 3px; }
.hours { width: 100%; border-collapse: collapse; margin-top: var(--s-2); font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 8px 10px; text-align: left; border-top: 2px dashed rgb(58 31 69 / .35); font-size: var(--fs-sm); }
.hours th { font-weight: 700; }
.hours td { text-align: right; font-weight: 900; }
.hours tr.is-today th, .hours tr.is-today td { background: var(--butter); }
.hours tr.is-today th { border-radius: 10px 0 0 10px; }
.hours tr.is-today td { border-radius: 0 10px 10px 0; }

/* ---------- 12. Questions ---------- */
.faq__list { columns: 2; column-gap: var(--s-6); }
.q { padding: 0; border-radius: var(--r-md); break-inside: avoid; margin: 0 0 var(--s-5); display: block; }
.faq__list > .q:first-child { margin-top: 6px; }
.q summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); min-height: 56px; font-weight: 900; font-size: var(--fs-lg); cursor: pointer; border-radius: var(--r-md); }
.q summary::-webkit-details-marker { display: none; }
.q summary::after {
  content: ""; width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--bubblegum) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%233a1f45' stroke-width='2.250' stroke-linecap='round'%3E%3Cpath d='M5 10h10M10 5v10'/%3E%3C/svg%3E") center / 18px no-repeat;
  border: 2px solid var(--ink);
  transition: transform .35s var(--ease-bounce);
}
.q[open] summary::after { transform: rotate(45deg); background-color: var(--matcha); }
.q p { padding: 0 var(--s-5) var(--s-5); max-width: 62ch; }

/* ---------- 13. Footer, toast ---------- */
.foot { position: relative; background: var(--ink); color: var(--white); padding: var(--s-8) max(var(--gutter), calc((100% - var(--max)) / 2)) var(--s-6); display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s-6); }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -21px; height: 22px; background: radial-gradient(circle at 22px 22px, var(--ink) 21px, transparent 22px) 0 0 / 44px 22px repeat-x; }
.foot > * { min-width: 0; }
.foot a { color: var(--white); text-decoration-color: var(--bubblegum); }
.logo--foot { font-size: 1.6rem; color: var(--white); }
.logo--foot svg { background: var(--white); border-radius: 50%; box-shadow: 0 0 0 3px var(--bubblegum); }
.foot__main p { margin-top: var(--s-4); max-width: 44ch; color: #f1e6f5; }
.foot__nav { display: grid; gap: var(--s-2); align-content: start; }
.foot__nav a { min-height: 32px; display: inline-flex; align-items: center; }
.foot__contact { display: grid; gap: var(--s-2); align-content: start; }
.foot__small { grid-column: 1 / -1; padding-top: var(--s-5); border-top: 2px dashed rgb(255 255 255 / .35); font-size: var(--fs-sm); color: #e8d9ee; }
.foot :focus-visible { outline-color: var(--white); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40; translate: -50% 0;
  max-width: calc(100% - 32px);
  padding: 12px 20px; background: var(--ink); color: var(--white); border-radius: var(--r-pill);
  box-shadow: 0 0 0 4px var(--white), var(--shadow-lift); font-weight: 700;
}

/* ---------- 14. Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pour { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes drop {
  0% { transform: translateY(-300px); }
  60% { transform: translateY(4px) scale(1.08, .9); }
  80% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -4deg; } 60% { rotate: 3deg; } }
@keyframes stamp { 0% { transform: scale(1.8) rotate(-30deg); opacity: 0; } 100% { transform: scale(1) rotate(var(--r, -8deg)); opacity: 1; } }
@keyframes float { 50% { transform: translateY(-10px) rotate(8deg); } }
@keyframes hop { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-16px); } 90% { transform: translateY(0) scale(1.04, .96); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes tilt { 50% { rotate: -2deg; } }

@media (prefers-reduced-motion: no-preference) {
  #cupLiquid .layer.pour { animation: pour .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 260ms); }
  .piece.drop { animation: drop .9s var(--ease-out) both; animation-delay: calc(400ms + var(--d, 0) * 45ms); }
  #cupFoam .pour { animation: pour .6s var(--ease-out) both; animation-delay: .9s; }
  .float { transform-box: fill-box; transform-origin: center; animation: float 5s ease-in-out infinite; }
  .float--b { animation-delay: -1.6s; animation-duration: 6s; }
  .float--c { animation-delay: -3s; }
  .hop { transform-box: fill-box; transform-origin: 50% 100%; animation: hop 3.4s var(--ease-out) infinite; }
  .hop--b { animation-delay: -1.1s; }
  .hop--c { animation-delay: -2.3s; }
  .blink { animation: blink 4.5s infinite; }
  .tapi { transform-box: fill-box; transform-origin: 50% 100%; animation: tilt 6s ease-in-out infinite; }
}

/* ---------- 15. Narrow screens ---------- */
@media (max-width: 1080px) {
  .nav { gap: 0; }
  .nav a { padding: 10px 10px; }
}
@media (max-width: 960px) {
  .top { gap: var(--s-3); flex-wrap: wrap; border-radius: var(--r-lg); }
  .menu-btn {
    display: inline-flex; align-items: center; gap: var(--s-2); margin-left: auto;
    min-height: 46px; padding: 8px 16px; background: var(--white); border: var(--line) solid var(--ink); border-radius: var(--r-pill); font-weight: 900; cursor: pointer;
  }
  .nav { display: none; order: 5; width: 100%; flex-direction: column; margin: 0; padding: var(--s-2) 0 var(--s-2); border-top: 2px dashed var(--ink); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; }
  .top__cta { display: none; }

  .hero { grid-template-columns: 1fr; padding-top: var(--s-7); }
  .hero__art { width: min(100%, 420px); }
  .builder { grid-template-columns: 1fr; }
  .cupcol { position: static; order: -1; }
  .pickup { grid-template-columns: 1fr; }
  .pick-error, .ticket { grid-column: 1; }
  .stamps { grid-template-columns: 1fr; }
  .card { max-width: 520px; width: 100%; justify-self: center; }
  .shop-list { grid-template-columns: 1fr; }
  .faq__list { columns: 1; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot__main { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  :root { --cut: 5px; }
  .logo span { font-size: 1.05rem; }
  .hero { padding-bottom: var(--s-8); }
  .hero__actions .btn { width: 100%; }
  .bubble--hero { right: 0; top: -4%; max-width: 22ch; font-size: var(--fs-sm); }
  .band { padding-top: var(--s-7); padding-bottom: var(--s-8); }
  .band__head { margin-bottom: var(--s-6); }
  .bubble--left::after { left: 28px; top: -11px; transform: rotate(-135deg); }
  .opt { padding: var(--s-4); }
  .opt legend { font-size: var(--fs-lg); }
  .chips { gap: var(--s-2); }
  .chip > span { padding: 8px 13px; }
  .cupcard { padding: var(--s-4); }
  .sums { grid-template-columns: 1fr; }
  .filters__count { margin-left: 0; width: 100%; }
  .drinks { gap: var(--s-7); }
  .stamps__actions .btn { width: 100%; }
  .card__grid { gap: var(--s-3); }
  .foot { grid-template-columns: 1fr; }
}
