{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "streak-reward",
  "title": "Streak Reward",
  "description": "A learning app shows Lesson complete with stat badges and a Continue button.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/streak-reward/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Onest\";\nimport type React from \"react\";\nimport { useId } from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  interpolate,\n  spring,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst { fontFamily } = loadFont(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\n\nexport type StreakStatKind = \"xp\" | \"accuracy\" | \"time\";\n\nexport interface StreakStat {\n  label: string;\n  /** XP points, accuracy percent, or time in seconds. */\n  value: number;\n  kind: StreakStatKind;\n  color?: string;\n}\n\nexport interface StreakRewardProps {\n  /** Streak after today. The number counts up from streak - 1. */\n  streak?: number;\n  stats?: StreakStat[];\n  title?: string;\n  subtitle?: string;\n  days?: string[];\n  cta?: string;\n  /** Two lines beside the phone: the streak beat, then the reward beat. */\n  lines?: [string, string];\n  accent?: string;\n  speed?: number;\n  theme?: \"light\" | \"dark\";\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst DEFAULT_STATS: StreakStat[] = [\n  { label: \"XP earned\", value: 25, kind: \"xp\" },\n  { label: \"Accuracy\", value: 100, kind: \"accuracy\" },\n  { label: \"Time\", value: 62, kind: \"time\" },\n];\n\nconst SW = 393;\nconst SH = 852;\nconst BEZEL = 11;\nconst BW = SW + BEZEL * 2;\nconst BH = SH + BEZEL * 2;\n\nconst HEAVY = { mass: 1, damping: 26, stiffness: 120 };\nconst CARD = { mass: 0.8, damping: 18, stiffness: 160 };\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\nconst MORPH = { damping: 200 };\nconst ENTER = Easing.bezier(0.32, 0.72, 0, 1);\nconst RISE = Easing.bezier(0.22, 1, 0.36, 1);\nconst MOVE = Easing.bezier(0.65, 0, 0.35, 1);\nconst EXIT = Easing.bezier(0.55, 0, 1, 0.45);\nconst CAMERA = Easing.bezier(0.87, 0, 0.13, 1);\n\nconst BEAT = {\n  phone: 0,\n  flame: 6,\n  number: 12,\n  week: 18,\n  today: 48,\n  note: 60,\n  touch: 66,\n  press: 84,\n  swap: 88,\n  medal: 96,\n  title: 102,\n  stats: 108,\n  line2: 90,\n  end: 180,\n};\n\nconst clamp = { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" } as const;\nconst FLAME = \"#ff7a1a\";\n\ninterface Pal {\n  screen: string;\n  text: string;\n  muted: string;\n  faint: string;\n  hair: string;\n  ring: string;\n  copy: string;\n  frame: string;\n  scrim: string;\n}\n\nconst LIGHT: Pal = {\n  screen: \"#fbfaf8\",\n  text: \"#17130f\",\n  muted: \"#6f6860\",\n  faint: \"#a59d94\",\n  hair: \"rgba(23,19,15,0.09)\",\n  ring: \"rgba(23,19,15,0.1)\",\n  copy: \"#1d1712\",\n  frame:\n    \"linear-gradient(155deg,#f1f1f3 0%,#c4c4ca 30%,#e2e2e6 62%,#b3b3ba 100%)\",\n  scrim: \"rgba(246,240,232,0.28)\",\n};\nconst DARK: Pal = {\n  screen: \"#0c0b0a\",\n  text: \"#f6f1ea\",\n  muted: \"#a39a90\",\n  faint: \"#6c645c\",\n  hair: \"rgba(255,255,255,0.08)\",\n  ring: \"rgba(255,255,255,0.1)\",\n  copy: \"#fbf3ea\",\n  frame:\n    \"linear-gradient(155deg,#55565c 0%,#2a2b2f 30%,#3d3e43 62%,#1f2023 100%)\",\n  scrim: \"rgba(5,3,2,0.3)\",\n};\n\nfunction StatusBar({ color }: { color: string }) {\n  return (\n    <div\n      style={{\n        position: \"absolute\",\n        top: 0,\n        left: 0,\n        right: 0,\n        height: 54,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"space-between\",\n        padding: \"6px 32px 0 52px\",\n        zIndex: 30,\n        color,\n      }}\n    >\n      <span style={{ fontSize: 17, fontWeight: 400 }}>9:41</span>\n      <div style={{ display: \"flex\", gap: 6, alignItems: \"center\" }}>\n        <svg width=\"18\" height=\"12\" viewBox=\"0 0 18 12\" aria-hidden>\n          {[0, 1, 2, 3].map((i) => (\n            <rect\n              key={i}\n              x={i * 4.6}\n              y={9 - i * 3}\n              width={3.2}\n              height={3 + i * 3}\n              rx={0.8}\n              fill={color}\n            />\n          ))}\n        </svg>\n        <div\n          style={{\n            width: 25,\n            height: 12,\n            borderRadius: 3.5,\n            border: `1px solid ${color}`,\n            padding: 1.5,\n            boxSizing: \"border-box\",\n            opacity: 0.9,\n          }}\n        >\n          <div\n            style={{\n              width: \"80%\",\n              height: \"100%\",\n              borderRadius: 2,\n              background: color,\n            }}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction Phone({ children, c }: { children: React.ReactNode; c: Pal }) {\n  return (\n    <div style={{ position: \"relative\", width: BW, height: BH }}>\n      {[\n        [\"left\", 150, 32],\n        [\"left\", 210, 62],\n        [\"left\", 284, 62],\n        [\"right\", 236, 98],\n      ].map(([side, top, h]) => (\n        <div\n          key={`${side}${top}`}\n          style={{\n            position: \"absolute\",\n            [side as string]: -3,\n            top: top as number,\n            width: 4,\n            height: h as number,\n            borderRadius: 2,\n            background: c.frame,\n          }}\n        />\n      ))}\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          borderRadius: 68,\n          background: c.frame,\n          boxShadow:\n            \"0 50px 100px -20px rgba(0,0,0,0.45), 0 20px 40px -12px rgba(0,0,0,0.3)\",\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 3,\n          borderRadius: 65,\n          background: \"#050506\",\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: BEZEL,\n          top: BEZEL,\n          width: SW,\n          height: SH,\n          borderRadius: 57,\n          overflow: \"hidden\",\n          background: c.screen,\n        }}\n      >\n        {children}\n        <div\n          style={{\n            position: \"absolute\",\n            top: 11,\n            left: (SW - 126) / 2,\n            width: 126,\n            height: 37,\n            borderRadius: 19,\n            background: \"#000\",\n            zIndex: 40,\n          }}\n        />\n      </div>\n    </div>\n  );\n}\n\nfunction Flame({ uid, flare, t }: { uid: string; flare: number; t: number }) {\n  const sway = Math.sin(t / 7) * 2.4 + Math.sin(t / 3.3) * 0.8;\n  return (\n    <svg\n      width=\"112\"\n      height=\"136\"\n      viewBox=\"0 0 112 136\"\n      aria-hidden\n      style={{\n        overflow: \"visible\",\n        transform: `scale(${1 + flare * 0.1}, ${1 + flare * 0.16})`,\n        transformOrigin: \"50% 100%\",\n      }}\n    >\n      <defs>\n        <linearGradient id={`${uid}fo`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopColor=\"#ffb547\" />\n          <stop offset=\"1\" stopColor={FLAME} />\n        </linearGradient>\n        <linearGradient id={`${uid}fi`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopColor=\"#ffe3a8\" />\n          <stop offset=\"1\" stopColor=\"#ffc35c\" />\n        </linearGradient>\n      </defs>\n      <path\n        d=\"M56 134c-29 0-49-19-49-47 0-20 10-35 23-48 1 12 6 20 15 24-2-24 8-44 29-58 0 23 12 34 23 47 9 12 9 21 9 35 0 28-20 47-50 47z\"\n        fill={`url(#${uid}fo)`}\n      />\n      <path\n        d=\"M56 134c-15 0-26-10-26-25 0-13 8-22 17-30 1 8 5 12 10 14 0-13 6-22 15-29 3 15 10 20 10 33 0 21-10 37-26 37z\"\n        fill={`url(#${uid}fi)`}\n        transform={`rotate(${sway} 56 134)`}\n      />\n    </svg>\n  );\n}\n\nfunction Medal({\n  accent,\n  uid,\n  sheen,\n}: {\n  accent: string;\n  uid: string;\n  sheen: number;\n}) {\n  return (\n    <svg width=\"156\" height=\"156\" viewBox=\"0 0 156 156\" aria-hidden>\n      <defs>\n        <linearGradient id={`${uid}md`} x1=\"0.2\" y1=\"0\" x2=\"0.8\" y2=\"1\">\n          <stop\n            offset=\"0\"\n            stopColor={`color-mix(in oklab, ${accent} 70%, #fff)`}\n          />\n          <stop offset=\"0.55\" stopColor={accent} />\n          <stop\n            offset=\"1\"\n            stopColor={`color-mix(in oklab, ${accent} 62%, #000)`}\n          />\n        </linearGradient>\n        <clipPath id={`${uid}mc`}>\n          <circle cx=\"78\" cy=\"78\" r=\"70\" />\n        </clipPath>\n      </defs>\n      <circle cx=\"78\" cy=\"78\" r=\"70\" fill={`url(#${uid}md)`} />\n      <g clipPath={`url(#${uid}mc)`}>\n        <rect\n          x={-60 + sheen * 260}\n          y=\"-20\"\n          width=\"26\"\n          height=\"200\"\n          fill=\"#fff\"\n          opacity=\"0.22\"\n          transform=\"skewX(-20)\"\n        />\n      </g>\n      <circle\n        cx=\"78\"\n        cy=\"78\"\n        r=\"54\"\n        fill=\"none\"\n        stroke=\"#fff\"\n        strokeOpacity=\"0.32\"\n        strokeWidth=\"1.5\"\n      />\n      <circle\n        cx=\"78\"\n        cy=\"78\"\n        r=\"69.25\"\n        fill=\"none\"\n        stroke=\"#fff\"\n        strokeOpacity=\"0.28\"\n        strokeWidth=\"1.5\"\n      />\n      <path\n        d=\"M68 58v40l32-20z\"\n        fill=\"#fff\"\n        stroke=\"#fff\"\n        strokeWidth=\"6\"\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}\n\nfunction DayRing({\n  p,\n  color,\n  track,\n  size,\n  solid = 0,\n}: {\n  solid?: number;\n  p: number;\n  color: string;\n  track: string;\n  size: number;\n}) {\n  const r = size / 2 - 3;\n  const len = 2 * Math.PI * r;\n  return (\n    <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} aria-hidden>\n      <circle\n        cx={size / 2}\n        cy={size / 2}\n        r={r}\n        fill=\"none\"\n        stroke={track}\n        strokeWidth={4}\n      />\n      <circle\n        cx={size / 2}\n        cy={size / 2}\n        r={r}\n        fill=\"none\"\n        stroke={color}\n        strokeWidth={4}\n        strokeLinecap=\"round\"\n        strokeDasharray={len}\n        strokeDashoffset={len * (1 - Math.min(1, Math.max(0, p)))}\n        transform={`rotate(-90 ${size / 2} ${size / 2})`}\n        opacity={p > 0.01 ? 1 : 0}\n      />\n      <circle\n        cx={size / 2}\n        cy={size / 2}\n        r={r - 2}\n        fill={color}\n        transform={`translate(${size / 2} ${size / 2}) scale(${solid}) translate(${-size / 2} ${-size / 2})`}\n      />\n      <path\n        d={`M${size * 0.32} ${size * 0.52}l${size * 0.12} ${size * 0.12} ${size * 0.24} -${size * 0.26}`}\n        fill=\"none\"\n        stroke={solid > 0.5 ? \"#fff\" : color}\n        strokeWidth={2}\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n        opacity={Math.min(1, Math.max(0, (p - 0.85) * 6.6))}\n      />\n    </svg>\n  );\n}\n\nfunction fmt(kind: StreakStatKind, v: number) {\n  if (kind === \"accuracy\") return `${Math.round(v)}%`;\n  if (kind === \"time\") {\n    const s = Math.round(v);\n    return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, \"0\")}`;\n  }\n  return `+${Math.round(v)}`;\n}\n\nexport function StreakReward({\n  streak = 7,\n  stats = DEFAULT_STATS,\n  title = \"Lesson complete\",\n  subtitle = \"No mistakes across 14 answers.\",\n  days = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"],\n  cta = \"Continue\",\n  lines = [\"Day seven. Still shipping.\", \"Small wins, every day.\"],\n  accent = \"#3B5BFD\",\n  speed = 1,\n  theme = \"light\",\n  ground,\n  groundParams,\n}: StreakRewardProps) {\n  const frame = useCurrentFrame();\n  const { fps, width, height } = useVideoConfig();\n  const uid = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n  const f = frame * speed;\n  const dark = theme === \"dark\";\n  const c = dark ? DARK : LIGHT;\n  const tall = height > width;\n  const W = tall ? 720 : 1280;\n  const H = tall ? 1280 : 720;\n  const u = Math.min(width / W, height / H);\n  const k = tall ? (H * 0.66) / BH : (H * 0.9) / BH;\n  const phoneCx = tall ? W / 2 : W * 0.68;\n  const phoneCy = tall ? H - 40 - (BH * k) / 2 : H / 2;\n\n  const sp = (at: number, config: object = CARD) =>\n    spring({ frame: f - at, fps, config });\n  const ease = (a: number, b: number, e = ENTER) =>\n    interpolate(f, [a, b], [0, 1], { ...clamp, easing: e });\n\n  const rise = sp(BEAT.phone, HEAVY);\n  const cam = interpolate(f, [BEAT.medal, BEAT.end], [1, 1.035], {\n    ...clamp,\n    easing: CAMERA,\n  });\n\n  const flameIn = sp(BEAT.flame, CARD);\n  const roll = sp(BEAT.today + 2, CARD);\n  const flare =\n    sp(BEAT.today, CHIP) -\n    spring({ frame: f - BEAT.today - 8, fps, config: MORPH });\n  const numIn = ease(BEAT.number, BEAT.number + 14);\n  const weekIn = sp(BEAT.week, CARD);\n  const filled = Math.min(days.length, streak);\n  const todayIdx = filled - 1;\n  const noteSwap = ease(BEAT.note, BEAT.note + 12, MOVE);\n  const swap = sp(BEAT.swap, MORPH);\n\n  const medalIn = sp(BEAT.medal, CARD);\n  const sheen = ease(BEAT.medal + 12, BEAT.medal + 34, MOVE);\n  const titleIn = ease(BEAT.title, BEAT.title + 14);\n  const subIn = ease(BEAT.title + 4, BEAT.title + 18);\n  const ctaIn = sp(BEAT.today + 12, CARD);\n\n  const touchPath = ease(BEAT.touch, BEAT.press - 2, MOVE);\n  const touchO =\n    ease(BEAT.touch - 4, BEAT.touch + 4, RISE) *\n    (1 - ease(BEAT.press + 6, BEAT.press + 14, EXIT));\n  const pressK =\n    spring({ frame: f - BEAT.press, fps, config: CHIP }) -\n    spring({ frame: f - BEAT.press - 5, fps, config: CHIP });\n  const tx = interpolate(touchPath, [0, 1], [SW * 0.78, SW / 2 + 36]);\n  const ty =\n    interpolate(touchPath, [0, 1], [640, 778]) -\n    Math.sin(touchPath * Math.PI) * 26;\n\n  const copyLine = (i: number) => {\n    const inAt = i === 0 ? BEAT.number + 4 : BEAT.line2;\n    const outAt = i === 0 ? BEAT.line2 - 6 : undefined;\n    const pin = ease(inAt, inAt + 16);\n    const pout = outAt === undefined ? 0 : ease(outAt, outAt + 8, EXIT);\n    if (pin <= 0 || pout >= 1) return null;\n    return (\n      <div\n        key={i}\n        style={{\n          position: \"absolute\",\n          left: 0,\n          right: 0,\n          top: 0,\n          transform: `translateY(${(1 - pin) * 60 - pout * 40}%)`,\n          opacity: pin * (1 - pout),\n          filter: `blur(${(1 - pin) * 6 + pout * 4}px)`,\n        }}\n      >\n        {lines[i]}\n      </div>\n    );\n  };\n\n  const count = (i: number, value: number) =>\n    interpolate(\n      f,\n      [BEAT.stats + 4 + i * 6, BEAT.stats + 30 + i * 6],\n      [0, value],\n      { ...clamp, easing: RISE },\n    );\n\n  return (\n    <AbsoluteFill style={{ fontFamily, overflow: \"hidden\" }}>\n      <GshGround\n        preset={ground ?? \"hearth\"}\n        params={\n          groundParams ??\n          (dark\n            ? undefined\n            : {\n                background: \"#f5eee6\",\n                colors: [\"#fffaf3\", \"#ffbf8a\", \"#f3d9c4\", \"#f5eee6\"],\n                grain: 0.06,\n              })\n        }\n        timeOffset={3}\n        timeScale={0.35}\n      />\n      <AbsoluteFill style={{ background: c.scrim }} />\n      <div\n        style={{\n          position: \"absolute\",\n          left: (width - W * u) / 2,\n          top: (height - H * u) / 2,\n          width: W,\n          height: H,\n          transformOrigin: \"0 0\",\n          transform: `scale(${u})`,\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            left: tall ? 64 : 96,\n            top: tall ? 96 : H / 2 - 84,\n            width: tall ? W - 128 : 500,\n            height: tall ? 170 : 170,\n            fontSize: tall ? 68 : 76,\n            fontWeight: 300,\n            lineHeight: 1.04,\n            letterSpacing: \"-0.04em\",\n            color: c.copy,\n            overflow: \"hidden\",\n            textWrap: \"balance\",\n          }}\n        >\n          {copyLine(0)}\n          {copyLine(1)}\n        </div>\n        <div\n          style={{\n            position: \"absolute\",\n            left: phoneCx - BW / 2,\n            top: phoneCy - BH / 2,\n            width: BW,\n            height: BH,\n            transform: `translateY(${(1 - rise) * H * 0.9}px) scale(${k * cam})`,\n          }}\n        >\n          <Phone c={c}>\n            <StatusBar color={c.text} />\n            <AbsoluteFill\n              style={{\n                transform: `translateX(${-swap * SW * 0.3}px)`,\n                opacity: 1 - swap,\n              }}\n            >\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 0,\n                  right: 0,\n                  top: 118,\n                  display: \"flex\",\n                  justifyContent: \"center\",\n                  transform: `translateY(${(1 - flameIn) * 30}px) scale(${0.7 + 0.3 * flameIn})`,\n                  transformOrigin: \"50% 100%\",\n                  opacity: Math.min(1, flameIn * 2),\n                }}\n              >\n                <Flame uid={uid} flare={Math.max(0, flare)} t={f} />\n              </div>\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 0,\n                  right: 0,\n                  top: 270,\n                  height: 128,\n                  overflow: \"hidden\",\n                  textAlign: \"center\",\n                  fontSize: 120,\n                  fontWeight: 300,\n                  letterSpacing: \"-0.05em\",\n                  lineHeight: \"128px\",\n                  color: c.text,\n                  fontVariantNumeric: \"tabular-nums\",\n                  opacity: numIn,\n                  WebkitMaskImage:\n                    \"linear-gradient(transparent, #000 18%, #000 82%, transparent)\",\n                }}\n              >\n                <div\n                  style={{\n                    transform: `translateY(${-roll * 128 + (1 - numIn) * 30}px)`,\n                  }}\n                >\n                  <div>{streak - 1}</div>\n                  <div>{streak}</div>\n                </div>\n              </div>\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 0,\n                  right: 0,\n                  top: 400,\n                  textAlign: \"center\",\n                  fontSize: 20,\n                  fontWeight: 400,\n                  color: c.muted,\n                  opacity: numIn,\n                }}\n              >\n                day streak\n              </div>\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 28,\n                  right: 28,\n                  top: 474,\n                  opacity: Math.min(1, weekIn * 1.6),\n                  transform: `translateY(${(1 - weekIn) * 24}px)`,\n                }}\n              >\n                <div\n                  style={{\n                    display: \"flex\",\n                    justifyContent: \"space-between\",\n                  }}\n                >\n                  {days.slice(0, 7).map((d, i) => {\n                    const isToday = i === todayIdx;\n                    const at = isToday ? BEAT.today : BEAT.week + 4 + i * 3;\n                    const p =\n                      i <= todayIdx\n                        ? isToday\n                          ? spring({\n                              frame: f - at,\n                              fps,\n                              config: { damping: 200, stiffness: 120 },\n                            })\n                          : ease(at, at + 14, MOVE)\n                        : 0;\n                    const pop = isToday ? sp(at + 6, CHIP) : 1;\n                    return (\n                      <div\n                        key={`${d}-${i}`}\n                        style={{\n                          width: 40,\n                          display: \"flex\",\n                          flexDirection: \"column\",\n                          alignItems: \"center\",\n                          gap: 10,\n                        }}\n                      >\n                        <span\n                          style={{\n                            fontSize: 15,\n                            fontWeight: 400,\n                            color: isToday && f >= BEAT.today ? FLAME : c.faint,\n                          }}\n                        >\n                          {d}\n                        </span>\n                        <div\n                          style={{\n                            transform: `scale(${isToday ? 0.86 + 0.14 * pop : 1})`,\n                          }}\n                        >\n                          <DayRing\n                            p={p}\n                            solid={isToday ? Math.max(0, Math.min(1, pop)) : 0}\n                            color={FLAME}\n                            track={c.ring}\n                            size={38}\n                          />\n                        </div>\n                      </div>\n                    );\n                  })}\n                </div>\n                <div\n                  style={{ height: 1, background: c.hair, margin: \"22px 0\" }}\n                />\n                <div\n                  style={{\n                    position: \"relative\",\n                    height: 48,\n                    textAlign: \"center\",\n                    fontSize: 17,\n                    fontWeight: 400,\n                    color: c.muted,\n                    lineHeight: \"24px\",\n                    textWrap: \"balance\",\n                  }}\n                >\n                  <div\n                    style={{\n                      position: \"absolute\",\n                      inset: 0,\n                      opacity: 1 - noteSwap,\n                      transform: `translateY(${-noteSwap * 10}px)`,\n                    }}\n                  >\n                    One more lesson keeps the week alive.\n                  </div>\n                  <div\n                    style={{\n                      position: \"absolute\",\n                      inset: 0,\n                      opacity: noteSwap,\n                      transform: `translateY(${(1 - noteSwap) * 10}px)`,\n                    }}\n                  >\n                    Seven for seven. Come back tomorrow for eight.\n                  </div>\n                </div>\n              </div>\n            </AbsoluteFill>\n\n            {f >= BEAT.swap && (\n              <AbsoluteFill\n                style={{\n                  transform: `translateX(${(1 - swap) * SW * 0.4}px)`,\n                  opacity: swap,\n                }}\n              >\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 0,\n                    right: 0,\n                    top: 150,\n                    display: \"flex\",\n                    justifyContent: \"center\",\n                    transform: `translateY(${(1 - medalIn) * 50}px) scale(${0.7 + 0.3 * medalIn})`,\n                    opacity: Math.min(1, medalIn * 2),\n                  }}\n                >\n                  <Medal accent={accent} uid={uid} sheen={sheen} />\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 0,\n                    right: 0,\n                    top: 336,\n                    textAlign: \"center\",\n                    fontSize: 32,\n                    fontWeight: 400,\n                    color: c.text,\n                    letterSpacing: \"-0.025em\",\n                    transform: `translateY(${(1 - titleIn) * 14}px)`,\n                    opacity: titleIn,\n                  }}\n                >\n                  {title}\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 30,\n                    right: 30,\n                    top: 384,\n                    textAlign: \"center\",\n                    fontSize: 17,\n                    fontWeight: 400,\n                    color: c.muted,\n                    lineHeight: \"24px\",\n                    opacity: subIn,\n                    transform: `translateY(${(1 - subIn) * 10}px)`,\n                  }}\n                >\n                  {subtitle}\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 28,\n                    right: 28,\n                    top: 488,\n                    display: \"flex\",\n                    borderTop: `1px solid ${c.hair}`,\n                    borderBottom: `1px solid ${c.hair}`,\n                  }}\n                >\n                  {stats.slice(0, 3).map((s, i) => {\n                    const pop = sp(BEAT.stats + i * 3, CARD);\n                    return (\n                      <div\n                        key={s.label}\n                        style={{\n                          flex: 1,\n                          padding: \"18px 0 20px\",\n                          paddingLeft: i === 0 ? 0 : 16,\n                          borderLeft: i === 0 ? \"none\" : `1px solid ${c.hair}`,\n                          opacity: Math.min(1, pop * 1.6),\n                          transform: `translateY(${(1 - pop) * 16}px)`,\n                        }}\n                      >\n                        <div\n                          style={{\n                            fontSize: 14,\n                            fontWeight: 400,\n                            color: c.muted,\n                          }}\n                        >\n                          {s.label}\n                        </div>\n                        <div\n                          style={{\n                            marginTop: 6,\n                            fontSize: 34,\n                            fontWeight: 300,\n                            letterSpacing: \"-0.03em\",\n                            color: s.color ?? (i === 0 ? FLAME : c.text),\n                            fontVariantNumeric: \"tabular-nums\",\n                          }}\n                        >\n                          {fmt(s.kind, count(i, s.value))}\n                        </div>\n                      </div>\n                    );\n                  })}\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 28,\n                    right: 28,\n                    top: 630,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    gap: 12,\n                    opacity: ease(BEAT.stats + 20, BEAT.stats + 34),\n                  }}\n                >\n                  <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" aria-hidden>\n                    <path\n                      d=\"M12 22c4 0 7-2.8 7-7 0-4.5-4-7.5-5-12-2.5 2-3.5 4.5-3 7-1-.5-2-1.6-2.3-3C6.3 9 5 11.6 5 15c0 4.2 3 7 7 7z\"\n                      fill=\"none\"\n                      stroke={FLAME}\n                      strokeWidth={1.6}\n                      strokeLinejoin=\"round\"\n                    />\n                  </svg>\n                  <span style={{ fontSize: 16, color: c.muted }}>\n                    {streak}-day streak · best this year\n                  </span>\n                </div>\n              </AbsoluteFill>\n            )}\n\n            <div\n              style={{\n                position: \"absolute\",\n                left: 24,\n                right: 24,\n                top: 752,\n                height: 54,\n                borderRadius: 27,\n                background: accent,\n                color: \"#fff\",\n                display: \"flex\",\n                alignItems: \"center\",\n                justifyContent: \"center\",\n                fontSize: 18,\n                fontWeight: 400,\n                zIndex: 10,\n                opacity: Math.min(1, ctaIn * 1.6),\n                transform: `translateY(${(1 - ctaIn) * 30}px) scale(${1 - 0.04 * Math.max(0, pressK)})`,\n                boxShadow: `0 10px 24px -10px color-mix(in oklab, ${accent} 70%, transparent)`,\n              }}\n            >\n              {cta}\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                left: tx - 22,\n                top: ty - 22,\n                width: 44,\n                height: 44,\n                borderRadius: 22,\n                background: \"rgba(255,255,255,0.28)\",\n                boxShadow:\n                  \"0 0 0 1.5px rgba(255,255,255,0.85), 0 4px 14px rgba(0,0,0,0.22)\",\n                opacity: touchO,\n                transform: `scale(${1 - 0.18 * Math.max(0, pressK)})`,\n                zIndex: 35,\n              }}\n            />\n            <div\n              style={{\n                position: \"absolute\",\n                bottom: 8,\n                left: (SW - 136) / 2,\n                width: 136,\n                height: 5,\n                borderRadius: 3,\n                background: c.text,\n                zIndex: 36,\n              }}\n            />\n          </Phone>\n        </div>\n      </div>\n    </AbsoluteFill>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/streak-reward.tsx"
    }
  ],
  "type": "registry:component"
}
