/* ── ClawCaptcha — required styles ──────────────────────────────────────────
   iOS-register surfaces: white card, flat grouped-gray panels, hairlines,
   capsule button, segmented-control steps. No gradients on chrome surfaces;
   depth comes from a few precise shadows, not texture.

   Theme via custom properties on any ancestor:
     --clawcap-bg        card surface
     --clawcap-ink       primary text
     --clawcap-muted     secondary text
     --clawcap-accent    action button / success
*/

.clawcap {
  --cc-bg: var(--clawcap-bg, #ffffff);
  --cc-ink: var(--clawcap-ink, #1c1c1e);
  --cc-muted: var(--clawcap-muted, #8a8a8e);
  --cc-line: rgba(60, 60, 67, 0.1);
  --cc-fill: #f2f2f7; /* iOS grouped fill */
  --cc-fill-2: #e9e9ee;
  --cc-accent: var(--clawcap-accent, #1c1c1e);
  --cc-green: #34c759;

  position: relative;
  width: 440px;
  max-width: 100%;
  background: var(--cc-bg);
  color: var(--cc-ink);
  border-radius: 32px;
  padding: 24px 24px 20px; /* 4px-grid rhythm */
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.08),
    0 2px 6px rgba(20, 20, 30, 0.04),
    0 28px 70px -28px rgba(20, 20, 30, 0.22);
  /* Inter first (variable: real 500/600/650 weights everywhere, incl. Windows),
     then the native stacks. cv11 = single-storey a — the cleaner UI voice. */
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'SF Pro Text',
    'Segoe UI',
    Roboto,
    sans-serif;
  font-feature-settings: 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.clawcap:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 4px;
}

/* header icons */
.clawcap-top {
  display: flex;
  justify-content: space-between;
  color: var(--cc-muted);
}

.clawcap-shield,
.clawcap-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cc-fill);
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.clawcap-shield--ok {
  color: #fff;
  background: var(--cc-green);
}

/* the help icon is a real button */
button.clawcap-help {
  border: none;
  padding: 0;
  color: var(--cc-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.12s ease;
}

@media (hover: hover) {
  button.clawcap-help:hover {
    background: var(--cc-fill-2);
    color: var(--cc-ink);
  }
}

button.clawcap-help:active {
  transform: scale(0.97); /* felt, not seen — anything deeper collapses */
}

button.clawcap-help:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

/* ── info modal ─────────────────────────────────────────────────────────── */
.clawcap-info {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: inherit;
  background: rgba(20, 20, 30, 0.32);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.clawcap-info-card {
  position: relative;
  width: 322px;
  max-width: 100%;
  padding: 22px 20px 18px;
  border-radius: 24px;
  background: var(--cc-bg);
  color: var(--cc-ink);
  text-align: center;
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.08),
    0 18px 50px -16px rgba(20, 20, 30, 0.4);
}

.clawcap-info-x {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--cc-fill);
  color: var(--cc-muted);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

@media (hover: hover) {
  .clawcap-info-x:hover {
    background: var(--cc-fill-2);
    color: var(--cc-ink);
  }
}

.clawcap-info-x:active {
  transform: scale(0.94);
}

/* header: framed icon tile + title + one-line tagline */
.clawcap-info-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0 18px;
}

.clawcap-info-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
  border-radius: 17px;
  background: var(--cc-fill);
  box-shadow:
    inset 0 0 0 0.5px rgba(60, 60, 67, 0.1),
    0 4px 12px -4px rgba(20, 20, 30, 0.18);
}

.clawcap-info-tile img {
  display: block;
  width: 40px;
  height: 40px;
}

.clawcap-info-title {
  margin: 0;
  font-size: 1.125rem; /* 18px — one step under the card title */
  font-weight: 700;
  letter-spacing: -0.022em;
}

.clawcap-info-ver {
  margin-left: 3px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--cc-fill-2);
  font-size: 0.625rem; /* 10px */
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cc-muted);
  vertical-align: 0.28em;
}

.clawcap-info-tag {
  margin: 5px 0 0;
  font-size: 0.8125rem; /* 13px body */
  letter-spacing: -0.006em;
  color: var(--cc-muted);
}

/* steps: numbered rows, hairline-separated */
.clawcap-info-list {
  margin: 0 0 16px;
  padding: 4px 14px;
  list-style: none;
  text-align: left;
  background: var(--cc-fill);
  border-radius: 16px;
}

.clawcap-info-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
}

.clawcap-info-list li + li {
  border-top: 0.5px solid var(--cc-line);
}

