    
        .main {
            position: relative;
            width: 100%;
            max-width: 600px;
            margin: 20px auto;
            padding: 0 10px;
        }

        .top,
        .bottom {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin: 15px 0;
            text-align: center;
        }

        .block,
        input,
        select,
        button {
            width: 100%;
            max-width: 300px;
            margin: 0 auto;
        }

        .top>block {
            margin: 5px 0;
        }

        .bottom>button {
            margin: 5px 0;
            width: 100%;
            max-width: 200px;
        }

        .block>p {
            margin: 8px auto;
            width: 80%;
            font-size: 14px;
        }

        .canvas {
            width: 100%;
            height: 300px;
            /* Reduced height for mobile */
            border: 2px solid black;
            display: block;
            touch-action: none;
            background-color: white;
        }
        
        .head {
            text-align: center;
            font-size: 24px;
            margin: 20px auto;
        }

        @media (min-width: 768px) {
            .top,
            .bottom {
                flex-direction: row;
                justify-content: space-between;
            }
            
            .canvas {
                height: 450px;
            }
            
            .head {
                font-size: 30px;
            }
            
            .block>p {
                font-size: 16px;
            }
        } 