:root {
  /* Storefront colours, mapped onto the brand tokens (/assets/brand/web/brand-tokens.css). */
  --kraft: var(--pm-surface);              /* page background */
  --kraft-deep: var(--pm-parcel-backdrop); /* behind parcel previews (Kraft at Christmas) */
  --paper: var(--pm-card);
  --ink: var(--pm-ink);
  --muted: var(--pm-muted);
  --green: var(--pm-primary);              /* selected states + links */
  --green-ink: var(--pm-on-primary);
  --red: var(--pm-primary);                /* primary actions */
  --line: var(--pm-line);
  --focus: rgba(120, 27, 58, .35);
  --radius: var(--pm-radius-card);
  --shadow: 0 1px 2px rgba(45, 34, 40, .06), 0 10px 28px rgba(45, 34, 40, .08);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; } /* no double-tap zoom on quick taps; pinch zoom still works */
body {
  margin: 0;
  font: 16px/1.5 var(--pm-font-body);
  color: var(--pm-text);
  background: var(--pm-surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
h1, h2, h3 { font-family: var(--pm-font-display); font-weight: var(--pm-weight-display); line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.015em; color: var(--pm-heading); }
.eyebrow { font: 600 13px/1.2 var(--pm-font-caption); letter-spacing: .14em; text-transform: uppercase; color: var(--pm-berry); margin: 0 0 10px; }
a { color: var(--pm-primary); }
:focus-visible { outline: 3px solid var(--pm-focus-light); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.error { color: var(--red); font-weight: 600; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, calc((100vw - 1120px) / 2 + 16px));
  background: var(--pm-paper); color: var(--pm-berry);
  border-bottom: 1px solid var(--pm-line);
}
.brand { display: flex; align-items: center; text-decoration: none; padding: 4px 0; }
.brand-lockup { display: block; width: 210px; height: auto; }
.basket-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--pm-berry); border: 1px solid transparent;
  padding: 8px 12px; border-radius: var(--pm-radius-button); font: 650 15px var(--pm-font-body); cursor: pointer; min-height: 44px;
}
.basket-btn:hover { background: var(--pm-blush); }
.basket-btn .count { background: var(--pm-berry); color: var(--pm-paper); border-radius: 999px; padding: 0 8px; font-size: 13px; line-height: 22px; min-width: 22px; text-align: center; }

.lede { font-size: 18px; color: var(--pm-ink); margin: 0 auto; max-width: 560px; }
.notice { background: var(--paper); border-left: 4px solid var(--red); padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: var(--pm-radius-button); padding: 12px 22px; min-height: 46px;
  font: 650 16px var(--pm-font-body); cursor: pointer; text-decoration: none;
  background: #fff; color: var(--pm-ink);
}
.btn.primary { background: var(--pm-primary); color: var(--pm-on-primary); }
.btn.primary:hover { background: var(--pm-primary-hover); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.wide { width: 100%; }
.link { background: none; border: 0; padding: 4px 0; color: var(--green); font: 600 14px system-ui, sans-serif; text-decoration: underline; cursor: pointer; }


/* dialogs */
dialog { border: 0; padding: 0; background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(20, 28, 22, .55); backdrop-filter: blur(2px); }
.close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.06); font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink); }

