.color-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

@media (max-width: 900px) {
    .color-container {
        grid-template-columns: 1fr;
    }
}

/* Image Area */
.image-area {
    background: #f7f7fb;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.drop--compact {
    border: 2px dashed #ccc;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    width: 100%;
    max-width: 400px;
}
.drop--compact:hover { border-color: var(--brand); }
.drop--compact input { display: none; }

.canvas-wrap {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    cursor: crosshair;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

/* Magnifier */
.magnifier {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    pointer-events: none; /* Ignore mouse events */
    background-repeat: no-repeat;
    background-color: #fff;
    z-index: 100;
}

/* Results Panel */
.panel-section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.picked-preview {
    display: flex;
    gap: 12px;
    align-items: center;
}

.color-swatch-large {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
}

.picked-info {
    flex: 1;
}

.code-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 6px;
    background: #f8f9fc;
    padding: 4px 8px;
    border-radius: 6px;
}

.code-val {
    font-family: monospace;
    font-weight: 700;
}

.copy-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.6;
}
.copy-btn:hover { opacity: 1; }

/* Palette Grid */
.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    min-height: 50px;
}

.palette-swatch {
    aspect-ratio: 1/1;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.1s;
    position: relative;
}
.palette-swatch:hover {
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 10px;
}

.hidden { display: none !important; }
.mt-4 { margin-top: 20px; }
.mt-3 { margin-top: 15px; }
.mt-2 { margin-top: 10px; }