.clawcap-info-n {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cc-ink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.clawcap-info-list strong {
  display: block;
  font-size: 0.8125rem; /* 13px body */
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--cc-ink);
}

.clawcap-info-d {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem; /* 12px label */
  line-height: 1.5; /* room for the kbd chips to sit without crowding */
  letter-spacing: -0.004em;
  color: var(--cc-muted);
}

.clawcap-info-d kbd {
  display: inline-block;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--cc-bg);
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.2);
  font-family: inherit;
  font-size: 0.6875rem; /* 11px caption */
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: var(--cc-ink);
}

.clawcap-info-done {
  width: 100%;
  padding: 11px 0;
  border: none;
  border-radius: 13px;
  background: var(--cc-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.8125rem; /* 13px body */
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition:
    filter 0.2s ease,
    transform 0.12s ease;
}

@media (hover: hover) {
  .clawcap-info-done:hover {
    filter: brightness(1.12);
  }
}

.clawcap-info-done:active {
  transform: scale(0.97); /* press feedback on a meaningful button */
}

/* title + challenge — SF optical rhythm: tight display, quiet caption.
   TYPE SCALE (whole card): 20px title · 13px body · 12px label · 11px caption */
.clawcap-title {
  margin: 12px 0 4px;
  text-align: center;
  font-size: 1.25rem; /* 20px */
  font-weight: 650;
  letter-spacing: -0.024em;
  line-height: 1.25;
}

.clawcap-sub {
  margin: 0 0 20px;
  text-align: center;
  font-size: 0.8125rem; /* 13px body */
  letter-spacing: -0.006em;
  line-height: 1.4;
  color: var(--cc-muted);
  min-height: 1.4em;
}

.clawcap-sub em {
  font-style: normal;
  font-weight: 600;
}

/* tiny thumbnail of the requested toy inline in the challenge line */
.clawcap-sub-toy {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: -5px;
  margin: 0 3px 0 2px;
  filter: drop-shadow(0 1px 1px rgba(30, 30, 40, 0.16));
}

/* steps — a true segmented control: equal segments, ONE pill that slides */
.clawcap-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 280px;
  max-width: 100%;
  margin: 0 auto 20px;
  padding: 2px;
  list-style: none;
  background: var(--cc-fill);
  border-radius: 10px;
}

.clawcap-steps-pill {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / 3);
  border-radius: 8px;
  background: #fff;
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.04),
    0 1.5px 4px rgba(20, 20, 30, 0.08);
  /* springy glide with a whisper of overshoot, iOS-style — kept snappy so a
     small indicator doesn't feel swimmy */
  transition: transform 0.34s cubic-bezier(0.3, 1.25, 0.35, 1);
  pointer-events: none;
}

.clawcap-steps li {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 0;
  font-size: 0.8125rem; /* 13px body */
  line-height: 1.25; /* → ~34px control height, the iOS segmented standard */
  letter-spacing: -0.006em;
  color: var(--cc-muted);
  transition: color 0.3s ease;
}

.clawcap-steps li.is-active {
  color: var(--cc-ink);
  font-weight: 600;
}

.clawcap-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--cc-fill-2);
  font-size: 0.625rem; /* 10px digit in a 15px coin */
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}

.clawcap-steps li.is-active .clawcap-step-n {
  background: var(--cc-ink);
  color: #fff;
}

/* machine */
.clawcap-machine {
  position: relative;
  width: 380px;
  max-width: 100%;
  margin: 0 auto;
}

.clawcap-case {
  border-radius: 24px;
  background: var(--cc-fill);
  padding: 8px;
}

.clawcap-glass {
  position: relative;
  height: 320px;
  border-radius: 16px; /* concentric: case 24 − 8 padding */
  overflow: hidden;
  background: linear-gradient(180deg, #fcfcfd 0%, #f4f4f8 100%);
  box-shadow:
    inset 0 0 0 0.5px rgba(60, 60, 67, 0.09),
    inset 0 1px 8px rgba(30, 30, 40, 0.05),
    inset 0 -18px 26px -22px rgba(30, 30, 40, 0.14);
  transition:
    opacity 1.1s ease,
    filter 1.1s ease;
}

/* the show is over: the machine softly steps back */
.clawcap-glass--dim {
  opacity: 0.55;
  filter: saturate(0.75);
}

/* one quiet diagonal sheen, nothing stripey */
.cc-glass-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, transparent 30%, rgba(255, 255, 255, 0.28) 42%, rgba(255, 255, 255, 0) 55%);
  z-index: 30;
}

