.pw-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0 16px;
}

.pw-color-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pw-color-field input[type="color"] {
  width: 44px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.pw-swatches {
  display: flex;
  gap: 6px;
}

.pw-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
}

.pw-swatch:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.pw-zoom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 90px;
  justify-content: center;
}

.pw-status {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.pw-status.pw-status-cooldown {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.pw-viewport {
  width: 100%;
  max-width: 900px;
  height: 600px;
  margin: 0 auto;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  cursor: crosshair;
}

.pw-canvas-wrap {
  position: relative;
  width: 600px;
  height: 600px;
}

.pw-canvas-wrap canvas {
  position: absolute;
  top: 0;
  left: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  user-select: none;
}

#pwOverlay {
  pointer-events: none;
}

.pw-info {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .pw-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .pw-status {
    margin-left: 0;
    text-align: center;
  }

  .pw-viewport {
    height: 420px;
  }
}
