.clay-santa {
  --cherry: #8a1e3c;
  --cherry-soft: #5e2a40;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --stage-w: min(78vw, 320px, max(160px, calc((100svh - 330px) * .6667)));
}
.clay-santa ::selection { background: #8a1e3c; color: #fff8ee; }

.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 460px;
  margin-inline: auto;
  padding: clamp(14px, 3vh, 36px) 0 calc(28px + env(safe-area-inset-bottom));
  text-align: center;
}

.pick-title {
  margin: 0;
  color: var(--cherry);
  font-family: var(--clay-display);
  font-weight: 1000;
  font-size: clamp(2.05rem, 9vw, 3.1rem);
  letter-spacing: -.03em;
  line-height: 1;
  text-shadow: 0 .025em 0 #4a0f2233, 0 .05em .05em #4a0f2224;
  text-wrap: balance;
}

/* Toggle: one clay pill slides under the chosen option */
.pick-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 360px);
  padding: 5px;
  border-radius: 999px;
  background: #fff8ee8c;
  box-shadow: inset 0 2px 4px #3215270f;
}
.pick-toggle-pill {
  position: absolute;
  inset: 5px auto 5px 5px;
  width: calc(50% - 5px);
  background: url('art/clay-santa-button-cream-v2.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(0 3px 4px #5e2a4022);
  transition: transform 280ms var(--ease-out);
}
.pick-toggle[data-mode="ordinary"] .pick-toggle-pill { transform: translateX(100%); }
.pick-toggle button {
  position: relative;
  min-height: 48px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--cherry-soft);
  font: 800 clamp(.95rem, 4.1vw, 1.05rem) / 1 var(--clay-display, Nunito, sans-serif);
  cursor: pointer;
  transition: color 200ms ease, transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.pick-toggle button[aria-checked="true"] { color: var(--cherry); }
.pick-toggle { margin-top: 8px; }
.pick-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  padding: 3px 9px 4px;
  border-radius: 999px;
  background: var(--cherry);
  color: #fff8ee;
  font: 800 .72rem / 1.1 var(--clay-display, Nunito, sans-serif);
  letter-spacing: .01em;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 3px 6px #5e2a4033;
  pointer-events: none;
}
.pick-toggle button:active { transform: scale(.97); }
.pick-toggle button:focus-visible { outline: 2px solid var(--cherry); outline-offset: -4px; border-radius: 999px; }

/* Stage: real photos under the clay frame, compared with a drag handle */
.pick-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.pick-photos {
  position: relative;
  width: var(--stage-w);
  aspect-ratio: 2 / 3;
  touch-action: pan-y;
}
.pick-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 14px #2b4a6a26);
  pointer-events: none;
  z-index: 3;
}
.pick-window {
  position: absolute;
  inset: 4.2% 6.3%;
  overflow: hidden;
  border-radius: 10px;
  isolation: isolate;
}
.pick-window img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 180ms ease;
}
/* Move the window and its image in opposite directions to keep the image in place. */
.pick-reveal {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translateX(30%);
}
.pick-after { transform: translateX(-30%); }
.pick-photos.is-swapping .pick-window img { opacity: 0; }

.pick-tag {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 3px 10px 4px;
  border-radius: 999px;
  background: #fff8eee6;
  color: var(--cherry);
  font: 800 .8rem / 1.2 var(--clay-display, Nunito, sans-serif);
  pointer-events: none;
}
.pick-tag-before { left: 10px; }
.pick-tag-after { right: 10px; }
.pick-photos[data-edge="left"] .pick-tag-before,
.pick-photos[data-edge="right"] .pick-tag-after { opacity: 0; }

.pick-track {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.pick-handle, .pick-knob-position {
  position: absolute;
  inset: 0;
}
.pick-handle { transform: translateX(30%); }
.pick-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1.5px;
  width: 3px;
  background: #fff8ee;
  box-shadow: 0 0 6px #32152733;
}
/* The line can reach the very edge; the knob stops just inside the photo. */
.pick-knob-position { transform: translateX(clamp(26px, 30%, calc(100% - 26px))); }
.pick-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 50%;
  background: #fff8ee;
  box-shadow: 0 4px 10px #32152733;
  fill: none;
  stroke: var(--cherry);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translate(-50%, -50%);
  transition: transform 160ms var(--ease-out);
}

/* Same box as the photos so pointer maths can read it; invisible and not clickable,
   it only serves keyboard and screen-reader users. */
.pick-range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.pick-photos { cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.pick-photos img { -webkit-user-drag: none; }
.pick-photos.is-dragging .pick-knob { transform: translate(-50%, -50%) scale(.94); }
.pick-photos:has(.pick-range:focus-visible) .pick-knob { outline: 2px solid var(--cherry); outline-offset: 2px; }

.pick-note {
  max-width: 36ch;
  min-height: 2.6em;
  margin: 0;
  color: var(--cherry-soft);
  font-size: clamp(.98rem, 4.1vw, 1.08rem);
  line-height: 1.3;
  text-wrap: balance;
  transition: opacity 180ms ease;
}
.pick-note.is-swapping { opacity: 0; }

.pick-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 320px);
}
/* Stretch only the middle of the clay pill so its round ends stay round. */
.clay-santa .pick-cta.clay-button {
  min-height: 62px;
  background: none;
  border: solid transparent;
  border-width: 0 31px;
  border-image: url('art/clay-photo-button.webp') 0 99 fill / 0 31px / 0 stretch;
  padding-inline: 0;
}

/* Photo tips */
.pick-tips {
  position: relative;
  margin: 8px 0 0;
  padding-top: clamp(40px, 7vw, 64px);
  background: #f4eee3;
  border-top-left-radius: 44% 22px;
  border-top-right-radius: 44% 22px;
  color: #321527;
}
.pick-tips-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
  margin-inline: auto;
  padding-bottom: clamp(36px, 6vw, 56px);
}
.pick-tips-title {
  margin: 0 0 clamp(18px, 3vw, 26px);
  color: var(--cherry);
  font-family: var(--clay-display);
  font-weight: 1000;
  font-size: clamp(1.4rem, 7.4vw, 2.6rem);
  letter-spacing: -.03em;
  line-height: 1.02;
  text-align: center;
  text-shadow: 0 .025em 0 #4a0f2226, 0 .05em .05em #4a0f221c;
}
@media (max-width: 740px) {
  .pick-tips-title > span { display: block; }
}
.pick-tips-list {
  width: 100%;
  margin: 0 0 clamp(24px, 4vw, 32px);
  padding: 0;
  list-style: none;
}
.pick-tips-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid #8a1e3c22;
}
.pick-tips-list li:last-child { border-bottom: 1px solid #8a1e3c22; }
.pick-tips-list svg {
  width: 44px;
  height: 44px;
  padding: 9px;
  border-radius: 50%;
  background: #f6e3e2;
  fill: none;
  stroke: var(--cherry);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pick-tips-list h3 {
  margin: 2px 0 4px;
  font-family: var(--clay-display, Nunito, sans-serif);
  font-size: 1.06rem;
  font-weight: 800;
  color: #321527;
}
.pick-tips-list p {
  margin: 0;
  color: #5e2a40;
  font-size: 1rem;
  line-height: 1.45;
}

@media (min-width: 741px) {
  .clay-santa { --stage-w: min(340px, max(160px, calc((100svh - 410px) * .6667))); }
  .pick { gap: 18px; max-width: 640px; }
}

@media (prefers-reduced-motion: reduce) {
  .pick-window img, .pick-knob { transition-duration: 0ms; }
  .pick-toggle-pill { transition-duration: 0ms; }
}