.cc-rail {
  position: absolute;
  top: 9px;
  left: 16px;
  right: 16px;
  height: 5px;
  border-radius: 2.5px;
  background: #d7d8de;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 1px rgba(30, 30, 40, 0.12);
}

/* the carriage the cable hangs from — a chrome capsule riding the rail, with
   two darker bolt heads. Driven by the rAF (translateX), never re-rendered. */
.cc-trolley {
  position: absolute;
  top: 4px;
  left: 0;
  width: 28px;
  height: 13px;
  border-radius: 6.5px;
  background: linear-gradient(180deg, #f4f5f8 0%, #c9ccd4 100%);
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.18),
    0 2px 3px rgba(30, 30, 40, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  z-index: 21;
  will-change: transform;
  pointer-events: none;
}

.cc-trolley::before,
.cc-trolley::after {
  content: '';
  position: absolute;
  top: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8c919c, #4d525c);
}

.cc-trolley::before {
  left: 4.5px;
}

.cc-trolley::after {
  right: 4.5px;
}

/* contact shadow under the claw: position, width and opacity are all written
   by the rAF — it tightens and darkens as the claw nears the floor, which both
   grounds the rig in the scene and quietly shows where a grab will land */
.cc-claw-shadow {
  position: absolute;
  bottom: 7px;
  left: 0;
  width: 90px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(30, 30, 40, 0.42), transparent 72%);
  z-index: 1;
  opacity: 0.1;
  will-change: transform, opacity;
  pointer-events: none;
}

/* prize pile */
.cc-toy {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 4px 5px rgba(30, 30, 40, 0.12));
  will-change: transform;
}

.cc-pile-shadow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background: radial-gradient(60% 130% at 50% 100%, rgba(30, 30, 40, 0.1), transparent 70%);
  z-index: 0;
}

/* the rig: cable + claw as ONE svg pendulum, pivoting at the rail point */
.cc-rig {
  position: absolute;
  top: 14px;
  left: -18px;
  width: 36px;
  overflow: visible;
  transform-origin: 18px 0;
  z-index: 0;
  will-change: transform;
  filter: drop-shadow(0 3px 3px rgba(30, 30, 40, 0.14));
}

.cc-carry-layer {
  position: absolute;
  inset: 8px;
  z-index: 40;
  pointer-events: none;
}

.cc-carried {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 40;
  pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(30, 30, 40, 0.18));
  will-change: transform;
  transform-origin: 50% 50%;
}

/* control panel — one flat grouped surface, evenly spaced */
.clawcap-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 16px 18px;
  min-height: 92px;
  border-radius: 16px; /* concentric: case 24 − 8 padding */
  background: linear-gradient(180deg, #fcfcfd 0%, #f4f4f8 100%);
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.09);
}

/* joystick: recessed socket + chrome stick, sized to stay INSIDE the panel
   (socket 44px, shaft 16px, ball 18px → max height 56px incl. tilt).
   Width matches the action button so the tray sits dead-centre between them;
   the bottom margin biases the centred box UP by 5px, putting the SOCKET's
   centre (not the box's) on the same lateral axis as the button. */
.cc-joy {
  position: relative;
  width: 56px;
  height: 58px;
  margin-bottom: 10px;
  flex: none;
  cursor: grab;
  touch-action: none;
}

.cc-joy:active {
  cursor: grabbing;
}

/* the socket the stick sits in */
.cc-joy-base {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cc-fill);
  box-shadow:
    inset 0 1.5px 4px rgba(30, 30, 40, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.9);
}

/* dark gasket where the shaft enters */
.cc-joy-base::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 17px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #4a4a52, #232328 70%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cc-joy-stick {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 0;
  transform-origin: bottom center;
}

.cc-joy-shaft {
  position: absolute;
  left: -2.5px;
  bottom: 0;
  width: 5px;
  height: 18px;
  border-radius: 2.5px;
  background: linear-gradient(90deg, #aeb2bb, #eef0f4 45%, #999fa9);
}

/* classic arcade ball-top: candy red to match the action button, with a hard
   catch-light and a soft cast shadow so it sits IN the room, not on it */
.cc-joy-ball {
  position: absolute;
  left: -9.5px;
  bottom: 14px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 26%, #ff9da3, #ff5159 52%, #cf2c36 100%);
  box-shadow:
    0 0 0 0.5px rgba(120, 10, 20, 0.25),
    0 2px 3px rgba(120, 10, 20, 0.28),
    0 5px 6px -2px rgba(20, 20, 30, 0.22),
    inset 0 -2px 3px rgba(120, 10, 20, 0.35);
}

/* the hard specular dot that sells the gloss */
.cc-joy-ball::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 4.5px;
  width: 5px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  filter: blur(0.4px);
}

