.drawpuzzle-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.drawpuzzle-btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid var(--color-border-secondary, #ccc);
    border-radius: var(--border-radius-sm, 4px);
    background: var(--color-background-secondary, #f5f5f5);
    color: var(--color-text-primary, #333);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
}

.drawpuzzle-btn:hover {
    background: var(--color-background-tertiary, #e0e0e0);
}

button.drawpuzzle-btn {
    font-family: inherit;
}

/* Canvas wrapper — needs position:relative so the victory overlay can sit on top */
.drawpuzzle-canvas-wrap {
    position: relative;
    display: inline-block;
    overflow-x: auto;
    max-width: 100%;
}

#puzzleCanvas {
    display: block;
    max-width: 100%;
}

/* Victory overlay — centered inside the canvas wrap */
.drawpuzzle-victory {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 2px;
    pointer-events: auto;
    animation: dp-fadein 0.4s ease;
}

.drawpuzzle-victory-icon {
    font-size: 52px;
    line-height: 1;
}

.drawpuzzle-victory-text {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    letter-spacing: 0.02em;
}

.drawpuzzle-victory .drawpuzzle-btn {
    margin-top: 4px;
    background: #1D9E75;
    border-color: #1D9E75;
    color: #fff;
    font-size: 14px;
    padding: 8px 24px;
}

.drawpuzzle-victory .drawpuzzle-btn:hover {
    background: #178a64;
}

@keyframes dp-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}