.field { display: grid; gap: 6px; margin: 14px 0; }
.field > span, .field > label { font-weight: 600; font-size: 15px; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
.field small { color: var(--muted); }
.field input[type=text] {
  font: 18px system-ui, sans-serif; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); width: 100%;
}
.field input:focus-visible { outline: 3px solid var(--focus); border-color: var(--green); }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { flex: 1; min-width: 130px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; width: max-content; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink); }
.stepper input { width: 56px; text-align: center; border: 0; font: 600 18px system-ui, sans-serif; background: none; color: var(--ink); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper.small button { width: 34px; height: 34px; font-size: 18px; }
.stepper.small span { min-width: 22px; text-align: center; font-weight: 600; }

.basket { width: min(460px, 100vw); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 18px 0 0 18px; }
.basket-inner { display: flex; flex-direction: column; height: 100%; }
.basket-head { position: relative; padding: 18px 20px 8px; border-bottom: 1px solid var(--line); }
.basket-head h2 { font-size: 24px; margin: 0; }
.basket-items { flex: 1; overflow: auto; padding: 8px 20px; }
.empty { text-align: center; padding: 60px 0; font-size: 18px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line-thumb { width: 64px; transform: none; }
.line-info { display: grid; gap: 2px; min-width: 0; }
.line-info strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
.line-actions { display: flex; gap: 14px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.line-price { font-weight: 700; }
.basket-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff8ea; }
.basket-foot:empty { display: none; }
.sum { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.sum.total { color: var(--ink); font-weight: 700; font-size: 19px; padding: 8px 0 14px; }

.thanks { display: grid; place-items: center; }
.thanks-card { background: var(--paper); border-radius: 18px; box-shadow: var(--shadow); padding: 40px 28px; margin-top: 48px; max-width: 520px; text-align: center; }
.big-check { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: var(--green); color: #fff; font-size: 40px; line-height: 72px; }
.thanks-card .lede { margin: 12px 0; }

#toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600;
  opacity: 0; transition: .25s; pointer-events: none; z-index: 100; width: max-content; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast[data-kind=error] { background: var(--red); }

@media (max-width: 720px) {
  .basket { border-radius: 0; width: 100vw; max-width: 100vw; }
  .lede { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- try-a-name ---------- */

/* ---------- parcel mock-up ---------- */
.parcel {
  --tilt: -2deg;
  position: relative; aspect-ratio: 4 / 5; width: 100%;
  border-radius: 6px;
  background-color: #c79a63;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke-linecap='round' stroke-width='1.6'%3E%3Cg stroke='%23365f45' opacity='.55' transform='translate(22 22)'%3E%3Cpath d='M0-11V11M-9.5-5.5 9.5 5.5M-9.5 5.5 9.5-5.5M0-11-3-14M0-11 3-14M0 11-3 14M0 11 3 14'/%3E%3C/g%3E%3Cg stroke='%23a3423a' opacity='.5' transform='translate(67 64)'%3E%3Cpath d='M0-9V9M-8-4.5 8 4.5M-8 4.5 8-4.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 30% 20%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(160deg, #d2a56c, #b98a54);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 18px 30px rgba(50,30,10,.35), 0 3px 6px rgba(50,30,10,.25);
  transform: rotate(var(--tilt));
  overflow: hidden;
}
.parcel::after { /* folded paper edge */
  content: ""; position: absolute; inset: auto 0 0 0; height: 12%;
  background: linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,0) 30%), linear-gradient(170deg, transparent 49%, rgba(0,0,0,.08) 50%, transparent 70%);
}
.parcel .twine { position: absolute; background: repeating-linear-gradient(45deg, #b8955f 0 3px, #e0c590 3px 6px); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.parcel .twine.h { left: 0; right: 0; top: 17%; height: 5px; }
.parcel .twine.v { top: 0; bottom: 0; left: calc(50% - 2.5px); width: 5px; }
.parcel .on-label {
  position: absolute; left: 22%; width: 56%; top: 24%; aspect-ratio: 2 / 3;
  background: #fff; transform: rotate(-3deg);
  box-shadow: 0 2px 3px rgba(0,0,0,.25), 0 6px 14px rgba(0,0,0,.15);
}
.parcel .on-label svg { display: block; width: 100%; height: 100%; }
.parcel .bow { position: absolute; left: 50%; top: 17%; width: 34%; transform: translate(-50%, -52%); filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.label-only { aspect-ratio: 2 / 3; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.label-only svg { display: block; width: 100%; height: 100%; }


/* ---------- packs & delivery ---------- */

.nudge { background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; display: grid; gap: 6px; }
.nudge.done { color: var(--green); font-weight: 700; }
.nudge .bar { height: 6px; background: #eadcc4; border-radius: 99px; overflow: hidden; }
.nudge .bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
/* ================= Brand v2: hero (Christmas layer) ================= */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  margin: 24px 0 36px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--pm-line); box-shadow: var(--shadow);
}
.hero-copy {
  background: var(--pm-hero-surface); color: var(--pm-hero-text);
  padding: 52px 48px; display: flex; flex-direction: column; justify-content: center;
}
.hero h1 { color: var(--pm-hero-text); font-size: clamp(34px, 4.1vw, 56px); line-height: 1.03; letter-spacing: -.025em; margin-bottom: 18px; text-wrap: balance; }
.hero .lede { margin: 0; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 26px; }
.offer { margin: 0; font: 650 14px var(--pm-font-body); color: var(--pm-hero-text); }

.showcase {
  position: relative; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: center;
  padding: 26px 26px 22px;
  background:
    radial-gradient(rgba(246, 236, 215, .18) 1.4px, transparent 1.6px) 0 0 / 46px 46px,
    radial-gradient(70% 60% at 60% 40%, rgba(255,255,255,.07), transparent 70%),
    var(--pm-hero-art);
  color: var(--pm-on-hero-art);
}
.showcase-stage {
  height: min(460px, 56svh); min-width: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y;
}
.showcase-stage .parcel { --tilt: 6deg; height: 92%; width: auto; max-width: 100%; transition: transform .25s ease; }
.courier-card {
  position: absolute; top: 26px; left: 26px;
  display: grid; justify-items: center; gap: 2px;
  background: var(--pm-parchment); border-radius: 12px; padding: 10px 14px 9px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.courier-card img { width: 64px; height: auto; display: block; }
.courier-card span { font: 600 11px var(--pm-font-caption); letter-spacing: .14em; text-transform: uppercase; color: var(--pm-evergreen); }
.stage-caption { margin: -6px 2px 0; text-align: right; font: 500 12px var(--pm-font-caption); letter-spacing: .16em; text-transform: uppercase; color: var(--pm-on-hero-art); opacity: .85; }

.style-tabs { display: flex; gap: 6px; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px; }
/* Centre when the tabs fit, but never cut off the first tabs when they overflow. */
.style-tabs button:first-child { margin-left: auto; }
.style-tabs button:last-child { margin-right: auto; }
.style-tabs button { scroll-snap-align: center; }
.style-tabs::-webkit-scrollbar { display: none; }
.style-tabs button {
  flex: none; white-space: nowrap; min-height: 38px; padding: 7px 13px; cursor: pointer;
  border: 1px solid rgba(246, 236, 215, .45); background: transparent; color: var(--pm-on-hero-art);
  border-radius: var(--pm-radius-button); font: 600 13px var(--pm-font-body);
}
.style-tabs button[aria-selected="true"] { background: var(--pm-parchment); border-color: var(--pm-parchment); color: var(--pm-evergreen); }
.style-tabs button:focus-visible, .showcase .btn:focus-visible, .try input:focus-visible { outline: 3px solid var(--pm-focus-dark); outline-offset: 2px; }
.try { display: flex; gap: 8px; padding: 6px; border-radius: 10px; background: rgba(246, 236, 215, .14); }
.try input { flex: 1; min-width: 0; border: 0; background: #fff; color: var(--pm-ink); border-radius: var(--pm-radius-button); padding: 12px 14px; font: 17px var(--pm-font-body); }
.try .btn { min-height: 46px; padding: 10px 18px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); margin: 14px 0 26px; }
  .hero-copy { padding: 26px 20px 22px; }
  .hero h1 { font-size: clamp(30px, 9vw, 44px); margin-bottom: 10px; }
  .showcase { padding: 16px 14px 14px; }
  .showcase-stage { height: min(400px, 50svh); }
  .courier-card { top: 14px; left: 14px; padding: 7px 10px 6px; }
  .courier-card img { width: 46px; }
}
@media (max-width: 720px) {
  .brand-lockup { width: 165px; }
  .hero .lede { display: none; } /* keep the preview on screen sooner */
  .hero-actions { margin-top: 14px; }
}
@media (max-width: 360px) {
  .brand-lockup { width: 150px; }
  .basket-btn span:not(.count) { display: none; }
  .hero-actions .btn { width: 100%; }
}

/* Typing on a phone: fold the copy away and fit the label into the space above the keyboard. */
body.typing .hero-copy, body.typing .courier-card, body.typing .stage-caption, body.typing .style-tabs { display: none; }
body.typing .hero { margin-top: 6px; }
body.typing .showcase { padding: 10px 12px; }
body.typing .showcase-stage { height: max(110px, calc(var(--vvh, 60svh) - 172px)); transition: height .15s; }
body.typing .showcase-stage .parcel { transform: rotate(var(--tilt)) scale(1.55); transform-origin: 50% 47%; }
@media (prefers-reduced-motion: reduce) { .showcase-stage .parcel { transition: none; } }

/* ================= Brand v2: sections ================= */
.how { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 40px; }
.how div { background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 4px; }
.how strong { font: 750 17px var(--pm-font-display); color: var(--pm-heading); }
.how span { color: var(--pm-muted); font-size: 15px; }
.how-icon { width: 28px; height: 28px; color: var(--pm-berry); margin-bottom: 6px; }
.footer { display: grid; justify-items: center; gap: 8px; padding: 28px 16px 34px; color: var(--pm-muted); border-top: 1px solid var(--pm-line); margin-top: 24px; }
.footer p { margin: 0; font-size: 14px; }
.footer-lockup { width: 150px; height: auto; }
.notice { background: var(--pm-card); border: 1px solid var(--pm-line); border-left: 4px solid var(--pm-berry); }
.segmented input:checked + span { border-color: var(--pm-berry); background: var(--pm-berry); color: var(--pm-on-primary); }
.thanks-courier { width: 96px; height: auto; display: block; margin: 0 auto 10px; }
.thanks-card h1 { color: var(--pm-evergreen); }

/* ================= Hero actions ================= */
.hero-link { font: 650 15px var(--pm-font-body); color: var(--pm-hero-text); text-underline-offset: 3px; }
.offer { flex-basis: 100%; }

/* ================= Pack builder ================= */
.builder {
  width: min(640px, calc(100vw - 24px)); height: min(860px, calc(100dvh - 24px)); max-height: none; max-width: none;
  border-radius: 18px; background: var(--pm-surface); overflow: hidden;
}
.builder-inner { display: flex; flex-direction: column; height: 100%; }
.builder-head {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; min-height: 56px;
  background: var(--pm-paper); border-bottom: 1px solid var(--pm-line);
}
.builder-head h2 { font-size: 21px; margin: 0; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--pm-berry); cursor: pointer; }
.icon-btn:hover { background: var(--pm-blush); }
.builder-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 4px 16px 20px; }
.b-step { padding: 14px 0 6px; }
.b-step + .b-step { border-top: 1px solid var(--pm-line); }
.b-step h3, .b-extras summary { display: flex; align-items: center; gap: 10px; font: 750 17px var(--pm-font-display); color: var(--pm-heading); margin: 0 0 12px; letter-spacing: 0; }
.num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--pm-berry); color: var(--pm-on-primary); font: 700 13px var(--pm-font-body); flex: none; }

.pack-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding-top: 8px; }
.pack-chip {
  position: relative; display: grid; gap: 1px; justify-items: center; padding: 9px 2px 8px; min-height: 64px;
  border: 1.5px solid var(--pm-line); border-radius: 10px; background: #fff; color: var(--pm-ink); cursor: pointer; font-family: var(--pm-font-body);
}
.pack-chip strong { font-size: 18px; line-height: 1.1; }
.pack-chip span { font-size: 13px; font-weight: 600; }
.pack-chip small { font-size: 11px; color: var(--pm-muted); }
.pack-chip[aria-checked="true"] { border-color: var(--pm-berry); background: var(--pm-berry); color: var(--pm-on-primary); }
.pack-chip[aria-checked="true"] small { color: inherit; opacity: .85; }
.pack-chip:disabled { opacity: .4; cursor: not-allowed; }
.pack-chip .badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--pm-evergreen); color: #fff; font: 700 9px var(--pm-font-body); font-style: normal; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 99px; white-space: nowrap; }

.b-add { display: flex; gap: 8px; }
.b-add input {
  flex: 1; min-width: 0; font: 17px var(--pm-font-body); padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--pm-line); background: #fff; color: var(--pm-ink);
}
.b-add input:focus-visible { outline: 3px solid var(--focus); border-color: var(--pm-berry); }
.b-add .btn { padding: 10px 20px; }
.b-hint { margin: 6px 2px 10px; font-size: 13px; color: var(--pm-muted); }

.chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 4px 11px;
  border: 1.5px solid var(--pm-line); border-radius: 99px; background: #fff; color: var(--pm-ink);
  font: 600 13px var(--pm-font-body); cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--pm-berry); }
.chip.list { border-color: transparent; background: #e6efe9; color: var(--pm-evergreen); }
.chip.list.naughty { background: #2d2228; color: #fff; }
.b-default { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--pm-muted); margin-bottom: 4px; }
.b-empty {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center;
  padding: 12px; border: 1.5px dashed var(--pm-line); border-radius: 12px; background: var(--pm-card);
}
.b-empty:focus-visible { outline: 3px solid var(--focus); }
.b-empty > span { display: grid; gap: 4px; justify-items: start; font-size: 14px; }
.b-empty strong { font: 750 17px var(--pm-font-display); color: var(--pm-heading); }

.b-rows { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.b-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 32px; gap: 12px; align-items: center;
  padding: 8px 6px 8px 8px; background: #fff; border: 1px solid var(--pm-line); border-radius: 12px;
  content-visibility: auto; contain-intrinsic-size: auto 92px;
}
.b-row.bad { border-color: var(--pm-berry); box-shadow: 0 0 0 1px var(--pm-berry) inset; }
.b-thumb { all: unset; cursor: pointer; display: block; width: 52px; }
.b-thumb:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.b-thumb .label-only { width: 52px; box-shadow: 0 1px 3px rgba(0,0,0,.28); }
.b-main { display: grid; gap: 6px; min-width: 0; }
.b-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.b-name { flex: 1; min-width: 0; font: 700 17px var(--pm-font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-qty { font-weight: 700; color: var(--pm-muted); }
.b-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.b-err { margin: 0; font-size: 13px; font-weight: 600; color: var(--pm-berry); }
.b-remove { width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--pm-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.b-remove:hover { background: var(--pm-blush); color: var(--pm-berry); }
.stepper.small button:disabled { opacity: .3; cursor: default; }
.b-split { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #e6efe9; color: var(--pm-evergreen); font-weight: 600; font-size: 14px; }
.b-split .link { color: var(--pm-evergreen); white-space: nowrap; }

.b-extras summary { cursor: pointer; list-style: none; margin: 0; }
.b-extras summary::-webkit-details-marker { display: none; }
.b-extras summary em { font: 400 14px var(--pm-font-body); color: var(--pm-muted); font-style: normal; }
.b-extras summary::after { content: "▾"; margin-left: auto; color: var(--pm-muted); font-size: 14px; }
.b-extras[open] summary::after { content: "▴"; }
.b-extras .field small { font-size: 12px; }

.builder-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--pm-paper); border-top: 1px solid var(--pm-line); box-shadow: 0 -6px 18px rgba(45, 34, 40, .06);
}
.bar-info { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.bar-info strong { font-size: 15px; }
.bar-info span { font-size: 12.5px; color: var(--pm-muted); }
.builder-bar .btn { flex: none; padding: 12px 18px; }
#b-submit:disabled { opacity: .45; cursor: not-allowed; }

/* Design picker */
.picker { width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: 18px; background: var(--pm-surface); }
.picker-inner { display: flex; flex-direction: column; gap: 10px; padding: 0 0 calc(16px + env(safe-area-inset-bottom)); }
.picker-head { position: relative; padding: 16px 64px 4px 18px; }
.picker-head h2 { font-size: 21px; margin: 0; overflow-wrap: anywhere; }
.picker-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px max(18px, calc(50% - 90px)) 6px; overscroll-behavior-x: contain;
}
.picker-track::-webkit-scrollbar { display: none; }
.picker { overflow: auto; }
.slide { all: unset; flex: none; width: 180px; scroll-snap-align: center; cursor: pointer; display: grid; gap: 8px; justify-items: center; font: 600 14px var(--pm-font-body); color: var(--pm-muted); }
.slide .label-only { width: 100%; border-radius: 2px; transition: transform .15s; }
.slide[aria-pressed="true"] { color: var(--pm-berry); }
.slide[aria-pressed="true"] .label-only { outline: 3px solid var(--pm-berry); outline-offset: 4px; }
.slide:focus-visible .label-only { outline: 3px solid var(--focus); outline-offset: 4px; }
.picker-caption { margin: 0 18px; font-size: 14px; color: var(--pm-muted); text-align: center; }
.picker-caption strong { color: var(--pm-ink); display: block; font-size: 17px; }
.picker-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 18px; }
.picker-list button { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--pm-line); background: #fff; font: 600 14px var(--pm-font-body); color: var(--pm-ink); cursor: pointer; }
.picker-list button[aria-checked="true"] { border-color: var(--pm-berry); background: var(--pm-berry); color: var(--pm-on-primary); }
.picker-actions { display: grid; gap: 8px; margin: 4px 18px 0; }
.btn.ghost { background: transparent; border: 1.5px solid var(--pm-line); }

@media (max-width: 720px) {
  .builder { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; }
  .picker { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 94dvh; }
  .slide { width: min(56vw, 210px); }
  .picker-track { padding-inline: max(18px, calc(50% - min(28vw, 105px))); }
}
@media (max-width: 360px) {
  .builder-body { padding-inline: 12px; }
  .pack-chips { gap: 4px; }
  .pack-chip strong { font-size: 16px; }
  .pack-chip span { font-size: 12px; }
  .pack-chip small { display: none; }
  .builder-bar .btn { padding: 12px 14px; font-size: 15px; }
}
@media (max-width: 420px) {
  .builder-bar { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 8px; }
  .bar-info { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 10px; }
  .builder-bar .btn { width: 100%; }
}

/* Typing on a phone: the price bar steps aside so the keyboard has room. */
.builder.kbd .builder-bar { display: none; }
.builder .b-extras .field:last-child { margin-bottom: 4px; }
button, .stepper, .chip, .pack-chip { touch-action: manipulation; }

/* Day + month picker ("Do not open until") */
.daymonth { display: grid; grid-template-columns: minmax(76px, 1fr) minmax(0, 2fr); gap: 8px; }
.daymonth select {
  font: 17px var(--pm-font-body, system-ui, sans-serif); padding: 12px 34px 12px 14px; border-radius: 10px; min-height: 48px;
  border: 1.5px solid var(--pm-line, #ddd); color: var(--pm-ink, #222); width: 100%; -webkit-appearance: none; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23781B3A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.daymonth select:focus-visible { outline: 3px solid var(--focus, rgba(120,27,58,.35)); border-color: var(--pm-berry, #781B3A); }

/* "Leave your pack?" */
.leave { width: min(400px, calc(100vw - 32px)); border-radius: 18px; background: var(--pm-surface); }
.leave-inner { padding: 22px 20px 18px; display: grid; gap: 6px; text-align: center; }
.leave h2 { font-size: 22px; margin: 0; }
.leave p { margin: 0 0 10px; }
.leave-actions { display: grid; gap: 8px; justify-items: center; }
.leave-actions .link { margin-top: 4px; color: var(--pm-muted); }

/* ================= The collection (compact gallery) ================= */
.collection { margin-top: 8px; }
.collection-head { display: flex; align-items: end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.collection-head h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 4px; }
.collection-head p.muted { margin: 0; }
.collection-price { margin: 0; text-align: right; font-size: 15px; line-height: 1.4; }
.collection-price strong { font-size: 20px; color: var(--pm-ink); }
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 200px; }
.g-item {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 4px; align-content: start;
  padding: 14px 14px 12px; border-radius: var(--radius); background: var(--pm-card); border: 1px solid var(--pm-line);
  transition: transform .15s, box-shadow .15s;
}
.g-item .label-only { margin-bottom: 8px; transform: rotate(-1deg); transition: transform .15s; }
.g-item:nth-child(even) .label-only { transform: rotate(1deg); }
.g-item strong { font: 750 16px var(--pm-font-display); color: var(--pm-heading); line-height: 1.2; }
.g-item span { font-size: 13px; color: var(--pm-muted); line-height: 1.35; }
.g-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.g-item:hover .label-only { transform: rotate(0) scale(1.02); }
.g-item:focus-visible { outline: 3px solid var(--pm-berry); outline-offset: 2px; }
@media (max-width: 960px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .g-item { padding: 12px 12px 10px; border-radius: 12px; }
  .g-item strong { font-size: 15px; }
  .g-item span { display: none; }
  .collection-price { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .g-item, .g-item .label-only { transition: none; } }

/* Picker arrows: for mouse users (touch screens swipe). */
.picker-stage { position: relative; }
.picker-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--pm-line); background: rgba(255,255,255,.94); color: var(--pm-berry);
  font: 600 28px/1 var(--pm-font-body); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); display: none; padding-bottom: 4px;
}
.picker-arrow.prev { left: 12px; }
.picker-arrow.next { right: 12px; }
.picker-arrow:hover { background: #fff; }
@media (hover: hover) and (pointer: fine) { .picker-arrow { display: block; } }

.footer-legal { max-width: 640px; text-align: center; font-size: 12.5px !important; line-height: 1.5; color: var(--pm-muted); }

/* Terms and privacy pages */
.legal-page { max-width: 720px; padding-top: 28px; }
.legal-page h1 { font-size: clamp(30px, 5vw, 42px); }
.legal-page h2 { font-size: 21px; margin: 28px 0 8px; }
.legal-page p, .legal-page li { font-size: 16px; line-height: 1.6; }
.legal-page ul { padding-left: 20px; }
.legal-page li + li { margin-top: 6px; }
.footer a { color: inherit; }
