:root {
  --blue: #0027F6;
  --lilac: #C6D2FF;
  --lilac2: #B9A9F0;
  --paper: #fff;
  --matcha: #8DB33A;
  --hand: "Mansalva", cursive;
  --mono: "Anonymous Pro", ui-monospace, monospace;
  --slow: cubic-bezier(.2, .7, .1, 1);
  --trayh: 148px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--blue); font: 16px/1.4 var(--mono); -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- cover: the tin, full bleed — no bar, no tray ---------- */
.cover { min-height: 100svh; background: var(--blue); color: #fff; display: grid; grid-template-rows: auto 1fr auto; padding: calc(18px + env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom)); }
.cover__top { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.cover__top img { width: 40px; height: 40px; }
.tin-small { margin: 0; font-size: 13px; letter-spacing: .08em; }
.tin-small--r { text-align: right; }
.cover__title { align-self: center; margin: 0; font: clamp(52px, 15.5vw, 200px)/.92 var(--hand); letter-spacing: .03em; }
.cover__foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.scrollhint { color: #fff; text-decoration: none; animation: nudge 2.4s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }
.cover__direct { background: none; border: 0; padding: 0; color: #fff; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }

/* ---------- tray (mobile: pinned to the thumb zone) ---------- */
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--lilac); border-top: 1.5px solid var(--blue); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); transform: translateY(115%); transition: transform .8s var(--slow); }
.tray.in { transform: none; }
.tray__head { display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 0; background: none; border: 0; color: var(--blue); font-family: "Archivo", sans-serif; text-align: left; }
.tray__label { margin-right: auto; font-size: 13px; font-weight: 800; font-stretch: 112%; letter-spacing: .14em; }
.tray__label::after { content: " ▴"; font-size: 10px; }
.tray.open .tray__label::after { content: " ▾"; }
.tray__count, .tray__total { font-size: 21px; line-height: 1; font-weight: 800; font-stretch: 68%; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tray__count { font-weight: 500; }
.tray__surface { padding: 6px 0 0; }
.slab {
  position: relative; height: 84px; border-radius: 3px;
  background-color: #979aa1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .22 0 0 0 1.1 -.2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 5px 0 #6f7177, 0 9px 14px rgba(0, 20, 120, .25);
  display: grid; grid-template-columns: 1.05fr 1.2fr .9fr .9fr .9fr; align-items: end; padding: 0 6px 6px;
}
.slot { height: 74px; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transform: translateY(-46px) rotate(-4deg); transition: opacity .5s var(--slow), transform .9s var(--slow); color: var(--blue); }
.slot svg { width: 100%; max-width: 70px; height: 70px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); }
.slot.on { opacity: 1; transform: none; }
.slab__empty { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: #fff; font-size: 13px; letter-spacing: .04em; transition: opacity .4s; }
.slab.has .slab__empty { opacity: 0; }
.tray__cart { display: none; }
.tray__list { list-style: none; margin: 0; padding: 0; }
.tray__list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; padding: 5px 0; border-bottom: 1px dotted var(--blue); }
.tl__q { display: inline-flex; align-items: center; border: 1.5px solid var(--blue); }
.tl__q button { width: 28px; height: 26px; background: none; border: 0; font-size: 16px; padding: 0; }
.tl__q b { min-width: 18px; text-align: center; font-family: "Archivo", sans-serif; font-stretch: 75%; }
.tl__p { font-family: "Archivo", sans-serif; font-weight: 700; font-stretch: 75%; font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.tl__empty { display: block !important; opacity: .7; }
.tray__direct { background: none; border: 0; padding: 8px 0 0; font-size: 13px; text-decoration: underline; color: var(--blue); }
.tray__note { margin: 6px 0 0; font-size: 12px; }
.tray__cta { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1.5px solid var(--blue); background: var(--blue); color: #fff; font: 800 15px/1.2 "Archivo", sans-serif; font-stretch: 100%; letter-spacing: .1em; border-radius: 0; }
.tray__cta:disabled { background: transparent; color: var(--blue); opacity: .45; cursor: default; }

/* ---------- guide ---------- */
.guide { padding-bottom: calc(var(--trayh) + 40px); }
.step { min-height: calc(100svh - var(--trayh)); padding: 28px 16px 36px; border-bottom: 1.5px dashed var(--blue); position: relative; }
.step__n { font: 92px/0.85 var(--hand); margin: 0; letter-spacing: -.02em; }
.step__verb { font: 26px/1.05 var(--hand); margin: 4px 0 18px; }


/* product step */
.pstep { display: grid; gap: 12px; }
.pstep__photo { position: relative; background: var(--lilac); border: 1.5px solid var(--blue); padding: 0; cursor: zoom-in; }
.pstep__photo img { width: 100%; aspect-ratio: 1250 / 848; object-fit: cover; }
.pstep__photo span { position: absolute; right: 8px; bottom: 8px; background: #fff; border: 1.5px solid var(--blue); font-size: 12px; padding: 2px 6px; }
.pstep__name { font: 30px/1 var(--hand); margin: 4px 0 0; }
.pstep__price { font-weight: 700; font-size: 18px; margin: 0; }
.pstep__desc { margin: 0; max-width: 34em; }
.pstep__facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.pstep__facts li::before { content: "— "; }
.pstep__act { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.add { padding: 12px 16px; border: 1.5px solid var(--blue); background: #fff; color: var(--blue); font-weight: 700; letter-spacing: .05em; border-radius: 0; transition: background .4s, color .4s; }
.add[aria-pressed="true"] { background: var(--blue); color: #fff; }
.add--sm { padding: 2px 8px; font-size: 12px; }
.pstep__note { font-size: 13px; margin: 0; opacity: .75; }
.only { font-size: 13px; margin: 0; }

/* prep */
.prep { display: grid; gap: 14px; }
.prep__steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 15px; }
.prep__steps li { opacity: .35; transition: opacity .6s; }
.prep__steps li.now { opacity: 1; }
.prep__steps li.done { opacity: .6; text-decoration: line-through; text-decoration-thickness: 1px; }
.v { font-weight: 700; border-bottom: 1.5px solid; }
.bowl { position: relative; width: 100%; max-width: 420px; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.bowl__svg { width: 100%; height: auto; overflow: visible; }
#liquid { transition: fill .6s; }
.bowl__tool { position: absolute; width: 96px; height: 96px; left: 50%; top: 2%; margin-left: -48px; color: var(--blue); pointer-events: none; transition: opacity .3s; }
.pbar { height: 8px; border: 1.5px solid var(--blue); margin: 6px auto 0; max-width: 320px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--matcha); transform: scaleX(0); transform-origin: left; }
.bowl.done .pbar i { transform: scaleX(1) !important; }
.bowl__readout { text-align: center; font-size: 14px; font-weight: 700; letter-spacing: .05em; min-height: 1.4em; margin-top: 4px; }
.prep__reset { justify-self: start; background: none; border: 0; text-decoration: underline; padding: 0; font-size: 14px; }
.ref { font-size: 12px; margin: 0; opacity: .75; }

/* drink */
.drink { position: relative; margin: 0; }
.drink img:first-child { width: 100%; max-height: 62svh; object-fit: cover; border: 1.5px solid var(--blue); }
.drink__bernie { position: absolute; width: 38%; right: 4%; bottom: -6%; }
.tagline { font: 30px/1 var(--hand); margin: 28px 0 0; }

/* end */
.end ul { list-style: none; padding: 0; margin: 0 0 8px; }
.end li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--blue); padding: 6px 0; }
.end .missing { opacity: .45; }
.end .tot { font-weight: 700; font-size: 18px; margin: 8px 0 14px; }
.kitnote { border: 1.5px solid var(--blue); padding: 10px; margin: 18px 0; font-size: 14px; }
.kitnote img { margin-bottom: 8px; }
.kitnote p { margin: 4px 0; }
.sold { background: var(--blue); color: #fff; padding: 0 5px; font-weight: 700; }
.back { background: var(--blue); color: #fff; margin: 24px -16px -36px; padding: 22px 16px 30px; display: grid; gap: 12px; }
.back__h { margin: 0; font: 24px/1 var(--hand); }
.back__links { list-style: none; margin: 0; padding: 0; font-size: 17px; line-height: 2; }
.back__links a { color: #fff; }
.credit { font-size: 12px; margin: 0; opacity: .85; }

/* sheets */
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet[hidden] { display: none; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(0, 39, 246, .35); animation: fade .5s var(--slow); }
.sheet__body { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92svh; overflow: auto; background: #fff; border-top: 2px solid var(--blue); padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); animation: rise .7s var(--slow); }
.sheet__x { position: absolute; right: 8px; top: 4px; background: none; border: 0; font-size: 32px; line-height: 1; padding: 6px 10px; }
.sheet__h { font: 28px/1 var(--hand); margin: 0 0 12px; }
.gal { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 26px -16px 6px; padding: 0 16px; scrollbar-width: none; }
.gal img { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 3/2; object-fit: cover; border: 1.5px solid var(--blue); }
.dots { text-align: center; font-size: 12px; min-height: 1em; }
#dName { font: 32px/1 var(--hand); margin: 10px 0 4px; }
.dprice { font-weight: 700; margin: 0 0 8px; }
.qty { display: inline-flex; border: 1.5px solid var(--blue); margin: 12px 0; }
.qty button { width: 44px; height: 40px; background: none; border: 0; font-size: 20px; }
.qty span { min-width: 36px; display: grid; place-items: center; font-weight: 700; }
.btn { display: block; width: 100%; padding: 14px; background: var(--blue); color: #fff; border: 0; font-weight: 700; letter-spacing: .06em; border-radius: 0; }
.btn:disabled { opacity: .4; }
.wixlink { display: inline-block; margin-top: 12px; font-size: 13px; }
.directlist, .cartlist { list-style: none; padding: 0; margin: 0; }
.directlist li button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; background: none; border: 0; border-bottom: 1px dotted var(--blue); padding: 8px 0; }
.directlist img { width: 64px; height: 44px; object-fit: cover; border: 1px solid var(--blue); }
.directlist b { font: 20px/1 var(--hand); font-weight: 400; flex: 1; }
.cartlist li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; border-bottom: 1px dotted var(--blue); padding: 8px 0; }
.cartlist .qty { margin: 0; }
.cartlist .qty button { width: 36px; height: 32px; }
.carttotal { font-weight: 700; font-size: 18px; text-align: right; }
.toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -20px); background: var(--blue); color: #fff; padding: 8px 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .5s var(--slow); z-index: 60; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* tray expanded (tap head) = the cart */
.tray.open .tray__cart { display: block; max-height: 36svh; overflow: auto; margin-top: 8px; }
.tray__head { cursor: pointer; }

/* ---------- tablet / desktop: the slab becomes the table ---------- */
@media (min-width: 900px) {
  :root { --trayh: 0px; }
  .layout { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }
  .tray, .tray.in { transform: none; }
  .tray { position: sticky; top: 0; height: 100vh; border-top: 0; border-right: 1.5px solid var(--blue); padding: 24px 32px; display: flex; flex-direction: column; }
  .tray__label { font-size: 15px; }
  .tray__label::after { content: none; }
  .tray__count, .tray__total { font-size: 30px; }
  .tray__surface { flex: 1; display: flex; align-items: flex-end; position: relative; margin: 14px -32px 0; padding: 0 32px 9%; overflow: hidden;
    /* Bernie's product-photo set: blue wall, lilac floor */
    background: linear-gradient(var(--blue) 0 52%, var(--lilac2) 52% 100%); }
  .tray__surface::before, .tray__surface::after { content: ""; position: absolute; bottom: 48%; border-radius: 999px 999px 0 0; }
  .tray__surface::before { left: 8%; width: 22%; height: 34%; background: repeating-linear-gradient(90deg, #9f8ff0 0 5px, #c9bdfc 5px 10px); }
  .tray__surface::after { right: 10%; width: 30%; height: 22%; background: #c9bdfc; border-radius: 60% 40% 0 0 / 100% 100% 0 0; }
  .slab { z-index: 1; }
  .slab { width: 100%; height: 38%; min-height: 190px; padding: 0 18px 18px; }
  .slot { height: 100%; }
  .slot svg { max-width: 150px; height: 150px; }
  .tray__cart { display: block; margin: 8px 0 0; max-height: 26vh; overflow: auto; }
  .tray__head { cursor: default; }
  .guide { padding-bottom: 0; }
  .step { min-height: 100vh; padding: 48px 48px 56px; }
  .cover { padding: 32px 48px 36px; }
  .tin-small, .cover__foot, .cover__direct { font-size: 15px; }
  .cover__top img { width: 52px; height: 52px; }
  .back { margin: 32px -48px -56px; padding: 32px 48px 40px; }
  .step__n { font-size: 132px; }
  .sheet__body { left: auto; top: 0; width: min(520px, 100%); max-height: none; border-top: 0; border-left: 2px solid var(--blue); animation-name: slide; }
  @keyframes slide { from { transform: translateX(100%); } }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01s !important; animation-duration: .01s !important; } html { scroll-behavior: auto; } }