/* drop tray = a HATCH: a raised lid split down the middle, sitting in a recessed
   bezel over a dark chute. The doors part to swallow a correct catch; a wrong
   toy meets them closed and is rejected. Built in the iOS-register (grouped
   surfaces, hairlines, precise inset shadows) so it reads as one machine. */
.cc-tray {
  position: relative;
  flex: 1;
  height: 60px;
  border-radius: 14px;
  /* a true hairline, not an outline — the tray should sit IN the panel */
  box-shadow:
    inset 0 0 0 0.5px rgba(60, 60, 67, 0.07),
    0 1px 2px -1px rgba(30, 30, 40, 0.06);
}

.cc-tray-lip {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 8px;
  height: 5px;
  z-index: 3;
  border-radius: 2px 2px 5px 5px;
  background: #dfe2e7;
  box-shadow: none;
  pointer-events: none;
}

.cc-tray--open .cc-tray-lip {
  z-index: 45;
}

.cc-tray--receiving .cc-tray-label {
  opacity: 0;
}

/* clipped frame so the sliding doors disappear off the sides */
.cc-tray-hatch {
  position: absolute;
  inset: 6px 7px 10px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid #d8dbe1;
  box-shadow: none;
}

/* the chute, revealed once the doors slide open — not a flat black box but a
   recessed slot with depth: a rim catch-light at the top edge, charcoal walls
   falling away into the dark, and a vignette so the centre reads DEEPEST */
.cc-tray-mouth {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #838b96 0%, #aab1ba 52%, #c3c8d0 100%);
  box-shadow:
    inset 0 8px 10px -6px rgba(35, 43, 55, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 4px 0 8px -5px rgba(0, 0, 0, 0.7),
    inset -4px 0 8px -5px rgba(0, 0, 0, 0.7);
}

/* while the hatch waits for the catch, a soft green glow breathes up from the
   bottom of the chute — "in here" — and disappears when the doors shut */
.cc-tray-mouth::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 95% at 50% 88%, rgba(52, 199, 89, 0.28), transparent 68%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cc-tray--open .cc-tray-mouth::after {
  opacity: 1;
}

/* the two doors form ONE seamless lid when shut — a top catch-light and a soft
   underside shadow give it thickness, with NO centre seam line (the split only
   appears when the doors actually part, so closed it reads as a clean panel). */
.cc-tray-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  background: #f0f1f4;
  box-shadow: none;
  transition:
    transform 0.42s cubic-bezier(0.645, 0.045, 0.355, 1),
    background 0.25s ease;
}

.cc-tray-door--l {
  left: 0;
}

.cc-tray-door--r {
  display: none;
}

/* one seamless skin laid over the closed doors: while shut the lid is a single
   uninterrupted panel (no centre seam, no door edges). It fades out fast as the
   doors part, and fades back in late so the shutting slide still reads. */
.cc-tray-skin {
  position: absolute;
  inset: auto 0 0;
  height: 7px;
  background: #e3e6eb;
  box-shadow: none;
  transition:
    background 0.25s ease,
    transform 0.42s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.cc-tray--open .cc-tray-skin {
  transform: translateY(-35px);
  transition:
    transform 0.42s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.cc-tray--hot .cc-tray-skin {
  background: #edf6f0;
}

.cc-tray--win .cc-tray-skin {
  background: #e8f4ec;
}

.cc-tray--no .cc-tray-skin {
  background: #faf0e5;
}

/* the label rides on top of the closed doors */
.cc-tray-label {
  position: absolute;
  inset: 0 0 3px;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--cc-muted);
  font-size: 0.75rem; /* 12px label */
  font-weight: 500;
  letter-spacing: -0.004em;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    color 0.25s ease;
}

/* verdict labels carry a touch more weight than the resting hint */
.cc-tray--hot .cc-tray-label,
.cc-tray--win .cc-tray-label,
.cc-tray--no .cc-tray-label {
  font-weight: 600;
}

/* a single thin accent ring expresses each state — restrained, themed, never a
   flooded colour block */
.cc-tray::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 0.25s ease;
  pointer-events: none;
}

/* OPEN — doors part, chute shows, label clears out of the way */
.cc-tray--open .cc-tray-door--l {
  transform: translateY(-100%);
}

.cc-tray--open .cc-tray-door--r {
  transform: translateX(101%);
}

.cc-tray--open .cc-tray-label {
  opacity: 0;
}

/* HOT — a toy hovers over the closed hatch: ready. Green ring + label, only a
   whisper of tint on the lid (no generic green box). */
