Daily Word mobile: true viewport + flat warm keyboard + height-aware tiles
Make Daily Word feel like a focused mobile app screen, not a page with a keyboard. * True viewport: while view==='play' && game==='word', a $effect locks body scroll and hides the site footer (mobile only), so the keyboard is genuinely pinned, not riding the document scroll. Effect cleanup ALWAYS removes the class on re-run or unmount, so leaving /play (back button OR any navigation) can never strand it. * Keyboard restyled on-brand + modern: flat off-white (--surface) keys with a hairline border, soft 11px radius, no heavy raised shadow, ~46px tall, ↵ / ⌫ glyphs, centered (max-width 430) instead of a full-bleed beige slab. * Tiles now size to fit BOTH width and the height left above the keyboard (--tile = min(cap, width/cols, (100dvh-budget)/rows), gap 4px), so the active row and keyboard are always visible — Long Word's 6×7 gets slightly smaller tiles. Real-device Safari/Chrome is the final check (100dvh + safe-area handling). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -65,3 +65,12 @@ button { font-family: inherit; cursor: pointer; }
|
||||
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
|
||||
.rise { animation: rise 0.5s ease both; }
|
||||
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } html { scroll-behavior: auto; } }
|
||||
|
||||
/* Daily Word on mobile becomes a focused, full-viewport screen: lock body scroll
|
||||
and hide the site footer so the on-screen keyboard is truly pinned (not riding
|
||||
the page's scroll). The .playing-word class is toggled by /play and always
|
||||
removed on navigation via effect cleanup. Mobile only — desktop is unaffected. */
|
||||
@media (max-width: 720px) {
|
||||
html.playing-word, html.playing-word body { overflow: hidden; }
|
||||
html.playing-word footer.site { display: none; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user