.outer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    height: auto;
    padding: 0 8px 24px;
    box-sizing: border-box;
}

.game-wrapper {
    width: 100%;
    max-width: 900px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.controls .left,
.controls .right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls button,
.controls select {
    border: 1px solid var(--border-color, #ccc);
    background: var(--btn-bg, #f6f6f6);
    color: var(--btn-fg, #222);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.controls button:hover {
    filter: brightness(0.97);
}

#hs-badge {
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--chip-bg, #eef2ff);
    color: var(--chip-fg, #223);
    border: 1px solid var(--chip-border, #cbd5e1);
}

#canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--canvas-border, #1e293b);
    touch-action: manipulation;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: #70c5ce;
}

header ul {
    list-style-type: disc;
    margin-left: 20px;

    text-align: left;
}

@media only screen and (max-width: 767px) {
    * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        touch-action: manipulation;
    }

    header ul {
        list-style-type: none;
        padding-left: 0;

    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .controls .left,
    .controls .right {
        justify-content: space-between;
    }
}


@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }
}


@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .outer {
        max-width: 100%;
    }
}


:root.dark #canvas {
    border-color: #475569;
}

:root.dark .controls button,
:root.dark .controls select {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}

:root.dark #hs-badge {
    background: #0b1220;
    color: #cbd5e1;
    border-color: #1e293b;
}