Refactor the app, respond in a single ```html block
- Keep the same features and hevaiors
- Make the code more concise but also easier to maintain
- Better organize css. Use css variables. Nesting is allowed (modern css)
- Better organize js. General to specfic. constants first, then main loop, finally pure helpers
- Write concise code with modern syntax, such as inline ternary, arrow functions, destructuring/spreading, but keep whitespace for readability
- Use self-evident naming. Avoid comments unless in unique edge cases