[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AW22R3GG2C7YBYV8MZPS0G":3,"skill-same:01M7AW22R3GG2C7YBYV8MZPS0G":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7AW22R3GG2C7YBYV8MZPS0G","app-store-screenshots",null,"Use when building App Store or Google Play screenshot pages, generating exportable marketing screenshots for iOS and\u002For Android apps, or creating programmatic screenshot generators with Next.js. Triggers on app store, play store, screenshots, marketing assets, html-to-image, phone mockup, android screenshots, feature graphic.","barkleesanders\u002Fclaude-code-starter","barkleesanders","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F30680901?v=4","01M7AW019CGBYWDA8MFJEN1JXC","Barklee Sanders","01M7AW01A5H994ASJ2QZPW67AV",4,"MIT","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fapp-store-screenshots\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: app-store-screenshots\ndescription: Use when building App Store or Google Play screenshot pages, generating exportable marketing screenshots for iOS and\u002For Android apps, or creating programmatic screenshot generators with Next.js. Triggers on app store, play store, screenshots, marketing assets, html-to-image, phone mockup, android screenshots, feature graphic.\n---\n\n# App Store & Google Play Screenshots Generator\n\n## Overview\n\nBuild a Next.js page that renders App Store **and** Google Play screenshots as **advertisements** (not UI showcases) and exports them via `html-to-image` at Apple's and Google's required resolutions. Screenshots are the single most important conversion asset on both stores.\n\nSupported devices out of the box:\n- **iPhone** (portrait) — Apple App Store\n- **iPad** (portrait) — Apple App Store\n- **Android Phone** (portrait) — Google Play\n- **Android Tablet 7\"** (portrait + landscape) — Google Play\n- **Android Tablet 10\"** (portrait + landscape) — Google Play\n- **Feature Graphic** (landscape banner, 1024×500) — Google Play store listing header\n\n## Core Principle\n\n**Screenshots are advertisements, not documentation.** Every screenshot sells one idea. If you're showing UI, you're doing it wrong — you're selling a *feeling*, an *outcome*, or killing a *pain point*.\n\n## Step 1: Ask the User These Questions\n\nBefore writing ANY code, ask the user all of these. Do not proceed until you have answers:\n\n### Required\n\n1. **App screenshots** — \"Where are your app screenshots? (PNG files of actual device captures)\"\n2. **App icon** — \"Where is your app icon PNG?\"\n3. **Brand colors** — \"What are your brand colors? (accent color, text color, background preference)\"\n4. **Font** — \"What font does your app use? (or what font do you want for the screenshots?)\"\n5. **Feature list** — \"List your app's features in priority order. What's the #1 thing your app does?\"\n6. **Number of slides** — \"How many screenshots do you want? (Apple allows up to 10, Google Play up to 8)\"\n7. **Style direction** — \"What style do you want? Examples: warm\u002Forganic, dark\u002Fmoody, clean\u002Fminimal, bold\u002Fcolorful, gradient-heavy, flat. Share App Store screenshot references if you have any.\"\n\n### Optional\n\n8. **Target stores** — \"Are you targeting Apple App Store only, Google Play only, or both? This determines which devices we generate screenshots for.\"\n9. **iPad screenshots** — \"Do you also have iPad screenshots? If so, we'll generate iPad App Store screenshots too (recommended for universal apps).\"\n10. **Android tablet screenshots** — \"Do you have Android tablet screenshots? If yes, what tablet sizes — 7\" and\u002For 10\"? Do you have them in portrait, landscape, or both orientations?\"\n11. **Feature Graphic** — \"Do you want a Google Play Feature Graphic (1024×500 banner shown at the top of your Play Store listing)? This is separate from phone screenshots.\"\n12. **Component assets** — \"Do you have any UI element PNGs (cards, widgets, etc.) you want as floating decorations? If not, that's fine — we'll skip them.\"\n13. **Localized screenshots** — \"Do you want screenshots in multiple languages? This helps your listing rank in regional App Stores even if your app is English-only. If yes: which languages? (e.g. en, de, es, pt, ja, ar, he)\"\n14. **Theme preset system** — \"Do you want one art direction, or reusable visual themes (for example: clean-light, dark-bold, warm-editorial) so you can swap screenshot looks quickly?\"\n15. **Additional instructions** — \"Any specific requirements, constraints, or preferences?\"\n\n### Derived from answers (do NOT ask — decide yourself)\n\nBased on the user's style direction, brand colors, and app aesthetic, decide:\n- **Background style**: gradient direction, colors, whether light or dark base\n- **Decorative elements**: blobs, glows, geometric shapes, or none — match the style\n- **Dark vs light slides**: how many of each, which features suit dark treatment\n- **Typography treatment**: weight, tracking, line height — match the brand personality\n- **Color palette**: derive text colors, secondary colors, shadow tints from the brand colors\n- **Theme preset names**: turn vague style requests into reusable theme ids the user can switch between\n- **RTL behavior**: if any locale is RTL (`ar`, `he`, `fa`, `ur`), mirror layout intentionally instead of just translating the text\n- **Landscape slide layouts**: for tablet landscape slides, use caption-left + device-right composition (never try to fit two tablets side-by-side in landscape — there's not enough horizontal room)\n\n**IMPORTANT:** If the user gives additional instructions at any point during the process, follow them. User instructions always override skill defaults.\n\n## Step 2: Set Up the Project\n\n### Detect Package Manager\n\nCheck what's available, use this priority: **bun > pnpm > yarn > npm**\n\n```bash\n# Check in order\nwhich bun && echo \"use bun\" || which pnpm && echo \"use pnpm\" || which yarn && echo \"use yarn\" || echo \"use npm\"\n```\n\n### Scaffold (if no existing Next.js project)\n\n```bash\n# With bun:\nbunx create-next-app@latest . --typescript --tailwind --app --src-dir --no-eslint --import-alias \"@\u002F*\"\nbun add html-to-image\n\n# With pnpm:\npnpx create-next-app@latest . --typescript --tailwind --app --src-dir --no-eslint --import-alias \"@\u002F*\"\npnpm add html-to-image\n\n# With yarn:\nyarn create next-app . --typescript --tailwind --app --src-dir --no-eslint --import-alias \"@\u002F*\"\nyarn add html-to-image\n\n# With npm:\nnpx create-next-app@latest . --typescript --tailwind --app --src-dir --no-eslint --import-alias \"@\u002F*\"\nnpm install html-to-image\n```\n\n### Copy the Phone Mockup\n\nThe skill includes a pre-measured iPhone mockup at `mockup.png` (co-located with this SKILL.md). Copy it to the project's `public\u002F` directory. All other device frames (Android Phone, Android Tablets, iPad) are rendered with CSS — no additional mockup PNGs needed.\n\n### File Structure\n\n#### iPhone-only app (default)\n\n```\nproject\u002F\n├── public\u002F\n│   ├── mockup.png              # iPhone frame (included with skill)\n│   ├── app-icon.png            # User's app icon\n│   └── screenshots\u002F\n│       ├── en\u002F\n│       │   ├── home.png\n│       │   ├── feature-1.png\n│       │   └── ...\n│       ├── de\u002F\n│       └── {locale}\u002F\n├── src\u002Fapp\u002F\n│   ├── layout.tsx              # Font setup\n│   └── page.tsx                # The screenshot generator (single file)\n└── package.json\n```\n\nIf iPad screenshots are localized too, mirror the same locale structure:\n\n```\n└── screenshots-ipad\u002F\n    ├── en\u002F\n    ├── de\u002F\n    └── {locale}\u002F\n```\n\nSingle-language apps can omit the locale folder entirely — paths become `screenshots\u002Fhome.png`.\n\n#### Multi-platform app (iOS + Android)\n\nWhen the user needs both Apple and Android screenshots, use a platform-based structure so every device's images are clearly separated:\n\n```\n└── screenshots\u002F\n    ├── apple\u002F\n    │   ├── iphone\u002F\n    │   │   ├── en\u002F\n    │   │   └── {locale}\u002F\n    │   └── ipad\u002F\n    │       ├── en\u002F\n    │       └── {locale}\u002F\n    └── android\u002F\n        ├── phone\u002F\n        │   ├── en\u002F\n        │   └── {locale}\u002F\n        ├── tablet-7\u002F\n        │   ├── portrait\u002F\n        │   │   └── {locale}\u002F\n        │   └── landscape\u002F\n        │       └── {locale}\u002F\n        └── tablet-10\u002F\n            ├── portrait\u002F\n            │   └── {locale}\u002F\n            └── landscape\u002F\n                └── {locale}\u002F\n```\n\n**Only create subdirectories for devices the user actually has screenshots for.** An empty directory will cause broken image placeholders in the generator.\n\n**Use the iPhone-only structure by default.** Switch to the platform-based structure only when the user confirms they're targeting Android as well.\n\n**The entire generator is a single `page.tsx` file.** No routing, no extra layouts, no API routes.\n\n### Multi-language: Locale Select\n\nAdd a `LOCALES` array and a `\u003Cselect>` locale picker to the toolbar. Every slide src uses a `base` variable — no hardcoded locale paths:\n\n```tsx\nconst LOCALES = [\"en\", \"de\", \"es\", \"tr\"] as const; \u002F\u002F use whatever langs were defined\ntype Locale = typeof LOCALES[number];\n\n\u002F\u002F In ScreenshotsPage:\nconst [locale, setLocale] = useState\u003CLocale>(\"en\");\n\u002F\u002F base is derived per-device from locale:\nconst base = (platform: string) => `\u002Fscreenshots\u002F${platform}\u002F${locale}`;\n\n\u002F\u002F Toolbar:\n\u003Cselect value={locale} onChange={e => setLocale(e.target.value as Locale)}>\n  {LOCALES.map(l => \u003Coption key={l} value={l}>{l.toUpperCase()}\u003C\u002Foption>)}\n\u003C\u002Fselect>\n\n\u002F\u002F In every slide — unchanged between single and multi-language:\n\u003CPhone src={`${base(\"apple\u002Fiphone\")}\u002Fhome.png`} alt=\"Home\" \u002F>\n```\n\nUse a `\u003Cselect>` rather than inline tabs for locale — it scales cleanly to many languages without overflowing the toolbar.\n\n### Theme Presets\n\n```tsx\nconst THEMES = {\n  \"clean-light\": { bg: \"#F6F1EA\", fg: \"#171717\", accent: \"#5B7CFA\", muted: \"#6B7280\" },\n  \"dark-bold\":   { bg: \"#0B1020\", fg: \"#F8FAFC\", accent: \"#8B5CF6\", muted: \"#94A3B8\" },\n  \"warm-editorial\": { bg: \"#F7E8DA\", fg: \"#2B1D17\", accent: \"#D97706\", muted: \"#7C5A47\" },\n} as const;\n\ntype ThemeId = keyof typeof THEMES;\nconst [themeId, setThemeId] = useState\u003CThemeId>(\"clean-light\");\nconst theme = THEMES[themeId];\n```\n\nUse theme tokens everywhere instead of hardcoded colors.\n\n### Font Setup\n\n```tsx\n\u002F\u002F src\u002Fapp\u002Flayout.tsx\nimport { YourFont } from \"next\u002Ffont\u002Fgoogle\";\nconst font = YourFont({ subsets: [\"latin\"] });\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n  return \u003Chtml>\u003Cbody className={font.className}>{children}\u003C\u002Fbody>\u003C\u002Fhtml>;\n}\n```\n\n## Step 3: Plan the Slides\n\n### Screenshot Framework (Narrative Arc)\n\nAdapt this framework to the user's requested slide count. Not all slots are required — pick what fits:\n\n| Slot | Purpose | Notes |\n|------|---------|-------|\n| #1 | **Hero \u002F Main Benefit** | App icon + tagline + home screen. This is the ONLY one most people see. |\n| #2 | **Differentiator** | What makes this app unique vs competitors |\n| #3 | **Ecosystem** | Widgets, extensions, watch — beyond the main app. Skip if N\u002FA. |\n| #4+ | **Core Features** | One feature per slide, most important first |\n| 2nd to last | **Trust Signal** | Identity\u002Fcraft — \"made for people who [X]\" |\n| Last | **More Features** | Pills listing extras + coming soon. Skip if few features. |\n\n**Rules:**\n- Each slide sells ONE idea. Never two features on one slide.\n- Vary layouts across slides — never repeat the same template structure.\n- Include 1-2 contrast slides (inverted bg) for visual rhythm.\n- **Landscape tablets**: use caption-left + device-right layout. The wide canvas rewards asymmetric composition. Never try two devices side-by-side in landscape — there's not enough room.\n\n## Step 4: Write Copy FIRST\n\nGet all headlines approved before building layouts. Bad copy ruins good design.\n\n### The Iron Rules\n\n1. **One idea per headline.** Never join two things with \"and.\"\n2. **Short, common words.** 1-2 syllables. No jargon unless it's domain-specific.\n3. **3-5 words per line.** Must be readable at thumbnail size in the App Store.\n4. **Line breaks are intentional.** Control where lines break with `\u003Cbr \u002F>`.\n\n### Three Approaches (pick one per slide)\n\n| Type | What it does | Example |\n|------|-------------|---------|\n| **Paint a moment** | You picture yourself doing it | \"Check your coffee without opening the app.\" |\n| **State an outcome** | What your life looks like after | \"A home for every coffee you buy.\" |\n| **Kill a pain** | Name a problem and destroy it | \"Never waste a great bag of coffee.\" |\n\n### What NEVER Works\n\n- **Feature lists as headlines**: \"Log every item with tags, categories, and notes\"\n- **Two ideas joined by \"and\"**: \"Track X and never miss Y\"\n- **Vague aspirational**: \"Every item, tracked\"\n- **Marketing buzzwords**: \"AI-powered tips\" (unless it's actually AI)\n\n### Bad-to-Better Headline Examples\n\n| Weak | Better | Why it wins |\n|------|--------|-------------|\n| Track habits and stay motivated | Keep your streak alive | one idea, faster to parse |\n| Organize tasks with AI summaries | Turn notes into next steps | outcome-first, less jargon |\n| Save recipes with tags and favorites | Find dinner fast | sells the benefit, not the UI |\n| Manage budgets and never miss payments | See where money goes | cleaner promise, no dual claim |\n\n### Copy Process\n\n1. Write 3 options per slide using the three approaches\n2. Read each at arm's length — if you can't parse it in 1 second, it's too complex\n3. Check: does each line have 3-5 words? If not, adjust line breaks\n4. Present options to the user with reasoning for each\n\n### Example Prompt Shapes\n\nIf the user gives a weak or underspecified request, reshape it internally into something like:\n\n```text\nBuild App Store screenshots for my habit tracker.\nThe app helps people stay consistent with simple daily routines.\nI want 6 slides, clean\u002Fminimal style, warm neutrals, and a calm premium feel.\n```\n\n```text\nGenerate App Store screenshots for my personal finance app.\nThe app's main strengths are fast expense capture, clear monthly trends, and shared budgets.\nI want a sharp, modern style with high contrast and 7 slides.\n```\n\n```text\nCreate exportable App Store screenshots for my AI note-taking app.\nThe core value is turning messy voice notes into clean summaries and action items.\nI want bold copy, dark backgrounds, and a polished tech-forward look.\n```\n\nThe pattern is:\n\n1. app category + core outcome\n2. top features in priority order\n3. desired slide count\n4. style direction\n\n### Localization Rules\n\n- Do not literally translate headlines if the result becomes long or awkward — re-write for the target market.\n- Re-check line breaks per locale; German, French, and Portuguese often need shorter claims.\n- For RTL languages (`ar`, `he`, `fa`, `ur`), set `dir=\"rtl\"` on the canvas and mirror asymmetric layouts intentionally.\n\n### Reference Apps for Copy Style\n\n- **Raycast** — specific, descriptive, one concrete value per slide\n- **Turf** — ultra-simple action verbs, conversational\n- **Mela \u002F Notion** — warm, minimal, elegant\n\n## Step 5: Build the Page\n\n### Architecture\n\n```\npage.tsx\n├── Constants (canvas dimensions, export sizes, frame ratios)\n├── Width formula functions (phoneW, tabletPW, tabletLW, ipadW)\n├── LOCALES \u002F RTL_LOCALES \u002F THEMES \u002F COPY_BY_LOCALE\n├── Image preload cache (preloadAllImages + img() helper)\n├── Device frame components:\n│   ├── Phone          — iPhone (mockup.png + pre-measured overlay)\n│   ├── AndroidPhone   — Android phone (CSS-only)\n│   ├── AndroidTabletP — Android tablet portrait (CSS-only)\n│   ├── AndroidTabletL — Android tablet landscape (CSS-only)\n│   └── IPad           — iPad (CSS-only)\n├── Caption component (label + headline, scales from canvasW)\n├── Decorative components (blobs, glows — based on style direction)\n├── Slide components (makeSlide1..N factories for portrait,\n│                     makeTabLSlide1..N factories for landscape)\n├── Slide registries (IPHONE_SLIDES, ANDROID_SLIDES, ANDROID_7P_SLIDES,\n│   ANDROID_7L_SLIDES, ANDROID_10P_SLIDES, ANDROID_10L_SLIDES, IPAD_SLIDES)\n├── ScreenshotPreview  — ResizeObserver scaling + hover export\n└── ScreenshotsPage    — grid + toolbar + export logic\n```\n\n### Canvas Dimensions\n\nDesign at the **largest** required resolution for each device category. Smaller sizes are achieved by re-rendering at the target resolution on export.\n\n```typescript\n\u002F\u002F Apple\nconst W      = 1320;  const H      = 2868; \u002F\u002F iPhone (6.9\" — largest required)\nconst IPAD_W = 2064;  const IPAD_H = 2752; \u002F\u002F iPad 13\" — largest required\n\n\u002F\u002F Android phone\nconst AW     = 1080;  const AH     = 1920; \u002F\u002F Android phone\n\n\u002F\u002F Android tablet — portrait\nconst AT7P_W  = 1200; const AT7P_H  = 1920; \u002F\u002F 7\" portrait\nconst AT10P_W = 1600; const AT10P_H = 2560; \u002F\u002F 10\" portrait\n\n\u002F\u002F Android tablet — landscape\nconst AT7L_W  = 1920; const AT7L_H  = 1200; \u002F\u002F 7\" landscape\nconst AT10L_W = 2560; const AT10L_H = 1600; \u002F\u002F 10\" landscape\n\n\u002F\u002F Feature Graphic\nconst FGW = 1024; const FGH = 500;\n```\n\n### Export Sizes\n\n#### iPhone (Apple required, portrait)\n\n```typescript\nconst IPHONE_SIZES = [\n  { label: '6.9\"', w: 1320, h: 2868 },\n  { label: '6.5\"', w: 1284, h: 2778 },\n  { label: '6.3\"', w: 1206, h: 2622 },\n  { label: '6.1\"', w: 1125, h: 2436 },\n] as const;\n```\n\n#### iPad (Apple required, portrait)\n\n```typescript\nconst IPAD_SIZES = [\n  { label: '13\" iPad',     w: 2064, h: 2752 },\n  { label: '12.9\" iPad Pro', w: 2048, h: 2732 },\n] as const;\n```\n\n#### Android (Google Play recommended)\n\n```typescript\nconst ANDROID_SIZES    = [{ label: \"Phone\",           w: 1080, h: 1920 }] as const;\nconst ANDROID_7P_SIZES = [{ label: '7\" Portrait',     w: 1200, h: 1920 }] as const;\nconst ANDROID_7L_SIZES = [{ label: '7\" Landscape',    w: 1920, h: 1200 }] as const;\nconst ANDROID_10P_SIZES= [{ label: '10\" Portrait',    w: 1600, h: 2560 }] as const;\nconst ANDROID_10L_SIZES= [{ label: '10\" Landscape',   w: 2560, h: 1600 }] as const;\nconst FG_SIZES         = [{ label: \"Feature Graphic\", w: 1024, h:  500 }] as const;\n```\n\n### Device Type\n\n```typescript\ntype Device = \"iphone\" | \"android\" | \"android-7\" | \"android-10\" | \"ipad\" | \"feature-graphic\";\ntype Orientation = \"portrait\" | \"landscape\";\n```\n\n### Frame Aspect Ratios\n\n```typescript\nconst MK_RATIO   = 1022 \u002F 2082; \u002F\u002F iPhone mockup (width\u002Fheight)\nconst TAB_P_RATIO = 0.667;       \u002F\u002F tablet portrait frame (5:8 screen)\nconst TAB_L_RATIO = 1.5;         \u002F\u002F tablet landscape frame (8:5 screen)\nconst IPAD_RATIO  = 0.770;       \u002F\u002F iPad frame (770\u002F1000)\n```\n\n### Width Formula Functions\n\nThese functions determine how wide to render a device frame relative to the canvas. They auto-scale so the device fills the canvas proportionally regardless of canvas aspect ratio:\n\n```typescript\ntype WidthFn = (cW: number, cH: number) => number;\n\n\u002F\u002F Returns a fraction of canvas width (0–1)\nfunction phoneW(cW: number, cH: number, clamp = 0.84) {\n  return Math.min(clamp, 0.72 * (cH \u002F cW) * MK_RATIO);\n}\nfunction phoneW2(cW: number, cH: number) { return phoneW(cW, cH, 0.66); } \u002F\u002F smaller, for two-phone slides\n\nfunction tabletPW(cW: number, cH: number, clamp = 0.80) {\n  return Math.min(clamp, 0.72 * (cH \u002F cW) * TAB_P_RATIO);\n}\nfunction tabletPW2(cW: number, cH: number) { return tabletPW(cW, cH, 0.64); }\n\nfunction tabletLW(cW: number, cH: number, clamp = 0.62) {\n  return Math.min(clamp, 0.75 * (cH \u002F cW) * TAB_L_RATIO);\n}\n\nfunction ipadW(cW: number, cH: number, clamp = 0.75) {\n  return Math.min(clamp, 0.72 * (cH \u002F cW) * IPAD_RATIO);\n}\nfunction ipadW2(cW: number, cH: number) { return ipadW(cW, cH, 0.60); }\n```\n\nUsage: `width: \\`${phoneW(cW, cH) * 100}%\\``\n\n### Rendering Strategy\n\nEach screenshot is designed at full resolution. Two copies exist:\n\n1. **Preview**: CSS `transform: scale()` via `ResizeObserver` to fit a grid card\n2. **Export**: Offscreen at `position: absolute; left: -9999px` at true resolution\n\n**Critical:** Wrap the entire page in `overflowX: \"hidden\"` to prevent offscreen export elements from causing horizontal scroll:\n\n```tsx\n\u003Cdiv style={{ minHeight: \"100vh\", background: \"#f3f4f6\", position: \"relative\", overflowX: \"hidden\" }}>\n```\n\n### Device Frame Components\n\n#### iPhone (PNG mockup)\n\nThe included `mockup.png` has these pre-measured values:\n\n```typescript\nconst MK_W = 1022; const MK_H = 2082;\nconst SC_L  = (52   \u002F MK_W) * 100;  \u002F\u002F screen left %\nconst SC_T  = (46   \u002F MK_H) * 100;  \u002F\u002F screen top %\nconst SC_W  = (918  \u002F MK_W) * 100;  \u002F\u002F screen width %\nconst SC_H  = (1990 \u002F MK_H) * 100;  \u002F\u002F screen height %\nconst SC_RX = (126  \u002F 918)  * 100;  \u002F\u002F border-radius x %\nconst SC_RY = (126  \u002F 1990) * 100;  \u002F\u002F border-radius y %\n```\n\n```tsx\nfunction Phone({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: `${MK_W}\u002F${MK_H}`, ...style }}>\n      \u003Cimg src={img(\"\u002Fmockup.png\")} alt=\"\" style={{ display: \"block\", width: \"100%\", height: \"100%\" }} draggable={false} \u002F>\n      \u003Cdiv style={{\n        position: \"absolute\", zIndex: 10, overflow: \"hidden\",\n        left: `${SC_L}%`, top: `${SC_T}%`, width: `${SC_W}%`, height: `${SC_H}%`,\n        borderRadius: `${SC_RX}% \u002F ${SC_RY}%`,\n      }}>\n        \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n#### Android Phone (CSS-only)\n\n```tsx\nfunction AndroidPhone({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: \"9\u002F19.5\", ...style }}>\n      \u003Cdiv style={{\n        width: \"100%\", height: \"100%\",\n        borderRadius: \"8% \u002F 4%\",\n        background: \"linear-gradient(160deg, #2a2a2e 0%, #18181b 100%)\",\n        boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.08), 0 8px 40px rgba(0,0,0,0.55)\",\n        position: \"relative\", overflow: \"hidden\",\n      }}>\n        {\u002F* Punch-hole camera *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", top: \"1.5%\", left: \"50%\",\n          transform: \"translateX(-50%)\", width: \"3%\", height: \"1.4%\",\n          borderRadius: \"50%\", background: \"#0d0d0f\",\n          border: \"1px solid rgba(255,255,255,0.06)\", zIndex: 20,\n        }} \u002F>\n        {\u002F* Screen *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"3.5%\", top: \"2%\",\n          width: \"93%\", height: \"96%\",\n          borderRadius: \"5.5% \u002F 2.6%\", overflow: \"hidden\", background: \"#000\",\n        }}>\n          \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n#### Android Tablet — Portrait (CSS-only)\n\n```tsx\nfunction AndroidTabletP({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: \"5\u002F8\", ...style }}>\n      \u003Cdiv style={{\n        width: \"100%\", height: \"100%\",\n        borderRadius: \"4.5% \u002F 2.8%\",\n        background: \"linear-gradient(160deg, #2a2a2e 0%, #18181b 100%)\",\n        boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.08), 0 8px 48px rgba(0,0,0,0.6)\",\n        position: \"relative\", overflow: \"hidden\",\n      }}>\n        {\u002F* Camera dot *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", top: \"1.2%\", left: \"50%\",\n          transform: \"translateX(-50%)\", width: \"1.4%\", height: \"0.88%\",\n          borderRadius: \"50%\", background: \"#0d0d0f\",\n          border: \"1px solid rgba(255,255,255,0.07)\", zIndex: 20,\n        }} \u002F>\n        {\u002F* Bezel highlight *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", inset: 0, borderRadius: \"4.5% \u002F 2.8%\",\n          border: \"1px solid rgba(255,255,255,0.05)\", pointerEvents: \"none\", zIndex: 15,\n        }} \u002F>\n        {\u002F* Screen *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"3.5%\", top: \"2.2%\",\n          width: \"93%\", height: \"95.6%\",\n          borderRadius: \"2.5% \u002F 1.6%\", overflow: \"hidden\", background: \"#000\",\n        }}>\n          \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n#### Android Tablet — Landscape (CSS-only)\n\nSame as portrait but with a rotated aspect ratio and camera on the left side:\n\n```tsx\nfunction AndroidTabletL({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: \"8\u002F5\", ...style }}>\n      \u003Cdiv style={{\n        width: \"100%\", height: \"100%\",\n        borderRadius: \"2.8% \u002F 4.5%\",\n        background: \"linear-gradient(160deg, #2a2a2e 0%, #18181b 100%)\",\n        boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.08), 0 8px 48px rgba(0,0,0,0.6)\",\n        position: \"relative\", overflow: \"hidden\",\n      }}>\n        {\u002F* Camera dot — left side in landscape *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"1.2%\", top: \"50%\",\n          transform: \"translateY(-50%)\", width: \"0.88%\", height: \"1.4%\",\n          borderRadius: \"50%\", background: \"#0d0d0f\",\n          border: \"1px solid rgba(255,255,255,0.07)\", zIndex: 20,\n        }} \u002F>\n        \u003Cdiv style={{\n          position: \"absolute\", inset: 0, borderRadius: \"2.8% \u002F 4.5%\",\n          border: \"1px solid rgba(255,255,255,0.05)\", pointerEvents: \"none\", zIndex: 15,\n        }} \u002F>\n        {\u002F* Screen *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"2.2%\", top: \"3.5%\",\n          width: \"95.6%\", height: \"93%\",\n          borderRadius: \"1.6% \u002F 2.5%\", overflow: \"hidden\", background: \"#000\",\n        }}>\n          \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n#### iPad (CSS-only)\n\n**Critical dimension:** Frame aspect ratio must be `770\u002F1000` so the inner screen (92% × 94.4%) matches the 3:4 aspect ratio of iPad screenshots.\n\n```tsx\nfunction IPad({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: \"770\u002F1000\", ...style }}>\n      \u003Cdiv style={{\n        width: \"100%\", height: \"100%\", borderRadius: \"5% \u002F 3.6%\",\n        background: \"linear-gradient(180deg, #2C2C2E 0%, #1C1C1E 100%)\",\n        position: \"relative\", overflow: \"hidden\",\n        boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.1), 0 8px 40px rgba(0,0,0,0.6)\",\n      }}>\n        \u003Cdiv style={{\n          position: \"absolute\", top: \"1.2%\", left: \"50%\",\n          transform: \"translateX(-50%)\", width: \"0.9%\", height: \"0.65%\",\n          borderRadius: \"50%\", background: \"#111113\",\n          border: \"1px solid rgba(255,255,255,0.08)\", zIndex: 20,\n        }} \u002F>\n        \u003Cdiv style={{\n          position: \"absolute\", inset: 0, borderRadius: \"5% \u002F 3.6%\",\n          border: \"1px solid rgba(255,255,255,0.06)\", pointerEvents: \"none\", zIndex: 15,\n        }} \u002F>\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"4%\", top: \"2.8%\",\n          width: \"92%\", height: \"94.4%\",\n          borderRadius: \"2.2% \u002F 1.6%\", overflow: \"hidden\", background: \"#000\",\n        }}>\n          \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n### Slide Factory Pattern\n\nInstead of writing separate slide components for every device, use factory functions. Each factory accepts a device component, its width function, the screenshot base path, and the frame ratio:\n\n```typescript\ntype SlideProps = { cW: number; cH: number; locale: string };\ntype SlideDef   = { id: string; component: (p: SlideProps) => JSX.Element };\ntype PhoneComp  = (p: { src: string; alt: string; style?: React.CSSProperties }) => JSX.Element;\n\nfunction makeSlide1(\n  PhoneComp: PhoneComp,\n  widthFn: WidthFn,\n  basePath: string,\n  _frameRatio: number,\n): SlideDef {\n  return {\n    id: \"hero\",\n    component: ({ cW, cH }) => {\n      const fw = widthFn(cW, cH) * 100;\n      return (\n        \u003Cdiv style={{ width: \"100%\", height: \"100%\", position: \"relative\", background: \"...\", overflow: \"hidden\" }}>\n          \u003CCaption cW={cW} label=\"YOUR APP\" headline={\u003C>\"Sell one\u003Cbr \u002F>idea here.\"\u003C\u002F>} \u002F>\n          \u003CPhoneComp\n            src={img(`\u002F${basePath}\u002Fhome.png`)}\n            alt=\"Home\"\n            style={{\n              position: \"absolute\", bottom: 0,\n              width: `${fw}%`,\n              left: \"50%\", transform: `translateX(-50%) translateY(13%)`,\n            }}\n          \u002F>\n        \u003C\u002Fdiv>\n      );\n    },\n  };\n}\n```\n\nBuild `makeSlide2..N` with the same signature. Then build registries:\n\n```typescript\nconst mkTabP = (base: string) => [\n  makeSlide1(AndroidTabletP, tabletPW, base, TAB_P_RATIO),\n  makeSlide2(AndroidTabletP, tabletPW, base, TAB_P_RATIO),\n  \u002F\u002F ...\n];\nconst mkTabL = (base: string) => [\n  makeTabLSlide1(AndroidTabletL, tabletLW, base),\n  makeTabLSlide2(AndroidTabletL, tabletLW, base),\n  \u002F\u002F ...\n];\n\nconst IPHONE_SLIDES      = [makeSlide1(Phone, phoneW, \"screenshots\u002Fapple\u002Fiphone\", MK_RATIO), ...];\nconst ANDROID_SLIDES     = [makeSlide1(AndroidPhone, phoneW, \"screenshots\u002Fandroid\u002Fphone\", MK_RATIO), ...];\nconst ANDROID_7P_SLIDES  = mkTabP(\"screenshots\u002Fandroid\u002Ftablet-7\u002Fportrait\");\nconst ANDROID_7L_SLIDES  = mkTabL(\"screenshots\u002Fandroid\u002Ftablet-7\u002Flandscape\");\nconst ANDROID_10P_SLIDES = mkTabP(\"screenshots\u002Fandroid\u002Ftablet-10\u002Fportrait\");\nconst ANDROID_10L_SLIDES = mkTabL(\"screenshots\u002Fandroid\u002Ftablet-10\u002Flandscape\");\nconst IPAD_SLIDES        = [makeSlide1(IPad, ipadW, \"screenshots\u002Fapple\u002Fipad\", IPAD_RATIO), ...];\n```\n\n### Landscape Slide Layout\n\nLandscape tablet canvases are wide (e.g. 2560×1600). Use a **caption-left + device-right** layout. Never try two devices side-by-side — there isn't enough room.\n\n```tsx\nfunction makeTabLSlide1(PhoneComp: PhoneComp, widthFn: WidthFn, basePath: string): SlideDef {\n  return {\n    id: \"hero-landscape\",\n    component: ({ cW, cH }) => {\n      const fw = widthFn(cW, cH) * 100;\n      return (\n        \u003Cdiv style={{ width: \"100%\", height: \"100%\", position: \"relative\", background: \"...\", overflow: \"hidden\" }}>\n          {\u002F* Caption — left 34% of canvas *\u002F}\n          \u003Cdiv style={{ position: \"absolute\", top: \"50%\", left: \"5%\", width: \"34%\", transform: \"translateY(-50%)\" }}>\n            \u003CCaption cW={cW} label=\"FEATURE\" headline={\u003C>\"One idea\u003Cbr \u002F>per slide.\"\u003C\u002F>} \u002F>\n          \u003C\u002Fdiv>\n          {\u002F* Device — right side *\u002F}\n          \u003CPhoneComp\n            src={img(`\u002F${basePath}\u002Fhome.png`)}\n            alt=\"Home\"\n            style={{\n              position: \"absolute\",\n              right: \"-3%\",\n              top: \"50%\",\n              width: `${fw}%`,\n              transform: \"translateY(-50%)\",\n            }}\n          \u002F>\n        \u003C\u002Fdiv>\n      );\n    },\n  };\n}\n```\n\n### Feature Graphic Component\n\nThe Feature Graphic is a **1024×500 landscape banner** shown at the top of the Google Play store listing. It has no device frame — it's a pure graphic with the app name, tagline, icon, and decorative elements.\n\n```tsx\nfunction FeatureGraphicSlide({ cW, cH }: { cW: number; cH: number }) {\n  return (\n    \u003Cdiv style={{\n      width: \"100%\", height: \"100%\", position: \"relative\", overflow: \"hidden\",\n      background: \"linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%)\",\n      display: \"flex\", alignItems: \"center\", justifyContent: \"space-between\",\n      padding: `0 ${cW * 0.06}px`,\n    }}>\n      {\u002F* Left: app icon + name + tagline *\u002F}\n      \u003Cdiv style={{ display: \"flex\", alignItems: \"center\", gap: cW * 0.03 }}>\n        \u003Cimg src={img(\"\u002Fapp-icon.png\")} alt=\"App Icon\"\n          style={{ width: cW * 0.12, height: cW * 0.12, borderRadius: cW * 0.022 }}\n          draggable={false} \u002F>\n        \u003Cdiv>\n          \u003Cdiv style={{ fontSize: cW * 0.05, fontWeight: 800, color: \"#fff\", lineHeight: 1.1 }}>AppName\u003C\u002Fdiv>\n          \u003Cdiv style={{ fontSize: cW * 0.025, color: \"rgba(255,255,255,0.7)\", marginTop: cW * 0.008 }}>Your tagline here.\u003C\u002Fdiv>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n      {\u002F* Right: decorative \u002F supporting visual *\u002F}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n### Device Resolution Dispatch\n\nIn the main component, derive canvas dimensions, export sizes, and slide registry from the current device + orientation state:\n\n```typescript\nconst { cW, cH, currentSizes, slides } = (() => {\n  if (device === \"android-7\") {\n    return orientation === \"landscape\"\n      ? { cW: AT7L_W,  cH: AT7L_H,  currentSizes: ANDROID_7L_SIZES,  slides: ANDROID_7L_SLIDES }\n      : { cW: AT7P_W,  cH: AT7P_H,  currentSizes: ANDROID_7P_SIZES,  slides: ANDROID_7P_SLIDES };\n  }\n  if (device === \"android-10\") {\n    return orientation === \"landscape\"\n      ? { cW: AT10L_W, cH: AT10L_H, currentSizes: ANDROID_10L_SIZES, slides: ANDROID_10L_SLIDES }\n      : { cW: AT10P_W, cH: AT10P_H, currentSizes: ANDROID_10P_SIZES, slides: ANDROID_10P_SLIDES };\n  }\n  if (device === \"android\")         return { cW: AW,     cH: AH,     currentSizes: ANDROID_SIZES,   slides: ANDROID_SLIDES };\n  if (device === \"ipad\")            return { cW: IPAD_W, cH: IPAD_H, currentSizes: IPAD_SIZES,      slides: IPAD_SLIDES };\n  if (device === \"feature-graphic\") return { cW: FGW,    cH: FGH,    currentSizes: FG_SIZES,        slides: [FG_SLIDE] };\n  return { cW: W, cH: H, currentSizes: IPHONE_SIZES, slides: IPHONE_SLIDES };\n})();\n```\n\n### Toolbar Layout\n\nThe toolbar has two sections: a **scrollable controls area** (left, `flex: 1`) and a **fixed export button** (right, always visible). Never wrap them in a single scrollable row — the button must always be reachable.\n\n```tsx\n{\u002F* Toolbar *\u002F}\n\u003Cdiv style={{ position: \"sticky\", top: 0, zIndex: 50, background: \"white\", borderBottom: \"1px solid #e5e7eb\", display: \"flex\", alignItems: \"center\" }}>\n\n  {\u002F* Scrollable controls *\u002F}\n  \u003Cdiv style={{ flex: 1, display: \"flex\", alignItems: \"center\", gap: 10, padding: \"10px 16px\", overflowX: \"auto\", minWidth: 0 }}>\n    \u003Cspan style={{ fontWeight: 700, fontSize: 14, whiteSpace: \"nowrap\" }}>My App · Screenshots\u003C\u002Fspan>\n\n    {\u002F* Locale *\u002F}\n    \u003Cselect value={locale} onChange={e => setLocale(e.target.value as Locale)} style={{ fontSize: 12, border: \"1px solid #e5e7eb\", borderRadius: 6, padding: \"5px 10px\" }}>\n      {LOCALES.map(l => \u003Coption key={l} value={l}>{l.toUpperCase()}\u003C\u002Foption>)}\n    \u003C\u002Fselect>\n\n    {\u002F* Device tabs *\u002F}\n    \u003Cdiv style={{ display: \"flex\", gap: 4, background: \"#f3f4f6\", borderRadius: 8, padding: 4, flexShrink: 0 }}>\n      {([\"iphone\", \"android\", \"ipad\", \"feature-graphic\"] as Device[]).map(d => (\n        \u003Cbutton key={d} onClick={() => { setDevice(d); setSizeIdx(0); }}\n          style={{ padding: \"4px 14px\", borderRadius: 6, border: \"none\", cursor: \"pointer\", fontSize: 12, fontWeight: 600, whiteSpace: \"nowrap\", background: device === d ? \"white\" : \"transparent\", color: device === d ? \"#2563eb\" : \"#6b7280\" }}>\n          {d === \"iphone\" ? \"iPhone\" : d === \"android\" ? \"Android\" : d === \"ipad\" ? \"iPad\" : \"Feature Graphic\"}\n        \u003C\u002Fbutton>\n      ))}\n      {\u002F* Android tablet dropdown — inside the device tab group *\u002F}\n      \u003Cselect\n        value={isTablet ? device : \"\"}\n        onChange={e => { if (e.target.value) { setDevice(e.target.value as Device); setSizeIdx(0); } }}\n        style={{ fontSize: 12, border: \"none\", borderRadius: 6, padding: \"4px 10px\", cursor: \"pointer\", background: isTablet ? \"white\" : \"transparent\", color: isTablet ? \"#2563eb\" : \"#6b7280\" }}>\n        \u003Coption value=\"\" disabled>Android Tab.\u003C\u002Foption>\n        \u003Coption value=\"android-7\">Android 7\"\u003C\u002Foption>\n        \u003Coption value=\"android-10\">Android 10\"\u003C\u002Foption>\n      \u003C\u002Fselect>\n    \u003C\u002Fdiv>\n\n    {\u002F* Orientation — tablets only *\u002F}\n    {isTablet && (\n      \u003Cdiv style={{ display: \"flex\", gap: 4, background: \"#f3f4f6\", borderRadius: 8, padding: 4, flexShrink: 0 }}>\n        {([\"portrait\", \"landscape\"] as Orientation[]).map(o => (\n          \u003Cbutton key={o} onClick={() => { setOrientation(o); setSizeIdx(0); }}\n            style={{ padding: \"4px 12px\", borderRadius: 6, border: \"none\", cursor: \"pointer\", fontSize: 12, fontWeight: 600, background: orientation === o ? \"white\" : \"transparent\", color: orientation === o ? \"#2563eb\" : \"#6b7280\" }}>\n            {o === \"portrait\" ? \"Portrait ↕\" : \"Landscape ↔\"}\n          \u003C\u002Fbutton>\n        ))}\n      \u003C\u002Fdiv>\n    )}\n\n    {\u002F* Export size *\u002F}\n    {device !== \"feature-graphic\" && (\n      \u003Cselect value={sizeIdx} onChange={e => setSizeIdx(Number(e.target.value))} style={{ fontSize: 12, border: \"1px solid #e5e7eb\", borderRadius: 6, padding: \"4px 10px\" }}>\n        {currentSizes.map((s, i) => \u003Coption key={i} value={i}>{s.label} — {s.w}×{s.h}\u003C\u002Foption>)}\n      \u003C\u002Fselect>\n    )}\n  \u003C\u002Fdiv>\n\n  {\u002F* Export button — always at right edge, never scrolls away *\u002F}\n  \u003Cdiv style={{ flexShrink: 0, padding: \"10px 16px\", borderLeft: \"1px solid #e5e7eb\" }}>\n    \u003Cbutton onClick={exportAll} disabled={!!exporting}\n      style={{ padding: \"7px 20px\", background: exporting ? \"#93c5fd\" : \"#2563eb\", color: \"white\", border: \"none\", borderRadius: 8, fontSize: 12, fontWeight: 600, cursor: exporting ? \"default\" : \"pointer\", whiteSpace: \"nowrap\" }}>\n      {exporting ? `Exporting… ${exporting}` : \"Export All\"}\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n```\n\n`isTablet` helper:\n\n```typescript\nconst isTablet = device === \"android-7\" || device === \"android-10\";\n```\n\n### Typography (Resolution-Independent)\n\nAll sizing relative to canvas width `cW`:\n\n| Element | Size | Weight | Line Height |\n|---------|------|--------|-------------|\n| Category label | `cW * 0.028` | 600 | default |\n| Headline | `cW * 0.09` to `cW * 0.1` | 700 | 1.0 |\n| Hero headline | `cW * 0.1` | 700 | 0.92 |\n| Feature Graphic name | `cW * 0.05` | 800 | 1.1 |\n\n### Phone Placement Patterns (Portrait)\n\nVary across slides — NEVER use the same layout twice in a row:\n\n**Centered device** (hero, single-feature):\n```\nbottom: 0, width: \"82-86%\" (phone) \u002F \"70-75%\" (tablet) \u002F \"65-70%\" (iPad)\nleft: \"50%\", transform: \"translateX(-50%) translateY(13%)\"\n```\n\n**Two devices layered** (comparison):\n```\nBack:  left: \"-8%\",  width: \"65%\", rotate(-4deg), opacity: 0.55\nFront: right: \"-4%\", width: \"82%\", translateY(10%)\n```\n\n**Landscape tablet** (always caption-left + device-right):\n```\nCaption: position: absolute, top: 50%, left: 5%, width: 34%, transform: translateY(-50%)\nDevice:  position: absolute, right: \"-3%\", top: 50%, width: fw%, transform: translateY(-50%)\n```\n\n### \"More Features\" Slide (Optional)\n\nDark\u002Fcontrast background with app icon, headline (\"And so much more.\"), and feature pills. Can include a \"Coming Soon\" section with dimmer pills. Works identically across all device types.\n\n## Step 6: Export\n\n### Why html-to-image, NOT html2canvas\n\n`html2canvas` breaks on CSS filters, gradients, drop-shadow, backdrop-filter, and complex clipping. `html-to-image` uses native browser SVG serialization — handles all CSS faithfully.\n\n### Pre-load Images as Data URIs (CRITICAL)\n\n`html-to-image` clones the DOM into an SVG `\u003CforeignObject>`. During cloning it re-fetches every `\u003Cimg>` src. These re-fetches are non-deterministic — some hit the browser cache, some silently fail, causing transparent\u002Fblack rectangles in exports.\n\n**Fix:** Convert all images to base64 data URIs at page load. Use those as `src` everywhere.\n\n```typescript\nconst IMAGE_PATHS = [\n  \"\u002Fmockup.png\",\n  \"\u002Fapp-icon.png\",\n  \"\u002Fscreenshots\u002Fapple\u002Fiphone\u002Fen\u002Fhome.png\",\n  \u002F\u002F ... all images used in any slide across all devices\u002Flocales\n];\n\nconst imageCache: Record\u003Cstring, string> = {};\n\nasync function preloadAllImages() {\n  await Promise.all(IMAGE_PATHS.map(async (path) => {\n    const resp = await fetch(path);\n    const blob = await resp.blob();\n    const dataUrl = await new Promise\u003Cstring>((resolve) => {\n      const reader = new FileReader();\n      reader.onloadend = () => resolve(reader.result as string);\n      reader.readAsDataURL(blob);\n    });\n    imageCache[path] = dataUrl;\n  }));\n}\n\n\u002F\u002F Use in every \u003Cimg> src:\nfunction img(path: string): string {\n  return imageCache[path] || path;\n}\n```\n\nGate rendering on preload completion:\n\n```typescript\nconst [ready, setReady] = useState(false);\nuseEffect(() => { preloadAllImages().then(() => setReady(true)); }, []);\nif (!ready) return \u003Cp>Loading images…\u003C\u002Fp>;\n```\n\n### Export Implementation\n\n```typescript\nimport { toPng } from \"html-to-image\";\n\nasync function captureSlide(el: HTMLElement, w: number, h: number): Promise\u003Cstring> {\n  el.style.left = \"0px\";\n  el.style.opacity = \"1\";\n  el.style.zIndex = \"-1\";\n\n  const opts = { width: w, height: h, pixelRatio: 1, cacheBust: true };\n\n  \u002F\u002F CRITICAL: Double-call — first warms up fonts\u002Fimages, second produces clean output\n  await toPng(el, opts);\n  const dataUrl = await toPng(el, opts);\n\n  el.style.left = \"-9999px\";\n  el.style.opacity = \"\";\n  el.style.zIndex = \"\";\n  return dataUrl;\n}\n```\n\n### Export All (Bulk)\n\n```typescript\nasync function exportAll() {\n  if (device === \"feature-graphic\") { await exportFG(); return; }\n  const size = currentSizes[sizeIdx];\n  for (let i = 0; i \u003C slides.length; i++) {\n    setExporting(`${i + 1}\u002F${slides.length}`);\n    const el = exportRefs.current[i];\n    if (!el) continue;\n    const dataUrl = await captureSlide(el, size.w, size.h);\n    const a = document.createElement(\"a\");\n    a.href = dataUrl;\n    a.download = `${String(i + 1).padStart(2, \"0\")}-${slides[i].id}-${locale}-${size.w}x${size.h}.png`;\n    a.click();\n    await new Promise(r => setTimeout(r, 300));\n  }\n  setExporting(null);\n}\n```\n\n### Key Export Rules\n\n- **Double-call trick**: First `toPng()` loads fonts\u002Fimages lazily. Second produces clean output. Without this, exports are blank.\n- **On-screen for capture**: Temporarily move to `left: 0` before `toPng` — offscreen elements don't render.\n- **Offscreen container**: Use `position: absolute; left: -9999px` (not `fixed`) inside a `overflowX: hidden` wrapper.\n- **300ms delay** between sequential exports — prevents browser throttling.\n- **Numbered filenames**: Zero-padded prefix so files sort correctly: `01-hero-en-1320x2868.png`.\n- **Pre-loaded data URIs**: Always use `img()` helper. Never use raw file paths in slide components.\n- **RGB source images**: Ensure source screenshots are RGB (not RGBA). RGBA PNGs can produce transparent\u002Fblack regions in exports.\n\n## Step 7: Final QA Gate\n\n### Message Quality\n- **One idea per slide**: if a headline sells two ideas, split it or simplify it\n- **First slide is strongest**: the hero slide must communicate the main benefit immediately\n- **Readable in one second**: if you cannot parse it instantly at arm's length, rewrite it\n\n### Visual Quality\n- **No repeated layouts in sequence**: adjacent slides should not feel templated\n- **Landscape slides feel designed**: caption-left + device-right with intentional negative space\n- **Decorative elements support the story**: add energy without covering app UI\n- **Visual rhythm exists**: at least one contrast slide when the set is long enough\n\n### Export Quality\n- **No clipped text or assets** after scaling to export size\n- **Screenshots correctly aligned** inside every device frame\n- **Filenames sort correctly** with zero-padded numeric prefixes\n- **Feature Graphic exports** cleanly at 1024×500 (no device frame)\n- **Theme tokens are applied consistently** across all slides in the same preset\n- **Localized copy still fits** after translation, especially on long-word languages\n- **RTL slides feel designed, not just flipped**\n\n### Hand-off Behavior\n\nWhen you present the finished work:\n\n1. briefly explain the narrative arc across the slides\n2. mention any slides that intentionally use contrast or different layout treatment\n3. call out any assumptions you made about brand tone, copy, or missing assets\n\n## Common Mistakes\n\n| Mistake | Fix |\n|---------|-----|\n| All slides look the same | Vary device position (center, left, right, two-device, no-device) |\n| Landscape slides look broken | Use caption-left + single device-right — never two devices side-by-side |\n| Copy is too complex | \"One second at arm's length\" test |\n| Floating elements block the phone | Move off-screen edges or above the device |\n| Plain white\u002Fblack background | Use gradients — even subtle ones add depth |\n| Headlines use \"and\" | Split into two slides or pick one idea |\n| Export is blank | Use double-call trick; move element on-screen before capture |\n| Phone screens black in export | Images not inlined — use `preloadAllImages()` + `img()` helper |\n| Some slides missing images | Non-deterministic fetch race — same fix as above |\n| Export button scrolls off toolbar | Split toolbar: scrollable controls left (`flex: 1`), fixed button right (`flex-shrink: 0`) |\n| Page has horizontal scroll | Add `overflowX: \"hidden\"` on the outermost wrapper div |\n| Screenshots rejected by App Store | Source PNGs have alpha channel — flatten to RGB (composite onto black) |\n| Android tablet orientation ignored | Derive `cW\u002FcH\u002Fslides` from `device + orientation` combo, not just `device` |\n","# App Store & Google Play Screenshots Generator\n\n## Overview\n\nBuild a Next.js page that renders App Store **and** Google Play screenshots as **advertisements** (not UI showcases) and exports them via `html-to-image` at Apple's and Google's required resolutions. Screenshots are the single most important conversion asset on both stores.\n\nSupported devices out of the box:\n- **iPhone** (portrait) — Apple App Store\n- **iPad** (portrait) — Apple App Store\n- **Android Phone** (portrait) — Google Play\n- **Android Tablet 7\"** (portrait + landscape) — Google Play\n- **Android Tablet 10\"** (portrait + landscape) — Google Play\n- **Feature Graphic** (landscape banner, 1024×500) — Google Play store listing header\n\n## Core Principle\n\n**Screenshots are advertisements, not documentation.** Every screenshot sells one idea. If you're showing UI, you're doing it wrong — you're selling a *feeling*, an *outcome*, or killing a *pain point*.\n\n## Step 1: Ask the User These Questions\n\nBefore writing ANY code, ask the user all of these. Do not proceed until you have answers:\n\n### Required\n\n1. **App screenshots** — \"Where are your app screenshots? (PNG files of actual device captures)\"\n2. **App icon** — \"Where is your app icon PNG?\"\n3. **Brand colors** — \"What are your brand colors? (accent color, text color, background preference)\"\n4. **Font** — \"What font does your app use? (or what font do you want for the screenshots?)\"\n5. **Feature list** — \"List your app's features in priority order. What's the #1 thing your app does?\"\n6. **Number of slides** — \"How many screenshots do you want? (Apple allows up to 10, Google Play up to 8)\"\n7. **Style direction** — \"What style do you want? Examples: warm\u002Forganic, dark\u002Fmoody, clean\u002Fminimal, bold\u002Fcolorful, gradient-heavy, flat. Share App Store screenshot references if you have any.\"\n\n### Optional\n\n8. **Target stores** — \"Are you targeting Apple App Store only, Google Play only, or both? This determines which devices we generate screenshots for.\"\n9. **iPad screenshots** — \"Do you also have iPad screenshots? If so, we'll generate iPad App Store screenshots too (recommended for universal apps).\"\n10. **Android tablet screenshots** — \"Do you have Android tablet screenshots? If yes, what tablet sizes — 7\" and\u002For 10\"? Do you have them in portrait, landscape, or both orientations?\"\n11. **Feature Graphic** — \"Do you want a Google Play Feature Graphic (1024×500 banner shown at the top of your Play Store listing)? This is separate from phone screenshots.\"\n12. **Component assets** — \"Do you have any UI element PNGs (cards, widgets, etc.) you want as floating decorations? If not, that's fine — we'll skip them.\"\n13. **Localized screenshots** — \"Do you want screenshots in multiple languages? This helps your listing rank in regional App Stores even if your app is English-only. If yes: which languages? (e.g. en, de, es, pt, ja, ar, he)\"\n14. **Theme preset system** — \"Do you want one art direction, or reusable visual themes (for example: clean-light, dark-bold, warm-editorial) so you can swap screenshot looks quickly?\"\n15. **Additional instructions** — \"Any specific requirements, constraints, or preferences?\"\n\n### Derived from answers (do NOT ask — decide yourself)\n\nBased on the user's style direction, brand colors, and app aesthetic, decide:\n- **Background style**: gradient direction, colors, whether light or dark base\n- **Decorative elements**: blobs, glows, geometric shapes, or none — match the style\n- **Dark vs light slides**: how many of each, which features suit dark treatment\n- **Typography treatment**: weight, tracking, line height — match the brand personality\n- **Color palette**: derive text colors, secondary colors, shadow tints from the brand colors\n- **Theme preset names**: turn vague style requests into reusable theme ids the user can switch between\n- **RTL behavior**: if any locale is RTL (`ar`, `he`, `fa`, `ur`), mirror layout intentionally instead of just translating the text\n- **Landscape slide layouts**: for tablet landscape slides, use caption-left + device-right composition (never try to fit two tablets side-by-side in landscape — there's not enough horizontal room)\n\n**IMPORTANT:** If the user gives additional instructions at any point during the process, follow them. User instructions always override skill defaults.\n\n## Step 2: Set Up the Project\n\n### Detect Package Manager\n\nCheck what's available, use this priority: **bun > pnpm > yarn > npm**\n\n```bash\n# Check in order\nwhich bun && echo \"use bun\" || which pnpm && echo \"use pnpm\" || which yarn && echo \"use yarn\" || echo \"use npm\"\n```\n\n### Scaffold (if no existing Next.js project)\n\n```bash\n# With bun:\nbunx create-next-app@latest . --typescript --tailwind --app --src-dir --no-eslint --import-alias \"@\u002F*\"\nbun add html-to-image\n\n# With pnpm:\npnpx create-next-app@latest . --typescript --tailwind --app --src-dir --no-eslint --import-alias \"@\u002F*\"\npnpm add html-to-image\n\n# With yarn:\nyarn create next-app . --typescript --tailwind --app --src-dir --no-eslint --import-alias \"@\u002F*\"\nyarn add html-to-image\n\n# With npm:\nnpx create-next-app@latest . --typescript --tailwind --app --src-dir --no-eslint --import-alias \"@\u002F*\"\nnpm install html-to-image\n```\n\n### Copy the Phone Mockup\n\nThe skill includes a pre-measured iPhone mockup at `mockup.png` (co-located with this SKILL.md). Copy it to the project's `public\u002F` directory. All other device frames (Android Phone, Android Tablets, iPad) are rendered with CSS — no additional mockup PNGs needed.\n\n### File Structure\n\n#### iPhone-only app (default)\n\n```\nproject\u002F\n├── public\u002F\n│   ├── mockup.png              # iPhone frame (included with skill)\n│   ├── app-icon.png            # User's app icon\n│   └── screenshots\u002F\n│       ├── en\u002F\n│       │   ├── home.png\n│       │   ├── feature-1.png\n│       │   └── ...\n│       ├── de\u002F\n│       └── {locale}\u002F\n├── src\u002Fapp\u002F\n│   ├── layout.tsx              # Font setup\n│   └── page.tsx                # The screenshot generator (single file)\n└── package.json\n```\n\nIf iPad screenshots are localized too, mirror the same locale structure:\n\n```\n└── screenshots-ipad\u002F\n    ├── en\u002F\n    ├── de\u002F\n    └── {locale}\u002F\n```\n\nSingle-language apps can omit the locale folder entirely — paths become `screenshots\u002Fhome.png`.\n\n#### Multi-platform app (iOS + Android)\n\nWhen the user needs both Apple and Android screenshots, use a platform-based structure so every device's images are clearly separated:\n\n```\n└── screenshots\u002F\n    ├── apple\u002F\n    │   ├── iphone\u002F\n    │   │   ├── en\u002F\n    │   │   └── {locale}\u002F\n    │   └── ipad\u002F\n    │       ├── en\u002F\n    │       └── {locale}\u002F\n    └── android\u002F\n        ├── phone\u002F\n        │   ├── en\u002F\n        │   └── {locale}\u002F\n        ├── tablet-7\u002F\n        │   ├── portrait\u002F\n        │   │   └── {locale}\u002F\n        │   └── landscape\u002F\n        │       └── {locale}\u002F\n        └── tablet-10\u002F\n            ├── portrait\u002F\n            │   └── {locale}\u002F\n            └── landscape\u002F\n                └── {locale}\u002F\n```\n\n**Only create subdirectories for devices the user actually has screenshots for.** An empty directory will cause broken image placeholders in the generator.\n\n**Use the iPhone-only structure by default.** Switch to the platform-based structure only when the user confirms they're targeting Android as well.\n\n**The entire generator is a single `page.tsx` file.** No routing, no extra layouts, no API routes.\n\n### Multi-language: Locale Select\n\nAdd a `LOCALES` array and a `\u003Cselect>` locale picker to the toolbar. Every slide src uses a `base` variable — no hardcoded locale paths:\n\n```tsx\nconst LOCALES = [\"en\", \"de\", \"es\", \"tr\"] as const; \u002F\u002F use whatever langs were defined\ntype Locale = typeof LOCALES[number];\n\n\u002F\u002F In ScreenshotsPage:\nconst [locale, setLocale] = useState\u003CLocale>(\"en\");\n\u002F\u002F base is derived per-device from locale:\nconst base = (platform: string) => `\u002Fscreenshots\u002F${platform}\u002F${locale}`;\n\n\u002F\u002F Toolbar:\n\u003Cselect value={locale} onChange={e => setLocale(e.target.value as Locale)}>\n  {LOCALES.map(l => \u003Coption key={l} value={l}>{l.toUpperCase()}\u003C\u002Foption>)}\n\u003C\u002Fselect>\n\n\u002F\u002F In every slide — unchanged between single and multi-language:\n\u003CPhone src={`${base(\"apple\u002Fiphone\")}\u002Fhome.png`} alt=\"Home\" \u002F>\n```\n\nUse a `\u003Cselect>` rather than inline tabs for locale — it scales cleanly to many languages without overflowing the toolbar.\n\n### Theme Presets\n\n```tsx\nconst THEMES = {\n  \"clean-light\": { bg: \"#F6F1EA\", fg: \"#171717\", accent: \"#5B7CFA\", muted: \"#6B7280\" },\n  \"dark-bold\":   { bg: \"#0B1020\", fg: \"#F8FAFC\", accent: \"#8B5CF6\", muted: \"#94A3B8\" },\n  \"warm-editorial\": { bg: \"#F7E8DA\", fg: \"#2B1D17\", accent: \"#D97706\", muted: \"#7C5A47\" },\n} as const;\n\ntype ThemeId = keyof typeof THEMES;\nconst [themeId, setThemeId] = useState\u003CThemeId>(\"clean-light\");\nconst theme = THEMES[themeId];\n```\n\nUse theme tokens everywhere instead of hardcoded colors.\n\n### Font Setup\n\n```tsx\n\u002F\u002F src\u002Fapp\u002Flayout.tsx\nimport { YourFont } from \"next\u002Ffont\u002Fgoogle\";\nconst font = YourFont({ subsets: [\"latin\"] });\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n  return \u003Chtml>\u003Cbody className={font.className}>{children}\u003C\u002Fbody>\u003C\u002Fhtml>;\n}\n```\n\n## Step 3: Plan the Slides\n\n### Screenshot Framework (Narrative Arc)\n\nAdapt this framework to the user's requested slide count. Not all slots are required — pick what fits:\n\n| Slot | Purpose | Notes |\n|------|---------|-------|\n| #1 | **Hero \u002F Main Benefit** | App icon + tagline + home screen. This is the ONLY one most people see. |\n| #2 | **Differentiator** | What makes this app unique vs competitors |\n| #3 | **Ecosystem** | Widgets, extensions, watch — beyond the main app. Skip if N\u002FA. |\n| #4+ | **Core Features** | One feature per slide, most important first |\n| 2nd to last | **Trust Signal** | Identity\u002Fcraft — \"made for people who [X]\" |\n| Last | **More Features** | Pills listing extras + coming soon. Skip if few features. |\n\n**Rules:**\n- Each slide sells ONE idea. Never two features on one slide.\n- Vary layouts across slides — never repeat the same template structure.\n- Include 1-2 contrast slides (inverted bg) for visual rhythm.\n- **Landscape tablets**: use caption-left + device-right layout. The wide canvas rewards asymmetric composition. Never try two devices side-by-side in landscape — there's not enough room.\n\n## Step 4: Write Copy FIRST\n\nGet all headlines approved before building layouts. Bad copy ruins good design.\n\n### The Iron Rules\n\n1. **One idea per headline.** Never join two things with \"and.\"\n2. **Short, common words.** 1-2 syllables. No jargon unless it's domain-specific.\n3. **3-5 words per line.** Must be readable at thumbnail size in the App Store.\n4. **Line breaks are intentional.** Control where lines break with `\u003Cbr \u002F>`.\n\n### Three Approaches (pick one per slide)\n\n| Type | What it does | Example |\n|------|-------------|---------|\n| **Paint a moment** | You picture yourself doing it | \"Check your coffee without opening the app.\" |\n| **State an outcome** | What your life looks like after | \"A home for every coffee you buy.\" |\n| **Kill a pain** | Name a problem and destroy it | \"Never waste a great bag of coffee.\" |\n\n### What NEVER Works\n\n- **Feature lists as headlines**: \"Log every item with tags, categories, and notes\"\n- **Two ideas joined by \"and\"**: \"Track X and never miss Y\"\n- **Vague aspirational**: \"Every item, tracked\"\n- **Marketing buzzwords**: \"AI-powered tips\" (unless it's actually AI)\n\n### Bad-to-Better Headline Examples\n\n| Weak | Better | Why it wins |\n|------|--------|-------------|\n| Track habits and stay motivated | Keep your streak alive | one idea, faster to parse |\n| Organize tasks with AI summaries | Turn notes into next steps | outcome-first, less jargon |\n| Save recipes with tags and favorites | Find dinner fast | sells the benefit, not the UI |\n| Manage budgets and never miss payments | See where money goes | cleaner promise, no dual claim |\n\n### Copy Process\n\n1. Write 3 options per slide using the three approaches\n2. Read each at arm's length — if you can't parse it in 1 second, it's too complex\n3. Check: does each line have 3-5 words? If not, adjust line breaks\n4. Present options to the user with reasoning for each\n\n### Example Prompt Shapes\n\nIf the user gives a weak or underspecified request, reshape it internally into something like:\n\n```text\nBuild App Store screenshots for my habit tracker.\nThe app helps people stay consistent with simple daily routines.\nI want 6 slides, clean\u002Fminimal style, warm neutrals, and a calm premium feel.\n```\n\n```text\nGenerate App Store screenshots for my personal finance app.\nThe app's main strengths are fast expense capture, clear monthly trends, and shared budgets.\nI want a sharp, modern style with high contrast and 7 slides.\n```\n\n```text\nCreate exportable App Store screenshots for my AI note-taking app.\nThe core value is turning messy voice notes into clean summaries and action items.\nI want bold copy, dark backgrounds, and a polished tech-forward look.\n```\n\nThe pattern is:\n\n1. app category + core outcome\n2. top features in priority order\n3. desired slide count\n4. style direction\n\n### Localization Rules\n\n- Do not literally translate headlines if the result becomes long or awkward — re-write for the target market.\n- Re-check line breaks per locale; German, French, and Portuguese often need shorter claims.\n- For RTL languages (`ar`, `he`, `fa`, `ur`), set `dir=\"rtl\"` on the canvas and mirror asymmetric layouts intentionally.\n\n### Reference Apps for Copy Style\n\n- **Raycast** — specific, descriptive, one concrete value per slide\n- **Turf** — ultra-simple action verbs, conversational\n- **Mela \u002F Notion** — warm, minimal, elegant\n\n## Step 5: Build the Page\n\n### Architecture\n\n```\npage.tsx\n├── Constants (canvas dimensions, export sizes, frame ratios)\n├── Width formula functions (phoneW, tabletPW, tabletLW, ipadW)\n├── LOCALES \u002F RTL_LOCALES \u002F THEMES \u002F COPY_BY_LOCALE\n├── Image preload cache (preloadAllImages + img() helper)\n├── Device frame components:\n│   ├── Phone          — iPhone (mockup.png + pre-measured overlay)\n│   ├── AndroidPhone   — Android phone (CSS-only)\n│   ├── AndroidTabletP — Android tablet portrait (CSS-only)\n│   ├── AndroidTabletL — Android tablet landscape (CSS-only)\n│   └── IPad           — iPad (CSS-only)\n├── Caption component (label + headline, scales from canvasW)\n├── Decorative components (blobs, glows — based on style direction)\n├── Slide components (makeSlide1..N factories for portrait,\n│                     makeTabLSlide1..N factories for landscape)\n├── Slide registries (IPHONE_SLIDES, ANDROID_SLIDES, ANDROID_7P_SLIDES,\n│   ANDROID_7L_SLIDES, ANDROID_10P_SLIDES, ANDROID_10L_SLIDES, IPAD_SLIDES)\n├── ScreenshotPreview  — ResizeObserver scaling + hover export\n└── ScreenshotsPage    — grid + toolbar + export logic\n```\n\n### Canvas Dimensions\n\nDesign at the **largest** required resolution for each device category. Smaller sizes are achieved by re-rendering at the target resolution on export.\n\n```typescript\n\u002F\u002F Apple\nconst W      = 1320;  const H      = 2868; \u002F\u002F iPhone (6.9\" — largest required)\nconst IPAD_W = 2064;  const IPAD_H = 2752; \u002F\u002F iPad 13\" — largest required\n\n\u002F\u002F Android phone\nconst AW     = 1080;  const AH     = 1920; \u002F\u002F Android phone\n\n\u002F\u002F Android tablet — portrait\nconst AT7P_W  = 1200; const AT7P_H  = 1920; \u002F\u002F 7\" portrait\nconst AT10P_W = 1600; const AT10P_H = 2560; \u002F\u002F 10\" portrait\n\n\u002F\u002F Android tablet — landscape\nconst AT7L_W  = 1920; const AT7L_H  = 1200; \u002F\u002F 7\" landscape\nconst AT10L_W = 2560; const AT10L_H = 1600; \u002F\u002F 10\" landscape\n\n\u002F\u002F Feature Graphic\nconst FGW = 1024; const FGH = 500;\n```\n\n### Export Sizes\n\n#### iPhone (Apple required, portrait)\n\n```typescript\nconst IPHONE_SIZES = [\n  { label: '6.9\"', w: 1320, h: 2868 },\n  { label: '6.5\"', w: 1284, h: 2778 },\n  { label: '6.3\"', w: 1206, h: 2622 },\n  { label: '6.1\"', w: 1125, h: 2436 },\n] as const;\n```\n\n#### iPad (Apple required, portrait)\n\n```typescript\nconst IPAD_SIZES = [\n  { label: '13\" iPad',     w: 2064, h: 2752 },\n  { label: '12.9\" iPad Pro', w: 2048, h: 2732 },\n] as const;\n```\n\n#### Android (Google Play recommended)\n\n```typescript\nconst ANDROID_SIZES    = [{ label: \"Phone\",           w: 1080, h: 1920 }] as const;\nconst ANDROID_7P_SIZES = [{ label: '7\" Portrait',     w: 1200, h: 1920 }] as const;\nconst ANDROID_7L_SIZES = [{ label: '7\" Landscape',    w: 1920, h: 1200 }] as const;\nconst ANDROID_10P_SIZES= [{ label: '10\" Portrait',    w: 1600, h: 2560 }] as const;\nconst ANDROID_10L_SIZES= [{ label: '10\" Landscape',   w: 2560, h: 1600 }] as const;\nconst FG_SIZES         = [{ label: \"Feature Graphic\", w: 1024, h:  500 }] as const;\n```\n\n### Device Type\n\n```typescript\ntype Device = \"iphone\" | \"android\" | \"android-7\" | \"android-10\" | \"ipad\" | \"feature-graphic\";\ntype Orientation = \"portrait\" | \"landscape\";\n```\n\n### Frame Aspect Ratios\n\n```typescript\nconst MK_RATIO   = 1022 \u002F 2082; \u002F\u002F iPhone mockup (width\u002Fheight)\nconst TAB_P_RATIO = 0.667;       \u002F\u002F tablet portrait frame (5:8 screen)\nconst TAB_L_RATIO = 1.5;         \u002F\u002F tablet landscape frame (8:5 screen)\nconst IPAD_RATIO  = 0.770;       \u002F\u002F iPad frame (770\u002F1000)\n```\n\n### Width Formula Functions\n\nThese functions determine how wide to render a device frame relative to the canvas. They auto-scale so the device fills the canvas proportionally regardless of canvas aspect ratio:\n\n```typescript\ntype WidthFn = (cW: number, cH: number) => number;\n\n\u002F\u002F Returns a fraction of canvas width (0–1)\nfunction phoneW(cW: number, cH: number, clamp = 0.84) {\n  return Math.min(clamp, 0.72 * (cH \u002F cW) * MK_RATIO);\n}\nfunction phoneW2(cW: number, cH: number) { return phoneW(cW, cH, 0.66); } \u002F\u002F smaller, for two-phone slides\n\nfunction tabletPW(cW: number, cH: number, clamp = 0.80) {\n  return Math.min(clamp, 0.72 * (cH \u002F cW) * TAB_P_RATIO);\n}\nfunction tabletPW2(cW: number, cH: number) { return tabletPW(cW, cH, 0.64); }\n\nfunction tabletLW(cW: number, cH: number, clamp = 0.62) {\n  return Math.min(clamp, 0.75 * (cH \u002F cW) * TAB_L_RATIO);\n}\n\nfunction ipadW(cW: number, cH: number, clamp = 0.75) {\n  return Math.min(clamp, 0.72 * (cH \u002F cW) * IPAD_RATIO);\n}\nfunction ipadW2(cW: number, cH: number) { return ipadW(cW, cH, 0.60); }\n```\n\nUsage: `width: \\`${phoneW(cW, cH) * 100}%\\``\n\n### Rendering Strategy\n\nEach screenshot is designed at full resolution. Two copies exist:\n\n1. **Preview**: CSS `transform: scale()` via `ResizeObserver` to fit a grid card\n2. **Export**: Offscreen at `position: absolute; left: -9999px` at true resolution\n\n**Critical:** Wrap the entire page in `overflowX: \"hidden\"` to prevent offscreen export elements from causing horizontal scroll:\n\n```tsx\n\u003Cdiv style={{ minHeight: \"100vh\", background: \"#f3f4f6\", position: \"relative\", overflowX: \"hidden\" }}>\n```\n\n### Device Frame Components\n\n#### iPhone (PNG mockup)\n\nThe included `mockup.png` has these pre-measured values:\n\n```typescript\nconst MK_W = 1022; const MK_H = 2082;\nconst SC_L  = (52   \u002F MK_W) * 100;  \u002F\u002F screen left %\nconst SC_T  = (46   \u002F MK_H) * 100;  \u002F\u002F screen top %\nconst SC_W  = (918  \u002F MK_W) * 100;  \u002F\u002F screen width %\nconst SC_H  = (1990 \u002F MK_H) * 100;  \u002F\u002F screen height %\nconst SC_RX = (126  \u002F 918)  * 100;  \u002F\u002F border-radius x %\nconst SC_RY = (126  \u002F 1990) * 100;  \u002F\u002F border-radius y %\n```\n\n```tsx\nfunction Phone({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: `${MK_W}\u002F${MK_H}`, ...style }}>\n      \u003Cimg src={img(\"\u002Fmockup.png\")} alt=\"\" style={{ display: \"block\", width: \"100%\", height: \"100%\" }} draggable={false} \u002F>\n      \u003Cdiv style={{\n        position: \"absolute\", zIndex: 10, overflow: \"hidden\",\n        left: `${SC_L}%`, top: `${SC_T}%`, width: `${SC_W}%`, height: `${SC_H}%`,\n        borderRadius: `${SC_RX}% \u002F ${SC_RY}%`,\n      }}>\n        \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n#### Android Phone (CSS-only)\n\n```tsx\nfunction AndroidPhone({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: \"9\u002F19.5\", ...style }}>\n      \u003Cdiv style={{\n        width: \"100%\", height: \"100%\",\n        borderRadius: \"8% \u002F 4%\",\n        background: \"linear-gradient(160deg, #2a2a2e 0%, #18181b 100%)\",\n        boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.08), 0 8px 40px rgba(0,0,0,0.55)\",\n        position: \"relative\", overflow: \"hidden\",\n      }}>\n        {\u002F* Punch-hole camera *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", top: \"1.5%\", left: \"50%\",\n          transform: \"translateX(-50%)\", width: \"3%\", height: \"1.4%\",\n          borderRadius: \"50%\", background: \"#0d0d0f\",\n          border: \"1px solid rgba(255,255,255,0.06)\", zIndex: 20,\n        }} \u002F>\n        {\u002F* Screen *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"3.5%\", top: \"2%\",\n          width: \"93%\", height: \"96%\",\n          borderRadius: \"5.5% \u002F 2.6%\", overflow: \"hidden\", background: \"#000\",\n        }}>\n          \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n#### Android Tablet — Portrait (CSS-only)\n\n```tsx\nfunction AndroidTabletP({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: \"5\u002F8\", ...style }}>\n      \u003Cdiv style={{\n        width: \"100%\", height: \"100%\",\n        borderRadius: \"4.5% \u002F 2.8%\",\n        background: \"linear-gradient(160deg, #2a2a2e 0%, #18181b 100%)\",\n        boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.08), 0 8px 48px rgba(0,0,0,0.6)\",\n        position: \"relative\", overflow: \"hidden\",\n      }}>\n        {\u002F* Camera dot *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", top: \"1.2%\", left: \"50%\",\n          transform: \"translateX(-50%)\", width: \"1.4%\", height: \"0.88%\",\n          borderRadius: \"50%\", background: \"#0d0d0f\",\n          border: \"1px solid rgba(255,255,255,0.07)\", zIndex: 20,\n        }} \u002F>\n        {\u002F* Bezel highlight *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", inset: 0, borderRadius: \"4.5% \u002F 2.8%\",\n          border: \"1px solid rgba(255,255,255,0.05)\", pointerEvents: \"none\", zIndex: 15,\n        }} \u002F>\n        {\u002F* Screen *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"3.5%\", top: \"2.2%\",\n          width: \"93%\", height: \"95.6%\",\n          borderRadius: \"2.5% \u002F 1.6%\", overflow: \"hidden\", background: \"#000\",\n        }}>\n          \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n#### Android Tablet — Landscape (CSS-only)\n\nSame as portrait but with a rotated aspect ratio and camera on the left side:\n\n```tsx\nfunction AndroidTabletL({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: \"8\u002F5\", ...style }}>\n      \u003Cdiv style={{\n        width: \"100%\", height: \"100%\",\n        borderRadius: \"2.8% \u002F 4.5%\",\n        background: \"linear-gradient(160deg, #2a2a2e 0%, #18181b 100%)\",\n        boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.08), 0 8px 48px rgba(0,0,0,0.6)\",\n        position: \"relative\", overflow: \"hidden\",\n      }}>\n        {\u002F* Camera dot — left side in landscape *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"1.2%\", top: \"50%\",\n          transform: \"translateY(-50%)\", width: \"0.88%\", height: \"1.4%\",\n          borderRadius: \"50%\", background: \"#0d0d0f\",\n          border: \"1px solid rgba(255,255,255,0.07)\", zIndex: 20,\n        }} \u002F>\n        \u003Cdiv style={{\n          position: \"absolute\", inset: 0, borderRadius: \"2.8% \u002F 4.5%\",\n          border: \"1px solid rgba(255,255,255,0.05)\", pointerEvents: \"none\", zIndex: 15,\n        }} \u002F>\n        {\u002F* Screen *\u002F}\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"2.2%\", top: \"3.5%\",\n          width: \"95.6%\", height: \"93%\",\n          borderRadius: \"1.6% \u002F 2.5%\", overflow: \"hidden\", background: \"#000\",\n        }}>\n          \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n#### iPad (CSS-only)\n\n**Critical dimension:** Frame aspect ratio must be `770\u002F1000` so the inner screen (92% × 94.4%) matches the 3:4 aspect ratio of iPad screenshots.\n\n```tsx\nfunction IPad({ src, alt, style }: { src: string; alt: string; style?: React.CSSProperties }) {\n  return (\n    \u003Cdiv style={{ position: \"relative\", aspectRatio: \"770\u002F1000\", ...style }}>\n      \u003Cdiv style={{\n        width: \"100%\", height: \"100%\", borderRadius: \"5% \u002F 3.6%\",\n        background: \"linear-gradient(180deg, #2C2C2E 0%, #1C1C1E 100%)\",\n        position: \"relative\", overflow: \"hidden\",\n        boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.1), 0 8px 40px rgba(0,0,0,0.6)\",\n      }}>\n        \u003Cdiv style={{\n          position: \"absolute\", top: \"1.2%\", left: \"50%\",\n          transform: \"translateX(-50%)\", width: \"0.9%\", height: \"0.65%\",\n          borderRadius: \"50%\", background: \"#111113\",\n          border: \"1px solid rgba(255,255,255,0.08)\", zIndex: 20,\n        }} \u002F>\n        \u003Cdiv style={{\n          position: \"absolute\", inset: 0, borderRadius: \"5% \u002F 3.6%\",\n          border: \"1px solid rgba(255,255,255,0.06)\", pointerEvents: \"none\", zIndex: 15,\n        }} \u002F>\n        \u003Cdiv style={{\n          position: \"absolute\", left: \"4%\", top: \"2.8%\",\n          width: \"92%\", height: \"94.4%\",\n          borderRadius: \"2.2% \u002F 1.6%\", overflow: \"hidden\", background: \"#000\",\n        }}>\n          \u003Cimg src={src} alt={alt} style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\", objectPosition: \"top\" }} draggable={false} \u002F>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n### Slide Factory Pattern\n\nInstead of writing separate slide components for every device, use factory functions. Each factory accepts a device component, its width function, the screenshot base path, and the frame ratio:\n\n```typescript\ntype SlideProps = { cW: number; cH: number; locale: string };\ntype SlideDef   = { id: string; component: (p: SlideProps) => JSX.Element };\ntype PhoneComp  = (p: { src: string; alt: string; style?: React.CSSProperties }) => JSX.Element;\n\nfunction makeSlide1(\n  PhoneComp: PhoneComp,\n  widthFn: WidthFn,\n  basePath: string,\n  _frameRatio: number,\n): SlideDef {\n  return {\n    id: \"hero\",\n    component: ({ cW, cH }) => {\n      const fw = widthFn(cW, cH) * 100;\n      return (\n        \u003Cdiv style={{ width: \"100%\", height: \"100%\", position: \"relative\", background: \"...\", overflow: \"hidden\" }}>\n          \u003CCaption cW={cW} label=\"YOUR APP\" headline={\u003C>\"Sell one\u003Cbr \u002F>idea here.\"\u003C\u002F>} \u002F>\n          \u003CPhoneComp\n            src={img(`\u002F${basePath}\u002Fhome.png`)}\n            alt=\"Home\"\n            style={{\n              position: \"absolute\", bottom: 0,\n              width: `${fw}%`,\n              left: \"50%\", transform: `translateX(-50%) translateY(13%)`,\n            }}\n          \u002F>\n        \u003C\u002Fdiv>\n      );\n    },\n  };\n}\n```\n\nBuild `makeSlide2..N` with the same signature. Then build registries:\n\n```typescript\nconst mkTabP = (base: string) => [\n  makeSlide1(AndroidTabletP, tabletPW, base, TAB_P_RATIO),\n  makeSlide2(AndroidTabletP, tabletPW, base, TAB_P_RATIO),\n  \u002F\u002F ...\n];\nconst mkTabL = (base: string) => [\n  makeTabLSlide1(AndroidTabletL, tabletLW, base),\n  makeTabLSlide2(AndroidTabletL, tabletLW, base),\n  \u002F\u002F ...\n];\n\nconst IPHONE_SLIDES      = [makeSlide1(Phone, phoneW, \"screenshots\u002Fapple\u002Fiphone\", MK_RATIO), ...];\nconst ANDROID_SLIDES     = [makeSlide1(AndroidPhone, phoneW, \"screenshots\u002Fandroid\u002Fphone\", MK_RATIO), ...];\nconst ANDROID_7P_SLIDES  = mkTabP(\"screenshots\u002Fandroid\u002Ftablet-7\u002Fportrait\");\nconst ANDROID_7L_SLIDES  = mkTabL(\"screenshots\u002Fandroid\u002Ftablet-7\u002Flandscape\");\nconst ANDROID_10P_SLIDES = mkTabP(\"screenshots\u002Fandroid\u002Ftablet-10\u002Fportrait\");\nconst ANDROID_10L_SLIDES = mkTabL(\"screenshots\u002Fandroid\u002Ftablet-10\u002Flandscape\");\nconst IPAD_SLIDES        = [makeSlide1(IPad, ipadW, \"screenshots\u002Fapple\u002Fipad\", IPAD_RATIO), ...];\n```\n\n### Landscape Slide Layout\n\nLandscape tablet canvases are wide (e.g. 2560×1600). Use a **caption-left + device-right** layout. Never try two devices side-by-side — there isn't enough room.\n\n```tsx\nfunction makeTabLSlide1(PhoneComp: PhoneComp, widthFn: WidthFn, basePath: string): SlideDef {\n  return {\n    id: \"hero-landscape\",\n    component: ({ cW, cH }) => {\n      const fw = widthFn(cW, cH) * 100;\n      return (\n        \u003Cdiv style={{ width: \"100%\", height: \"100%\", position: \"relative\", background: \"...\", overflow: \"hidden\" }}>\n          {\u002F* Caption — left 34% of canvas *\u002F}\n          \u003Cdiv style={{ position: \"absolute\", top: \"50%\", left: \"5%\", width: \"34%\", transform: \"translateY(-50%)\" }}>\n            \u003CCaption cW={cW} label=\"FEATURE\" headline={\u003C>\"One idea\u003Cbr \u002F>per slide.\"\u003C\u002F>} \u002F>\n          \u003C\u002Fdiv>\n          {\u002F* Device — right side *\u002F}\n          \u003CPhoneComp\n            src={img(`\u002F${basePath}\u002Fhome.png`)}\n            alt=\"Home\"\n            style={{\n              position: \"absolute\",\n              right: \"-3%\",\n              top: \"50%\",\n              width: `${fw}%`,\n              transform: \"translateY(-50%)\",\n            }}\n          \u002F>\n        \u003C\u002Fdiv>\n      );\n    },\n  };\n}\n```\n\n### Feature Graphic Component\n\nThe Feature Graphic is a **1024×500 landscape banner** shown at the top of the Google Play store listing. It has no device frame — it's a pure graphic with the app name, tagline, icon, and decorative elements.\n\n```tsx\nfunction FeatureGraphicSlide({ cW, cH }: { cW: number; cH: number }) {\n  return (\n    \u003Cdiv style={{\n      width: \"100%\", height: \"100%\", position: \"relative\", overflow: \"hidden\",\n      background: \"linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%)\",\n      display: \"flex\", alignItems: \"center\", justifyContent: \"space-between\",\n      padding: `0 ${cW * 0.06}px`,\n    }}>\n      {\u002F* Left: app icon + name + tagline *\u002F}\n      \u003Cdiv style={{ display: \"flex\", alignItems: \"center\", gap: cW * 0.03 }}>\n        \u003Cimg src={img(\"\u002Fapp-icon.png\")} alt=\"App Icon\"\n          style={{ width: cW * 0.12, height: cW * 0.12, borderRadius: cW * 0.022 }}\n          draggable={false} \u002F>\n        \u003Cdiv>\n          \u003Cdiv style={{ fontSize: cW * 0.05, fontWeight: 800, color: \"#fff\", lineHeight: 1.1 }}>AppName\u003C\u002Fdiv>\n          \u003Cdiv style={{ fontSize: cW * 0.025, color: \"rgba(255,255,255,0.7)\", marginTop: cW * 0.008 }}>Your tagline here.\u003C\u002Fdiv>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n      {\u002F* Right: decorative \u002F supporting visual *\u002F}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n### Device Resolution Dispatch\n\nIn the main component, derive canvas dimensions, export sizes, and slide registry from the current device + orientation state:\n\n```typescript\nconst { cW, cH, currentSizes, slides } = (() => {\n  if (device === \"android-7\") {\n    return orientation === \"landscape\"\n      ? { cW: AT7L_W,  cH: AT7L_H,  currentSizes: ANDROID_7L_SIZES,  slides: ANDROID_7L_SLIDES }\n      : { cW: AT7P_W,  cH: AT7P_H,  currentSizes: ANDROID_7P_SIZES,  slides: ANDROID_7P_SLIDES };\n  }\n  if (device === \"android-10\") {\n    return orientation === \"landscape\"\n      ? { cW: AT10L_W, cH: AT10L_H, currentSizes: ANDROID_10L_SIZES, slides: ANDROID_10L_SLIDES }\n      : { cW: AT10P_W, cH: AT10P_H, currentSizes: ANDROID_10P_SIZES, slides: ANDROID_10P_SLIDES };\n  }\n  if (device === \"android\")         return { cW: AW,     cH: AH,     currentSizes: ANDROID_SIZES,   slides: ANDROID_SLIDES };\n  if (device === \"ipad\")            return { cW: IPAD_W, cH: IPAD_H, currentSizes: IPAD_SIZES,      slides: IPAD_SLIDES };\n  if (device === \"feature-graphic\") return { cW: FGW,    cH: FGH,    currentSizes: FG_SIZES,        slides: [FG_SLIDE] };\n  return { cW: W, cH: H, currentSizes: IPHONE_SIZES, slides: IPHONE_SLIDES };\n})();\n```\n\n### Toolbar Layout\n\nThe toolbar has two sections: a **scrollable controls area** (left, `flex: 1`) and a **fixed export button** (right, always visible). Never wrap them in a single scrollable row — the button must always be reachable.\n\n```tsx\n{\u002F* Toolbar *\u002F}\n\u003Cdiv style={{ position: \"sticky\", top: 0, zIndex: 50, background: \"white\", borderBottom: \"1px solid #e5e7eb\", display: \"flex\", alignItems: \"center\" }}>\n\n  {\u002F* Scrollable controls *\u002F}\n  \u003Cdiv style={{ flex: 1, display: \"flex\", alignItems: \"center\", gap: 10, padding: \"10px 16px\", overflowX: \"auto\", minWidth: 0 }}>\n    \u003Cspan style={{ fontWeight: 700, fontSize: 14, whiteSpace: \"nowrap\" }}>My App · Screenshots\u003C\u002Fspan>\n\n    {\u002F* Locale *\u002F}\n    \u003Cselect value={locale} onChange={e => setLocale(e.target.value as Locale)} style={{ fontSize: 12, border: \"1px solid #e5e7eb\", borderRadius: 6, padding: \"5px 10px\" }}>\n      {LOCALES.map(l => \u003Coption key={l} value={l}>{l.toUpperCase()}\u003C\u002Foption>)}\n    \u003C\u002Fselect>\n\n    {\u002F* Device tabs *\u002F}\n    \u003Cdiv style={{ display: \"flex\", gap: 4, background: \"#f3f4f6\", borderRadius: 8, padding: 4, flexShrink: 0 }}>\n      {([\"iphone\", \"android\", \"ipad\", \"feature-graphic\"] as Device[]).map(d => (\n        \u003Cbutton key={d} onClick={() => { setDevice(d); setSizeIdx(0); }}\n          style={{ padding: \"4px 14px\", borderRadius: 6, border: \"none\", cursor: \"pointer\", fontSize: 12, fontWeight: 600, whiteSpace: \"nowrap\", background: device === d ? \"white\" : \"transparent\", color: device === d ? \"#2563eb\" : \"#6b7280\" }}>\n          {d === \"iphone\" ? \"iPhone\" : d === \"android\" ? \"Android\" : d === \"ipad\" ? \"iPad\" : \"Feature Graphic\"}\n        \u003C\u002Fbutton>\n      ))}\n      {\u002F* Android tablet dropdown — inside the device tab group *\u002F}\n      \u003Cselect\n        value={isTablet ? device : \"\"}\n        onChange={e => { if (e.target.value) { setDevice(e.target.value as Device); setSizeIdx(0); } }}\n        style={{ fontSize: 12, border: \"none\", borderRadius: 6, padding: \"4px 10px\", cursor: \"pointer\", background: isTablet ? \"white\" : \"transparent\", color: isTablet ? \"#2563eb\" : \"#6b7280\" }}>\n        \u003Coption value=\"\" disabled>Android Tab.\u003C\u002Foption>\n        \u003Coption value=\"android-7\">Android 7\"\u003C\u002Foption>\n        \u003Coption value=\"android-10\">Android 10\"\u003C\u002Foption>\n      \u003C\u002Fselect>\n    \u003C\u002Fdiv>\n\n    {\u002F* Orientation — tablets only *\u002F}\n    {isTablet && (\n      \u003Cdiv style={{ display: \"flex\", gap: 4, background: \"#f3f4f6\", borderRadius: 8, padding: 4, flexShrink: 0 }}>\n        {([\"portrait\", \"landscape\"] as Orientation[]).map(o => (\n          \u003Cbutton key={o} onClick={() => { setOrientation(o); setSizeIdx(0); }}\n            style={{ padding: \"4px 12px\", borderRadius: 6, border: \"none\", cursor: \"pointer\", fontSize: 12, fontWeight: 600, background: orientation === o ? \"white\" : \"transparent\", color: orientation === o ? \"#2563eb\" : \"#6b7280\" }}>\n            {o === \"portrait\" ? \"Portrait ↕\" : \"Landscape ↔\"}\n          \u003C\u002Fbutton>\n        ))}\n      \u003C\u002Fdiv>\n    )}\n\n    {\u002F* Export size *\u002F}\n    {device !== \"feature-graphic\" && (\n      \u003Cselect value={sizeIdx} onChange={e => setSizeIdx(Number(e.target.value))} style={{ fontSize: 12, border: \"1px solid #e5e7eb\", borderRadius: 6, padding: \"4px 10px\" }}>\n        {currentSizes.map((s, i) => \u003Coption key={i} value={i}>{s.label} — {s.w}×{s.h}\u003C\u002Foption>)}\n      \u003C\u002Fselect>\n    )}\n  \u003C\u002Fdiv>\n\n  {\u002F* Export button — always at right edge, never scrolls away *\u002F}\n  \u003Cdiv style={{ flexShrink: 0, padding: \"10px 16px\", borderLeft: \"1px solid #e5e7eb\" }}>\n    \u003Cbutton onClick={exportAll} disabled={!!exporting}\n      style={{ padding: \"7px 20px\", background: exporting ? \"#93c5fd\" : \"#2563eb\", color: \"white\", border: \"none\", borderRadius: 8, fontSize: 12, fontWeight: 600, cursor: exporting ? \"default\" : \"pointer\", whiteSpace: \"nowrap\" }}>\n      {exporting ? `Exporting… ${exporting}` : \"Export All\"}\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n```\n\n`isTablet` helper:\n\n```typescript\nconst isTablet = device === \"android-7\" || device === \"android-10\";\n```\n\n### Typography (Resolution-Independent)\n\nAll sizing relative to canvas width `cW`:\n\n| Element | Size | Weight | Line Height |\n|---------|------|--------|-------------|\n| Category label | `cW * 0.028` | 600 | default |\n| Headline | `cW * 0.09` to `cW * 0.1` | 700 | 1.0 |\n| Hero headline | `cW * 0.1` | 700 | 0.92 |\n| Feature Graphic name | `cW * 0.05` | 800 | 1.1 |\n\n### Phone Placement Patterns (Portrait)\n\nVary across slides — NEVER use the same layout twice in a row:\n\n**Centered device** (hero, single-feature):\n```\nbottom: 0, width: \"82-86%\" (phone) \u002F \"70-75%\" (tablet) \u002F \"65-70%\" (iPad)\nleft: \"50%\", transform: \"translateX(-50%) translateY(13%)\"\n```\n\n**Two devices layered** (comparison):\n```\nBack:  left: \"-8%\",  width: \"65%\", rotate(-4deg), opacity: 0.55\nFront: right: \"-4%\", width: \"82%\", translateY(10%)\n```\n\n**Landscape tablet** (always caption-left + device-right):\n```\nCaption: position: absolute, top: 50%, left: 5%, width: 34%, transform: translateY(-50%)\nDevice:  position: absolute, right: \"-3%\", top: 50%, width: fw%, transform: translateY(-50%)\n```\n\n### \"More Features\" Slide (Optional)\n\nDark\u002Fcontrast background with app icon, headline (\"And so much more.\"), and feature pills. Can include a \"Coming Soon\" section with dimmer pills. Works identically across all device types.\n\n## Step 6: Export\n\n### Why html-to-image, NOT html2canvas\n\n`html2canvas` breaks on CSS filters, gradients, drop-shadow, backdrop-filter, and complex clipping. `html-to-image` uses native browser SVG serialization — handles all CSS faithfully.\n\n### Pre-load Images as Data URIs (CRITICAL)\n\n`html-to-image` clones the DOM into an SVG `\u003CforeignObject>`. During cloning it re-fetches every `\u003Cimg>` src. These re-fetches are non-deterministic — some hit the browser cache, some silently fail, causing transparent\u002Fblack rectangles in exports.\n\n**Fix:** Convert all images to base64 data URIs at page load. Use those as `src` everywhere.\n\n```typescript\nconst IMAGE_PATHS = [\n  \"\u002Fmockup.png\",\n  \"\u002Fapp-icon.png\",\n  \"\u002Fscreenshots\u002Fapple\u002Fiphone\u002Fen\u002Fhome.png\",\n  \u002F\u002F ... all images used in any slide across all devices\u002Flocales\n];\n\nconst imageCache: Record\u003Cstring, string> = {};\n\nasync function preloadAllImages() {\n  await Promise.all(IMAGE_PATHS.map(async (path) => {\n    const resp = await fetch(path);\n    const blob = await resp.blob();\n    const dataUrl = await new Promise\u003Cstring>((resolve) => {\n      const reader = new FileReader();\n      reader.onloadend = () => resolve(reader.result as string);\n      reader.readAsDataURL(blob);\n    });\n    imageCache[path] = dataUrl;\n  }));\n}\n\n\u002F\u002F Use in every \u003Cimg> src:\nfunction img(path: string): string {\n  return imageCache[path] || path;\n}\n```\n\nGate rendering on preload completion:\n\n```typescript\nconst [ready, setReady] = useState(false);\nuseEffect(() => { preloadAllImages().then(() => setReady(true)); }, []);\nif (!ready) return \u003Cp>Loading images…\u003C\u002Fp>;\n```\n\n### Export Implementation\n\n```typescript\nimport { toPng } from \"html-to-image\";\n\nasync function captureSlide(el: HTMLElement, w: number, h: number): Promise\u003Cstring> {\n  el.style.left = \"0px\";\n  el.style.opacity = \"1\";\n  el.style.zIndex = \"-1\";\n\n  const opts = { width: w, height: h, pixelRatio: 1, cacheBust: true };\n\n  \u002F\u002F CRITICAL: Double-call — first warms up fonts\u002Fimages, second produces clean output\n  await toPng(el, opts);\n  const dataUrl = await toPng(el, opts);\n\n  el.style.left = \"-9999px\";\n  el.style.opacity = \"\";\n  el.style.zIndex = \"\";\n  return dataUrl;\n}\n```\n\n### Export All (Bulk)\n\n```typescript\nasync function exportAll() {\n  if (device === \"feature-graphic\") { await exportFG(); return; }\n  const size = currentSizes[sizeIdx];\n  for (let i = 0; i \u003C slides.length; i++) {\n    setExporting(`${i + 1}\u002F${slides.length}`);\n    const el = exportRefs.current[i];\n    if (!el) continue;\n    const dataUrl = await captureSlide(el, size.w, size.h);\n    const a = document.createElement(\"a\");\n    a.href = dataUrl;\n    a.download = `${String(i + 1).padStart(2, \"0\")}-${slides[i].id}-${locale}-${size.w}x${size.h}.png`;\n    a.click();\n    await new Promise(r => setTimeout(r, 300));\n  }\n  setExporting(null);\n}\n```\n\n### Key Export Rules\n\n- **Double-call trick**: First `toPng()` loads fonts\u002Fimages lazily. Second produces clean output. Without this, exports are blank.\n- **On-screen for capture**: Temporarily move to `left: 0` before `toPng` — offscreen elements don't render.\n- **Offscreen container**: Use `position: absolute; left: -9999px` (not `fixed`) inside a `overflowX: hidden` wrapper.\n- **300ms delay** between sequential exports — prevents browser throttling.\n- **Numbered filenames**: Zero-padded prefix so files sort correctly: `01-hero-en-1320x2868.png`.\n- **Pre-loaded data URIs**: Always use `img()` helper. Never use raw file paths in slide components.\n- **RGB source images**: Ensure source screenshots are RGB (not RGBA). RGBA PNGs can produce transparent\u002Fblack regions in exports.\n\n## Step 7: Final QA Gate\n\n### Message Quality\n- **One idea per slide**: if a headline sells two ideas, split it or simplify it\n- **First slide is strongest**: the hero slide must communicate the main benefit immediately\n- **Readable in one second**: if you cannot parse it instantly at arm's length, rewrite it\n\n### Visual Quality\n- **No repeated layouts in sequence**: adjacent slides should not feel templated\n- **Landscape slides feel designed**: caption-left + device-right with intentional negative space\n- **Decorative elements support the story**: add energy without covering app UI\n- **Visual rhythm exists**: at least one contrast slide when the set is long enough\n\n### Export Quality\n- **No clipped text or assets** after scaling to export size\n- **Screenshots correctly aligned** inside every device frame\n- **Filenames sort correctly** with zero-padded numeric prefixes\n- **Feature Graphic exports** cleanly at 1024×500 (no device frame)\n- **Theme tokens are applied consistently** across all slides in the same preset\n- **Localized copy still fits** after translation, especially on long-word languages\n- **RTL slides feel designed, not just flipped**\n\n### Hand-off Behavior\n\nWhen you present the finished work:\n\n1. briefly explain the narrative arc across the slides\n2. mention any slides that intentionally use contrast or different layout treatment\n3. call out any assumptions you made about brand tone, copy, or missing assets\n\n## Common Mistakes\n\n| Mistake | Fix |\n|---------|-----|\n| All slides look the same | Vary device position (center, left, right, two-device, no-device) |\n| Landscape slides look broken | Use caption-left + single device-right — never two devices side-by-side |\n| Copy is too complex | \"One second at arm's length\" test |\n| Floating elements block the phone | Move off-screen edges or above the device |\n| Plain white\u002Fblack background | Use gradients — even subtle ones add depth |\n| Headlines use \"and\" | Split into two slides or pick one idea |\n| Export is blank | Use double-call trick; move element on-screen before capture |\n| Phone screens black in export | Images not inlined — use `preloadAllImages()` + `img()` helper |\n| Some slides missing images | Non-deterministic fetch race — same fix as above |\n| Export button scrolls off toolbar | Split toolbar: scrollable controls left (`flex: 1`), fixed button right (`flex-shrink: 0`) |\n| Page has horizontal scroll | Add `overflowX: \"hidden\"` on the outermost wrapper div |\n| Screenshots rejected by App Store | Source PNGs have alpha channel — flatten to RGB (composite onto black) |\n| Android tablet orientation ignored | Derive `cW\u002FcH\u002Fslides` from `device + orientation` combo, not just `device` |\n",{"name":5,"description":7},"main","e7b39d448c7d905feed2b044d3ccdf60822596ab","skills\u002Fapp-store-screenshots",0,"https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter","https:\u002F\u002Fgithub.com\u002Fbarkleesanders","barkleesanders.com","Stay Hungry, Stay Foolish","2026-11-06 08:47:06",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add barkleesanders\u002Fclaude-code-starter --skill app-store-screenshots",{"tool":39,"command":40},"bunx","bunx skills add barkleesanders\u002Fclaude-code-starter --skill app-store-screenshots",{"tool":42,"command":43},"pnpm","pnpm dlx skills add barkleesanders\u002Fclaude-code-starter --skill app-store-screenshots","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fapp-store-screenshots\u002FSKILL.md",true,[],[48,54,61,68,75,82],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7AWV75B37B6YKG7ZKGZ783F","zi-search","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fzi-search\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7AWTZA3JGK1T7V1HS543FG7","visualise","Render inline interactive visuals — SVG diagrams, HTML widgets, charts, and explainers — directly in the conversation. Use this skill whenever the user asks to visualize, diagram, chart, illustrate, or explain something visually, or when an explanation would genuinely benefit from a spatial\u002Finteractive diagram rather than text. Also triggers for: flowcharts, architecture diagrams, data visualizations, interactive explainers, comparison layouts, UI mockups, and any request containing 'show me', 'draw', 'map out', 'visualize', or 'diagram'. Even when the user doesn't explicitly ask for a visual, use this skill proactively when the topic has spatial, sequential, or systemic relationships that a diagram would clarify better than prose.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvisualise\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7AWTR056C3P9R3VS8YVM2WX","video","When the user wants to create, generate, or produce video content using AI tools or programmatic frameworks. Also use when the user mentions 'video production,' 'AI video,' 'Remotion,' 'Hyperframes,' 'HeyGen,' 'Synthesia,' 'Veo,' 'Runway,' 'Kling,' 'Pika,' 'video generation,' 'AI avatar,' 'talking head video,' 'programmatic video,' 'video template,' 'explainer video,' 'product demo video,' 'video pipeline,' or 'make me a video.' Use this for video creation, generation, and production workflows. For video content strategy and what to post, see social-content. For paid video ad creative, see ad-creative.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvideo\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7AWTHTWBMTYZPMHHEYX3TTG","manim-video","Production pipeline for mathematical and technical animations using Manim Community Edition. Creates 3Blue1Brown-style explainer videos, algorithm visualizations, equation derivations, architecture diagrams, and data stories. Use when users request: animated explanations, math animations, concept visualizations, algorithm walkthroughs, technical explainers, 3Blue1Brown style videos, or any programmatic animation with geometric\u002Fmathematical content.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-use\u002Fskills\u002Fmanim-video\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7AWTCXDJ9NWFQW51ENM8A2Z","video-use","Edit any video by conversation. Transcribe, cut, color grade, generate overlay animations, burn subtitles — for talking heads, montages, tutorials, travel, interviews. No presets, no menus. Ask questions, confirm the plan, execute, iterate, persist. Production-correctness rules are hard; everything else is artistic freedom.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-use\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7AWTA1D5FP895S33GHSA2G5","ui-improver","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fui-improver\u002FSKILL.md",[],[]]