/* ---------- bowl builder ---------- */
.builder { position: relative; background: var(--cream); scroll-margin-top: 0; }
.builder .pin { min-height: 100svh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.1fr); gap: clamp(20px, 4vw, 64px); align-items: center; padding: 96px var(--gutter) clamp(56px, 7vw, 96px); max-width: 1400px; margin: 0 auto; }

/* left: steps panel */
.panel { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.rail { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.rail button { border: 0; background: transparent; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(29,35,28,.4); cursor: default; }
.rail button.done { color: var(--green); cursor: pointer; }
.rail button.done::before { content: "\2713  "; }
.rail button.now { background: var(--green); color: var(--cream); }
.step-view { position: relative; min-height: 0; overflow: visible; }
.step { display: none; }
.step.active { display: block; animation: stepIn .5s cubic-bezier(.2,.7,.2,1); }
@keyframes stepIn { from { opacity: 0; transform: translateY(18px); } }
.step h2 { font-size: clamp(32px, 4.2vw, 60px); }
.step .sub { margin: 12px 0 20px; color: var(--muted); font-size: 17px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; max-height: 46vh; overflow: auto; padding: 2px; scrollbar-width: thin; }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; cursor: pointer; border-radius: 999px;
  padding: 8px 16px 8px 8px; background: var(--cream-2);
  box-shadow: inset 0 0 0 1.5px rgba(31,58,36,.14);
  font-size: 15px; font-weight: 500; transition: background .2s, box-shadow .2s, transform .15s;
}
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--green); }
.chip:active { transform: scale(.97); }
.chip .thumb { width: 34px; height: 34px; border-radius: 50%; background: #e9dccb center / 140% no-repeat; flex: none; }
.chip .thumb.sauce { background-size: cover; }
.chip[aria-pressed="true"] { background: var(--green); color: var(--cream); box-shadow: none; }
.chip[aria-pressed="true"] .thumb { box-shadow: 0 0 0 2px var(--cream); }
.chip.big { padding: 14px 22px; font-size: 17px; font-weight: 700; flex-direction: column; align-items: flex-start; gap: 2px; border-radius: 18px; min-width: 180px; }
.chip.big small { font-weight: 400; font-size: 13px; opacity: .75; }
/* Size step: two plain cards, contents and price. */
.choices.sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 480px; overflow: visible; }
.size-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: left; border: 0; cursor: pointer; border-radius: 18px; padding: 16px 18px; font: inherit; background: var(--cream-2); box-shadow: inset 0 0 0 1.5px rgba(31,58,36,.14); }
.size-card:hover { box-shadow: inset 0 0 0 1.5px var(--green); }
.size-card .head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.size-card b { font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; color: var(--green); }
.size-card .price { font-size: 15px; font-weight: 700; color: var(--terracotta); }
.size-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14px; color: var(--muted); }
.size-card li span { display: inline-block; min-width: 3.4em; font-weight: 700; color: var(--ink); }
.size-card[aria-pressed="true"] { background: var(--green); box-shadow: none; }
.size-card[aria-pressed="true"] b, .size-card[aria-pressed="true"] li span, .size-card[aria-pressed="true"] .price { color: var(--cream); }
.size-card[aria-pressed="true"] ul { color: rgba(244,233,220,.8); }

.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.step-foot { display: flex; align-items: center; gap: 12px; margin-top: 26px; min-height: 52px; flex-wrap: wrap; }
.step-foot .btn.ghost:disabled { opacity: .25; }
.hint { font-size: 14px; color: var(--muted); margin-left: 4px; }
.hint.warn { color: var(--terracotta); font-weight: 600; }

