#pc-coloring-wrapper {
    font-family: 'Segoe UI', sans-serif; max-width: 1000px; margin: 20px auto;
    background: #fff; border-radius: 8px; padding: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.pc-controls-top { display: flex; justify-content: space-between; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.pc-tools { display: flex; gap: 5px; }
.pc-tool-btn { background: #f0f0f0; border: 1px solid #ccc; padding: 6px 12px; cursor: pointer; border-radius: 4px; font-size: 14px; }
.pc-tool-btn.active { background: #333; color: #fff; border-color: #333; }

.pc-toolbar {
    display: flex; flex-wrap: wrap; gap: 15px; align-items: center; justify-content: space-between;
    margin-bottom: 10px; background: #f8f9fa; padding: 10px; border-radius: 8px; min-height: 50px;
}
.pc-toolbar-section { display: flex; align-items: center; gap: 10px; flex-grow: 1; }
.pc-palette { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-swatch { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 0.1s; }
.pc-swatch:hover { transform: scale(1.1); }
.pc-swatch.active { border-color: #333; transform: scale(1.15); }
.pc-picker-container { position: relative; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2); background: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid #ddd; }
#pcColorPicker { position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; padding: 0; margin: 0; cursor: pointer; opacity: 0; }

/* Stamps */
.pc-stamp-categories { margin-right: 10px; }
.pc-select { padding: 5px; border-radius: 4px; border: 1px solid #ccc; }
.pc-stamp-list { display: flex; gap: 8px; overflow-x: auto; max-width: 500px; padding-bottom: 4px; }
.pc-stamp-item { font-size: 24px; cursor: pointer; padding: 5px; border-radius: 4px; user-select: none; transition: transform 0.2s; }
.pc-stamp-item:hover { background: #e2e6ea; transform: scale(1.2); }

/* Stamp Object on Canvas */
.pc-stamp-object {
    position: absolute; cursor: grab; user-select: none;
    display: flex; align-items: center; justify-content: center;
    border: 2px dashed transparent; /* Hidden by default */
    line-height: 1;
}
.pc-stamp-object.selected { border-color: #333; background: rgba(255,255,255,0.2); cursor: grabbing; z-index: 100; }
.pc-stamp-content { display: block; width: 100%; height: 100%; pointer-events: none; text-align: center; }

/* Sub Controls */
.pc-sub-controls { background: #eef2f5; padding: 10px; border-radius: 6px; margin-bottom: 15px; display: flex; gap: 15px; align-items: center; flex-wrap: wrap; border: 1px solid #dee2e6; }
.pc-range-group { display: flex; align-items: center; gap: 5px; font-weight: bold; font-size: 13px; }
.pc-stamp-confirm { margin-left: auto; display: flex; gap: 5px; }

/* Canvas */
.pc-canvas-container { position: relative; width: 100%; line-height: 0; border: 1px solid #ddd; background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%); background-size: 20px 20px; overflow: hidden; }
#pcCanvas { width: 100%; height: auto; display: block; touch-action: none; cursor: crosshair; }
#pcLayerContainer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
#pcLayerContainer > .pc-stamp-object { pointer-events: auto; } /* Enable clicks on objects */

.pc-actions { margin-left: auto; display: flex; gap: 5px; }
.pc-btn { padding: 8px 15px; border: none; border-radius: 4px; background-color: #ff6b6b; color: white; cursor: pointer; font-size: 14px; font-weight: 600; }
.pc-btn.small { font-size: 12px; padding: 5px 10px; }
.pc-btn.secondary { background-color: #6c757d; }
.pc-btn.danger { background-color: #dc3545; }
.pc-btn.share-btn { background-color: #4267B2; }
@media (max-width: 600px) { .pc-controls-top, .pc-toolbar { flex-direction: column; gap: 10px; } .pc-actions, .pc-sub-controls { width: 100%; justify-content: center; } .pc-stamp-list { max-width: 100%; } }