.cc-tray--hot .cc-tray-door {
  background: #edf6f0;
}

.cc-tray--hot .cc-tray-label {
  color: #1f8a3b;
}

.cc-tray--hot::before {
  box-shadow: inset 0 0 0 1.5px rgba(52, 199, 89, 0.5);
}

/* WIN — the hatch has snapped shut on the catch: green ring + a single ripple */
.cc-tray--win .cc-tray-door {
  background: #e8f4ec;
}

.cc-tray--win .cc-tray-label {
  color: #1f8a3b;
}

.cc-tray--win::before {
  box-shadow: inset 0 0 0 1.5px rgba(52, 199, 89, 0.62);
}

/* two waves rolling off the tray, box-shadow spread so they follow the
   rounded shape exactly — scaling a border warps the corner radii */
.cc-tray--win::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 14px;
  animation: cc-ring 1s cubic-bezier(0.2, 0.6, 0.35, 1) 0.08s both;
  pointer-events: none;
}

@keyframes cc-ring {
  0% {
    box-shadow:
      0 0 0 0 rgba(52, 199, 89, 0.5),
      0 0 0 0 rgba(52, 199, 89, 0.35);
  }
  45% {
    box-shadow:
      0 0 0 9px rgba(52, 199, 89, 0.15),
      0 0 0 3px rgba(52, 199, 89, 0.3);
  }
  100% {
    box-shadow:
      0 0 0 15px rgba(52, 199, 89, 0),
      0 0 0 10px rgba(52, 199, 89, 0);
  }
}

/* a single restrained confetti burst out of the hatch on a correct catch */
.cc-confetti {
  position: absolute;
  left: 50%;
  top: 32%;
  z-index: 4;
  pointer-events: none;
}

.cc-confetti i {
  position: absolute;
  width: 5px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: cc-pop 1.05s cubic-bezier(0.3, 0.55, 0.45, 1) both;
}

/* every other piece is a round dot, a size down — a mixed handful, not a grid */
.cc-confetti i:nth-child(even) {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
}

/* a real toss: up to an apex (--dy) by mid-flight, then gravity wins and the
   piece falls back past most of its rise while it fades and keeps spinning */
@keyframes cc-pop {
  0% {
    opacity: 0;
    transform: translate(0, 2px) rotate(0deg) scale(0.4);
  }
  12% {
    opacity: 1;
  }
  50% {
    transform: translate(calc(var(--dx) * 0.65), var(--dy)) rotate(calc(var(--dr) * 0.6)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), calc(var(--dy) * 0.2)) rotate(var(--dr)) scale(0.85);
  }
}

/* NO — the doors stayed shut: an amber ring + label and one apologetic shake.
   Amber (not red) — it's "try again", not an error. */
.cc-tray--no .cc-tray-door {
  background: #faf0e5;
}

.cc-tray--no .cc-tray-label {
  color: #c2620e;
}

.cc-tray--no::before {
  box-shadow: inset 0 0 0 1.5px rgba(255, 149, 0, 0.55);
}

.cc-tray--no {
  animation: cc-sorry 0.85s ease 0.02s;
}

@keyframes cc-sorry {
  18% {
    transform: translateX(-3.5px);
  }
  42% {
    transform: translateX(2.5px);
  }
  66% {
    transform: translateX(-1.5px);
  }
  100% {
    transform: translateX(0);
  }
}

/* action: a real arcade button — glossy convex dome in a recessed bezel */
.cc-action {
  --btn: var(--clawcap-action, #ff5159);
  position: relative;
  flex: none;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, #ff8a90, var(--btn) 55%, #e23740 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.75rem; /* 12px label, same step as the tray */
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 1px rgba(120, 10, 20, 0.35);
  cursor: pointer;
  /* bezel ring it sits in + lift + inner shading that makes it convex */
  box-shadow:
    0 0 0 5px var(--cc-fill),
    0 0 0 5.5px rgba(60, 60, 67, 0.1),
    0 5px 10px -2px rgba(190, 30, 45, 0.45),
    inset 0 2px 3px rgba(255, 255, 255, 0.45),
    inset 0 -4px 7px rgba(150, 10, 25, 0.4);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.2s ease;
}

/* the glossy catch-light that makes it look like candy */
.cc-action::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 30%;
  border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.cc-action:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 0 0 5px var(--cc-fill),
    0 0 0 5.5px rgba(60, 60, 67, 0.1),
    0 2px 4px -1px rgba(190, 30, 45, 0.4),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(150, 10, 25, 0.45);
}