/* right: bowl stage */
.stage-wrap { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.stage { position: relative; width: min(100%, calc(100svh - 170px)); aspect-ratio: 1 / 1; border-radius: 28px; overflow: hidden; background: #c98f70; box-shadow: 0 40px 80px -40px rgba(60,30,10,.55); isolation: isolate; }
.stage .zoom { position: absolute; inset: 0; transform: scale(1.32); transform-origin: 50% 57%; }
.stage img.layer, .stage .layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage .heaps, .stage .crunch, .stage .fx { position: absolute; inset: 0; pointer-events: none; }
.stage .heap {
  position: absolute; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 92%;
  filter: drop-shadow(0 6px 5px rgba(50, 25, 5, .35)) drop-shadow(0 1px 1px rgba(50,25,5,.4));
  transition: opacity .35s, transform .35s, left .6s cubic-bezier(.3,.8,.3,1), bottom .6s cubic-bezier(.3,.8,.3,1), width .6s cubic-bezier(.3,.8,.3,1), max-height .6s;
  will-change: transform;
}
.stage .heap.leave { opacity: 0; transform: translateY(-6%) scale(.9); }
.stage .fall-shadow { position: absolute; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, rgba(40,18,4,.42), rgba(40,18,4,0)); }

/* base swap: the new base spreads out from the centre of the bowl */
@property --reveal { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.stage .base-next {
  --reveal: 0%;
  -webkit-mask-image: radial-gradient(ellipse 30% 14% at 50% 53%, #000 calc(var(--reveal) - 20%), transparent var(--reveal));
  mask-image: radial-gradient(ellipse 30% 14% at 50% 53%, #000 calc(var(--reveal) - 20%), transparent var(--reveal));
  transition: --reveal 1.5s cubic-bezier(.4,.1,.3,1) .25s;
}
.stage .base-next.on { --reveal: 260%; }
.stage .grain { position: absolute; border-radius: 50%; box-shadow: 0 1px 1px rgba(40,20,5,.35); will-change: transform; }
.stage .grain.leaf { border-radius: 70% 10% 70% 10%; }

.stage svg.sauces { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.stage svg.sauces path.drizzle:not([stroke-dasharray]) { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s ease-out; }
.stage svg.sauces path.drizzle[stroke-dasharray] { opacity: 0; transition: opacity .4s .2s; }
.stage svg.sauces path.drizzle.on[stroke-dasharray] { opacity: 1; }
.stage svg.sauces path.drizzle.on { stroke-dashoffset: 0; }
.stage .crunch svg.sprinkle { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stage .label { position: absolute; left: 16px; bottom: 14px; z-index: 6; background: rgba(251,245,238,.9); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--green); transition: opacity .3s; }

/* summary */
.summary { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; font-size: 15px; }
.summary li { display: grid; grid-template-columns: 90px 1fr; gap: 10px; }
.summary b { color: var(--terracotta); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .1em; padding-top: 3px; }

/* ticket */
.ticket { background: var(--cream-2); color: var(--ink); border-radius: 22px; padding: 22px 112px 22px 24px; position: relative; border: 2px dashed var(--terracotta); overflow: hidden; }
.ticket .code { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: .06em; color: var(--green); margin: 6px 0; }
.ticket p { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.ticket .stamp { position: absolute; right: 16px; top: 50%; margin-top: -43px; width: 86px; height: 86px; border-radius: 50%; border: 3px solid var(--terracotta); color: var(--terracotta); display: grid; place-content: center; text-align: center; font-weight: 800; font-size: 22px; text-transform: uppercase; line-height: 1; transform: rotate(-14deg); opacity: .85; }
.ticket .stamp small { display: block; font-size: 9px; letter-spacing: .12em; margin-top: 3px; }
.ticket.stamped .stamp { animation: thump .5s cubic-bezier(.3,1.6,.5,1) .35s both; }
@keyframes thump { from { transform: rotate(-30deg) scale(2.4); opacity: 0; } to { transform: rotate(-14deg) scale(1); opacity: .85; } }

/* ---------- claim pop-up ---------- */
html.modal-open { overflow: hidden; }
.claim-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.cm-backdrop { position: absolute; inset: 0; background: rgba(20,28,18,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .35s ease; }
.cm-card {
  position: relative; width: min(920px, 100%); max-height: calc(100svh - 48px); overflow: auto;
  display: grid; grid-template-columns: 1fr 1.1fr; background: var(--cream-2); border-radius: 30px;
  box-shadow: 0 50px 120px -40px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(40px) scale(.96); transition: opacity .35s ease, transform .55s cubic-bezier(.2,1.2,.3,1);
}
.claim-modal.open .cm-backdrop { opacity: 1; }
.claim-modal.open .cm-card { opacity: 1; transform: none; }
.cm-close { position: absolute; top: 14px; right: 14px; z-index: 10; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--green); color: var(--cream); cursor: pointer; box-shadow: 0 6px 18px -6px rgba(0,0,0,.45), 0 0 0 3px rgba(251,245,238,.9); transition: transform .15s, background .2s; }
.cm-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.cm-close:hover { background: #173019; transform: scale(1.06); }
.cm-bowl { position: relative; background: #c98f70; min-height: 100%; }
.cm-bowl .stage { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.cm-bowl .stage .zoom { transform: scale(1.5); transform-origin: 50% 54%; }
.cm-size { position: absolute; left: 18px; bottom: 18px; z-index: 6; background: var(--green); color: var(--cream); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; }
.cm-body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 4px; }
.cm-body h2 { font-size: clamp(34px, 4vw, 52px); margin: 4px 0 12px; }
.cm-bowl-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 22px; padding: 14px 16px; background: var(--cream); border-radius: 16px; font-size: 15px; }
.cm-bowl-list dt { color: var(--terracotta); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .1em; padding-top: 3px; }
.cm-bowl-list dd { margin: 0; color: var(--ink); line-height: 1.35; }
.cm-form { display: grid; gap: 8px; }
.cm-label { font-weight: 700; font-size: 14px; color: var(--green); }
.cm-form input[type=email], .cm-form input[type=text] { width: 100%; border: 0; border-radius: 14px; background: #fff; padding: 15px 16px; font: inherit; font-size: 17px; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(31,58,36,.2); outline: none; }
.cm-form input[type=email]:focus, .cm-form input[type=text]:focus { box-shadow: inset 0 0 0 2px var(--green); }
.cm-send { width: 100%; padding: 16px 22px; font-size: 17px; }
.cm-form .check { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 4px; }
.cm-form .err { color: var(--terracotta); font-size: 14px; font-weight: 600; }
.cm-form .err:empty { display: none; }
.cm-fine { font-size: 13px; color: var(--muted); margin-top: 10px; }
.cm-done { margin-top: 16px; align-self: flex-start; }

/* mobile: bowl on top, panel below (to be refined) */
@media (max-width: 900px) {
  .builder .pin { grid-template-columns: 1fr; align-items: start; padding: 72px 16px 56px; gap: 14px; min-height: auto; }
  .stage-wrap { order: -1; }
  .stage { width: min(100%, 36svh); border-radius: 20px; }
  .rail { margin-bottom: 10px; }
  .rail button { padding: 4px 8px; font-size: 10px; }
  .step h2 { font-size: 28px; }
  .step .sub { margin: 6px 0 10px; font-size: 15px; }
  .choices { max-height: none; }
  .chip { font-size: 14px; padding: 6px 12px 6px 6px; }
  .chip .thumb { width: 28px; height: 28px; }
  .chip.big { min-width: 140px; padding: 10px 16px; }
  .step-foot { margin-top: 14px; }
  .summary { font-size: 13px; gap: 2px; margin-bottom: 10px; }
  .claim-modal { padding: 0; place-items: end stretch; }
  .cm-card { grid-template-columns: 1fr; border-radius: 26px 26px 0 0; max-height: 94svh; transform: translateY(100%); }
  .cm-bowl { aspect-ratio: 16 / 10; min-height: 0; }
  .cm-bowl { aspect-ratio: 16 / 9; }
  .cm-body { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .cm-body h2 { font-size: 30px; margin: 0 0 14px; }
  .cm-bowl-list { font-size: 14px; padding: 12px 14px; margin-bottom: 16px; }
  .size-card { padding: 14px; }
  .size-card b { font-size: 18px; }
  .size-card ul { font-size: 13px; }
  .builder .panel, .step, .step-view { min-width: 0; max-width: 100%; }
}

/* Next nudges once the step is filled (no auto-advance on picks) */
.builder .btn.go { animation: nudge 2.2s ease-in-out 1s infinite; }
@keyframes nudge { 0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(198,90,46,.45); } 85% { box-shadow: 0 0 0 10px rgba(198,90,46,0); } }
@media (prefers-reduced-motion: reduce) { .builder .btn.go { animation: none; } }

.ticket .for { font-weight: 700; margin-top: -4px; }
