/* =========================
   ROOT
========================= */
#heymural-root {
    position: relative;
    width: 100%;
    height: 70vh;
    max-width: 1200px;
    margin: 40px auto;

    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;

    font-family: system-ui, sans-serif;
    user-select: none;
}

/* =========================
   VIEWPORT
========================= */
#heymural-viewport {
    position: relative;
    width: 100%;
    height: 100%;
}

#heymural-viewport.drawing {
    cursor: crosshair;
}

/* =========================
   SVG (DIBUJO)
========================= */
#heymural-svg {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: block;
    pointer-events: auto;
}

/* =========================
   TOOLBAR
========================= */
#heymural-toolbar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;

    display: flex;
    gap: 8px;
    align-items: center;

    background: rgba(30,30,30,0.9);
    padding: 8px 12px;
    border-radius: 999px;
}

/* =========================
   TOOLBAR BUTTONS
========================= */
#heymural-toolbar button {
    background: none;
    border: none;
    color: #9acd32;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
}

#heymural-toolbar button:hover {
    background: rgba(255,255,255,0.08);
}

#heymural-toolbar button.active {
    background: rgba(154,205,50,0.25);
}

#heymural-eraser {
    color: #ff6b6b;
}

#heymural-eraser.active {
    background: rgba(255,107,107,0.25);
}

/* =========================
   INPUTS
========================= */
#heymural-size {
    width: 80px;
}

#heymural-color {
    -webkit-appearance: auto !important;
    appearance: auto !important;

    width: 28px;
    height: 28px;

    padding: 0;
    border: none;
    border-radius: 6px;
    background: none;

    cursor: pointer;
}

/* =========================
   TOOLBAR ICONS (SVG)
========================= */
#heymural-toolbar button svg {
    width: 18px;
    height: 18px;

    stroke: currentColor;
    fill: none;

    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    pointer-events: none;
}

/* =========================
   FULLSCREEN
========================= */
#heymural-root:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
}

#heymural-root:fullscreen #heymural-toolbar {
    top: 20px;
}

/* =========================
   IMAGE WRAPPER (CLAVE)
========================= */
.heymural-image-wrapper {
    position: absolute;
    left: 0;
    top: 0;

    display: inline-block;
    transform-origin: center center;
    cursor: move;
}

/* =========================
   IMAGE
========================= */
.heymural-image {
    position: relative;
    display: block;

    max-width: 300px;
    max-height: 300px;

    user-select: none;
    pointer-events: auto;

    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);

    transition:
        outline 0.15s ease,
        box-shadow 0.15s ease;
}

/* =========================
   IMAGE SELECTED
========================= */
.heymural-image-wrapper.selected .heymural-image {
    outline: 2px solid #9acd32;
    outline-offset: 4px;

    box-shadow:
        0 0 0 2px rgba(154,205,50,0.35),
        0 14px 40px rgba(0,0,0,0.6);
}

/* =========================
   IMAGE HANDLES
========================= */
.heymural-handle {
    position: absolute;
    width: 10px;
    height: 10px;

    background: #9acd32;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #1a1a1a;

    z-index: 10;
    pointer-events: auto;
}

.heymural-handle.nw {
    top: -6px;
    left: -6px;
    cursor: nwse-resize;
}

.heymural-handle.ne {
    top: -6px;
    right: -6px;
    cursor: nesw-resize;
}

.heymural-handle.sw {
    bottom: -6px;
    left: -6px;
    cursor: nesw-