/* disabled: a clean matte-grey dome — still a button, just powered down.
   (A desaturating filter over red turned it a muddy brown — never that.) */
.cc-action:disabled {
  background: radial-gradient(circle at 50% 30%, #f7f8fa, #e2e4e9 55%, #c8ccd4 100%);
  color: #9a9da6;
  text-shadow: none;
  cursor: default;
  box-shadow:
    0 0 0 5px var(--cc-fill),
    0 0 0 5.5px rgba(60, 60, 67, 0.1),
    0 4px 8px -3px rgba(30, 30, 40, 0.18),
    inset 0 2px 3px rgba(255, 255, 255, 0.7),
    inset 0 -4px 7px rgba(90, 95, 105, 0.22);
}

.cc-action:disabled::before {
  opacity: 0.55; /* the catch-light dims with the button */
}

/* ── pokéball livery (Pokémon pack) ──────────────────────────────────────────
   The same convex arcade dome, re-skinned as a vinyl-toy Poké Ball: red cap,
   thin dark band, ivory base. No label — the ball IS the button (the
   aria-label still says Grab/Drop). The ::before that was the candy
   catch-light becomes the ball's black-ringed centre button. */
.cc-action--ball {
  background:
    /* gloss on the red cap */
    radial-gradient(ellipse 58% 30% at 50% 13%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 100%),
    /* cap / band / base — the band is ~9% of the diameter, like the real prop */
    linear-gradient(
      180deg,
      #ff6f76 0%,
      #ee3340 32%,
      #d6232f 45.5%,
      #23232a 45.5%,
      #23232a 54.5%,
      #f4f5f7 54.5%,
      #e6e8ed 80%,
      #c9cdd5 100%
    );
  box-shadow:
    0 0 0 5px var(--cc-fill),
    0 0 0 5.5px rgba(60, 60, 67, 0.1),
    0 5px 10px -2px rgba(40, 45, 60, 0.4),
    inset 0 2px 3px rgba(255, 255, 255, 0.4),
    inset 0 -4px 7px rgba(40, 45, 60, 0.3);
}

/* centre button: white core in a black ring, flush with the band */
.cc-action--ball::before {
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3.5px solid #23232a;
  background: radial-gradient(circle at 50% 32%, #ffffff 0%, #eef0f4 58%, #c8ccd4 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px 2px rgba(70, 75, 90, 0.28);
}

.cc-action--ball:active:not(:disabled) {
  box-shadow:
    0 0 0 5px var(--cc-fill),
    0 0 0 5.5px rgba(60, 60, 67, 0.1),
    0 2px 4px -1px rgba(40, 45, 60, 0.38),
    inset 0 2px 3px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(40, 45, 60, 0.34);
}

/* powered-down ball: the cap grays out, the shape keeps reading as a pokéball */
.cc-action--ball:disabled {
  background:
    radial-gradient(ellipse 58% 30% at 50% 13%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 100%),
    linear-gradient(
      180deg,
      #e9ebef 0%,
      #d4d7dd 32%,
      #c2c6cd 45.5%,
      #9a9da6 45.5%,
      #9a9da6 54.5%,
      #f2f3f5 54.5%,
      #e2e4e9 80%,
      #cfd3da 100%
    );
  box-shadow:
    0 0 0 5px var(--cc-fill),
    0 0 0 5.5px rgba(60, 60, 67, 0.1),
    0 4px 8px -3px rgba(30, 30, 40, 0.18),
    inset 0 2px 3px rgba(255, 255, 255, 0.7),
    inset 0 -4px 7px rgba(90, 95, 105, 0.22);
}

.cc-action--ball:disabled::before {
  opacity: 1; /* the centre button stays crisp; the grey cap reads "off" */
  border-color: #9a9da6;
}

/* "release now" — a soft green pulse rings the button while the catch hovers
   over the tray, pointing the player at the one control that finishes the job */
.cc-action::after {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px solid rgba(52, 199, 89, 0.55);
  opacity: 0;
  pointer-events: none;
}

.cc-action--ready::after {
  animation: cc-ready 1.3s ease-out infinite;
}

@keyframes cc-ready {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  35% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: scale(1.16);
  }
}

.clawcap-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.6875rem; /* 11px caption */
  letter-spacing: -0.004em;
  color: rgba(60, 60, 67, 0.48); /* iOS tertiary label */
}

/* ── reduced motion ──────────────────────────────────────────────────────────
   Drop the DECORATIVE flourishes — the success ring, the apologetic shake, the
   pill's springy glide, the hatch-door slide — to instant/none. Keep colour &
   opacity (allowed) and the user-driven claw interaction (meaningful motion).
   The Motion-powered transforms are handled by <MotionConfig reducedMotion>. */
