/** @jsxImportSource hono/jsx */ import { define, stylesToCSS } from '@because/forge' // --------------------------------------------------------------------------- // Forge components // --------------------------------------------------------------------------- const Page = define('Page', { fontFamily: '-apple-system, system-ui, sans-serif', background: '#111', color: '#fff', height: '100dvh', width: '100vw', display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', overflow: 'hidden', userSelect: 'none', WebkitUserSelect: 'none', position: 'relative', touchAction: 'manipulation', }) const Screen = define('Screen', { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', flex: 1, width: '100%', padding: 20, }) const Title = define('Title', { fontSize: 18, color: '#888', textAlign: 'center', lineHeight: 1.4, }) const GuessDisplay = define('GuessDisplay', { fontSize: 96, fontWeight: 'bold', fontFamily: 'monospace', lineHeight: 1, margin: '24px 0', }) const Controls = define('Controls', { display: 'flex', gap: 12, marginBottom: 24, }) const StepBtn = define('StepBtn', { base: 'button', fontSize: 24, fontWeight: 'bold', width: 64, height: 64, border: 'none', borderRadius: 12, background: '#333', color: '#fff', cursor: 'pointer', WebkitTapHighlightColor: 'transparent', touchAction: 'manipulation', states: { ':active': { background: '#555' } }, }) const GuessBtn = define('GuessBtn', { base: 'button', fontSize: 24, fontWeight: 'bold', padding: '16px 48px', border: 'none', borderRadius: 16, background: '#22c55e', color: '#fff', cursor: 'pointer', WebkitTapHighlightColor: 'transparent', touchAction: 'manipulation', states: { ':active': { background: '#16a34a' } }, }) const HintText = define('HintText', { fontSize: 36, fontWeight: 'bold', marginTop: 32, minHeight: 50, display: 'flex', alignItems: 'center', transition: 'opacity 0.15s ease', }) const VictoryEmoji = define('VictoryEmoji', { fontSize: 64, marginBottom: 16, }) const VictoryText = define('VictoryText', { fontSize: 22, lineHeight: 1.5, textAlign: 'center', padding: '0 20px', maxWidth: 380, }) const StatusBar = define('StatusBar', { position: 'fixed', bottom: 0, left: 0, right: 0, padding: 8, fontSize: 12, color: '#555', textAlign: 'center', }) const VolumeWarning = define('VolumeWarning', { fontSize: 14, color: '#f59e0b', textAlign: 'center', marginTop: 16, padding: '8px 16px', background: 'rgba(245, 158, 11, 0.1)', borderRadius: 8, border: '1px solid rgba(245, 158, 11, 0.3)', }) const ConnectBtn = define('ConnectBtn', { base: 'button', fontSize: 28, fontWeight: 'bold', padding: '20px 48px', border: 'none', borderRadius: 16, background: '#2563eb', color: '#fff', cursor: 'pointer', WebkitTapHighlightColor: 'transparent', touchAction: 'manipulation', states: { ':active': { background: '#1d4ed8' } }, }) const ConnectStatus = define('ConnectStatus', { fontSize: 18, color: '#888', marginTop: 24, textAlign: 'center', }) // --------------------------------------------------------------------------- // Client-side code — real functions, serialized into