* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#canvas-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

#canvas {
    display: block;
    cursor: crosshair;
}

#cursors-overlay {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.cursor-marker {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
    transform: translate(8px, 8px);
    white-space: nowrap;
    font-size: 12px;
    color: #333;
    text-shadow: 0 0 2px #fff, 0 1px 2px #fff;
}

.cursor-marker__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.cursor-marker__label {
    padding: 1px 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.9);
}

#panel {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.panel-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-label {
    color: #333;
    white-space: nowrap;
}

.color-picker-wrap {
    position: relative;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.color-picker-wrap .pickr {
    display: block;
}

#color-picker-root {
    min-width: 2em;
    min-height: 2em;
}

.color-picker-wrap .pcr-button {
    min-width: 2em;
    min-height: 2em;
    display: block;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.tools {
    display: flex;
    gap: 2px;
}

.tool {
    padding: 0.35rem 0.6rem;
    font-size: 13px;
}

.tool.active {
    border-color: #111;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #333;
}

#brush-size {
    width: 120px;
}

.panel-actions {
    margin-left: auto;
    gap: 0.5rem;
}

#panel button {
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

#panel button:hover {
    background: #f5f5f5;
}

#panel button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