@media (prefers-reduced-motion: reduce) {
  .clawcap-steps-pill {
    transition: none; /* the active segment snaps, no glide */
  }

  .cc-tray-door {
    transition: background 0.2s ease; /* doors snap open/shut, no slide */
  }

  .cc-tray--win::after {
    animation: none; /* no rippling ring */
  }

  .cc-tray--no {
    animation: none; /* no apologetic shake — the amber colour still reads */
  }

  .cc-confetti i {
    animation: none; /* no confetti burst */
  }

  .cc-action--ready::after {
    animation: none; /* steady ring instead of a pulse — the cue still reads */
    opacity: 0.7;
    transform: none;
  }
}
:root{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;color:#615963;background:#f8f4ed}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 90% 15%,#e9e4f3 0,transparent 50%),radial-gradient(ellipse at 10% 80%,#f5e1d8 0,transparent 55%);min-height:100vh}button,a,summary{touch-action:manipulation}button{font:inherit;font-size:11px;color:#726371;background:#fffaf4;border:1px solid #d9ced8;padding:11px 16px;border-radius:12px;cursor:pointer;transition:background .15s}button:hover{background:#eee5f2}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible{outline:2px solid #a48aad;outline-offset:4px}main{max-width:1100px;margin:auto;padding:32px 35px 16px}.page-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.eyebrow{font-size:8px;letter-spacing:.23em;font-weight:700;color:#a497a5}h1{font:400 46px/1.08 Georgia,serif;letter-spacing:-1.5px;margin:8px 0;color:#78667e}h1 span{display:block;font:12px system-ui;letter-spacing:.13em;margin-top:10px;color:#a090a1}.nav{display:flex;gap:8px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:65px;align-items:start}.play-section{min-width:0}.round-heading{font-size:9px;letter-spacing:.1em;color:#a393a2;display:flex;justify-content:space-between;max-width:440px;margin:0 auto 14px}.round-heading span:last-child{letter-spacing:0}.cabinet-stage{position:relative;isolation:isolate}.cabinet-art{position:absolute;width:calc(100% + 70px);height:100%;left:-35px;top:0;object-fit:cover;opacity:.45;z-index:-1;border-radius:30px;filter:saturate(.7)}.source-viewport{position:relative;width:100%;max-width:440px;margin:auto}.source-scale{width:440px;transform-origin:top left}.clawcap{width:440px;max-width:none;--clawcap-bg:#fffcf8f5;--clawcap-ink:#706274;--clawcap-muted:#aa9bab;--clawcap-accent:#ad8eaa;box-shadow:0 0 0 1px #c3b8c54d,0 15px 50px #8b6d9a18}.clawcap-title{font-family:Georgia,serif;font-size:22px;font-weight:400;margin-top:0}.clawcap-sub{font-size:12px}.clawcap-case{background:#eae3ee}.clawcap-glass{background:linear-gradient(#f5eff8,#eee5f3)}.cc-glass-shine{opacity:.6}.clawcap-panel{background:#eee7ef}.cc-action{background:#d5b1b8;box-shadow:0 5px 0 #bd929e,0 9px 17px #ad81993b}.cc-action--ready{background:#bdcdb4}.cc-action:hover{background:#ddbdc5}.cc-tray{background:#e0d7e5}.cc-arrow-controls{display:flex;gap:13px;justify-content:center;align-items:center;margin:17px 0 0}.cc-arrow-controls button{width:48px;height:36px;font-size:19px;line-height:1;background:#f4edf5;border-color:#dfd4e2;padding:3px 12px;touch-action:none}.cc-arrow-controls span{font-size:9px;color:#b6a6b8}.clawcap-hint{font-size:9px;color:#b4a4b4}.is-paused *{animation-play-state:paused!important}.next-space{min-height:62px;display:grid;place-items:center;text-align:center;margin-top:18px}.next-space p{font:italic 13px Georgia,serif;color:#a28f9f;margin:0}.primary{background:#ae95b1;color:#fffaf6;border-color:#ae95b1;font-weight:600;padding:14px 22px}.primary:hover{background:#9b80a0}aside{padding-top:28px}aside h2{font:400 31px/1.2 Georgia,serif;color:#8c768f;margin:16px 0}aside>p:not(.eyebrow){font-size:12px;line-height:1.8;color:#a08e9b;max-width:260px}.wishlist{padding:0;list-style:none;margin:25px 0 20px}.wishlist li{display:flex;align-items:center;gap:12px;border-bottom:1px solid #d5c9d42b;padding:8px 4px;opacity:.6}.wishlist img{width:47px;height:47px;object-fit:contain}.wishlist small{font-size:6px;letter-spacing:.12em;color:#b1a0ad;display:block;margin-bottom:5px}.wishlist strong{font-size:11px;text-transform:capitalize;font-weight:500;color:#958496}.wishlist b{font-size:14px;margin-left:auto;font-weight:400;color:#a590a5}.wishlist .current{opacity:1;background:#fffaf791;border-radius:12px;padding-left:12px;border:1px solid #d9c9da80;box-shadow:0 5px 15px #b39ab710}.wishlist .collected{opacity:.8}.wishlist .collected b{color:#91aa88}.keepsake{background:#eee8ef87;border-radius:13px;padding:14px 17px}.keepsake small{font-size:7px;letter-spacing:.16em;color:#a794a7}.keepsake p{font:14px Georgia,serif;color:#9c879c;margin:7px 0 0}.replay{margin-top:12px;width:100%;font-size:10px;background:transparent;border-color:#dfd4df}.completion{background:#fdf9f3d9;border:1px solid #dacedd;border-radius:20px;padding:30px;text-align:center;margin:20px auto}.completion h2{font:30px Georgia,serif;color:#927897}.completion p:not(.eyebrow){font-size:12px;color:#a58e9f}footer{display:flex;gap:16px;border-top:1px solid #d8cbd43d;margin-top:25px;padding:15px 0 0;font-size:8px;color:#b3a2ad;justify-content:center}footer a{color:#9a859d}.pause-cover{position:absolute;inset:0;display:grid;place-items:center;z-index:8;border-radius:30px;background:#f7eef3ad;backdrop-filter:blur(8px)}.pause-cover>div{text-align:center;padding:28px;background:#fffcf6e8;border:1px solid #d8c9da;border-radius:22px}.pause-cover h2{font:26px Georgia,serif;color:#9c82a1;margin:18px 0}.guide-scrim{position:fixed;inset:0;display:grid;place-items:center;padding:22px;background:#6e567858;backdrop-filter:blur(10px);z-index:30;overflow:auto}.guide-scrim article{width:min(440px,95vw);background:#fffaf4;padding:30px;border:1px solid #d9cada;border-radius:25px;box-shadow:0 25px 100px #6f557a38}.guide-scrim h2{font:30px Georgia,serif;color:#927a99}.guide-scrim ol{padding-left:20px}.guide-scrim li{padding:5px 0}.guide-scrim strong{font-size:13px;color:#98829b}.guide-scrim p:not(.eyebrow){font-size:11px;line-height:1.9;color:#a08a9b}.guide-scrim .primary{width:100%;margin-top:10px}@media(max-width:820px){main{padding:25px 24px 15px}.layout{grid-template-columns:minmax(0,1fr) 240px;gap:28px}aside h2{font-size:26px}aside{padding-top:25px}.wishlist img{width:42px;height:42px}.page-header{margin-bottom:22px}h1{font-size:41px}.nav button{padding:9px 12px;font-size:10px}}@media(max-width:650px){main{padding:22px 18px 13px}.page-header{align-items:flex-start;margin-bottom:25px}.eyebrow{font-size:6px;letter-spacing:.16em}h1{font-size:37px}h1 span{font-size:10px;letter-spacing:.08em}.nav{flex-direction:column;gap:6px}.nav button{font-size:9px;padding:8px 10px}.layout{display:block}.round-heading{font-size:8px}.cabinet-art{width:100%;left:0;opacity:.4}.next-space{margin-top:14px;min-height:47px}.next-space p{font-size:11px}.next-space button{font-size:11px;padding:12px 16px}aside{padding:20px 5px 0}aside h2{font-size:26px;margin:10px 0;line-height:1.15}aside h2 br{display:none}aside>p:not(.eyebrow){max-width:none;font-size:11px}.wishlist{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:18px}.wishlist li{padding:9px 4px!important;flex-direction:column;gap:5px;text-align:center;border:1px solid #d7c9d434;border-radius:12px;position:relative}.wishlist li b{position:absolute;right:7px;top:7px;font-size:10px}.wishlist img{width:48px;height:48px}.wishlist strong{font-size:9px}.wishlist small{font-size:5px;letter-spacing:.04em}.keepsake{padding:12px;text-align:center}.replay{margin-top:10px}footer{gap:10px;font-size:6px;flex-wrap:wrap;text-align:center}.completion{padding:22px}.completion h2{font-size:25px}}
