/* global React, IOSDevice, IOSStatusBar */ const { useState } = React; // ===================================================================== // Shared chrome: status bar (navy theme, white icons), home indicator // ===================================================================== function ScreenShell({ children, vignette = false, statusDark = false }) { return (
{vignette &&
}
{children}
); } // ===================================================================== // SCREEN 1 — Welcome / Setup Start // ===================================================================== function ScreenWelcome() { return (
Scroll Gambit
01 · 05
Scroll Gambit

Solve a chess puzzle
before you scroll.

Put Instagram behind one quick tactic.

); } // ===================================================================== // SCREEN 2 — Choose App to Block // ===================================================================== const APPS = [ { id: 'ig', name: 'Instagram', sub: 'Recommended first gate', icon: 'ig' }, { id: 'tt', name: 'TikTok', sub: 'Short video', icon: 'tt' }, ]; function AppIcon({ kind, size = 44 }) { const radius = size * 0.27; const common = { width: size, height: size, borderRadius: radius, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, }; if (kind === 'ig') { return (
); } if (kind === 'tt') { return (
TikTok
); } if (kind === 'yt') { return (
); } if (kind === 'x') { return (
); } if (kind === 'rd') { return (
); } return null; } function ScreenChooseApp() { const [selected, setSelected] = useState('ig'); return (
Step 1 of 3

Choose your first scroll gate.

One app to start. You can add more later.

{/* Featured Instagram card */}
setSelected('ig')} className={`sg-card ${selected === 'ig' ? 'sg-card-selected' : ''}`} style={{ display: 'flex', alignItems: 'center', gap: 16, cursor: 'pointer', padding: 18 }} >
Instagram Recommended
Most users gate this one first.
Or pick another
{APPS.slice(1).map(a => (
setSelected(a.id)} className={`sg-card ${selected === a.id ? 'sg-card-selected' : ''}`} style={{ display: 'flex', alignItems: 'center', gap: 14, padding: '12px 14px', cursor: 'pointer', }} >
{a.name}
))}
); } // ===================================================================== // SCREEN 3 — Choose Chess Level + Gate Rules // ===================================================================== const LEVELS = [ { id: 'new', label: 'New to chess', rating: '< 800' }, { id: 'beg', label: 'Beginner', rating: '800–1100' }, { id: 'cas', label: 'Casual player', rating: '1100–1400' }, { id: 'int', label: 'Intermediate', rating: '1400–1700' }, { id: 'str', label: 'Strong player', rating: '1700+' }, { id: 'kn', label: 'I know my rating', rating: 'Enter it' }, ]; function ScreenLevel() { const [level, setLevel] = useState('cas'); return (
Step 2 of 3

How strong are you at chess?

{LEVELS.map(l => (
setLevel(l.id)} className={`sg-chip ${level === l.id ? 'sg-chip-selected' : ''}`} style={{ flexDirection: 'column', alignItems: 'flex-start', gap: 4, padding: '12px 14px' }} >
{l.label}
{l.rating}
))}

Choose your gate

Keep solving to earn more time. Each puzzle gets harder.

{/* Ladder visual */}
{[ { lvl: 'Easy', add: '+5', total: 5, h: 38 }, { lvl: 'Your level', add: '+5', total: 10, h: 60 }, { lvl: 'Harder', add: '+7', total: 17, h: 92 }, ].map((s, i) => (
{s.total}min
{s.lvl}
{s.add}
))}
{/* Rule rows */}
{[ { idx: 1, text: 'Easier than your level', reward: '+5 min' }, { idx: 2, text: 'Your level', reward: '+5 min' }, { idx: 3, text: 'Harder', reward: '+7 min' }, ].map(r => (
{r.idx}
{r.text}
{r.reward}
))}
); } Object.assign(window, { ScreenWelcome, ScreenChooseApp, ScreenLevel, ScreenShell, AppIcon });