main.game-main {
    padding: 1.5rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 380px;
}

#game-canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #f0f0f0;
    border-radius: 8px;
}

#overlay[hidden] { display: none; }

#overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(250, 250, 250, 0.93);
    border-radius: 8px;
    backdrop-filter: blur(2px);
}

#overlay-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

#overlay-hint {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 0 2rem;
    line-height: 1.5;
}

#overlay-btn {
    background: #111;
    color: #fafafa;
    border: none;
    padding: 0.6rem 1.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

#overlay-btn:hover {
    background: #333;
}

/* Touch strip — only visible on touch devices */

#touch-strip {
    display: none;
    width: 100%;
    max-width: 380px;
    height: 56px;
    background: #f0f0f0;
    border-radius: 8px;
    margin-top: 0.75rem;
    position: relative;
    touch-action: none;
    cursor: none;
}

@media (hover: none) and (pointer: coarse) {
    #touch-strip { display: block; }
}

#touch-strip-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 8px;
    background: #111;
    border-radius: 4px;
    pointer-events: none;
}

/* Debug panel */

#debug-panel {
    width: 100%;
    max-width: 380px;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 0.82rem;
}

#debug-panel h3 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.debug-row {
    display: grid;
    grid-template-columns: 110px 1fr 42px;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.debug-row label {
    color: #333;
}

.debug-row input[type="range"] {
    width: 100%;
    accent-color: #111;
}

.debug-row span {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.debug-readout {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    grid-template-columns: 1fr;
}

#debug-reset-btn {
    margin-top: 0.75rem;
    width: 100%;
    background: #fff;
    color: #111;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

#debug-reset-btn:hover {
    background: #e6e6e6;
}
